Class Shoulder

All Implemented Interfaces:
nl.tudelft.simulation.dsol.animation.Locatable, Identifiable, EventProducer, OtsShape, HierarchicallyTyped<LaneType,Lane>

public class Shoulder extends Lane
This class is mostly the same as a Lane. But as a shoulder it can be recognized by algorithms and models to be responded to differently.

Copyright (c) 2024-2026 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

    • Shoulder

      public Shoulder(CrossSectionLink link, String id, CrossSectionGeometry geometry, LaneType laneType)
      Constructor specifying geometry.
      Parameters:
      link - link
      id - the id of this lane within the link; should be unique within the link
      geometry - geometry
      laneType - lane type
  • Method Details

    • getAdjacentLane

      public Optional<Lane> getAdjacentLane(LateralDirectionality laneChangeDirection, GtuType gtuType)
      Returns one adjacent lane.
      Overrides:
      getAdjacentLane in class Lane
      Parameters:
      laneChangeDirection - lane change direction
      gtuType - GTU type.
      Returns:
      adjacent lane, empty if none
    • getZ

      public double getZ()
      Description copied from class: CrossSectionElement
      Retrieve the Z offset (used to determine what covers what when drawing).
      Specified by:
      getZ in interface nl.tudelft.simulation.dsol.animation.Locatable
      Overrides:
      getZ in class CrossSectionElement
      Returns:
      the Z-offset for drawing (what's on top, what's underneath).
    • getSpeedLimits

      public SpeedLimits getSpeedLimits(GtuType gtuType)
      Description copied from class: Lane
      Get the speed limits of this lane at the current time-of-day, which can differ per GTU type. E.g., a vehicle type speed limit may apply to trucks.
      Overrides:
      getSpeedLimits in class Lane
      Parameters:
      gtuType - the GTU type to provide the speed limits for
      Returns:
      speed limits
    • getSpeedLimits

      public SpeedLimits getSpeedLimits(GtuType gtuType, org.djunits.value.vdouble.scalar.Duration timeOfDay)
      Description copied from class: Lane
      Get the speed limits of this lane, which can differ per GTU type. E.g., a vehicle type speed limit may apply to trucks.
      Overrides:
      getSpeedLimits in class Lane
      Parameters:
      gtuType - the GTU type to provide the speed limits for
      timeOfDay - time-of-day
      Returns:
      speed limits
    • getSpeedLimit

      public Optional<SpeedLimit> getSpeedLimit()
      Description copied from class: Lane
      Returns the speed limit at the current time-of-day.
      Overrides:
      getSpeedLimit in class Lane
      Returns:
      speed limit, empty if no speed limit given
    • getSpeedLimit

      public Optional<SpeedLimit> getSpeedLimit(org.djunits.value.vdouble.scalar.Duration timeOfDay)
      Description copied from class: Lane
      Returns the speed limit.
      Overrides:
      getSpeedLimit in class Lane
      Parameters:
      timeOfDay - time-of-day
      Returns:
      speed limit, empty if no speed limit given