Class Distraction
java.lang.Object
org.opentrafficsim.road.gtu.perception.mental.sdm.Distraction
Task as seen by the Stochastic Distraction Model.
Copyright (c) 2013-2026 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
ConstructorsConstructorDescriptionDistraction(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, double taskDemand, nl.tudelft.simulation.jstats.streams.StreamInterface stream) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionReturns the description.getId()Returns the id.doubleReturns the level of task demand.org.djunits.value.vdouble.scalar.DurationReturns the next duration of this secondary task.booleanReturns the next exposure.org.djunits.value.vdouble.scalar.DurationReturns the next inter-arrival time of this secondary task.toString()
-
Constructor Details
-
Distraction
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, double taskDemand, nl.tudelft.simulation.jstats.streams.StreamInterface stream) Constructor.- Parameters:
id- iddescription- descriptionfrequency- frequency per exposed driverexposure- exposure (value in range [0...1])averageDuration- average durationstdDuration- standard deviation of durationtaskDemand- task demandstream- random number stream
-
-
Method Details
-
getId
Returns the id.- Returns:
- id
-
getDescription
Returns the description.- Returns:
- description
-
getTaskDemand
public double getTaskDemand()Returns the level of task demand.- Returns:
- taskDemand level of task demand
-
nextExposure
public boolean nextExposure()Returns the next exposure.- Returns:
- next exposure
-
nextInterArrival
public org.djunits.value.vdouble.scalar.Duration nextInterArrival()Returns the next inter-arrival time of this secondary task.- Returns:
- next inter-arrival time of this secondary task
-
nextDuration
public org.djunits.value.vdouble.scalar.Duration nextDuration()Returns the next duration of this secondary task.- Returns:
- next duration of this secondary task
-
toString
-