Multiple Locations

59 views
Skip to first unread message

Hassam Mughal

unread,
Apr 16, 2020, 3:26:03 AM4/16/20
to ns-3-users
Greetings Everyone!

How can we divide the area into several multiple locations? Is there any way to use multiple bounds? For instance, I have a complete 1000x1000 area. I want to divide this area into 5 locations. Each location of 200x200 area. 
Can anyone please provide any reference, guidelines, hints regarding this? As this is not provided by any mobility model, so I am thinking to create my own mobility model to achieve this. But I am confused about how to implement this. 

Any guidance or help in this regard will be highly appreciated.

Thanks
Best Regards,

γιωργος γιωργος

unread,
Apr 16, 2020, 3:39:20 AM4/16/20
to ns-3-...@googlegroups.com
Hi,

Could you provide some more info about the use case? What do you plan to observe on these areas?
If you want your nodes to follow specific paths, you could try manipulating them in a mobility simulator(e.g. SUMO) in order to have them move in your 5 areas.
Btw, I don't know if you want to divide the whole 1000x1000 area, but if you do you need 25 200x200 areas to cover the entire surface.

George

--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ns-3-users/35a918c5-d58c-4abf-babf-27c78bab2086%40googlegroups.com.

Hassam Mughal

unread,
Apr 16, 2020, 3:44:18 AM4/16/20
to ns-3-users
Hello George,
Thanks for your prompt response. I am trying to implement a location prediction mechanism. In my case, I am considering five locations. A node can move to either of the locations from its current location based on the probability value in its location transition matrix. For instance, a node is at location L1 and the next most probable location is L3 because it has been over there several times already, so the probability of it being at L1 is higher to have L3 as its next location.


On Thursday, April 16, 2020 at 4:39:20 PM UTC+9, George Katsouris wrote:
Hi,

Could you provide some more info about the use case? What do you plan to observe on these areas?
If you want your nodes to follow specific paths, you could try manipulating them in a mobility simulator(e.g. SUMO) in order to have them move in your 5 areas.
Btw, I don't know if you want to divide the whole 1000x1000 area, but if you do you need 25 200x200 areas to cover the entire surface.

George

Στις Πέμ, 16 Απρ 2020 στις 10:26 π.μ., ο/η Hassam Mughal <hassammu...@gmail.com> έγραψε:
Greetings Everyone!

How can we divide the area into several multiple locations? Is there any way to use multiple bounds? For instance, I have a complete 1000x1000 area. I want to divide this area into 5 locations. Each location of 200x200 area. 
Can anyone please provide any reference, guidelines, hints regarding this? As this is not provided by any mobility model, so I am thinking to create my own mobility model to achieve this. But I am confused about how to implement this. 

Any guidance or help in this regard will be highly appreciated.

Thanks
Best Regards,

--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-...@googlegroups.com.

Hassam Mughal

unread,
Apr 16, 2020, 3:53:01 AM4/16/20
to ns-3-users
In addition to this, I just want to observe the node's current location, and predict its next location. So, I want the area of 1000x1000m divided into 5 locations, each of 200x200m. So, why would it be required to have 25 locations of each 200x200m? A graphical picture of my reason to divide into 5 locations is also given as follows;

locations.png

So, there are several mobile nodes that can move from one location to another and communicate either during movement or after reaching a particular location.


On Thursday, April 16, 2020 at 4:39:20 PM UTC+9, George Katsouris wrote:
Hi,

Could you provide some more info about the use case? What do you plan to observe on these areas?
If you want your nodes to follow specific paths, you could try manipulating them in a mobility simulator(e.g. SUMO) in order to have them move in your 5 areas.
Btw, I don't know if you want to divide the whole 1000x1000 area, but if you do you need 25 200x200 areas to cover the entire surface.

George

Στις Πέμ, 16 Απρ 2020 στις 10:26 π.μ., ο/η Hassam Mughal <hassammu...@gmail.com> έγραψε:
Greetings Everyone!

How can we divide the area into several multiple locations? Is there any way to use multiple bounds? For instance, I have a complete 1000x1000 area. I want to divide this area into 5 locations. Each location of 200x200 area. 
Can anyone please provide any reference, guidelines, hints regarding this? As this is not provided by any mobility model, so I am thinking to create my own mobility model to achieve this. But I am confused about how to implement this. 

Any guidance or help in this regard will be highly appreciated.

Thanks
Best Regards,

--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-...@googlegroups.com.

γιωργος γιωργος

unread,
Apr 16, 2020, 4:14:55 AM4/16/20
to ns-3-...@googlegroups.com
Yeah, it isn't required to have 25 areas of course in your case.
A thought I had was to put a center node on each location and if it gets a message from a specific node it would let you know that this node is in location X. I don't know if it would suit your needs though, based on the topology you shared.

