[Ns-developers] Random Variables API changes

Raj Bhattacharjea raj.b at gatech.edu
Wed Oct 22 12:45:28 PDT 2008


Including ns-developers in the reply list for this off-list mail...

On Thu, Oct 16, 2008 at 12:52 PM, Hadi Arbabi <hadiarbabi at gmail.com> wrote:
> Dear Raj,
>
>  I have attached codes for ns3 random variable with changes done.
>

I will post a repo with Hadi's changes for review.


> -GetSingleValue() is removed
> -There are some extensions like UseGlobalSeed, CheckGlobalSeed,
> GetGlobalSeed (can be set by only one value also)
> -Uniform variable have GetValue(min, max) now
>
>
> As you already know Global Seed and Run Number are static members or random
> variable class.
> We'd like the user to be able to set their values from command line as well
> (making them as system attributes).
> I was playing with SetTypeID() and .Attribute(...) , but I couldn't get the
> desired result. And I couldn't figure it out.
> Could be please help us with that?

Another way to get this behavior is to add a runNumber and seed
command line parameters to simulations which need it, and then pass
these parameters along to the RNGs.  This puts the onus on the
simulation writer to manage the run number and seed if he wants to in
a more manual fashion.

If you want attributes instead, I can invest some cycles into looking
into it.  I am not sure how easy it is to give attribute powers to the
RNG stuff, but I suspect Mathieu might know the answer to this
question off the top of his head.

-- 
Raj Bhattacharjea
Georgia Institute of Technology
School of Electrical and Computer Engineering
Ph.D. Candidate
Systems Analyst
404.894.2955


More information about the Ns-developers mailing list