CrossRateFactory {xegaPopulation}R Documentation

Configure the crossover function of a genetic algorithm.

Description

CrossRateFactory() implements selection of one of the crossover rate functions in this package by specifying a text string. The selection fails ungracefully (produces a runtime error), if the label does not match. The functions are specified locally.

Current support:

  1. "Const" returns ConstCRate().

  2. "IV" returns IACrate(). This function gives bad genes a higher cross rate.

Usage

CrossRateFactory(method = "Const")

Arguments

method

A string specifying a function for the crossover rate.

Value

Crossover rate function.

See Also

Other Configuration: AcceptFactory(), ApplyFactory(), CoolingFactory(), MutationRateFactory(), xegaConfiguration()

Examples

f<-CrossRateFactory("Const")
f(10, list(CrossRate1=function() {0.2}))

[Package xegaPopulation version 1.0.0.0 Index]