@@ -663,7 +663,7 @@ SCIP_RETCODE primalAddSol(
663
663
(void * )sol , obj , insertpos , replace );
664
664
665
665
/* 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 ) )
667
667
{
668
668
if ( SCIPprobGetObjsense (origprob ) == SCIP_OBJSENSE_MINIMIZE )
669
669
{
@@ -675,8 +675,20 @@ SCIP_RETCODE primalAddSol(
675
675
SCIPmessagePrintWarning (messagehdlr , "Dual bound %g is smaller than the objective of the primal solution %g. The solution might not be optimal.\n" ,
676
676
SCIPprobExternObjval (transprob , origprob , set , SCIPgetLowerbound (set -> scip )), SCIPprobExternObjval (transprob , origprob , set , obj ));
677
677
}
678
+
678
679
#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
+ }
680
692
#endif
681
693
}
682
694
0 commit comments