eclipse-sumo / sumo

Eclipse SUMO is an open source, highly portable, microscopic and continuous traffic simulation package designed to handle large networks. It allows for intermodal simulation including pedestrians and comes with a large set of tools for scenario creation.
https://eclipse.dev/sumo
Eclipse Public License 2.0
2.51k stars 1.42k forks source link

Detector #11274

Closed erev-84 closed 2 years ago

erev-84 commented 2 years ago

Hello,

I am trying to design a controller for determination of green light duration. In order to determine the duration of the traffic light, I need the number of vehicles waiting at the traffic light, the average waiting time, and the vehicle type(car, truck, ambulance etc…).

Which detector (E1, E2, E3) can I use to obtain this data? Also, is there any other way to get this data without using detector?

Thanks in advance,

m-kro commented 2 years ago

There are several TraCI functions you can use in this context. Examples:

erev-84 commented 2 years ago

Hello @m-kro,

what type detector should I use for such a project? E1, E2 or E3?

Also, Could you give me Short explaination about the differences between E1, E3 and E3 detectors please?

Thanks

m-kro commented 2 years ago

For detectors see docs. Any of the three types may work in your case. If you have not worked with detectors and TraCI yet, maybe start with E2 = lanearea.

erev-84 commented 2 years ago

Hello @m-kro ,

Is there any way to change the color of the E2 Detector or make it as transparent?

I tried to set roads as mark as front element, I don't know why, but I can only set one road as mark as front element. For example, I cannot set 4 different paths as "mark as front element" all at once, as seen in the screenshot below. so I think mark as front element is not the solution.

image

m-kro commented 2 years ago

You cannot configure the drawing order freely in SUMO (e.g. wouldn't make sense to draw the road above the cars). This "mark as front element" feature in netedit shall help only when editing overlapping elements.

Here is some text about changing the visual aspects in the GUI. You can hide detectors by setting their size to 0: In "Additionals" tab, set "Exaggerate" value to 0. Be beware of that this concerns all additional items (bus stops etc.), not just detectors.