Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
3ZadeSSG authored Aug 7, 2018
1 parent 36e874e commit d23e454
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,11 @@ The advt alternatives for a company include TV, newspaper and radio. The cost of
121 518 142 84 297 35 29 36 236 390 238 301 55 96 153 336 0

To add this as input copy the TSP_Input_2 into the class constructor. This should be able to print the optimal path. I ran this using 1000 initial population size with 5 generations and it gave optimal output about 3052. However optimal output for this case is 2085 as said in https://people.sc.fsu.edu/~jburkardt/datasets/tsp/tsp.html . There's issue that if population size is large or number of generations increased then program will halt (Due to memory issue).

However initializing the population to 20000 in this case without doing any crossover we get 2513 as optimal path in the initial population which can be said close to 2085.
Here's the output of that:-

==================Initial Population==============

Fittest Individual:
Path: 10 2 11 5 15 3 6 17 12 9 16 14 7 4 13 1 8 Fitness: 2513

0 comments on commit d23e454

Please sign in to comment.