TspTwState

org.ddolibscala.example.tsptw.TspTwState
case class TspTwState(position: Position, time: Int, mustVisit: BitSet, maybeVisit: BitSet, depth: Int)

Represents a state in the dynamic programming model for the Traveling Salesperson Problem with Time Windows (TSPTW).

Each state encapsulates the current information about the vehicle's position, the set of nodes yet to visit, and timing information. This record is used both for individual states and for relaxed/merged states.

Value parameters

depth

a depth of the layer containing this state in the dynamic programming model

maybeVisit

a set representing nodes that might have been visited or not in merged states

mustVisit

a set representing all nodes that must still be visited

position

the current last position of the vehicle. Usually unique and represented by TspNode. In merged states, the vehicle can be "at any position at the same time," represented by VirtualNodes

time

the arrival time of the vehicle at the current position

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Any

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product