Class AbstractTrafficLight

java.lang.Object
All Implemented Interfaces:
java.io.Serializable, Locatable, EventProducerInterface, Identifiable, Drawable, ObjectInterface, LaneBasedObject, TrafficLight
Direct Known Subclasses:
SimpleTrafficLight

public abstract class AbstractTrafficLight
extends AbstractLaneBasedObject
implements TrafficLight
Basic, abstract implementation of a traffic light.

Copyright (c) 2013-2020 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.

$LastChangedDate: 2015-07-24 02:58:59 +0200 (Fri, 24 Jul 2015) $, @version $Revision: 1147 $, by $Author: averbraeck $, initial version Nov 30, 2015
Author:
Alexander Verbraeck, Peter Knoppers
See Also:
Serialized Form
  • Field Details

    • DEFAULT_TRAFFICLIGHT_ELEVATION

      public static final Length DEFAULT_TRAFFICLIGHT_ELEVATION
      Default elevation of a traffic light (above zero; don't use this for lanes at non-zero elevation).
  • Constructor Details

    • AbstractTrafficLight

      public AbstractTrafficLight​(java.lang.String id, Lane lane, Length longitudinalPosition, DEVSSimulatorInterface.TimeDoubleUnit simulator, Length height) throws NetworkException
      Construct an AbstractTrafficLight with specified elevation.
      Parameters:
      id - String; traffic light id
      lane - Lane; lane where the traffic light is located
      longitudinalPosition - Length; position of the traffic light on the lane, in the design direction
      simulator - DEVSSimulatorInterface.TimeDoubleUnit; the simulator for animation and timed events
      height - Length; the elevation of the traffic light
      Throws:
      NetworkException - on failure to place the object
    • AbstractTrafficLight

      public AbstractTrafficLight​(java.lang.String id, Lane lane, Length longitudinalPosition, DEVSSimulatorInterface.TimeDoubleUnit simulator) throws NetworkException
      Construct an AbstractTrafficLight at default elevation (use only on roads at elevation 0).
      Parameters:
      id - String; traffic light id
      lane - Lane; lane where the traffic light is located
      longitudinalPosition - Length; position of the traffic light on the lane, in the design direction
      simulator - DEVSSimulatorInterface.TimeDoubleUnit; the simulator for animation and timed events
      Throws:
      NetworkException - on failure to place the object
  • Method Details