静脉:如果相扑中没有驾驶车辆,OMNET++模拟就会结束,但车辆是未来计划的



我使用静脉3.0, witch连接SUMO 0.21.0 omnet++ 4.4

在我的模拟中,每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++对未来的车辆一无所知。我怎样才能保持模拟,直到下一个车辆出现?

感谢您的关注

尝试在omnetpp.ini中设置*.manager.autoShutdown = false

在静脉3中,TraCIScenarioManagerLaunchd模块有一个参数bool autoShutdown = default(true),该参数决定了当没有更多的车辆进入模拟时是否停止模块。

最新更新