Automatic Resets of Optimizations

If the first simulation does not run for some reason or generates an error, the entire optimization is reset. Otherwise, if the user stops a running optimization or an error occurs after an optimization starts successfully, the results to that point are kept and the optimization is not reset.