public class SequentialFixedAccelerationModel extends AbstractGTUFollowingModelMobil implements Serializable
Copyright (c) 2013-2016 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
TOODANGEROUS
Constructor and Description |
---|
SequentialFixedAccelerationModel(org.opentrafficsim.core.dsol.OTSDEVSSimulatorInterface simulator,
org.djunits.value.vdouble.scalar.Acceleration maximumSafeDeceleration)
Construct a SequentialFixedAccelerationModel with empty list of FixedAccelerationModel steps.
|
SequentialFixedAccelerationModel(org.opentrafficsim.core.dsol.OTSDEVSSimulatorInterface simulator,
org.djunits.value.vdouble.scalar.Acceleration maximumSafeDeceleration,
Set<FixedAccelerationModel> steps)
Construct a SequentialFixedAccelerationModel and load it with a list of FixedAccelerationModel steps.
|
Modifier and Type | Method and Description |
---|---|
SequentialFixedAccelerationModel |
addStep(FixedAccelerationModel step)
Add one FixedAccelerationModel step to this SequentialFixedAccelerationModel.
|
org.djunits.value.vdouble.scalar.Acceleration |
computeAcceleration(org.djunits.value.vdouble.scalar.Speed followerSpeed,
org.djunits.value.vdouble.scalar.Speed followerMaximumSpeed,
org.djunits.value.vdouble.scalar.Speed leaderSpeed,
org.djunits.value.vdouble.scalar.Length headway,
org.djunits.value.vdouble.scalar.Speed speedLimit)
Compute the acceleration that would be used to follow a leader.
|
org.djunits.value.vdouble.scalar.Acceleration |
computeAcceleration(org.djunits.value.vdouble.scalar.Speed followerSpeed,
org.djunits.value.vdouble.scalar.Speed followerMaximumSpeed,
org.djunits.value.vdouble.scalar.Speed leaderSpeed,
org.djunits.value.vdouble.scalar.Length headway,
org.djunits.value.vdouble.scalar.Speed speedLimit,
org.djunits.value.vdouble.scalar.Duration stepSize)
Compute the acceleration that would be used to follow a leader.
|
org.djunits.value.vdouble.scalar.Length |
desiredHeadway(org.opentrafficsim.core.gtu.behavioralcharacteristics.BehavioralCharacteristics behavioralCharacteristics,
org.djunits.value.vdouble.scalar.Speed speed)
Determines the desired headway in equilibrium conditions, i.e.
|
org.djunits.value.vdouble.scalar.Speed |
desiredSpeed(org.opentrafficsim.core.gtu.behavioralcharacteristics.BehavioralCharacteristics behavioralCharacteristics,
SpeedLimitInfo speedInfo)
Determines the desired speed.
|
org.djunits.value.vdouble.scalar.Acceleration |
followingAcceleration(org.opentrafficsim.core.gtu.behavioralcharacteristics.BehavioralCharacteristics behavioralCharacteristics,
org.djunits.value.vdouble.scalar.Speed speed,
SpeedLimitInfo speedInfo,
SortedMap<org.djunits.value.vdouble.scalar.Length,org.djunits.value.vdouble.scalar.Speed> leaders)
Determination of car-following acceleration, possibly based on multiple leaders.
|
FixedAccelerationModel |
get(int index)
Retrieve one FixedAccelerationModel step.
|
String |
getLongName()
Return complete textual information about this instantiation of this GTU following model.
|
org.djunits.value.vdouble.scalar.Acceleration |
getMaximumSafeDeceleration()
Return the maximum safe deceleration for use in gap acceptance models.
|
String |
getName()
Return the name of this GTU following model.
|
org.djunits.value.vdouble.scalar.Duration |
getStepSize()
Return the standard step size of this GTU following model.
|
int |
size()
Retrieve the number of FixedAccelerationModel steps in this SequentialFixedAccelerationModel.
|
org.djunits.value.vdouble.scalar.Time |
timeAfterCompletionOfStep(int index)
Retrieve the simulation time at the end of the Nth step of this SequentialFixedAccelerationModel.
|
String |
toString() |
computeAccelerationStep, computeAccelerationStep, computeAccelerationStep, computeAccelerationStep, computeAccelerationStepWithNoLeader, computeAccelerationStepWithNoLeader, computeDualAccelerationStep, computeDualAccelerationStep, minimumHeadway
public SequentialFixedAccelerationModel(org.opentrafficsim.core.dsol.OTSDEVSSimulatorInterface simulator, org.djunits.value.vdouble.scalar.Acceleration maximumSafeDeceleration)
simulator
- DEVSSimulator; the simulator (needed to obtain the current simulation time)maximumSafeDeceleration
- specified maximum safe decelerationpublic SequentialFixedAccelerationModel(org.opentrafficsim.core.dsol.OTSDEVSSimulatorInterface simulator, org.djunits.value.vdouble.scalar.Acceleration maximumSafeDeceleration, Set<FixedAccelerationModel> steps)
simulator
- DEVSSimulator; the simulator (needed to obtain the current simulation time)maximumSafeDeceleration
- specified maximum safe decelerationsteps
- Set<FixedAccelerationModel>; the list of FixedAccelerationModel steps.public final SequentialFixedAccelerationModel addStep(FixedAccelerationModel step)
step
- FixedAccelerationModel; the step to addpublic final int size()
public final FixedAccelerationModel get(int index)
index
- int; the index of the retrieved FixedAccelerationModel steppublic final org.djunits.value.vdouble.scalar.Time timeAfterCompletionOfStep(int index)
index
- int; the steppublic final org.djunits.value.vdouble.scalar.Acceleration computeAcceleration(org.djunits.value.vdouble.scalar.Speed followerSpeed, org.djunits.value.vdouble.scalar.Speed followerMaximumSpeed, org.djunits.value.vdouble.scalar.Speed leaderSpeed, org.djunits.value.vdouble.scalar.Length headway, org.djunits.value.vdouble.scalar.Speed speedLimit)
computeAcceleration
in interface GTUFollowingModelOld
followerSpeed
- Speed; the speed of the follower at the current timefollowerMaximumSpeed
- Speed; the maximum speed that the follower is capable of driving atleaderSpeed
- Speed; the speed of the follower at the current timeheadway
- Length; the net headway (distance between the front of the follower to the rear of the leader)
at the current time, or the maximum distance we can cover at the current time, e.g. as the result of a lane
dropspeedLimit
- Speed; the local speed limitpublic final org.djunits.value.vdouble.scalar.Acceleration computeAcceleration(org.djunits.value.vdouble.scalar.Speed followerSpeed, org.djunits.value.vdouble.scalar.Speed followerMaximumSpeed, org.djunits.value.vdouble.scalar.Speed leaderSpeed, org.djunits.value.vdouble.scalar.Length headway, org.djunits.value.vdouble.scalar.Speed speedLimit, org.djunits.value.vdouble.scalar.Duration stepSize)
computeAcceleration
in interface GTUFollowingModelOld
followerSpeed
- Speed; the speed of the follower at the current timefollowerMaximumSpeed
- Speed; the maximum speed that the follower is capable of driving atleaderSpeed
- Speed; the speed of the follower at the current timeheadway
- Length; the net headway (distance between the front of the follower to the rear of the leader)
at the current time, or the maximum distance we can cover at the current time, e.g. as the result of a lane
dropspeedLimit
- Speed; the local speed limitstepSize
- given step size, which can be longer or shorter than the provided step size in the algorithms.public final org.djunits.value.vdouble.scalar.Acceleration getMaximumSafeDeceleration()
getMaximumSafeDeceleration
in interface GTUFollowingModelOld
public final org.djunits.value.vdouble.scalar.Duration getStepSize()
getStepSize
in interface GTUFollowingModelOld
public final String getName()
getName
in interface CarFollowingModel
getName
in interface GTUFollowingModelOld
public final String getLongName()
getLongName
in interface CarFollowingModel
getLongName
in interface GTUFollowingModelOld
public final org.djunits.value.vdouble.scalar.Speed desiredSpeed(org.opentrafficsim.core.gtu.behavioralcharacteristics.BehavioralCharacteristics behavioralCharacteristics, SpeedLimitInfo speedInfo) throws org.opentrafficsim.core.gtu.behavioralcharacteristics.ParameterException
desiredSpeed
in interface CarFollowingModel
behavioralCharacteristics
- behavioral characteristicsspeedInfo
- info regarding the desired speed for car-followingorg.opentrafficsim.core.gtu.behavioralcharacteristics.ParameterException
- if parameter exception occurspublic final org.djunits.value.vdouble.scalar.Length desiredHeadway(org.opentrafficsim.core.gtu.behavioralcharacteristics.BehavioralCharacteristics behavioralCharacteristics, org.djunits.value.vdouble.scalar.Speed speed) throws org.opentrafficsim.core.gtu.behavioralcharacteristics.ParameterException
desiredHeadway
in interface CarFollowingModel
behavioralCharacteristics
- behavioral characteristicsspeed
- speed to determine the desired headway atorg.opentrafficsim.core.gtu.behavioralcharacteristics.ParameterException
- if parameter exception occurspublic final org.djunits.value.vdouble.scalar.Acceleration followingAcceleration(org.opentrafficsim.core.gtu.behavioralcharacteristics.BehavioralCharacteristics behavioralCharacteristics, org.djunits.value.vdouble.scalar.Speed speed, SpeedLimitInfo speedInfo, SortedMap<org.djunits.value.vdouble.scalar.Length,org.djunits.value.vdouble.scalar.Speed> leaders) throws org.opentrafficsim.core.gtu.behavioralcharacteristics.ParameterException
followingAcceleration
in interface CarFollowingModel
behavioralCharacteristics
- behavioral characteristicsspeed
- current speedspeedInfo
- info regarding the desired speed for car-followingleaders
- set of leader headways and speeds, ordered by headway (closest first)org.opentrafficsim.core.gtu.behavioralcharacteristics.ParameterException
- if parameter exception occursCopyright © 2014–2016 Delft University of Technology. All rights reserved.