public class Distraction extends Object
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 |
|---|
Distraction(String id,
String description,
Frequency frequency,
double exposure,
Duration averageDuration,
Duration stdDuration,
StreamInterface stream,
TaskSupplier taskSupplier)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getDescription()
Returns the description.
|
String |
getId()
Returns the id.
|
Fuller.Task |
getTask(LaneBasedGTU gtu)
Returns a task for the given GTU.
|
Duration |
nextDuration()
Returns the next duration of this secondary task.
|
boolean |
nextExposure()
Returns the next exposure.
|
Duration |
nextInterArrival()
Returns the next inter-arrival time of this secondary task.
|
String |
toString() |
public Distraction(String id, String description, Frequency frequency, double exposure, Duration averageDuration, Duration stdDuration, StreamInterface stream, TaskSupplier taskSupplier)
id - String; iddescription - String; descriptionfrequency - Frequency; frequency per exposed driverexposure - double; exposure (value in range [0...1])averageDuration - Duration; average durationstdDuration - Duration; standard deviation of durationstream - StreamInterface; random number streamtaskSupplier - TaskSupplier; task supplierpublic final String getId()
public final String getDescription()
public final boolean nextExposure()
public final Duration nextInterArrival()
public final Duration nextDuration()
public final Fuller.Task getTask(LaneBasedGTU gtu)
gtu - LaneBasedGTU; gtuCopyright © 2014–2019 Delft University of Technology. All rights reserved.