public final class CarFollowingUtil extends Object
Copyright (c) 2013-2018 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
Modifier and Type | Class and Description |
---|---|
static class |
CarFollowingUtil.CarFollowingHeadway
Simple headway implementation for minimum car-following information.
|
Modifier and Type | Method and Description |
---|---|
static Acceleration |
approachTargetSpeed(CarFollowingModel carFollowingModel,
Parameters parameters,
Speed speed,
SpeedLimitInfo speedLimitInfo,
Length distance,
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 Acceleration |
constantAccelerationStop(CarFollowingModel carFollowingModel,
Parameters parameters,
Speed speed,
Length distance)
Return constant acceleration in order to stop in specified distance.
|
static Acceleration |
followSingleLeader(CarFollowingModel carFollowingModel,
Parameters parameters,
Speed speed,
SpeedLimitInfo speedLimitInfo,
HeadwayGTU leader)
Follow a set of headway GTUs.
|
static Acceleration |
followSingleLeader(CarFollowingModel carFollowingModel,
Parameters parameters,
Speed speed,
SpeedLimitInfo speedLimitInfo,
Length distance,
Speed leaderSpeed)
Follow a set of headway GTUs.
|
static Acceleration |
freeAcceleration(CarFollowingModel carFollowingModel,
Parameters parameters,
Speed speed,
SpeedLimitInfo speedLimitInfo)
Calculate free acceleration.
|
static Acceleration |
stop(CarFollowingModel carFollowingModel,
Parameters parameters,
Speed speed,
SpeedLimitInfo speedLimitInfo,
Length distance)
Stop within given distance.
|
public static Acceleration followSingleLeader(CarFollowingModel carFollowingModel, Parameters parameters, Speed speed, SpeedLimitInfo speedLimitInfo, Length distance, Speed leaderSpeed) throws ParameterException
carFollowingModel
- car-following modelparameters
- parametersspeed
- current speedspeedLimitInfo
- speed limit infodistance
- distanceleaderSpeed
- speed of the leaderParameterException
- if a parameter is not given or out of boundspublic static Acceleration followSingleLeader(CarFollowingModel carFollowingModel, Parameters parameters, Speed speed, SpeedLimitInfo speedLimitInfo, HeadwayGTU leader) throws ParameterException
carFollowingModel
- car-following modelparameters
- parametersspeed
- current speedspeedLimitInfo
- speed limit infoleader
- leaderParameterException
- if a parameter is not given or out of boundspublic static Acceleration stop(CarFollowingModel carFollowingModel, Parameters parameters, Speed speed, SpeedLimitInfo speedLimitInfo, Length distance) throws ParameterException
carFollowingModel
- car-following modelparameters
- parametersspeed
- current speedspeedLimitInfo
- speed limit infodistance
- distance to stop overParameterException
- if a parameter is not given or out of boundspublic static Acceleration constantAccelerationStop(CarFollowingModel carFollowingModel, Parameters parameters, Speed speed, Length distance) throws ParameterException
carFollowingModel
- car-following modelparameters
- parametersspeed
- current speeddistance
- distance to stop overParameterException
- on missing parameterpublic static Acceleration freeAcceleration(CarFollowingModel carFollowingModel, Parameters parameters, Speed speed, SpeedLimitInfo speedLimitInfo) throws ParameterException
carFollowingModel
- car-following modelparameters
- parametersspeed
- current speedspeedLimitInfo
- speed limit infoParameterException
- if a parameter is not given or out of boundspublic static Acceleration approachTargetSpeed(CarFollowingModel carFollowingModel, Parameters parameters, Speed speed, SpeedLimitInfo speedLimitInfo, Length distance, Speed targetSpeed) throws 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 useparameters
- parametersspeed
- current speedspeedLimitInfo
- info regarding the desired speed for car-followingdistance
- distance to the location of the target speedtargetSpeed
- target speedParameterException
- if parameter exception occursNullPointerException
- if any input is nullIllegalArgumentException
- if the distance or target speed is not at least 0Copyright © 2014–2018 Delft University of Technology. All rights reserved.