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-2024 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

  • 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).
    • getSpeedLimit

      public Speed getSpeedLimit(GtuType gtuType) throws NetworkException
      Description copied from class: Lane
      Get the speed limit of this lane, which can differ per GTU type. E.g., cars might be allowed to drive 120 km/h and trucks 90 km/h.
      Overrides:
      getSpeedLimit in class Lane
      Parameters:
      gtuType - the GTU type to provide the speed limit for
      Returns:
      the speedLimit.
      Throws:
      NetworkException - on network inconsistency