Class TSPTWLnsMain

java.lang.Object
org.ddolib.examples.tsptw.TSPTWLnsMain

public class TSPTWLnsMain extends Object
Entry point for solving the Traveling Salesman Problem with Time Windows (TSPTW) using a Large Neighborhood Search (LNS) approach.

This class reads an instance file describing a TSPTW problem, constructs an LNS model, and searches for an optimal or near-optimal tour that respects time windows. The best solution found is printed along with runtime statistics.

Usage:

 java TSPTWLnsMain [instanceFilePath]
 
  • instanceFilePath (optional): Path to the TSPTW instance file. If omitted, the default instance located at data/TSPTW/AFG/rbg010a.tw is used.

The LNS model is configured with:

The search is limited to 1000 milliseconds per iteration, and the best solution found is printed to System.out along with statistics.

Version:
1.0
Author:
  • Constructor Details

    • TSPTWLnsMain

      public TSPTWLnsMain()
  • Method Details

    • main

      public static void main(String[] args) throws IOException
      Main method to run the TSPTW LNS solver.
      Parameters:
      args - optional command-line argument:
      • args[0]: path to the TSPTW instance file (default: data/TSPTW/AFG/rbg010a.tw)
      Throws:
      IOException - if there is an error reading the instance file.