Skip to content

Commit 55a5356

Browse files
committed
Merge remote-tracking branch 'origin/v92-bugfix' into v9-minor
2 parents 50b8de5 + 974aaaf commit 55a5356

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

src/scip/primal.c

+14-2
Original file line numberDiff line numberDiff line change
@@ -663,7 +663,7 @@ SCIP_RETCODE primalAddSol(
663663
(void*)sol, obj, insertpos, replace);
664664

665665
/* make sure that the primal bound is at least the lower bound */
666-
if( ! SCIPsetIsInfinity(set, obj) && ! SCIPsetIsInfinity(set, -SCIPgetLowerbound(set->scip)) && SCIPsetIsFeasGT(set, SCIPgetLowerbound(set->scip), obj) )
666+
if( !SCIPsetIsInfinity(set, obj) && !SCIPsetIsInfinity(set, -SCIPgetLowerbound(set->scip)) && SCIPsetIsFeasGT(set, SCIPgetLowerbound(set->scip), obj) )
667667
{
668668
if( SCIPprobGetObjsense(origprob) == SCIP_OBJSENSE_MINIMIZE )
669669
{
@@ -675,8 +675,20 @@ SCIP_RETCODE primalAddSol(
675675
SCIPmessagePrintWarning(messagehdlr, "Dual bound %g is smaller than the objective of the primal solution %g. The solution might not be optimal.\n",
676676
SCIPprobExternObjval(transprob, origprob, set, SCIPgetLowerbound(set->scip)), SCIPprobExternObjval(transprob, origprob, set, obj));
677677
}
678+
678679
#ifdef WITH_DEBUG_SOLUTION
679-
SCIPABORT();
680+
/* check for missed debugsol cutoff */
681+
if( SCIPdebugSolIsEnabled(set->scip) )
682+
{
683+
SCIP_SOL* debugsol;
684+
685+
SCIPdebugGetSol(set->scip, &debugsol);
686+
687+
if( SCIPprobGetObjsense(origprob) == SCIP_OBJSENSE_MINIMIZE )
688+
assert(SCIPsetIsFeasLE(set, SCIPgetDualbound(set->scip), SCIPsolGetOrigObj(debugsol)));
689+
else
690+
assert(SCIPsetIsFeasGE(set, SCIPgetDualbound(set->scip), SCIPsolGetOrigObj(debugsol)));
691+
}
680692
#endif
681693
}
682694

0 commit comments

Comments
 (0)