Skip to content

Commit c99b961

Browse files
committed
Merge remote-tracking branch 'origin/v9-minor'
2 parents b2bac41 + 55a5356 commit c99b961

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
@@ -938,7 +938,7 @@ SCIP_RETCODE primalAddSol(
938938
(void*)sol, obj, insertpos, replace);
939939

940940
/* make sure that the primal bound is at least the lower bound */
941-
if( ! SCIPsetIsInfinity(set, obj) && ! SCIPsetIsInfinity(set, -SCIPgetLowerbound(set->scip)) && SCIPsetIsFeasGT(set, SCIPgetLowerbound(set->scip), obj) )
941+
if( !SCIPsetIsInfinity(set, obj) && !SCIPsetIsInfinity(set, -SCIPgetLowerbound(set->scip)) && SCIPsetIsFeasGT(set, SCIPgetLowerbound(set->scip), obj) )
942942
{
943943
if( SCIPprobGetObjsense(origprob) == SCIP_OBJSENSE_MINIMIZE )
944944
{
@@ -950,8 +950,20 @@ SCIP_RETCODE primalAddSol(
950950
SCIPmessagePrintWarning(messagehdlr, "Dual bound %g is smaller than the objective of the primal solution %g. The solution might not be optimal.\n",
951951
SCIPprobExternObjval(transprob, origprob, set, SCIPgetLowerbound(set->scip)), SCIPprobExternObjval(transprob, origprob, set, obj));
952952
}
953+
953954
#ifdef WITH_DEBUG_SOLUTION
954-
SCIPABORT();
955+
/* check for missed debugsol cutoff */
956+
if( SCIPdebugSolIsEnabled(set->scip) )
957+
{
958+
SCIP_SOL* debugsol;
959+
960+
SCIPdebugGetSol(set->scip, &debugsol);
961+
962+
if( SCIPprobGetObjsense(origprob) == SCIP_OBJSENSE_MINIMIZE )
963+
assert(SCIPsetIsFeasLE(set, SCIPgetDualbound(set->scip), SCIPsolGetOrigObj(debugsol)));
964+
else
965+
assert(SCIPsetIsFeasGE(set, SCIPgetDualbound(set->scip), SCIPsolGetOrigObj(debugsol)));
966+
}
955967
#endif
956968
}
957969

0 commit comments

Comments
 (0)