private void setUp(org.movsim.autogen.TrafficLights trafficLightsInput, RoadNetwork roadNetwork) {
Map<String, ControllerGroup> controllerGroupInput = createControllerMapping(trafficLightsInput);
for (RoadSegment roadSegment : roadNetwork) {
for (TrafficLightLocation location : roadSegment.trafficLightLocations()) {
ControllerGroup controllerGroup = controllerGroupInput.get(location.controllerId());
if (controllerGroup == null) {
throw new IllegalStateException("no controllerGroup for id=" + location.controllerId()
+ " defined in input");
}
TrafficLight trafficLight = getOrCreate(location, controllerGroup);