This is a JAVA framework for the Traveling Salesman Problem (TSP).
This framework was created by Fabien Léhuédé, Damien Prot and Axel Grimault for pedagogic issues at Institut Mines Télécom Atlantique.
The project is available on github : https://github.com/COPSI-Teaching/tsp-framework.
The project is under licence GNU General Public License, version 2.
Follow these steps :
- Download an archive zip of the project from github
- Open Eclipse
- Import a project (General->Existing Projects into Workspace) (click on next)
- Select archive file (select the archive you downloaded at step 1). Under projects, select the tsp-framework (click on Finish)
Run a java application. You must specify arguments.
Run: -help
for help.
Run this command (this command will show the help).
- Create a bin directory (if not exist)
mkdir bin
- Compil the project
javac -d ./bin/ -sourcepath src/ ./src/tsp/Main.java
- Run the program
java -cp ./bin/ tsp.Main -help
Run this command (this command will show the help). To run the code under Windows, you must have a JDK available.
- Create a bin directory (if not exist)
mkdir bin
- Compil the project
javac -d "./bin/" -sourcepath "src/"" ./src/tsp/Main.java "
- Run the program
java -cp "./bin/" tsp.Main -help
Some instances are provided for testing the framework. Optimal values for theses instances can be found in this http://comopt.ifi.uni-heidelberg.de/software/TSPLIB95/STSP.html.
To run the framework over all instances, a script is available under the folder /benchmark
. To run the script, you have to follow these commands.
The script produces two files:
- standardOutput.txt : the standard output of the framework.
System.out.print
command in JAVA. - errorOutput.txt : the error output of the framework.
System.err.print
command in JAVA.
The script executes the framework over all instances. In a terminal:
- Go to the benchmark directory
cd benchmark
- Run the script
bash scriptUNIX.sh
The script executes the framework over all instances. In a terminal:
- Go to the benchmark directory
cd benchmark
- Run the script
scriptWINDOWS.bat
A doxygen documentation of the code is provided under the folder /doc
.