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

Re: Error Model : 2state




Yes, its working !

But I have some doubts,
The code now doesn't appear much different from the ErrorModel/Expo in
ns-errmodel.tcl.

so, it might be that both are doing the same thing now, i.e. as you said 
there won't be any changes because 'trans' is not used anywhere.

So, I'm still left with the problem of getting a two state error model ...

I saw this statement in ns-errmodel.tcl:
Class ErrorModel/TwoStateMarkov -superclass ErrorModel/TwoState
could it be doing something ?

there's no mention of TwoStateMarkov in errmodel.cc .....

ketan



On 19 Nov 1998, Yuri Pryadkin wrote:

> Hi,
> 
> Let me say first that I'm not very familiar with errormodel
> implementation in NS.  But a quick look in ns-errmodel.tcl reveals
> that TwoStateMarkov is broken: there is argument mismatch in its init
> instproc when it calls base class init, just like your trace shows.
> 
> Try changing the default instproc code to the following:
> 
> ErrorModel/TwoStateMarkov instproc init {rate unit trans} {
> 	# XXX trans isn't used!
> 	set rv0 [new RandomVariable/Exponential]
> 	set rv1 [new RandomVariable/Exponential]
> 
> 	$self next $rv0 $rv1 $unit
> 
> 	$rv0 set avg_ [lindex $rate 0]
> 	$rv1 set avg_ [lindex $rate 1]
> }
> 
> and see what happens (naturally, you'll need to recompile ns).  Please
> let me know if this fixes the problem.
> 
> BTW, from the code, the third parameter "trans" is not used, so don't
> expect any changes when you play with it.
> 
>   -Yuri