Skip to main content

trust_constr

Function trust_constr 

Source
pub fn trust_constr<P: ConstrainedProblem>(
    problem: &P,
    x0: Vec<f64>,
    options: ConstrainedOptions,
) -> Result<ConstrainedResult, ErrorsJSL>
Expand description

Minimises f(x) subject to h(x) = 0 and g(x) ≤ 0 by a trust-region interior-point method (SciPy’s minimize(method='trust-constr') with a BFGS Hessian).

Inequalities get slacks, g(x) + s = 0, s > 0, and the barrier problem min f(x) − μ Σ ln sᵢ subject to the equalities is solved by Byrd and Omojokun’s trust-region SQP for a decreasing sequence of μ (0.1, then a factor 0.2 each time the barrier problem is solved to a tolerance that falls with it). Each SQP step is the sum of a normal step, which reduces the linearised constraint violation within 0.8 of the trust region, and a tangential step, projected conjugate gradients on the quadratic model in the null space of the constraint Jacobian. Slack steps are scaled by S and kept a fraction 0.995 from the boundary. Steps are accepted by the ℓ₂ merit function φ + ν‖c‖, the Lagrangian Hessian is a damped BFGS approximation, and the multipliers are least-squares estimates. max_iterations counts SQP iterations over all barrier problems.