MASON-INTEREST-L Archives

April 2013

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:
Mon, 8 Apr 2013 22:19:17 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (29 lines)
On Apr 8, 2013, at 10:05 PM, Mark Coletti wrote:

> In other words, I think I resolved your problem by adding the following to your Sim.start():
> 
>         schedule.scheduleRepeating(new Steppable()
>         {
>             public void step(SimState state)
>             {
>                 trailSpace.updateSpatialIndex();
>             }
> 
>         });

Quick suggested improvement:


>         schedule.scheduleRepeating(new Steppable()
>         {
>             public void step(SimState state)
>             {
>                 trailSpace.updateSpatialIndex();
>             }
> 
>         }, -1, 1);

This will cause updateSpatialIndex() to happen before anything else each timestep.

Sean

ATOM RSS1 RSS2