首先,我使用"D:/example_project/veins-5.1/veins-veins-5.1/sumo-launchd.py veins_launchd来连接omnet和sumo,命令行是-vv -c 'D:/Program (X86)/Eclipse/sumo.exe‘“输出车道数据如下所示:

但是我想手动运行SUMO,所以我将TraCIScenarioManagerLaunchd修改为TraCIScenarioManager,并使用命令行"sumo -c llcd.sumocfg -remote-port 9999",然后等待omnet连接。这个方法是由这个答案Is there a way to connect multiple TraCI modules to the OMNet++/veins simulation?激发的。
但是,当我以这种方式运行时,输出结果如下:

为什么模拟结果会产生如此巨大的差异?我没有更改任何其他参数,而sumo配置文件也是相同的。
Omnetpp.ini中的一些参数设置:
##########################################################
# TraCIScenarioManager parameters #
##########################################################
*.manager.updateInterval = 1s
*.manager.host = "localhost"
*.manager.port = 9999
*.manager.autoShutdown = false
*.manager.launchConfig = xmldoc("llcd.launchd.xml")sumo.config:
<configuration>
<input>
<net-file value="D:\FTT\sumo_test\llcd\llcd.net.xml"/>
<route-files value="D:\FTT\sumo_test\llcd\llcd.rou.xml"/>
<additional-files value="D:\FTT\sumo_test\llcd\llcd.add.xml"/>
</input>
<output>
<lanechange-output value="D:\FTT\sumo_test\llcd\llcd.lanechange.xml"/>
<summary-output value="D:\FTT\sumo_test\llcd\output_sumo.xml"/>
</output>
<time>
<begin value="0"/>
<end value="3600"/>
</time>
<processing>
<time-to-teleport value="-1"/>
</processing>
<report>
<no-duration-log value="true"/>
<no-step-log value="true"/>
<no-warnings value="true"/>
</report>
</configuration>如果有人能给出一些见解呢?提前谢谢你!
发布于 2022-03-14 09:48:52
我解决了问题。我发现veins_launchd将通过添加
<random_number>
<random value="false"/>
<seed value="0"/>
</random_number>https://stackoverflow.com/questions/71458234
复制相似问题