Class EpsilonProgressContinuationExtension
java.lang.Object
org.moeaframework.algorithm.extension.PeriodicExtension
org.moeaframework.algorithm.continuation.AdaptiveTimeContinuationExtension
org.moeaframework.algorithm.continuation.EpsilonProgressContinuationExtension
- All Implemented Interfaces:
Extension
,Configurable
,Stateful
Extends
AdaptiveTimeContinuationExtension
to trigger restarts using ε-progress. ε-progress
measures search progress by counting the number of significant improvements, as measured by the number of unoccupied
ε-boxes filled during a fixed time window.
References:
- Hadka, D. and Reed, P. "Borg: An Auto-Adaptive Many-Objective Evolutionary Computing Framework." Evolutionary Computation, 21(2):231-259, 2013.
-
Field Summary
Fields inherited from class org.moeaframework.algorithm.extension.PeriodicExtension
frequency, frequencyType, iteration, lastInvocation
-
Constructor Summary
ConstructorDescriptionCreates the ε-progress triggered time continuation extension with default settings.EpsilonProgressContinuationExtension
(int windowSize, int maxWindowSize, double injectionRate, int minimumPopulationSize, int maximumPopulationSize, Selection selection, Variation variation) Creates the ε-progress triggered time continuation extension. -
Method Summary
Modifier and TypeMethodDescriptionprotected RestartType
Performs a check to determine if a restart should occur.void
loadState
(ObjectInputStream stream) Loads the state of this object from the stream.void
onRegister
(Algorithm algorithm) Called when this extension is registered with an algorithm.protected void
restart
(Algorithm algorithm, RestartType type) Performs a restart.void
saveState
(ObjectOutputStream stream) Writes the state of this object to the stream.Methods inherited from class org.moeaframework.algorithm.continuation.AdaptiveTimeContinuationExtension
addRestartListener, doAction, getInjectionRate, getMaximumPopulationSize, getMaxWindowSize, getMinimumPopulationSize, getWindowSize, removeRestartListener, setInjectionRate, setMaximumPopulationSize, setMaxWindowSize, setMinimumPopulationSize, setWindowSize
Methods inherited from class org.moeaframework.algorithm.extension.PeriodicExtension
onStep
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.configuration.Configurable
applyConfiguration, getConfiguration
Methods inherited from interface org.moeaframework.algorithm.extension.Extension
onInitialize, onTerminate
-
Constructor Details
-
EpsilonProgressContinuationExtension
public EpsilonProgressContinuationExtension()Creates the ε-progress triggered time continuation extension with default settings. -
EpsilonProgressContinuationExtension
public EpsilonProgressContinuationExtension(int windowSize, int maxWindowSize, double injectionRate, int minimumPopulationSize, int maximumPopulationSize, Selection selection, Variation variation) Creates the ε-progress triggered time continuation extension.- Parameters:
windowSize
- the number of iterations between invocations ofcheck
maxWindowSize
- the maximum number of iterations allowed since the last restart before forcing a restartinjectionRate
- the injection rateminimumPopulationSize
- 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 Details
-
onRegister
Description copied from interface:Extension
Called when this extension is registered with an algorithm. This can be used to perform any type checking or initialization.- Specified by:
onRegister
in interfaceExtension
- Overrides:
onRegister
in classAdaptiveTimeContinuationExtension
- Parameters:
algorithm
- the algorithm associated with this extension
-
check
Description copied from class:AdaptiveTimeContinuationExtension
Performs a check to determine if a restart should occur. ReturnsRestartType.NONE
if no restart should occur; orRestartType.HARD
if the population-to-archive ratio exceedspopulationRatio
by more than25%
or the number of fitness evaluations since the last restart exceedsmaxWindowSize
.- Overrides:
check
in classAdaptiveTimeContinuationExtension
- Parameters:
algorithm
- the evolutionary algorithm- Returns:
RestartType.NONE
if no restart should occur; orRestartType.HARD
if the population-to-archive ratio exceedspopulationRatio
by more than25%
or if the number of fitness evaluations since the last restart exceedsmaxWindowSize
-
restart
Description copied from class:AdaptiveTimeContinuationExtension
Performs a restart. If the type isRestartType.HARD
, the population is emptied, resized and filled with solutions selected and mutated from the archive. If the type isRestartType.SOFT
, the population is not emptied; new solutions are only added to fill any empty slots.- Overrides:
restart
in classAdaptiveTimeContinuationExtension
- Parameters:
algorithm
- the evolutionary algorithmtype
- the type of restart
-
saveState
Description copied from interface:Stateful
Writes the state of this object to the stream. The order that objects are written to the stream is important. We recommend first callingsuper.saveState(stream)
followed by writing each field.- Specified by:
saveState
in interfaceStateful
- Overrides:
saveState
in classAdaptiveTimeContinuationExtension
- Parameters:
stream
- the stream- Throws:
IOException
- if an I/O error occurred
-
loadState
Description copied from interface:Stateful
Loads the state of this object from the stream. The order for reading objects from the stream must match the order they are written to the stream inStateful.saveState(ObjectOutputStream)
.- Specified by:
loadState
in interfaceStateful
- Overrides:
loadState
in classAdaptiveTimeContinuationExtension
- Parameters:
stream
- the stream- Throws:
IOException
- if an I/O error occurredClassNotFoundException
- if the stream referenced a class that is not defined
-