pympcc.presolve

pympcc.presolve(problem)[source]

Reduce problem by FBBT, pinned-var elimination and dead-pair pruning.

Returns (reduced_problem, map). When nothing can be eliminated, or when reduction would yield an invalid problem (e.g. an empty Jacobian sparsity pattern), returns (problem, identity_map).

Detected linear infeasibility (an FBBT bound crossing) emits a UserWarning and falls back to identity so the original problem can surface the issue through the strategy’s normal infeasibility path.

Return type:

tuple[MPCCProblem, PresolveMap]

Parameters:

problem (MPCCProblem)