2015-10-06 52 views
2

我使用靜脈3.0,女巫連接SUMO 0.21.0OMNET ++ 4.4靜脈:OMNET ++仿真結束,如果在沒有SUMO駕駛車輛,但車輛計劃在未來

在我的模擬中,在道路開始時每5分鐘出現一輛新車,在道路上行駛,然後離開模擬。有時如果它有一個「事故」,它會提前離開模擬。所以它不會長達10分鐘,但只有幾秒鐘。

在這種情況下,我有時會遇到這樣的情況,即道路上沒有車輛:舊車輛駛離道路,而新車輛尚未出現。我的控制檯輸出看起來是這樣的:

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

它顯示了每一輛汽車,即開始了旅程,而此刻,當它結束了它的旅程。所以你可以看到,所有的車輛在1113秒出發。下一輛車將在時間出現1200秒

在這種情況下,OMNET ++會忽略,在幾分鐘內,一輛新車將出現並快速通過仿真直到最後,因爲它沒有更多事件。我收到消息:

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

我怎樣才能讓OMNET ++知道,一個新的汽車會出現在幾分鐘?現在只有SUMO在其路由文件中包含此信息。這裏我有6個流量。每個流量每30分鐘發送一輛車。總之,每5分鐘一輛新車就會出現在道路的起點。

<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" />

據我瞭解,OMNET ++不知道未來的車輛什麼。我怎樣才能讓模擬繼續存在,直到下一輛車出現?

感謝您的關注。

回答

2

嘗試在omnetpp.ini中設置*.manager.autoShutdown = false

在靜脈3中,TraCIScenarioManagerLaunchd模塊具有參數bool autoShutdown = default(true),該參數確定是否在模擬中沒有更多車輛時立即停止模塊。

+0

謝謝。有用。 – Alex