0

My field of study is about travel time of cars so to evaluate my proposed methods it's very important to know how much time it takes for each individual car to reach to its destination
I use Veins 3.0, Sumo0.21.0 and Omnet++ 4.6 for simulation. I record destination of each car and base on their position, I record the exit time when a car reaches to its destination.

Is there a straightforward way to get notified when a car left the simulation?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129

1 Answers1

1

Veins 3.0 already records several metrics in each TraCIMobility module. Among them are each vehicle's startTime, stopTime, and totalTime in the simulation.

Vehicles get removed from the simulation when they arrive. This means that, if you want to execute arbitrary code when a vehicle leaves the simulation, you can just add this code to the finish method of any module contained in the vehicle.

Christoph Sommer
  • 6,893
  • 1
  • 17
  • 35