|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectec.Evaluator
ec.simple.SimpleEvaluator
ec.multiobjective.nsga2.NSGA2Evaluator
public class NSGA2Evaluator
The NSGA2Evaluator is a simple generational evaluator which evaluates every single member of the population (in a multithreaded fashion). Then it reduces the population size to an archive consisting of the best front ranks. When there isn't enough space to fit another front rank, individuals in that final front rank vie for the remaining slots in the archive based on their sparsity.
The evaluator is also responsible for calculating the rank and sparsity values stored in the NSGA2MultiObjectiveFitness class and used largely for statistical information.
NSGA-II has fixed archive size (the population size), and so ignores the 'elites' declaration. However it will adhere to the 'reevaluate-elites' parameter in SimpleBreeder to determine whether to force fitness reevaluation.
Field Summary | |
---|---|
int[] |
originalPopSize
The original population size is stored here so NSGA2 knows how large to create the archive (it's the size of the original population -- keep in mind that NSGA2Breeder had made the population larger to include the children. |
Fields inherited from class ec.Evaluator |
---|
P_IAMSLAVE, P_MASTERPROBLEM, p_problem, P_PROBLEM |
Constructor Summary | |
---|---|
NSGA2Evaluator()
|
Method Summary | |
---|---|
java.util.ArrayList |
assignFrontRanks(Subpopulation subpop)
Divides inds into ranks and assigns each individual's rank to be the rank it was placed into. |
void |
assignSparsity(Individual[] front)
Computes and assigns the sparsity values of a given front. |
Individual[] |
buildArchive(EvolutionState state,
int subpop)
Build the auxiliary fitness data and reduce the subpopulation to just the archive, which is returned. |
void |
evaluatePopulation(EvolutionState state)
Evaluates the population, then builds the archive and reduces the population to just the archive. |
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. |
Methods inherited from class ec.simple.SimpleEvaluator |
---|
evalPopChunk, runComplete |
Methods inherited from class ec.Evaluator |
---|
closeContacts, initializeContacts, reinitializeContacts |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public int[] originalPopSize
Constructor Detail |
---|
public NSGA2Evaluator()
Method Detail |
---|
public void setup(EvolutionState state, Parameter base)
Setup
setup
in interface Setup
setup
in class SimpleEvaluator
public void evaluatePopulation(EvolutionState state)
evaluatePopulation
in class SimpleEvaluator
public Individual[] buildArchive(EvolutionState state, int subpop)
public java.util.ArrayList assignFrontRanks(Subpopulation subpop)
public void assignSparsity(Individual[] front)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |