Seeding random number generator

Hi,

I’m sure this is obvious to people smarter than me, but what is a
good, easy way to seed the random number generator? I see discussions
in the group and in the user guide about using the seed and execseed
commands. I’m not sure I can tell from the discussions which is used
when though.

Thanks,
Emily

\

Emily,

I find I can get by using execseed, e.g.

execseed = 1 + gmillisec(jnow);

This sets the seed based on the time.

-Steve

On Tue, Sep 7, 2010 at 9:54 AM, emily wrote:

Hi,

I’m sure this is obvious to people smarter than me, but what is a
good, easy way to seed the random number generator? I see discussions
in the group and in the user guide about using the seed and execseed
commands. I’m not sure I can tell from the discussions which is used
when though.

Thanks,
Emily


To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.




– Steven Dirkse, Ph.D. GAMS Development Corp., Washington DC Voice: (202)342-0180 Fax: (202)342-0181 sdirkse@gams.com http://www.gams.com