簡體   English   中英

使用omnet ++模擬環境的RandomWPMobility時出錯

[英]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

運行代碼時出現錯誤:

無法計划將消息(omnetpp :: cMessage)移至過去,t = -9.22337e + 06-在網絡初始化期間,模塊(inet :: RandomWPMobility)Basic.hostA.mobility(id = 39)中

有人可以幫我解決這個錯誤嗎?

我在本教程中遇到了相同的錯誤。 我不知道它的確切來源,但是這是我找到的解決方案:

omn​​etpp.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");
        }
}

我希望這能幫到您。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM