In your while loop you also need to call traci.simulationStep(). Otherwise
nothing will happen in the simulation and the congestion can never be
cleared.
regards,
Jakob

2017-05-22 19:28 GMT+02:00 Flávio Alexandre <[email protected]>:

> Hello again. I'm trying to implement a traffic light control that
> checks the occupancy rate of the lanes. If both directions are
> congested, the priority route signal is opened. I'm trying to do this
> check by command (briefly):
>
> while (traci.lane.getLastStepHaltingNumber ("1i")):
>          traci.lane.setPhase ("0", 0)
>
>
> However, when entering the 'while' loop, the program 'hangs'. I would
> like to know how to solve this problem (or how to do the 'while loop'
> iteratively analyze the via).
>
> Grateful!
> Flávio Nunes
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> sumo-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/sumo-user
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
sumo-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sumo-user

Reply via email to