Class Shoulder
java.lang.Object
org.djutils.event.LocalEventProducer
org.opentrafficsim.road.network.lane.CrossSectionElement
org.opentrafficsim.road.network.lane.Lane
org.opentrafficsim.road.network.lane.Shoulder
- All Implemented Interfaces:
Serializable
,Remote
,nl.tudelft.simulation.dsol.animation.Locatable
,org.djutils.base.Identifiable
,org.djutils.event.EventProducer
,org.opentrafficsim.base.geometry.OtsLocatable
,org.opentrafficsim.base.geometry.SpatialObject
,org.opentrafficsim.base.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-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
- See Also:
-
Field Summary
Fields inherited from class org.opentrafficsim.road.network.lane.Lane
ADJACENT_MARGIN, DETECTOR_ADD_EVENT, DETECTOR_REMOVE_EVENT, GTU_ADD_EVENT, GTU_REMOVE_EVENT, MARGIN, OBJECT_ADD_EVENT, OBJECT_REMOVE_EVENT
Fields inherited from class org.opentrafficsim.road.network.lane.CrossSectionElement
link
Fields inherited from interface org.djutils.event.EventProducer
FIRST_POSITION, LAST_POSITION
-
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.org.djunits.value.vdouble.scalar.Speed
getSpeedLimit
(GtuType gtuType) Get the speed limit of this lane, which can differ per GTU type.double
getZ()
Retrieve the Z offset (used to determine what covers what when drawing).Methods inherited from class org.opentrafficsim.road.network.lane.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, getHighestSpeedLimit, getLaneBasedObjectMap, getLaneBasedObjects, getLaneBasedObjects, getLastGtu, getLowestSpeedLimit, getObjectAhead, getObjectBehind, getType, hashCode, indexOfGtu, indexOfGtu, nextLanes, numberOfGtus, numberOfGtus, position, positionSI, prevLanes, remainingDistance, removeDetector, removeGtu, removeLaneBasedObject, removeSpeedLimit, scheduleDetectorTriggers, setSpeedLimit, toString
Methods inherited from class org.opentrafficsim.road.network.lane.CrossSectionElement
getBeginWidth, getBounds, getCenterLine, getContour, getElevation, getElevation, getEndWidth, getFullId, getGrade, getGrade, getId, getLateralBoundaryPosition, getLateralBoundaryPosition, getLateralCenterPosition, getLateralCenterPosition, getLength, getLink, getLocation, getNetwork, getOffsetAtBegin, getOffsetAtEnd, getShape, getWidth, getWidth
Methods inherited from class org.djutils.event.LocalEventProducer
addListener, addListener, addListener, addListener, fireEvent, fireEvent, fireEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, getEventListenerMap, getEventTypesWithListeners, getListenerReferences, hasListeners, numberOfListeners, removeAllListeners, removeAllListeners, removeListener
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.opentrafficsim.base.HierarchicallyTyped
isOfType
Methods inherited from interface nl.tudelft.simulation.dsol.animation.Locatable
getDirZ
-
Constructor Details
-
Shoulder
public Shoulder(CrossSectionLink link, String id, CrossSectionGeometry geometry, LaneType laneType) throws NetworkException Constructor specifying geometry.- Parameters:
link
- linkid
- the id of this lane within the link; should be unique within the linkgeometry
- geometrylaneType
- lane type- Throws:
NetworkException
- when no cross-section slice is defined
-
-
Method Details
-
getAdjacentLane
Returns one adjacent lane.- Overrides:
getAdjacentLane
in classLane
- Parameters:
laneChangeDirection
- lane change directiongtuType
- GTU type.- Returns:
- adjacent lane,
null
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 interfacenl.tudelft.simulation.dsol.animation.Locatable
- Overrides:
getZ
in classCrossSectionElement
- Returns:
- the Z-offset for drawing (what's on top, what's underneath).
-
getSpeedLimit
public org.djunits.value.vdouble.scalar.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 classLane
- Parameters:
gtuType
- the GTU type to provide the speed limit for- Returns:
- the speedLimit.
- Throws:
NetworkException
- on network inconsistency
-