Forough
Forough

Reputation: 36

How to get acceleration of a vehicle in veins?

I am using veins-4.5 omnet++ 5 and sumo 0.29.0. How can I access the acceleration of a vehicle in veins?

Thanks a lot.

Upvotes: 2

Views: 370

Answers (1)

Christoph Sommer
Christoph Sommer

Reputation: 6943

As of SUMO 0.29.0, acceleration is not one of the variables exposed by the SUMO TraCI API of a vehicle - primarily because it is not one of the state variables of the most common car following models.

You will need to compute acceleration yourself, by comparing the current speed of a vehicle to its speed before the last update.

Note that there is more than one way of deriving acceleration from speed, depending on what you assume about the underlying process. For more details, there is a 2015 paper by Treiber and Kanagaraj that discusses this.

Upvotes: 1

Related Questions