You can You might be better off at this point to just modify your main method so that it runs a bunch of simulation and then calls whatever you need to call before quitting.
You can always run the model the explicit way like this:
if (!state.schedule.step(state)) break;
while(state.schedule.getSteps() < STEPS_PER_RUN);
chain a bunch of them together, extract information from the state object (perhaps with a custom method) and call whatever method you want after you have run a bunch of them.
SimState.finish() is called at the end of every run, i.e. every job when you use -repeat on the command line. Is there a function that's only called after the last run? I have been looking, but haven't found one.
A related, nitpicky question: Page 92 of the v. 19 (June 2015) manual describes the doLoop(...) methods in sim.engine.SimState, and says that when the methods run ".... Finally, stop() is called on the instance." For the first doLoop method,
at least, the instance in question is clearly a SimState, since "The
generator will be called to produce an instance of the desired SimState subclass." However, SimState doesn't have a stop() method. Is this a typo? Should it be finish()? (Or is this is a reference to a Stoppable that's available from the SimState?)
Marshall Abrams, Associate Professor
Department of Philosophy, University of Alabama at Birmingham
Mail: HB 414A, 900 13th Street South, Birmingham, AL 35294-1260; Office: HB 418