[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ns] Seeding the random number generator



Use 

ns-random 0 

at the beginning of your script. That seeds the "global" rng
heuristically. See misc.cc about ns-random.

If you are using more than one rng, you may follow Debo's suggestion.

- Haobo

On Thu, 12 Oct 2000, Debojyoti Dutta wrote:

> One way to do is to plug a rng object into whatever you want to do. then
> set the seed of the rng object. For this you need to modify the source.
> But someone else might hve a better solution
> 
> Debo
> 
> On Thu, 12 Oct 2000, Sebastian Zimmermann wrote:
> 
> > Hi,
> > 
> > how can I seed the random number generator heuristically? Can I do this
> > in the TCL script or do I have to modify the C code? (I don't want to
> > use random numbers in the TCL script, I want the RED gateway to produce
> > different results each time I run the simulator)
> > 
> > 
> > TIA
> > Sebastian
> > 
>