Subject: | |
From: | |
Reply To: | |
Date: | Thu, 20 Aug 2015 22:43:52 +0200 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
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 sim.app
that uses ObjectGrid2D, which makes it difficult to see if I did
something wrong in my code :-(
Axel
|
|
|