public class EpsilonProgressContinuation extends AdaptiveTimeContinuation
AdaptiveTimeContinuation
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:
PeriodicAction.FrequencyType
algorithm, frequency, frequencyType, iteration, lastInvocation
Constructor and Description |
---|
EpsilonProgressContinuation(EpsilonBoxEvolutionaryAlgorithm algorithm,
int windowSize,
int maxWindowSize,
double injectionRate,
int minimumPopulationSize,
int maximumPopulationSize,
Selection selection,
Variation variation)
Decorates the specified algorithm with ε-progress triggered time
continuation.
|
Modifier and Type | Method and Description |
---|---|
protected RestartType |
check()
Performs a check to determine if a restart should occur.
|
EpsilonBoxDominanceArchive |
getArchive()
Returns the current non-dominated archive of the best solutions generated
by this evolutionary algorithm, or
null if no archive is used. |
void |
loadState(java.io.ObjectInputStream stream)
Loads the state of this object from the stream.
|
protected void |
restart(RestartType type)
Performs a restart.
|
void |
saveState(java.io.ObjectOutputStream stream)
Writes the state of this object to the stream.
|
addRestartListener, doAction, getInjectionRate, getMaximumPopulationSize, getMaxWindowSize, getMinimumPopulationSize, getPopulation, getWindowSize, removeRestartListener, setInjectionRate, setMaximumPopulationSize, setMaxWindowSize, setMinimumPopulationSize, setWindowSize
evaluate, getNumberOfEvaluations, getProblem, getResult, 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, setState, writeTypeSafety
applyConfiguration, getConfiguration
public EpsilonProgressContinuation(EpsilonBoxEvolutionaryAlgorithm algorithm, int windowSize, int maxWindowSize, double injectionRate, int minimumPopulationSize, int maximumPopulationSize, Selection selection, Variation variation)
algorithm
- the algorithm being decoratedwindowSize
- the number of iterations between invocations of
check
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 restartpublic EpsilonBoxDominanceArchive getArchive()
EvolutionaryAlgorithm
null
if no archive is used.getArchive
in interface EvolutionaryAlgorithm
getArchive
in class AdaptiveTimeContinuation
null
if no archive is
usedprotected RestartType check()
AdaptiveTimeContinuation
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
.check
in class AdaptiveTimeContinuation
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 maxWindowSize
protected void restart(RestartType type)
AdaptiveTimeContinuation
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.restart
in class AdaptiveTimeContinuation
type
- the type of restartpublic void saveState(java.io.ObjectOutputStream stream) throws java.io.IOException
Stateful
super.saveState(stream)
followed by writing each
field.saveState
in interface Stateful
saveState
in class AdaptiveTimeContinuation
stream
- the streamjava.io.IOException
- if an I/O error occurredpublic void loadState(java.io.ObjectInputStream stream) throws java.io.IOException, java.lang.ClassNotFoundException
Stateful
Stateful.saveState(ObjectOutputStream)
.loadState
in interface Stateful
loadState
in class AdaptiveTimeContinuation
stream
- the streamjava.io.IOException
- if an I/O error occurredjava.lang.ClassNotFoundException
- if the stream referenced a class that is not definedCopyright 2009-2024 David Hadka and other contributors. All rights reserved.
Licensed under the GNU Lesser General Public License.
Return to the MOEA Framework homepage.