NetAnim boundaries

203 views
Skip to first unread message

Konstantinos

unread,
Apr 23, 2014, 6:00:50 AM4/23/14
to ns-3-...@googlegroups.com, John Abraham
Hi,

I want to use a mobility model developed by KIT (http://dsn.tm.kit.edu/english/vtl.php
I have successfully ported the model but I am having difficulties with NetAmin, and that's due to a characteristic of the new module.
All nodes are created at the start of simulation t=0, but they are placed very far away until it is time to enter the 'reference area'

See this code snippet

inline Vector
IntelligentDriverMobilityModel::DoGetPosition (void) const
{
 
if (m_end)
 
return Vector(IDM_INVALID_POS, IDM_INVALID_POS, IDM_INVALID_POS);
....

where IDM_INVALID_POS = 99999;
and the reference area is a ManhattanGrid with 500x500.

So you can understand that NetAnim's boundaries automatically become (99999x99999) and I can not see the reference area I am interested.

Would the AnimationInterface::SetBoundary(0,0, 500,500) be enough or would it cause error because the nodes will be outside the boundary?

Regards,
K.

John Abraham

unread,
Apr 23, 2014, 7:57:31 AM4/23/14
to Konstantinos, ns-3-...@googlegroups.com
hmm,
I don't think it should error out, based on when I tested it last.


But now that I think about it, I have removed this feature in 3.105 until I finish a general cleanup of AnimationInterface. The only workaround is to possibly create AnimationInterface just before nodes come into the reference area.


-john

John Abraham

unread,
Apr 23, 2014, 8:55:01 AM4/23/14
to ns-3-...@googlegroups.com, Konstantinos
1. SetBoundary does nothing useful on ns-3-dev for the time-being. The last time it was possibly effectual was on ns-3.19.
2.  If you are using 3.105 then the only other way is to hard-code this in the animator.

void
AnimatorScene::setSimulationBoundaries (QPointF minPoint, QPointF maxPoint)
{
.... 

  m_sceneMinPoint = QPointF(0, 0);   <<< add this
  m_sceneMaxPoint = QPointF(50, 50);   <<< add this

  setSceneRect (QRectF (m_sceneMinPoint, m_sceneMaxPoint));
}





On Wed, Apr 23, 2014 at 5:21 AM, Konstantinos <dinos.k...@gmail.com> wrote:
The thing is that they do not come at the same time. 
See it as a pool of nodes located far away, and nodes enter the reference area with certain rate. When they leave the area (e.g. travel the 500m) they are moved back in that "invalid" position.

I haven't tested it yet, I was just looking at the API. This method (SetBoundary) still exists in ns-3-dev @ 88c653a2840a

--
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 post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at http://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.

Konstantinos

unread,
Apr 23, 2014, 8:21:34 AM4/23/14
to ns-3-...@googlegroups.com, Konstantinos
The thing is that they do not come at the same time. 
See it as a pool of nodes located far away, and nodes enter the reference area with certain rate. When they leave the area (e.g. travel the 500m) they are moved back in that "invalid" position.

I haven't tested it yet, I was just looking at the API. This method (SetBoundary) still exists in ns-3-dev @ 88c653a2840a


On Wednesday, April 23, 2014 12:57:31 PM UTC+1, John Abraham wrote:

Bhooshi Sandeep

unread,
Feb 27, 2018, 12:10:37 AM2/27/18
to ns-3-users
Hi John,
I changed the m_sceneMinPoint = QPointF(0,0) & m_sceneMaxPoint(1500,300) to change the boundaries of my simulation area. I'm running the simulation in a 1500 x 300 area using Steady State Random Waypoint mobility model but when I look at the xml file in NetAnim I see a shrinkage in the area. I could see the nodes placed in a area of 1457 x 298.9. Or at least that's what the boundaries of my grid are. Can I know why?

Thank you.
Reply all
Reply to author
Forward
0 new messages