[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Swarm-Support] Query regarding changing seed in a RNG
From: |
Diego Corredor |
Subject: |
Re: [Swarm-Support] Query regarding changing seed in a RNG |
Date: |
Thu, 13 Sep 2007 15:36:42 -0500 |
Hi Steve,
I would like to know if there is a way to change the seed used by the
ListShuffler. I would like to be sure that the results observed in the
model that I have programmed are robust to the order of interaction
among consumers and firms.
Thanks,
Diego Corredor
2007/9/13, Steve Railsback <address@hidden>:
> Kavita Gangal wrote:
> > Hello,
> > My problem is as follows:
> >
> > I need to generate varying series of random integers between 1 and 60
> > using swarm Random Number Generators.
> > Currently I am using the following syntax:
> >
> > Globals.env.uniformIntRand.getIntegerWithMin$withMax (1,60);
>
> I am not too familiar with this...maybe someone will correct me.
>
> I think this uniformIntRand distribution uses a built-in random number
> generator called Globals.env.randomGenerator. It is an instance of
> SimpleRandomGenerator, the MT19937.
>
> According to the documentation set, SimpleRandomGenerator inherits
> methods from BasicRandomGenerator, which includes "setStateFromSeed".
> You should be able to set the seed using:
>
> Globals.env.randomGenerator.setStateFromSeed (anInteger);
>
> Somewhere (in the old email archives?) you can find examples of using
> the current clock time etc. as the value of (anInteger).
>
> Steve R.
>
>
>
> _______________________________________________
> Support mailing list
> address@hidden
> http://www.swarm.org/mailman/listinfo/support
>