Package org.ddolib.examples.layered.tsp
Class TSPDdoMain
java.lang.Object
org.ddolib.examples.layered.tsp.TSPDdoMain
Main class to solve a Traveling Salesman Problem (TSP) instance using the Decision Diagram
Optimization (DDO) method.
This class reads a TSP instance from an XML file, initializes a TSPProblem and a
DdoModel with:
- a relaxation strategy (
TSPRelax), - a state ranking (
TSPRanking), - a fast lower bound (
TSPFastLowerBound), - and a fixed width heuristic (
FixedWidth) for limiting the decision diagram width.
The DDO solver is then used to minimize the TSP objective, printing the best solution and search statistics.
Usage:
java TSPDdoMain [instanceFile]
If no instanceFile argument is provided, the default instance
("data/TSP/instance_18_0.xml") is used. The width of the decision diagram is fixed at 500.
-
Method Summary
-
Method Details
-
main
Entry point of the program. Builds a TSP instance and solves it using the DDO 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
-