Sha, Rui
2016-04-04 12:17:00 UTC
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
------------------------------------------------------------------------------
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
------------------------------------------------------------------------------