Salesmen don't even travel like that anymore
The goal of this project is to plot and visualize the progress of the simulated annealing algorithm in arriving at a good enough solution for the travelling salesman problem. For path-finding between a source and destination node, the code mostly relies on algorithms from the NetworkX python library. For a number of points in the graph, a custom simulated annealing and plotting is implemented.
requirements_pip.txt or requirements_conda.txt Major libraries used: pyrosm, osmnx, NetworkX
The files contain a lot of commented out code left in for plotting and debugging, in case someone wants to expand on the code or verify the results.
main.py has the POINTS_IN_ROUTE constant at the top to adjust number of random points on the graph used for the problem. It also has TARGET_FILE to define the path to the openstreepmap dataset in pbf format.
routes.py has parameters to tune for the simulated annealing algorithm itself, which also requires adjusting the loop iteration values in main.py
pyrosm reference osmnx reference NetworkX shortest path algorithm travel time calculation based on speed limit and distance pandas GeoDataFrame reference OpenStreetMap