MASON-INTEREST-L Archives

May 2006

MASON-INTEREST-L@LISTSERV.GMU.EDU

Options: Use Monospaced Font
Show HTML 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:
Sean Luke <[log in to unmask]>
Reply To:
MASON Multiagent Simulation Toolkit <[log in to unmask]>
Date:
Tue, 2 May 2006 21:39:05 -0400
Content-Type:
text/plain
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