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
- `rtol::T = √eps(T)`: relative tolerance, the algorithm stops when ||∇f(xᵏ)|| ≤ atol + rtol * ||∇f(x⁰)||.
50
+
- `rtol::T = √eps(T)`: relative tolerance, the algorithm stops when ‖∇f(xᵏ)‖ ≤ atol + rtol * ‖∇f(x⁰)‖.
47
51
- `verbose::Int = 0`: if > 0, display iteration details every `verbose` iteration.
48
52
49
53
# Output
50
54
The value returned is a `GenericExecutionStats`, see `SolverCore.jl`.
51
55
56
+
# Callback
57
+
The callback is called at each iteration.
58
+
The expected signature of the callback is `callback(nlp, solver, stats)`, and its output is ignored.
59
+
Changing any of the input arguments will affect the subsequent iterations.
60
+
In particular, setting `stats.status = :user` will stop the algorithm.
61
+
All relevant information should be available in `nlp` and `solver`.
62
+
Notably, you can access, and modify, the following:
63
+
- `solver.x`: current iterate;
64
+
- `solver.gx`: current gradient;
65
+
- `stats`: structure holding the output of the algorithm (`GenericExecutionStats`), which contains, among other things:
66
+
- `stats.dual_feas`: norm of current gradient;
67
+
- `stats.iter`: current iteration counter;
68
+
- `stats.objective`: current objective function value;
69
+
- `stats.status`: current status of the algorithm. Should be `:unknown` unless the algorithm attained a stopping criterion. Changing this to anything will stop the algorithm, but you should use `:user` to properly indicate the intention.
70
+
- `stats.elapsed_time`: elapsed time in seconds.
71
+
52
72
# References
53
73
This is an adaptation for bound-constrained nonlinear least-squares problems of the TRON method described in
0 commit comments