I am implementing TSPTW(Travelling salesman with time window) with Genetic Algorithm with 81 cities, I applied the following steps:
mutation prob=0.03
population size=100
-Generate random population according to the value of population size intialized
-Sort the generated population
-Looping for populations and determine two parents by roulette selection, apply crossover on the parents, get child and add it to children list
-I am saving the best solution over the algorithm
-Sort the Children, replace worst tour in populations with best one of children
until no good children is existing is better than worst solution in populations
-loop (1 to population size)in all populations and Apply mutation of each worst solution with solution i , if the mutated solution is better than the worst solution of children. I insert it in populations in its place according to its fitness function and remove the worst one.
I can't find a good result, and I run it to specific high time, but I found sometimes it stuck with solution and can't get better result. I changed the
parameters(population size=20000 ,1000,100, mutation probability=0.03,0.02,..)
I've also tested it with cycle crossover, and ordered crossover
I would like to know, are my steps right ? How I can specify population size and mutation probability correctly?