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

Re: Two State Markov Model in ns-v2.1b4a




On Thu, 4 Mar 1999, AL-HUSSEIN ABOU-ZEID wrote:

> 
> I've been trying to use the ErrorModel/TwoStateMarkov or
> ErrorModel/TwoState with no success in either.
> 
> I've been using the following script:
> 
> #Create and attach a loss model to the link
> set myrates [list 40ms 0.4ms]
> set mytrans [list 1.0 1.0]
> set myeu time
> set em [new ErrorModel/TwoStateMarkov $myrates $myeu $mytrans] #<---
> set tr [$ns create-trace Loss $f $n0 $n1]
> $em drop-target $tr
> $ns lossmodel $em $n0 $n1
> 
> I'm not sure if there is some novice error there in the script, since I am
> infact a novice with ns and its scripting language, but I don't think
> there is. In fact, I noticed that the parameters passed in the transition
> vector are not used by ns.

A quick look at the file "tcl/lib/ns-errmodel.tcl" tells why the
transition vector is ignored: the relevant lines in
ErrorModel/TwoStateMarkov instproc init are commented out.

> Also, using ErrorModel/TwoState creates a segmentation fault. (for
> example: set em [new ErrorModel/TwoState 0.8 0.2] instead of the above
> line).

The two parameters following the class name should be random variables
(RandomVariable) that determine the lengths of "error free" and "error"
states.  See ns Notes and Documentation, chapter 14.

> Will appreciate if anyone knows how to use multiple state models in ns to
> give me a hint.
> 
> Thanks in Advance.
> 
> ------------------------
> Al-hussein A. Abou-zeid
> University of Washington, Seattle
> EE Dept.
> 

Now here is my question about TwoStateErrorModel: If I use "time" as the
unit, the length of a state counts only the time when the link is actually
transmitting data, i.e., idle time is not included.  Is this observation
correct?  I brought this up because I think this feature (if my
understanding of it is right) may or may not fit the scenarios people want
to simulate.

========================================
Kuang-Yeh Wang		[email protected]
University of Maryland at College Park
Department of Computer Science
========================================