Class ArTaskHeadwayBased

All Implemented Interfaces:
Identifiable, ArTask, Task
Direct Known Subclasses:
ArTaskCarFollowing, ArTaskLaneChanging

public abstract class ArTaskHeadwayBased extends AbstractArTask
Task class that translates a (composite) headway in to a task demand.

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:
Wouter Schakel
  • Constructor Details

    • ArTaskHeadwayBased

      public ArTaskHeadwayBased(String id)
      Constructor.
      Parameters:
      id - id
  • Method Details

    • calculateTaskDemand

      public double calculateTaskDemand(LanePerception perception) throws ParameterException
      Description copied from class: AbstractTask
      Calculates the task demand.
      Specified by:
      calculateTaskDemand in class AbstractTask
      Parameters:
      perception - perception
      Returns:
      task demand
      Throws:
      ParameterException - if a parameter is missing or out of bounds
    • getSpeed

      protected org.djunits.value.vdouble.scalar.Speed getSpeed()
      Returns the current speed to translate a distance headway to a time headway.
      Returns:
      speed
    • getHeadway

      protected abstract org.djunits.value.vdouble.scalar.Duration getHeadway(LanePerception perception, LaneBasedGtu gtu, Parameters parameters) throws ParameterException
      Returns a collector for the task demand.
      Parameters:
      perception - perception
      gtu - gtu
      parameters - parameters
      Returns:
      headway, null of none.
      Throws:
      ParameterException - on invalid parameter