Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] detecor attributes in output file

Thank you both for your explanation.  I’ve tried the way by Hao. However, the mean speed of detector in every 30s is different from the speed value in output file. I can't figure it out. Could you please check the attachment ? 
Best Regards,
Wenxuan Wang

On 02/12/2020 01:46Jakob Erdmann<namdre.sumo@xxxxxxxxx> wrote:
Currently, there is no way to access aggregated output values via TraCI so you either have to aggregate them manually at runtime (as explained by Hao) or read them from the output file.
You can connect the output file directly to your program by using a socket address instead of a file path. In this case you would receive the aggregated values at each interval end. See https://sumo.dlr.de/docs/Basics/Using_the_Command_Line_Applications.html#writing_files

regards,
Jakob

Am Mi., 12. Feb. 2020 um 00:34 Uhr schrieb Hao Zhou <zhouhaoseu@xxxxxxxxxx>:
That’s a great question. I did some search before and end up using a workaround which manually computes those values by using traci’s value retrieval for induction loops. The idea is to retrieve the ID of vehicles on those loop sectors at last time step and current step. This is a bit cumbersome. I hope some smart guys can light us up. 

Best,
Hao

On Feb 11, 2020, at 5:42 PM, wangwenxuan <wangwenxuan@xxxxxxxxxxxxx> wrote:


Hello, 
I want to acquire some attributes in output file of detector, such as the speed or the occupancy during the interval period. Should I get these attributes by reading the output file? Is  there any other way? It seems that I can’t acquire them by TraCI.
Thank you very much!

Best Regards!
Wenxuan Wang

_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/sumo-user
_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/sumo-user

Attachment: detector.zip
Description: Zip archive


Back to the top