de_sim
de_sim copied to clipboard
Terminate method
Create a terminate() method for SimulationEngine.simulate(). A simulation can terminate in multiple ways, such as run out of events, exceed end time, trigger stop condition, or raise an exception. In some cases, it would be useful for a simulation run to perform certain actions before terminating. Example actions include:
- Before terminating take a checkpoint that could be used for debugging
- Open an interactive session that could be used to inspect the simulator
I imagine that terminate() could
- execute some events scheduled for the end of the simulation
- perform some tasks that are not simulation events
- and exit
mv to de_sim