I have a simple simulation where agents have a field that is set initially at a
random number and then increases by one with every step. The portrayal showing
the value of this field shows the values growing in colour intensity until the value
crosses the maximum value set in the SimpleColorMap class constructor.
If the simulation is run, stopped and run again, everything is fine. But if at any
point the "Show Layers" button is pressed, regardless of whether or not any of
the checkboxes indicating the layers are checked or unchecked, the simulation
slows down until the agent field values cross the maximum value. As each agent
reaches this maximum the simulation starts to speed up again, and once all
agents have crossed it the simulation runs as normal. It will still do this even
when it is stopped and restarted again. Simply clicking on that button once will
have this effect until the whole application is closed down.
Why does clicking on this button have this effect?
|