Class TrafficLightSensor

    • Constructor Detail

      • TrafficLightSensor

        public TrafficLightSensor​(String id,
                                  Lane laneA,
                                  Length positionA,
                                  Lane laneB,
                                  Length positionB,
                                  List<Lane> intermediateLanes,
                                  RelativePosition.TYPE entryPosition,
                                  RelativePosition.TYPE exitPosition,
                                  OTSSimulatorInterface simulator,
                                  Compatible compatible)
                           throws NetworkException
        Construct a new traffic light sensor.
        TODO Possibly provide the GTUTypes that trigger the sensor as an argument for the constructor
        Parameters:
        id - String; id of this sensor
        laneA - Lane; the lane of the A detection point of this traffic light sensor
        positionA - Length; the position of the A detection point of this traffic light sensor
        laneB - Lane; the lane of the B detection point of this traffic light sensor
        positionB - Length; the position of the B detection point of this traffic light sensor
        intermediateLanes - List<Lane>; list of intermediate lanes
        entryPosition - TYPE; the position on the GTUs that trigger the entry events
        exitPosition - TYPE; the position on the GTUs that trigger the exit events
        simulator - OTSSimulatorInterface; the simulator
        compatible - Compatible; object that checks that the detector detects a GTU.
        Throws:
        NetworkException - when the network is inconsistent.