java.lang.Object
org.opentrafficsim.road.gtu.perception.mental.sdm.Distraction

public class Distraction extends Object
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

    Constructors
    Constructor
    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, double taskDemand, nl.tudelft.simulation.jstats.streams.StreamInterface stream)
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the description.
    Returns the id.
    double
    Returns the level of task demand.
    org.djunits.value.vdouble.scalar.Duration
    Returns the next duration of this secondary task.
    boolean
    Returns the next exposure.
    org.djunits.value.vdouble.scalar.Duration
    Returns the next inter-arrival time of this secondary task.
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • 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 - id
      description - description
      frequency - frequency per exposed driver
      exposure - exposure (value in range [0...1])
      averageDuration - average duration
      stdDuration - standard deviation of duration
      taskDemand - task demand
      stream - random number stream
  • Method Details

    • getId

      public String getId()
      Returns the id.
      Returns:
      id
    • getDescription

      public String 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

      public String toString()
      Overrides:
      toString in class Object