"Reflecting the wall" in Random Waypoint Mobility model

89 views
Skip to first unread message

adisi...@gmail.com

unread,
Apr 24, 2017, 5:50:18 PM4/24/17
to OMNeT++ Users
Hello Everyone,

I am working with the DSDV protocol using the Inetmanet framework and using the RandomWaypointMobility model for the movement of the nodes. Right now, as the simulation progresses the nodes move out of the simulation area. In the INET documentation, it states that the mobility component should call the "handleIfOutside" method which offers the following 4 policies:"reflect of the wall", "reappear at the opposite edge (torus area)", "placed at a randomly chosen position of the area", "stop the simulation with an error". I would be really glad if anyone can tel me how I should implement any of these policies so that the nodes don't move out of the simulation area or is it implemented by default? As of now, I think that its not implemented or enabled. How do I enable this reflecting feature?Any help would be really appreciated.

Thanks in Advance.

Regards,
Advithiya.

adisi...@gmail.com

unread,
Apr 27, 2017, 7:06:05 AM4/27/17
to OMNeT++ Users
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

Alfonso Ariza Quintana

unread,
Apr 27, 2017, 6:19:36 PM4/27/17
to omn...@googlegroups.com

Random Waypoint never should reflect with the walls, this model should never select a point outside of the area. The only cause that I can think that could set the node out of the constrain area is if initFromDisplayString  = true that is is the default valur


De: omn...@googlegroups.com <omn...@googlegroups.com> en nombre de adisi...@gmail.com <adisi...@gmail.com>
Enviado: jueves, 27 de abril de 2017 13:06:05
Para: OMNeT++ Users
Asunto: [Omnetpp-l] Re: "Reflecting the wall" in Random Waypoint Mobility model
 
--
You received this message because you are subscribed to the Google Groups "OMNeT++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to omnetpp+u...@googlegroups.com.
Visit this group at https://groups.google.com/group/omnetpp.
For more options, visit https://groups.google.com/d/optout.

adisi...@gmail.com

unread,
May 2, 2017, 5:49:06 AM5/2/17
to OMNeT++ Users, aari...@hotmail.com

Thank you for the reply Sir. I have set initFromDisplayString parameter to false. and have used the uniform(0m, 1000m) to spread the nodes uniformly in my constraint area. The "uniform" parameter places the nodes outside the constraint area even if there are 12 nodes or 100 nodes and if I set the "initFromDisplayString = true" then as the simulation progresses the nodes move out of the constraint area. I have attached a "zoomed out" screenshot of how my network looks after using the "uniform" parameter. But if I check the co-ordinates of the nodes, the co-ordinates never cross the value 1000x1000 eventhough they lie outside the constraint area. Does it have something to do with the GUI? Kindly advice Sir.

These are my parameters:

*.numHosts = 100

**.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
**.mobility.initFromDisplayString = false

Regards,
Advithiya
DSDV.png

adisi...@gmail.com

unread,
May 3, 2017, 10:26:37 AM5/3/17
to OMNeT++ Users, aari...@hotmail.com
Yes Sir. The co-ordinates are all inside the 1000x1000 area. Is it something to do with the GUI? Does it have a solution? Moreover, if I end the simulation, I get an error saying "QXcbWindow: Unhandled client message: "_GTK_LOAD_ICONTHEMES"". I read on the Internet about this Internet and it says that "my build is not picking up the toolbar icons from my system theme (that's what the _GTK_LOAD_ICONTHEMES error is about). I am using Omnet 5 right now. Does Omnet5.1 have an optimized GUI? Or is this error something negligible? Does it have an effect on the actual working of the protocol and the simulation? Kindly Help Sir!!!!!

Regards,
Advithiya.

adisi...@gmail.com

unread,
May 7, 2017, 3:20:13 AM5/7/17
to OMNeT++ Users, aari...@hotmail.com
Thank you Sir. Its working now. And with respect to the error, QXcbWindow: Unhandled client message: "_GTK_LOAD_ICONTHEMES", I re-installed Omnet++ and it got solved too. I humbly appreciate your help.

Regards,
Advithiya

adisi...@gmail.com

unread,
May 11, 2017, 7:10:02 AM5/11/17
to OMNeT++ Users, aari...@hotmail.com
Hello Alfonso Sir,

I am trying to implement a new Mobility model based on "RandomWayPoint" mobility model. In my mobility model, I would like to divide the Simulation surface into 6 areas and place 5-6 nodes in each of these smaller Simulation Areas. Then I would like to apply "RandomWayPoint"  mobility model in each of these simulation areas. I checked the code of RandomWayPoint mobility and its super class i.e MobilityBase.cc from where the initial positioning of the nodes is done. However I did not understand where to start "Dividing the Simulation Surface" process and then applying "RWP" model in each of the smaller areas. Kindly Help Sir!!!!!

Regards,
Advithiya
Reply all
Reply to author
Forward
0 new messages