Class RuntimeCollectorExtension
java.lang.Object
org.moeaframework.algorithm.extension.PeriodicExtension
org.moeaframework.algorithm.extension.RuntimeCollectorExtension
Extends an algorithm to record the approximation sets at periodic intervals.
-
Field Summary
Fields inherited from class org.moeaframework.algorithm.extension.PeriodicExtension
frequency, frequencyType, iteration, lastInvocation
-
Constructor Summary
ConstructorDescriptionRuntimeCollectorExtension
(ResultFileWriter writer, int frequency, FrequencyType frequencyType) Constructs a new wrapper to collect runtime dynamics. -
Method Summary
Modifier and TypeMethodDescriptionvoid
The action that is called by this extension.void
onRegister
(Algorithm algorithm) Called when this extension is registered with an algorithm.Methods inherited from class org.moeaframework.algorithm.extension.PeriodicExtension
loadState, onStep, saveState
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.moeaframework.algorithm.extension.Extension
onInitialize, onTerminate
-
Constructor Details
-
RuntimeCollectorExtension
public RuntimeCollectorExtension(ResultFileWriter writer, int frequency, FrequencyType frequencyType) Constructs a new wrapper to collect runtime dynamics.- Parameters:
writer
- the result file writer where the runtime information is storedfrequency
- the frequency at which the runtime snapshots are recordedfrequencyType
- the type of frequency
-
-
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 classPeriodicExtension
- Parameters:
algorithm
- the algorithm associated with this extension
-
doAction
Description copied from class:PeriodicExtension
The action that is called by this extension.- Specified by:
doAction
in classPeriodicExtension
- Parameters:
algorithm
- the algorithm associated with this extension
-