Terminate simulation based on the return value of a callback
Terminate simulation after a fixed number of model ticks