Class PDPTWDominance
java.lang.Object
org.ddolib.examples.layered.pdptw.PDPTWDominance
- All Implemented Interfaces:
Dominance<PDPTWState>
Dominance class for the TSPTW problem. If for two states, the position is the same and the
mustVisit set is the same, then we can only keep the state with the lowest time.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetKey(PDPTWState state) Returns a canonical key associated with a given state.booleanisDominatedOrEqual(PDPTWState state1, PDPTWState state2) Tests whetherstate1is dominated by or equivalent tostate2.
-
Constructor Details
-
PDPTWDominance
public PDPTWDominance()Creates a new instance of this dominance relation.
-
-
Method Details
-
getKey
Description copied from interface:DominanceReturns a canonical key associated with a given state.This key is typically used to identify equivalent states or to group states that share the same dominance characteristics. Implementations should ensure that two states with identical keys are comparable under the same dominance criteria.
- Specified by:
getKeyin interfaceDominance<PDPTWState>- Parameters:
state- the state for which a dominance key is requested- Returns:
- an object uniquely (or canonically) representing the given state
-
isDominatedOrEqual
Description copied from interface:DominanceTests whetherstate1is dominated by or equivalent tostate2.A state
state1is said to be dominated bystate2if every feasible continuation fromstate1cannot yield a better objective value than one fromstate2. In other words,state2is at least as good asstate1in all relevant aspects of the problem.- Specified by:
isDominatedOrEqualin interfaceDominance<PDPTWState>- Parameters:
state1- the first state to comparestate2- the second state to compare against- Returns:
trueifstate1is dominated by or equivalent tostate2;falseotherwise
-