Class BusStop
java.lang.Object
org.djutils.event.LocalEventProducer
org.opentrafficsim.core.object.StaticObject
org.opentrafficsim.road.network.lane.object.AbstractLaneBasedObject
org.opentrafficsim.road.network.lane.object.BusStop
- All Implemented Interfaces:
Serializable
,Remote
,nl.tudelft.simulation.dsol.animation.Locatable
,org.djutils.base.Identifiable
,org.djutils.event.EventProducer
,org.opentrafficsim.base.geometry.OtsLocatable
,Drawable
,LocatedObject
,LaneBasedObject
A bus stop is a location on a lane. The stop has a name, and a set of lines. At a single stop in reality, there may be
different locations where busses stop for different lines. A
BusStop
pertains to only one such location. The bus stop
in reality is represented by a shared name over a few BusStop
's, with different lines. As lines may also be set
dynamically, the name and lines are insufficient to identify a specific BusStop
. Hence there is a fixed unique id per
BusStop
.
Copyright (c) 2013-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
- Author:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
- See Also:
-
Field Summary
Fields inherited from interface org.djutils.event.EventProducer
FIRST_POSITION, LAST_POSITION
-
Constructor Summary
-
Method Summary
Methods inherited from class org.opentrafficsim.road.network.lane.object.AbstractLaneBasedObject
getFullId, getLane, getLongitudinalPosition, init
Methods inherited from class org.opentrafficsim.core.object.StaticObject
create, create, getBounds, getGeometry, getHeight, getId, getLocation
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.djutils.event.EventProducer
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 interface org.djutils.base.Identifiable
getId
Methods inherited from interface org.opentrafficsim.road.network.lane.object.LaneBasedObject
getLength, getLocation
Methods inherited from interface nl.tudelft.simulation.dsol.animation.Locatable
getDirZ, getZ
Methods inherited from interface org.opentrafficsim.core.object.LocatedObject
getGeometry, getHeight
Methods inherited from interface org.opentrafficsim.base.geometry.OtsLocatable
getBounds
-
Constructor Details
-
BusStop
public BusStop(String id, Lane lane, org.djunits.value.vdouble.scalar.Length longitudinalPosition, String name, OtsSimulatorInterface simulator, GtuType busType) throws NetworkException - Parameters:
id
- String; idlane
- Lane; lanelongitudinalPosition
- Length; positionname
- String; name of stopsimulator
- OtsSimulatorInterface; the simulator to schedule onbusType
- GtuType; bus type.- Throws:
NetworkException
- when the position on the lane is out of bounds
-
-
Method Details
-
setLines
Sets the lines.- Parameters:
lines
- Set<String>; lines that stop at this location
-
getLines
Returns the lines set.- Returns:
- whether the lines belongs to this stop
-
getConflicts
Returns the downstream conflicts of the bus stop. Search is only performed over links with BUS_STOP priority.- Returns:
- downstream conflicts of the given conflict
-
hashCode
public final int hashCode() -
equals
-
toString
- Overrides:
toString
in classAbstractLaneBasedObject
-