ec.multiobjective.spea2
Class SPEA2Evaluator

java.lang.Object
  |
  +--ec.Evaluator
        |
        +--ec.multiobjective.spea2.SPEA2Evaluator
All Implemented Interfaces:
java.io.Serializable, Setup, Singleton

public class SPEA2Evaluator
extends Evaluator

The SPEA2Evaluator is a simple, non-coevolved generational evaluator which evaluates every single member of every subpopulation individually in its own problem space. One Problem instance is cloned from p_problem for each evaluating thread. The Problem must implement SimpleProblemForm. The evaluator is also responsible for calculating the SPEA2Fitness function. This function depends on the entire population and so cannot be calculated in the Problem class.

See Also:
Serialized Form

Fields inherited from class ec.Evaluator
p_problem, P_PROBLEM
 
Constructor Summary
SPEA2Evaluator()
           
 
Method Summary
 void evalPopChunk(EvolutionState state, int[] numinds, int[] from, int threadnum, SimpleProblemForm p)
          A private helper function for evaluatePopulation which evaluates a chunk of individuals in a subpopulation for a given thread.
 void evaluatePopulation(EvolutionState state)
          A simple evaluator that doesn't do any coevolutionary evaluation.
 boolean runComplete(EvolutionState state)
          The SPEA2Evaluator determines that a run is complete by asking each individual in each population if he or she is optimal; if it finds an individual somewhere that's optimal, it signals that the run is complete.
 void setup(EvolutionState state, Parameter base)
          Sets up the object by reading it from the parameters stored in state, built off of the parameter base base.
 double volSphere(int dimensions)
          Private helper function.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SPEA2Evaluator

public SPEA2Evaluator()
Method Detail

setup

public void setup(EvolutionState state,
                  Parameter base)
Description copied from interface: Setup
Sets up the object by reading it from the parameters stored in state, built off of the parameter base base. If an ancestor implements this method, be sure to call super.setup(state,base); before you do anything else.
Overrides:
setup in class Evaluator

evaluatePopulation

public void evaluatePopulation(EvolutionState state)
A simple evaluator that doesn't do any coevolutionary evaluation. Basically it applies evaluation pipelines, one per thread, to various subchunks of a new population.
Overrides:
evaluatePopulation in class Evaluator

volSphere

public double volSphere(int dimensions)
Private helper function. This calculates the area of a sphere in n dimensions for use in the SPEA2 density calculation.

evalPopChunk

public void evalPopChunk(EvolutionState state,
                         int[] numinds,
                         int[] from,
                         int threadnum,
                         SimpleProblemForm p)
A private helper function for evaluatePopulation which evaluates a chunk of individuals in a subpopulation for a given thread. Although this method is declared public (for the benefit of a private helper class in this file), you should not call it.

runComplete

public boolean runComplete(EvolutionState state)
The SPEA2Evaluator determines that a run is complete by asking each individual in each population if he or she is optimal; if it finds an individual somewhere that's optimal, it signals that the run is complete.
Overrides:
runComplete in class Evaluator