Package org.ddolib.examples.tsptw
Class TSPTWLnsMain
java.lang.Object
org.ddolib.examples.tsptw.TSPTWLnsMain
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 atdata/TSPTW/AFG/rbg010a.twis used.
The LNS model is configured with:
- A
TSPTWRankingto rank tour decisions during the search. - A
TSPTWFastLowerBoundfor efficient lower bound estimation. - A
SimpleDominanceCheckerwithTSPTWDominanceto prune dominated states. - A fixed width heuristic (
FixedWidth) with a width of 10 for tree exploration.
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 Summary
Constructors -
Method Summary
-
Constructor Details
-
TSPTWLnsMain
public TSPTWLnsMain()
-
-
Method Details
-
main
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.
-