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

    Fields
    Modifier and Type
    Field
    Description
    Parameter to deviate laterally for social pressure.
    static final Tailgating
    No tailgating.
    static final Tailgating
    Tailgating based on speed pressure.
    static final ParameterTypeDouble
    Social pressure applied to the leader.
    static final Tailgating
    No tailgating, but social pressure exists.
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    deviate(TacticalContextEgo context, double rho)
    Add lateral deviation intent based on level of social pressure.
    static double
    socialPressure(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.
    void
    Apply tailgating.
  • Field Details

    • RHO

      static final ParameterTypeDouble RHO
      Social pressure applied to the leader.
    • DEV_RHO

      static final ParameterTypeBoolean DEV_RHO
      Parameter to deviate laterally for social pressure.
    • NONE

      static final Tailgating NONE
      No tailgating.
    • RHO_ONLY

      static final Tailgating RHO_ONLY
      No tailgating, but social pressure exists.
    • PRESSURE

      static final Tailgating PRESSURE
      Tailgating based on speed pressure.
  • Method Details

    • socialPressure

      static double socialPressure(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.
      Parameters:
      desiredSpeed - desired speed
      leaderSpeed - leader speed
      vGain - vGain parameter
      headway - headway to the leader
      x0 - anticipation distance
      Returns:
      normalized social pressure
    • tailgate

      void tailgate(TacticalContextEgo context)
      Apply tailgating.
      Parameters:
      context - tactical information such as parameters and car-following model
    • deviate

      static void deviate(TacticalContextEgo context, double rho) throws ParameterException
      Add lateral deviation intent based on level of social pressure.
      Parameters:
      context - tactical information such as parameters and car-following model
      rho - level of social pressure
      Throws:
      ParameterException - when the deviation parameter is not present