Class Smoothing
- java.lang.Object
-
- org.goplanit.component.PlanitComponent<Smoothing>
-
- org.goplanit.sdinteraction.smoothing.Smoothing
-
- All Implemented Interfaces:
Serializable,Cloneable,Comparable<IdAble>,EventListener,PlanitComponentListener,EventListener,ExternalIdAble,IdAble
- Direct Known Subclasses:
MSASmoothing
public abstract class Smoothing extends PlanitComponent<Smoothing> implements Serializable
Smoothing class to smooth data, such as path flows or other types of flows or traffic data between iterations- Author:
- markr
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Smoothing(Smoothing other)ConstructorSmoothing(IdGroupingToken groupId)Base constructor
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract Smoothingclone()Create a shallow copy of this entityabstract double[]execute(double[] previousValues, double[] proposedValues, int numberOfValues)Apply smoothing based on the current step sizeabstract doubleexecute(double previousValue, double proposedValue)Apply smoothing based on the current step sizeabstract voidupdateStep(int iterationIndex)Determine the stepsize for the passed in iteraction-
Methods inherited from class org.goplanit.component.PlanitComponent
equals, getComponentType, getExternalId, getId, getIdGroupingToken, getKnownSupportedEventTypes, getXmlId, hashCode, onPlanitComponentEvent, reset, 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
-
MSA
public static final String MSA
short hand for configuring smoothing with MSA instance
-
-
Constructor Detail
-
Smoothing
public Smoothing(IdGroupingToken groupId)
Base constructor- Parameters:
groupId- contiguous id generation within this group for instances of this class
-
Smoothing
public Smoothing(Smoothing other)
Constructor- Parameters:
other- to copy
-
-
Method Detail
-
updateStep
public abstract void updateStep(int iterationIndex)
Determine the stepsize for the passed in iteraction- Parameters:
iterationIndex- index of current iteration
-
execute
public abstract double execute(double previousValue, double proposedValue)Apply smoothing based on the current step size- Parameters:
previousValue- previous valueproposedValue- proposed value- Returns:
- smoothedValue smoothed value
-
execute
public abstract double[] execute(double[] previousValues, double[] proposedValues, int numberOfValues)Apply smoothing based on the current step size- Parameters:
previousValues- array of previous valuesproposedValues- array of proposed valuesnumberOfValues- number of proposed values- Returns:
- smoothedValues array of smoothed values
-
-