Installation of Concorde
The Concorde TSP Solver is freely available for academic research.
It is not included in the TSP R package and has
to be obtained separately from the
Concorde download page.
Either download the precompiled executables and place them in a suitable
directory (make sure they are executable), or you can get the source code and
compile the program on your own. TSP needs to know where the executables are.
There are two options:
use concorde_path()
to set the path to the
directory containing the executables for concorde and linkern, or
make
sure that the executables are in the search path stored in the PATH
environment variable (see Sys.setenv()
).
Using Concorde for solve_TSP()
solve_TSP()
uses write_TSPLIB()
to write the TSP for
Concorde and tries to find the appropriate precision
value (digits
after the decimal point) to convert the provided distances into the needed
integer value range. The precision
value can also be specified in
control
in solve_TSP()
with method Concorde. Warning
messages will alert the user if the conversion to integer values results
into rounding errors that are worse then what is specified in the
precision
control parameter.
To get a list of all available command line options which can be used via
the clo
option for solve_TSP
use concorde_help()
and
linkern_help()
. Several options (-x, -o,
-N, -Q) are not available via solve_TSP()
since they
are used by the interface.
If Concorde takes too long, then you can kill the 'concorde' process via your
operating system and you can continue with R.