Omnet++ 和静脉:断言失败:omnetTimestep == serverTimestep
Omnet++ and veins: assert fail: omnetTimestep == serverTimestep
我正在尝试 运行 在 omnet++ 5.0 中使用 veins 4.4 的最小项目。使用本指南:https://github.com/burtonwilliamt/carlogicapi/tree/master/tutorials/VeinsTutorial 我设法获得他们的示例 运行ning.
然后我开始用我自己的(非常简单的)相扑网制作我自己的(非常相似的)版本。但是当我 运行 这个项目时,我得到了错误:
<!> Error in module (Veins::TraCIScenarioManagerLaunchd) CircleScenario.manager (id=6) at event #2, t=0.1: ASSERT: condition omnetTimestep == serverTimestep false in function processSimSubscription, veins/modules/mobility/traci/TraCIScenarioManager.cc line 724.
有人知道为什么会出现这个错误吗?
此项目中没有自定义 C++ 代码,只有 omnetpp.ini、sumo xml 文件和场景。
场景:
package circle;
import org.car2x.veins.nodes.Scenario;
network CircleScenario extends Scenario
{
//inherited from Scenario
connections allowunconnected:
}
omnetpp.ini:
[General]
cmdenv-express-mode = true
cmdenv-autoflush = true
cmdenv-status-frequency = 10000000s
#ned-path = ..
debug-on-errors = true
network = circle.CircleScenario # the package where the Scenario is
##### Simulation Parameters ######
# * means TutorialScenario at the begginning
#sim-time-limit = 1000s
#tkenv-image-path = path/to/background/image.png
*.playgroundSizeX = 1000m
*.playgroundSizeY = 1000m
*.playgroundSizeZ = 50m
##### TraCIScenarioManager Parameters ######
*.manager.updateInterval = 0.1s
*.manager.host = "localhost"
*.manager.port = 9999
*.manager.autoShutdown = false
*.manager.moduleType = "org.car2x.veins.nodes.Car"
*.manager.moduleName = "node"
*.manager.moduleDisplayString = ""
*.manager.launchConfig = xmldoc("circle.launchd.xml")
##### IEEE 802.11p Wireless Parameters #######
*.connectionManager.pMax = 20mW
*.connectionManager.sat = -89dBm
*.connectionManager.alpha = 2.0
*.connectionManager.carrierFrequency = 5.890e9 Hz
*.connectionManager.sendDirect = true
*.node[*].nicType = "Nic80211p"
*.**.nic.mac1609_4.txPower = 20mW
*.**.nic.mac1609_4.bitrate = 18Mbps
*.**.nic.phy80211p.sensitivity = -89dBm
*.**.nic.phy80211p.useThermalNoise = true
*.**.nic.phy80211p.thermalNoise = -110dBm
*.**.nic.phy80211p.usePropagationDelay = true
##### Car Parameters #####
# Application Parameters
# Mobility Parameters
*.node[*].veinsmobilityType =
"org.car2x.veins.modules.mobility.traci.TraCIMobility"
*.node[*].veinsmobility.x = 0
*.node[*].veinsmobility.y = 0
*.node[*].veinsmobility.z = 0
**.debug = true
**.coreDebug = true
编辑:相扑文件:
circle.edg.xml:
<!-- filename: circle.edg.xml -->
<edges>
<edge from="1" id="1to2" to="2" />
<edge from="2" id="2to3" to="3" />
<edge from="3" id="3to4" to="4" />
<edge from="4" id="out" to="5" />
</edges>
circle.launchd.xml
<?xml version="1.0"?>
<!-- debug config -->
<launch>
<copy file="circle.net.xml" />
<copy file="circle.rou.xml" />
<copy file="circle.settings.xml" />
<copy file="circle.sumo.cfg" type="config" />
</launch>
circle.nod.xml
<!-- filename: circle.nod.xml -->
<nodes>
<node id="1" x="-100.0" y="-100.0" />
<node id="2" x="-100.0" y="+100.0" />
<node id="3" x="+100.0" y="+100.0" />
<node id="4" x="+100.0" y="-100.0" />
<node id="5" x="+101.0" y="-100.0" />
</nodes>
circle.rou.xml:
<!-- filename: circle.rou.xml -->
<routes>
<vType accel="1.0" decel="5.0" id="Car" length="2.0" maxSpeed="30.0" sigma="0.0" />
<route id="route0" edges="1to2 2to3 3to4 out"/>
<vehicle depart="10" id="veh0" route="route0" type="Car" />
</routes>
circle.settings.xml
<!-- filename: circle.settings.xml -->
<viewsettings>
<viewport y="100" x="100" zoom="100"/>
<delay value="100"/>
</viewsettings>
circle.sumo.cfg
<!-- filename: circle.sumo.cfg -->
<configuration>
<input>
<net-file value="circle.net.xml"/>
<route-files value="circle.rou.xml"/>
</input>
<time>
<begin value="0"/>
<end value="10000"/>
</time>
</configuration>
网络文件有点长,所以我不会 post 它,但它是从 sumo 0.25 生成的,使用:
netconvert --node-files=circle.nod.xml --edge-files=circle.edg.xml --output-file=circle.net.xml
SUMO 的默认步长设置为 1 秒。发生错误是因为您通过在 omnetpp.ini 文件中设置 *.manager.updateInterval = 0.1s
为 OMNeT++ 模拟设置了不同的步长。您还需要为 SUMO 配置添加步长。这可以通过将 <step-length value="0.1"/>
添加到 XML 结构中的 <time>
元素来完成。
结果应如下所示:
<configuration>
<input>
<net-file value="circle.net.xml"/>
<route-files value="circle.rou.xml"/>
</input>
<time>
<begin value="0"/>
<end value="10000"/>
<step-length value="0.1"/>
</time>
</configuration>
我正在尝试 运行 在 omnet++ 5.0 中使用 veins 4.4 的最小项目。使用本指南:https://github.com/burtonwilliamt/carlogicapi/tree/master/tutorials/VeinsTutorial 我设法获得他们的示例 运行ning.
然后我开始用我自己的(非常简单的)相扑网制作我自己的(非常相似的)版本。但是当我 运行 这个项目时,我得到了错误:
<!> Error in module (Veins::TraCIScenarioManagerLaunchd) CircleScenario.manager (id=6) at event #2, t=0.1: ASSERT: condition omnetTimestep == serverTimestep false in function processSimSubscription, veins/modules/mobility/traci/TraCIScenarioManager.cc line 724.
有人知道为什么会出现这个错误吗?
此项目中没有自定义 C++ 代码,只有 omnetpp.ini、sumo xml 文件和场景。
场景:
package circle;
import org.car2x.veins.nodes.Scenario;
network CircleScenario extends Scenario
{
//inherited from Scenario
connections allowunconnected:
}
omnetpp.ini:
[General]
cmdenv-express-mode = true
cmdenv-autoflush = true
cmdenv-status-frequency = 10000000s
#ned-path = ..
debug-on-errors = true
network = circle.CircleScenario # the package where the Scenario is
##### Simulation Parameters ######
# * means TutorialScenario at the begginning
#sim-time-limit = 1000s
#tkenv-image-path = path/to/background/image.png
*.playgroundSizeX = 1000m
*.playgroundSizeY = 1000m
*.playgroundSizeZ = 50m
##### TraCIScenarioManager Parameters ######
*.manager.updateInterval = 0.1s
*.manager.host = "localhost"
*.manager.port = 9999
*.manager.autoShutdown = false
*.manager.moduleType = "org.car2x.veins.nodes.Car"
*.manager.moduleName = "node"
*.manager.moduleDisplayString = ""
*.manager.launchConfig = xmldoc("circle.launchd.xml")
##### IEEE 802.11p Wireless Parameters #######
*.connectionManager.pMax = 20mW
*.connectionManager.sat = -89dBm
*.connectionManager.alpha = 2.0
*.connectionManager.carrierFrequency = 5.890e9 Hz
*.connectionManager.sendDirect = true
*.node[*].nicType = "Nic80211p"
*.**.nic.mac1609_4.txPower = 20mW
*.**.nic.mac1609_4.bitrate = 18Mbps
*.**.nic.phy80211p.sensitivity = -89dBm
*.**.nic.phy80211p.useThermalNoise = true
*.**.nic.phy80211p.thermalNoise = -110dBm
*.**.nic.phy80211p.usePropagationDelay = true
##### Car Parameters #####
# Application Parameters
# Mobility Parameters
*.node[*].veinsmobilityType =
"org.car2x.veins.modules.mobility.traci.TraCIMobility"
*.node[*].veinsmobility.x = 0
*.node[*].veinsmobility.y = 0
*.node[*].veinsmobility.z = 0
**.debug = true
**.coreDebug = true
编辑:相扑文件:
circle.edg.xml:
<!-- filename: circle.edg.xml -->
<edges>
<edge from="1" id="1to2" to="2" />
<edge from="2" id="2to3" to="3" />
<edge from="3" id="3to4" to="4" />
<edge from="4" id="out" to="5" />
</edges>
circle.launchd.xml
<?xml version="1.0"?>
<!-- debug config -->
<launch>
<copy file="circle.net.xml" />
<copy file="circle.rou.xml" />
<copy file="circle.settings.xml" />
<copy file="circle.sumo.cfg" type="config" />
</launch>
circle.nod.xml
<!-- filename: circle.nod.xml -->
<nodes>
<node id="1" x="-100.0" y="-100.0" />
<node id="2" x="-100.0" y="+100.0" />
<node id="3" x="+100.0" y="+100.0" />
<node id="4" x="+100.0" y="-100.0" />
<node id="5" x="+101.0" y="-100.0" />
</nodes>
circle.rou.xml:
<!-- filename: circle.rou.xml -->
<routes>
<vType accel="1.0" decel="5.0" id="Car" length="2.0" maxSpeed="30.0" sigma="0.0" />
<route id="route0" edges="1to2 2to3 3to4 out"/>
<vehicle depart="10" id="veh0" route="route0" type="Car" />
</routes>
circle.settings.xml
<!-- filename: circle.settings.xml -->
<viewsettings>
<viewport y="100" x="100" zoom="100"/>
<delay value="100"/>
</viewsettings>
circle.sumo.cfg
<!-- filename: circle.sumo.cfg -->
<configuration>
<input>
<net-file value="circle.net.xml"/>
<route-files value="circle.rou.xml"/>
</input>
<time>
<begin value="0"/>
<end value="10000"/>
</time>
</configuration>
网络文件有点长,所以我不会 post 它,但它是从 sumo 0.25 生成的,使用:
netconvert --node-files=circle.nod.xml --edge-files=circle.edg.xml --output-file=circle.net.xml
SUMO 的默认步长设置为 1 秒。发生错误是因为您通过在 omnetpp.ini 文件中设置 *.manager.updateInterval = 0.1s
为 OMNeT++ 模拟设置了不同的步长。您还需要为 SUMO 配置添加步长。这可以通过将 <step-length value="0.1"/>
添加到 XML 结构中的 <time>
元素来完成。
结果应如下所示:
<configuration>
<input>
<net-file value="circle.net.xml"/>
<route-files value="circle.rou.xml"/>
</input>
<time>
<begin value="0"/>
<end value="10000"/>
<step-length value="0.1"/>
</time>
</configuration>