public final class CarFollowingUtil extends Object
Copyright (c) 2013-2017 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
Modifier and Type | Method and Description |
---|---|
static org.djunits.value.vdouble.scalar.Acceleration |
approachTargetSpeed(CarFollowingModel carFollowingModel,
org.opentrafficsim.core.gtu.behavioralcharacteristics.BehavioralCharacteristics behavioralCharacteristics,
org.djunits.value.vdouble.scalar.Speed speed,
SpeedLimitInfo speedLimitInfo,
org.djunits.value.vdouble.scalar.Length distance,
org.djunits.value.vdouble.scalar.Speed targetSpeed)
Returns an acceleration based on the car-following model in order to adjust the speed to a given value at some location
ahead.
|
static org.djunits.value.vdouble.scalar.Acceleration |
constantAccelerationStop(CarFollowingModel carFollowingModel,
org.opentrafficsim.core.gtu.behavioralcharacteristics.BehavioralCharacteristics behavioralCharacteristics,
org.djunits.value.vdouble.scalar.Speed speed,
org.djunits.value.vdouble.scalar.Length distance)
Return constant acceleration in order to stop in specified distance.
|
static org.djunits.value.vdouble.scalar.Acceleration |
followLeaders(CarFollowingModel carFollowingModel,
org.opentrafficsim.core.gtu.behavioralcharacteristics.BehavioralCharacteristics behavioralCharacteristics,
org.djunits.value.vdouble.scalar.Speed speed,
SpeedLimitInfo speedLimitInfo,
SortedSet<HeadwayGTU> leaders)
Follow a set of headway GTUs.
|
static org.djunits.value.vdouble.scalar.Acceleration |
followSingleLeader(CarFollowingModel carFollowingModel,
org.opentrafficsim.core.gtu.behavioralcharacteristics.BehavioralCharacteristics behavioralCharacteristics,
org.djunits.value.vdouble.scalar.Speed speed,
SpeedLimitInfo speedLimitInfo,
org.djunits.value.vdouble.scalar.Length distance,
org.djunits.value.vdouble.scalar.Speed leaderSpeed)
Follow a set of headway GTUs.
|
static org.djunits.value.vdouble.scalar.Acceleration |
freeAcceleration(CarFollowingModel carFollowingModel,
org.opentrafficsim.core.gtu.behavioralcharacteristics.BehavioralCharacteristics behavioralCharacteristics,
org.djunits.value.vdouble.scalar.Speed speed,
SpeedLimitInfo speedLimitInfo)
Calculate free acceleration.
|
static org.djunits.value.vdouble.scalar.Acceleration |
stop(CarFollowingModel carFollowingModel,
org.opentrafficsim.core.gtu.behavioralcharacteristics.BehavioralCharacteristics behavioralCharacteristics,
org.djunits.value.vdouble.scalar.Speed speed,
SpeedLimitInfo speedLimitInfo,
org.djunits.value.vdouble.scalar.Length distance)
Stop within given distance.
|
public static org.djunits.value.vdouble.scalar.Acceleration followLeaders(CarFollowingModel carFollowingModel, org.opentrafficsim.core.gtu.behavioralcharacteristics.BehavioralCharacteristics behavioralCharacteristics, org.djunits.value.vdouble.scalar.Speed speed, SpeedLimitInfo speedLimitInfo, SortedSet<HeadwayGTU> leaders) throws org.opentrafficsim.core.gtu.behavioralcharacteristics.ParameterException
carFollowingModel
- car-following modelbehavioralCharacteristics
- behavioral characteristicsspeed
- current speedspeedLimitInfo
- speed limit infoleaders
- leadersorg.opentrafficsim.core.gtu.behavioralcharacteristics.ParameterException
- if a parameter is not given or out of boundspublic static org.djunits.value.vdouble.scalar.Acceleration followSingleLeader(CarFollowingModel carFollowingModel, org.opentrafficsim.core.gtu.behavioralcharacteristics.BehavioralCharacteristics behavioralCharacteristics, org.djunits.value.vdouble.scalar.Speed speed, SpeedLimitInfo speedLimitInfo, org.djunits.value.vdouble.scalar.Length distance, org.djunits.value.vdouble.scalar.Speed leaderSpeed) throws org.opentrafficsim.core.gtu.behavioralcharacteristics.ParameterException
carFollowingModel
- car-following modelbehavioralCharacteristics
- behavioral characteristicsspeed
- current speedspeedLimitInfo
- speed limit infodistance
- distanceleaderSpeed
- speed of the leaderorg.opentrafficsim.core.gtu.behavioralcharacteristics.ParameterException
- if a parameter is not given or out of boundspublic static org.djunits.value.vdouble.scalar.Acceleration stop(CarFollowingModel carFollowingModel, org.opentrafficsim.core.gtu.behavioralcharacteristics.BehavioralCharacteristics behavioralCharacteristics, org.djunits.value.vdouble.scalar.Speed speed, SpeedLimitInfo speedLimitInfo, org.djunits.value.vdouble.scalar.Length distance) throws org.opentrafficsim.core.gtu.behavioralcharacteristics.ParameterException
carFollowingModel
- car-following modelbehavioralCharacteristics
- behavioral characteristicsspeed
- current speedspeedLimitInfo
- speed limit infodistance
- distance to stop overorg.opentrafficsim.core.gtu.behavioralcharacteristics.ParameterException
- if a parameter is not given or out of boundspublic static org.djunits.value.vdouble.scalar.Acceleration constantAccelerationStop(CarFollowingModel carFollowingModel, org.opentrafficsim.core.gtu.behavioralcharacteristics.BehavioralCharacteristics behavioralCharacteristics, org.djunits.value.vdouble.scalar.Speed speed, org.djunits.value.vdouble.scalar.Length distance) throws org.opentrafficsim.core.gtu.behavioralcharacteristics.ParameterException
carFollowingModel
- car-following modelbehavioralCharacteristics
- behavioral characteristicsspeed
- current speeddistance
- distance to stop overorg.opentrafficsim.core.gtu.behavioralcharacteristics.ParameterException
- on missing parameterpublic static org.djunits.value.vdouble.scalar.Acceleration freeAcceleration(CarFollowingModel carFollowingModel, org.opentrafficsim.core.gtu.behavioralcharacteristics.BehavioralCharacteristics behavioralCharacteristics, org.djunits.value.vdouble.scalar.Speed speed, SpeedLimitInfo speedLimitInfo) throws org.opentrafficsim.core.gtu.behavioralcharacteristics.ParameterException
carFollowingModel
- car-following modelbehavioralCharacteristics
- behavioral characteristicsspeed
- current speedspeedLimitInfo
- speed limit infoorg.opentrafficsim.core.gtu.behavioralcharacteristics.ParameterException
- if a parameter is not given or out of boundspublic static org.djunits.value.vdouble.scalar.Acceleration approachTargetSpeed(CarFollowingModel carFollowingModel, org.opentrafficsim.core.gtu.behavioralcharacteristics.BehavioralCharacteristics behavioralCharacteristics, org.djunits.value.vdouble.scalar.Speed speed, SpeedLimitInfo speedLimitInfo, org.djunits.value.vdouble.scalar.Length distance, org.djunits.value.vdouble.scalar.Speed targetSpeed) throws org.opentrafficsim.core.gtu.behavioralcharacteristics.ParameterException
___ location of target speed --)| ___ |___|(--------------s--------------) (--h--)|___| ))) vTarHere,
s
is the distance to the target speed, and h
is the desired headway if the vehicle would drive at
the target speed vTar
.vTar
at all. Because of this underestimation, strong deceleration is required
later. This behavior is not in line with the sensitivity parameters of the car-following model.vTar'
should be lower. We require:
v = vTar
then vTar' = vTar
, otherwise there is an incentive to accelerate or decelerate for no
good reasonvTar ~ 0
then vTar' ~ 0
, as car-following models are suitable for stopping and need no additional
incentive to decelerate in such cases0 < vTar < v
then vTar' < vTar
, introducing additional deceleration to compensate for the fact
that the virtual vehicle does not move
vTar' = vTar * (vTar/v) = vTar^2/v
.v < vTar
we get vTar' > vTar
leading to additional acceleration. Acceleration is then
appropriate, and possibly limited by a free term in the car-following model.vTar'
at a distance s + h'
where h'
is the desired
headway if the vehicle would drive at speed vTar'
. Both vTar'
and h'
depend on the current speed
of the vehicle, so the virtual vehicle in this case actually moves, but not with vTar
.carFollowingModel
- car-following model to usebehavioralCharacteristics
- behavioral characteristicsspeed
- current speedspeedLimitInfo
- info regarding the desired speed for car-followingdistance
- distance to the location of the target speedtargetSpeed
- target speedorg.opentrafficsim.core.gtu.behavioralcharacteristics.ParameterException
- if parameter exception occursNullPointerException
- if any input is nullIllegalArgumentException
- if the distance or target speed is not at least 0Copyright © 2014–2017 Delft University of Technology. All rights reserved.