Randomness in ns-3

695 views
Skip to first unread message

Jack

unread,
Jul 14, 2013, 10:46:19 AM7/14/13
to ns-3-...@googlegroups.com
 Hello all
I would like to make random simulation
i read the relevant section in ns-3 manual and something is not clear to me.
In both SeedManager::SetSeed (3);SeedManager::SetRun (7); functions what is the meaning of the parameter which passed to the function?
In other words if i want cycle of 1000 independent results of the simulation for instance, which value i should choose ?
thanks
  

Konstantinos

unread,
Jul 14, 2013, 10:55:20 AM7/14/13
to ns-3-...@googlegroups.com
If you continued reading this part of the tutorial you would see this:


which answers your question. You need to change the Run number from 1-100 to get 100 independent results.

Jack

unread,
Jul 15, 2013, 6:05:20 AM7/15/13
to ns-3-...@googlegroups.com
hello Konstantinos 
thank you
In which function i should change the parameter 
SetSeed(i)
or SetRun(i)
when i run from 1 to 100
or both of them is necessary ? 
 

בתאריך יום ראשון, 14 ביולי 2013 16:55:20 UTC+2, מאת Konstantinos:

Konstantinos

unread,
Jul 15, 2013, 6:13:12 AM7/15/13
to ns-3-...@googlegroups.com
Hi,

Did you read the answer I gave you in my previous post or the link within that?

Which is better, setting a new seed or advancing the substream state? There is no guarantee that the streams produced by two random seeds will not overlap. The only way to guarantee that two streams do not overlap is to use the substream capability provided by the RNG implementation. Therefore, use the substream capability to produce multiple independent runs of the same simulation. In other words, the more statistically rigorous way to configure multiple independent replications is to use a fixed seed and to advance the run number. This implementation allows for a maximum of 2.3x10^{15} independent replications using the substreams.

Ederson santos

unread,
Feb 3, 2017, 8:55:00 AM2/3/17
to ns-3-users
Hello! I change 

segunda-feira, 15 de Julho de 2013 às 07:13:12 UTC-3, Konstantinos escreveu:
Hello,I change Run number, but don't work in my program. I try of diverses forms. How:

        //int seed = 3; 
ns3::RngSeedManager::SetSeed (1);
ns3::RngSeedManager::SetRun (30);
//SeedManager::SetSeed (1);
//SeedManager::SetRun (300); 


but, don't work. 

What I do? 

Tommaso Pecorella

unread,
Feb 4, 2017, 8:40:33 AM2/4/17
to ns-3-users
Hi,

I'll answer to your last question: "What I do?"
Well, reading the posting guidelines will help !
You didn't state your problem, how you tried to fix it, and you replied to a 4 years old post.

Cheers,

T.
Reply all
Reply to author
Forward
0 new messages