From what you said on your other thread, you want to implement a probabilistic RandomWalk model. Unfortunately, I am not that familiar with the mobility models to help, but I would start by checking the  models already implemented(ref: https://www.nsnam.org/doxygen/random-walk-2d-mobility-model_8cc.html) There are implementations for Random Walk, Gauss-Markov, Random Waypoint etc. Perhaps you could use the RandomWalk2D as basis?

Sorry, I couldn't be of more help,
George

To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ns-3-users/df64c837-4c7c-4116-bbec-775858ab5e30%40googlegroups.com.

Hassam Mughal

unread,
Apr 16, 2020, 4:24:04 AM4/16/20
to ns-3-users
Ahan ok. Yah, in my case I cannot consider a center node at each location. And I have gone through these models, esp. the Gauss-Markov model, but its really confusing of how to divide an area into multiple bounds, they have used value of bounds, but again the bounds are mentioned just once, I need to have multiple bounds to be able to identify 5 locations.

γιωργος γιωργος

unread,
Apr 16, 2020, 4:34:23 AM4/16/20
to ns-3-...@googlegroups.com
Well, from a quick glance on the source code for Gauss-Markov it seems a box is created(line39-43). Can't you specify 5 types of boxes, m_bounds1, m_bounds2 etc. assign coordinates and then check by iterating through them?

To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ns-3-users/06b630af-f39e-4105-968c-945ffa303a1e%40googlegroups.com.

Hassam Mughal

unread,
Apr 16, 2020, 4:40:55 AM4/16/20
to ns-3-users
Yah, but is it ok to add same attributes multiple times? Never saw that before.

γιωργος γιωργος

unread,
Apr 16, 2020, 4:50:08 AM4/16/20
to ns-3-...@googlegroups.com
It wouldn't be the same attribute though. Let's say we go by the gauss-markov code: we specify 5 attributes of type Box in the header file: m_bounds1, m_bounds2, m_bounds3, m_bounds4, m_bounds5. In the .cc file we AddAttribute for each one, based on the coordinates we want. The model start producing positions with some magic way. Those positions get checked with each m_bound attribute to see where they are and notify us. Couldn't something like this work? 

To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ns-3-users/7059e907-cf50-4576-891e-62e906c5f0c0%40googlegroups.com.

Hassam Mughal

unread,
Apr 16, 2020, 5:10:53 AM4/16/20
to ns-3-users
Yes, I got that already, but when we are writing 
.AddAttribute("Bounds",
"Bounds of the area to cruise.:,
BoxValue(Box (0.0, 200.0, 0.0, 200.0,)),
MakeBoxAccessor (&GaussMarkoveMobilityModel::m_bounds1),
MakeBoxChecker())

.AddAttribute("Bounds",
"Bounds of the area to cruise.:,
BoxValue(Box (200.0, 400.0, 200.0, 400.0,)),
MakeBoxAccessor (&GaussMarkoveMobilityModel::m_bounds2),
MakeBoxChecker())

So, is it ok to have multiple attributes of same names?

γιωργος γιωργος

unread,
Apr 16, 2020, 5:20:45 AM4/16/20
to ns-3-...@googlegroups.com
Well, I haven't written such code myself so i'm theorizing, but why wouldn't it be possible to write: AddAttribute("Bounds1",...) etc.? I get why the same name would be a problem, but why wouldn't it possible to add 2 different attributes?

To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ns-3-users/99f32a38-249f-48c8-9422-0455b95ff020%40googlegroups.com.

Hassam Mughal

unread,
Apr 16, 2020, 5:32:12 AM4/16/20
to ns-3-...@googlegroups.com
Because that attribute isn't defined in NS3 attributes. So we will need to define is first in order to get it supported

You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/J1-r5mPLsDI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ns-3-users/CAHUfQudH4Uyiz1CigJCjm%2Bf9b6L6OnwDF1mkx8GohEpFCBEd4Q%40mail.gmail.com.

γιωργος γιωργος

unread,
Apr 16, 2020, 5:42:30 AM4/16/20
to ns-3-...@googlegroups.com
Isn't the purpose of AddAttribute to define a new attribute in the hierarchy? At least, that is what i gather from the documentation( https://www.nsnam.org/docs/manual/html/attributes.html#defining-attributes)
If i have misunderstood, i'm sorry.

Hassam Mughal

unread,
Apr 16, 2020, 7:58:42 AM4/16/20
to ns-3-users
But what I remember is that we can only give the attributes defined in this list:

I am sorry too if I have mistaken it. I will try your suggestion now and get back to you.
Thanks

--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/J1-r5mPLsDI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-...@googlegroups.com.

--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages