Learn R Programming

xegaPermGene (version 1.0.0.1)

xegaPermCross2Gene: Position-based crossover of 2 genes.

Description

xegaPermCross2Gene determines a random subschedule of random length.

It copies the random subschedule into a new gene. The rest of the positions of the new scheme is filled with the elements of the other gene to complete the permutation. This is done for each gene.

Usage

xegaPermCross2Gene(gg1, gg2, lF)

Value

List of 2 permutations.

Arguments

gg1

Permutation.

gg2

Permutation.

lF

Local configuration of the genetic algorithm.

References

Syswerda, G. (1991): Schedule Optimization Using Genetic Algorithms. In: Davis, L. (Ed.): Handbook of Genetic Algorithms, Chapter 21, p. 343. Van Nostrand Reinhold, New York. (ISBN:0-442-00173-8)

See Also

Other Crossover: xegaPermCrossGene()

Examples

Run this code
gene1<-xegaPermInitGene(lFxegaPermGene)
gene2<-xegaPermInitGene(lFxegaPermGene)
xegaPermDecodeGene(gene1, lFxegaPermGene)
xegaPermDecodeGene(gene2, lFxegaPermGene)
newgenes<-xegaPermCross2Gene(gene1, gene2)
xegaPermDecodeGene(newgenes[[1]], lFxegaPermGene)
xegaPermDecodeGene(newgenes[[2]], lFxegaPermGene)

Run the code above in your browser using DataLab