Class TSPTWAwAstarMain

java.lang.Object
org.ddolib.examples.layered.tsptw.TSPTWAwAstarMain

public class TSPTWAwAstarMain extends Object
The Traveling Salesman Problem with Time Windows (TSP with Time Windows) with Anytime Weighted A* (AWA*). Main class to solve the Traveling Salesman Problem with Time Windows (TSPTW) using the AWA* search algorithm.

This class initializes a TSPTWProblem instance, sets up an A* model, and runs the AWA* 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.examples.layered.tsptw.TSPTWAwAstarMain"
         
  • Specify a custom instance file and optionally the maximum MDD width:
     mvn exec:java -Dexec.mainClass="org.ddolib.examples.layered.tsptw.TSPTWAwAstarMain" \
         -Dexec.args="<your file> <max MDD width>"
         

Default benchmark instances are taken from López-Ibáñes and Blum TSPTW instances.

See Also:
  • Method Details

    • main

      public static void main(String[] args) throws IOException
      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