Interface CarFollowingModel
- All Superinterfaces:
DesiredHeadwayModel
,DesiredSpeedModel
,Initialisable
- All Known Subinterfaces:
GtuFollowingModelOld
- All Known Implementing Classes:
AbstractCarFollowingModel
,AbstractGtuFollowingModelMobil
,AbstractIdm
,FixedAccelerationModel
,Idm
,IdmOld
,IdmPlus
,IdmPlusMulti
,IdmPlusOld
,SequentialFixedAccelerationModel
,ToledoCarFollowing
Methods that a car-following model has to implement. The parameters are supplied to obtain parameters. The phrase
'car-following model' is the commonly used and therefore intuitive name, but in actuality it is much more.
- Following other vehicle types: van, bus, truck.
- Following other GTU's: bicycle, pedestrian.
- Free driving.
- Approaching (theoretically different from following, usually the same formula).
- Stopping for a traffic light, intersection conflict, etc,
Copyright (c) 2013-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
- Author:
- Alexander Verbraeck, Wouter Schakel
-
Field Summary
Modifier and TypeFieldDescriptionstatic final org.opentrafficsim.base.parameters.ParameterTypeClass<CarFollowingModel>
Parameter type for car-following model. -
Method Summary
Modifier and TypeMethodDescriptionorg.djunits.value.vdouble.scalar.Acceleration
followingAcceleration
(org.opentrafficsim.base.parameters.Parameters parameters, org.djunits.value.vdouble.scalar.Speed speed, SpeedLimitInfo speedLimitInfo, PerceptionIterable<? extends Headway> leaders) Determination of car-following acceleration, possibly based on multiple leaders.Return the complete name of the car-following model.getName()
Return the name of the car-following model.default void
init
(LaneBasedGtu gtu) Initialize car-following model.Methods inherited from interface org.opentrafficsim.road.gtu.lane.tactical.following.DesiredHeadwayModel
desiredHeadway
Methods inherited from interface org.opentrafficsim.road.gtu.lane.tactical.following.DesiredSpeedModel
desiredSpeed
-
Field Details
-
CAR_FOLLOWING_MODEL
static final org.opentrafficsim.base.parameters.ParameterTypeClass<CarFollowingModel> CAR_FOLLOWING_MODELParameter type for car-following model.
-
-
Method Details
-
followingAcceleration
org.djunits.value.vdouble.scalar.Acceleration followingAcceleration(org.opentrafficsim.base.parameters.Parameters parameters, org.djunits.value.vdouble.scalar.Speed speed, SpeedLimitInfo speedLimitInfo, PerceptionIterable<? extends Headway> leaders) throws org.opentrafficsim.base.parameters.ParameterException Determination of car-following acceleration, possibly based on multiple leaders. The implementation should be able to deal with:
- The current speed being higher than the desired speed.
- The headway being negative.
- Parameters:
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)- Returns:
- car-following acceleration
- Throws:
org.opentrafficsim.base.parameters.ParameterException
- if parameter exception occurs
-
getName
String getName()Return the name of the car-following model.- Returns:
- name of the car-following model
-
getLongName
String getLongName()Return the complete name of the car-following model.- Returns:
- complete name of the car-following model
-
init
Initialize car-following model.- Specified by:
init
in interfaceInitialisable
- Parameters:
gtu
- LaneBasedGtu; gtu
-