Ready to use TSP examples:
Example input files in LP- and MPS-format with random cost matrices Cij
with a number N of cities/stations
The results of the
examples above are available at the results
Solve your own TSP:
If you want to play with your own TSP problem, please take these files for
N=6...14 cities (LP-format). There are additional variables Xi_j for a
comfortable definition of the cost function. Just set your edge
length/cost cij in front of the
variable (i = start-node of
edge, j = end-node).
E.g. 30X1_2 means edge
1->2 has to be weighted with 30 within the cost function.
- For the TSP
calculations with up to 12 cities I used the solver
QSopt which allows a comfortable LP-format input
(download here). Thanks to David Applegate,
William Cook, Sanjeeb Dash and Monika Mevenkamp for providing this nice
- Additionally, the
includes a tool 'qsreader' to transform LP-files into MSP format so you
can use this if you prefer another LP-solver (e.g. CLP, see below).
- For larger problems
(12 cities and more) I used the COIN-LP solver (download CLP here). Thanks to John J.
Forrest for this very performant solver. CLP
requires MPS input so the above LP-input files for N>=12 are