|
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.PeriodicAction
org.moeaframework.algorithm.AdaptiveTimeContinuation
public class AdaptiveTimeContinuation
Decorator for EvolutionaryAlgorithms to add time continuation
(restarts). Restarts occur if either
maxWindowSize; or
populationRatio by more
than 25%.
populationRatio, the the new population is
filled with solutions selected from algorithm.getArchive() and
mutated using the specified Selection and Variation
operators.
References:
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.moeaframework.algorithm.PeriodicAction |
|---|
PeriodicAction.FrequencyType |
| Field Summary |
|---|
| Fields inherited from class org.moeaframework.algorithm.PeriodicAction |
|---|
algorithm, frequency, frequencyType, iteration, lastInvocation |
| Constructor Summary | |
|---|---|
AdaptiveTimeContinuation(EvolutionaryAlgorithm algorithm,
int windowSize,
int maxWindowSize,
double populationRatio,
int minimumPopulationSize,
int maximumPopulationSize,
Selection selection,
Variation variation)
Decorates the specified algorithm with adaptive time continuation. |
|
| Method Summary | |
|---|---|
void |
addRestartListener(RestartListener listener)
Adds a listener to be notified whenever a restart occurs. |
protected RestartType |
check()
Performs a check to determine if a restart should occur. |
void |
doAction()
Invoked periodically by this class to perform some function. |
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. |
Serializable |
getState()
Returns a Serializable object representing the internal state of
this algorithm. |
void |
removeRestartListener(RestartListener listener)
Removes the specified listener so it no longer receives notifications whenever a restart occurs. |
protected void |
restart(RestartType type)
Performs a restart. |
void |
setState(Object objState)
Sets the internal state of of this algorithm. |
| Methods inherited from class org.moeaframework.algorithm.PeriodicAction |
|---|
evaluate, getNumberOfEvaluations, getProblem, getResult, isTerminated, step, terminate |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.moeaframework.core.Algorithm |
|---|
evaluate, getNumberOfEvaluations, getProblem, getResult, isTerminated, step, terminate |
| Constructor Detail |
|---|
public AdaptiveTimeContinuation(EvolutionaryAlgorithm algorithm,
int windowSize,
int maxWindowSize,
double populationRatio,
int minimumPopulationSize,
int maximumPopulationSize,
Selection selection,
Variation variation)
algorithm - the algorithm being decoratedwindowSize - the number of iterations between invocations of
checkmaxWindowSize - the maximum number of iterations allowed since the
last restart before forcing a restartpopulationRatio - the population-to-archive ratiominimumPopulationSize - the minimum size of the populationmaximumPopulationSize - the maximum size of the populationselection - the selection operator for selecting solutions from the
archive during a restartvariation - the variation operator for mutating solutions selected
from the archive during a restart| Method Detail |
|---|
public void addRestartListener(RestartListener listener)
listener - the listener to be notified whenever a restart occurspublic void removeRestartListener(RestartListener listener)
listener - the listener to be removedprotected RestartType check()
RestartType.NONE if no restart should occur; or
RestartType.HARD if the population-to-archive ratio exceeds
populationRatio by more than 25% or the number of fitness
evaluations since the last restart exceeds maxWindowSize.
RestartType.NONE if no restart should occur; or
RestartType.HARD if the population-to-archive ratio
exceeds populationRatio by more than 25% or
if the number of fitness evaluations since the last restart
exceeds maxWindowSizeprotected void restart(RestartType type)
RestartType.HARD, the
population is emptied, resized and filled with solutions selected and
mutated from the archive. If the type is RestartType.SOFT, the
population is not emptied; new solutions are only added to fill any empty
slots.
type - the type of restartpublic void doAction()
PeriodicAction
doAction in class PeriodicActionpublic Population getPopulation()
EvolutionaryAlgorithm
getPopulation in interface EvolutionaryAlgorithmpublic NondominatedPopulation getArchive()
EvolutionaryAlgorithmnull if no archive is used.
getArchive in interface EvolutionaryAlgorithmnull if no archive is
used
public Serializable getState()
throws NotSerializableException
AlgorithmSerializable object representing the internal state of
this algorithm.
getState in interface AlgorithmgetState in class PeriodicActionSerializable 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 PeriodicActionobjState - 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 | |||||