Print

Print


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