xegaConfiguration {xegaPopulation} | R Documentation |
Remembers R command command with which algorithm has been called.
Description
xegaConfiguration()
returns the command with which
the genetic algorithm has been called.
For replicating computational experiments with
genetic algorithms.
Usage
xegaConfiguration(GAname, penv, grammar, env)
Arguments
GAname |
Name of genetic algorithm's main function. (Currently: "Run"). |
penv |
The expression for the problem environment |
grammar |
The grammar |
env |
Environment with variable value bindings.
Use: |
Value
A named list with the following elements:
-
$GAconf
: A text string with the call of the genetic algorithm (the function we want to capture the call). -
$GAenv
: The environment with the arguments bound to the values when the genetic algorithm was called.
Warning
-
$GAenv is correct only for simple arguments (strings or numbers) not for complex objects like problem environments.
-
future.apply::future_lapply()
is configured by a plan statement which must be issued before calling the genetic algorithm. At the moment, the plan chosen is not remembered.
See Also
Other Configuration:
AcceptFactory()
,
ApplyFactory()
,
CoolingFactory()
,
CrossRateFactory()
,
MutationRateFactory()
Examples
GA<-function(pe, grammar=NULL, nope=1.5, sle="test", ok=TRUE)
{xegaConfiguration("GA", substitute(pe), substitute(grammar), environment())}
Para<-5
GA(Para)
Cube<-7
GA(Cube, 2, 3, 4)