| xegaReRun {xega} | R Documentation |
Run an evolutionary or genetic algorithm with the same configuration as in the previous run.
Description
xegaReRun() runs a simple genetic algorithm with
the same configuration as in the run specified by the
list element $GAconfig of the solution of
a simple genetic algorithm.
Usage
xegaReRun(solution)
Arguments
solution |
The solution of a
previous run of |
Details
xegaReRun() does not capture the configuration for
parallel/distributed processing for the execution model
"FutureApply", because the user defines the configuration
before calling xegaRun().
If executionModel matches neither "Sequential" nor "MultiCore"
or !is.null(uParApply)==TRUE,
a warning is printed, and the previous solution is returned.
Value
A list of
-
$popStat: A matrix with mean, min, Q1, median, Q3, max, var, mad of population fitness as columns: i-th row for i-th each generation. -
$solution: With fields$solution$fitness,$solution$value,$solution$genotype, and -
$GAconfig: The configuration of the GA used byxegaReRun(). -
$GAenv: Attribute value list of GAconfig. -
$timer: An attribute value list with the time used (in seconds) in the main blocks of the GA: tUsed, tInit, tNext, tEval, tObserve, and tSummary.
See Also
Other Main Program:
xegaRun()
Examples
a<-xegaRun(Parabola2D, max=FALSE, algorithm="sga", generations=10, popsize=20, verbose=1)
b<-xegaReRun(a)
seqApply<-function(pop, EvalGene, lF) {lapply(pop, EvalGene, lF)}
c<-xegaRun(Parabola2D, max=FALSE, algorithm="sga", uParApply=seqApply)
b<-xegaReRun(c)