[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: trouble with bind. (fwd)



The message "http://www-mash.cs.berkeley.edu/dist/archive/ns-users/9808/"
(with the same title) explains the problem.

There is something waird if (c++) class A contains a class B varible which
has a bind inside. Please read the expoo.cc code and simply add in another
ExpoentialRandomVariable variable. Without initialization value, you will
note the problem.

--Zhenhai
--------------------------------------------------------------
Zhenhai Duan		        PhD student	
Computer Science Department	http://www.cs.umn.edu/~duan
University of Minnesota, TC	Phone: (612)626-7526(O)
-------------------------------------------------------------- 

On Wed, 3 Nov 1999, Haobo Yu wrote:

> > This error is different from what you mentioned. And actually I noticed
> > the reason that the two original ExponentialRandomVariables work is they
> > are initialized with some values, this makes the contructor to be called
> > is not the default ExponentialRandomVariable() (which contains a bind
> > command). 
> 
> I don't understand. The constructur with an argument is never called if
> you allocate it from otcl. If you new it from otcl, bind() will be called
> and if it's not initialized you'll get a warning. 
> 
> And Application/.... is not a random variable, it's a traffic source. I
> guess you've added avg_ to it but did not initialize. This is irrelevant
> to ranvar Exponential.
> 
> > --Zhenhai 
> > --------------------------------------------------------------
> > Zhenhai Duan		        PhD student	
> > Computer Science Department	http://www.cs.umn.edu/~duan
> > University of Minnesota, TC	Phone: (612)626-7526(O)
> > -------------------------------------------------------------- 
> > 
> > On Wed, 3 Nov 1999, Haobo Yu wrote:
> > 
> > > when you adds a new var you _should_ initialize it in ns-defaults.tcl
> > > otherwise this warning results.
> > > 
> > > > > ---------- Forwarded message ----------
> > > > > Date: Tue, 2 Nov 1999 22:17:39 -0600 (CST)
> > > > > From: Zhenhai Duan <[email protected]>
> > > > > To: Ns Mailing List <[email protected]>
> > > > > Subject: trouble with bind.
> > > > > 
> > > > > In the message
> > > > > "http://www-mash.cs.berkeley.edu/dist/archive/ns-users/9808/", Nitin
> > > > > Vaidya mentioned one problem with bind. I met this problem when I modified
> > > > > the code of expoo.cc to add another ExponentialRandomVariable variable.
> > > > > And got the following message:
> > > > > 
> > > > > warning: no class variable Application/Traffic/Exponential::avg_
> > > > > 
> > > > >         see tcl-object.tcl in tclcl for info about this warning.
> > > > > 
> > > > > I am curious that why the original two ExponentialRandomVariables work
> > > > > without warning.
> > > > > 
> > > > > Thanks.
> > > > > --Zhenhai
> > > > > --------------------------------------------------------------
> > > > > Zhenhai Duan		        PhD student	
> > > > > Computer Science Department	http://www.cs.umn.edu/~duan
> > > > > University of Minnesota, TC	Phone: (612)626-7526(O)
> > > > > -------------------------------------------------------------- 
> > > > > 
> > > > > 
> > > > > 
> > > > 
> > > > 
> > > 
> > > 
> > 
> > 
>