public class NSGA2Breeder extends SimpleBreeder
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.
| Modifier and Type | Class and Description |
|---|---|
static class |
NSGA2Breeder.BreedingState
We use a state variable to make sure that the nextSubpopulationSize() method
is only called at the appropriate time.
|
backupPopulation, clonePipelineAndPopulation, elite, eliteFrac, newIndividuals, NOT_SET, P_CLONE_PIPELINE_AND_POPULATION, P_ELITE, P_ELITE_FRAC, P_REEVALUATE_ELITES, P_SEQUENTIAL_BREEDING, pool, reevaluateElites, sequentialBreeding| Constructor and Description |
|---|
NSGA2Breeder() |
| Modifier and Type | Method and Description |
|---|---|
java.util.ArrayList<java.util.ArrayList<Individual>> |
assignFrontRanks(Subpopulation subpop)
Divides inds into ranks and assigns each individual's rank to be the rank it was placed into.
|
Population |
breedPopulation(EvolutionState state)
Use super's breeding, but also set our local state to record that breeding is complete.
|
protected void |
loadElites(EvolutionState state,
Population newpop)
A protected helper function for breedPopulation which loads elites into a subpopulation.
|
int |
numElites(EvolutionState state,
int subpopulation) |
void |
postProcess(EvolutionState state)
A hook to do final modifications as necessary to the population after breeding has concluded.
|
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.
|
breedPopChunk, breedPopChunkProduce, nextSubpopulationSize, shouldBreedSubpop, unmarkElitesEvaluated, usingElitismpublic void setup(EvolutionState state, Parameter base)
Setupsetup in interface Setupsetup in class SimpleBreederpublic int numElites(EvolutionState state, int subpopulation)
numElites in class SimpleBreederprotected void loadElites(EvolutionState state, Population newpop)
SimpleBreederloadElites in class SimpleBreederpublic void postProcess(EvolutionState state)
SimpleBreederpostProcess in class SimpleBreederpublic Population breedPopulation(EvolutionState state)
breedPopulation in class SimpleBreederpublic java.util.ArrayList<java.util.ArrayList<Individual>> assignFrontRanks(Subpopulation subpop)