1

On Veins, when I create routes and set the number of vehicles/nodes in the scenario by the ini file (see below), they are insert in the simulation at the timestamp 1.2 s.

*.car[*].appl.numVehicles = 52

There is a way to insert the vehicles using *.car[*].appl.numVehicles at the timestamp 0 s?

I'd appreciate any help

Community
  • 1
  • 1
  • why would you want to have that? can you provide some details please – user4786271 Jan 30 '16 at 19:52
  • Just for one more "real" time of simulation. For example, If the cars are start to insert in the time 0 s, at the time 600 s, I will have 600 s of simulation instead 558.8 that I have now. I don't now how change the depart (1.2 s to 0 s) value using *.car[*].appl.numVehicles, in another way I can just set this depart time in the *.rou.xml file from SUMO. – João Batista Jan 30 '16 at 20:17
  • 1
    looking at the overall picture, changing the insertion time of the first vehicle will have miniscule effect on your simulation, you can simple ignore it. In principle many simulations have `warmup-period` where, for example the first `X` seconds of the simulation are ignored so that the simulation arrives to a steady state, meaning anything happening within the `X` seconds is ignored. So, being caught at 1.2 s is useless – user4786271 Jan 30 '16 at 20:48
  • Yes, was just for make more "beautiful" the simulation. I way to use `sim-time-limit = 600s` instead sim-time-limit = 601.2s`. Because in one presentation is hard to the people get why I put 601.2s. Maybe has a way to change the default depart time on OMNeT. In any way, thanks for your help until now : ). – João Batista Jan 31 '16 at 21:36

2 Answers2

0

I don't know which version of Veins you are playing with, but normaly the insertion time of vehicle is directed by your sumo.rou.xml file where you define routes for vehicles.

Check it first, by looking at the insertion time of vehicles

HanniBaL90
  • 535
  • 6
  • 18
  • Hello, I'm using Veins 3.0. Like you said, is normal insert the depart time in the *.rou.xml file, but in my case the OMNeT take care of this number of vehicles and yours inserts (route and depart time). With your answer I treid agian on my *.rou.xml file, but it didn't work because insert all the vehicles from the ini file, not only the number on numVehicle. Looking forward I found the reason for insert in 1.2 s. On TraCIScenarioManager.cc line 260 (if (simTime() > 1)) has a the test to insert after 1 s, probabily waiting for insert by vehicle ID. So, now it's Ok for me. thanks for your : ) – João Batista Feb 03 '16 at 11:17
0

I found the reason for insert in 1.2 s. On TraCIScenarioManager.cc (if (simTime() > 1)) has a the test to insert after 1 s, probably waiting for insert by "vehicle ID". So, now it's Ok for me. Thanks for all help : ).