diff --git a/doc/release_notes.rst b/doc/release_notes.rst index 5ac7925e..31e492a8 100644 --- a/doc/release_notes.rst +++ b/doc/release_notes.rst @@ -81,6 +81,9 @@ Upcoming Release * Remove HELMETH option. +* Print Irreducible Infeasible Subset (IIS) if model is infeasible. Only for + solvers with IIS support. + **Bugs and Compatibility** * A bug preventing custom powerplants specified in ``data/custom_powerplants.csv`` was fixed. (https://github.com/PyPSA/pypsa-eur/pull/732) diff --git a/scripts/solve_network.py b/scripts/solve_network.py index ff2a2f23..8c46e025 100644 --- a/scripts/solve_network.py +++ b/scripts/solve_network.py @@ -839,6 +839,9 @@ def solve_network(n, config, solving, opts="", **kwargs): f"Solving status '{status}' with termination condition '{condition}'" ) if "infeasible" in condition: + labels = n.model.compute_infeasibilities() + logger.info("Labels:\n" + labels) + n.model.print_infeasibilities() raise RuntimeError("Solving status 'infeasible'") return n