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 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

    Constructors
    Constructor
    Description
    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 the SimulizarSlidingWindow 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 the SimulizarSlidingWindow 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 the SimulizarSlidingWindow class with the given parameters.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    javax.measure.Measure<Double,javax.measure.quantity.Duration>
    Gets the current upper bound of the window.
    javax.measure.Measure<Double,javax.measure.quantity.Duration>
    Gets the current, effective window length.

    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 the SimulizarSlidingWindow class with the given parameters.
      Parameters:
      windowLength - The length of the window, given in any arbitrary Duration. Additionally, this measure also denotes the window increment.
      acceptedMetrics - As each window only accepts measurements that adhere to a certain metric, a MetricDescription of must be specified.
      moveOnStrategy - The ISlidingWindowMoveOnStrategy instance that defines how the collected data (i.e., the measurements) is adjusted when the window moves forward.
      model - The SimuComModel instance which governs this window.
      Throws:
      IllegalArgumentException - In one of the following cases:
      • given window length is negative
      • acceptedMetrics, moveOnStrategy or model is null
      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 the SimulizarSlidingWindow class with the given parameters.
      Parameters:
      windowLength - The length of the window, given in any arbitrary Duration.
      increment - This Measure indicates the increment by what the window is moved on, given in any arbitrary Duration.
      acceptedMetrics - As each window only accepts measurements that adhere to a certain metric, a MetricDescription of must be specified.
      moveOnStrategy - The ISlidingWindowMoveOnStrategy instance that defines how the collected data (i.e., the measurements) is adjusted when the window moves forward.
      model - The SimuComModel instance which governs this window.
      Throws:
      IllegalArgumentException - In one of the following cases:
      • given window length or increment is negative
      • acceptedMetrics, moveOnStrategy or model is null
    • 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 the SimulizarSlidingWindow class with the given parameters.
      Parameters:
      windowLength - The length of the window, given in any arbitrary Duration.
      increment - This Measure indicates the increment by what the window is moved on, given in any arbitrary Duration.
      initialLowerBound - This Measure indicates the lower bound value at which the algorithm starts aggregating, given in any arbitrary Duration.
      acceptedMetrics - As each window only accepts measurements that adhere to a certain metric, a MetricDescription of must be specified.
      moveOnStrategy - The ISlidingWindowMoveOnStrategy instance that defines how the collected data (i.e., the measurements) is adjusted when the window moves forward.
      model - The SimuComModel instance which governs this window.
      Throws:
      IllegalArgumentException - In one of the following cases:
      • given window length or increment is negative
      • acceptedMetrics, moveOnStrategy or model is null
  • Method Details

    • getCurrentUpperBound

      public javax.measure.Measure<Double,javax.measure.quantity.Duration> getCurrentUpperBound()
      Gets the current upper bound of the window. Note that the bound might be smaller than getCurrentLowerBound() + 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 class org.palladiosimulator.experimentanalysis.SlidingWindow
      Returns:
      A Measure denoting the current upper bound.
      See Also:
    • getEffectiveWindowLength

      public javax.measure.Measure<Double,javax.measure.quantity.Duration> 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 class org.palladiosimulator.experimentanalysis.SlidingWindow
      Returns:
      A Measure denoting the instantaneous effective window length.
      See Also:
    • flushAndStopAggregation

      public void flushAndStopAggregation()