TspTwRanking

org.ddolibscala.example.tsptw.TspTwRanking

Ranking class for states in the Traveling Salesperson Problem with Time Windows (TSPTW).

This class implements org.ddolibscala.modeling.StateRanking for TSPTWState and is used to order states within the same layer of a decision diagram. The ranking helps identify which states are better candidates for merging in a relaxed decision diagram.

The comparison is based on the number of nodes in the maybeVisit set: states with more nodes in maybeVisit are considered better candidates for merging and are ranked higher.

Attributes

Graph
Supertypes
trait StateRanking[TspTwState]
trait Comparator[TspTwState]
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

override def rank(state1: TspTwState, state2: TspTwState): Int

Defines how to compare two states.

Defines how to compare two states.

Value parameters

state1

the first state to compare

state2

the second state to compare

Attributes

Returns

a value x where

         x < 0 if state1 < state2
         x == 0 if state1 == state2
         x > 0 if state1 > state2
Definition Classes

Inherited methods

final override def compare(o1: TspTwState, o2: TspTwState): Int

Used by the solver. The java method called to compare two states.

Used by the solver. The java method called to compare two states.

Attributes

Definition Classes
StateRanking -> Comparator
Inherited from:
StateRanking
def reversed(): Comparator[TspTwState]

Attributes

Inherited from:
Comparator
def thenComparing[U <: Comparable[_ >: U <: <FromJavaObject>]](x$0: Function[_ >: TspTwState <: <FromJavaObject>, _ <: U]): Comparator[TspTwState]

Attributes

Inherited from:
Comparator
def thenComparing[U <: <FromJavaObject>](x$0: Function[_ >: TspTwState <: <FromJavaObject>, _ <: U], x$1: Comparator[_ >: U <: <FromJavaObject>]): Comparator[TspTwState]

Attributes

Inherited from:
Comparator
def thenComparing(x$0: Comparator[_ >: TspTwState <: <FromJavaObject>]): Comparator[TspTwState]

Attributes

Inherited from:
Comparator
def thenComparingDouble(x$0: ToDoubleFunction[_ >: TspTwState <: <FromJavaObject>]): Comparator[TspTwState]

Attributes

Inherited from:
Comparator
def thenComparingInt(x$0: ToIntFunction[_ >: TspTwState <: <FromJavaObject>]): Comparator[TspTwState]

Attributes

Inherited from:
Comparator
def thenComparingLong(x$0: ToLongFunction[_ >: TspTwState <: <FromJavaObject>]): Comparator[TspTwState]

Attributes

Inherited from:
Comparator