public class MultiThreadEvaluator extends MultiThreadRunner
MultiThreadRunner
nthreads, threadGroup
Constructor and Description |
---|
MultiThreadEvaluator()
Default constructor that generates an execution enviroinment with a number
of threads equals to the number of phisical cores.
|
MultiThreadEvaluator(int nthreads)
Default constructor that define the thread number to use
|
Modifier and Type | Method and Description |
---|---|
void |
evaluateIndividual(Individual individual)
Call-back invoked in substitution to
GeneticAlgorithm.evaluateIndividual(jenes.population.Individual) |
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.
|
getNthreads, start, stop
execute, execute, execute, getGeneticAlgorithm, onInit, setAlgorithm
public MultiThreadEvaluator(int nthreads)
nthreads
- MultiThreadRunner.MultiThreadRunner(int)
public MultiThreadEvaluator()
public void onEvaluationBegin(Population pop, boolean forced)
Runner
Population
evaluation starts
using the default Fitness
defined per GeneticAlgorithm
onEvaluationBegin
in class Runner
pop
- the population that will be evaluatedforced
- if each individual of the population will be forced to be evaluatedpublic void evaluateIndividual(Individual individual)
Runner
GeneticAlgorithm.evaluateIndividual(jenes.population.Individual)
evaluateIndividual
in class Runner
public void onEvaluationEnd()
Runner
onEvaluationEnd
in class Runner