Some Messages are lost in veins

﹥>﹥吖頭↗ 提交于 2021-02-20 01:50:42

问题


I'm using VEINS4.4, OMNeT++ 5.0 and SUMO 0.25

My project involves vehicles to exchange 5 types of messages and # of vehicles is more than 200 , and i some of messages not received by others and when i traced the problem , i discovered that they lost because 'A packet was not received due to biterrors or packet was not received correctly, sending it as control message to upper layer'.

I have found solution in one of sites and i have applied in my code ,and it solved the problem little bit because some messages were lost and now other vehicles received it ,but i have still some other messages are lost and not received by others with same previous error. I need to get rid of this problem, please how ?

The solution that mentioned in one of sites was to add jitters in sending:

1) To add this in initialize :

if (sendBeacon) {
    scheduleAt(simTime()+ intuniform(1,3)* (par("beaconInterval").doubleValue()), sendRequestEvt);
}

2) Add this to handle self message :

scheduleAt(simTime()+(par("beaconInterval").doubleValue()), sendRequestEvt);
  • i have put dblrand() instead of intuniform(1,3) and no differrences

来源:https://stackoverflow.com/questions/46756168/some-messages-are-lost-in-veins

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!