使用RandomWPMobility、omnet++仿真环境时报错
error when using RandomWPMobility, omnet++ simulation environment
我正在学习使用 AODV 协议(作为 INET 库的一部分实现)在 omnet++(版本 5.1.1,ubuntu 16.04,x64)中模拟无线通信的教程。
我使用了以下代码:
*.host*.mobilityType = "RandomWPMobility"
*.host*.mobility.waitTime= uniform (100s,500s)
*.host*.mobility.speed = uniform(1mps, 10mps)
*.host*.mobility.updateInterval = 0.1s
当 运行 代码出现错误时:
Cannot schedule message (omnetpp::cMessage)move to the past, t=-9.22337e+06 -- in module (inet::RandomWPMobility) Basic.hostA.mobility (id=39), during network initialization
有人可以帮我解决这个错误吗?
我在本教程中遇到了同样的错误。我不知道它的确切来源,但这是我找到的解决方案:
omnetpp.ini
[Config TestRandomWPMobility2]
network = MobileNetwork
*.host[0].udpApp[0].typename = "UDPBasicApp" # Protocole de communication
*.host[1].udpApp[0].typename = "UDPSink" # hostMobB = jette les messages recus
*.host*.wlan[0].typename = "IdealWirelessNic"
**.constraintAreaMinX = 0m
**.constraintAreaMinY = 0m
**.constraintAreaMinZ = 0m
**.constraintAreaMaxX = 600m
**.constraintAreaMaxY = 400m
**.constraintAreaMaxZ = 0m
**.updateInterval = 0.1s # test with 0s too, and let getCurrentPosition update the display string from a test module
*.numHosts = 5
**.host*.mobilityType = "RandomWPMobility"
**.host[0].mobility.speed = 10*uniform(20mps,50mps)
**.host*.mobility.speed = uniform(20mps,50mps)
**.host*.mobility.waitTime = uniform(3s,8s)
MobileNetwork.ned:
network MobileNetwork
{
parameters:
int numHosts;
@display("bgb=600,400");
submodules:
host[numHosts]: MobileHost {
parameters:
@display("p=400+50*numHosts,300+50*numHosts;r=,,#707070");
}
}
希望对您有所帮助。
我正在学习使用 AODV 协议(作为 INET 库的一部分实现)在 omnet++(版本 5.1.1,ubuntu 16.04,x64)中模拟无线通信的教程。 我使用了以下代码:
*.host*.mobilityType = "RandomWPMobility"
*.host*.mobility.waitTime= uniform (100s,500s)
*.host*.mobility.speed = uniform(1mps, 10mps)
*.host*.mobility.updateInterval = 0.1s
当 运行 代码出现错误时:
Cannot schedule message (omnetpp::cMessage)move to the past, t=-9.22337e+06 -- in module (inet::RandomWPMobility) Basic.hostA.mobility (id=39), during network initialization
有人可以帮我解决这个错误吗?
我在本教程中遇到了同样的错误。我不知道它的确切来源,但这是我找到的解决方案:
omnetpp.ini
[Config TestRandomWPMobility2]
network = MobileNetwork
*.host[0].udpApp[0].typename = "UDPBasicApp" # Protocole de communication
*.host[1].udpApp[0].typename = "UDPSink" # hostMobB = jette les messages recus
*.host*.wlan[0].typename = "IdealWirelessNic"
**.constraintAreaMinX = 0m
**.constraintAreaMinY = 0m
**.constraintAreaMinZ = 0m
**.constraintAreaMaxX = 600m
**.constraintAreaMaxY = 400m
**.constraintAreaMaxZ = 0m
**.updateInterval = 0.1s # test with 0s too, and let getCurrentPosition update the display string from a test module
*.numHosts = 5
**.host*.mobilityType = "RandomWPMobility"
**.host[0].mobility.speed = 10*uniform(20mps,50mps)
**.host*.mobility.speed = uniform(20mps,50mps)
**.host*.mobility.waitTime = uniform(3s,8s)
MobileNetwork.ned:
network MobileNetwork
{
parameters:
int numHosts;
@display("bgb=600,400");
submodules:
host[numHosts]: MobileHost {
parameters:
@display("p=400+50*numHosts,300+50*numHosts;r=,,#707070");
}
}
希望对您有所帮助。