Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[sumo-user] Phase analysis

Hi guys,
 
i would like to figure out how much time is left in one phase which started. So i wrote following code for this part:
 
traci.start(sumoCmd)
while i==0:
    k+=1
    traci.simulationStep()  
    if traci.trafficlight.getPhase("B") == 2:
        timeleft = traci.trafficlight.getNextSwitch("B") - traci.simulation.getTime()
traci.close()
 
But something is wrong which i cannot find out. Could you help me?

Back to the top