MASON-INTEREST-L Archives

May 2014

MASON-INTEREST-L@LISTSERV.GMU.EDU

Options: Use Monospaced 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:
Wed, 14 May 2014 23:43:31 -0400
MIME-version:
1.0 (Mac OS X Mail 7.2 \(1874\))
Reply-To:
MASON Multiagent Simulation Toolkit <[log in to unmask]>
Content-type:
text/plain; charset=iso-8859-1
Subject:
From:
Sean Luke <[log in to unmask]>
In-Reply-To:
Content-Transfer-Encoding:
8bit
Parts/Attachments:
text/plain (26 lines)
SparseGrid2D contains objects.  It is a representation of space as an infinite grid.

The Schedule contains "agents", which MASON calls Steppables.  It is a representation of time.

It sounds like you have added your agent object to both data structures.

If you have stopped an agent in the Schedule (after, I presume, scheduling it repeating), it will eventually drop out of the Schedule.  Why would you think it'd also be deleted from the SparseGrid2D?  Or any other data structure?

When you call stop() on your stopper, you need to also manually call removeObject() on your SparseGrid2D.

Sean

On May 14, 2014, at 11:30 PM, Francesco Pizzitutti <[log in to unmask]> wrote:

> Hi,
> 
> I am creating and destroying a lot of agents during my simulation. They are all 
> attached to a SparseGrid2D. For some reason when I stop, with the stopper an 
> agent, the reference between the agent and the grid remain active. This leads to 
> an increase in the memory use and to a progressive slowdown of the simulation.  
> 
> If I periodically reset the sparseGrid2D containing all the agents this remove all 
> the references and free memory space. Is this the only solution to this problem?
> 
> Francesco

ATOM RSS1 RSS2