Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] Total Distance Traveled using traci

Hi Mirko,

Thanks for the information. So, is there any other method to calculate the total distance traveled. I may run the traci.vehicle.getDistance(VehID) every time step and store only positive values but this will be computionally expensive. 

Best regards,


From: sumo-user <sumo-user-bounces@xxxxxxxxxxx> on behalf of Mirko Barthauer via sumo-user <sumo-user@xxxxxxxxxxx>
Sent: Friday, July 14, 2023 8:51:55 AM
To: Sumo project User discussions
Cc: Mirko Barthauer
Subject: Re: [sumo-user] Total Distance Traveled using traci

Hi Sharif,


this happens when a vehicle is currently out of the road network. You get INVALID_DOUBLE_VALUE = -1073741824.0 returned. The taxi might be parked / pick up a passenger. In this case, the distance cannot be calculated because  e.g. a parking lot can be placed freely in the net without caring much about its access lanes.


Best regards






Betreff: [sumo-user] Total Distance Traveled using traci

Datum: 2023-07-14T00:42:21+0200

Von: "Sharifullah Asady via sumo-user" <sumo-user@xxxxxxxxxxx>

An: "Sumo project User discussions" <sumo-user@xxxxxxxxxxx>






I am using traci.vehicle.getDistance(VehID) to calculate the total distance traveled by taxis. For some of the taxis, I get a very large negative value. As I have a fleet of taxis so the number of getting invalid numbers changes every time I run the simulation.


Thanks for the assistance.


Best regards,


Back to the top