MASON-INTEREST-L Archives

May 2006

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:
Liviu Panait <[log in to unmask]>
Reply To:
MASON Multiagent Simulation Toolkit <[log in to unmask]>
Date:
Mon, 1 May 2006 19:35:28 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (22 lines)
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.

Liviu.

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.
>
> Moses

ATOM RSS1 RSS2