public abstract class Runner
extends java.lang.Object
execute(jenes.GeneticAlgorithm)
or execute(jenes.GeneticAlgorithm, boolean)
to activate Genetic Algorithm to
start evolving in the enviroinment.Modifier and Type | Field and Description |
---|---|
protected GeneticAlgorithm |
algorithm
The algorithm to evolve in the enviroinment
|
Constructor and Description |
---|
Runner() |
Modifier and Type | Method and Description |
---|---|
abstract void |
evaluateIndividual(Individual individual)
Call-back invoked in substitution to
GeneticAlgorithm.evaluateIndividual(jenes.population.Individual) |
void |
execute(GeneticAlgorithm algoritm)
Start evolving the algorithm given as argument restarting its state
|
void |
execute(GeneticAlgorithm algorithm,
boolean restart)
Start evolving the algorithm given as parameter in this enviroinment by
applying to specificated restart flag.
|
void |
execute(GeneticAlgorithm algorithm,
Population<?> initialPopulation)
Start evolving the algorithm given and adopting as initial population the
one passed as argument
|
GeneticAlgorithm |
getGeneticAlgorithm()
Return the Genetic Algorithm currently in execution in this enviroinment
|
void |
onEvaluationBegin(Population pop,
boolean forced)
Call-back invoked soon before the
Population evaluation starts
using the default Fitness defined per GeneticAlgorithm |
void |
onEvaluationEnd()
Call-back invoked soon after the evaluation phase has been performed.
|
void |
onInit()
Call-back invoked soon before
GeneticAlgorithm.onInit(long) |
void |
setAlgorithm(GeneticAlgorithm algorithm)
Set the Genetic Algorithm to the runner.
|
void |
start(boolean reset)
Call-back invoked by
GeneticAlgorithm.start(boolean) |
void |
stop()
Call-back called soon after
GeneticAlgorithm.onStop(long) |
protected GeneticAlgorithm algorithm
public final void execute(GeneticAlgorithm algorithm, boolean restart)
algorithm
- the algorithm to evolverestart
- restart flag to pass to GeneticAlgorithm.evolve(boolean)
public final void execute(GeneticAlgorithm algoritm)
algoritm
- the algorithm to evolveexecute(jenes.GeneticAlgorithm, boolean)
public final void execute(GeneticAlgorithm algorithm, Population<?> initialPopulation)
algorithm
- initialPopulation
- public GeneticAlgorithm getGeneticAlgorithm()
public void setAlgorithm(GeneticAlgorithm algorithm)
algorithm
- public void start(boolean reset)
GeneticAlgorithm.start(boolean)
reset
- public void onInit()
GeneticAlgorithm.onInit(long)
public void stop()
GeneticAlgorithm.onStop(long)
public void onEvaluationBegin(Population pop, boolean forced)
Population
evaluation starts
using the default Fitness
defined per GeneticAlgorithm
pop
- the population that will be evaluatedforced
- if each individual of the population will be forced to be evaluatedpublic void onEvaluationEnd()
public abstract void evaluateIndividual(Individual individual)
GeneticAlgorithm.evaluateIndividual(jenes.population.Individual)
individual
-