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
ISlidingWindowListener
s, e.g., certain
SlidingWindowAggregator
s.-
Constructor Summary
ConstructorDescriptionSimulizarSlidingWindow
(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.model.SimuComModel model) Initializes a new instance of theSimulizarSlidingWindow
class 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.model.SimuComModel model) Initializes a new instance of theSimulizarSlidingWindow
class 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.model.SimuComModel model) Initializes a new instance of theSimulizarSlidingWindow
class 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, onWindowFullEvent
Methods 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.model.SimuComModel model) Initializes a new instance of theSimulizarSlidingWindow
class 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, aMetricDescription
of must be specified.moveOnStrategy
- TheISlidingWindowMoveOnStrategy
instance that defines how the collected data (i.e., the measurements) is adjusted when the window moves forward.model
- TheSimuComModel
instance which governs this window.- Throws:
IllegalArgumentException
- In one of the following cases:- given window length is negative
acceptedMetrics
,moveOnStrategy
ormodel
isnull
- 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.model.SimuComModel model) Initializes a new instance of theSimulizarSlidingWindow
class with the given parameters.- Parameters:
windowLength
- The length of the window, given in any arbitraryDuration
.increment
- ThisMeasure
indicates 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, aMetricDescription
of must be specified.moveOnStrategy
- TheISlidingWindowMoveOnStrategy
instance that defines how the collected data (i.e., the measurements) is adjusted when the window moves forward.model
- TheSimuComModel
instance which governs this window.- Throws:
IllegalArgumentException
- In one of the following cases:- given window length or increment is negative
acceptedMetrics
,moveOnStrategy
ormodel
isnull
-
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.model.SimuComModel model) Initializes a new instance of theSimulizarSlidingWindow
class with the given parameters.- Parameters:
windowLength
- The length of the window, given in any arbitraryDuration
.increment
- ThisMeasure
indicates the increment by what the window is moved on, given in any arbitraryDuration
.initialLowerBound
- ThisMeasure
indicates 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, aMetricDescription
of must be specified.moveOnStrategy
- TheISlidingWindowMoveOnStrategy
instance that defines how the collected data (i.e., the measurements) is adjusted when the window moves forward.model
- TheSimuComModel
instance which governs this window.- Throws:
IllegalArgumentException
- In one of the following cases:- given window length or increment is negative
acceptedMetrics
,moveOnStrategy
ormodel
isnull
-
-
Method Details
-
getCurrentUpperBound
Gets the current upper bound of the window. Note that the bound might be smaller thangetCurrentLowerBound() + windowLength
as 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:
getCurrentUpperBound
in classorg.palladiosimulator.experimentanalysis.SlidingWindow
- Returns:
- A
Measure
denoting 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:
getEffectiveWindowLength
in classorg.palladiosimulator.experimentanalysis.SlidingWindow
- Returns:
- A
Measure
denoting the instantaneous effective window length. - See Also:
-
flushAndStopAggregation
public void flushAndStopAggregation()
-