public abstract class AbstractTrafficLight extends AbstractLaneBasedObject implements TrafficLight
Copyright (c) 2013-2016 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
| Modifier and Type | Field and Description |
|---|---|
static org.djunits.value.vdouble.scalar.Length |
DEFAULT_TRAFFICLIGHT_ELEVATION
Default elevation of a traffic light (above zero; don't use this for lanes at non-zero elevation).
|
TRAFFICLIGHT_CHANGE_EVENT| Constructor and Description |
|---|
AbstractTrafficLight(String id,
Lane lane,
org.djunits.value.vdouble.scalar.Length longitudinalPosition,
org.opentrafficsim.core.dsol.OTSDEVSSimulatorInterface simulator)
Construct an AbstractTrafficLight at default elevation (use only on roads at elevation 0).
|
AbstractTrafficLight(String id,
Lane lane,
org.djunits.value.vdouble.scalar.Length longitudinalPosition,
org.opentrafficsim.core.dsol.OTSDEVSSimulatorInterface simulator,
org.djunits.value.vdouble.scalar.Length height)
Construct an AbstractTrafficLight with specified elevation.
|
| Modifier and Type | Method and Description |
|---|---|
TrafficLightColor |
getTrafficLightColor() |
void |
setTrafficLightColor(TrafficLightColor trafficLightColor)
Set the new traffic light color.
|
clone, clone, getLane, getLocation, getLongitudinalPositiongetBounds, getGeometry, getHeight, getId, toStringaddListener, addListener, addListener, addListener, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, removeAllListeners, removeAllListeners, removeListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetBounds, getLane, getLocation, getLongitudinalPosition, makeGeometrypublic static final org.djunits.value.vdouble.scalar.Length DEFAULT_TRAFFICLIGHT_ELEVATION
public AbstractTrafficLight(String id, Lane lane, org.djunits.value.vdouble.scalar.Length longitudinalPosition, org.opentrafficsim.core.dsol.OTSDEVSSimulatorInterface simulator, org.djunits.value.vdouble.scalar.Length height) throws org.opentrafficsim.core.network.NetworkException
id - traffic light idlane - lane where the traffic light is locatedlongitudinalPosition - position of the traffic light on the lane, in the design directionsimulator - the simulator for animation and timed eventsheight - Length; the elevation of the traffic lightorg.opentrafficsim.core.network.NetworkException - on failure to place the objectpublic AbstractTrafficLight(String id, Lane lane, org.djunits.value.vdouble.scalar.Length longitudinalPosition, org.opentrafficsim.core.dsol.OTSDEVSSimulatorInterface simulator) throws org.opentrafficsim.core.network.NetworkException
id - traffic light idlane - lane where the traffic light is locatedlongitudinalPosition - position of the traffic light on the lane, in the design directionsimulator - the simulator for animation and timed eventsorg.opentrafficsim.core.network.NetworkException - on failure to place the objectpublic final TrafficLightColor getTrafficLightColor()
getTrafficLightColor in interface TrafficLightpublic final void setTrafficLightColor(TrafficLightColor trafficLightColor)
setTrafficLightColor in interface TrafficLighttrafficLightColor - set the trafficLightColorCopyright © 2014–2016 Delft University of Technology. All rights reserved.