Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] setRedYellowGreenState

There are basically two different mechanisms for traffic lights in sumo:
1)  set states explicitliy using setRedYellowGreenState. In that case you have to track phase durations in your script and set the next phase yourself using setRedYellowGreenState again

2) define all phases you will ever need in a static signal plan and define all durations to their possible maximum duration. Then use setPhase to swtich to the next phase if you want to shorten a specific phase. This has the advantage that sumo can do some phase transitions automatically.

regards,
Jakob

2018-07-18 11:11 GMT+02:00 Manos Nestoras <nestoras@xxxxxxxxxxxxxx>:

Thank you, Jakob.

 

I was wrong. The runner.py script does not exit, but the execution of the traffic lights program stops and stays at the same phase as soon as the traci.trafficlight.setRedYellowGreenState("tl_J1", "GGGyrr") statement is given. What should I do to make the traffic lights proceed to the next phase?

 

Thanks again,

Manos

 

From: sumo-user-bounces@xxxxxxxxxxx <sumo-user-bounces@xxxxxxxxxxx> On Behalf Of Jakob Erdmann
Sent: Wednesday, July 18, 2018 1:12 AM
To: Sumo project User discussions <sumo-user@xxxxxxxxxxx>
Subject: Re: [sumo-user] setRedYellowGreenState

 

Exiting without any kind of error is quite unusual. Please run sumo with the option --log logfile and check if there are any sumo errors in the logfile.

What happens if you add print statements before and after the call to setRedYellowGreenState? Is only output from the first print statement visible?

 

2018-07-17 13:54 GMT+02:00 Manos Nestoras <nestoras@xxxxxxxxxxxxxx>:

Hi,

 

I facing trouble with the method setRedYellowGreenState() with TraCI.  I am using the method this way: traci.trafficlight.setRedYellowGreenState("tl_J1", "yyyyyy")

 

The py script does not create any error, but when it reaches the setRedYellowGreenState, it seems that “exits” the execution of TraCI.

 

Thank you,

Manos Nestoras


_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/sumo-user

 


_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/sumo-user



Back to the top