cbrgen.tcl

235 views
Skip to first unread message

Goklas Giovanni

unread,
Nov 15, 2017, 10:04:07 AM11/15/17
to Network Simulator 2 (NS2)
Syntax cbrgen.tcl:

ns cbrgen.tcl -type [type] -nn [nodes] -seed [seed] -mc [connections] -rate [rate] > output.tcl

The rate is transmission data rate, I've searching that people usually use 2.0 - 5.0. But in what value is that number? bps, kbps, or what?
I need to make the rate 512 kbps for my research, what should I use in my cbr? Thanks..

knudfl

unread,
Nov 15, 2017, 2:47:00 PM11/15/17
to Network Simulator 2 (NS2)
"rate" can be set with ``cbrgen.tcl´´ ... or you can specify rate in the simulation file: 
1.
set opt(cbr-rate) [lindex $argv 1] ;# CBR data rate (the rate is set in the simulation command) 
.
puts
"CBR Data rate: $opt(cbr-rate)"
From urban-VANET-example.tcl http://neo.lcc.uma.es/staff/jamal/vanet/?q=node/11

2.
    set opt(cbr-rate) 10000kbps        ;# CBR data rate
.
puts
"CBR Data rate: $opt(cbr-rate)"
→ urban-VANET-t30.tcl https://drive.google.com/file/d/0B7S255p3kFXNYjJhMGxzMnBtYjg/view?usp=sharing


CBRGEN : I guess "-rate 0.000002" will set 500kbps :
$ ns cbrgen.tcl -type cbr -nn 10 -seed 0.01 -mc 8 -rate 0.000002

# nodes: 10, max conn: 8, send rate: 500000.0, seed: 0.01
.

Took some minutes to figure out the "logic" .... see the attached file.
--------------------------
cbrgen-rate.txt
Reply all
Reply to author
Forward
0 new messages