Hello, It would help if you could define a *minimal* example of what you try to accomplish and how various control approaches fail to perform as expected from the documentation. Personally I tend to define all possible phases in advance and then control the cycle via the traci.trafficlights.setPhase. It helps to set a high duration (1000s) for some of the pre-defined phases to avoid premature switching. For phases that always follow each other without variation, I use SUMOs native switching.
regards, Jakob 2016-04-04 14:19 GMT+02:00 <[email protected]>: > Hello, > > > > I am using SUMO 0.25.0 and trying to change the traffic signal plans for > every signal cycle. > > > > I have been using traci.trafficlights.setCompleteRedYellowGreenDefinition > to > define the new timing plans for the next cycle. I update the duration of > phases and increase the number of phases of a cycle when needed. However, I > have noticed that traffic lights in SUMO simulation do not always perform > the way I defined. Sometimes, the status (green,red and yellow) and the > duration of phase can be wrong. > > > > I did some tests by myself, and found the right time to use function > setCompleteRedYellowGreenDefinition is at the first time step when the new > cycle starts instead of the last time step of the current cycle. At the > same > time, I have to use function setPhaseDuration for the first phase of the > new > cycle to update the result in function getNextSwitch. But all of what I > tried still cannot guarantee SUMO to implement the traffic signal plans I > defined. > > > > I hope can have some advices for this situation, and please correct me if > what I said is incorrect. > > > > Many thanks, > > Rui > > > > > > > ------------------------------------------------------------------------------ > _______________________________________________ > sumo-user mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/sumo-user > ------------------------------------------------------------------------------ _______________________________________________ sumo-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/sumo-user
