pympcc.merit_cross_check

pympcc.merit_cross_check(result, problem)[source]

Cross-check three independent MPCC merit functions at result.x.

Disagreement between merits localises numerical trouble: one merit can mask issues another exposes (PATH ships this cross-check at termination time). All three should be comparable in magnitude on a healthy converged point.

Returns a dict with:

  • fb_max / fb_mean|G + H − √(G² + H²)| (Fischer-Burmeister).

  • min_map_max / min_map_mean|min(G, H)| (min-map).

  • inner_product_max / inner_product_mean|G · H| (matches result.comp_residual / result.comp_residual_mean).

  • disagreement_ratiomax / min of the three max-norms after flooring the denominator at 1e-16 (ratio close to 1 ⇒ merits agree; large ratio ⇒ scaling mismatch or ill-conditioning).

Return type:

dict[str, float]

Parameters: