Skip to content

Latest commit

 

History

History
39 lines (36 loc) · 1.38 KB

README.md

File metadata and controls

39 lines (36 loc) · 1.38 KB

TSPUtils

Travelling salesman utility functions for c++ using json graphs. To generate datasets register on https://gisgraph.com, create and download the dataset(s).

Requirements

Open a terminal and git clone https://github.com/baggins800/TSPUtils or download and unzip https://github.com/Baggins800/TSPUtils/archive/main.zip.

How to build and compile

Windows 10

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

Linux/macOS

git clone https://github.com/baggins800/TSPUtils && cd TSPUtils
mkdir build && cd build
cmake ../code && make -j

Run the executable

Windows 10

./TSP.exe --load-json=pathto.json --greedy

Linux

./TSP --load-json=pathto.json --greedy

Generate a random dataset

./TSP<.exe> --seed=<some unsigned integer> --arcs=<number of arcs> --vertices=<number of vertices> --save-json=datasetname.json