MASON-INTEREST-L Archives

January 2017

MASON-INTEREST-L@LISTSERV.GMU.EDU

Options: Use Monospaced Font
Show HTML 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:
Thu, 26 Jan 2017 23:37:10 +0100
MIME-version:
1.0 (Mac OS X Mail 7.3 \(1878.6\))
Reply-To:
MASON Multiagent Simulation Toolkit <[log in to unmask]>
Content-type:
text/plain; charset=us-ascii
Subject:
From:
Sean Luke <[log in to unmask]>
In-Reply-To:
Message-ID:
Content-Transfer-Encoding:
8bit
Parts/Attachments:
text/plain (32 lines)
Okay, here we go.

1. setGridLines is operating correctly -- its default setting draws grid lines every 10 grid cells.  Your grid is only 14x10, so it's showing you exactly what would be expected.  If your goal is to have a grid line every single cell, you could say setGridModulus(1).  Also note that you're drawing a 14x10 grid but are squishing it into a square (400, 400) in the Display2D. You might instead try drawing it in proportion as a rectangle, that maybe (560, 400). 

2. The red border is a bug which was fixed in the current repository version of MASON.  Try that one.

Hope that's helpful.

Sean


On Jan 25, 2017, at 5:01 PM, Stewart Aitken <[log in to unmask]> wrote:

> I am having difficulties with getting the grid lines and border to function as I would like. 
> 
> 		portrayal.setField(((SimEnviro) state).getAgentSpace());
> 		portrayal.setGridLines(false);
> 		portrayal.setBorder(true);
> 
>                agentSpace = new ObjectGrid2D(14,10);
> 
> I am using these settings on Windows 10 with MASON 19 with the updated setBorder gives the correct agent scale and a complete on all four sides red border.
> When I activate the setGridlines it only gives a single blue line about a quarter of the way from the right-hand side. The red border remains the same as above. Subsequently, changing agentspace to:
> 
>                agentSpace = new ObjectGrid2D(140,100);
> 
> Gives the correct number of cells within the borders but the agents are substantially smaller than they are without the gridlines. In addition, the red border fails to show on the right-hand edge and the bottom edge.
> How can I arrange for the agents to have a single agent in each grid cell and ensure they fill the cell?
> Any help gratefully received.
> Stewart Aitken
> 

ATOM RSS1 RSS2