Added model parameter, to determine if simulation is terminated with 'System.exit(0)'