Class TSPAcsMain

java.lang.Object
org.ddolib.examples.layered.tsp.TSPAcsMain

public class TSPAcsMain extends Object
The Traveling Salesman Problem (TSP) with Acs. Main class to solve a Traveling Salesman Problem (TSP) instance using the ACS (Anytime Column Search) algorithm.

This class reads a problem instance from a file (XML format), initializes a TSPProblem and an AcsModel with a fast lower bound (TSPFastLowerBound), and then solves the problem using the ACS solver. The solution and search statistics are printed to the console.

Usage:

 java TSPAcsMain [instanceFile]
 

If no instanceFile argument is provided, a default instance ("data/TSP/instance_18_0.xml") is used.

  • Method Details

    • main

      public static void main(String[] args) throws IOException
      Entry point of the program. Builds a TSP instance and solves it using the ACS algorithm.
      Parameters:
      args - optional command-line argument: path to the TSP instance file (default: data/TSP/instance_18_0.xml)
      Throws:
      IOException - if there is an error reading the instance file