java.lang.Object
org.opentrafficsim.road.gtu.tactical.util.lmrs.LmrsUtil
All Implemented Interfaces:
LmrsParameters

public final class LmrsUtil extends Object implements LmrsParameters

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 Details

  • Method Details

    • determinePlan

      Determines a simple representation of an operational plan.
      Parameters:
      context - tactical information such as parameters and car-following model
      lmrsData - LMRS data
      incentives - planner with set of incentives
      Returns:
      simple operational plan
      Throws:
      GtuException - gtu exception
      NetworkException - network exception
      ParameterException - parameter exception
      OperationalPlanException - operational plan exception
    • getLaneChangeDesire

      public static Desire getLaneChangeDesire(TacticalContextEgo context, AbstractIncentivesTacticalPlanner incentives) throws ParameterException, GtuException
      Determines lane change desire for the given GtU. Mandatory desire is deduced as the maximum of a set of mandatory incentives, while voluntary desires are added. Depending on the level of mandatory lane change desire, voluntary desire may be included partially. If both are positive or negative, voluntary desire is fully included. Otherwise, voluntary desire is less considered within the range dSync < |mandatory| < dCoop. The absolute value is used as large negative mandatory desire may also dominate voluntary desire.
      Parameters:
      context - tactical information such as parameters and car-following model
      incentives - planner with set of incentives
      Returns:
      lane change desire for gtu
      Throws:
      ParameterException - if a parameter is not defined
      GtuException - if there is no mandatory incentive, the model requires at least one
    • singleAcceleration

      public static org.djunits.value.vdouble.scalar.Acceleration singleAcceleration(TacticalContext context, org.djunits.value.vdouble.scalar.Length distance, org.djunits.value.vdouble.scalar.Speed leaderSpeed, double desire) throws ParameterException
      Determine acceleration from car-following with desire-adjusted headway.
      Parameters:
      context - tactical information such as parameters and car-following model
      distance - distance from follower to leader
      leaderSpeed - speed of leader
      desire - level of lane change desire
      Returns:
      acceleration from car-following
      Throws:
      ParameterException - if a parameter is not defined