I do this on my simulations by using the checkpoint method.
Run in batch mode and checkpoint every 10 steps and I typically get about 100 files each of which can be used as the start point for a GUI run so I can review whats happened and if there is anything of interest in a particular range.

Stewart Aitken.

On 5 June 2014 17:19, Sadat Chowdhury <[log in to unmask]> wrote:

My simulations run in headless mode (or batch mode) by a class that extends the sim.engine.SimState base class. The simulation involves running an evolutionary system across several "generations". Typically, I can evolve around 300/400 generations within 20-30 mins this way.

The same simulation, if run using a 2D visualizer (sim.display.GUIState) will take a much longer run-time. In fact, a single generation would take at least 20 minutes (a "generation" is composed of several thousand simulations of some scenario with some number of agents). So it's practically impossible to visualize the entire experiment -- it would take several days. Actually, neither do I want to. Rather, I would like to  visualize a particular simulation every 100 generations or so.

One way of achieving this is to simply close the visualizer window (Java applet window that shows the simulation) momentarily, and then the simulation runs faster. However, it comes nowhere close to the speed of running that same simulation completely headless. This makes sense, because the "view" is still registered in the MVC plumbing and as the "model" is changing, the "controller" is still making update calls to the "view" -- regardless whether the "view" is active or not. If the window is closed, there is no rendering, so it runs slightly faster.

What I really want is a true detachment of the view from the model/controller for a certain number of configurable steps. Is it possible? I've been looking at the MASON source code, and it is fairly involved, but I don't see an easy way to accomplish this.

Maybe I am approaching this in the wrong way -- perhaps I should think of alternatives such as serializing during key moments and then somehow replaying them. Any help would be greatly appreciated.



EMAIL DISCLAIMER http://www.york.ac.uk/docs/disclaimer/email.htm