2

I was reading some tutorial of One simulator. I got one syntax that is

group.nodeLocation = 100,100

As far as I know a group can have multiple nodes. Therefore, I am not clear what does it mean by group.nodeLocation. Which node location we are fixing by using this command.

Thanks,

user3678107
  • 31
  • 1
  • 1
  • 8

1 Answers1

0

It depends on which kind of movement models you use.

Setting group.nodeLocation is required for StationaryMovement, but for other dynamic movement modes (e.g., RandomWaypoint) is meaningless.

If you want to set multiple nodes N with different location, you should separate it into N groups.


In speaking of adding static nodes in bulk, use MapRouterMovement to simulate it. The static node can be regarded as the initioal coordination equals the destination coordination. For instance, 5 static nodes are defined as:

LINESTRING (100 100, 100.0 100.0) 
LINESTRING (200 200, 200.0 200.0)
LINESTRING (300 300, 300.0 300.0)
LINESTRING (400 400, 400.0 400.0)
LINESTRING (500 500, 500.0 500.0)

And the setting file like:

Group4.groupID = b
Group4.movementModel = MapRouteMovement #MapRouteMovement
Group4.routeFile = path/routFile.wkt    #routeFile
Group4.routeType = 2
Group4.nrofHosts = 5
Group4.waitTime = 0, 0
Group4.speed = 0, 0

BTW, don't forget to group the above coordinations as a map file, seeing below:

#settings.txt
MapBasedMovement.nrofMapFiles = 1
MapBasedMovement.mapFile1 = path/mapFile.wkt

#mapFile.wkt
LINESTRING (100 100, 200.0 200.0, 300 300, 400 400, 500.0 500.0)
SparkAndShine
  • 17,001
  • 22
  • 90
  • 134
  • Thanks a lot. I want to place my nodes to different random location. Therefore, I was thinking how group.nodeLocation will help me since in group there can be several nodes. I dont know how to fix the locations of each individual nodes. – user3678107 Mar 11 '15 at 17:54
  • @user3678107 Use `MapRouterMovement` to add static nodes in bulk. For more info, please check the edited answer. – SparkAndShine Jun 27 '15 at 13:41