Skip to main content

ConvergedCallback

Type Alias ConvergedCallback 

Source
pub type ConvergedCallback = Box<dyn FnMut(&IpoptDataHandle, &IpoptCqHandle, &Rc<RefCell<dyn IpoptNlp>>, Rc<RefCell<PdFullSpaceSolver>>)>;
Expand description

Callback fired by IpoptApplication::optimize_constrained once the IPM has converged (status SolveSucceeded or SolvedToAcceptableLevel) and before the user TNLP’s finalize_solution runs. Receives borrowed handles into the algorithm’s converged state.

Use case: post-optimal sensitivity analysis (pounce#7 / pounce-sensitivity). The callback receives a shared handle to the PD solver so a SensBacksolver adapter can run backsolves against the converged KKT factor — and so that handle may outlive the call frame (e.g. the public Solver session API retains the factor for repeated parametric_step / kkt_solve calls); receives the data / cq / nlp handles so the adapter can reproduce the augmented-system coefficient layout the IPM converged at.

Not the same as set_intermediate_callback (per-iteration progress notification) — this fires exactly once per optimize_* call, only on success.

Aliased Type§

pub struct ConvergedCallback(/* private fields */);