Class ExponentialTask
java.lang.Object
org.opentrafficsim.road.gtu.lane.perception.mental.AbstractTask
org.opentrafficsim.road.gtu.lane.perception.mental.ExponentialTask
- All Implemented Interfaces:
Identifiable,Task
public class ExponentialTask extends AbstractTask
Class for exponential demand.
-
Constructor Summary
Constructors Constructor Description ExponentialTask(java.lang.String id, double initialTaskDemand, double finalTaskDemand, Duration tau, SimulatorInterface.TimeDoubleUnit simulator)Constructor. -
Method Summary
Modifier and Type Method Description doublecalculateTaskDemand(LanePerception perception, LaneBasedGTU gtu, Parameters parameters)Returns the gross task demand to be managed by a task manager.Methods inherited from class org.opentrafficsim.road.gtu.lane.perception.mental.AbstractTask
getAnticipationReliance, getId, getTaskDemand, setAnticipationReliance, setTaskDemand, toString
-
Constructor Details
-
ExponentialTask
public ExponentialTask(java.lang.String id, double initialTaskDemand, double finalTaskDemand, Duration tau, SimulatorInterface.TimeDoubleUnit simulator)Constructor.- Parameters:
id- String; idinitialTaskDemand- double; initial level of task demandfinalTaskDemand- double; final level of task demandtau- Duration; time scale at which task demand changes from the initial to the final valuesimulator- SimulatorInterface.TimeDoubleUnit; simulator
-
-
Method Details
-
calculateTaskDemand
public double calculateTaskDemand(LanePerception perception, LaneBasedGTU gtu, Parameters parameters) throws ParameterException, GTUExceptionReturns the gross task demand to be managed by a task manager.- Parameters:
perception- LanePerception; perceptiongtu- LaneBasedGTU; gtuparameters- Parameters; parameters- Returns:
- double; gross task demand
- Throws:
ParameterException- if a parameter is missing or out of boundsGTUException- exceptions pertaining to the GTU
-