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) 0 constraints. 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) 0 constraints (analogous).

  • mult_x_L (ndarray, shape ≥ n, optional) – Variable lower-bound multipliers z_L 0 from IPOPT. Only the first n entries are used. None is treated as zero.

  • mult_x_U (ndarray, shape ≥ n, optional) – Variable upper-bound multipliers z_U 0 from IPOPT. Only the first n entries are used. None is treated as zero.

Returns:

Infinity-norm of the stationarity residual, or None if mpcc_mult_G / mpcc_mult_H were not provided.

Return type:

float or None