-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
I noticed that in the NEMA setting, when some phases are operating in minimum recall mode, calling traci.trafficlight.setNemaMaxGreens leads to unexpected behavior.
I have attached a simple example to reproduce this issue. The example includes a four-leg intersection, and the NEMA phase plan is shown below:
Only phases 1 and 5 are under minimum recall. This means that if there are not many vehicles arriving during these two phases, they will terminate early and return the unused green time to the coordinated phases (phases 2 and 6).
However, under this setting, if we change the maximum green time using traci.trafficlight.setNemaMaxGreens, phases 4 and 8 are skipped (as shown in the screenshot below), which is unexpected.
In the screenshot, we can see that after calling traci.trafficlight.setNemaMaxGreens at 900 seconds (which should be the beginning of a cycle), phases 2 and 6 receive 62 seconds of green time in that cycle, while phases 4 and 8 are missing entirely from that cycle.
If all phases are in max recall, then there is no such issue. You can verify this by calling traci.trafficlight.setProgram("J1", "no-min-recall") instead of traci.trafficlight.setProgram("J1", "has-min-recall") in my example.
This may be caused by a misunderstanding of the questions I asked in #17593 , however, I still think it is worth opening a new issue that provides a replicable example to help you identify this issue.
I tried the SUMO version of 1.24.0 and 1.26.0, and both of them behave the same.
And I am using Ubuntu 22.04.