Skip to content

FrederikAlbrechtsen/local-tsp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Local search TSP

Python implementation of heuristics for the TSP - greedy, also known as nearest neighbour (NN) and 2-opt.

The tour used for the TSP is: New York, Los Angeles, Chicago, Minneapolis, Denver, Dallas, Seattle, Boston, San Francisco, St. Louis, Houston, Phoenix, Salt Lake City. The NxN matrix is in miles.

TSP

The traveling Salesman Problem (TSP) is a problem that deals with finding the shortest and most efficient route for a list of specific destinations. It is an NP-hard combinatorial problem, and consequently, no known polynomial-time algorithm can solve all instances of the problem.

Heuristic algorithms provide strong solutions, but not necessarily optimal.

Contributing

If you have a suggestion to improve this, please fork the repo and create a pull request. You can also open an issue with the tag "improvement". Any contributions you make are greatly appreciated.

TODO

Impelement 3-opt.