Class TaskLaneChanging

  • All Implemented Interfaces:
    org.opentrafficsim.base.Identifiable, Task

    public class TaskLaneChanging
    extends TaskHeadwayBased
    Lane changing task based on car-following (as gap-acceptance proxy), and an underlying consideration to include adjacent lanes.

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

    Version:
    $Revision$, $LastChangedDate$, by $Author$, initial version 10 apr. 2018
    Author:
    Alexander Verbraeck, Peter Knoppers, Wouter Schakel
    • Constructor Detail

      • TaskLaneChanging

        public TaskLaneChanging​(TaskLaneChanging.LateralConsideration lateralConsideration)
        Constructor.
        Parameters:
        lateralConsideration - LateralConsideration; lateral consideration
    • Method Detail

      • getHeadway

        protected Duration getHeadway​(LanePerception perception,
                                      LaneBasedGTU gtu,
                                      org.opentrafficsim.base.parameters.Parameters parameters)
                               throws org.opentrafficsim.base.parameters.ParameterException
        Returns a collector for the task demand.
        Specified by:
        getHeadway in class TaskHeadwayBased
        Parameters:
        perception - LanePerception; perception
        gtu - LaneBasedGTU; gtu
        parameters - Parameters; parameters
        Returns:
        Duration; headway, null of none.
        Throws:
        org.opentrafficsim.base.parameters.ParameterException - on invalid parameter