Merge pull request #841 from PyPSA/print-IIS
print IIS if solver returns status infeasible
This commit is contained in:
commit
456da8d2d5
@ -81,6 +81,9 @@ Upcoming Release
|
|||||||
|
|
||||||
* Remove HELMETH option.
|
* Remove HELMETH option.
|
||||||
|
|
||||||
|
* Print Irreducible Infeasible Subset (IIS) if model is infeasible. Only for
|
||||||
|
solvers with IIS support.
|
||||||
|
|
||||||
**Bugs and Compatibility**
|
**Bugs and Compatibility**
|
||||||
|
|
||||||
* A bug preventing custom powerplants specified in ``data/custom_powerplants.csv`` was fixed. (https://github.com/PyPSA/pypsa-eur/pull/732)
|
* A bug preventing custom powerplants specified in ``data/custom_powerplants.csv`` was fixed. (https://github.com/PyPSA/pypsa-eur/pull/732)
|
||||||
|
@ -839,6 +839,9 @@ def solve_network(n, config, solving, opts="", **kwargs):
|
|||||||
f"Solving status '{status}' with termination condition '{condition}'"
|
f"Solving status '{status}' with termination condition '{condition}'"
|
||||||
)
|
)
|
||||||
if "infeasible" in condition:
|
if "infeasible" in condition:
|
||||||
|
labels = n.model.compute_infeasibilities()
|
||||||
|
logger.info("Labels:\n" + labels)
|
||||||
|
n.model.print_infeasibilities()
|
||||||
raise RuntimeError("Solving status 'infeasible'")
|
raise RuntimeError("Solving status 'infeasible'")
|
||||||
|
|
||||||
return n
|
return n
|
||||||
|
Loading…
Reference in New Issue
Block a user