java.lang.Object
org.opentrafficsim.road.gtu.lane.perception.mental.AbstractTask
All Implemented Interfaces:
Identifiable, Task
Direct Known Subclasses:
AbstractArTask, ChannelTaskAcceleration, ChannelTaskCarFollowing, ChannelTaskConflict, ChannelTaskConstant, ChannelTaskCooperation, ChannelTaskLaneChange, ChannelTaskLocalDistraction, ChannelTaskRoadSideDistraction, ChannelTaskScan, ChannelTaskSignal, ChannelTaskSocio, ChannelTaskTrafficLight

public abstract class AbstractTask extends Object implements Task
Has task demand as internal variable.

Copyright (c) 2025-2025 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

    • AbstractTask

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

    • getTaskDemand

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

      protected abstract double calculateTaskDemand(LanePerception perception) throws ParameterException
      Calculates the task demand.
      Parameters:
      perception - perception
      Returns:
      task demand
      Throws:
      ParameterException - if a parameter is missing or out of bounds
    • getTaskDemand

      public double getTaskDemand()
      Description copied from interface: Task
      Returns the gross task demand as most recently returned by getTaskDemand(LanePerception).
      Specified by:
      getTaskDemand in interface Task
      Returns:
      gross task demand
    • getId

      public String getId()
      Specified by:
      getId in interface Identifiable