--------------
| README.txt |
--------------

Create executable
-----------------
To create an executable of my TTP-solver implementation, you will first need to install the open source Gecode library. 
It is available at http://www.gecode.org/download.html.
I did use Gecode version 3.7.3 to compile my executable and recommand you to use this version too, since there is no backward compatibility in newer Gecode versions.

When building the executable with g++, paths to the Gecode library files must be specified to prevent linking errors. This is done by specifying the folder where the library files lie with the option -L/path/to/lib and specifying the library files themself with options 
-lgecodeint -lgecodekernel -lgecodesearch -lgecodegist -lgecodeset -lgecodeminimodel -lgecodesupport
when calling g++.
Althought the Gecode library consists of a multitude of files, the library files listed above are sufficient to build an executable.
Note that I experienced some issues when not building with g++ version 4.6.3. So I recommand to use this version.


Execute TTP-solver
------------------
Given that you called your executable TTP like I did, the call to it has to be of the following form:
$ ./TTP /path/to/distance/matrix/file /path/to/team/lables/file FD EP SF SB OT SD NT lambda
where 
-FD is "true" or "false" depending on whether forced deepening should be applied.
-EP is "true" or "false" depending on whether elite paths should be applied.
-SF is "true" or "false" depending on whether subtree forests should be applied.
-SB is in {0,1,2} with 0 being no symmetry breaking, 1 being symmetry-A and 2 being symmetry-H.
-OT is in {0,1,2,3} with 0 being no team reordering, 1 being max total ordering, 2 being min total ordering and 3 being random ordering.
-SD is the subtree forests depth and can be any positive integer smaller than the solution depth.
-NT is the number of threads and can be any positive integer.
-lambda is the parameter that determines how much deeper forced deepening goes with every iteration and can be any positive integer smaller than or equal to the solution depth.

Note that the program does not check your input parameters. It is in your own responsibility that you pass them properly.


Format required for the distance matrix and team labels file
------------------------------------------------------------
The distance matrix file has to be in the following form (example for 4 teams):

0 71 85 165
71 0 154 175
85 154 0 84
165 175 84 0

As you can see distances for the first team to any other team are listed in the first line of the file 
Distances for the second team are listed in the second line and so on.
Distances have to be separated by a blank character.
At the end of every line (except for the last) a line break has to be made.

The team labels file has to be in the following form (example for 4 teams):

BAS
FRB
ZHR
STG

As you can see the label for the first team is on the first line, the label for the second team is on the second line and so on.
Note that labels can have more than 3 letters, but are not allowed to contain special characters.

Problem sets SUPER and GALAXY can be downloaded from http://daviduthus.org/.
