Skip to main content

Crate sqp_craft_solver

Crate sqp_craft_solver 

Source
Expand description

Native SQP driver: dense damped BFGS, convex QP subproblems behind QpBackend, and an L1 merit line search with per-constraint penalties.

A bounded research pilot, not a general solver: at most 256 variables and local Gauss–Newton restoration for inconsistent linearizations (disable it with max_restoration_steps = 0). Opt-in options add elastic step QPs, a second-order correction, and these mechanisms taken from SNOPT (docs/snopt-lessons.md):

Convergence means the first-order KKT residuals at the returned point are within the declared tolerances, in original units; it is not a global or second-order optimality certificate.

Each iteration at x_k:

  1. Solve the step QP min ½pᵀBp + gᵀp with bounds shifted to step coordinates, and accept it only through QpModel::accepts.
  2. Compute KKT residuals at x_k with the QP’s multipliers; stop with Status::Converged if all four are within tolerance.
  3. Update the penalty weights by Powell’s rule μ_i ← max(t_i, ½(μ_i + t_i)) with t_i = 1.1·|λ_i|, and backtrack on the merit φ(x) = f(x) + Σ μ_i · violation_i(c(x)) with an Armijo test against the predicted decrease of the linearized merit.
  4. At the accepted point call derivatives, then update B by damped BFGS on the Lagrangian gradient with the new multipliers at both ends.

Modules§

batch
Ordered independent solves with explicit outer/inner worker budgets.

Structs§

NativeSqp
The native SQP solver with QP backend B.
SqpOptions
Settings of NativeSqp. Every field is used; invalid values are rejected.

Enums§

HessianUpdate
How the BFGS update treats a step with too little curvature, sᵀy < 0.2·sᵀBs.
Merit
Merit function of the line search.
Scaling
Which constraint rows determine the scales.

Constants§

DENSE_SIZE_CAP
Largest number of variables the dense pilot accepts.
QP_TRACE_CAP
Largest number of QP models SqpOptions::record_qp_limit may keep.