selection_linearrank {changepointGA}R Documentation

The default parents selection genetic algorithm operator

Description

The genetic algorithm require to select a pair of chromosomes, representing dad and mom, for the crossover operator to produce offspring (individual for next generation). The parents chromosomes are randomly selectd from the initialized population by a linear ranking method according to each individual's fittness in the input argument popFit. By default, the dad has better fit/smaller fitness function value/larger rank than mom.

Usage

selection_linearrank(pop, popFit)

Arguments

pop

A matrix contains the chromosomes for all individuals. The number of rows is equal to lmax and the number of columns is equal to the popsize.

popFit

A vector contains the objective function value (population fit) being associated to each individual chromosome from above.

Value

A list contains the chromosomes for dad and mom.


[Package changepointGA version 0.1.1 Index]