Class 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-2020 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
    BSD-style license. See OpenTrafficSim License.

    $LastChangedDate: 2015-07-24 02:58:59 +0200 (Fri, 24 Jul 2015) $, @version $Revision: 1147 $, by $Author: averbraeck $, initial version Nov 25, 2015
    Author:
    Alexander Verbraeck, Peter Knoppers
    See Also:
    Serialized Form
    • Field Detail

      • LOOKBACKOLD

        protected static final ParameterTypeLength LOOKBACKOLD
        Look back parameter type.
      • NOLANECHANGENEEDED

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

        public static final Length GETOFFTHISLANENOW
        Return value of suitability when a lane change is required right now.
    • Constructor Detail

      • 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 Detail

      • computeSuitabilityWithLaneChanges

        protected final Length computeSuitabilityWithLaneChanges​(Lane startLane,
                                                                 double remainingDistance,
                                                                 Map<Lane,​Length> suitabilities,
                                                                 int totalLanes,
                                                                 LateralDirectionality direction,
                                                                 GTUType gtuType,
                                                                 GTUDirectionality drivingDirection)
        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
        drivingDirection - GTUDirectionality; the driving direction of the GTU
        Returns:
        double; the suitability of the startLane for following the Route
      • countCompatibleLanes

        protected final int countCompatibleLanes​(CrossSectionLink link,
                                                 GTUType gtuType,
                                                 GTUDirectionality drivingDirection)
        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
        drivingDirection - GTUDirectionality; the driving direction on the link
        Returns:
        integer; the number of lanes on the link that are compatible with the GTU type