ga_metaepoch: Function that runs one GA metaepoch. Wrapper function for...

View source: R/ga_metaepoch.R

ga_metaepochR Documentation

Function that runs one GA metaepoch. Wrapper function for GA::ga.

Description

Function that runs one GA metaepoch. Wrapper function for GA::ga.

Usage

ga_metaepoch(config_ga)

Arguments

config_ga
  • list of GA::ga params

Value

list with named fields: solution, population, value, fitness_values, context or NULL. A solution is a value of the decision variable giving the best fitness. A population is a matrix representing final population. A value is the value of a fitness function for the solution. A fitness_values is a vector of fitness values for the final population. A context is a list with internal state of the metaepoch (or NULL if it's not necessary). NULL can be returned if GA::ga fails and "ignore_errors" is TRUE in the config.

Examples

tree_height <- 3
empty_config_ga <- lapply(1:tree_height, function(x) {
  list("ignore_errors" = TRUE)
})
ga_metaepoch(empty_config_ga)

WojtAcht/hms documentation built on March 16, 2024, 7:51 p.m.