java.lang.Object
org.opentrafficsim.road.gtu.lane.perception.mental.AbstractTask
org.opentrafficsim.road.gtu.lane.perception.mental.ConstantTask
All Implemented Interfaces:
org.djutils.base.Identifiable, Task

public class ConstantTask extends AbstractTask
Class for constant demand.

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

Author:
Alexander Verbraeck, Peter Knoppers, Wouter Schakel
  • Constructor Details

    • ConstantTask

      public ConstantTask(String id, double taskDemand)
      Constructor.
      Parameters:
      id - String; id
      taskDemand - double; task demand
  • Method Details

    • calculateTaskDemand

      public double calculateTaskDemand(LanePerception perception, LaneBasedGtu gtu, org.opentrafficsim.base.parameters.Parameters parameters) throws org.opentrafficsim.base.parameters.ParameterException, GtuException
      Returns the gross task demand to be managed by a task manager.
      Parameters:
      perception - LanePerception; perception
      gtu - LaneBasedGtu; gtu
      parameters - Parameters; parameters
      Returns:
      double; gross task demand
      Throws:
      org.opentrafficsim.base.parameters.ParameterException - if a parameter is missing or out of bounds
      GtuException - exceptions pertaining to the GTU