Skip to content
Matthew Perry edited this page Feb 28, 2016 · 2 revisions

Instructions for installing LKH

LHK is an implementation of the Lin-Kernighan heuristic

Obtain the code from http://www.akira.ruc.dk/~keld/research/LKH/ and follow instructions on that page. In particular, make sure you comply with the license:

This code is distributed for research use. The author reserves all rights to the code.

To install on Unix/Linux/BSD/OSX:

wget http://www.akira.ruc.dk/~keld/research/LKH/LKH-2.0.7.tgz
tar xvfz LKH-2.0.7.tgz
cd LKH-2.0.7
make

An executable file called LKH will now be available in the directory LKH-2.0.7. You can symlink this /usr/local/bin or copy anywhere on your PATH

Instructions for installing Concorde

http://www.math.uwaterloo.ca/tsp/concorde/index.html

The code is available free of charge but it is not open source and usage is restricted.

The code ... is available for academic research use; for other uses, contact William Cook for licensing options.

It is your responsibility to comply with this license if you choose to install and use concorde.

OS X

wget http://www.math.uwaterloo.ca/tsp/concorde/downloads/codes/src/co031219.tgz
tar -xzvf co031219.tgz
cd concorde

Now we need to use some modern automake files, this seems to work

brew install automake
cp /usr/local/Cellar/automake/1.15/share/automake-1.15/config.guess .
cp /usr/local/Cellar/automake/1.15/share/automake-1.15/config.sub .

We need a linear programming solver that is compatible with concorde.

http://www.math.uwaterloo.ca/~bico/qsopt/index.html

QSOpt is freely available but without source code. The OS X binary is a bit hidden on the webpage. You can download a compatible binary by

mkdir qsopt
cd qsopt
wget http://www.math.uwaterloo.ca/~bico/qsopt/beta/codes/mac64/qsopt
wget http://www.math.uwaterloo.ca/~bico/qsopt/beta/codes/mac64/qsopt.a
wget http://www.math.uwaterloo.ca/~bico/qsopt/beta/codes/mac64/qsopt.h
cd ..

Then configure and make concorde

configure --with-qsopt=/FULL/PATH/concorde/qsopt
make

Now add the concorde bin dir to the path

export PATH=/FULL/PATH/concorde/TSP:$PATH

or copy the binary

cp /FULL/PATH/concorde/TSP/concorde /usr/local/bin
Clone this wiki locally