powered by
xegaPermMutateGene2Opt mutates a permutation.
xegaPermMutateGene2Opt
xegaPermMutateGene2Opt(gene, lF)
A Permutation.
Local configuration of the genetic algorithm.
This operator is an implementation of the 2-Opt move due to Croes (1958).
Two edges are exchanged, if the exchange improves the result.
Croes, G. A. (1958): A Method for Solving Traveling-Salesman Problems. Operations Research, 6(6), pp. 791-812. <doi:10.1287/opre.6.6.791>
Other Mutation: xegaPermMutateGeneBestGreedy(), xegaPermMutateGeneGreedy(), xegaPermMutateGeneOrderBased(), xegaPermMutateGenekInversion(), xegaPermMutateGenekOptLK(), xegaPermMutateMix()
xegaPermMutateGeneBestGreedy()
xegaPermMutateGeneGreedy()
xegaPermMutateGeneOrderBased()
xegaPermMutateGenekInversion()
xegaPermMutateGenekOptLK()
xegaPermMutateMix()
gene1<-xegaPermInitGene(lFxegaPermGene) xegaPermDecodeGene(gene1, lFxegaPermGene) gene<-xegaPermMutateGene2Opt(gene1, lFxegaPermGene) xegaPermDecodeGene(gene, lFxegaPermGene)
Run the code above in your browser using DataLab