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
ConstructorsConstructorDescriptionExponentialTask
(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
- idinitialTaskDemand
- initial level of task demandfinalTaskDemand
- final level of task demandtau
- time scale at which task demand changes from the initial to the final valuesimulator
- simulator
-
-
Method Details
-
calculateTaskDemand
public double calculateTaskDemand(LanePerception perception, LaneBasedGtu gtu, org.opentrafficsim.base.parameters.Parameters parameters) throws org.opentrafficsim.base.parameters.ParameterException, GtuException Description copied from interface:Task
Returns the gross task demand to be managed by a task manager.- Parameters:
perception
- perceptiongtu
- gtuparameters
- parameters- Returns:
- gross task demand
- Throws:
org.opentrafficsim.base.parameters.ParameterException
- if a parameter is missing or out of boundsGtuException
- exceptions pertaining to the GTU
-