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)
Extract the elite individuals from the current population and
both place in newpop and replace the current population
with the archive.
|
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, usingElitism
public void setup(EvolutionState state, Parameter base)
Setup
setup
in interface Setup
setup
in class SimpleBreeder
public int numElites(EvolutionState state, int subpopulation)
numElites
in class SimpleBreeder
protected void loadElites(EvolutionState state, Population newpop)
loadElites
in class SimpleBreeder
public void postProcess(EvolutionState state)
SimpleBreeder
postProcess
in class SimpleBreeder
public Population breedPopulation(EvolutionState state)
breedPopulation
in class SimpleBreeder
public java.util.ArrayList<java.util.ArrayList<Individual>> assignFrontRanks(Subpopulation subpop)