Skip to content

Commit

Permalink
print IIS if solver returns status infeasible
Browse files Browse the repository at this point in the history
  • Loading branch information
fneum committed Jan 3, 2024
1 parent b786337 commit 257b16e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scripts/solve_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 257b16e

Please sign in to comment.