2
votes

I am using veins 3.0, witch connects SUMO 0.21.0 to OMNET++ 4.4.

In my simulation a new vehicle appear every 5 minutes at the begin of the road, drives on the road, and then leave the simulation. Sometimes it leaves the simulations earlier, if it had an "accident". So it doesn't drive 10 minutes long, but only some seconds for example.

In this case sometimes I have the situation, that there are no vehicles on the road: the old vehicles leaved the road and the new one didn't appear yet. My console output looks like this:

Node flow0.0 attention rate 0.999982 Node flow1.0 attention rate 0.999972 Node flow2.0 attention rate 0.999964 Node flow3.0 attention rate 0.999942 Node flow1.0 Vehicle slides off the road! with attention rate 0.999972 at time 1008.1 Node flow0.0 Vehicle slides off the road! with attention rate 0.999982 at time 1048.1 Node flow2.0 Vehicle slides off the road! with attention rate 0.999964 at time 1103.1 Node flow3.0 Vehicle slides off the road! with attention rate 0.999942 at time 1113.1

It shows every vehicle, that started the journey, and the moment, when it ended its journey. So you can see, that all vehicles departed at time 1113 seconds. Next vehicle will appear at time 1200 seconds.

In this case OMNET++ ignores, that in some minutes a new vehicle will appear and goes fast through the simulation till the end, because it has no more events. I receive the message:

Simulation time limit reached -- simulation stopped at event #15076, t=86400.

How can I let OMNET++ know, that a new vehicle will appear in some minutes? Now only SUMO has this information in its route file. Here I have 6 flows. Every flow sends a vehicle every 30 minutes. In summary every 5 minutes a new vehicle appears at the beginning of the road.

<flow id="flow0" type="vtype6" route="B470" begin="0" end="1209600" period="1800"/> <flow id="flow1" type="vtype5" route="B470" begin="300" end="1209600" period="1800"/> <flow id="flow2" type="vtype4" route="B470" begin="600" end="1209600" period="1800"/> <flow id="flow3" type="vtype2" route="B470" begin="900" end="1209600" period="1800"/> <flow id="flow4" type="vtype1" route="B470" begin="1200" end="1209600" period="1800"/> <flow id="flow5" type="vtype0" route="B470" begin="1500" end="1209600" period="1800" />

As I understand, OMNET++ doesn't know anything about the future vehicles. How can I keep the simulation alive, until the next vehicle appear?

Thank you for your attention.

1

1 Answers

2
votes

Try setting *.manager.autoShutdown = false in your omnetpp.ini.

In Veins 3, the TraCIScenarioManagerLaunchd module has a parameter bool autoShutdown = default(true) that determines whether to stop the module as soon as no more vehicles are in the simulation.