[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ns] Help: Strange behavior..
i think many (if not all) components in NS essentially use the same static
instance of a random number generator. thus it is quite possible two systems
which differ in topology will consume random numbers from this default
generator at different rates and traffic patterns can diverge even if the
seed is the same. check out the code in rng.{h,cc}, ranvar.{h,cc}.
-neeraj
>From: Ind m <irmadapati@yahoo.com>
>To: ns-users@mash.cs.berkeley.edu
>Subject: [ns] Help: Strange behavior..
>Date: Mon, 3 Apr 2000 08:34:04 -0700 (PDT)
>MIME-Version: 1.0
>Received: from [128.32.130.10] by hotmail.com (3.2) with ESMTP id
>MHotMailBAB209A10088D82197D38020820A07BC0; Mon Apr 03 08:54:13 2000
>Received: (from majrdomo@localhost)by mash.CS.Berkeley.EDU (8.9.3/8.9.1) id
>IAA69723for ns-users-list; Mon, 3 Apr 2000 08:34:06 -0700 (PDT)
>Received: from web503.mail.yahoo.com (web503.mail.yahoo.com
>[128.11.68.70])by mash.CS.Berkeley.EDU (8.9.3/8.9.1) with SMTP id
>IAA69718for <ns-users@mash.cs.berkeley.edu>; Mon, 3 Apr 2000 08:34:05 -0700
>(PDT)
>Received: (qmail 8431 invoked by uid 60001); 3 Apr 2000 15:34:04 -0000
>Received: from [128.251.96.154] by web503.mail.yahoo.com; Mon, 03 Apr 2000
>08:34:04 PDT
>From owner-ns-users@mash.CS.Berkeley.EDU Mon Apr 03 08:55:50 2000
>X-Authentication-Warning: mash.CS.Berkeley.EDU: majrdomo set sender to
>owner-ns-users@irtf.CS.Berkeley.EDU using -f
>Message-ID: <20000403153404.8430.qmail@web503.mail.yahoo.com>
>Sender: owner-ns-users@mash.CS.Berkeley.EDU
>Precedence: bulk
>
>Dear NS-gurus,
>
>I don't know why this happens, but for some reason
>my on-off sources _with same parameters_ give me
>different traffic in two systems.
>
>In system X, the pkt generation times are as follows:
>
>0.0497345,0.0531345,0.0565345 0.0599345 0.0633345
>0.0667345 0.0701345 0.0735345 0.0769345 0.0803345
>0.0837345 0.0871345 0.0905345 0.0939345 0.0973345
>0.100735 0.104135 0.107535 0.110935 0.114335
>0.117735 0.121135 0.124535 0.127935 0.131335
>0.134735 0.138135 0.141535 0.144935 0.148335
>0.151735 0.155135 0.158535 0.161935 0.165335
>0.168735 0.172135 <deleted some sq nos>
>0.325594 0.328994 0.332394 0.335794 0.339194
>0.399209 0.402609 0.406009 0.409409 0.412809
>and so on...
>
>In system Y, the pkt generation times are same upto
>0.399209 sec, but from then on it generates different
>set of times!
>0.512243 0.515643 0.519043 0.522443 0.525843 0.529243
>0.532643 0.536043 0.539443 0.542843 0.546243 0.549643
>0.553043 0.556443 <and so on>
>
>
>The tcl script for on-off source is as follows (same
>is used in X and Y systems):
>
>set i 1
>set src($i) [new Agent/UDP]
>$ns attach-agent $ing2 $src($i)
>set udpsrc($i) [new Application/Traffic/Pareto]
>$udpsrc($i) attach-agent $src($i)
>$udpsrc($i) set packet_size_ 510
>$udpsrc($i) set burst_time_ 250ms
>$udpsrc($i) set idle_time_ 70ms
>$src($i) set shape_ 1.3
>$udpsrc($i) set rate_ 1.2Mb
>$src($i) set fid_ 2
>
>
>
>For both systems,
>ns-random 45789
>$defaultRNG seed 1973272912
>
>even if I delete the above or change the values,
>I still get different traffic generated.
>I use ns-2.1b4
>
>Is this normal? or shouldn't the traffic sources be
>independent of the simulation setup (topology, etc)
>
>When I iterate each system individually, I get the
>above numbers consistently (w.r.t each system)
>
>
>any pointers to this dilemma would be highly
>appreciated..
>
>Thanks a lot in advance,
>
>with best regards
>CG
>
>PS: my apologies in advance, if you recvd this message
>twice
>
>__________________________________________________
>Do You Yahoo!?
>Talk to your friends online with Yahoo! Messenger.
>http://im.yahoo.com
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com