Enum Class LaneBookkeeping

java.lang.Object
java.lang.Enum<LaneBookkeeping>
org.opentrafficsim.road.gtu.LaneBookkeeping
All Implemented Interfaces:
Serializable, Comparable<LaneBookkeeping>, Constable

public enum LaneBookkeeping extends Enum<LaneBookkeeping>
Different methods of dealing with lane bookkeeping when changing lane.

Copyright (c) 2024-2026 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.

Author:
Wouter Schakel
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Bookkeeping changes when the reference point of the GTU enters the adjacent lane.
    The same as EDGE, but lateral crossing of an edge is only checked if something informs the bookkeeping that the GTU is changing lanes.
    Instantaneous lane changes.
    Bookkeeping changes at the start of a lane change.
    The same as EDGE, but START is used when the speed drops below a low threshold.
    Combines functions of START_AND_EDGE and EDGE_INFORMED.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final org.djunits.value.vdouble.scalar.Speed
    Threshold speed below which START is used in START_AND_EDGE.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Whether the lane bookkeeping is any type that contains edge-based logic.
    boolean
    Whether the bookkeeping is informed by an outside source, such as a model, that a lane change is occurring.
    boolean
    Whether this is start-based lane bookkeeping below the start threshold, and edge-based lane bookkeeping otherwise.
    Returns the enum constant of this class with the specified name.
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • INSTANT

      public static final LaneBookkeeping INSTANT
      Instantaneous lane changes. GTUs make a lateral jump. This is advised for scientific output as models are not well developed regarding lane change movement, lane change cancellation, the leader in the start lane (particularly at low speed), and how potential followers respond.
    • START

      public static final LaneBookkeeping START
      Bookkeeping changes at the start of a lane change. The GTU has to make the lateral move with possible GTU overlap in the from lane. Trajectories are instantaneously recorded in the target lane.
    • EDGE

      public static final LaneBookkeeping EDGE
      Bookkeeping changes when the reference point of the GTU enters the adjacent lane. Due to model limitations this can create dead-locks and severe decelerations at low speed in dense traffic. This is advised for control of vehicles in driver simulators due to the full continuous movement without overlap between GTUs.
    • START_AND_EDGE

      public static final LaneBookkeeping START_AND_EDGE
      The same as EDGE, but START is used when the speed drops below a low threshold. This prevents dead-locks and severe decelerations, but allows GTU overlap in the from lane at low speeds. This is advised for microscopic simulations with visual purposes. Using START only at low speeds makes the trajectories more correlated to the movement.
    • EDGE_INFORMED

      public static final LaneBookkeeping EDGE_INFORMED
      The same as EDGE, but lateral crossing of an edge is only checked if something informs the bookkeeping that the GTU is changing lanes. This can for example be done by a model. In this way a model can prevent lane bookkeeping errors that its own limited modeling could produce. For example when canceling a lane change due to an adjacent GTU but still curving over the edge.
    • START_AND_EDGE_INFORMED

      public static final LaneBookkeeping START_AND_EDGE_INFORMED
      Combines functions of START_AND_EDGE and EDGE_INFORMED.
  • Field Details

    • START_THRESHOLD

      public static final org.djunits.value.vdouble.scalar.Speed START_THRESHOLD
      Threshold speed below which START is used in START_AND_EDGE.
  • Method Details

    • values

      public static LaneBookkeeping[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static LaneBookkeeping valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • isEdge

      public boolean isEdge()
      Whether the lane bookkeeping is any type that contains edge-based logic.
      Returns:
      whether the lane bookkeeping is any type that contains edge-based logic
    • isStartAndEdge

      public boolean isStartAndEdge()
      Whether this is start-based lane bookkeeping below the start threshold, and edge-based lane bookkeeping otherwise.
      Returns:
      whether this is start-based lane bookkeeping below the start threshold, and edge-based lane bookkeeping otherwise
    • isInformed

      public boolean isInformed()
      Whether the bookkeeping is informed by an outside source, such as a model, that a lane change is occurring.
      Returns:
      whether the bookkeeping is informed by an outside source, such as a model, that a lane change is occurring