Interface Synchronization
- All Superinterfaces:
LmrsParameters
Different forms of synchronization.
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, Peter Knoppers, Wouter Schakel
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final SynchronizationSynchronization where a suitable leader is actively targeted, in relation to infrastructure.static final SynchronizationSynchronization by following the adjacent leader or aligning with the middle of the gap, whichever allows the largest acceleration.static final SynchronizationSynchronization that only includes stopping for a dead-end.static final SynchronizationSynchronization where current leaders are taken.static final SynchronizationSynchronization where current leaders are taken. -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancanBeAhead(HeadwayGtu adjacentVehicle, org.djunits.value.vdouble.scalar.Length xCur, int nCur, org.djunits.value.vdouble.scalar.Speed ownSpeed, org.djunits.value.vdouble.scalar.Length ownLength, org.djunits.value.vdouble.scalar.Speed tagSpeed, double dCoop, org.djunits.value.vdouble.scalar.Acceleration b, org.djunits.value.vdouble.scalar.Duration tMin, org.djunits.value.vdouble.scalar.Duration tMax, org.djunits.value.vdouble.scalar.Length x0, org.djunits.value.vdouble.scalar.Duration t0, org.djunits.value.vdouble.scalar.Duration lc, double desire) Returns whether a driver estimates it can be ahead of an adjacent vehicle for merging.static org.djunits.value.vdouble.scalar.AccelerationgentleUrgency(org.djunits.value.vdouble.scalar.Acceleration a, double desire, org.opentrafficsim.base.parameters.Parameters params) Return limited deceleration.static HeadwayGtugetFollower(HeadwayGtu gtu, PerceptionCollectable<HeadwayGtu, LaneBasedGtu> leaders, HeadwayGtu follower, org.djunits.value.vdouble.scalar.Length ownLength) Returns the upstream gtu of the given gtu.static org.djunits.value.vdouble.scalar.LengthgetMergeDistance(LanePerception perception, LateralDirectionality lat) Returns the distance to the next merge, stopping within this distance is futile for a lane change.static HeadwayGtugetTargetLeader(HeadwayGtu gtu, SortedSet<HeadwayGtu> leaders) Returns the leader of one gtu from a set.static org.djunits.value.vdouble.scalar.LengthheadwayWithLcSpace(Headway headway, org.opentrafficsim.base.parameters.Parameters parameters, LaneChange laneChange) Returns a headway (length) to allow space to perform a lane change at low speeds.static org.djunits.value.vdouble.scalar.LengthrequiredBufferSpace(org.djunits.value.vdouble.scalar.Speed speed, int nCur, org.djunits.value.vdouble.scalar.Length x0, org.djunits.value.vdouble.scalar.Duration t0, org.djunits.value.vdouble.scalar.Duration lc, double dCoop) Returns the required buffer space to perform a lane change and further lane changes.static org.djunits.value.vdouble.scalar.AccelerationstopForEnd(org.djunits.value.vdouble.scalar.Length xCur, org.djunits.value.vdouble.scalar.Length xMerge, org.opentrafficsim.base.parameters.Parameters params, org.djunits.value.vdouble.scalar.Speed ownSpeed, CarFollowingModel cfm, SpeedLimitInfo sli) Calculates acceleration to stop for a split or dead-end, accounting for infrastructure.org.djunits.value.vdouble.scalar.Accelerationsynchronize(LanePerception perception, org.opentrafficsim.base.parameters.Parameters params, SpeedLimitInfo sli, CarFollowingModel cfm, double desire, LateralDirectionality lat, LmrsData lmrsData, LaneChange laneChange, LateralDirectionality initiatedLaneChange) Determine acceleration for synchronization.static org.djunits.value.vdouble.scalar.AccelerationtagAlongAcceleration(HeadwayGtu leader, org.djunits.value.vdouble.scalar.Speed followerSpeed, org.djunits.value.vdouble.scalar.Length followerLength, org.djunits.value.vdouble.scalar.Speed tagSpeed, double desire, org.opentrafficsim.base.parameters.Parameters params, SpeedLimitInfo sli, CarFollowingModel cfm) Calculates acceleration by following an adjacent vehicle, with tagging along if desire is not very high and speed is low.
-
Field Details
-
DEADEND
Synchronization that only includes stopping for a dead-end. -
PASSIVE
Synchronization where current leaders are taken. -
ALIGN_GAP
Synchronization by following the adjacent leader or aligning with the middle of the gap, whichever allows the largest acceleration. Note that aligning with the middle of the gap then means the gap is too small, as following would cause lower acceleration. Aligning with the middle of the gap will however provide a better starting point for the rest of the process. Mainly, the adjacent follower can decelerate less, allowing more smooth merging. -
PASSIVE_MOVING
Synchronization where current leaders are taken. Synchronization is disabled for d_sync<d<d_coop at low speeds. -
ACTIVE
Synchronization where a suitable leader is actively targeted, in relation to infrastructure.
-
-
Method Details
-
getMergeDistance
static org.djunits.value.vdouble.scalar.Length getMergeDistance(LanePerception perception, LateralDirectionality lat) throws OperationalPlanException Returns the distance to the next merge, stopping within this distance is futile for a lane change.- Parameters:
perception- LanePerception; perceptionlat- LateralDirectionality; lateral direction- Returns:
- Length; distance to the next merge
- Throws:
OperationalPlanException- if there is no infrastructure perception
-
synchronize
org.djunits.value.vdouble.scalar.Acceleration synchronize(LanePerception perception, org.opentrafficsim.base.parameters.Parameters params, SpeedLimitInfo sli, CarFollowingModel cfm, double desire, LateralDirectionality lat, LmrsData lmrsData, LaneChange laneChange, LateralDirectionality initiatedLaneChange) throws org.opentrafficsim.base.parameters.ParameterException, OperationalPlanException Determine acceleration for synchronization.- Parameters:
perception- LanePerception; perceptionparams- Parameters; parameterssli- SpeedLimitInfo; speed limit infocfm- CarFollowingModel; car-following modeldesire- double; level of lane change desirelat- LateralDirectionality; lateral direction for synchronizationlmrsData- LmrsData; LMRS datalaneChange- LaneChange; lane changeinitiatedLaneChange- LateralDirectionality; lateral direction of initiated lane change- Returns:
- acceleration for synchronization
- Throws:
org.opentrafficsim.base.parameters.ParameterException- if a parameter is not definedOperationalPlanException- perception exception
-
headwayWithLcSpace
static org.djunits.value.vdouble.scalar.Length headwayWithLcSpace(Headway headway, org.opentrafficsim.base.parameters.Parameters parameters, LaneChange laneChange) throws org.opentrafficsim.base.parameters.ParameterException Returns a headway (length) to allow space to perform a lane change at low speeds.- Parameters:
headway- Headway; headwayparameters- Parameters; parameterslaneChange- LaneChange; lane change- Returns:
- Length; distance to allow space to perform a lane change at low speeds
- Throws:
org.opentrafficsim.base.parameters.ParameterException- if parameter VCONG is not available
-
gentleUrgency
static org.djunits.value.vdouble.scalar.Acceleration gentleUrgency(org.djunits.value.vdouble.scalar.Acceleration a, double desire, org.opentrafficsim.base.parameters.Parameters params) throws org.opentrafficsim.base.parameters.ParameterException Return limited deceleration. Deceleration is limited tobford < dCoop. BeyonddCoopthe limit is a linear interpolation betweenbandbCrit.- Parameters:
a- Acceleration; acceleration to limitdesire- double; lane change desireparams- Parameters; parameters- Returns:
- limited deceleration
- Throws:
org.opentrafficsim.base.parameters.ParameterException- when parameter is no available or value out of range
-
getFollower
static HeadwayGtu getFollower(HeadwayGtu gtu, PerceptionCollectable<HeadwayGtu, LaneBasedGtu> leaders, HeadwayGtu follower, org.djunits.value.vdouble.scalar.Length ownLength) Returns the upstream gtu of the given gtu.- Parameters:
gtu- HeadwayGtu; gtuleaders- PerceptionCollectable<HeadwayGtu,LaneBasedGtu>; leaders of own vehiclefollower- HeadwayGtu; following vehicle of own vehicleownLength- Length; own vehicle length- Returns:
- upstream gtu of the given gtu
-
tagAlongAcceleration
static org.djunits.value.vdouble.scalar.Acceleration tagAlongAcceleration(HeadwayGtu leader, org.djunits.value.vdouble.scalar.Speed followerSpeed, org.djunits.value.vdouble.scalar.Length followerLength, org.djunits.value.vdouble.scalar.Speed tagSpeed, double desire, org.opentrafficsim.base.parameters.Parameters params, SpeedLimitInfo sli, CarFollowingModel cfm) throws org.opentrafficsim.base.parameters.ParameterException Calculates acceleration by following an adjacent vehicle, with tagging along if desire is not very high and speed is low.- Parameters:
leader- HeadwayGtu; leaderfollowerSpeed- Speed; follower speedfollowerLength- Length; follower lengthtagSpeed- Speed; maximum tag along speeddesire- double; lane change desireparams- Parameters; parameterssli- SpeedLimitInfo; speed limit infocfm- CarFollowingModel; car-following model- Returns:
- acceleration by following an adjacent vehicle including tagging along
- Throws:
org.opentrafficsim.base.parameters.ParameterException- if a parameter is not present
-
canBeAhead
static boolean canBeAhead(HeadwayGtu adjacentVehicle, org.djunits.value.vdouble.scalar.Length xCur, int nCur, org.djunits.value.vdouble.scalar.Speed ownSpeed, org.djunits.value.vdouble.scalar.Length ownLength, org.djunits.value.vdouble.scalar.Speed tagSpeed, double dCoop, org.djunits.value.vdouble.scalar.Acceleration b, org.djunits.value.vdouble.scalar.Duration tMin, org.djunits.value.vdouble.scalar.Duration tMax, org.djunits.value.vdouble.scalar.Length x0, org.djunits.value.vdouble.scalar.Duration t0, org.djunits.value.vdouble.scalar.Duration lc, double desire) throws org.opentrafficsim.base.parameters.ParameterException Returns whether a driver estimates it can be ahead of an adjacent vehicle for merging.- Parameters:
adjacentVehicle- HeadwayGtu; adjacent vehiclexCur- Length; remaining distancenCur- int; number of lane changes to performownSpeed- Speed; own speedownLength- Length; own lengthtagSpeed- Speed; maximum tag along speeddCoop- double; cooperation thresholdb- Acceleration; critical decelerationtMin- Duration; minimum headwaytMax- Duration; normal headwayx0- Length; anticipation distancet0- Duration; anticipation timelc- Duration; lane change durationdesire- double; lane change desire- Returns:
- whether a driver estimates it can be ahead of an adjacent vehicle for merging
- Throws:
org.opentrafficsim.base.parameters.ParameterException- if parameter is not defined
-
requiredBufferSpace
static org.djunits.value.vdouble.scalar.Length requiredBufferSpace(org.djunits.value.vdouble.scalar.Speed speed, int nCur, org.djunits.value.vdouble.scalar.Length x0, org.djunits.value.vdouble.scalar.Duration t0, org.djunits.value.vdouble.scalar.Duration lc, double dCoop) Returns the required buffer space to perform a lane change and further lane changes.- Parameters:
speed- Speed; representative speednCur- int; number of required lane changesx0- Length; anticipation distancet0- Duration; anticipation timelc- Duration; lane change durationdCoop- double; cooperation threshold- Returns:
- required buffer space to perform a lane change and further lane changes
-
stopForEnd
static org.djunits.value.vdouble.scalar.Acceleration stopForEnd(org.djunits.value.vdouble.scalar.Length xCur, org.djunits.value.vdouble.scalar.Length xMerge, org.opentrafficsim.base.parameters.Parameters params, org.djunits.value.vdouble.scalar.Speed ownSpeed, CarFollowingModel cfm, SpeedLimitInfo sli) throws org.opentrafficsim.base.parameters.ParameterException Calculates acceleration to stop for a split or dead-end, accounting for infrastructure.- Parameters:
xCur- Length; remaining distance to endxMerge- Length; distance until merge pointparams- Parameters; parametersownSpeed- Speed; own speedcfm- CarFollowingModel; car-following modelsli- SpeedLimitInfo; speed limit info- Returns:
- acceleration to stop for a split or dead-end, accounting for infrastructure
- Throws:
org.opentrafficsim.base.parameters.ParameterException- if parameter is not defined
-
getTargetLeader
Returns the leader of one gtu from a set.- Parameters:
gtu- HeadwayGtu; gtuleaders- SortedSet<HeadwayGtu>; leaders- Returns:
- leader of one gtu from a set
-