pympcc.classify_stationarity

pympcc.classify_stationarity(result, problem, tol=1e-06)[source]

Classify the MPCC stationarity type of a solved result.

Returns the strongest level satisfied from the hierarchy W-stationary C-stationary M-stationary S-stationary (W is weakest, S is strongest).

Parameters:
  • result (MPCCResult) – A solved MPCC result (from pympcc.solve()).

  • problem (MPCCProblem) – The problem instance used to produce the result.

  • tol (float, optional) –

    Numerical tolerance (default 1e-6). Controls two things:

    • Biactive detection: pair i is biactive when G_i tol AND H_i tol.

    • Sign comparison: multipliers within [-tol, tol] are treated as zero.

Returns:

One of: "S-stationary", "M-stationary", "C-stationary", "W-stationary", "unknown", or "not stationary".

  • "unknown" — multipliers were not stored (result.mult_g is None).

  • "not stationary" — the solve did not converge (result.success is False).

Return type:

str

Notes

The classification uses the Lagrange multipliers for the G(x) ≥ 0 and H(x) ≥ 0 constraints, located at indices [n_ineq + n_eq : n_ineq + n_eq + 2*n_comp] of result.mult_g. The product/smoothing constraint multipliers (the last n_comp entries) are intentionally excluded — they are an artifact of the NLP reformulation.

Practical interpretation:
  • C-stationary: sufficient for many engineering applications.

  • S-stationary: implies MPCC-LICQ holds; equivalent to B-stationary under MPCC-LICQ (Scheel & Scholtes 2000).

  • W/M-stationary: solution may be a saddle point; consider multi-start or a different strategy.

References

Ye, J.J. (2000). Necessary optimality conditions for MPECs with equilibrium constraints. Mathematics of Operations Research, 25(4).

Scheel, H. and Scholtes, S. (2000). Mathematical programs with complementarity constraints: stationarity, optimality, and sensitivity. Mathematics of Operations Research, 25(1), 1–22.