Class ExponentialTask
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
Class for exponential demand.
-
Constructor Summary
ConstructorDescriptionExponentialTask
(String id, double initialTaskDemand, double finalTaskDemand, org.djunits.value.vdouble.scalar.Duration tau, OtsSimulatorInterface simulator) Constructor. -
Method Summary
Modifier and TypeMethodDescriptiondouble
calculateTaskDemand
(LanePerception perception, LaneBasedGtu gtu, org.opentrafficsim.base.parameters.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(String id, double initialTaskDemand, double finalTaskDemand, org.djunits.value.vdouble.scalar.Duration tau, OtsSimulatorInterface 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
- 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; perceptiongtu
- LaneBasedGtu; gtuparameters
- Parameters; parameters- Returns:
- double; gross task demand
- Throws:
org.opentrafficsim.base.parameters.ParameterException
- if a parameter is missing or out of boundsGtuException
- exceptions pertaining to the GTU
-