xegaPermMutateGene2Opt {xegaPermGene}R Documentation

Mutate a gene (by a random 2-Opt move).

Description

xegaPermMutateGene2Opt mutates a permutation. The per position mutation rate is given by MutationRate().

Usage

xegaPermMutateGene2Opt(gene, lF)

Arguments

gene

A Permutation.

lF

Local configuration of the genetic algorithm.

Details

This operator is an implementation of the 2-Opt move due to Croes (1958).

Two edges are exchanged, if the exchange improves the result.

Value

A Permutation.

References

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>

See Also

Other Mutation: xegaPermMutateGeneBestGreedy(), xegaPermMutateGeneGreedy(), xegaPermMutateGeneOrderBased(), xegaPermMutateGenekInversion(), xegaPermMutateGenekOptLK(), xegaPermMutateMix()

Examples

gene1<-xegaPermInitGene(lFxegaPermGene)
xegaPermDecodeGene(gene1, lFxegaPermGene)
gene<-xegaPermMutateGene2Opt(gene1, lFxegaPermGene)
xegaPermDecodeGene(gene, lFxegaPermGene)

[Package xegaPermGene version 1.0.0.0 Index]