Class 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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void flushAndStopAggregation()  
      javax.measure.Measure<Double,​javax.measure.quantity.Duration> getCurrentUpperBound()
      Gets the current upper bound of the window.
      javax.measure.Measure<Double,​javax.measure.quantity.Duration> getEffectiveWindowLength()
      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
    • Constructor Detail

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

      • 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()
      • 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:
        getCurrentUpperBound()
      • flushAndStopAggregation

        public void flushAndStopAggregation()