关于VEINS中的车辆编号 [英] About vehicle number in VEINS
问题描述
我使用duarouter修改了erlagen.rou.xml,以获取车辆的随机路线.看起来像这样:
I modified the erlagen.rou.xml using duarouter to get the random routes for the vehicles. It looks like this:
<vehicle id="0" depart="0.00"><route edges="31401017#0 4006688#0 4006688#1 4006688#2 4006688#3 4006688#4 29900561#0 29900561#1 32270595 33174302#0 33174302#1 4686970#0 4686970#1 122161381 30350448 30350449 4047309 30751813 -35842306#1 -35842306#0 -4900741 -4900739#2 -4900739#1"/>
</vehicle>
<vehicle id="1" depart="1.00">
<route edges="19796637 122161381 30350448 8364476 30350450#0 30350450#1 30350450#2 4006702#0 31255203#0 -31241851#2 -31241851#1 -31241851#0 31241816#3 31241835#1 31241834#0"/>
</vehicle>
<vehicle id="2" depart="2.00">
<route edges="31401017#0 4006688#0 4006688#1 4006688#2 4006688#3 4006688#4 29900561#0 29900561#1 32270595 33174302#0 33174302#1 4686970#0 4686970#1 122161381 30350448 8364476 30350450#0 30350450#1 30350450#2 4006702#0 31255203#0 31255203#1"/>
</vehicle> .......
在VEINS的原始erlangen.rou.xml中,我可以通过使用omnetpp.ini文件中的"* .manager.numVehicles"或在erlangen中使用"number = 198"来控制车辆的数量. rou.xml".但是,当我仅使用omnetpp.ini文件中使用"* .manager.numVehicles = 5"的5辆车时,"erlangen.rou.xml"会生成多辆车.如何使用所需数量的车辆.
In the original erlangen.rou.xml of VEINS, I could control the number of vehicles either by using " *.manager.numVehicles" in the omnetpp.ini file or by using the "number =198" inside " erlangen.rou.xml". But when i use only 5 vehicles using " *.manager.numVehicles = 5" in omnetpp.ini file, there are multiple vehicles generated from the "erlangen.rou.xml". How can I use the desired number of vehicles.
谢谢.
推荐答案
Vines 4.6为SUMO创建的每辆(合格)车辆创建了一个新的网络节点(合格性可能受到车辆类型和关注区域的限制).
Veins 4.6 creates a new network node for every (eligible) vehicle created by SUMO (where eligibility can be limited by vehicle type and region of interest).
此外,点击此处查看负责此行为的源代码).
In addition, the numVehicles
parameter of the TraCIScenarioManager
classes of Veins 4.6 takes care of ensuring that at least this many vehicles are present in a simulation after every time step (click here to see the source code responsible for this behavior).
因此,numVehicles
参数不能用于限制车辆数量.为此,要么需要指示SUMO创建更少的车辆,要么需要指示SUMO定义一些路线,但根本不创建任何车辆(因此让numVehicles
参数接管了创建车辆的过程)
Thus, the numVehicles
parameter cannot be used to limit the number of vehicles. For this, either SUMO needs to be instructed to create fewer vehicles -- or SUMO needs to be instructed to define some routes but to create no vehicles at all (thus letting the numVehicles
parameter take over creation of vehicles)
这篇关于关于VEINS中的车辆编号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!