Skip to content
Snippets Groups Projects
Commit 8d310c51 authored by chsieh16's avatar chsieh16
Browse files

Apply Dual Reduction after result is INF_OR_UNBD

parent 22ca231e
No related branches found
No related tags found
No related merge requests found
......@@ -125,6 +125,10 @@ class GurobiTeacherBase(TeacherBase):
def check(self, candidate) -> z3.CheckSatResult:
self._set_candidate(candidate)
self._gp_model.optimize()
if self._gp_model.status == gp.GRB.INF_OR_UNBD:
self._gp_model.setParam("DualReductions", 0)
self._gp_model.optimize()
if self._gp_model.status in [gp.GRB.OPTIMAL, gp.GRB.SUBOPTIMAL]:
return z3.sat
elif self._gp_model.status == gp.GRB.INFEASIBLE:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment