Class AbstractTask
java.lang.Object
org.opentrafficsim.road.gtu.lane.perception.mental.AbstractTask
- All Implemented Interfaces:
Identifiable,Task
- Direct Known Subclasses:
AbstractArTask,ChannelTaskAcceleration,ChannelTaskCarFollowing,ChannelTaskConflict,ChannelTaskConstant,ChannelTaskCooperation,ChannelTaskLaneChange,ChannelTaskLocalDistraction,ChannelTaskRoadSideDistraction,ChannelTaskScan,ChannelTaskSignal,ChannelTaskSocio,ChannelTaskTrafficLight
Has task demand as internal variable.
Copyright (c) 2025-2025 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
- Author:
- Wouter Schakel
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract doublecalculateTaskDemand(LanePerception perception) Calculates the task demand.getId()doubleReturns the gross task demand as most recently returned bygetTaskDemand(LanePerception).doublegetTaskDemand(LanePerception perception) Returns the gross task demand.
-
Constructor Details
-
AbstractTask
Constructor.- Parameters:
id- id
-
-
Method Details
-
getTaskDemand
Description copied from interface:TaskReturns the gross task demand.- Specified by:
getTaskDemandin interfaceTask- Parameters:
perception- perception- Returns:
- gross task demand
- Throws:
ParameterException- if a parameter is missing or out of bounds
-
calculateTaskDemand
Calculates the task demand.- Parameters:
perception- perception- Returns:
- task demand
- Throws:
ParameterException- if a parameter is missing or out of bounds
-
getTaskDemand
public double getTaskDemand()Description copied from interface:TaskReturns the gross task demand as most recently returned bygetTaskDemand(LanePerception).- Specified by:
getTaskDemandin interfaceTask- Returns:
- gross task demand
-
getId
- Specified by:
getIdin interfaceIdentifiable
-