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 ↔
DenseVectorfor inputs/outputs (per-call allocation; the IPM does the same insideIpoptCalculatedQuantities). eval_candeval_dcombined into a single constraint vector (equalities first, inequalities after). The combined bounds setbl = bu = 0for equality rows,bl = d_l[i],bu = d_u[i]for inequality rows.eval_jac_candeval_jac_dcombined into a single sparse-triplet Jacobian (inequality-row indices shifted bym_c).eval_h(x, 1.0, λ[..m_c], λ[m_c..])for the Lagrangian Hessian. The SQP multiplier vectorλ_gis layout- compatible: firstm_centries arey_c, nextm_darey_d.
Structs§
Functions§
- pack_
bound_ multipliers - Pack the IPM’s compressed bound multipliers into the SQP convention:
one entry per variable,
λ_x = z_l − z_u. - split_
bound_ multipliers - Inverse of
pack_bound_multipliers: split a packed per-variableλ_xback into the IPM’s compressed(z_l, z_u). - split_
slack_ multipliers - Split the inequality multipliers
y_dinto the IPM’s compressed slack bound multipliers(v_l, v_u).