@@ -392,15 +392,36 @@ EnumX.@enumx ReturnCode begin
392
392
ReturnCode.Stalled
393
393
394
394
The solution has stalled. This is only returned by algorithms for which stalling is a
395
- failure mode. Certain solvers like Nonlinear Least Squares solvers are considered
396
- successful if the solution has stalled, in those cases `ReturnCode.Success` is returned .
395
+ failure mode, such as on a NonlinearProblem where the found solution is larger than
396
+ the accepted tolerance .
397
397
398
398
## Properties
399
399
400
400
- `successful_retcode` = `false`
401
401
"""
402
402
Stalled
403
403
404
+ """
405
+ ReturnCode.StalledSuccess
406
+
407
+ The solution process has stalled, but the stall is not considered a failure of the solver.
408
+ For example, a nonlinear optimizer may have stalled, that is its steps went to zero, which
409
+ is a valid local minima.
410
+
411
+ ## Common Reasons for Seeing this Return Code
412
+
413
+ - For nonlinear least squares optimizations, this is given for local minima which exceed
414
+ the chosen tolerance, i.e. `f(x)=resid` where `||resid||>tol` so it's not considered
415
+ ReturnCode.Success but it is still considered a sucessful return of the solver since
416
+ it's a valid local minima (and there no minima which achieves the tolerance).
417
+
418
+ ## Properties
419
+
420
+ - `successful_retcode` = `true`
421
+
422
+ """
423
+ StalledSuccess
424
+
404
425
"""
405
426
ReturnCode.InternalLinearSolveFailed
406
427
@@ -510,6 +531,7 @@ function successful_retcode(retcode::ReturnCode.T)
510
531
retcode == ReturnCode. Success || retcode == ReturnCode. Terminated ||
511
532
retcode == ReturnCode. ExactSolutionLeft ||
512
533
retcode == ReturnCode. ExactSolutionRight ||
513
- retcode == ReturnCode. FloatingPointLimit
534
+ retcode == ReturnCode. FloatingPointLimit ||
535
+ retcode == ReturnCode. StalledSuccess
514
536
end
515
537
successful_retcode (sol:: AbstractSciMLSolution ) = successful_retcode (sol. retcode)
0 commit comments