Interface GapAcceptance


public interface GapAcceptance
Interface for LMRS gap-acceptance models.

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

    Fields
    Modifier and Type
    Field
    Description
    static final GapAcceptance
    Being informed of the model and parameters of other drivers, but applying own headway value.
    static final GapAcceptance
    Being informed of the model and parameters of other drivers (default LMRS).
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    acceptGap(LanePerception perception, org.opentrafficsim.base.parameters.Parameters params, SpeedLimitInfo sli, CarFollowingModel cfm, double desire, org.djunits.value.vdouble.scalar.Speed ownSpeed, org.djunits.value.vdouble.scalar.Acceleration ownAcceleration, LateralDirectionality lat)
    Determine whether a gap is acceptable.
    static org.djunits.value.vdouble.scalar.Acceleration
    egoAcceleration(LanePerception perception, org.opentrafficsim.base.parameters.Parameters params, SpeedLimitInfo sli, CarFollowingModel cfm, double desire, org.djunits.value.vdouble.scalar.Speed ownSpeed, LateralDirectionality lat)
    Determine whether a gap is acceptable.
  • Field Details

    • INFORMED

      static final GapAcceptance INFORMED
      Being informed of the model and parameters of other drivers (default LMRS).
    • EGO_HEADWAY

      static final GapAcceptance EGO_HEADWAY
      Being informed of the model and parameters of other drivers, but applying own headway value.
  • Method Details

    • egoAcceleration

      static org.djunits.value.vdouble.scalar.Acceleration egoAcceleration(LanePerception perception, org.opentrafficsim.base.parameters.Parameters params, SpeedLimitInfo sli, CarFollowingModel cfm, double desire, org.djunits.value.vdouble.scalar.Speed ownSpeed, LateralDirectionality lat) throws org.opentrafficsim.base.parameters.ParameterException, OperationalPlanException
      Determine whether a gap is acceptable.
      Parameters:
      perception - LanePerception; perception
      params - Parameters; parameters
      sli - SpeedLimitInfo; speed limit info
      cfm - CarFollowingModel; car-following model
      desire - double; level of lane change desire
      ownSpeed - Speed; own speed
      lat - LateralDirectionality; lateral direction for synchronization
      Returns:
      whether a gap is acceptable
      Throws:
      org.opentrafficsim.base.parameters.ParameterException - if a parameter is not defined
      OperationalPlanException - perception exception
    • acceptGap

      boolean acceptGap(LanePerception perception, org.opentrafficsim.base.parameters.Parameters params, SpeedLimitInfo sli, CarFollowingModel cfm, double desire, org.djunits.value.vdouble.scalar.Speed ownSpeed, org.djunits.value.vdouble.scalar.Acceleration ownAcceleration, LateralDirectionality lat) throws org.opentrafficsim.base.parameters.ParameterException, OperationalPlanException
      Determine whether a gap is acceptable.
      Parameters:
      perception - LanePerception; perception
      params - Parameters; parameters
      sli - SpeedLimitInfo; speed limit info
      cfm - CarFollowingModel; car-following model
      desire - double; level of lane change desire
      ownSpeed - Speed; own speed
      ownAcceleration - Acceleration; current car-following acceleration
      lat - LateralDirectionality; lateral direction for synchronization
      Returns:
      whether a gap is acceptable
      Throws:
      org.opentrafficsim.base.parameters.ParameterException - if a parameter is not defined
      OperationalPlanException - perception exception