Learn R Programming

xegaPermGene (version 1.0.0.1)

xegaPermMutateGenekOptLK: Mutate a gene (by a random Lin-Kernighan k-OPT move).

Description

xegaPermMutateGenekOptLK mutates a permutation.

Usage

xegaPermMutateGenekOptLK(gene, lF)

Value

A Permutation.

Arguments

gene

A Permutation.

lF

Local configuration of the genetic algorithm.

Details

This operator implements a random k-Opt move version of the Lin-Kernighan heuristic.

A sequence of random 2-Opt moves, all of which improve the result is executed.

References

Lin, S. and Kernighan. B. W. (1973): An Effective Heuristic Algorithm for the Traveling-Salesman Problem. Operations Research, 21(2), pp. 791-812. <doi:10.1287/opre.21.2.498>

See Also

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

Examples

Run this code
gene1<-xegaPermInitGene(lFxegaPermGene)
xegaPermDecodeGene(gene1, lFxegaPermGene)
gene<-xegaPermMutateGenekOptLK(gene1, lFxegaPermGene)
xegaPermDecodeGene(gene, lFxegaPermGene)

Run the code above in your browser using DataLab