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(String id, double initialTaskDemand, double finalTaskDemand, Duration tau, SimulatorInterface.TimeDoubleUnit simulator)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
calculateTaskDemand(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 Detail
-
ExponentialTask
public ExponentialTask(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 Detail
-
calculateTaskDemand
public double calculateTaskDemand(LanePerception perception, LaneBasedGTU gtu, Parameters parameters) throws ParameterException, GTUException
Returns 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
-
-