[Ns-developers] Random Variables API changes

Mathieu Lacage mathieu.lacage at sophia.inria.fr
Mon Jan 19 11:41:14 PST 2009


On Sun, 2009-01-18 at 22:34 -0800, Tom Henderson wrote:

> In particular, it would be preferable if the end result of the 
> implementation change were that the seed and run numbers automatically 
> end up in the ConfigStore output for any given execution.

Ok, but that is another issue: would you mind open a bug report to keep
track of this specific feature ?

> Similarly, in all of the example files, I think we should be careful to 
> update our suggested usage pattern; e.g.:
> 
> -  RandomVariable::UseGlobalSeed (1, 1, 2, 3, 5, 8);
> +  uint32_t seed[6] = {1, 1, 2, 3, 5, 8};
> +  SeedManager::SetSeed(seed);
> 
> is going to reinforce the less-preferred behavior of changing seeds each 
> time to try to get independent runs.  Better would be something like:
> 
> -  RandomVariable::UseGlobalSeed (1, 1, 2, 3, 5, 8);
> +  // Change either the run number below or the RngXXX attribute to 
> obtain an independent replication
> +  SeedManager::SetRun (1);

I was under the impression that the recommended usage would be more
along the lines of:

- RandomVariable::UseGlobalSeed (1, 1, 2, 3, 5, 8);

and recommend using either the command-line or the env variable to
change the global seed and/or the run number.

Mathieu



More information about the Ns-developers mailing list