pympcc

A Python solver for Mathematical Programs with Complementarity Constraints (MPCC), built on IPOPT via cyipopt.

Problem form

\[\begin{split} \begin{aligned} \min_x \quad & f(x) \\ \text{s.t.} \quad & g(x) \le 0 \\ & h(x) = 0 \\ & G(x) \ge 0,\ H(x) \ge 0,\ G(x)^\top H(x) = 0. \end{aligned} \end{split}\]

Why pympcc

  • Thirteen reformulation strategies — six canonical (direct, Scholtes, smoothing, Lin-Fukushima, augmented Lagrangian, slack lifting) plus seven NCP-function variants (smooth-min, Chen-Chen-Kanzow, Kanzow-Schwartz, Chen-Mangasarian, Billups, Veelken-Ulbrich pow / sin); pick one with the selection guide.

  • Certified stationarity — TNLP refinement extracts MPCC-clean multipliers and classifies S- / W- / C-stationarity.

  • Diagnostics — MPCC-LICQ / MPCC-MFCQ check, B-stationarity certification, MPCC-SOSC, multi-merit cross-check.

  • Differentiablepympcc.solve_jax registers the solve as jax.custom_vjp for end-to-end gradients through the converged optimum.

  • Bilevel-readypympcc.bilevel.from_lower_level compiles bilevel programs to MPCCs by emitting lower-level KKT.

Indices