Class AbstractTask
java.lang.Object
org.opentrafficsim.road.gtu.lane.perception.mental.AbstractTask
- All Implemented Interfaces:
org.djutils.base.Identifiable
,Task
- Direct Known Subclasses:
ConstantTask
,ExponentialTask
,TaskHeadwayBased
,TaskRoadSideDistraction
Has id, task demand and anticipation reliance as internal variables.
Copyright (c) 2013-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
- Author:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal double
Returns the level of anticipation reliance.getId()
final double
Returns the gross demand of this task, i.e without considering anticipation reliance.final void
setAnticipationReliance
(double anticipationReliance) Set anticipation reliance.final void
setTaskDemand
(double taskDemand) Sets (gross) task demand.toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.opentrafficsim.road.gtu.lane.perception.mental.Task
calculateTaskDemand
-
Constructor Details
-
AbstractTask
Constructor.- Parameters:
id
- String; id
-
-
Method Details
-
getId
- Specified by:
getId
in interfaceorg.djutils.base.Identifiable
-
setTaskDemand
public final void setTaskDemand(double taskDemand) Sets (gross) task demand.- Specified by:
setTaskDemand
in interfaceTask
- Parameters:
taskDemand
- double; set task demand
-
getTaskDemand
public final double getTaskDemand()Returns the gross demand of this task, i.e without considering anticipation reliance.- Specified by:
getTaskDemand
in interfaceTask
- Returns:
- double; gross demand of this task, i.e. without considering anticipation reliance
-
setAnticipationReliance
public final void setAnticipationReliance(double anticipationReliance) Set anticipation reliance.- Specified by:
setAnticipationReliance
in interfaceTask
- Parameters:
anticipationReliance
- double; set anticipation reliance
-
getAnticipationReliance
public final double getAnticipationReliance()Returns the level of anticipation reliance.- Specified by:
getAnticipationReliance
in interfaceTask
- Returns:
- double; anticipation reliance
-
toString
-