Expand description
Intermediate callback infrastructure for ripopt.
Provides a per-iteration callback mechanism matching IPOPT’s
SetIntermediateCallback. The callback is stored in a thread-local
(same pattern as logging) and invoked after each iteration in the IPM loop.
Also provides thread-local storage for the current iterate, so that
ripopt_get_current_iterate and ripopt_get_current_violations can
retrieve solver state during the intermediate callback (matching Ipopt’s
GetIpoptCurrentIterate and GetIpoptCurrentViolations).
Structs§
- Iterate
Snapshot - Snapshot of solver state, stored during the intermediate callback so that GetCurrentIterate/GetCurrentViolations can read it.
Functions§
- invoke_
intermediate - Invoke the intermediate callback with current iteration data.
Signature matches Ipopt’s Intermediate_CB parameters.
Returns
trueto continue,falseto stop (user requested termination). - set_
current_ iterate - Store a snapshot of the current iterate for GetCurrentIterate/Violations access.
- set_
intermediate_ callback - Install an intermediate callback for the current thread.
Pass
Noneto clear. - with_
current_ iterate - Access the current iterate snapshot (only valid during intermediate callback).