[Ns-developers] random variable API-- current status

Tom Henderson tomh at tomh.org
Wed Jan 21 22:04:15 PST 2009

On the weekly chat today, I volunteered to try to summarize what the 
current API proposals and requirements were for the random variable 
changes.  Here is my current scorecard, with references below.

1) remove code that seeds the RNG with /dev/random or time-of-day [*]

2) remove RandomVariable::GetSingleValue () function [*]

3) allow to set/get the seed with one value instead of six values [*]

4) add non-static function to class UniformVariable [*]:
   double GetValue (double min, double max)

5) create new class SeedManager to handle all seed/run number methods 
with global scope [**]

6) Add RandomVariable::SetSeed (uint32_t seed) [**]

7)  allow getting the global seed+run number from an env var. Suggested
format: NS_RNG=seed:run where seed is a single 32 bit number. Also
support NS_RNG=print [**]

8) support command-line options which override NS_RNG env var. [**]
   --RngSeed=seed (seed is a single 32 bit number)

9) make it possible to change the seed of a specific RandomVariable
instance using GtkConfigStore and with Config::Set ("/...", ..)  [**]

10) get rid of 	static uint32_t SeedManager::GetSeed ();  [***]

11)  the seed and run numbers automatically
end up in the ConfigStore output for any given execution. [****]





More information about the Ns-developers mailing list