Interface Tailgating
public interface Tailgating
Interface for LMRS tailgating behavior.
Copyright (c) 2013-2026 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 ParameterTypeBooleanParameter to deviate laterally for social pressure.static final TailgatingNo tailgating.static final TailgatingTailgating based on speed pressure.static final ParameterTypeDoubleSocial pressure applied to the leader.static final TailgatingNo tailgating, but social pressure exists. -
Method Summary
Modifier and TypeMethodDescriptionstatic voiddeviate(TacticalContextEgo context, double rho) Add lateral deviation intent based on level of social pressure.static doublesocialPressure(org.djunits.value.vdouble.scalar.Speed desiredSpeed, org.djunits.value.vdouble.scalar.Speed leaderSpeed, org.djunits.value.vdouble.scalar.Speed vGain, org.djunits.value.vdouble.scalar.Length headway, org.djunits.value.vdouble.scalar.Length x0) Returns a normalized social pressure, equal to (vDesired - vLead) / vGain.voidtailgate(TacticalContextEgo context) Apply tailgating.
-
Field Details
-
RHO
Social pressure applied to the leader. -
DEV_RHO
Parameter to deviate laterally for social pressure. -
NONE
No tailgating. -
RHO_ONLY
No tailgating, but social pressure exists. -
PRESSURE
Tailgating based on speed pressure.
-
-
Method Details
-
tailgate
Apply tailgating.- Parameters:
context- tactical information such as parameters and car-following model
-
deviate
Add lateral deviation intent based on level of social pressure.- Parameters:
context- tactical information such as parameters and car-following modelrho- level of social pressure- Throws:
ParameterException- when the deviation parameter is not present
socialPressure
desiredSpeed- desired speedleaderSpeed- leader speedvGain- vGain parameterheadway- headway to the leaderx0- anticipation distance