[Ns-bugs] [Bug 512] New: Adding UniformVariable::GetInteger and using it to fix bug in RealRandomStream::GetNext.

code@nsnam.ece.gatech.edu code at nsnam.ece.gatech.edu
Wed Feb 25 04:37:11 PST 2009


http://www.nsnam.org/bugzilla/show_bug.cgi?id=512

           Summary: Adding UniformVariable::GetInteger and using it to fix
                    bug in RealRandomStream::GetNext.
           Product: ns-3
           Version: ns-3-dev
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P5
         Component: simulation core
        AssignedTo: ns-bugs at isi.edu
        ReportedBy: timo.bingmann at student.kit.edu
   Estimated Hours: 0.0


RealRandomStream::GetNext() must return backoff values for DCF in the range
[0..CW] with uniform probability distribution.

A quick test showed that this is not the case. See counts of some values pulled
from GetNext(0,15):

0=4786 1=9297 2=9426 3=9365 4=9283 5=9335 6=9323 7=9365 8=9312 9=9400 10=9165
11=9482 12=9236 13=9178 14=9429 15=4618 16=0 17=0 

0 and 15 are only half as probable, because round yields 0 for 0-0.5 and 1 for
0.5-1.5.

Created UniformVariable::GetInteger(min,max).

The code works if UniformVariable::GetValue(min,max) never returns max. Is this
absolutely positively the case?

All regressions using DCF are messed up.


-- 
Configure bugmail: http://www.nsnam.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the Ns-bugs mailing list