Skip to main content

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

 

 

Hi Sharif,

 

do you actually need to retrieve this information during the simulation? If not, consider using TripInfo output.

 

Best regards

Mirko

 

 

 

 

-----Original-Nachricht-----

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

Datum: 2023-07-14T09:35:29+0200

Von: "Sharifullah Asady" <sharif.asady@xxxxxx>

An: "Mirko Barthauer" <m.barthauer@xxxxxxxxxxx>, "Sumo project User discussions" <sumo-user@xxxxxxxxxxx>

 

 

 

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,

Sharif


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

Mirko

 

 

 

-----Original-Nachricht-----

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>

 

 

 

Hi, 

 

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,

Sharif

 



Back to the top