From c8155b7c33eaaa1894df7d9be26e493428121a6b Mon Sep 17 00:00:00 2001 From: Chris Matrakidis
Date: Sun, 8 Jan 2017 21:41:58 +0200 Subject: [PATCH 2/3] remove assert where minisat detects trivial conflicts diff --git a/src/api/minisat1.c b/src/api/minisat1.c index 2244493..1b7ea91 100644 --- a/src/api/minisat1.c +++ b/src/api/minisat1.c @@ -88,7 +88,13 @@ int glp_minisat1(glp_prob *P) ind[len] = lit_neg(ind[len]); } xassert(len > 0); - xassert(solver_addclause(s, &ind[1], &ind[1+len])); + if (!solver_addclause(s, &ind[1], &ind[1+len])) + { /* found trivial conflict */ + xfree(ind); + solver_delete(s); + P->mip_stat = GLP_NOFEAS; + goto fini; + } } xfree(ind); /* call the solver */ -- 2.7.4