@@ -938,7 +938,7 @@ SCIP_RETCODE primalAddSol(
938
938
(void * )sol , obj , insertpos , replace );
939
939
940
940
/* 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 ) )
942
942
{
943
943
if ( SCIPprobGetObjsense (origprob ) == SCIP_OBJSENSE_MINIMIZE )
944
944
{
@@ -950,8 +950,20 @@ SCIP_RETCODE primalAddSol(
950
950
SCIPmessagePrintWarning (messagehdlr , "Dual bound %g is smaller than the objective of the primal solution %g. The solution might not be optimal.\n" ,
951
951
SCIPprobExternObjval (transprob , origprob , set , SCIPgetLowerbound (set -> scip )), SCIPprobExternObjval (transprob , origprob , set , obj ));
952
952
}
953
+
953
954
#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
+ }
955
967
#endif
956
968
}
957
969
0 commit comments