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, statefulMapperimplementation which performs a (first order) exponential smoothing of a sequence of measurements.
That is, starting with an initial smoothed valuex0of zero, upon reception of a new measurementykcomputes the weighted arithmetic meanxk=αyk+(1-α)xk-1with 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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description UnaryOperator<org.palladiosimulator.measurementframework.MeasuringValue>getMappingFunction()Gets the mapping function which implements the (first order) exponential smoothing.javax.measure.Measure<Double,javax.measure.quantity.Quantity>getSmoothedValue()Returns the value of the 'Smoothed Value' attribute.doublegetSmoothingFactor()Returns the value of the 'Smoothing Factor' attribute.booleanisMetricNumericalBaseMetric(DiagnosticChain chain, Map<?,?> context)Validator method to assert that the metric description of the associated measurement specification is aNumericalBaseMetricDescription.voidsetSmoothedValue(javax.measure.Measure<Double,javax.measure.quantity.Quantity> value)Sets the value of the 'Smoothed Value' attribute.voidsetSmoothingFactor(double value)Sets the value of the 'Smoothing Factor' attribute.-
Methods inherited from interface org.eclipse.emf.cdo.CDOObject
cdoConflict, cdoDirectResource, cdoHistory, cdoID, cdoInvalid, cdoLockState, cdoPermission, cdoPrefetch, cdoReadLock, cdoReload, cdoResource, cdoRevision, cdoRevision, cdoState, cdoView, cdoWriteLock, cdoWriteOption
-
Methods inherited from interface org.eclipse.emf.ecore.EObject
eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eInvoke, eIsProxy, eIsSet, eResource, eSet, eUnset
-
Methods inherited from interface org.eclipse.emf.common.notify.Notifier
eAdapters, eDeliver, eNotify, eSetDeliver
-
-
-
-
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:
getMappingFunctionin interfaceMapper- 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, javax.measure.quantity.Duration> 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 aNumericalBaseMetricDescription.- Generated class or method.
- EMF model class or method.
-
-