Class RoadSideDistraction

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

public class RoadSideDistraction extends AbstractLaneBasedObject
Distraction following a distance profile.

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

  • Method Details

    • getDistraction

      public OptionalDouble getDistraction(Length distance)
      Returns the level of distraction at the given distance.
      Parameters:
      distance - negative when approaching
      Returns:
      level of distraction (task-demand), empty if the distraction is no longer important
    • getSide

      public LateralDirectionality getSide()
      Returns the side of the distraction, relative to the driving direction.
      Returns:
      side of the distraction, left of road (LEFT), right of road (RIGHT), or on the lane of the object (NONE)