[Ns-developers] Random Variables API changes

Tom Henderson tomh at tomh.org
Tue Jan 20 07:09:55 PST 2009


Mathieu Lacage wrote:
>>> 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.
>>>
>>  From what I understand, there is not really any advantage to specifying 
>> a six-tuple seed rather than a single integer.  Also, the recommended 
>> way to get independent replications is to set the run number differently 
>> using the same seed-- that is one of the main reasons we are abandoning 
>> time of day or /dev/random as a global seed.  So, it may be better if we 
>> deemphasize setting seeds in the example scripts and instead set run 
>> numbers.
> 
> I understand all this and I agree with it. I wanted to point out that I
> thought that the recommended default was to set the run number using
> NS_RNG or command line arguments rather than a hardcoded run number in
> the script.
> 

OK, I see your point.  I was mainly responding to the suggestion to 
recommend changing global seeds.

Yes, we discussed and I agreed with you previously that an NS_RNG 
variable, similar to NS_LOG, would be desirable and also to plumb it 
through the command line argument system.  If we further make them 
attributes of some sort, then we also allow scripts to have hardcoded 
seeds and run numbers, and output it into the ConfigStore.

In that case, I think we have maximum flexibility and can write a small 
sample program showing the different ways in which it can be manipulated.

Tom


More information about the Ns-developers mailing list