Class PDPTWState
java.lang.Object
org.ddolib.examples.layered.pdptw.PDPTWState
State representation for the Pickup and Delivery Problem with Time Windows (PDPTW).
-
Constructor Summary
ConstructorsConstructorDescriptionPDPTWState(BitSet current, BitSet openToVisit, BitSet allToVisit, int minContent, int maxContent, double minCurrentTime, double maxCurrentTime) Builds a PDPTW state with interval-valued content/time information. -
Method Summary
Modifier and TypeMethodDescriptionbooleaninthashCode()printInterval(double min, double max) Formats a possibly imprecise value as either a single number, whenminandmaxare equal, or as an interval[min;max]otherwise.printInterval(int min, int max) Formats a possibly imprecise value as either a single number, whenminandmaxare equal, or as an interval[min;max]otherwise.singleton(int singletonValue) Builds a singletonBitSetcontaining only the given value.toString()
-
Constructor Details
-
PDPTWState
public PDPTWState(BitSet current, BitSet openToVisit, BitSet allToVisit, int minContent, int maxContent, double minCurrentTime, double maxCurrentTime) Builds a PDPTW state with interval-valued content/time information.- Parameters:
current- current node(s)openToVisit- currently reachable unvisited nodesallToVisit- all remaining unvisited nodesminContent- lower bound on vehicle loadmaxContent- upper bound on vehicle loadminCurrentTime- lower bound on current timemaxCurrentTime- upper bound on current time
-
-
Method Details
-
hashCode
public int hashCode() -
equals
-
singleton
Builds a singletonBitSetcontaining only the given value.- Parameters:
singletonValue- the value to set in the returned set- Returns:
- a new
BitSetwith onlysingletonValueset
-
printInterval
Formats a possibly imprecise value as either a single number, whenminandmaxare equal, or as an interval[min;max]otherwise.- Parameters:
min- the lower bound of the valuemax- the upper bound of the value- Returns:
- the formatted value
-
printInterval
Formats a possibly imprecise value as either a single number, whenminandmaxare equal, or as an interval[min;max]otherwise.- Parameters:
min- the lower bound of the valuemax- the upper bound of the value- Returns:
- the formatted value
-
toString
-