public class SpeedSign extends AbstractLaneBasedObject
Copyright (c) 2013-2018 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
listenersFIRST_POSITION, LAST_POSITION| Constructor and Description |
|---|
SpeedSign(String id,
Lane lane,
LongitudinalDirectionality direction,
Length longitudinalPosition,
SimulatorInterface.TimeDoubleUnit simulator,
Speed speed)
Speed sign active all day for all GTU types.
|
SpeedSign(String id,
Lane lane,
LongitudinalDirectionality direction,
Length longitudinalPosition,
SimulatorInterface.TimeDoubleUnit simulator,
Speed speed,
Duration startTimeOfDay,
Duration endTimeOfDay)
Speed sign for all GTU types.
|
SpeedSign(String id,
Lane lane,
LongitudinalDirectionality direction,
Length longitudinalPosition,
SimulatorInterface.TimeDoubleUnit simulator,
Speed speed,
GTUType gtuType)
Speed sign active all day.
|
SpeedSign(String id,
Lane lane,
LongitudinalDirectionality direction,
Length longitudinalPosition,
SimulatorInterface.TimeDoubleUnit simulator,
Speed speed,
GTUType gtuType,
Duration startTimeOfDay,
Duration endTimeOfDay)
Construct a new SpeedSign.
|
| Modifier and Type | Method and Description |
|---|---|
AbstractLaneBasedObject |
clone(CrossSectionElement newCSE,
SimulatorInterface.TimeDoubleUnit newSimulator,
boolean animation)
Clone the LaneBasedObject for e.g., copying a network.
|
boolean |
equals(Object obj) |
Speed |
getSpeed()
Returns the speed.
|
int |
hashCode() |
boolean |
isActive(GTUType gtuTypeIn,
Duration time)
Return whether this speed limit is currently active.
|
String |
toString() |
clone, getDirection, getFullId, getLane, getLocation, getLongitudinalPositiongetBounds, getGeometry, getHeight, getIdaddListener, addListener, addListener, addListener, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, removeAllListeners, removeAllListeners, removeListenerclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetBounds, makeGeometrygetGeometry, getHeightgetIdaddListener, addListener, addListener, addListener, removeListenerpublic SpeedSign(String id, Lane lane, LongitudinalDirectionality direction, Length longitudinalPosition, SimulatorInterface.TimeDoubleUnit simulator, Speed speed, GTUType gtuType, Duration startTimeOfDay, Duration endTimeOfDay) throws NetworkException
id - String; the id of the new SpeedSignlane - Lane on/over which the SpeedSign is positioneddirection - LongitudinalDirectionality; driving direction for which the new SpeedSign applieslongitudinalPosition - Length; the longitudinal position along the lane of the new SpeedSignsimulator - SimulatorInterface.TimeDoubleUnit; the simulatorspeed - Speed; the speed limit shown by the new SpeedSigngtuType - GTU type that should obey the speed signstartTimeOfDay - start time-of-dayendTimeOfDay - end time-of-dayNetworkException - when the position on the lane is out of boundspublic SpeedSign(String id, Lane lane, LongitudinalDirectionality direction, Length longitudinalPosition, SimulatorInterface.TimeDoubleUnit simulator, Speed speed, GTUType gtuType) throws NetworkException
id - idlane - lanedirection - directionlongitudinalPosition - longitudinal positionsimulator - simulatorspeed - speedgtuType - GTU typeNetworkException - when the position on the lane is out of boundspublic SpeedSign(String id, Lane lane, LongitudinalDirectionality direction, Length longitudinalPosition, SimulatorInterface.TimeDoubleUnit simulator, Speed speed, Duration startTimeOfDay, Duration endTimeOfDay) throws NetworkException
id - idlane - lanedirection - directionlongitudinalPosition - longitudinal positionsimulator - simulatorspeed - speedstartTimeOfDay - start time-of-dayendTimeOfDay - end time-of-dayNetworkException - when the position on the lane is out of boundspublic SpeedSign(String id, Lane lane, LongitudinalDirectionality direction, Length longitudinalPosition, SimulatorInterface.TimeDoubleUnit simulator, Speed speed) throws NetworkException
id - idlane - lanedirection - directionlongitudinalPosition - longitudinal positionsimulator - simulatorspeed - speedNetworkException - when the position on the lane is out of boundspublic final boolean isActive(GTUType gtuTypeIn, Duration time)
gtuTypeIn - GTU typetime - current time-of-daypublic final Speed getSpeed()
public final AbstractLaneBasedObject clone(CrossSectionElement newCSE, SimulatorInterface.TimeDoubleUnit newSimulator, boolean animation) throws NetworkException
clone in class AbstractLaneBasedObjectnewCSE - CrossSectionElement; the new cross section element to which the clone belongsnewSimulator - SimulatorInterface.TimeDoubleUnit; the new simulator for this networkanimation - boolean; whether to (re)create animation or notNetworkException - in case the cloning failspublic final String toString()
toString in class AbstractLaneBasedObjectCopyright © 2014–2018 Delft University of Technology. All rights reserved.