Skip to content

Latest commit

 

History

History
33 lines (21 loc) · 1020 Bytes

File metadata and controls

33 lines (21 loc) · 1020 Bytes

Solving TSP problem using GWO in python

This python based code represents an algorithm based on Grey Wolf Optimizer (GWO) for solving the Traveling Salesman Problem (TSP), which is called (GWO-TSP).

Run Locally

Clone the repo

  git clone https://github.com/moharastegaran/Solving-TSP-problem-using-GWO-in-python.git

Go to the project directory

  cd Solving-TSP-problem-using-GWO-in-python

Once you cloned the repo, you'll have to need to install missing libraries using pip

  pip install numpy
  pip install matplotlib

And you're good to go. Run GWO_TSP.py to plot graph as result of solving problem.

Test Results

Here are some random results of plotting distances for traveling salesman between six cities. As you see results obtained from GWO algorithm are not the best optimal solutions, but they produce acceptable results.

alt testresults