LISTSERV mailing list manager LISTSERV 16.0

Help for MASON-INTEREST-L Archives


MASON-INTEREST-L Archives

MASON-INTEREST-L Archives


MASON-INTEREST-L@LISTSERV.GMU.EDU


View:

Message:

[

First

|

Previous

|

Next

|

Last

]

By Topic:

[

First

|

Previous

|

Next

|

Last

]

By Author:

[

First

|

Previous

|

Next

|

Last

]

Font:

Proportional Font

LISTSERV Archives

LISTSERV Archives

MASON-INTEREST-L Home

MASON-INTEREST-L Home

MASON-INTEREST-L  June 2011

MASON-INTEREST-L June 2011

Subject:

Re: Setting the random seed

From:

"Martinez, Angel" <[log in to unmask]>

Reply-To:

MASON Multiagent Simulation Toolkit <[log in to unmask]>

Date:

Tue, 14 Jun 2011 11:33:43 -0400

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (60 lines)

Sean,

Thanks. I've rechecked and nextInt() is providing the same start
sequence as expected. Somehow, my code is still producing non-repeatable
behavior despite the fixed sequence. The ball is in my court now. 

Best,

Angel Martine
RAND Corporation

-----Original Message-----
From: MASON Multiagent Simulation Toolkit
[mailto:[log in to unmask]] On Behalf Of Sean Luke
Sent: Tuesday, June 14, 2011 11:00 AM
To: [log in to unmask]
Subject: Re: Setting the random seed

Angel, I'm not sure what the issue is, but you have full control over  
your random number generator. So for example, at the beginning of your  
model's start() method you could replace the random number generator  
like this:

	random = new MersenneTwisterFast(13492341L);

This should always guarantee a fixed sequence.  If it does not,  
there's got to be a bug in your model code somewhere: I'd need a  
stripped-down version to look at which exhibits the same behavior.

Sean


On Jun 14, 2011, at 10:41 AM, Martinez, Angel wrote:

> For debugging purposes, I need to use a fixed random seed. However,  
> I'm
> having trouble getting a fixed sequence to occur.
>
> I've tried setting it in the UI version of the simulation, in the
> constructor of the simulation itself, and explicitly calling
> random.setSeed() from the simulation start() method.
>
> Any ideas?
>
> Thanks,
>
> Angel Martinez
> RAND Corporation
>
>
________________________________________________________________________
__
>
> This email message is for the sole use of the intended recipient(s)  
> and
> may contain confidential information. Any unauthorized review, use,
> disclosure or distribution is prohibited. If you are not the intended
> recipient, please contact the sender by reply email and destroy all  
> copies
> of the original message.

Top of Message | Previous Page | Permalink

Advanced Options


Options

Log In

Log In