MASON-INTEREST-L Archives

May 2006

MASON-INTEREST-L@LISTSERV.GMU.EDU

Options: Use Proportional Font
Show Text Part by Default
Condense Mail Headers

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

Print Reply
Sender:
MASON Multiagent Simulation Toolkit <[log in to unmask]>
Date:
Mon, 1 May 2006 19:35:28 -0400
MIME-version:
1.0 (Apple Message framework v749.3)
Reply-To:
MASON Multiagent Simulation Toolkit <[log in to unmask]>
Content-type:
text/plain; charset=US-ASCII; delsp=yes; format=flowed
Subject:
From:
Liviu Panait <[log in to unmask]>
In-Reply-To:
Content-transfer-encoding:
7bit
Comments:
To: MASON Multiagent Simulation Toolkit <[log in to unmask]>
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