|
Orbital library | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object orbital.algorithm.evolutionary.Population orbital.algorithm.evolutionary.ParallelEvaluationPopulation
public class ParallelEvaluationPopulation
A Population that evaluates its members fitness-weights in parallel.
When using the ParallelEvaluationPopulation always make sure that you
call evaluate(boolean)
after having added some Genomes,
and prior to relying on it being sorted.
Especially call evaluate after creation or evolving (with GeneticAlgorithm.evolve()
).
Better not try calling add() again while evaluate() is still running, although it should work.
ParallelEvaluationPopulation(Population)
,
Serialized FormConstructor Summary | |
---|---|
ParallelEvaluationPopulation()
|
|
ParallelEvaluationPopulation(Population original)
Convert a population into a parallel evaluating population using its members list per reference. |
Method Summary | |
---|---|
boolean |
add(java.lang.Object o)
Adds at an arbitrary position since fitness evaluation is done later. |
void |
evaluate(boolean redo)
Evaluate and resort population waiting for all current evaluator threads to stop. |
protected void |
evaluate(Genome g,
boolean redo)
Concurrently evaluate a genome. |
protected java.lang.ThreadGroup |
exchangeEvaluators()
Exchanges evaluators for this generation. |
protected java.lang.ThreadGroup |
getEvaluators()
Get the master thread group for all evaluation threads started to evaluate some fitness values of the members. |
protected java.lang.ThreadGroup |
getGenerationEvaluators()
Get the current thread group for all evaluation threads started during this generation to evaluate some fitness values of the members. |
protected void |
waitForEvaluators()
Waits for all current evaluator threads to stop. |
Methods inherited from class orbital.algorithm.evolutionary.Population |
---|
clone, create, create, equals, get, get, getFitnessArray, getGeneration, getMembers, getOverallDistance, hashCode, iterator, listIterator, listIterator, remove, remove, setGeneration, size, toString |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ParallelEvaluationPopulation()
public ParallelEvaluationPopulation(Population original)
Population.create(Population, Genome, int)
instead.
Population.create(Population, Genome, int)
Method Detail |
---|
protected final java.lang.ThreadGroup getEvaluators()
getGenerationEvaluators()
protected final java.lang.ThreadGroup getGenerationEvaluators()
waitForEvaluators()
or exchangeEvaluators()
is called.
getEvaluators()
,
exchangeEvaluators()
,
waitForEvaluators()
public boolean add(java.lang.Object o)
add
in class Population
evaluate(boolean)
public void evaluate(boolean redo)
evaluate
in class Population
redo
- force whole evaluation again, even for cached fitness values.
If true
we will Thread.stop()
(!) all running evaluator threads.add(Object)
protected void evaluate(Genome g, boolean redo)
waitForEvaluators()
protected void waitForEvaluators()
protected final java.lang.ThreadGroup exchangeEvaluators()
generationEvaluators
|
Orbital library 1.3.0: 11 Apr 2009 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |