Class Smoothing
- java.lang.Object
-
- org.djutils.event.EventProducer
-
- org.planit.trafficassignment.TrafficAssignmentComponent<Smoothing>
-
- org.planit.sdinteraction.smoothing.Smoothing
-
- All Implemented Interfaces:
Serializable
,org.djutils.event.EventProducerInterface
- Direct Known Subclasses:
MSASmoothing
public abstract class Smoothing extends TrafficAssignmentComponent<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
-
-
Field Summary
Fields Modifier and Type Field Description static String
MSA
short hand for configuring smoothing with MSA instance-
Fields inherited from class org.planit.trafficassignment.TrafficAssignmentComponent
groupId, id, trafficComponentType
-
-
Constructor Summary
Constructors Constructor Description Smoothing(IdGroupingToken groupId)
Base constructor
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract double[]
applySmoothing(double[] previousValues, double[] proposedValues, int numberOfValues)
Apply smoothing based on the current step sizeabstract double
applySmoothing(double previousValue, double proposedValue)
Apply smoothing based on the current step sizeabstract void
update(int iterationIndex)
Determine the stepsize for the passed in iteraction-
Methods inherited from class org.planit.trafficassignment.TrafficAssignmentComponent
getId, getIdGroupingtoken, getSourceId, getTrafficComponentType
-
Methods inherited from class org.djutils.event.EventProducer
addListener, addListener, addListener, addListener, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, getEventTypesWithListeners, hasListeners, numberOfListeners, removeAllListeners, removeAllListeners, removeListener
-
-
-
-
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
-
-
Method Detail
-
update
public abstract void update(int iterationIndex)
Determine the stepsize for the passed in iteraction- Parameters:
iterationIndex
- index of current iteration
-
applySmoothing
public abstract double applySmoothing(double previousValue, double proposedValue)
Apply smoothing based on the current step size- Parameters:
previousValue
- previous valueproposedValue
- proposed value- Returns:
- smoothedValue smoothed value
-
applySmoothing
public abstract double[] applySmoothing(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
-
-