java.lang.Object
org.maxicp.cp.examples.raw.tsptw.TSPTWSuccessor
Traveling Salesman Problem with Time Windows (TSPTW) using a successor-based routing model.
Model:
succ[i]= successor of node i in the tourCircuiton succarrive[i]= arrival time at node i, propagated forward via successor:arrive[succ[i]] >= arrive[i] + dist[i][succ[i]]CostAllDifferentDCas a redundant filtering for the total distance
The depot is duplicated at the end of the instance (node n-1).
The tour starts at node 0 and ends at node n-1, so succ[n-1] = 0 closes the circuit.
The arrival time at node 0 is fixed to 0.
Time window constraints: for each node i,
earliest[i] <= arrive[i] <= latest[i] and
arrive[succ[i]] >= arrive[i] + dist[i][succ[i]].
The latter uses the row dist[i] directly via an element constraint,
avoiding the need to extract columns from the distance matrix.
Instances from: https://lopez-ibanez.eu/tsptw-instances
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
TSPTWSuccessor
public TSPTWSuccessor()
-
-
Method Details
-
main
-