0

I use Omnet++-4.6, sumo-0.22.0 and Veins-4a2.

In my simulation, I need to know how much time each car takes during the simulation.

So, I need to know the time which each car leaves the simulation.

How can I do this please?

Fariha
  • 497
  • 1
  • 5
  • 13
  • Unclear, you don't provide enough information to answer the question. Please read [this](http://stackoverflow.com/help/how-to-ask) and edit question or else this will get closed. – kebs Feb 13 '17 at 16:25
  • Aren't _departure_ time and _leaving_ time the same? Did you mean _departure and arrival_ time perhaps? – Dima Chubarov Feb 13 '17 at 16:35
  • Thank you for your response, I need to know when each car leaves the simulation. – Fariha Feb 13 '17 at 16:50

1 Answers1

2

You can use the finalize method in every module to execute code when the object gets destroyed (i.e. leaves the simulation). Try this in the car's application layer (e.g. TraciDemo11p).

Julian Heinovski
  • 1,822
  • 3
  • 16
  • 27
  • 1
    and similarly, you can use the initialization method to determine the start time, because each vehicle is initialized as they are created in SUMO. – Rens van der Heijden Feb 14 '17 at 08:28