Class AbstractLaneChangeModel

java.lang.Object
org.opentrafficsim.road.gtu.lane.tactical.lanechangemobil.AbstractLaneChangeModel
All Implemented Interfaces:
LaneChangeModel
Direct Known Subclasses:
Altruistic, Egoistic

public abstract class AbstractLaneChangeModel extends Object implements LaneChangeModel
Common code for a family of lane change models like in M. Treiber and A. Kesting Traffic Flow Dynamics, Springer-Verlag Berlin Heidelberg 2013, pp 239-244.

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:
Peter Knoppers
  • Field Details

    • LOOKAHEAD

      protected static final org.opentrafficsim.base.parameters.ParameterTypeLength LOOKAHEAD
      Look ahead parameter type.
    • B

      protected static final org.opentrafficsim.base.parameters.ParameterTypeAcceleration B
      Comfortable deceleration parameter type.
  • Constructor Details

    • AbstractLaneChangeModel

      public AbstractLaneChangeModel()
  • Method Details

    • computeLaneChangeAndAcceleration

      public final LaneMovementStep computeLaneChangeAndAcceleration(LaneBasedGtu gtu, Collection<Headway> sameLaneGTUs, Collection<Headway> preferredLaneGTUs, Collection<Headway> nonPreferredLaneGTUs, org.djunits.value.vdouble.scalar.Speed speedLimit, org.djunits.value.vdouble.scalar.Acceleration preferredLaneRouteIncentive, org.djunits.value.vdouble.scalar.Acceleration laneChangeThreshold, org.djunits.value.vdouble.scalar.Acceleration nonPreferredLaneRouteIncentive) throws org.opentrafficsim.base.parameters.ParameterException, OperationalPlanException
      Compute the acceleration and lane change.
      Specified by:
      computeLaneChangeAndAcceleration in interface LaneChangeModel
      Parameters:
      gtu - LaneBasedGtu; the GTU for which the acceleration and lane change is computed
      sameLaneGTUs - Collection<Headway>; the set of observable GTUs in the current lane (can not be null and may include the gtu)
      preferredLaneGTUs - Collection<Headway>; the set of observable GTUs in the adjacent lane where GTUs should drive in the absence of other traffic (must be null if there is no such lane)
      nonPreferredLaneGTUs - Collection<Headway>; the set of observable GTUs in the adjacent lane into which GTUs should merge to overtake other traffic (must be null if there is no such lane)
      speedLimit - Speed; the local speed limit
      preferredLaneRouteIncentive - Acceleration; route incentive to merge to the adjacent lane where GTUs should drive in the absence of other traffic
      laneChangeThreshold - Acceleration; threshold that prevents lane changes that have very little benefit
      nonPreferredLaneRouteIncentive - Acceleration; route incentive to merge to the adjacent lane into which GTUs should merge to overtake other traffic
      Returns:
      LaneMovementStep; the result of the lane change and GTU following model
      Throws:
      org.opentrafficsim.base.parameters.ParameterException - in case of a parameter problem.
      OperationalPlanException - if DefaultAlexander perception category is not present.
    • applyDriverPersonality

      public abstract org.djunits.value.vdouble.scalar.Acceleration applyDriverPersonality(DualAccelerationStep accelerationSteps)
      Return the weighted acceleration as described by the personality. This incorporates the personality of the driver to the lane change decisions.
      Parameters:
      accelerationSteps - DualAccelerationStep; the DualAccelerationStep that contains the AccelerationStep that the reference GTU will make and the AccelerationStep that the (new) follower GTU will make
      Returns:
      Acceleration; the acceleration that the personality of the driver uses (in a comparison to a similarly computed acceleration in the non-, or different-lane-changed state) to decide if a lane change should be performed