Class AbstractTrafficLight

    • Field Detail

      • 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 Detail

      • AbstractTrafficLight

        public AbstractTrafficLight​(String id,
                                    Lane lane,
                                    Length longitudinalPosition,
                                    OTSSimulatorInterface 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 - OTSSimulatorInterface; 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​(String id,
                                    Lane lane,
                                    Length longitudinalPosition,
                                    OTSSimulatorInterface 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 - OTSSimulatorInterface; the simulator for animation and timed events
        Throws:
        NetworkException - on failure to place the object