randomwalk mobility model for ns2

346 views
Skip to first unread message

Kaoutar Ourouss

unread,
Jan 29, 2016, 12:55:18 PM1/29/16
to Network Simulator 2 (NS2)
hi follks

please i need your help, i used bonnmotion to generate a randomwalk mobility model but when i added it to the tcl file i got errors during the simulations

i attached the files
aodv_10.tcl
kouki.ns_movements
kouki.ns_params

knudfl

unread,
Jan 29, 2016, 5:49:29 PM1/29/16
to Network Simulator 2 (NS2)
Hi.

Assume  "tcp-10-1"  https://groups.google.com/forum/?fromgroups#!searchin/ns-users/tcp-10-1|sort:relevance/ns-users/1Ba0RdobLyQ/MM1whseBEwAJ
→ Jan 22 2016.

Your file aodv_10.tcl is calling a "node_(10)" , with "tcp-10-1".
10 nodes is 0....9 . Thus aodv_10.tcl must have "set val(nn)      11 "
.... in order to include a node by name "node_(10)".
( And "tcp-10-1" should (probably) read "# nodes: 11, ...." in the head line. (Line 2).

Then the result is :
$ ns aodv_10.tcl
num_nodes
is set 11
warning
: Please use -channel as shown in tcl/ex/wireless-mitf.tcl
INITIALIZE THE LIST xListHead
Loading connection pattern...
Loading scenario file...
Processing node 0
Processing node 1
Processing node 2
Processing node 3
Processing node 4
Processing node 5
Processing node 6
Processing node 7
Processing node 8
Processing node 9
Processing node 10
ns
: _o14 setdest 949.0684128587192 1010.0 36.41071854721302:
   
(_o14 cmd line 1)
    invoked
from within
"_o14 cmd setdest 949.0684128587192 1010.0 36.41071854721302"
    invoked
from within
"catch "$self cmd $args" ret"
    invoked
from within
"if [catch "$self cmd $args" ret] {
set cls [$self info class]
global errorInfo
set savedInfo $errorInfo
error "
error when calling class $cls: $args" $..."
   
(procedure "_o14" line 2)
   
(SplitObject unknown line 2)
    invoked
from within
"_o14 setdest 949.0684128587192 1010.0 36.41071854721302"

....  So there is still one or more errors for you to correct.

-

Nisrine Ibadah

unread,
Jan 30, 2016, 3:57:44 PM1/30/16
to Network Simulator 2 (NS2)

Hi Kaoutar,

you're problem is the simulation area must be the same with ns_params geerated by boonmotion. So, you must make 1020 for x and y. All the time please verify this, it's the problem all time.

sampad....@gmail.com

unread,
Oct 24, 2018, 3:32:57 AM10/24/18
to Network Simulator 2 (NS2)
what is the command line for random walk model?

knudfl

unread,
Oct 24, 2018, 7:24:48 AM10/24/18
to Network Simulator 2 (NS2)
@Sampad Banik

Example,  RandomWalk  ( It's basically two commands )
./bm -f sample RandomWalk -n 200 -d 60 -x 1000 -y 750 -t 100
./bm NSFile -f samplebm NSFile -f sample

.... Or as one command :
./bm -f sample RandomWalk -n 200 -d 60 -x 1000 -y 750 -t 100 && ./bm NSFile -f samplebm NSFile -f sample
Result :  See attachment, sample.ns_movements.
TextFile___commands.txt
sample.ns_movements.txt
TextFile-bonnmotion-MODELS.txt
Message has been deleted

Sampad Banik

unread,
Oct 26, 2018, 7:57:25 AM10/26/18
to Network Simulator 2 (NS2)
Is bonnmotion movements file executable within NSG created tcl file?

knudfl

unread,
Oct 26, 2018, 9:11:33 AM10/26/18
to Network Simulator 2 (NS2)
@Sampad Banik.

Depends.  NSG can create various files.  And : The NSG created files will often require editing.

Examples with movement files :

aomdv-examples-2.tar.gz →  supfanetmovt.ns_movements
https://drive.google.com/file/d/1wgigViF62w6Jj8ser71ul6vdxZGwuYIp/view?usp=sharing

Hameurlaine Hicham

unread,
Sep 12, 2023, 10:59:46 AM9/12/23
to Network Simulator 2 (NS2)
  to @ knudfl 
please, can you help me to generate  usig bonnmotion or any other tools :
1-RPGM 
2- Manhattan Grid  
 3-The reference point group mobility (RPGM)  
  4- Pursue Mobility Model    
I m working with ns 2.35
I m looking forward to your answer.

knudfl

unread,
Sep 12, 2023, 1:24:12 PM9/12/23
to Network Simulator 2 (NS2)
..hichamham...

$ ./bm -hm [model]         ..... will print options for the [model]  command.

Add 1- and 3- RPGM :    $ ./bm -hm RPGM
Add 2- ManhattanGrid    $ ./bm -hm ManhattanGrid
ex command
$ ./bm -f obj1 ManhattanGrid -n 31 -x 1000 -y 1000 -p 20 -g 140 -r 3 -e 6 -d 300 -i 5000 -j 1
$ ./bm NSFile -f obj1bm NSFile -f scenNSFile -f obj1
Add 4-  Pursue              $ ./bm -hm Pursue
*  bonnmotion-3.0.1/doc/README.pdf
Reply all
Reply to author
Forward
0 new messages