xegaConfiguration {xegaPopulation} | R Documentation |
xegaConfiguration()
returns the command with which
the genetic algorithm has been called.
For replicating computational experiments with
genetic algorithms.
xegaConfiguration(GAname, penv, grammar, env)
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: |
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.
$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.
Other Configuration:
AcceptFactory()
,
ApplyFactory()
,
CoolingFactory()
,
CrossRateFactory()
,
MutationRateFactory()
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)