Hello Alfonso Sir,
I changed the method to handle the nodes if they move outside of the simulation area in the Random Waypoint Mobility model. In the move() method, instead of raiseErrorIfOutside() method, I called the handleIfOutside() method with the following parameters :
double dummyAngle;
handleIfOutside(REFLECT, lastPosition, lastSpeed, dummyAngle);
In my .ini file, I have used the following parameters to set the initial positon of the nodes
**.constraintAreaMinX = 0m
**.constraintAreaMinY = 0m
**.constraintAreaMinZ = 0m
**.constraintAreaMaxX = 1000m
**.constraintAreaMaxY = 1000m
**.constraintAreaMaxZ = 0m
**.host[*].mobilityType = "RandomWPMobility"
*.host[*].mobility.initialX = uniform(0m, 1000m)
*.host[*].mobility.initialY = uniform(0m, 1000m)
**.host[*].mobility.speed = 10mps
However, if I use the uniform(0m, 1000m) value during the network setup phase, the nodes are located outside of the simulation area. And if I manually set the initial positions of the nodes in the .ini file, the nodes tend to move out of the simulation area as the simulation progresses and the handleIfOutside() method seems to have no effect.
Can you please suggest how to go about this issue, since I am not able to proceed any further with my simulation if the nodes move out of the simulation area. Kindly Help Sir!!!!!
Regards,
Advithiya