Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] Validation for Traffic Phase

Hello,
there is a simple case and a complex case.
In the simple case:
 - each traffic light controls a singe network junction
 -  the traffic light has the same id as the junction
 - each index of the traffic light state corresponds to a single lane-to-lane connection and those indices have not been change from their default values
If these conditions are met, you can use sumolib function net.getNode(nodeID).areFoes(index1, index2) for each pair of indices that have a 'G'.
see https://sumo.dlr.de/docs/Tools/Sumolib.html

In the complex case you have to establish the correspondence between traffic light indices and junction indices. This can be done with the help of
sumolib.net.getTLS(tlsID).getConnections()
sumolib.node.getLinkIndex

Alternatively, you can use traci:
- use traci.trafficlight.getControlledLinks to find the internal lane(s) controlled by a given traffic light index (called viaLane in the result object)
- use traci.lane.getInternalFoes to find which internal lanes are in conflict with each other

regards,
Jakob


Am Fr., 29. Mai 2020 um 22:30 Uhr schrieb . Abdullah <ab11@xxxxxxxxxxx>:
Hi,

my name is Abdullah. I am using SUMO in my thesis. I wanted to know if there is a way to validate that a junction's traffic phase like this 'GrGr' phase (for a simple four way intersection where cars can only go straight) is correct but 'GGGr' is incorrect. I have not found a function in traci that provides sufficient information to be able to deduce this.

Is it possible to do this? Also is it possible to get topological information like coordinates of a lane?

Thank you for your help. 

--
Thank you.
Abdullah
_______________________________________________
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