|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opt4j.core.common.completer.SequentialIndividualCompleter
org.opt4j.core.common.completer.ParallelIndividualCompleter
public class ParallelIndividualCompleter
The ParallelIndividualCompleter completes Individuals with
multiple threads.
| Nested Class Summary | |
|---|---|
protected class |
ParallelIndividualCompleter.Complete
The ParallelIndividualCompleter.Complete class completes a single Individual. |
| Field Summary | |
|---|---|
protected java.util.concurrent.ExecutorService |
executor
|
| Fields inherited from class org.opt4j.core.common.completer.SequentialIndividualCompleter |
|---|
control, decoder, evaluator |
| Constructor Summary | |
|---|---|
ParallelIndividualCompleter(Control control,
Decoder<Genotype,java.lang.Object> decoder,
Evaluator<java.lang.Object> evaluator,
int maxThreads)
Constructs a ParallelIndividualCompleter with a specified maximal
number of concurrent threads. |
|
| Method Summary | |
|---|---|
void |
complete(java.lang.Iterable<? extends Individual> iterable)
Decodes and evaluates all Individuals in the Iterable if
they are not already evaluated. |
protected void |
finalize()
|
void |
optimizationStarted(Optimizer optimizer)
Invoked if the Optimizer starts the optimization process. |
void |
optimizationStopped(Optimizer optimizer)
Invoked if the Optimizer stops the optimization process. |
protected void |
shutdownExecutorService()
Shutdown the ExecutorService. |
| Methods inherited from class org.opt4j.core.common.completer.SequentialIndividualCompleter |
|---|
complete, decode, evaluate |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final java.util.concurrent.ExecutorService executor
| Constructor Detail |
|---|
@Inject
public ParallelIndividualCompleter(Control control,
Decoder<Genotype,java.lang.Object> decoder,
Evaluator<java.lang.Object> 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)| Method Detail |
|---|
public void complete(java.lang.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 completed
TerminationException - if the optimization is terminated
protected void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwableprotected void shutdownExecutorService()
ExecutorService.
public 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
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||