Class PDPTWDominance

java.lang.Object
org.ddolib.examples.layered.pdptw.PDPTWDominance
All Implemented Interfaces:
Dominance<PDPTWState>

public class PDPTWDominance extends Object implements 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 Details

    • PDPTWDominance

      public PDPTWDominance()
      Creates a new instance of this dominance relation.
  • Method Details

    • getKey

      public PDPTWDominanceKey getKey(PDPTWState state)
      Description copied from interface: Dominance
      Returns 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:
      getKey in interface Dominance<PDPTWState>
      Parameters:
      state - the state for which a dominance key is requested
      Returns:
      an object uniquely (or canonically) representing the given state
    • isDominatedOrEqual

      public boolean isDominatedOrEqual(PDPTWState state1, PDPTWState state2)
      Description copied from interface: Dominance
      Tests whether state1 is dominated by or equivalent to state2.

      A state state1 is said to be dominated by state2 if every feasible continuation from state1 cannot yield a better objective value than one from state2. In other words, state2 is at least as good as state1 in all relevant aspects of the problem.

      Specified by:
      isDominatedOrEqual in interface Dominance<PDPTWState>
      Parameters:
      state1 - the first state to compare
      state2 - the second state to compare against
      Returns:
      true if state1 is dominated by or equivalent to state2; false otherwise