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
in rounding errors that are worse than what is specified in the
precision control parameter.
For Euclidean problems (ETSP), the coordinates are shifted to start at
zero and multiplied by 10^precision, because Concorde rounds the
calculated distances to integers. To avoid integer overflows in Concorde,
the scaling is reduced (with a warning) so that no scaled coordinate exceeds
\(10^7\). write_TSPLIB() gives a warning if cities end up with identical
coordinates (e.g., because rounding made distinct cities identical, i.e.,
their distances became smaller than 1); increase precision or rescale the
data in this case.
Concorde and linkern have their own random number generators, which
set.seed() cannot reach. Their seed can be set with the optional control
parameter seed, e.g., control = list(seed = 1234). It is passed on to
the programs (option -s) and has to be a whole number between 0 and
.Machine$integer.max. If no seed is specified, one random number is
drawn from R's random number generator and used as the seed, so
calling set.seed() before solve_TSP() also makes these methods
reproducible (this advances R's global random-number stream by one draw).
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 interrupt solve_TSP()
using Esc/CTRL-C. On most operating systems, this will also
terminate the Concorde executable. If Concorde keeps running, then you can
kill the 'concorde' process via your operating system.