我正在用 81 个城市的遗传算法实施 TSPTW(带时间窗的旅行推销员),我应用了以下步骤:
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.
我找不到好的结果,我将它运行到特定的高时间,但我发现有时它会卡在解决方案中并且无法获得更好的结果。我改变了
参数(人口规模=20000,1000,100,突变概率=0.03,0.02,..)
我还用循环交叉对其进行了测试,并订购了交叉
我想知道,我的步骤对吗?如何正确指定种群规模和突变概率?