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

public class ExponentialTask extends AbstractTask
Class for exponential demand.
  • Constructor Details

    • ExponentialTask

      public ExponentialTask(String id, double initialTaskDemand, double finalTaskDemand, org.djunits.value.vdouble.scalar.Duration tau, OtsSimulatorInterface simulator)
      Constructor.
      Parameters:
      id - String; id
      initialTaskDemand - double; initial level of task demand
      finalTaskDemand - double; final level of task demand
      tau - Duration; time scale at which task demand changes from the initial to the final value
      simulator - OtsSimulatorInterface; simulator
  • 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