Traveling salesman library using approximation algorithm
-
13-10-2019 - |
Question
I'm currently doing a project that requires some fast TSP solving (about 50-100 nodes in 2 seconds). There are a lots of approximation algorithms out there, but I don't have time nor will to analyze them and code them myself.
Are there any free libraries that can solve TSP problem (approximation will do too)? Something like sortedNodes = solveTspPrettyPlease(nodes, 2sec)
would be just great.
Thanks in advance.
Solution
- http://code.google.com/p/java-traveling-salesman/ - genetic algorithm solution
- http://www.adaptivebox.net/CILib/code/tspcodes_link.html - links to many solutions, not all of which (if any?) are libraries
OTHER TIPS
Regarding the http://code.google.com/p/java-traveling-salesman/ link, you'll need to get the CVS version of jgap from April 1, 2006. You'll also need to hack the tsp code a little bit. Change JGapGreedyCrossoverEngine.java from protected double evaluate(Chromosome a_subject) to protected double evaluate(IChromosome a_subject)