Class AbstractTask
java.lang.Object
org.opentrafficsim.road.gtu.lane.perception.mental.AbstractTask
- All Implemented Interfaces:
Identifiable,Task
- Direct Known Subclasses:
ConstantTask,ExponentialTask,TaskHeadwayBased,TaskRoadSideDistraction
public abstract class AbstractTask extends java.lang.Object implements Task
Has id, task demand and anticipation reliance as internal variables.
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 6 nov. 2018
- Author:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
-
Constructor Summary
Constructors Constructor Description AbstractTask(java.lang.String id)Constructor. -
Method Summary
Modifier and Type Method Description doublegetAnticipationReliance()Returns the level of anticipation reliance.java.lang.StringgetId()doublegetTaskDemand()Returns the gross demand of this task, i.e without considering anticipation reliance.voidsetAnticipationReliance(double anticipationReliance)Set anticipation reliance.voidsetTaskDemand(double taskDemand)Sets (gross) task demand.java.lang.StringtoString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.opentrafficsim.road.gtu.lane.perception.mental.Task
calculateTaskDemand
-
Constructor Details
-
AbstractTask
public AbstractTask(java.lang.String id)Constructor.- Parameters:
id- String; id
-
-
Method Details
-
getId
public java.lang.String getId()- Specified by:
getIdin interfaceIdentifiable
-
setTaskDemand
public final void setTaskDemand(double taskDemand)Sets (gross) task demand.- Specified by:
setTaskDemandin 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:
getTaskDemandin 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:
setAnticipationReliancein interfaceTask- Parameters:
anticipationReliance- double; set anticipation reliance
-
getAnticipationReliance
public final double getAnticipationReliance()Returns the level of anticipation reliance.- Specified by:
getAnticipationReliancein interfaceTask- Returns:
- double; anticipation reliance
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-