MASON-INTEREST-L Archives

June 2005

MASON-INTEREST-L@LISTSERV.GMU.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Sean Luke <[log in to unmask]>
Reply To:
MASON Multiagent Simulation Toolkit <[log in to unmask]>
Date:
Thu, 9 Jun 2005 15:46:15 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (18 lines)
On Jun 9, 2005, at 1:40 PM, glen e. p. ropella wrote:

> I think you should be able to use Bag.shuffle() to reschedule
> them manually.  E.g. in your SimState.step() method, you would say
> something like:
>
> public Bag agents;  // filled with parents and children
> public void step() {
>    agents.shuffle(this.random);
>    for (int agentNdx=0 ; agentNdx<agents.numObjs ; agentNdx++ ) {
>       schedule.scheduleOnce(agents.objs[agentNdx]);
>    }
> }

FWIW, there's a tool which does this already: RandomSequence.

Sean

ATOM RSS1 RSS2