selection_linearrank: The default parents selection genetic algorithm operator

View source: R/RcppExports.R

selection_linearrankR 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.


changepointGA documentation built on April 4, 2025, 4:39 a.m.