Skip to main content

Module ipopt_adapter

Module ipopt_adapter 

Source
Expand description

Adapter from crate::ipopt_nlp::IpoptNlp (the rich IPM- shaped NLP trait pounce-algorithm shares with the IPOPT lineage) to crate::sqp::SqpProblemSpec (the minimal evaluation surface the SQP outer loop binds against).

Lets SqpAlgorithm consume any NLP that the existing IPM IpoptAlgorithm consumes — same .nl files via the AMPL frontend, same CUTEst harness, same Python bindings — without duplicating the NLP layer.

Conversions:

  • Slice ↔ DenseVector for inputs/outputs (per-call allocation; the IPM does the same inside IpoptCalculatedQuantities).
  • eval_c and eval_d combined into a single constraint vector (equalities first, inequalities after). The combined bounds set bl = bu = 0 for equality rows, bl = d_l[i], bu = d_u[i] for inequality rows.
  • eval_jac_c and eval_jac_d combined into a single sparse-triplet Jacobian (inequality-row indices shifted by m_c).
  • eval_h(x, 1.0, λ[..m_c], λ[m_c..]) for the Lagrangian Hessian. The SQP multiplier vector λ_g is layout- compatible: first m_c entries are y_c, next m_d are y_d.

Structs§

IpoptNlpAdapter