[Ns-bugs] [Bug 101] random variable intialization
code at nsnam.ece.gatech.edu
Tue May 31 09:19:02 PDT 2011
--- Comment #7 from Mathieu Lacage <mathieu.lacage at gmail.com> 2011-05-31 12:19:01 EDT ---
(In reply to comment #6)
> Here's the approach I propose:
> Reserve x number of streams for explicit use. In order to not invalidate
> current simulations, these reserved streams should be well into the generator
> rather than at the beginning (for example, starting at stream y).
> To reserve these streams, we just need to generate the appropriate seeds for
> them. I have some test code that does this (saves x seeds starting at seed y
> into a static variable, much like nextSeed). Then, when you want to use a
> specific seed, specify the number (between 1-x) and the appropriate seed will
> be set. This will not affect nextSeed, so random variables created after this
> will not be affected.
> Here's my question. Can we make setting the stream be a function in
> RandomVariable, or does it need to have a separate constructor, or both? This
> depends upon how these will be used most often.
> Then, we'll need to decide the proper values of x and y:
> x - number of reserved streams, we'll need a double[x] static array
> y - number of unreserved streams before running into reserved ones, make affect
> performance to generate lots of these, but I haven't tested it yet
Before we go and hack stuff in, someone should take time to review what omnetpp
Configure bugmail: https://www.nsnam.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the Ns-bugs