How to run only a specific period of simulation in veins,omnet?

443 views Asked by At

I want to run LuSTScenario with veins,omnet,but the scenario is too big that the simulation runs very slowly. So it may cost one day or more to run a complete simulation.Is there any way to work smart and run only a specific period of simulation,such as 8:00AM-9:00AM,4:00PM-5:00PM?

1

There are 1 answers

0
Julian Heinovski On

Yes, you can ideed limit the simulation interval by using the following two parameters:

  1. firstStepAt from the TraCIScenarioManager to define the beginning of the simulation. Thus, Veins will only simulate vehicles starting from this point.
  2. sim-time-limit from OMNeT++ to define the end of the simulation.

Example (8:00 a.m. to 9:00 a.m.):

*.manager.firstStepAt = 28800s # 8:00 a.m.
sim-time-limit = 32400s # 9:00 a.m.

A few more hints for coping with a slow simulation:

  1. Compile your code in release mode
  2. Use Cmdenv as runtime environment (./run -u Cmdenv)