Class MSASmoothing
- java.lang.Object
-
- org.goplanit.component.PlanitComponent<Smoothing>
-
- org.goplanit.sdinteraction.smoothing.Smoothing
-
- org.goplanit.sdinteraction.smoothing.MSASmoothing
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Comparable<IdAble>
,EventListener
,PlanitComponentListener
,EventListener
,ExternalIdAble
,IdAble
public class MSASmoothing extends Smoothing
MSA smoothing object- Author:
- markr
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static double
DEFAULT_INITIAL_STEP_SIZE
The default initial step size to useprotected double
stepSize
Step size
-
Constructor Summary
Constructors Constructor Description MSASmoothing(MSASmoothing other)
Copy constructorMSASmoothing(IdGroupingToken groupId)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MSASmoothing
clone()
Create a shallow copy of this entitydouble[]
execute(double[] previousValues, double[] proposedValues, int numberOfValues)
Apply smoothing based on the current step sizedouble
execute(double previousValue, double proposedValue)
Apply smoothing based on the current step sizevoid
reset()
All components should be able to reset going back to some representative initial statevoid
updateStep(int iterationIndex)
Update stepSize to 1/iterationIndex-
Methods inherited from class org.goplanit.component.PlanitComponent
equals, getComponentType, getExternalId, getId, getIdGroupingToken, getKnownSupportedEventTypes, getXmlId, hashCode, onPlanitComponentEvent, setExternalId, setXmlId
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.goplanit.utils.event.EventListener
hasKnownSupportedEventTypes
-
Methods inherited from interface org.goplanit.utils.id.ExternalIdAble
hasExternalId, hasXmlId
-
Methods inherited from interface org.goplanit.utils.id.IdAble
compareTo, idEquals, idHashCode
-
-
-
-
Field Detail
-
stepSize
protected double stepSize
Step size
-
DEFAULT_INITIAL_STEP_SIZE
public static final double DEFAULT_INITIAL_STEP_SIZE
The default initial step size to use- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MSASmoothing
public MSASmoothing(IdGroupingToken groupId)
Constructor- Parameters:
groupId
- contiguous id generation within this group for instances of this class
-
MSASmoothing
public MSASmoothing(MSASmoothing other)
Copy constructor- Parameters:
other
- to copy
-
-
Method Detail
-
updateStep
public void updateStep(int iterationIndex)
Update stepSize to 1/iterationIndex- Specified by:
updateStep
in classSmoothing
- Parameters:
iterationIndex
- index of current iteration- See Also:
Smoothing.updateStep(int)
-
execute
public double execute(double previousValue, double proposedValue)
Apply smoothing based on the current step size
-
execute
public double[] execute(double[] previousValues, double[] proposedValues, int numberOfValues)
Apply smoothing based on the current step size
-
clone
public MSASmoothing clone()
Create a shallow copy of this entity
-
reset
public void reset()
All components should be able to reset going back to some representative initial state- Specified by:
reset
in classPlanitComponent<Smoothing>
-
-