Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-dev] Most efficient way to iterate all traffic lights and view vehicle types incoming?

Every traffic light supports retrieval of incoming lanes via method traffic. trafficlight.getControlledLanes (a list of ids)
You can use this to iterate over all vehicles on these lanes and figure out their types. If you need to correlated lanes with green phasesyou can use getControlledLinks but you first need to get a good understanding of how traffic lights are modelled in sumo to make use of the returned values

regards,
Jakob

 

Hey guys,

 

I figured out how to iterate all traffic lights using TraCI - pretty straight forward. But what is the most efficient way to view vehicle types on each incoming lane at each traffic light??? Putting induction loops on the incoming lanes of every light seems inefficient and I do not see a way to correlate the induction loops with the light for easy lookup. 

 


Back to the top