Traveling Salesman Problem Solver with Python
This program provides visualization of the nearest-neighbor method
and the 2-opt method for the traveling salesman problem.
Requirements
- Python 3.4+
- Numpy
- Matplotlib
- Qt4
- PyQt4
How to play
$ python tsp_gui.py
- Left click to put a city on the canvas
- Right click on a city to remove it
- Middle click on the canvas to remove all cities
- Shift-left click on a city to set it as the initial city
- Click "nearest neighbor method" button to run the nearest-neighbor method
- Click "2-opt method" to run the 2-opt method
- Click "Clear route" button to remove path
- Click "Clear all" button to reset the canvas
- If the update rate is too fast, input delay time
in the text areas below the buttons
- Do NOT click "Clear all" button while the methods are running!!
Binary files
Removed