public abstract class TaskHeadwayBased extends AbstractTask
Copyright (c) 2013-2019 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
| Constructor and Description |
|---|
TaskHeadwayBased(String id)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
double |
calculateTaskDemand(LanePerception perception,
LaneBasedGTU gtu,
Parameters parameters)
Returns the gross task demand to be managed by a task manager.
|
protected abstract Duration |
getHeadway(LanePerception perception,
LaneBasedGTU gtu,
Parameters parameters)
Returns a collector for the task demand.
|
protected Speed |
getSpeed()
Returns the current speed to translate a distance headway to a time headway.
|
getAnticipationReliance, getId, getTaskDemand, setAnticipationReliance, setTaskDemand, toStringpublic TaskHeadwayBased(String id)
id - String; idpublic double calculateTaskDemand(LanePerception perception, LaneBasedGTU gtu, Parameters parameters) throws ParameterException
perception - LanePerception; perceptiongtu - LaneBasedGTU; gtuparameters - Parameters; parametersParameterException - if a parameter is missing or out of boundsprotected Speed getSpeed()
protected abstract Duration getHeadway(LanePerception perception, LaneBasedGTU gtu, Parameters parameters) throws ParameterException
perception - LanePerception; perceptiongtu - LaneBasedGTU; gtuparameters - Parameters; parametersnull of none.ParameterException - on invalid parameterCopyright © 2014–2019 Delft University of Technology. All rights reserved.