pympcc.compute_kkt_residual¶
- pympcc.compute_kkt_residual(result, problem, *, mpcc_mult_G=None, mpcc_mult_H=None, mult_x_L=None, mult_x_U=None)[source]¶
MPCC stationarity residual:
||∇f + Jg^T λ_g + Jh^T λ_h + JG^T μ_G + JH^T μ_H - z_L + z_U||_∞.- Parameters:
result (MPCCResult) – A solved MPCC result.
problem (MPCCProblem) – The problem instance used to produce the result.
mpcc_mult_G (ndarray, shape (n_comp,)) – MPCC multipliers for the
G(x) ≥ 0constraints. For Scholtes / direct these areλ_G + H ⊙ λ_GH; for lin-fukushima additionally+ λ_GPH; for smoothing+ (1 − G/r) ⊙ λ_φ; for augmented Lagrangianλ_G + μ_AL ⊙ H; for slackλ_{G−s_G}directly.mpcc_mult_H (ndarray, shape (n_comp,)) – MPCC multipliers for the
H(x) ≥ 0constraints (analogous).mult_x_L (ndarray, shape ≥ n, optional) – Variable lower-bound multipliers
z_L ≥ 0from IPOPT. Only the firstnentries are used.Noneis treated as zero.mult_x_U (ndarray, shape ≥ n, optional) – Variable upper-bound multipliers
z_U ≥ 0from IPOPT. Only the firstnentries are used.Noneis treated as zero.
- Returns:
Infinity-norm of the stationarity residual, or
Noneifmpcc_mult_G/mpcc_mult_Hwere not provided.- Return type:
float or None