Class SimulizarSlidingWindow
java.lang.Object
org.palladiosimulator.commons.designpatterns.AbstractObservable<org.palladiosimulator.experimentanalysis.ISlidingWindowListener>
org.palladiosimulator.experimentanalysis.SlidingWindow
org.palladiosimulator.simulizar.slidingwindow.impl.SimulizarSlidingWindow
- All Implemented Interfaces:
org.palladiosimulator.commons.designpatterns.IAbstractObservable<org.palladiosimulator.experimentanalysis.ISlidingWindowListener>
public class SimulizarSlidingWindow
extends org.palladiosimulator.experimentanalysis.SlidingWindow
This class is a
Once the window is full, i.e., the simulation time reaches the next multiple of the window length, the window moves forward by a fixed increment and the collected measurements are propagated to all connected
SlidingWindow subclass that is governed by and advances during simulation
runs.Once the window is full, i.e., the simulation time reaches the next multiple of the window length, the window moves forward by a fixed increment and the collected measurements are propagated to all connected
ISlidingWindowListeners, e.g., certain
SlidingWindowAggregators.-
Constructor Summary
ConstructorsConstructorDescriptionSimulizarSlidingWindow(javax.measure.Measure<Double, javax.measure.quantity.Duration> windowLength, javax.measure.Measure<Double, javax.measure.quantity.Duration> increment, javax.measure.Measure<Double, javax.measure.quantity.Duration> initialLowerBound, org.palladiosimulator.metricspec.MetricDescription acceptedMetrics, org.palladiosimulator.experimentanalysis.ISlidingWindowMoveOnStrategy moveOnStrategy, de.uka.ipd.sdq.simucomframework.core.model.SimuComModel model) Initializes a new instance of theSimulizarSlidingWindowclass with the given parameters.SimulizarSlidingWindow(javax.measure.Measure<Double, javax.measure.quantity.Duration> windowLength, javax.measure.Measure<Double, javax.measure.quantity.Duration> increment, org.palladiosimulator.metricspec.MetricDescription acceptedMetrics, org.palladiosimulator.experimentanalysis.ISlidingWindowMoveOnStrategy moveOnStrategy, de.uka.ipd.sdq.simucomframework.core.model.SimuComModel model) Initializes a new instance of theSimulizarSlidingWindowclass with the given parameters.SimulizarSlidingWindow(javax.measure.Measure<Double, javax.measure.quantity.Duration> windowLength, org.palladiosimulator.metricspec.MetricDescription acceptedMetrics, org.palladiosimulator.experimentanalysis.ISlidingWindowMoveOnStrategy moveOnStrategy, de.uka.ipd.sdq.simucomframework.core.model.SimuComModel model) Initializes a new instance of theSimulizarSlidingWindowclass with the given parameters. -
Method Summary
Methods inherited from class org.palladiosimulator.experimentanalysis.SlidingWindow
acceptsBaseMetric, addMeasurement, addMeasurementInternal, addObserver, checkAddMeasurementPrerequisites, flush, getAcceptedMetric, getAttachedObservers, getCurrentLowerBound, getIncrement, getNumberOfElements, getSpecifiedWindowLength, isEmpty, onWindowFullEventMethods inherited from class org.palladiosimulator.commons.designpatterns.AbstractObservable
getEventDispatcher, getObservers, removeAllObserver, removeObserver
-
Constructor Details
-
SimulizarSlidingWindow
public SimulizarSlidingWindow(javax.measure.Measure<Double, javax.measure.quantity.Duration> windowLength, org.palladiosimulator.metricspec.MetricDescription acceptedMetrics, org.palladiosimulator.experimentanalysis.ISlidingWindowMoveOnStrategy moveOnStrategy, de.uka.ipd.sdq.simucomframework.core.model.SimuComModel model) Initializes a new instance of theSimulizarSlidingWindowclass with the given parameters.- Parameters:
windowLength- The length of the window, given in any arbitraryDuration. Additionally, this measure also denotes the window increment.acceptedMetrics- As each window only accepts measurements that adhere to a certain metric, aMetricDescriptionof must be specified.moveOnStrategy- TheISlidingWindowMoveOnStrategyinstance that defines how the collected data (i.e., the measurements) is adjusted when the window moves forward.model- TheSimuComModelinstance which governs this window.- Throws:
IllegalArgumentException- In one of the following cases:- given window length is negative
acceptedMetrics,moveOnStrategyormodelisnull
- See Also:
-
#SlidingWindow(Measure, Measure, MetricDescription, ISlidingWindowMoveOnStrategy)
-
SimulizarSlidingWindow
public SimulizarSlidingWindow(javax.measure.Measure<Double, javax.measure.quantity.Duration> windowLength, javax.measure.Measure<Double, javax.measure.quantity.Duration> increment, org.palladiosimulator.metricspec.MetricDescription acceptedMetrics, org.palladiosimulator.experimentanalysis.ISlidingWindowMoveOnStrategy moveOnStrategy, de.uka.ipd.sdq.simucomframework.core.model.SimuComModel model) Initializes a new instance of theSimulizarSlidingWindowclass with the given parameters.- Parameters:
windowLength- The length of the window, given in any arbitraryDuration.increment- ThisMeasureindicates the increment by what the window is moved on, given in any arbitraryDuration.acceptedMetrics- As each window only accepts measurements that adhere to a certain metric, aMetricDescriptionof must be specified.moveOnStrategy- TheISlidingWindowMoveOnStrategyinstance that defines how the collected data (i.e., the measurements) is adjusted when the window moves forward.model- TheSimuComModelinstance which governs this window.- Throws:
IllegalArgumentException- In one of the following cases:- given window length or increment is negative
acceptedMetrics,moveOnStrategyormodelisnull
-
SimulizarSlidingWindow
public SimulizarSlidingWindow(javax.measure.Measure<Double, javax.measure.quantity.Duration> windowLength, javax.measure.Measure<Double, javax.measure.quantity.Duration> increment, javax.measure.Measure<Double, javax.measure.quantity.Duration> initialLowerBound, org.palladiosimulator.metricspec.MetricDescription acceptedMetrics, org.palladiosimulator.experimentanalysis.ISlidingWindowMoveOnStrategy moveOnStrategy, de.uka.ipd.sdq.simucomframework.core.model.SimuComModel model) Initializes a new instance of theSimulizarSlidingWindowclass with the given parameters.- Parameters:
windowLength- The length of the window, given in any arbitraryDuration.increment- ThisMeasureindicates the increment by what the window is moved on, given in any arbitraryDuration.initialLowerBound- ThisMeasureindicates the lower bound value at which the algorithm starts aggregating, given in any arbitraryDuration.acceptedMetrics- As each window only accepts measurements that adhere to a certain metric, aMetricDescriptionof must be specified.moveOnStrategy- TheISlidingWindowMoveOnStrategyinstance that defines how the collected data (i.e., the measurements) is adjusted when the window moves forward.model- TheSimuComModelinstance which governs this window.- Throws:
IllegalArgumentException- In one of the following cases:- given window length or increment is negative
acceptedMetrics,moveOnStrategyormodelisnull
-
-
Method Details
-
getCurrentUpperBound
Gets the current upper bound of the window. Note that the bound might be smaller thangetCurrentLowerBound() + windowLengthas defined in#SimulizarSlidingWindow(Measure, MetricDescription, ISlidingWindowMoveOnStrategy)or#SimulizarSlidingWindow(Measure, Measure, MetricDescription, ISlidingWindowMoveOnStrategy).
More precisely, this particular case occurs if the total simulation time is not an integer multiple of the specified length.- Overrides:
getCurrentUpperBoundin classorg.palladiosimulator.experimentanalysis.SlidingWindow- Returns:
- A
Measuredenoting the current upper bound. - See Also:
-
getEffectiveWindowLength
Gets the current, effective window length. Note that the effective window length might be smaller than specified in#SimulizarSlidingWindow(Measure, MetricDescription, ISlidingWindowMoveOnStrategy)or#SimulizarSlidingWindow(Measure, Measure, MetricDescription, ISlidingWindowMoveOnStrategy).
More precisely, this particular case occurs if the total simulation time is not an integer multiple of the specified length.- Overrides:
getEffectiveWindowLengthin classorg.palladiosimulator.experimentanalysis.SlidingWindow- Returns:
- A
Measuredenoting the instantaneous effective window length. - See Also:
-
flushAndStopAggregation
public void flushAndStopAggregation()
-