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.49k stars 1.41k forks source link

Edge arithmetic average speed output #6459

Open MarinaRoche opened 4 years ago

MarinaRoche commented 4 years ago

Hello all,

Edge-based measurements (https://sumo.dlr.de/docs/Simulation/Output/Lane-_or_Edge-based_Traffic_Measures.html) provide harmonic mean speed (which gives higher weight to slow vehicles) and is in accordance to FD diagram.

However, it will be very useful to also have the arithmetic mean speed over an edge (every vehicle weights the same). This is not the same as the arithmetic mean speed that is already available for a E1 detector.

This feature would be useful for correlation with some reporting services and I was willing it for long.

Best regards, Marina

namdre commented 4 years ago

You can get the arithmetic mean speed by setting edgeData attribute trackVehicles="true". see https://sumo.dlr.de/docs/Simulation/Output/Lane-_or_Edge-based_Traffic_Measures.html#meandata_definition

@behrisch (correct me If I'm wrong)

behrisch commented 4 years ago

Unfortunately tracking is not the solution, since it will only collect data for all the vehicles which enter in the interval (even if they only leave after the end of the interval) but will still do the harmonic mean. This provides some of the infrastructure needed to solve this but is not the solution yet.

MarinaRoche commented 4 years ago

Hello all,

seems that with the "trackvehicles" it is possible to retrieve data that can be used to calculate the arithmetic mean by postprocessing. Thank you very much for the information.

If you consider this can be added to the Sumo packages in the next release, I think it will be useful.

Regards!