面临警告:VEINS 模拟中的 "Nic is not connected to any gates!"
Facing warning: "Nic is not connected to any gates!" in VEINS simulation
我正在使用 Veins 5.0、OMNet++ 5.5.1、SUMO 1.2.0
我在模拟中收到以下警告:
WARN (PhyLayer80211p)mpsScenario.node[0].nic.phy80211p: Nic is not connected to any gates!
这是我的 mpsScenario.ned 文件的样子:
import org.car2x.veins.base.connectionManager.ConnectionManager;
import org.car2x.veins.base.modules.BaseWorldUtility;
import org.car2x.veins.modules.mobility.traci.TraCIScenarioManager*;
import org.car2x.veins.modules.obstacle.ObstacleControl;
import org.car2x.veins.modules.world.annotations.AnnotationManager;
import org.car2x.veins.nodes.Car;
import org.car2x.veins.mps.traffic.BaseTrafficManager;
network mpsScenario {
parameters:
double playgroundSizeX @unit(m); // x size of the area the nodes are in (in meters)
double playgroundSizeY @unit(m); // y size of the area the nodes are in (in meters)
double playgroundSizeZ @unit(m); // z size of the area the nodes are in (in meters)
string trafficType;
@display("bgb=$playgroundSizeX,$playgroundSizeY");
@figure[description](type=text; pos=700,30; font=,,bold;
text="Aerolink(TM) Misbehavior Protection System Simulation");
submodules:
obstacles: ObstacleControl {
@display("p=240,50");
}
annotations: AnnotationManager {
@display("p=260,50");
}
connectionManager: ConnectionManager {
parameters:
@display("p=150,0;i=abstract/multicast");
}
world: BaseWorldUtility {
parameters:
playgroundSizeX = playgroundSizeX;
playgroundSizeY = playgroundSizeY;
playgroundSizeZ = playgroundSizeZ;
@display("p=30,0;i=misc/globe");
}
manager: TraCIScenarioManagerForker {
parameters:
@display("p=115,60");
}
trafficManager: <trafficType> like BaseTrafficManager {
@display("p=115,0");
}
node[0]: Car {
}
connections allowunconnected:
}
这基本上是带有一个自定义 trafficManager
模块的默认文件。此外,manager
指向 TraCIScenarioManagerForker
。
Car.ned 模块与 VEINS 5.0 提供的默认模块相同。
因为大部分都是默认的,我不明白为什么我会收到上述警告。由于此警告,车辆一收到新的 BSM,我就会收到 std::bad_alloc
错误。
编辑 1:添加 github 存储库中的 MWE
我的问题可以通过以下步骤重现:
- 从我的 veins 分支克隆我的分支
v5
:
git clone --branch v5 https://github.com/raash1d/veins
- 启动 OMNeT++
- 运行 来自
scenarios/mps/omnetpp.ini
的模拟;选择 "Gui" 配置名称。
- 单击 "RUN" 并观察 OMNeT++ Qtenv 中的日志消息 window。一旦创建了车辆,就会为 Nic 模块生成警告。
这最终会导致 std::bad_alloc
错误。
您的 OMNeT++ 模拟游乐场配置为 (in omnetpp.ini) 从 (0,0) 到 (10000,10000)。
您的 SUMO 道路网络(在 .net.xml 中)从 0.00,0.00 变为 5527.41,7491.84(没关系),但是您的 SUMO 建筑物(在 .poly.xml 中)从 -3255.66 变为,-3540.81 至 5794.35,8029.21.
这意味着您的模拟将尝试使用游乐场外的建筑物,这会导致游戏崩溃。您将需要增加模拟游乐场的大小。
我正在使用 Veins 5.0、OMNet++ 5.5.1、SUMO 1.2.0
我在模拟中收到以下警告:
WARN (PhyLayer80211p)mpsScenario.node[0].nic.phy80211p: Nic is not connected to any gates!
这是我的 mpsScenario.ned 文件的样子:
import org.car2x.veins.base.connectionManager.ConnectionManager;
import org.car2x.veins.base.modules.BaseWorldUtility;
import org.car2x.veins.modules.mobility.traci.TraCIScenarioManager*;
import org.car2x.veins.modules.obstacle.ObstacleControl;
import org.car2x.veins.modules.world.annotations.AnnotationManager;
import org.car2x.veins.nodes.Car;
import org.car2x.veins.mps.traffic.BaseTrafficManager;
network mpsScenario {
parameters:
double playgroundSizeX @unit(m); // x size of the area the nodes are in (in meters)
double playgroundSizeY @unit(m); // y size of the area the nodes are in (in meters)
double playgroundSizeZ @unit(m); // z size of the area the nodes are in (in meters)
string trafficType;
@display("bgb=$playgroundSizeX,$playgroundSizeY");
@figure[description](type=text; pos=700,30; font=,,bold;
text="Aerolink(TM) Misbehavior Protection System Simulation");
submodules:
obstacles: ObstacleControl {
@display("p=240,50");
}
annotations: AnnotationManager {
@display("p=260,50");
}
connectionManager: ConnectionManager {
parameters:
@display("p=150,0;i=abstract/multicast");
}
world: BaseWorldUtility {
parameters:
playgroundSizeX = playgroundSizeX;
playgroundSizeY = playgroundSizeY;
playgroundSizeZ = playgroundSizeZ;
@display("p=30,0;i=misc/globe");
}
manager: TraCIScenarioManagerForker {
parameters:
@display("p=115,60");
}
trafficManager: <trafficType> like BaseTrafficManager {
@display("p=115,0");
}
node[0]: Car {
}
connections allowunconnected:
}
这基本上是带有一个自定义 trafficManager
模块的默认文件。此外,manager
指向 TraCIScenarioManagerForker
。
Car.ned 模块与 VEINS 5.0 提供的默认模块相同。
因为大部分都是默认的,我不明白为什么我会收到上述警告。由于此警告,车辆一收到新的 BSM,我就会收到 std::bad_alloc
错误。
编辑 1:添加 github 存储库中的 MWE
我的问题可以通过以下步骤重现:
- 从我的 veins 分支克隆我的分支
v5
:
git clone --branch v5 https://github.com/raash1d/veins
- 启动 OMNeT++
- 运行 来自
scenarios/mps/omnetpp.ini
的模拟;选择 "Gui" 配置名称。 - 单击 "RUN" 并观察 OMNeT++ Qtenv 中的日志消息 window。一旦创建了车辆,就会为 Nic 模块生成警告。
这最终会导致 std::bad_alloc
错误。
您的 OMNeT++ 模拟游乐场配置为 (in omnetpp.ini) 从 (0,0) 到 (10000,10000)。
您的 SUMO 道路网络(在 .net.xml 中)从 0.00,0.00 变为 5527.41,7491.84(没关系),但是您的 SUMO 建筑物(在 .poly.xml 中)从 -3255.66 变为,-3540.81 至 5794.35,8029.21.
这意味着您的模拟将尝试使用游乐场外的建筑物,这会导致游戏崩溃。您将需要增加模拟游乐场的大小。