Class Smoothing
- java.lang.Object
-
- org.goplanit.component.PlanitComponent<Smoothing>
-
- org.goplanit.sdinteraction.smoothing.Smoothing
-
- All Implemented Interfaces:
Serializable
,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, boolean deepCopy)
ConstructorSmoothing(IdGroupingToken groupId)
Base constructor
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract Smoothing
deepClone()
deep clone on planit component should attempt to also update internal dependencies between deep cloned containers where possibleabstract double[]
execute(double[] previousValues, double[] proposedValues, int numberOfValues)
Apply smoothing based on the current step sizeabstract double
execute(double previousValue, double proposedValue)
Apply smoothing based on the current step sizeabstract Smoothing
shallowClone()
Create a shallow copy of this entityabstract void
updateStep(int iterationIndex)
Determine the stepsize for the passed in iteraction-
Methods inherited from class org.goplanit.component.PlanitComponent
collectSettingsAsKeyValueMap, equals, getComponentType, getExternalId, getId, getIdGroupingToken, getKnownSupportedEventTypes, getXmlId, hashCode, onPlanitComponentEvent, reset, setExternalId, setXmlId
-
Methods inherited from class java.lang.Object
clone, 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
appendExternalId, appendExternalId, getIdsAsString, getSplitExternalId, getSplitExternalId, hasExternalId, hasXmlId, setXmlId
-
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, boolean deepCopy)
Constructor- Parameters:
other
- to copydeepCopy
- when true, create a deep copy, shallow copy otherwise
-
-
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
-
shallowClone
public abstract Smoothing shallowClone()
Create a shallow copy of this entity- Specified by:
shallowClone
in interfaceIdAble
- Specified by:
shallowClone
in classPlanitComponent<Smoothing>
- Returns:
- shallow copy of entity
-
deepClone
public abstract Smoothing deepClone()
deep clone on planit component should attempt to also update internal dependencies between deep cloned containers where possible- Specified by:
deepClone
in interfaceIdAble
- Specified by:
deepClone
in classPlanitComponent<Smoothing>
- Returns:
- deep copy of entity
-
-