You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The nice error reporting for not finite results in connections can render recoverable errors to be unrecoverable. By allowing some retries in a solver, calculations can become more robust
Proposed solution
Change cmf.integrator.call(...) to the following:
def __init__(self, project, err_tol=1e-9, max_errors=10):
super().__init__(project, err_tol)
self.errors = []
self.max_errors = max_errors
def __call__(self, t, reset=False):
import sys
until = self.t + t if t < self.t else t
while self.t < until:
try:
self.integrate_until(until, reset=reset)
except RuntimeError as e:
if len(self.errors) < self.max_errors:
self.errors.append((self.t, e))
self.reset()
sys.stderr.write(str(e) + '\n')
else:
raise
return self.t
The text was updated successfully, but these errors were encountered:
The nice error reporting for not finite results in connections can render recoverable errors to be unrecoverable. By allowing some retries in a solver, calculations can become more robust
Proposed solution
Change cmf.integrator.call(...) to the following:
The text was updated successfully, but these errors were encountered: