TspTwDominance

org.ddolibscala.example.tsptw.TspTwDominance

Dominance relation for the Traveling Salesperson Problem with Time Windows (TSPTW).

This class defines a dominance rule between two TspTwState instances. Two states are comparable if they share the same current position and the same set of remaining locations to visit mustVisit. Among such comparable states, the state with the lower current time dominates the other.

Dominance is used to prune the search space: if a state is dominated by another, it can be safely discarded without losing optimality.

Attributes

Graph
Supertypes
trait Dominance[TspTwState]
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

override def isDominatedOrEqual(state1: TspTwState, state2: TspTwState): Boolean

Test whether state1 is dominated by or equivalent to state2.

Test 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.

Value parameters

state1

the first state to compare

state2

the second state to compare against

Attributes

Returns
  • true if state1 is dominated by or equivalent to state2
  • false otherwise
Definition Classes
Dominance -> Dominance
override def key(state: TspTwState): TspTwDominanceKey

Returns a canonical key associated with a given state.

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.

Value parameters

state

the state for which a dominance key is requested

Attributes

Returns

an object uniquely (or canonically) representing the given state

Definition Classes

Inherited methods

final override def getKey(state: TspTwState): AnyRef

Used by the solver. Convert the input and output of key from Java to Scala and vice versa.

Used by the solver. Convert the input and output of key from Java to Scala and vice versa.

Attributes

Definition Classes
Dominance -> Dominance
Inherited from:
Dominance