Package org.ddolib.examples.tsptw
Class TSPTWAstarMain
java.lang.Object
org.ddolib.examples.tsptw.TSPTWAstarMain
The Traveling Salesman Problem with Time Windows (TSP with Time Windows) with AsTar.
Main class to solve the Traveling Salesman Problem with Time Windows (TSPTW)
using the A* search algorithm.
This class initializes a TSPTWProblem instance, sets up an A* model,
and runs the A* solver to find an optimal or near-optimal solution to the TSPTW.
Usage:
- Run the default instance from the command line using Maven:
mvn exec:java -Dexec.mainClass="org.ddolib.ddosolver.examples.tsptw.TSPTWAstarMain" - Specify a custom instance file and optionally the maximum MDD width:
mvn exec:java -Dexec.mainClass="org.ddolib.ddosolver.examples.tsptw.TSPTWAstarMain" -Dexec.args="<your file> <max MDD width>"
Default benchmark instances are taken from López-Ibáñes and Blum TSPTW instances.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
TSPTWAstarMain
public TSPTWAstarMain()
-
-
Method Details
-
main
Entry point for running the A* solver on a TSPTW instance.- Parameters:
args- Optional command-line arguments: the first argument can be the path to a TSPTW instance file.- Throws:
IOException- If there is an error reading the input instance file.
-