Class ConstantTask
- java.lang.Object
-
- org.opentrafficsim.road.gtu.lane.perception.mental.AbstractTask
-
- org.opentrafficsim.road.gtu.lane.perception.mental.ConstantTask
-
- All Implemented Interfaces:
Identifiable
,Task
public class ConstantTask extends AbstractTask
Class for constant demand.Copyright (c) 2013-2020 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.- Version:
- $Revision$, $LastChangedDate$, by $Author$, initial version 30 jan. 2019
- Author:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
-
-
Constructor Summary
Constructors Constructor Description ConstantTask(String id, double taskDemand)
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
-
ConstantTask
public ConstantTask(String id, double taskDemand)
Constructor.- Parameters:
id
- String; idtaskDemand
- double; task demand
-
-
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
-
-