[Ns-developers] ns3: random numbers

Mathieu Lacage Mathieu.Lacage at sophia.inria.fr
Thu Mar 29 08:50:37 PDT 2007


On Thu, 2007-03-29 at 11:29 -0400, Raj Bhattacharjea wrote:

>         > The GetSeed method is used to find out what the randomly
>         chosen
>         > seed is, and presumably store it somewhere or write it to
>         stdout.
>         > The reason this is needed is that sometimes a random
>         simulation does 
>         > something interesting that we would like to reproduce and
>         study in
>         > more detail.  By printing out the value of the random seed
>         that caused
>         > the interesting behavior, I can use the GlobalSeed method to
>         specify 
>         > the exact seed needed to recreate it.
>         
>         This does not sound like a "power-user" feature. It does
>         indeed sound
>         useful enough that this should be documented.
> In order to use this information, you really have to understand the
> internal workings of RngStream, with its 18 internal state variables,
> along with how streams and seeds are advanced.  That said, the feature
> IS documented, so I don't quite understand the point you're trying to
> make. 

What I understand of what george explained is that users need to get
these values when they realize that these values lead to "interesting"
simulations and they want to reproduce these "interesting" simulations.
At least, this is what I understood from george's comments. I do not
think that the current documentation indicates this in any sane way.

Suggested change:
/**
 * \param seed the returned value of the internal RNG state
 *
 * This method returns in the user-supplied buffer opaque data which
 * can then be fed back to UseGlobalSeed () to reproduce the previous
 * simulation. This is typically used to reproduce "interesting"
 * simulations.
 */

Mathieu
-- 



More information about the Ns-developers mailing list