setupECRControl: Generates control object.

Description Usage Arguments Value

Description

The ecr package offers a framework for evolutionary computing and therefore offers a lot of customization options. The control object is a simple wrapper for all these options and sets convenient defaults.

Usage

1
2
3
4
5
setupECRControl(n.population, n.offspring,
  n.mating.pool = ceiling(n.population/2), representation,
  survival.strategy = "plus", n.elite = 0L,
  monitor = setupConsoleMonitor(), stopping.conditions = list(),
  logger = NULL, custom.constants = list(), vectorized.evaluation = FALSE)

Arguments

n.population

[integer(1)]
Number of individuals in the population.

n.offspring

[integer(1)]
Number of individuals generated in each generation.

n.mating.pool

[integer(1)]
Number of individuals which can potentially participate in the generation of offspring. Default is half of the population size.

representation

[character(1)]
Genotype representation of the parameters. Available are “binary”, “float”, “permutation” and “custom”.

survival.strategy

[character(1)]
Determines the survival strategy used by the EA. Possible are “plus” for a classical (mu + lambda) strategy and “comma” for (mu, lambda). Default is “plus”.

n.elite

[integer(1)]
Number of fittest individuals of the current generation that shall be copied to the next generation without changing. Keep in mind, that the algorithm does not care about this option if the survival.strategy is set to 'plus'. Default is 0.

monitor

[function]
Monitoring function. Default is NULL, i.e. no monitoring.

stopping.conditions

[list]
List of functions of type ecr_terminator. At least one stopping condition needs to be passed. Default is the empty list.

logger

[function]
Monitoring object used to log stuff. Default is NULL which means no logging at all. See setupOptPathLoggingMonitor for ecr's build-in logger.

custom.constants

[list]
Additional constants which should be available to all generators and operators. Defaults to empty list.

vectorized.evaluation

[logical(1L)]
Is the fitness/objective function vectorized? I.e., does the fitness function accept a list? This allows for faster execution or parallelization by hand. If TRUE the following destinction on the type of the objective function is made:

Is smoof_function

If the objective function is of type smoof_function from package smoof and the smoof function is vectorized, the population - which is a list internally - is reduced to a matrix and passed to the smoof function (vectorization in smoof is allowed for continuous functions only).

Is not a smoof_function

In this case the individuals of the population are passed entirely as a list to the objective function.

Default is FALSE.

Value

S3 object of type ecr_control.


jakobbossek/ecr documentation built on May 18, 2019, 9:09 a.m.