As part of the second project of Algorithm Design, the goal was to implement various algorithms to solve the Travelling Salesman Problem (TSP), using backtracking and various heuristics and approximations.
This project was carried out by students from group 163:
The project was developed in C++ and uses the CMake tool to compile the source code and this documentation.
This program takes as input:
edges.csv
: A path to a csv file containing the edges of the graph.[nodes.csv]
: An optional path to a csv file containing the nodes of the graph, and their respective coordinates.Warning: If a
nodes.csv
file is not provided, the algorithms that generate new edges using the nodes' coordinates will not be available.
Make sure that the csv files are in the correct format and that the paths are correct.
run.sh
(located in the directory of the project) in the terminal, giving the correct paths as
arguments.
For example:
./run.sh dataset/Real-world\ Graphs/graph1/edges.csv dataset/Real-world\ Graphs/graph1/nodes.csv
Warning: Make sure the script has the correct permissions to be executed.
Note: Feel free to change the script to suit your needs.
cmake -DCMAKE_BUILD_TYPE=Release CMakeLists.txt
make -j$(nproc)
./DA2324_PRJ2_G163 <edges.csv> [<nodes.csv>]
Warning: Don't forget to change the arguments to the correct paths.
Release
.dataset/Toy-Graphs/tourism.csv
$ProjectFileDir$
Debug
build mode.
Ensure the build mode is set to Release
prior to running the program.