Co-Simulation/Sumo/sumo-1.7.0/src/microsim/traffic_lights/MSSOTLE2Sensors.cpp
/****************************************************************************/
/*
 * Count Sensors. Should be refactor to make a new class.
 */
Count Sensors. Should be refactor to make a new class.
Count Sensors . Should be refactor to make a new class .
void MSSOTLE2Sensors::buildCountSensors(
    MSTrafficLightLogic::LaneVectorVector controlledLanes,
    NLDetectorBuilder& nb) {
    MSLane* currentLane = nullptr;
    for (MSTrafficLightLogic::LaneVectorVector::const_iterator laneVector =
                controlledLanes.begin(); laneVector != controlledLanes.end();
            laneVector++) {
        for (MSTrafficLightLogic::LaneVector::const_iterator lane =
                    laneVector->begin(); lane != laneVector->end(); lane++) {
            currentLane = (*lane);
            buildCountSensorForLane(currentLane, nb);
        }
    }
}
void MSSOTLE2Sensors :: buildCountSensors ( MSTrafficLightLogic :: LaneVectorVector controlledLanes , NLDetectorBuilder & nb ) { MSLane * currentLane = nullptr ; for ( MSTrafficLightLogic :: LaneVectorVector :: const_iterator laneVector = controlledLanes . begin ( ) ; laneVector != controlledLanes . end ( ) ; laneVector ++ ) { for ( MSTrafficLightLogic :: LaneVector :: const_iterator lane = laneVector -> begin ( ) ; lane != laneVector -> end ( ) ; lane ++ ) { currentLane = ( * lane ) ; buildCountSensorForLane ( currentLane , nb ) ; } } }
Count Sensors.
Count Sensors .
//for each lane build an appropriate sensor on it //input and ouput lanes