Interface ExponentialSmoothing

  • All Superinterfaces:
    org.eclipse.emf.cdo.CDOObject, org.eclipse.emf.cdo.common.id.CDOWithID, EObject, de.uka.ipd.sdq.identifier.Identifier, Mapper, Notifier
    All Known Implementing Classes:
    ExponentialSmoothingImpl

    public interface ExponentialSmoothing
    extends Mapper
    A representation of the model object 'Exponential Smoothing'. A special, stateful Mapper implementation which performs a (first order) exponential smoothing of a sequence of measurements.
    That is, starting with an initial smoothed value x0 of zero, upon reception of a new measurement yk computes the weighted arithmetic mean xk=αyk+(1-α)xk-1 with fixed smoothing factor α in [0,1].

    The following features are supported:

    See Also:
    MapPackage.getExponentialSmoothing()
    Generated class or method.
    EMF model class or method.
    annotation="http://www.eclipse.org/emf/2002/Ecore constraints='alpha mapping'" annotation="http://www.eclipse.org/emf/2002/Ecore/OCL alpha='self.smoothingFactor >= 0 and self.smoothingFactor <=1' mapping='self.map.outputMetricDescription.id = self.map.measurementSpecification.metricDescription.id'"
    • Method Detail

      • getSmoothingFactor

        double getSmoothingFactor()
        Returns the value of the 'Smoothing Factor' attribute. The default value is "0.5".

        If the meaning of the 'Smoothing Factor' attribute isn't clear, there really should be more of a description here...

        Returns:
        the value of the 'Smoothing Factor' attribute.
        See Also:
        setSmoothingFactor(double), MapPackage.getExponentialSmoothing_SmoothingFactor()
        Generated class or method.
        EMF model class or method.
        default="0.5" required="true"
      • setSmoothingFactor

        void setSmoothingFactor​(double value)
        Sets the value of the 'Smoothing Factor' attribute.
        Parameters:
        value - the new value of the 'Smoothing Factor' attribute.
        See Also:
        getSmoothingFactor()
        Generated class or method.
      • getSmoothedValue

        javax.measure.Measure<Double,​javax.measure.quantity.Quantity> getSmoothedValue()
        Returns the value of the 'Smoothed Value' attribute. The default value is "".

        If the meaning of the 'Smoothed Value' attribute isn't clear, there really should be more of a description here...

        Returns:
        the value of the 'Smoothed Value' attribute.
        See Also:
        setSmoothedValue(Measure), MapPackage.getExponentialSmoothing_SmoothedValue()
        Generated class or method.
        EMF model class or method.
        default="" dataType="org.palladiosimulator.edp2.models.ExperimentData.EJSMeasure"
      • setSmoothedValue

        void setSmoothedValue​(javax.measure.Measure<Double,​javax.measure.quantity.Quantity> value)
        Sets the value of the 'Smoothed Value' attribute.
        Parameters:
        value - the new value of the 'Smoothed Value' attribute.
        See Also:
        getSmoothedValue()
        Generated class or method.
      • getMappingFunction

        UnaryOperator<org.palladiosimulator.measurementframework.MeasuringValue> getMappingFunction()
        Gets the mapping function which implements the (first order) exponential smoothing.
        Specified by:
        getMappingFunction in interface Mapper
        Generated class or method.
        EMF model class or method.
        kind="operation" dataType="org.palladiosimulator.monitorrepository.map.util.Func" annotation="http://www.eclipse.org/emf/2002/Ecore suppressedSetVisibility='true'" annotation="http://www.eclipse.org/emf/2002/GenModel body='return (input) -> {\r\n org.palladiosimulator.metricspec.NumericalBaseMetricDescription expectedMetric = (org.palladiosimulator.metricspec.NumericalBaseMetricDescription) getMap()\r\n .getOutputMetricDescription();\r\n javax.measure.unit.Unit unit = expectedMetric.getDefaultUnit();\r\n double value = input.getMeasureForMetric(expectedMetric).doubleValue(unit);\r\n Measure time = input.getMeasureForMetric(\r\n org.palladiosimulator.metricspec.constants.MetricDescriptionConstants.POINT_IN_TIME_METRIC);\r\n double oldValue = getSmoothedValue() == null ? 0d : getSmoothedValue().doubleValue(unit);\r\n setSmoothedValue(\r\n Measure.valueOf(oldValue * (1 - getSmoothingFactor()) + value * getSmoothingFactor(), unit));\r\n return new org.palladiosimulator.measurementframework.TupleMeasurement(\r\n (org.palladiosimulator.metricspec.MetricSetDescription) input.getMetricDesciption(), time,\r\n getSmoothedValue());\r\n };'"
      • isMetricNumericalBaseMetric

        boolean isMetricNumericalBaseMetric​(DiagnosticChain chain,
                                            Map<?,​?> context)
        Validator method to assert that the metric description of the associated measurement specification is a NumericalBaseMetricDescription.
        Generated class or method.
        EMF model class or method.