May 2012


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

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

Print Reply
Axel Kowald <[log in to unmask]>
Reply To:
MASON Multiagent Simulation Toolkit <[log in to unmask]>
Tue, 22 May 2012 06:59:17 -0400
text/plain (1512 bytes) , MASONscreenshot.png (43 kB) , flockersScreenshot.png (32 kB)
Hello everybody,

I just started to use MASON and have a GUI question.
I do my simulations on an ObjectGrid2D that initially has a size of 100x100
together with a FastObjectGridPortrayal2D. In the GUI I would like to be
able to change the grid size before I start the actual simulation and my
problem is that the Display is created (and made visible) in the init()
method before I can change the grid size in the console window.

I looked at the flockers example and changed the size of the insideDisplay
within the setupPortrayals() method. The attached screenshot shows the
result after setting the height to 50. 
The new grid is squeezed inside the Display window, which is still square.
But this is only an aesthetic problem. More severe is that something seems
to be wrong with the underlying grid cells. They now appear as vertical
rectangles, while they were square on the 100x100 grid and should be square
on the 100x50 grid. Furthermore, I place two objects on the grid, 1 Nwt and
1 Nmt, but only one shows up on the 100x50 grid. If I run the simulation the
second object sometimes appears (as it diffuses around the grid) and then
disappears again. Of course it should be visible all the time since I am
using a wrapped torus. 

When I run the flockers example and change its size, it actually has very
similar problems. The shape of the flocker is okay, but from the 10 flockers
that should be visible on the grid only four exist (see screenshot).

Any ideas what could be the problem ?
Any hint is appreciated.