The results will have no meaningful ordering but sorting by distance should
be trivial based on vehicle positions.
You will also have to compute the correspondence to your own
cell-definitions. (Though you might pre-compute the corresponding cell for
each simulation edge and then retrieve the edge of each vehicle to speed
this up if efficiency is a concern).

Am Do., 8. Okt. 2020 um 04:20 Uhr schrieb Hao Zhou <[email protected]>:

> Thank you Jakob, I think traci.vehicle.subscribeContext() can help.
> Do you know how the results will be ordered if we subscible downstream
> vehicles ID within a certain distance? If they are ordered by distance to
> the reference vehicle, it will definitely save us some efforts.
>
> To get the aggregated values in road cells, I think we can retrieve
> vehicle position as well, and manually separate them into corresponding
> cells to get aggregated metrics. Do you have more efficient solutions?
>
> Thanks,
> Hao
>
> On October 5, 2020 at 11:21 PM, Jakob Erdmann <[email protected]>
> wrote:
>
> Hello,
> there is nothing that would give aggregated traffic data around a moving
> observer.
> However, you can get disaggregated data in these ways
> - post-simulation output:  --fcd-output with option --device.fcd.radius
> (only observer should be equipped with an fcd device)
> - online retrieval: traci.vehicle.subscribeContext
> https://sumo.dlr.de/docs/TraCI/Interfacing_TraCI_from_Python.html#context_subscriptions
> - post simulation output if only a portion of the fleet should be
> observable: https://sumo.dlr.de/docs/Simulation/Bluetooth.html
>
> regards,
> Jakob
>
> Am Di., 6. Okt. 2020 um 00:26 Uhr schrieb Hao Zhou <[email protected]
> >:
>
>> Hi SUMO community,
>>
>> I'm interested in an efficient, real-time method to retrieve aggregated
>> traffic measures around a moving observer. The fixed detectors are not very
>> handy because I want to know the densities (or speed) at the upstream and
>> downstream of a moving observer (car), as shown by the figure below. Those
>> aggregated info are ideally meaured in road cells with lengths between
>> 30m~60m.
>>
>> Anyone can share some neat ideas?
>>
>> Thank you in advance,
>>
>> Hao Zhou,
>> Georgia Tech
>> _______________________________________________
>> sumo-user mailing list
>> [email protected]
>> To unsubscribe from this list, visit
>> https://www.eclipse.org/mailman/listinfo/sumo-user
>>
> _______________________________________________
> sumo-user mailing list
> [email protected]
> To unsubscribe from this list, visit
> https://www.eclipse.org/mailman/listinfo/sumo-user
>
> _______________________________________________
> sumo-user mailing list
> [email protected]
> To unsubscribe from this list, visit
> https://www.eclipse.org/mailman/listinfo/sumo-user
>
_______________________________________________
sumo-user mailing list
[email protected]
To unsubscribe from this list, visit 
https://www.eclipse.org/mailman/listinfo/sumo-user

Reply via email to