August 2015


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]>
Thu, 20 Aug 2015 22:43:52 +0200
text/plain (27 lines)
Okay, I tried to dig deeper into my problem and found something unusual.
I'm using an ObjectGrid2D for my simulation which I display using a 
FastObjectGridPortrayal2D. And I found something strange inside the code
of FastObjectGridPortrayal2D.draw().

When I run my simulation normally and set breakpoints inside
FastObjectGridPortrayal2D.draw() and the step() method of my agent
(using Eclipse), I see that the object id of the ObjectGrid2D object
that is used in both locations is identical (as it should be).  However,
when I load a checkpoint from the GUI, the object ids are different.
I.e. different ObjectGrid2D objects are used at the two locations. And
indeed, looking into these objects it turns out that "ogrid", the
ObjectGrid2D that is used inside  FastObjectGridPortrayal2D.draw(), is
empty i.e. contains no agents. Therefore everything is quite rightly
displayed as black (as defined by my colormap). But the ObjectGrid2D
object that is used by my step() method does contain all the objects
that were saved into the checkpoint and therefore the simulation itself
continues without problems.

So can it be that there is a bug in FastObjectGridPortrayal2D or the
code that calls it?
Unfortunately it seems that there is not a single example in
that uses ObjectGrid2D, which makes it difficult to see if I did
something wrong in my code :-(