Bug 1918 - RandomWalk2dMobilityModel is stuck in the corner
RandomWalk2dMobilityModel is stuck in the corner
Status: NEW
Product: ns-3
Classification: Unclassified
Component: mobility models
All All
: P5 normal
Assigned To: ns-bugs
Depends on:
  Show dependency treegraph
Reported: 2014-05-21 15:10 EDT by Tommaso Pecorella
Modified: 2014-05-21 15:10 EDT (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Tommaso Pecorella 2014-05-21 15:10:56 EDT
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.