Skip to content

javadshoja/NasirKhusraw

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nasir Khusraw : Travelling Salesman Problem

The TSP solved using genetic algorithm.

This project show TSP path overlaid on a map of the Iran provinces & their capitals.

Python code was inspired from here.

Requirements

  • Python version 3+
  • Jupyter notebook
  • Numpy
  • Pandas
  • Matplotlib

Getting Started

To launch the notebook, run the following command from a terminal on the application path:

jupyter notebook tsp-ga.ipynb

Result

Change the numCities for different results.

The yellow star shows the starting city coordinates which is the first line in capitals.json.You can replace it with another cities to change starting city coordinates.

The result for first 15 capitals :

output

About

The TSP solved using genetic algorithm and show TSP path overlaid on a map of the Iran provinces & their capitals.

Topics

Resources

Stars

Watchers

Forks