pympcc.classify_cq

pympcc.classify_cq(result, problem, *, tol=1e-06, lp_tol=1e-08)[source]

Classify the strongest MPCC constraint qualification at result.x.

The chain tested (strongest first):

  • MPCC-LICQ — gradients of all active equality, comp G/H, active inequality, and active bound rows are linearly independent.

  • MPCC-MFCQ — equality-style block (h, G_{I_G}, H_{I_H}) has full row rank, and a strict descent direction exists for every active inequality and active bound (see _mfcq_lp_feasible()).

Parameters:
  • result (MPCCResult, MPCCProblem) – Solved result and its source problem.

  • problem (MPCCResult, MPCCProblem) – Solved result and its source problem.

  • tol (float) – Active-set tolerance (default 1e-6).

  • lp_tol (float) – Strictness threshold for the MPCC-MFCQ LP (default 1e-8).

Return type:

dict[str, Any]

Returns:

  • dictcq ∈ {"MPCC-LICQ", "MPCC-MFCQ", "none", "unknown"}; active_set_sizes — counts per active subset ({"g","h","G","H","biactive","xL","xU"}); rank_deficitn_active_rows rank(M) (0 ⇒ LICQ); n_active_rows — total rows in the LICQ matrix.

  • cq == "unknown" when result.success is False (no point

  • classifying a non-converged iterate).