public class Distraction extends Object
 Copyright (c) 2013-2018 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,
           org.djunits.value.vdouble.scalar.Frequency frequency,
           double exposure,
           org.djunits.value.vdouble.scalar.Duration averageDuration,
           org.djunits.value.vdouble.scalar.Duration stdDuration,
           nl.tudelft.simulation.jstats.streams.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. 
 | 
org.djunits.value.vdouble.scalar.Duration | 
nextDuration()
Returns the next duration of this secondary task. 
 | 
boolean | 
nextExposure()
Returns the next exposure. 
 | 
org.djunits.value.vdouble.scalar.Duration | 
nextInterArrival()
Returns the next inter-arrival time of this secondary task. 
 | 
String | 
toString() | 
public Distraction(String id, String description, org.djunits.value.vdouble.scalar.Frequency frequency, double exposure, org.djunits.value.vdouble.scalar.Duration averageDuration, org.djunits.value.vdouble.scalar.Duration stdDuration, nl.tudelft.simulation.jstats.streams.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 org.djunits.value.vdouble.scalar.Duration nextInterArrival()
public final org.djunits.value.vdouble.scalar.Duration nextDuration()
public final Fuller.Task getTask(LaneBasedGTU gtu)
gtu - LaneBasedGTU; gtuCopyright © 2014–2018 Delft University of Technology. All rights reserved.