Class Distraction
java.lang.Object
org.opentrafficsim.road.gtu.lane.perception.mental.sdm.Distraction
Task as seen by the Stochastic Distraction Model.
Copyright (c) 2013-2024 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
Constructors -
Method Summary
-
Constructor Details
-
Distraction
public Distraction(String id, String description, Frequency frequency, double exposure, Duration averageDuration, 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
Returns the next inter-arrival time of this secondary task.- Returns:
- next inter-arrival time of this secondary task
-
nextDuration
Returns the next duration of this secondary task.- Returns:
- next duration of this secondary task
-
toString
-