i have got it correct. I have got the simulation sir.
Thak you very much for your help sir |
hi,
I installed vbr patch according to post #23. All changes seemed ok like : ns-2.35/{ Makefile.in, common/package.h, tcl/lib/ns-default.tcl } ( And the added file tools/vbr_traffic.cc : No changes, just added.) but, it shows the error munjure@munjure-ThinkCentre-M58p:~/test/running/cbr_vbr$ ns235-vbr test1.tcl ns: [code omitted because of length] : invalid command name "Application/Traffic/VBR" while executing "Application/Traffic/VBR set rate_ 448Kb " can u plz suggest? I have 2 others ns executable. |
Re post #32, @rimonece.
The usable VBR examples are, AFAIK : example-VBR.tcl, vbr-normal.tcl * I don't know what "test1.tcl" is ! Besides that, "invalid command name "Application/Traffic/VBR" " indicates a failed build. And "[code omitted because of length]" ... is usually when you add an unused protocol to ns-default.tcl. 'vbr-examples.tar.gz' https://drive.google.com/file/d/0B7S...ew?usp=sharing - |
vbr traffic in leach protocol
Hi Freinds,
I want to apply vbr traffic for 100 nodes in NS2.34. Please share with me the vbr_trafic.cc and vbr_trafic.h script (for 100 nodes) and the deployment procedure. Thank you very much for the help. |
Re #34, @haitam09.
The files {vbr_trafic.cc, vbr_trafic.h} are C++ source code, not scripts. The number of nodes are not decided in these files, but in simulations.tcl . Build example, please see post #23. - |
Re #34.
I scanned the 3000 simulations archive .... [000-All-examples-4]$ grep -in vbr * ... and found more examples with "vbr", some with many nodes. → → → vbr-examples-2.tar.gz https://drive.google.com/file/d/1C1k...ew?usp=sharing The "3000 simulations package" https://drive.google.com/file/d/1Qbe...ew?usp=sharing Tree https://drive.google.com/drive/folde...Ws?usp=sharing - |
Thanks Sir Knudfl for the help.
I already have leach protcol installed in NS2.34. I want to apply vbr traffic to my protocol especially in NS2.34 because you have already said in this forum that NS2.34 gives better results compared to NS2.35, is not it? leach uses the leach_test script, which also uses wireless.tcl. How can I integrate vbr_normal.tcl or vb-expo.tcl in this case? Is it necessary to upgrade to NS2.35 with mannasim? That's why I'm looking for sources code vbr_traffic.cc and vbr_traffic.h? Thanks in advances. Best regards. |
Re #37.
Leach works with ns-2.34 / Ubuntu 10.04 - i386, 32bits OS. Leach doesn't work with ns-2.35 : No usable simulation result. `vbr_traffic.cc´ : Setup an ns-allinone-2.35, and patch with VBR. If you read the text file/the patch, you will know that vbr_traffic.cc is in ns-2.35/tools/. There is also a copy here (so far) : https://drive.google.com/file/d/0B6a...lHc3cyUEU/edit ! There is no file `vbr_traffic.h´ ! Original link http://ns2blogger.blogspot.dk/2014_04_01_archive.html ... Please note the vbr links at the site ... → For vbr .cc file, Click here → For ns-default.tcl, Click here (When ns-2.34: Add changes to end of ns-default.tcl). Documentation : "VARIABLE BIT RATE [VBR]" → VBR__2014_04_01_archive.html.gz https://www.dropbox.com/s/nyye0s0gg8...e.html.gz?dl=0 Or : https://www.dropbox.com/s/xvnyu4x0vv...hive.html?dl=0 ... VBR is the fourth chapter at the above site: 1.OLSR, 2.NSG2, 3.Bonnmotion, 4.VBR. Documentation details : The patch, vbr_ns235.patch . Ns2-INFO https://drive.google.com/file/d/1FCj...ew?usp=sharing - |
Hi Sir Knudfl,
Thank you for the help. I installed vbr_traffic.cc in NS2.34/Ubuntu10.04 with leach protcol successfully. The vbr traffic by using example-CBR.tcl is tested. It's OK Please can you help me how to generate vbr (for 100 nodes) for this protocol? can I use ../ns-2.34/indep-utils/cmu-scen-gen$ ns cbrgen.tcl -type vbr -nn 100 -seed 1.0 -mc 20 -rate 4.0 or how to integrate VBR tcl script in this protocol? I did some research but I have not found answers. Thank you in advances. Best regards Quote:
|
Re #39.
The one and only example using the "Application/Traffic/VBR" is vbr-normal.tcl . Maximum nodes, vbr-normal.tcl is 15 : set val(nn) 15. ... And that's still with traffic / communication for node 1, 2 only. - |
Traffic cbr in leach protocol under NS2
Hi ALL,
Please can someone give the optimal values of : rate, seed, i, mc(number of connections)to generate cbr traffic for 100 nodes specially for leach protocol by this command : $ns cbrgen.tcl -type cbr -nn 100 -seed 1.0 -mc 25 -rate 4.0 > cbr-traffic-100-25 This traffic is called in wireless.tcl by: set opt(cp) "/home/leach/ns-allinone-2.34/ns-2.34/tcl/mobility/scene/cbr-traffic-100-25" ./leach_test uses the parameters : topology_file="mit/uAMPS/sims/new100nodes.txt" #stop is the time to stop the simulation if it is still running stop=1000 # number of nodes in the scenario. num_clusters=5 # energy values. How much energy does each node have initially eq_energy=1 init_energy=2 # x,y is the size of the field x=100 y=100 # bs_x, bs_y is the location of the base station in the field. bs_x=75 bs_y=175 # Number of nodes. WARNING! This should be 1 higher then the number # of nodes generated in the scenario. nn=101 when I call this file when running ./leach_test, it returns as results: leach.err WITHOUT ERROR $cat leach.err mac/chanel.cc: INITIALIZE THE LIST xListHead SORTING LISTS ...DONE! leach.tr with size of 386 ko leach.out with size of 81 ko leach.alive, leach.energy, leach.data ====> EMPTY WITH 0 ko ?????? Is this normal? Else what's the solution? ============================================================== This script returns the following file extract : # # nodes: 100, max conn: 25, send rate: 0.25, seed: 1.0 # # # 1 connecting to 2 at time 2.5568388786897245 # set udp_(0) [new Agent/UDP] $ns_ attach-agent $node_(1) $udp_(0) set null_(0) [new Agent/Null] $ns_ attach-agent $node_(2) $null_(0) set cbr_(0) [new Application/Traffic/CBR] $cbr_(0) set packetSize_ 512 $cbr_(0) set interval_ 0.25 $cbr_(0) set random_ 1 $cbr_(0) set maxpkts_ 10000 $cbr_(0) attach-agent $udp_(0) $ns_ connect $udp_(0) $null_(0) $ns_ at 2.5568388786897245 "$cbr_(0) start" # # 4 connecting to 5 at time 56.333118917575632 # set udp_(1) [new Agent/UDP] $ns_ attach-agent $node_(4) $udp_(1) set null_(1) [new Agent/Null] $ns_ attach-agent $node_(5) $null_(1) set cbr_(1) [new Application/Traffic/CBR] $cbr_(1) set packetSize_ 512 $cbr_(1) set interval_ 0.25 $cbr_(1) set random_ 1 $cbr_(1) set maxpkts_ 10000 $cbr_(1) attach-agent $udp_(1) $ns_ connect $udp_(1) $null_(1) $ns_ at 56.333118917575632 "$cbr_(1) start" ... # 28 connecting to 29 at time 47.128346453946243 # set udp_(24) [new Agent/UDP] $ns_ attach-agent $node_(28) $udp_(24) set null_(24) [new Agent/Null] $ns_ attach-agent $node_(29) $null_(24) set cbr_(24) [new Application/Traffic/CBR] $cbr_(24) set packetSize_ 512 $cbr_(24) set interval_ 0.25 $cbr_(24) set random_ 1 $cbr_(24) set maxpkts_ 10000 $cbr_(24) attach-agent $udp_(24) $ns_ connect $udp_(24) $null_(24) $ns_ at 47.128346453946243 "$cbr_(24) start" # #Total sources/connections: 17/25 Thank you very much for your help. Best regards |
traffic cbr and RandomWalk for leach protocol
Hi knudfl,
I want to generate traffic cbr and simultaneously create the mobility of these nodes by bonmotion for leach protocol in NS2, the commands used are: 1) for traffic cbr $ ns cbrgen.tcl -type cbr -nn 100 -seed 1.0 -mc 10 -rate 4.0 > cbr-traffic-100 2) for mobility RW: sudo ./bm -f scen100RW RandomWalk -n 100 -d 1000 -i 3600 -t 10 -x 100 -y 100 -p 0 when I run ./leach_test, it returns as results: leach.err WITHOUT ERROR $cat leach.err mac/chanel.cc: INITIALIZE THE LIST xListHead SORTING LISTS ...DONE! The results give : leach.tr with size of 332 ko leach.out with size of 121 ko BUT, leach.alive, leach.energy, leach.data ====> with size 0 ko ?????? Is this normal? what's the solution? You will find attached theses files. Creating sensor nodes... - uAMPS.tcl 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 (100 == BS) - uAMPS.tcl Loading connection pattern...- wireless.tcl Loading scenario file... - wireless.tcl Node 0: (28.966110725405674,24.851641536155551) Node 1: (15.019677307000235,14.671639639265669) Node 2: (4.0031449422254903,89.491353877583208) Node 3: (82.035129322686757,86.27648697526962) Node 4: (22.729005209509751,64.713598445390161) Node 5: (53.275216162798564,71.05466628961949) ... .... #In end of leach.out, i have : ..... ..... 86 sending data {86 , 2.5523460159393112} to 74 at 2.5523460159393112 (dist = 4.7817933662924341) - ns-leach.tcl 46 sending data {46 , 2.5533700895928586} to 78 at 2.5533700895928586 (dist = 26.877857658542712) - ns-leach.tcl 1 rcvd ADV_CH from at 2.5568388786897245 - ns-leach.tcl ns: _o50 recv 0 0 512 : can't read "node_()": no such element in array while executing "nodeDist $node_($chID) $node_($nodeID)" (procedure "_o50" line 14) (Application/LEACH recvADV_CH line 14) invoked from within "$self recvADV_CH $msg" (procedure "_o50" line 16) (Application/LEACH recv line 16) invoked from within "_o50 recv 0 0 512 " num_nodes is set 101 mac/channel.cc: sendUp - Calc highestAntennaZ_ and distCST_ mac/channel.cc: highestAntennaZ_ = 1.5, distCST_ = 222.8 Thank you very much for the help. Best regards |
All times are GMT -5. The time now is 11:28 PM. |