public class NSGAII extends AbstractEvolutionaryAlgorithm implements EpsilonBoxEvolutionaryAlgorithm
References:
initialized, numberOfEvaluations, problem, terminated
Constructor and Description |
---|
NSGAII(Problem problem)
Constructs the NSGA-II algorithm with default settings.
|
NSGAII(Problem problem,
int initialPopulationSize,
NondominatedSortingPopulation population,
EpsilonBoxDominanceArchive archive,
Selection selection,
Variation variation,
Initialization initialization)
Constructs the NSGA-II algorithm with the specified components.
|
Modifier and Type | Method and Description |
---|---|
void |
applyConfiguration(TypedProperties properties)
Applies the properties to this instance.
|
EpsilonBoxDominanceArchive |
getArchive()
Returns the current non-dominated archive of the best solutions generated
by this evolutionary algorithm, or
null if no archive is used. |
TypedProperties |
getConfiguration()
Gets the current configuration of this instance.
|
NondominatedSortingPopulation |
getPopulation()
Returns the current population of this evolutionary algorithm.
|
void |
iterate()
Performs one iteration of the algorithm.
|
void |
setArchive(EpsilonBoxDominanceArchive archive)
Sets the archive used by this algorithm.
|
void |
setInitialPopulationSize(int initialPopulationSize)
Sets the initial population size.
|
void |
setVariation(Variation variation)
Replaces the variation operator to be used by this algorithm.
|
getInitialization, getInitialPopulationSize, getResult, getVariation, initialize, loadState, saveState, setArchive, setInitialization, setPopulation
assertNotInitialized, evaluate, evaluateAll, evaluateAll, getNumberOfEvaluations, getProblem, isInitialized, isTerminated, step, terminate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
evaluate, getNumberOfEvaluations, getProblem, getResult, isTerminated, run, run, step, terminate
checkTypeSafety, getState, loadState, saveState, setState, writeTypeSafety
public NSGAII(Problem problem)
problem
- the problem being solvedpublic NSGAII(Problem problem, int initialPopulationSize, NondominatedSortingPopulation population, EpsilonBoxDominanceArchive archive, Selection selection, Variation variation, Initialization initialization)
problem
- the problem being solvedinitialPopulationSize
- the initial population sizepopulation
- the population used to store solutionsarchive
- the archive used to store the result; can be null
selection
- the selection operatorvariation
- the variation operatorinitialization
- the initialization methodpublic void iterate()
AbstractAlgorithm
iterate
in class AbstractAlgorithm
public void setVariation(Variation variation)
AbstractEvolutionaryAlgorithm
setVariation
in class AbstractEvolutionaryAlgorithm
variation
- the variation operatorpublic void setInitialPopulationSize(int initialPopulationSize)
AbstractEvolutionaryAlgorithm
setInitialPopulationSize
in class AbstractEvolutionaryAlgorithm
initialPopulationSize
- the initial population sizepublic EpsilonBoxDominanceArchive getArchive()
EvolutionaryAlgorithm
null
if no archive is used.getArchive
in interface EpsilonBoxEvolutionaryAlgorithm
getArchive
in interface EvolutionaryAlgorithm
getArchive
in class AbstractEvolutionaryAlgorithm
null
if no archive is
usedpublic void setArchive(EpsilonBoxDominanceArchive archive)
archive
- the archivepublic NondominatedSortingPopulation getPopulation()
EvolutionaryAlgorithm
getPopulation
in interface EvolutionaryAlgorithm
getPopulation
in class AbstractEvolutionaryAlgorithm
public void applyConfiguration(TypedProperties properties)
Configurable
TypedProperties.warnIfUnaccessedProperties()
to verify all properties were processed. This can identify simple mistakes like typos.
If overriding this method, properties should only be updated if a new value is provided. Additionally, if
updating any Configurable
objects inside this object, they should be updated before calling
super.applyConfiguration(properties)
.applyConfiguration
in interface Configurable
properties
- the user-defined propertiespublic TypedProperties getConfiguration()
Configurable
getConfiguration
in interface Configurable
Copyright 2009-2024 David Hadka and other contributors. All rights reserved.
Licensed under the GNU Lesser General Public License.
Return to the MOEA Framework homepage.