Class SpeedBump
java.lang.Object
org.djutils.event.LocalEventProducer
org.opentrafficsim.core.object.StaticObject
org.opentrafficsim.road.network.object.AbstractLaneBasedObject
org.opentrafficsim.road.network.object.SpeedBump
- All Implemented Interfaces:
nl.tudelft.simulation.dsol.animation.Locatable,Identifiable,EventProducer,OtsShape,LocatedObject,LaneBasedObject
Speed bump. A speed plateau should be represented as two speed bumps as the location is infinitesimal.
Copyright (c) 2026-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 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
Constructors -
Method Summary
Methods inherited from class org.opentrafficsim.road.network.object.AbstractLaneBasedObject
getFullId, getLane, getLine, getLongitudinalPosition, init, toStringMethods inherited from class org.opentrafficsim.core.object.StaticObject
create, create, getAbsoluteContour, getHeight, getId, getLocation, getRelativeBounds, getRelativeContourMethods inherited from class org.djutils.event.LocalEventProducer
getEventListenerMapMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, 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, getEventListenerMap, getEventTypesWithListeners, getListenerReferences, hasListeners, numberOfListeners, removeAllListeners, removeAllListeners, removeListenerMethods inherited from interface org.djutils.base.Identifiable
getIdMethods inherited from interface org.opentrafficsim.road.network.object.LaneBasedObject
getLength, getLocation, getSimulatorMethods inherited from interface nl.tudelft.simulation.dsol.animation.Locatable
getZMethods inherited from interface org.opentrafficsim.core.object.LocatedObject
getHeightMethods inherited from interface org.opentrafficsim.base.geometry.OtsShape
contains, contains, getAbsoluteBounds, getAbsoluteContour, getAbsoluteContour, getDirZ, getRelativeBounds, getRelativeContour, signedDistance, signedDistance
-
Constructor Details
-
SpeedBump
public SpeedBump(String id, Lane lane, org.djunits.value.vdouble.scalar.Length longitudinalPosition, Map<GtuType, org.djunits.value.vdouble.scalar.Speed> speeds) throws NetworkExceptionConstructor.- Parameters:
id- idlane- lanelongitudinalPosition- positionspeeds- speeds- Throws:
NetworkException- when the position on the lane is out of bounds
-
-
Method Details
-
getSpeed
Returns the speed for the GTU type, or any of the parent types.- Parameters:
gtuType- GTU type- Returns:
- speed for the GTU type
- Throws:
OtsRuntimeException- if the speed bump cannot supply any speed for the GTU type
-