I have scheduled a flow of vehicles to enter a route at different time steps using the rou.xml file in sumo. And I can see these vehicles entering in those specified times when I run the simulation with the sumo gui. But when I run my simulation with omnet++, the time seems to be different. I want to know why that is and how I can correct it if can. Please help.
Asked
Active
Viewed 92 times
0
-
How would I reproduce this problem on my own machine? Can you give a step by step instruction? – Christoph Sommer Sep 28 '22 at 12:37
-
In my case, what I did first was creating an accident by stopping a random vehicle in the flow by editing the rou.xml file (in veins example) instead of using omnetpp.ini file. Then I ran the simulation in SUMO and checked the time where the vehicle stopped. When I used the same rou.xml file and ran the simulation in omnet++, the time which the vehicle stopped was different. – Oshadhi Gunathileke Sep 30 '22 at 07:37
1 Answers
0
Vehicle movement in SUMO is random. You can choose a pseudorandom seed when the simulation starts. By default, Veins chooses a seed based on the run you are executing (same config, same seed - different replication, different seed). This means that the seed will likely be different to that of a SUMO simulation you manually start. If this is not what you want you will need to change either the seed that pure SUMO uses or the seed that Veins uses. Both are simple configuration options.

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