Class LocalDistraction

All Implemented Interfaces:
nl.tudelft.simulation.dsol.animation.Locatable, Identifiable, EventProducer, OtsShape, LocatedObject, LaneBasedObject

public class LocalDistraction extends AbstractLaneBasedObject
Local distraction.

Copyright (c) 2024-2025s Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.

Author:
Wouter Schakel
  • Constructor Details

    • LocalDistraction

      public LocalDistraction(String id, LanePosition position, org.djunits.value.vdouble.scalar.Length range, double distractionLevel, LateralDirectionality side) throws NetworkException
      Constructor.
      Parameters:
      id - id
      position - position
      range - range of the distraction (upstream of the location)
      distractionLevel - level of the distraction in the range [0...1)
      side - side if the distraction
      Throws:
      NetworkException - when the position is not correct
      IllegalArgumentException - when the range is not a positive Length, or the level is not in range [0...1)
      NullPointerException - when side is null
  • Method Details

    • getRange

      public org.djunits.value.vdouble.scalar.Length getRange()
      Returns the range of the distraction, which applies upstream of the location.
      Returns:
      range of the distraction
    • getDistractionLevel

      public double getDistractionLevel()
      Returns the distraction level as normalized task demand.
      Returns:
      distraction level
    • getSide

      public LateralDirectionality getSide()
      Returns the side of the distraction, relative to the driving direction.
      Returns:
      side of the distraction