[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [sumo-user] Traffic Signal State
|
Hi Rehab,
you can query the index of a connection within the signal state using sumolib.net.connection.getTLLinkIndex() . Figuring out which direction of a pedestrian crossing uses which signal requires some network traversal, at least the second index can be retrieved using sumolib.net.connection.getTLLinkIndex2().
Best regards,
Mirko
-----Original-Nachricht-----
Betreff: [sumo-user] Traffic Signal State
Datum: 2025-05-28T13:11:04+0200
Von: "Rehab Abdellatif via sumo-user" <sumo-user@xxxxxxxxxxx>
An: "Sumo project User discussions" <sumo-user@xxxxxxxxxxx>
Hi,
I'm importing a traffic model from SATURN (a traffic modeling software) into SUMO. I have an RGS file that contains traffic signal information, specifying which movements at each junction are allowed (green) or disallowed (red).
To convert this into a SUMO (TLL) file, I need to construct the signal state string, where each character represents the signal state (e.g., 'G', 'r') for a specific movement. I understand that these movements must follow a specific order corresponding to the internal connection order in SUMO.
My question is: how can I determine the correct order of connections at a specific junction in SUMO, so I can accurately form the corresponding signal state string? If I use sumolib to retrieve the connections of a junction, will this return the list of connections in the correct order?
Thanks,
Rehab