That simple application was not created with the idea of removing
agents from the simulation as well. To accomplish something like
that, you need to get a hold of the Stoppable that is returned by the
schedule.scheduleRepeating(new Agent(x,y)); function call (maybe
store it in the agent?). Once you want to delete the agent, you need
to retrieve this Stoppable (access it from the Agent, it that's where
you stored it), and call its stop() method.
On Apr 29, 2006, at 11:30 PM, [log in to unmask] wrote:
> How do I delete a single agent in the Schelling Model after it's
> created with the following code in Schelling.java?
> schedule.scheduleRepeating(new Agent(x,y));
> Near as I can tell is to remove it from the schedule but couldn't
> figure that out in simstate.