Class MSASmoothing
- java.lang.Object
-
- org.djutils.event.EventProducer
-
- org.planit.trafficassignment.TrafficAssignmentComponent<Smoothing>
-
- org.planit.sdinteraction.smoothing.Smoothing
-
- org.planit.sdinteraction.smoothing.MSASmoothing
-
- All Implemented Interfaces:
Serializable
,org.djutils.event.EventProducerInterface
public class MSASmoothing extends Smoothing
MSA smoothing object- Author:
- markr
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected double
stepSize
Step size-
Fields inherited from class org.planit.trafficassignment.TrafficAssignmentComponent
groupId, id, trafficComponentType
-
-
Constructor Summary
Constructors Constructor Description MSASmoothing(IdGroupingToken groupId)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double[]
applySmoothing(double[] previousValues, double[] proposedValues, int numberOfValues)
#Apply smoothing based on the current step sizedouble
applySmoothing(double previousValue, double proposedValue)
#Apply smoothing based on the current step sizevoid
update(int iterationIndex)
Update stepSize to 1/iterationIndex-
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
-
-
-
-
Constructor Detail
-
MSASmoothing
public MSASmoothing(IdGroupingToken groupId)
Constructor- Parameters:
groupId
- contiguous id generation within this group for instances of this class
-
-
Method Detail
-
update
public void update(int iterationIndex)
Update stepSize to 1/iterationIndex- Specified by:
update
in classSmoothing
- Parameters:
iterationIndex
- index of current iteration- See Also:
Smoothing.update(int)
-
applySmoothing
public double applySmoothing(double previousValue, double proposedValue)
#Apply smoothing based on the current step size- Specified by:
applySmoothing
in classSmoothing
- Parameters:
previousValue
- previous valueproposedValue
- proposed value- Returns:
- smoothedValue smoothed value
-
applySmoothing
public double[] applySmoothing(double[] previousValues, double[] proposedValues, int numberOfValues)
#Apply smoothing based on the current step size- Specified by:
applySmoothing
in classSmoothing
- Parameters:
previousValues
- array of previous valuesproposedValues
- array of proposed valuesnumberOfValues
- number of proposed values- Returns:
- smoothedValues array of smoothed values
-
-