[Ns-developers] ns3: random numbers

mathieu lacage Mathieu.Lacage at sophia.inria.fr
Mon Mar 12 08:40:26 PDT 2007


On Fri, 2007-03-09 at 11:53 -0500, Raj Bhattacharjea wrote:
> In light of Michele's last e-mail and a quick conference call with her,
> we've decided to take her suggestions as outlined below:
> 
> 1) We will add a static function to the RandomVariable base class called
> SetRunNumber,
> which will have an integer argument, which will be saved in a static,
> private global
> variable called "RandomVariable::runNumber".
> 
> 2) Each time a new random variable is initialized (seeded), we will call
> ResetNextSubstream
> runNumber times.

I am sorry but I don't know enough about the lecuyer code to understand
what this means.

Would you care to describe what you are trying to achieve with this
change from an end-user point of view in end-user-understandable terms
(I am really one of these). i.e., when I create a RandomVariable, how is
it seeded ? What methods change the way it is seeded ? What is their
impact on the seeding policy ? What is the default seeding policy ?

> 
> 3) We will continue to, by default, set the global random stream with either
> /dev/random
> or the time of day, but will provide an API so the user can have access to
> the
> see that was used in the case of something interesting about that particular
> seed.

I think that the default should be to use a constant deterministic seed
value (say, zero). It makes it easy to generate repeatable results when
debugging, which, I think, is what most people do most of the time
(compared to the small amount of time we often spend actually running a
simulation to get paper-quality results).

Mathieu



More information about the Ns-developers mailing list