Class LaneBasedCfLcTacticalPlanner

java.lang.Object
org.opentrafficsim.road.gtu.lane.tactical.AbstractLaneBasedTacticalPlanner
org.opentrafficsim.road.gtu.lane.tactical.LaneBasedCfLcTacticalPlanner
All Implemented Interfaces:
Serializable, TacticalPlanner<LaneBasedGtu,LanePerception>, LaneBasedTacticalPlanner

public class LaneBasedCfLcTacticalPlanner extends AbstractLaneBasedTacticalPlanner
Lane-based tactical planner that implements car following and lane change behavior. This lane-based tactical planner makes decisions based on headway (GTU following model) and lane change (Lane Change model), and will generate an operational plan for the GTU. It can ask the strategic planner for assistance on the route to take when the network splits.

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
See Also:
  • Field Details

    • LOOKBACKOLD

      protected static final org.opentrafficsim.base.parameters.ParameterTypeLength LOOKBACKOLD
      Look back parameter type.
    • NOLANECHANGENEEDED

      public static final org.djunits.value.vdouble.scalar.Length NOLANECHANGENEEDED
      Return value of suitability when no lane change is required within the time horizon.
    • GETOFFTHISLANENOW

      public static final org.djunits.value.vdouble.scalar.Length GETOFFTHISLANENOW
      Return value of suitability when a lane change is required right now.
  • Constructor Details

    • LaneBasedCfLcTacticalPlanner

      public LaneBasedCfLcTacticalPlanner(GtuFollowingModelOld carFollowingModel, LaneChangeModel laneChangeModel, LaneBasedGtu gtu)
      Instantiated a tactical planner with GTU following and lane change behavior.
      Parameters:
      carFollowingModel - GtuFollowingModelOld; Car-following model.
      laneChangeModel - LaneChangeModel; Lane change model.
      gtu - LaneBasedGtu; GTU
  • Method Details

    • generateOperationalPlan

      public final OperationalPlan generateOperationalPlan(org.djunits.value.vdouble.scalar.Time startTime, org.djutils.draw.point.OrientedPoint2d locationAtStartTime) throws OperationalPlanException, NetworkException, GtuException, org.opentrafficsim.base.parameters.ParameterException
      Throws:
      OperationalPlanException
      NetworkException
      GtuException
      org.opentrafficsim.base.parameters.ParameterException
    • computeSuitabilityWithLaneChanges

      protected final org.djunits.value.vdouble.scalar.Length computeSuitabilityWithLaneChanges(Lane startLane, double remainingDistance, Map<Lane,org.djunits.value.vdouble.scalar.Length> suitabilities, int totalLanes, LateralDirectionality direction, GtuType gtuType)
      Compute the suitability of a lane from which lane changes are required to get to the next point on the Route.
      This method weighs the suitability of the nearest suitable lane by (m - n) / m where n is the number of lane changes required and m is the total number of lanes in the CrossSectionLink.
      Parameters:
      startLane - Lane; the current lane of the GTU
      remainingDistance - double; distance in m of GTU to first branch
      suitabilities - Map<Lane, Length>; the set of suitable lanes and their suitability
      totalLanes - int; total number of lanes compatible with the GTU type
      direction - LateralDirectionality; the direction of the lane changes to attempt
      gtuType - GtuType; the type of the GTU
      Returns:
      double; the suitability of the startLane for following the Route
    • countCompatibleLanes

      protected final int countCompatibleLanes(CrossSectionLink link, GtuType gtuType)
      Determine how many lanes on a CrossSectionLink are compatible with a particular GTU type.
      TODO: this method should probably be moved into the CrossSectionLink class
      Parameters:
      link - CrossSectionLink; the link
      gtuType - GtuType; the GTU type
      Returns:
      integer; the number of lanes on the link that are compatible with the GTU type
    • toString

      public final String toString()
      Overrides:
      toString in class Object