Skip to main content

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

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,


Back to the top