Bugzilla – Bug 1918
RandomWalk2dMobilityModel is stuck in the corner
Last modified: 2014-05-21 15:10:56 UTC
If the node reaches the corner (or it starts from a corner) the mobility model gets stuck. The reason is in RandomWalk2dMobilityModel::Rebound (Time delayLeft) The function checks what's the "closest" side of the bounds and changes the speed accordingly. If there are TWO equally close sides (as in a corner), only the horizontal speed is changed, and the vertical one is left as it is, leading to a loop. I suspect that a similar things happens in all the mobility models with bounds, as the Rectangle::GetClosestSide() function only returns a side and not a corner.