ec.multiobjective.nsga2
Class NSGA2Evaluator
- java.lang.Object
-
- ec.Evaluator
-
- ec.simple.SimpleEvaluator
-
- ec.multiobjective.nsga2.NSGA2Evaluator
-
public class NSGA2Evaluator extends SimpleEvaluator
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.
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field and Description int[]originalPopSizeThe 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.simple.SimpleEvaluator
C_AUTO, cloneProblem, MERGE_BEST, MERGE_MEAN, MERGE_MEDIAN, mergeForm, numTests, P_CHUNK_SIZE, P_CLONE_PROBLEM, P_MERGE, P_NUM_TESTS, pool, V_AUTO, V_BEST, V_MEAN, V_MEDIAN
-
Fields inherited from class ec.Evaluator
masterproblem, P_IAMSLAVE, P_MASTERPROBLEM, p_problem, P_PROBLEM
-
-
Constructor Summary
Constructors Constructor and Description NSGA2Evaluator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.util.ArrayListassignFrontRanks(Subpopulation subpop)Divides inds into ranks and assigns each individual's rank to be the rank it was placed into.voidassignSparsity(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.voidevaluatePopulation(EvolutionState state)Evaluates the population, then builds the archive and reduces the population to just the archive.voidsetup(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
runComplete
-
Methods inherited from class ec.Evaluator
closeContacts, initializeContacts, reinitializeContacts
-
-
-
-
Field Detail
-
originalPopSize
public 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.
-
-
Method Detail
-
setup
public void setup(EvolutionState state, Parameter base)
Description copied from interface:SetupSets 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.- Specified by:
setupin interfaceSetup- Overrides:
setupin classSimpleEvaluator
-
evaluatePopulation
public void evaluatePopulation(EvolutionState state)
Evaluates the population, then builds the archive and reduces the population to just the archive.- Overrides:
evaluatePopulationin classSimpleEvaluator
-
buildArchive
public Individual[] buildArchive(EvolutionState state, int subpop)
Build the auxiliary fitness data and reduce the subpopulation to just the archive, which is returned.
-
assignFrontRanks
public java.util.ArrayList assignFrontRanks(Subpopulation subpop)
Divides inds into ranks and assigns each individual's rank to be the rank it was placed into. Each front is an ArrayList.
-
assignSparsity
public void assignSparsity(Individual[] front)
Computes and assigns the sparsity values of a given front.
-
-
DMelt 3.0 © DataMelt by jWork.ORG