Travelling salesman utility functions for c++ using json graphs. To generate datasets register on https://gisgraph.com, create and download the dataset(s).
- Download cmake from https://cmake.org/download/ and install
- Windows: Download MinGW from https://sourceforge.net/p/mingw-w64/wiki2/Make/ and install
- Unix: make sure you install g++ from your distribution's repository
- Download git from https://git-scm.com/downloads and install
Open a terminal and git clone https://github.com/baggins800/TSPUtils
or download and unzip https://github.com/Baggins800/TSPUtils/archive/main.zip.
Without cmake: open PowerShell, navigate to TSPUtils/code/
and run g++ main.cpp -o TSP && ./TSP.exe
With cmake: open PowerShell, navigate to TSPUtils/
,
mkdir build && cd build
cmake ../code && make -j
Using an IDE: File > Open Project
and select TSPUtils/code/CMakeLists.txt
git clone https://github.com/baggins800/TSPUtils && cd TSPUtils
mkdir build && cd build
cmake ../code && make -j
./TSP.exe --load-json=pathto.json --greedy
./TSP --load-json=pathto.json --greedy
./TSP<.exe> --seed=<some unsigned integer> --arcs=<number of arcs> --vertices=<number of vertices> --save-json=datasetname.json