Skip to main content

Module ipopt_cq

Module ipopt_cq 

Source
Expand description

Lazy-cache layer — port of Algorithm/IpIpoptCalculatedQuantities.{hpp,cpp}.

Upstream’s CQ object exposes ~80 cached quantities (curr_f, curr_grad_f, curr_jac_c, curr_grad_lag_x, curr_compl_*, curr_nlp_error, etc.). All of them are pure derivations from (x, s, y_c, y_d, z_l, z_u, v_l, v_u) and the NLP function evaluations.

Phase 5 ships the priority subset needed by the KKT layer (Phase 6) and the convergence check / line search (Phase 7). Caching is intentionally deferred — every accessor recomputes its value on each call. Tag-based invalidation lands once the inner loop benchmarks justify the bookkeeping; correctness does not depend on it.

All accessors take &self and return Rc<dyn Vector>. NLP evaluations require a brief borrow_mut() on the Nlp handle; callers must not hold an outstanding borrow() across an accessor call.

Structs§

IpoptCalculatedQuantities
Calculated-quantities object. Holds shared handles on data and the NLP; per-quantity caches live in RefCells here.

Type Aliases§

IpoptCqHandle
Convenience handle. Mirrors upstream’s SmartPtr<CQ> flow.