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:
Tue, 2 May 2006 21:39:05 -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:
Sean Luke <[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 (23 lines)
On May 2, 2006, at 1:08 AM, Moses wrote:

> New question: I've got to access the grid created in Schelling after
> createGrids().  I tried to access it through neighbors but got an  
> empty
> grid in the new function I created to access the grid.  How would I  
> access
> the grid created by createGrids()?

Moses, your question is not posed well enough to answer.

createGrids() is called when the object is constructed, and then is  
called again at start().  Whenever the method is called, the grid is  
rebuilt from scratch.

If you're trying to access the grid from an agent, you could probably  
do it with something like:

	IntGrid2D grid2d= ((Schelling)state).neighbors;
	int[][] theGridProper = grid.field;

Sean

ATOM RSS1 RSS2