[ns] How to use RandomVariable to simulate traffic resource?
Hi, I know that we can use the TCL as below to simulate the traffic. set rtp_down($i) [new Application/Traffic/Exponential] $rtp_down($i) set packetSize_ 20 $rtp_down($i) set burst_time_ 352ms $rtp_down($i) set idle_time_ 650ms $rtp_down($i) set rate_ 8kb But how to use Random Variable to simulate traffic resource? Best regard,
[ns] About add new RandomVariable. Help me!!
Hi everyone I have added a new random variable "weibull" into ns2 by example and have modified rancar.cc , ranvar.h and rng.h. There was no error message after after compiling it But I ran an example that occurred an error massage as below. What steps did I forget or which file should be modified? . Does any one can help me? invalid command name "RandomVariable/Weibull" while executing "RandomVariable/Weibull create _o583 " Invoked from within "catch "$className create $o $args" msg" Invoked from within "if [catch "$className create $o $args" msg] { if [string match "__FAILED_SHADOW_OBJECT_" $msg] { delete $o return "" } global errorInfo error "class $..." (procedure "new" line 3) Best regard invoked from within "new RandomVariable/Weibull" ("for" body line 43) invoked from within "for {set i 0} {$i < $nb_mn} {incr i} { set wl_node_($i) [$ns node 2.0.[expr $i + 1]] ;# create the node with given @. $wl_node_($i) random-motion ..."
[ns] problems about installing NIST WIMAX module. Help me!!!
HI, I installed NIST WIMAX module in NS2 2.29. It occur error massage during complier The error massage as below. diffusion3/filter_core/filter_core.o(.text$_ZN13NeighborEntryC1Ei+0x0):filte r_co re.cc: multiple definition of `NeighborEntry::NeighborEntry[in-charge](int)' wimax/neighborentry.o(.text+0x5e):neighborentry.cc: first defined here collect2: ld returned 1 exit status make: *** [ns] Error 1 Could you help me to solve it? Best regard,
[ns] about http quesion, please help me
Hi, I have some questions about http simulation First, what is the definition of ranvar-main-age. Does it mean the time for the server to renovate a page? Second, when I coded as below, the trace file is simply to understand. But after I coded the mainsize by random variables as below, the trace file became hardly to understand. Please help me.. TCL: set pgp [new PagePool/CompMath] $pgp set main_size_ 1000 ;# Size of main page $pgp set comp_size_ 5000 ;# Size of embedded object $pgp set num_pages_ 3 ;# Number of objects per compoud page TRACE FILE: r 31.43331 0 1 tcp 40 --- 0 0.0 2.0 388 63 + 31.43331 1 2 tcp 40 --- 0 0.0 2.0 388 63 - 31.43331 1 2 tcp 40 --- 0 0.0 2.0 388 63 r 31.455913 1 2 tcp 40 --- 0 0.0 2.0 388 61 r 31.457113 1 2 tcp 40 --- 0 0.0 2.0 388 62 r 31.458313 1 2 tcp 40 --- 0 0.0 2.0 388 63 + 31.458313 2 1 ack 1280 --- 0 2.0 0.0 38982 64 - 31.458313 2 1 ack 1280 --- 0 2.0 0.0 38982 64 r 31.483416 2 1 ack 1280 --- 0 2.0 0.0 38982 64 + 31.483416 1 0 ack 1280 --- 0 2.0 0.0 38982 64 - 31.483416 1 0 ack 1280 --- 0 2.0 0.0 38982 64 r 31.50944 1 0 ack 1280 --- 0 2.0 0.0 38982 64 But after I code the mainsize by random variables as below, the trace file become hardly to understand. TCL: set tmp [new RandomVariable/LogNormal] $tmp set avg_ 8.72 $tmp set std_ 2.16 set pgp [new PagePool/CompMath] $pgp set main_size_ $tmp ;# Size of main page $pgp set comp_size_ 5000;# Size of embedded object $pgp set num_pages_ 3 ;# Number of objects per compoud page set tmp [new RandomVariable/Constant] $tmp set val_ 10 $pgp ranvar-obj-age $tmp set tmp [new RandomVariable/Constant] $tmp set val_ 5 $pgp ranvar-main-age $tmp Trace file r 11.150106 1 2 tcp 40 --- 0 0.0 2.0 1 2 r 11.150175 1 2 tcp 83 --- 0 0.0 2.0 1 3 + 11.2 2 1 ack 40 --- 0 2.0 0.0 1 4 - 11.2 2 1 ack 40 --- 0 2.0 0.0 1 4 r 11.225003 2 1 ack 40 --- 0 2.0 0.0 1 4 + 11.225003 1 0 ack 40 --- 0 2.0 0.0 1 4 - 11.225003 1 0 ack 40 --- 0 2.0 0.0 1 4 r 11.250035 1 0 ack 40 --- 0 2.0 0.0 1 4 v 16.15017543998 eval {set sim_annotation {S 2 INV _o64:0}} v 21.15017543998 eval {set sim_annotation {S 2 INV _o64:0}}--(how to explain it) v 26.15017543998 eval {set sim_annotation {S 2 INV _o64:0}}--(how to explain it) v 31.15017543998 eval {set sim_annotation {S 2 INV _o64:0}} v 36.15017543998 eval {set sim_annotation {S 2 INV _o64:0}} v 41.15017543998 eval {set sim_annotation {S 2 INV _o64:0}} v 46.15017543998 eval {set sim_annotation {S 2 INV _o64:0}} + 50 2 1 ack 40 --- 0 2.0 0.0 1 5 Best regard,
[ns] About PagePool problem
Hi, I have some questions about http simulation First, what is the definition of ranvar-main-age. Does it mean the time for the server to renovate a page? Second, when I coded as below, the trace file is simply to understand. But after I coded the mainsize by random variables as below, the trace file became hardly to understand. Please help me.. TCL: set pgp [new PagePool/CompMath] $pgp set main_size_ 1000 ;# Size of main page $pgp set comp_size_ 5000 ;# Size of embedded object $pgp set num_pages_ 3 ;# Number of objects per compoud page TRACE FILE: r 31.43331 0 1 tcp 40 --- 0 0.0 2.0 388 63 + 31.43331 1 2 tcp 40 --- 0 0.0 2.0 388 63 - 31.43331 1 2 tcp 40 --- 0 0.0 2.0 388 63 r 31.455913 1 2 tcp 40 --- 0 0.0 2.0 388 61 r 31.457113 1 2 tcp 40 --- 0 0.0 2.0 388 62 r 31.458313 1 2 tcp 40 --- 0 0.0 2.0 388 63 + 31.458313 2 1 ack 1280 --- 0 2.0 0.0 38982 64 - 31.458313 2 1 ack 1280 --- 0 2.0 0.0 38982 64 r 31.483416 2 1 ack 1280 --- 0 2.0 0.0 38982 64 + 31.483416 1 0 ack 1280 --- 0 2.0 0.0 38982 64 - 31.483416 1 0 ack 1280 --- 0 2.0 0.0 38982 64 r 31.50944 1 0 ack 1280 --- 0 2.0 0.0 38982 64 But after I code the mainsize by random variables as below, the trace file become hardly to understand. TCL: set tmp [new RandomVariable/LogNormal] $tmp set avg_ 8.72 $tmp set std_ 2.16 set pgp [new PagePool/CompMath] $pgp set main_size_ $tmp ;# Size of main page $pgp set comp_size_ 5000;# Size of embedded object $pgp set num_pages_ 3 ;# Number of objects per compoud page set tmp [new RandomVariable/Constant] $tmp set val_ 10 $pgp ranvar-obj-age $tmp set tmp [new RandomVariable/Constant] $tmp set val_ 5 $pgp ranvar-main-age $tmp Trace file r 11.150106 1 2 tcp 40 --- 0 0.0 2.0 1 2 r 11.150175 1 2 tcp 83 --- 0 0.0 2.0 1 3 + 11.2 2 1 ack 40 --- 0 2.0 0.0 1 4 - 11.2 2 1 ack 40 --- 0 2.0 0.0 1 4 r 11.225003 2 1 ack 40 --- 0 2.0 0.0 1 4 + 11.225003 1 0 ack 40 --- 0 2.0 0.0 1 4 - 11.225003 1 0 ack 40 --- 0 2.0 0.0 1 4 r 11.250035 1 0 ack 40 --- 0 2.0 0.0 1 4 v 16.15017543998 eval {set sim_annotation {S 2 INV _o64:0}} v 21.15017543998 eval {set sim_annotation {S 2 INV _o64:0}}--(how to explain it) v 26.15017543998 eval {set sim_annotation {S 2 INV _o64:0}}--(how to explain it) v 31.15017543998 eval {set sim_annotation {S 2 INV _o64:0}} v 36.15017543998 eval {set sim_annotation {S 2 INV _o64:0}} v 41.15017543998 eval {set sim_annotation {S 2 INV _o64:0}} v 46.15017543998 eval {set sim_annotation {S 2 INV _o64:0}} + 50 2 1 ack 40 --- 0 2.0 0.0 1 5 Best regard,