Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] traci.trafficlight

Please read about the way traffic lights are modeled in sumo here: http://sumo.dlr.de/wiki/Simulation/Traffic_Lights#Defining_New_TLS-Programs
The interpretation of the state ("rrrrggrrrrrrrrrggrrrrrrrrrrrrrrr...") is explained there as well.

Am Sa., 27. Okt. 2018 um 19:01 Uhr schrieb Ei Ei Mon <eieimonimceits@xxxxxxxxx>:
How can I get the duration of red/yellow/green in each phase? Thank you.

On Sat, Oct 27, 2018 at 12:21 PM Ei Ei Mon <eieimonimceits@xxxxxxxxx> wrote:
Dear, 

when I use the following traci function: 
phase= traci.trafficlight.getPhase(controlledCluster) returns 0. 

rygstate=traci.trafficlight.getRedYellowGreenState(controlledCluster)
return ggGGGGGGGGGGGGGggrrrrrrrrrrrrrrrggrrrrrrrrrggrrrrrrrrrrrrrrr. 

duration=traci.trafficlight.getPhaseDuration(controlledCluster)
return 64.0.

in this case, according to my understanding, phase 0 takes 64 s. but I am not sure phase 0 is red/yellow/green.. 
Could you explain more for three cases :
1. traci.trafficlight.getPhase()
2. traci.trafficlight.getRedYellowGreenState()
3. traci.trafficlight.getPhaseDuration ()

Thank you in advance. 

with best regards,

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

Back to the top