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

public class Distraction extends Object
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 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 - 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 Duration nextInterArrival()
      Returns the next inter-arrival time of this secondary task.
      Returns:
      next inter-arrival time of this secondary task
    • nextDuration

      public 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