public class SequentialFixedAccelerationModel extends AbstractGTUFollowingModelMobil implements Serializable
Copyright (c) 2013-2019 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
TOODANGEROUSCAR_FOLLOWING_MODEL| Constructor and Description |
|---|
SequentialFixedAccelerationModel(DEVSSimulatorInterface.TimeDoubleUnit simulator,
Acceleration maximumSafeDeceleration)
Construct a SequentialFixedAccelerationModel with empty list of FixedAccelerationModel steps.
|
SequentialFixedAccelerationModel(DEVSSimulatorInterface.TimeDoubleUnit simulator,
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.
|
Acceleration |
computeAcceleration(Speed followerSpeed,
Speed followerMaximumSpeed,
Speed leaderSpeed,
Length headway,
Speed speedLimit)
Compute the acceleration that would be used to follow a leader.
|
Acceleration |
computeAcceleration(Speed followerSpeed,
Speed followerMaximumSpeed,
Speed leaderSpeed,
Length headway,
Speed speedLimit,
Duration stepSize)
Compute the acceleration that would be used to follow a leader.
|
Length |
desiredHeadway(Parameters parameters,
Speed speed)
Determines the desired headway in equilibrium conditions, i.e.
|
Speed |
desiredSpeed(Parameters parameters,
SpeedLimitInfo speedInfo)
Determines the desired speed.
|
Acceleration |
followingAcceleration(Parameters parameters,
Speed speed,
SpeedLimitInfo speedInfo,
PerceptionIterable<? extends Headway> leaders)
Determination of car-following acceleration, possibly based on multiple leaders.
|
FixedAccelerationModel |
get(int index)
Retrieve one FixedAccelerationModel step.
|
String |
getLongName()
Return the complete name of the car-following model.
|
Acceleration |
getMaximumSafeDeceleration()
Return the maximum safe deceleration for use in gap acceptance models.
|
String |
getName()
Return the name of the car-following model.
|
Duration |
getStepSize()
Return the standard step size of this GTU following model.
|
void |
setA(Acceleration a)
Set value of acceleration parameter.
|
void |
setFspeed(double fSpeed)
Set value of desired speed factor.
|
void |
setT(Duration t)
Set value of desired headway.
|
int |
size()
Retrieve the number of FixedAccelerationModel steps in this SequentialFixedAccelerationModel.
|
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, minimumHeadwayclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitinitpublic SequentialFixedAccelerationModel(DEVSSimulatorInterface.TimeDoubleUnit simulator, Acceleration maximumSafeDeceleration)
simulator - DEVSSimulatorInterface.TimeDoubleUnit; the simulator (needed to obtain the current simulation time)maximumSafeDeceleration - Acceleration; specified maximum safe decelerationpublic SequentialFixedAccelerationModel(DEVSSimulatorInterface.TimeDoubleUnit simulator, Acceleration maximumSafeDeceleration, Set<FixedAccelerationModel> steps)
simulator - DEVSSimulatorInterface.TimeDoubleUnit; the simulator (needed to obtain the current simulation time)maximumSafeDeceleration - Acceleration; 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 Time timeAfterCompletionOfStep(int index)
index - int; the steppublic final Acceleration computeAcceleration(Speed followerSpeed, Speed followerMaximumSpeed, Speed leaderSpeed, Length headway, Speed speedLimit)
computeAcceleration in interface GTUFollowingModelOldfollowerSpeed - 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 Acceleration computeAcceleration(Speed followerSpeed, Speed followerMaximumSpeed, Speed leaderSpeed, Length headway, Speed speedLimit, Duration stepSize)
computeAcceleration in interface GTUFollowingModelOldfollowerSpeed - 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 - Duration; given step size, which can be longer or shorter than the provided step size in the algorithms.public final Acceleration getMaximumSafeDeceleration()
getMaximumSafeDeceleration in interface GTUFollowingModelOldpublic final Duration getStepSize()
getStepSize in interface GTUFollowingModelOldpublic final String getName()
getName in interface CarFollowingModelpublic final String getLongName()
getLongName in interface CarFollowingModelpublic final void setA(Acceleration a)
setA in interface GTUFollowingModelOlda - Acceleration; value to setpublic final void setT(Duration t)
setT in interface GTUFollowingModelOldt - Duration; desired headwaypublic final void setFspeed(double fSpeed)
setFspeed in interface GTUFollowingModelOldfSpeed - double; desired speed factorpublic final Speed desiredSpeed(Parameters parameters, SpeedLimitInfo speedInfo) throws ParameterException
desiredSpeed in interface DesiredSpeedModelparameters - Parameters; parametersspeedInfo - SpeedLimitInfo; info regarding the desired speed for car-followingParameterException - if parameter exception occurspublic final Length desiredHeadway(Parameters parameters, Speed speed) throws ParameterException
desiredHeadway in interface DesiredHeadwayModelparameters - Parameters; parametersspeed - Speed; speed to determine the desired headway atParameterException - if parameter exception occurspublic final Acceleration followingAcceleration(Parameters parameters, Speed speed, SpeedLimitInfo speedInfo, PerceptionIterable<? extends Headway> leaders) throws ParameterException
followingAcceleration in interface CarFollowingModelparameters - Parameters; parametersspeed - Speed; current speedspeedInfo - SpeedLimitInfo; info regarding the desired speed for car-followingleaders - PerceptionIterable<? extends Headway>; set of leader headways and speeds, ordered by headway
(closest first)ParameterException - if parameter exception occursCopyright © 2014–2019 Delft University of Technology. All rights reserved.