Class LaneBasedGTUFollowingDirectedChangeTacticalPlanner

  • All Implemented Interfaces:
    Serializable, TacticalPlanner<LaneBasedGTU,​LanePerception>, LaneBasedTacticalPlanner

    public class LaneBasedGTUFollowingDirectedChangeTacticalPlanner
    extends AbstractLaneBasedTacticalPlanner
    Lane-based tactical planner that implements car following behavior and rule-based lane change. This tactical planner retrieves the car following model from the strategical planner and will generate an operational plan for the GTU.

    A lane change occurs when:

    1. The route indicates that the current lane does not lead to the destination; main choices are the time when the GTU switches to the "right" lane, and what should happen when the split gets closer and the lane change has failed. Observations indicate that vehicles if necessary stop in their current lane until they can go to the desired lane. A lane drop is automatically part of this implementation, because the lane with a lane drop will not lead to the GTU's destination.
    2. The desired speed of the vehicle is a particular delta-speed higher than its predecessor, the headway to the predecessor in the current lane has exceeded a certain value, it is allowed to change to the target lane, the target lane lies on the GTU's route, and the gap in the target lane is acceptable (including the evaluation of the perceived speed of a following GTU in the target lane).
    3. The current lane is not the optimum lane given the traffic rules (for example, to keep right), the headway to the predecessor on the target lane is greater than a certain value, the speed of the predecessor on the target lane is greater than or equal to our speed, the target lane is on the route, it is allowed to switch to the target lane, and the gap at the target lane is acceptable (including the perceived speed of any vehicle in front or behind on the target lane).

    This lane-based tactical planner makes decisions based on headway (GTU following model). 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
    • Constructor Detail

      • LaneBasedGTUFollowingDirectedChangeTacticalPlanner

        public LaneBasedGTUFollowingDirectedChangeTacticalPlanner​(GTUFollowingModelOld carFollowingModel,
                                                                  LaneBasedGTU gtu)
        Instantiated a tactical planner with just GTU following behavior and no lane changes.
        Parameters:
        carFollowingModel - GTUFollowingModelOld; Car-following model.
        gtu - LaneBasedGTU; GTU
    • Method Detail

      • getCarFollowingModelOld

        public final GTUFollowingModelOld getCarFollowingModelOld()
        Returns the car-following model.
        Returns:
        The car-following model.
      • setNoLaneChange

        public final void setNoLaneChange​(Duration noLaneChangeDuration)
        Indicate that no lane change should happen for the indicated duration.
        Parameters:
        noLaneChangeDuration - Duration; the duration for which no lane change should happen.
      • isDestroyGtuOnFailure

        public final boolean isDestroyGtuOnFailure()
        Returns:
        destroyGtuOnFailure, indicating when a failure in planning occurs, whether we should destroy the GTU to avoid halting of the model
      • setDestroyGtuOnFailure

        public final void setDestroyGtuOnFailure​(boolean destroyGtuOnFailure)
        When a failure in planning occurs, should we destroy the GTU to avoid halting of the model?
        Parameters:
        destroyGtuOnFailure - boolean; set destroyGtuOnFailure to true or false
      • getDurationInLaneAfterLaneChange

        protected final Duration getDurationInLaneAfterLaneChange()
        Get the duration to stay in a Lane after a lane change.
        Returns:
        Duration; durationInLaneAfterLaneChange
      • setDurationInLaneAfterLaneChange

        protected final void setDurationInLaneAfterLaneChange​(Duration durationInLaneAfterLaneChange)
                                                       throws GTUException
        Set the duration to stay in a Lane after a lane change.
        Parameters:
        durationInLaneAfterLaneChange - Duration; set duration to stay in a Lane after a lane change
        Throws:
        GTUException - when durationInLaneAfterLaneChange less than zero