Skip to content

Commit

Permalink
Export Irreducible Inconsistent Subsystem for gurobi if infeasible
Browse files Browse the repository at this point in the history
  • Loading branch information
felixblanke committed May 28, 2024
1 parent f27a2c3 commit ad802a0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/akplan/solve.py
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,14 @@ def solve_scheduling(

print("Status:", LpStatus[lp_problem.status])
if lp_problem.status == LpStatusInfeasible:
if solver_name == "GUROBI":
# compute irreducible inconsistent subsystem for debugging
# c.f. https://www.gurobi.com/documentation/current/refman/py_model_computeiis.html
lp_problem.solverModel.computeIIS()
iis_path = Path(output_lp_file)
iis_path = iis_path.parent / f"{iis_path.stem}-iis.ilp"
lp_problem.solverModel.write(str(iis_path))

return None

return export_scheduling_result(
Expand Down

0 comments on commit ad802a0

Please sign in to comment.