Skip to content

MohammadAsadolahi/solving-TSP-problem-with-ACO-Heuristic-Algorithm-in-python

Repository files navigation

Solving-TSP-with-ACO-python

Solving tsp with ACO (ant colony optimization) in python using heuristic algorithm to solve high dimensional tsp problem
Cities are included in "Cities List.txt" in repo to add or remove cities you've got to include or exclude cities in every line like: "1 909 649"
First number is city index and next two numbers are city euclidean coordinates: x,y which are set to 0 to 1000 but you can change the range to any range The distance between cities are calculated by Euclidean Distance which is:
Euclidean Distance

I look forward to you questions about the project!

a random solution:

random solution

route found by algorithm at iteration of 16(feeding algorithm with list of 20 city euclidean coordinates: x,y from 0 to 1000 ):

iteration 16 solution

route found by algorithm at iteration of 32(feeding algorithm with list of 20 city euclidean coordinates: x,y from 0 to 1000 ):

iteration 32 solution

route found by algorithm at iteration of 48(feeding algorithm with list of 20 city euclidean coordinates: x,y from 0 to 1000 ):

iteration 48 solution

route found by algorithm at iteration of 64(feeding algorithm with list of 20 city euclidean coordinates: x,y from 0 to 1000 ):

iteration 64 solution

route found by algorithm at iteration of 80(feeding algorithm with list of 20 city euclidean coordinates: x,y from 0 to 1000 ):

iteration 80 solution

route found by algorithm at iteration of 96(feeding algorithm with list of 20 city euclidean coordinates: x,y from 0 to 1000 ):

iteration 96 solution

route found by algorithm at iteration of 112(feeding algorithm with list of 20 city euclidean coordinates: x,y from 0 to 1000 ):

iteration 112 solution

route found by algorithm at iteration of 128(feeding algorithm with list of 20 city euclidean coordinates: x,y from 0 to 1000 ):

iteration 128 solution

route found by algorithm at iteration of 144(feeding algorithm with list of 20 city euclidean coordinates: x,y from 0 to 1000 ):

iteration 144 solution

route found by algorithm at iteration of 160(feeding algorithm with list of 20 city euclidean coordinates: x,y from 0 to 1000 ):

iteration 160 solution

Releases

No releases published

Packages

 
 
 

Languages