Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] Simulation vehicles information

Hello,
- the waiting time value that you retrieve does not correspond to your query interval. Due to the wait this value is reset you might even miss stopping time. I think its better to use getAccumulatedWaitingTime and set the option --waiting-time-memory 120
See http://www.sumo.dlr.de/daily/pydoc/traci._vehicle.html#VehicleDomain-getWaitingTime
http://www.sumo.dlr.de/daily/pydoc/traci._vehicle.html#VehicleDomain-getAccumulatedWaitingTime

- your approach is quite efficient already. If you need more speed consider get your outputs without TraCI (i.e. writing fcd output to a socket and filtering it simultaneously, or loading sumo as a library to circumvent the socket communication: http://sumo.dlr.de/wiki/Libsumo)

regards,
Jakob

2018-03-08 14:46 GMT+01:00 Thanos Tasakos <thanos.tas@xxxxxxxxx>:
Hello SUMO,

i am trying to get information about each vehicle in simulation in steps of 2 minutes. For this reason i do a simulation step of 2 minute and i have added a stepListener that gets at every step the list of vehicle ids and adds a subscription to every one of them(if it hasn't added yet),that returns the position,speed and waiting time of each vehicle.
The variable waiting_time refers to how much the vehicle have waited between the interval [current_time - 2minutes , current_time] , am i right?
Is my approach good from the aspect of computational speed, can i optimize further my code?

Best regards,
Thanos Tasakos

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



Back to the top