问题
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 ofintuniform(1,3)
and no differrences
来源:https://stackoverflow.com/questions/46756168/some-messages-are-lost-in-veins