-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ConcurrentSimulationRunner: Error when one simulation fails #968
Comments
@PavelBal Agreed. This could be part of the result object as well somehow (eg. error object with the error and a status, success or fail) |
IMO, it would be sufficient just to terminate with an error giving a hint which simulation did not succeed. Otherwise the caller has to check if all runs terminated successfully, and, well, if a simulation failed then the user clearly has to do something about it manually. |
I agree it is best to run the simulations that were able to run and return the error only for the simulation with problems while still providing the results for the rest. We could in the future have some flag to terminate pending simulations when any of them fails if you want but I see situations where it will still be good to have the rest of the results. I have been working on this today. I am moving this logic to the ConcurrencyManager since it should be available for any class using concurrency. I think it will be ready soon. I just need to make sure there is no loose end. @PavelBal, good catch by the way. |
@PavelBal I would strongly recommend against terminating earlier. It is true the caller has to fix the simulations before keep going but now imagine you want to run 10 simulations and 4 of them are failing. If we terminate on first error you would need to run four failing runs before you are ready to go. While by just waiting theoretically a bit more, you should have had complete information so you could fix the problems at once and in the second run you should be able to check your results. I also see other options where you would like to still see the results of the remaining simulations. |
If one of the simulations passed to the
ConcurrentSimulationRunner
fails, the run is terminated with the error produced by that simulation:I propose to throw an error that explicitly states the id of the failed simulation, e.g.
Message: Simulation Id asdsadsad: Simulation run failed: some variables became negative. There are different possible reasons for this:
The text was updated successfully, but these errors were encountered: