public class ParallelIndividualCompleter extends SequentialIndividualCompleter implements OptimizerStateListener
ParallelIndividualCompleter completes Individuals with
multiple threads.| Constructor and Description |
|---|
ParallelIndividualCompleter(Control control,
Decoder decoder,
Evaluator evaluator,
int maxThreads)
Constructs a
ParallelIndividualCompleter with a specified maximal
number of concurrent threads. |
| Modifier and Type | Method and Description |
|---|---|
void |
complete(Iterable<? extends Individual> iterable)
Decodes and evaluates all
Individuals in the Iterable if
they are not already evaluated. |
void |
optimizationStarted(Optimizer optimizer)
Invoked if the
Optimizer starts the optimization process. |
void |
optimizationStopped(Optimizer optimizer)
Invoked if the
Optimizer stops the optimization process. |
complete@Inject public ParallelIndividualCompleter(Control control, Decoder decoder, Evaluator evaluator, int maxThreads)
ParallelIndividualCompleter with a specified maximal
number of concurrent threads.control - the controldecoder - the decoderevaluator - the evaluatormaxThreads - the maximal number of parallel threads (using namespace
ParallelIndividualCompleter)public void complete(Iterable<? extends Individual> iterable) throws TerminationException
IndividualCompleterIndividuals in the Iterable if
they are not already evaluated.complete in interface IndividualCompletercomplete in class SequentialIndividualCompleteriterable - the set of individuals to be completedTerminationException - if the optimization is terminatedpublic void optimizationStarted(Optimizer optimizer)
OptimizerStateListenerOptimizer starts the optimization process.optimizationStarted in interface OptimizerStateListeneroptimizer - the optimizerpublic void optimizationStopped(Optimizer optimizer)
OptimizerStateListenerOptimizer stops the optimization process.optimizationStopped in interface OptimizerStateListeneroptimizer - the optimizer