Skip to main content

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

Dear Ei,

 

You should use getCompleteRedYellowGreenDefinition to get the traffic light logic, which has phases indicating the state of the traffic light (rgy…) and the duration of each phase.

 

               Didac

 

From: sumo-user-bounces@xxxxxxxxxxx <sumo-user-bounces@xxxxxxxxxxx> On Behalf Of Ei Ei Mon
Sent: 28 October 2018 06:18
To: sumo-user@xxxxxxxxxxx
Subject: [sumo-user] traci.trafficlight

 

  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 red/yellow/green duration from phase 0. Actually, I want to get the duration time of red or green in each phase.
Could you give me some suggestions? 
 
Thank you in advance. 
 
with best regards,


 

Back to the top