public abstract class AbstractCarFollowingModel extends Object implements CarFollowingModel
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.
CAR_FOLLOWING_MODEL
Constructor and Description |
---|
AbstractCarFollowingModel(DesiredHeadwayModel desiredHeadwayModel,
DesiredSpeedModel desiredSpeedModel) |
Modifier and Type | Method and Description |
---|---|
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.
|
protected abstract Acceleration |
followingAcceleration(Parameters parameters,
Speed speed,
Speed desiredSpeed,
Length desiredHeadway,
PerceptionIterable<? extends Headway> leaders)
Determination of car-following acceleration, possibly based on multiple leaders.
|
Acceleration |
followingAcceleration(Parameters parameters,
Speed speed,
SpeedLimitInfo speedLimitInfo,
PerceptionIterable<? extends Headway> leaders)
Determination of car-following acceleration, possibly based on multiple leaders.
|
void |
init(LaneBasedGTU gtu)
Initialize car-following model.
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getLongName, getName
public AbstractCarFollowingModel(DesiredHeadwayModel desiredHeadwayModel, DesiredSpeedModel desiredSpeedModel)
desiredHeadwayModel
- DesiredHeadwayModel; desired headway modeldesiredSpeedModel
- DesiredSpeedModel; desired speed modelpublic final Length desiredHeadway(Parameters parameters, Speed speed) throws ParameterException
desiredHeadway
in interface DesiredHeadwayModel
parameters
- Parameters; parametersspeed
- Speed; speed to determine the desired headway atParameterException
- if parameter exception occurspublic final Speed desiredSpeed(Parameters parameters, SpeedLimitInfo speedInfo) throws ParameterException
desiredSpeed
in interface DesiredSpeedModel
parameters
- Parameters; parametersspeedInfo
- SpeedLimitInfo; info regarding the desired speed for car-followingParameterException
- if parameter exception occurspublic final Acceleration followingAcceleration(Parameters parameters, Speed speed, SpeedLimitInfo speedLimitInfo, PerceptionIterable<? extends Headway> leaders) throws ParameterException
followingAcceleration
in interface CarFollowingModel
parameters
- Parameters; parametersspeed
- Speed; current speedspeedLimitInfo
- 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 occursprotected abstract Acceleration followingAcceleration(Parameters parameters, Speed speed, Speed desiredSpeed, Length desiredHeadway, PerceptionIterable<? extends Headway> leaders) throws ParameterException
parameters
- Parameters; parametersspeed
- Speed; current speeddesiredSpeed
- Speed; desired speeddesiredHeadway
- Length; desired headwayleaders
- PerceptionIterable<? extends Headway>; set of leader headways (guaranteed positive) and speeds,
ordered by headway (closest first)ParameterException
- if parameter exception occurspublic final void init(LaneBasedGTU gtu)
init
in interface CarFollowingModel
init
in interface Initialisable
gtu
- LaneBasedGTU; gtuCopyright © 2014–2019 Delft University of Technology. All rights reserved.