|
MOEA Framework 2.5 API Specification |
|||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||
java.lang.Objectorg.moeaframework.algorithm.AbstractAlgorithm
org.moeaframework.algorithm.AbstractEvolutionaryAlgorithm
public abstract class AbstractEvolutionaryAlgorithm
Abstract class providing default implementations for several
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.
| Field Summary | |
|---|---|
protected NondominatedPopulation |
archive
The archive storing the non-dominated solutions. |
protected Initialization |
initialization
The initialization operator. |
protected Population |
population
The current population. |
| Fields inherited from class org.moeaframework.algorithm.AbstractAlgorithm |
|---|
initialized, numberOfEvaluations, problem, terminated |
| Constructor Summary | |
|---|---|
AbstractEvolutionaryAlgorithm(Problem problem,
Population population,
NondominatedPopulation archive,
Initialization initialization)
Constructs an abstract evolutionary algorithm. |
|
| Method Summary | |
|---|---|
NondominatedPopulation |
getArchive()
Returns the current non-dominated archive of the best solutions generated by this evolutionary algorithm, or null if no archive is used. |
Population |
getPopulation()
Returns the current population of this evolutionary algorithm. |
NondominatedPopulation |
getResult()
Returns the current best-known result. |
Serializable |
getState()
Returns a Serializable object representing the internal state of
this algorithm. |
protected void |
initialize()
Performs any initialization that is required by this algorithm. |
void |
setState(Object objState)
Sets the internal state of of this algorithm. |
| Methods inherited from class org.moeaframework.algorithm.AbstractAlgorithm |
|---|
evaluate, evaluateAll, evaluateAll, finalize, getNumberOfEvaluations, getProblem, isInitialized, isTerminated, iterate, step, terminate |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.moeaframework.core.Algorithm |
|---|
evaluate, getNumberOfEvaluations, getProblem, isTerminated, step, terminate |
| Field Detail |
|---|
protected final Population population
protected final NondominatedPopulation archive
protected final Initialization initialization
| Constructor Detail |
|---|
public AbstractEvolutionaryAlgorithm(Problem problem,
Population population,
NondominatedPopulation archive,
Initialization initialization)
problem - the problem being solvedpopulation - the populationarchive - the archive storing the non-dominated solutionsinitialization - the initialization operator| Method Detail |
|---|
public NondominatedPopulation getResult()
Algorithm
getResult in interface 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 NondominatedPopulation getArchive()
EvolutionaryAlgorithmnull if no archive is used.
getArchive in interface EvolutionaryAlgorithmnull if no archive is
usedpublic Population getPopulation()
EvolutionaryAlgorithm
getPopulation in interface EvolutionaryAlgorithm
public Serializable getState()
throws NotSerializableException
AlgorithmSerializable object representing the internal state of
this algorithm.
getState in interface AlgorithmgetState in class AbstractAlgorithmSerializable object representing the internal state of
this algorithm
NotSerializableException - if this algorithm does not support
serialization
public void setState(Object objState)
throws NotSerializableException
Algorithm
setState in interface AlgorithmsetState in class AbstractAlgorithmobjState - the internal state of this algorithm
NotSerializableException - if this algorithm does not support
serialization
|
MOEA Framework 2.5 API Specification |
|||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||