Closed perrygeo closed 8 years ago
Concorde also ships with code to "solve" TSPs using the Lin–Kernighan heuristic.
Per chat, I suggest switching to LKH:
make
and it's ready (no need for external solvers etc.):+1:
LKH looks great. I'll spend some time looking into writing a python wrapper for it.
I'll likely take the short-cut of wrapping the CLI as I did in pyconcorde - building the interface first, then swapping out the implementation if/when we get around to building python bindings to the C lib.
Some quick notes on my initial testing with LK solvers
u2152
problem from TSPLIB, LKH can do a single run in 40 seconds and usually gets within 0.5% of the optimal. Concorde, OTOH, can solve for the optimal tour but it takes 40 minutes. LKH thus provides a more pragmatic solution for most use cases where we want a near-optimal result but quickly.I've renamed pyconcorde
to pytsp
and added optional support for LKH and potentially other solvers. This allows optimal_tour
to use one interface and the details of the implementation can be handled in pytsp
Is it possible to install pytsp for window 10?
concorde is the gold standard, basically all of the significant mathematical breakthroughs in TSP research are encapsulated in this program. It's the best but the license is restrictive, it needs a closed-source LP solver, the public code is not actively maintained and the current mechanism of calling out to a subprocess is clunky.