[ns] RNG ( seed )
maram al3asal
ubbos at hotmail.com
Mon Dec 21 01:25:16 PST 2009
hi all,could some one please explains to me why we need to use random variables RNG or seedI am confused . I read that some times we need them to generate random variables to use it in sending traffic but i dont how this is happeninghere is the example i have(partial):
. .set base_seed [lindex $argv 0]; . . .global defaultRNG$defaultRNG seed predef $base_seed . . . . .
#set up BE uplink flowsset be_ul_sink [new Agent/LossMonitor]$ns_ attach-agent $W $be_ul_sinkfor {set j $be_init} {$j < $be_end} {incr j} { set be_tcp_ul_($j) [new Agent/TCP] $ns_ attach-agent $node_($j) $be_tcp_ul_($j) $ns_ connect $be_tcp_ul_($j) $be_ul_sink
set be_ftp_ul_($j) [new Application/FTP] $be_ftp_ul_($j) attach-agent $be_tcp_ul_($j) }
# random number generatorset gna_be_ul [new RNG]$gna_be_ul seed predef [expr $base_seed + 5]
for {set j $be_init} {$j < $be_end} {incr j} { set stime [expr 0.1 + [$gna_be_ul uniform 0 1]] $ns_ at $stime "$be_ftp_ul_($j) start"} . .
What is this seed, RNG , uniform ant its parameters. and what is the result from using this.
Regards,Maram
_________________________________________________________________
Windows 7: Easily stream music. Find out how.
http://windows.microsoft.com/windows-7
More information about the Ns-users
mailing list