public abstract class AbstractEvolutionaryAlgorithm extends AbstractAlgorithm implements org.moeaframework.core.EvolutionaryAlgorithm
EvolutionaryAlgorithm methods. Primarily, the initialize()
method generates and evaluates the initial population, adding the solutions
to the archive if available. The getResult() method returns the
non-dominated solutions from the population and, if available, the archive.
The majority of evolutionary algorithms should only need to override the
AbstractAlgorithm.iterate() method.| Modifier and Type | Field and Description |
|---|---|
protected org.moeaframework.core.NondominatedPopulation |
archive
The archive storing the non-dominated solutions.
|
protected org.moeaframework.core.Initialization |
initialization
The initialization operator.
|
protected org.moeaframework.core.Population |
population
The current population.
|
initialized, numberOfEvaluations, problem, terminated| Constructor and Description |
|---|
AbstractEvolutionaryAlgorithm(org.moeaframework.core.Problem problem,
org.moeaframework.core.Population population,
org.moeaframework.core.NondominatedPopulation archive,
org.moeaframework.core.Initialization initialization)
Constructs an abstract evolutionary algorithm.
|
| Modifier and Type | Method and Description |
|---|---|
org.moeaframework.core.NondominatedPopulation |
getArchive() |
org.moeaframework.core.Population |
getPopulation() |
org.moeaframework.core.NondominatedPopulation |
getResult() |
java.io.Serializable |
getState() |
protected void |
initialize()
Performs any initialization that is required by this algorithm.
|
void |
setState(java.lang.Object objState) |
evaluate, evaluateAll, evaluateAll, finalize, getNumberOfEvaluations, getProblem, isInitialized, isTerminated, iterate, step, terminateprotected final org.moeaframework.core.Population population
protected final org.moeaframework.core.NondominatedPopulation archive
protected final org.moeaframework.core.Initialization initialization
public AbstractEvolutionaryAlgorithm(org.moeaframework.core.Problem problem,
org.moeaframework.core.Population population,
org.moeaframework.core.NondominatedPopulation archive,
org.moeaframework.core.Initialization initialization)
problem - the problem being solvedpopulation - the populationarchive - the archive storing the non-dominated solutionsinitialization - the initialization operatorpublic org.moeaframework.core.NondominatedPopulation getResult()
getResult in interface org.moeaframework.core.Algorithmprotected void initialize()
AbstractAlgorithmAbstractAlgorithm.step(), but may also be called manually prior to any invocations
of step. Implementations should always invoke
super.initialize() to ensure the hierarchy is initialized
correctly.initialize in class AbstractAlgorithmpublic org.moeaframework.core.NondominatedPopulation getArchive()
getArchive in interface org.moeaframework.core.EvolutionaryAlgorithmpublic org.moeaframework.core.Population getPopulation()
getPopulation in interface org.moeaframework.core.EvolutionaryAlgorithmpublic java.io.Serializable getState()
throws java.io.NotSerializableException
getState in interface org.moeaframework.core.AlgorithmgetState in class AbstractAlgorithmjava.io.NotSerializableExceptionpublic void setState(java.lang.Object objState)
throws java.io.NotSerializableException
setState in interface org.moeaframework.core.AlgorithmsetState in class AbstractAlgorithmjava.io.NotSerializableException