Skip to content

Commit ca402bb

Browse files
Merge branch 'fix-safe-conflict' into 'master'
Fix safe conflict See merge request integer/scip!3858
2 parents 2dfffc9 + b9c36c1 commit ca402bb

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/scip/conflict_general.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -819,6 +819,7 @@ SCIP_RETCODE addRowToAggrRow(
819819
assert(row != NULL);
820820
assert(weight != 0.0);
821821
assert(safely == set->exact_enable);
822+
assert(success != NULL);
822823

823824
/* add minimal value to dual row's left hand side: y_i < 0 -> lhs, y_i > 0 -> rhs */
824825
negated = weight < 0.0;
@@ -834,8 +835,7 @@ SCIP_RETCODE addRowToAggrRow(
834835
else
835836
{
836837
*success = FALSE;
837-
/**@todo add row safely */
838-
/* SCIP_CALL( SCIPaggrRowAddRowSafely(set->scip, aggrrow, row, weight, negated ? -1 : 1, success) ); */
838+
SCIP_CALL( SCIPaggrRowAddRowSafely(set->scip, aggrrow, row, weight, negated ? -1 : 1, success) );
839839
}
840840

841841
SCIPsetDebugMsg(set, " -> add %s row <%s>[%g,%g](lp depth: %d): dual=%g -> dualrhs=%g\n",

src/scip/conflictstore.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -330,10 +330,8 @@ SCIP_RETCODE removeExactConflictFromCertificateHashmap(
330330

331331
certificate = SCIPgetCertificate(set->scip);
332332
assert(certificate != NULL);
333-
assert(certificate->rowdatahash != NULL);
334333

335-
/* only do something if constraint does not already exist */
336-
if( SCIPhashmapExists(certificate->rowdatahash, (void*) cons) )
334+
if( certificate->rowdatahash != NULL && SCIPhashmapExists(certificate->rowdatahash, (void*) cons) )
337335
{
338336
SCIP_CALL( SCIPhashmapRemove(certificate->rowdatahash, (void*) cons) );
339337
}

0 commit comments

Comments
 (0)