Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] How to obtain the red duration for a link with given index via Traci

trafficlight.getAllProgramLogics will return a list of programs and for each program you can retrieve the states and durations for all phases.

Am Fr., 5. Mai 2023 um 18:11 Uhr schrieb Tianjia Yang <tianjiayang254@xxxxxxxxx>:
Hi there,

I am trying to use Python to control a traffic light based on the duration in seconds of each link. So I need to obtain the current green or red duration for the given link via Traci.

I know that GetPhaseDuration can return the duration for the current phase. But I didn't find a way to get the current green or red duration for a given link.

Would your please help me with this? Thank you for your time.

Sincerely,

Tianjia Yang

_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user

Back to the top