Package org.opentrafficsim.road.network
Class Shoulder
java.lang.Object
org.djutils.event.LocalEventProducer
org.opentrafficsim.road.network.CrossSectionElement
org.opentrafficsim.road.network.Lane
org.opentrafficsim.road.network.Shoulder
- All Implemented Interfaces:
nl.tudelft.simulation.dsol.animation.Locatable,Identifiable,EventProducer,OtsShape,HierarchicallyTyped<LaneType,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
-
Field Summary
Fields inherited from class org.opentrafficsim.road.network.Lane
DETECTOR_ADD_EVENT, DETECTOR_REMOVE_EVENT, GTU_ADD_EVENT, GTU_REMOVE_EVENT, MARGIN, OBJECT_ADD_EVENT, OBJECT_REMOVE_EVENTFields inherited from class org.opentrafficsim.road.network.CrossSectionElement
linkFields inherited from interface org.djutils.event.EventProducer
FIRST_POSITION, LAST_POSITIONFields inherited from interface org.opentrafficsim.base.geometry.OtsShape
DEFAULT_POLYGON_SEGMENTS, WORLD_MARGIN_LINE -
Constructor Summary
ConstructorsConstructorDescriptionShoulder(CrossSectionLink link, String id, CrossSectionGeometry geometry, LaneType laneType) Constructor specifying geometry. -
Method Summary
Modifier and TypeMethodDescriptiongetAdjacentLane(LateralDirectionality laneChangeDirection, GtuType gtuType) Returns one adjacent lane.Returns the speed limit at the current time-of-day.getSpeedLimit(org.djunits.value.vdouble.scalar.Duration timeOfDay) Returns the speed limit.getSpeedLimits(GtuType gtuType) Get the speed limits of this lane at the current time-of-day, which can differ per GTU type.getSpeedLimits(GtuType gtuType, org.djunits.value.vdouble.scalar.Duration timeOfDay) Get the speed limits of this lane, which can differ per GTU type.doublegetZ()Retrieve the Z offset (used to determine what covers what when drawing).Methods inherited from class org.opentrafficsim.road.network.Lane
accessibleAdjacentLanesLegal, accessibleAdjacentLanesPhysical, addDetector, addGtu, addGtu, addLaneBasedObject, coveredDistance, equals, forceNextLanes, forcePrevLanes, fraction, fractionAtCoveredDistance, fractionSI, getDetectorMap, getDetectors, getDetectors, getDetectors, getFirstGtu, getGtu, getGtu, getGtuAhead, getGtuBehind, getGtuList, getGtuList, getLaneBasedObjectMap, getLaneBasedObjects, getLaneBasedObjects, getLastGtu, getLeft, getObjectAhead, getObjectBehind, getRight, getType, hashCode, indexOfGtu, nextLanes, numberOfGtus, numberOfGtus, position, positionSI, prevLanes, remainingDistance, removeDetector, removeGtu, removeLaneBasedObject, toStringMethods inherited from class org.opentrafficsim.road.network.CrossSectionElement
getAbsoluteContour, getBeginWidth, getCenterLine, getElevation, getElevation, getEndWidth, getFullId, getGrade, getGrade, getId, getLateralBoundaryPosition, getLateralBoundaryPosition, getLateralCenterPosition, getLateralCenterPosition, getLength, getLink, getLocation, getNetwork, getOffsetAtBegin, getOffsetAtEnd, getRelativeBounds, getRelativeContour, getWidth, getWidthMethods inherited from class org.djutils.event.LocalEventProducer
getEventListenerMapMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.djutils.event.EventProducer
addListener, addListener, addListener, addListener, fireEvent, fireEvent, fireEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, getEventTypesWithListeners, getListenerReferences, hasListeners, numberOfListeners, removeAllListeners, removeAllListeners, removeListenerMethods inherited from interface org.opentrafficsim.base.HierarchicallyTyped
isOfTypeMethods inherited from interface org.opentrafficsim.base.geometry.OtsShape
contains, contains, getAbsoluteBounds, getAbsoluteContour, getDirZ, signedDistance, signedDistance
-
Constructor Details
-
Shoulder
Constructor specifying geometry.- Parameters:
link- linkid- the id of this lane within the link; should be unique within the linkgeometry- geometrylaneType- lane type
-
-
Method Details
-
getAdjacentLane
Returns one adjacent lane.- Overrides:
getAdjacentLanein classLane- Parameters:
laneChangeDirection- lane change directiongtuType- GTU type.- Returns:
- adjacent lane, empty if none
-
getZ
public double getZ()Description copied from class:CrossSectionElementRetrieve the Z offset (used to determine what covers what when drawing).- Specified by:
getZin interfacenl.tudelft.simulation.dsol.animation.Locatable- Overrides:
getZin classCrossSectionElement- Returns:
- the Z-offset for drawing (what's on top, what's underneath).
-
getSpeedLimits
Description copied from class:LaneGet 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:
getSpeedLimitsin classLane- 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:LaneGet the speed limits of this lane, which can differ per GTU type. E.g., a vehicle type speed limit may apply to trucks.- Overrides:
getSpeedLimitsin classLane- Parameters:
gtuType- the GTU type to provide the speed limits fortimeOfDay- time-of-day- Returns:
- speed limits
-
getSpeedLimit
Description copied from class:LaneReturns the speed limit at the current time-of-day.- Overrides:
getSpeedLimitin classLane- Returns:
- speed limit, empty if no speed limit given
-
getSpeedLimit
Description copied from class:LaneReturns the speed limit.- Overrides:
getSpeedLimitin classLane- Parameters:
timeOfDay- time-of-day- Returns:
- speed limit, empty if no speed limit given
-