This repository has been archived on 2021-10-31. You can view files and clone it, but cannot push or open issues or pull requests.
AICup/execute.md

1.6 KiB

Instructions for execution

Requirements

In order to reproduce the results reported in the Excel table, one must have the following requirements:

  • A Python 3 interpreter and all Python dependencies required for the AI2020BsC repository installed, namely time, matplotlib and numpy;
  • A working C++11 or greater compiler accessible from the c++ command (Modern versions of clang and g++ are both acceptable compilers).

Execution

cd in the code directory and execute python3 ./run.py from the terminal. The script will automatically compile the C++ companion program and start the TSP computation for each problem.

Results will be saved in <problemname>.sol files where <problemname> is respectively the name of the problem solved.

Execution time for each problem will be computed using the same criteria used for the original AI2020BsC repository. Times and lengths found will be saved in a file named results.csv which will be located in the same directory as run.py.

.sol file contents

Solution files are made up of just one line, containing a valid Python expression representing an array. The array in question contains the order in which cities must be visited, representing each city by its number. The array starts and ends with the starting city of the tour.

Here is the Backus Naur grammar for .sol files:

<.sol file> ::= <city array> '\n'
<city array> ::= '[' <start city> ", " <cities> <start city> ']'
<cities> ::= <city> ", " <cities> | <city> ", " 
<start city> ::= unsigned integer
<city> ::= unsigned integer