Skip to content

Commit 295f508

Browse files
committed
Merge branch '3773-fix-imprecise-pseudo-objective' into 'v9-minor'
Resolve "Imprecise pseudo objective" See merge request integer/scip!3547
2 parents a2608a6 + cd38a68 commit 295f508

File tree

9 files changed

+47
-114
lines changed

9 files changed

+47
-114
lines changed

CHANGELOG

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ Interface changes
5151
### Changed parameters
5252

5353
- presolving/milp/threads only configurable if PaPILO is built with TBB
54+
- numerics/recomputefac gets default value 1e+6 to aim at relative epsilon precision
5455

5556
### Data structures
5657

check/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -475,6 +475,7 @@ set(pairs_Issue
475475
"instances/Issue/3047.lp\;20000\;dualinfer"
476476
"instances/Issue/3132.lp\;0\;default"
477477
"instances/Issue/3499.lp\;11460\;closeobj"
478+
"instances/Issue/3556.cip\;57138036.9442457\;default"
478479
"instances/Issue/3589.cip\;-1\;default"
479480
"instances/Issue/3607.cip\;1\;default"
480481
"instances/Issue/3610.cip\;0\;default"
File renamed without changes.

src/scip/def.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@
185185
#define SCIP_DEFAULT_BOUNDSTREPS 0.05 /**< default minimal relative improve for strengthening bounds */
186186
#define SCIP_DEFAULT_PSEUDOCOSTEPS 1e-01 /**< default minimal variable distance value to use for pseudo cost updates */
187187
#define SCIP_DEFAULT_PSEUDOCOSTDELTA 1e-04 /**< default minimal objective distance value to use for pseudo cost updates */
188-
#define SCIP_DEFAULT_RECOMPFAC 1e+07 /**< default minimal decrease factor that causes the recomputation of a value (e.g., pseudo objective) instead of an update */
188+
#define SCIP_DEFAULT_RECOMPFAC 1e+06 /**< default minimal decrease factor that causes the recomputation of a value (e.g., pseudo objective) instead of an update */
189189
#define SCIP_DEFAULT_HUGEVAL 1e+15 /**< values larger than this are considered huge and should be handled separately (e.g., in activity computation) */
190190
#define SCIP_MAXEPSILON 1e-03 /**< maximum value for any numerical epsilon */
191191
#define SCIP_MINEPSILON 1e-20 /**< minimum value for any numerical epsilon */

src/scip/prop_pseudoobj.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1820,7 +1820,7 @@ SCIP_RETCODE propdataInit(
18201820
propdata->glbpropagated = FALSE;
18211821
propdata->glbpseudoobjval = SCIPgetGlobalPseudoObjval(scip);
18221822
propdata->cutoffbound = SCIPgetCutoffbound(scip);
1823-
assert(SCIPgetDepth(scip) > 0 || SCIPisFeasEQ(scip, propdata->glbpseudoobjval, SCIPgetPseudoObjval(scip)));
1823+
assert(SCIPgetDepth(scip) > 0 || SCIPisRelEQ(scip, propdata->glbpseudoobjval, SCIPgetPseudoObjval(scip)));
18241824

18251825
/* create hash table which is used for resolving bound changes */
18261826
if( nminactvars > 0 )
@@ -2430,11 +2430,11 @@ SCIP_RETCODE propagateCutoffboundBinvar(
24302430
/* if the lbobjchg and ubobjchg are both able to fix the variable to its upper (1.0) or lower (0.0) bound,
24312431
* respectively, we detected an cutoff
24322432
*
2433-
* @note There is no need to use SCIPisFeasLT() in case the objective is integral since the cutoff bound in that case
2433+
* @note There is no need to use SCIPisLT() in case the objective is integral since the cutoff bound in that case
24342434
* is the upper bound minus 1 plus the SCIPcutoffbounddelta() (which is MIN(100.0 * feastol, 0.0001)). However,
24352435
* if the objective is not integral we have to check w.r.t. an epsilon to avoid numerical problems.
24362436
*/
2437-
if( SCIPisFeasLT(scip, cutoffbound, pseudoobjval + ubobjchg) && SCIPisFeasLT(scip, cutoffbound, pseudoobjval + lbobjchg) )
2437+
if( SCIPisLT(scip, cutoffbound, pseudoobjval + ubobjchg) && SCIPisLT(scip, cutoffbound, pseudoobjval + lbobjchg) )
24382438
{
24392439
/* check if conflict analysis is applicable */
24402440
if( local && SCIPisConflictAnalysisApplicable(scip) )

src/scip/solve.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ SCIP_RETCODE SCIPprimalHeuristics(
378378
/* if the new solution cuts off the current node due to a new primal solution (via the cutoff bound) interrupt
379379
* calling the remaining heuristics
380380
*/
381-
if( (result == SCIP_FOUNDSOL && lowerbound > primal->cutoffbound) || SCIPsolveIsStopped(set, stat, FALSE) )
381+
if( SCIPsolveIsStopped(set, stat, FALSE) || ( result == SCIP_FOUNDSOL && SCIPsetIsGE(set, lowerbound, primal->cutoffbound) ) )
382382
break;
383383

384384
/* check if the problem is proven to be unbounded, currently this happens only in reoptimization */
@@ -3011,7 +3011,7 @@ SCIP_RETCODE applyBounding(
30113011
|| (!set->misc_exactsolve && SCIPsetIsGE(set, SCIPnodeGetLowerbound(focusnode), primal->cutoffbound)) )
30123012
{
30133013
/* call pseudo conflict analysis, if the node is cut off due to the pseudo objective value */
3014-
if( pseudoobjval >= primal->cutoffbound && !SCIPsetIsInfinity(set, primal->cutoffbound) && !SCIPsetIsInfinity(set, -pseudoobjval) )
3014+
if( !SCIPsetIsInfinity(set, -pseudoobjval) && !SCIPsetIsInfinity(set, primal->cutoffbound) && SCIPsetIsGE(set, pseudoobjval, primal->cutoffbound) )
30153015
{
30163016
SCIP_CALL( SCIPconflictAnalyzePseudo(conflict, blkmem, set, stat, transprob, origprob, tree, reopt, lp, branchcand, eventqueue, cliquetable, NULL) );
30173017
}
@@ -3485,7 +3485,7 @@ SCIP_RETCODE enforceConstraints(
34853485
else
34863486
{
34873487
pseudoobjval = SCIPlpGetPseudoObjval(lp, set, prob);
3488-
objinfeasible = SCIPsetIsFeasLT(set, pseudoobjval, SCIPnodeGetLowerbound(SCIPtreeGetFocusNode(tree)));
3488+
objinfeasible = SCIPsetIsDualfeasLT(set, pseudoobjval, SCIPnodeGetLowerbound(SCIPtreeGetFocusNode(tree)));
34893489
}
34903490

34913491
/* during constraint enforcement, generated cuts should enter the LP in any case; otherwise, a constraint handler
@@ -4768,7 +4768,7 @@ SCIP_RETCODE solveNode(
47684768
if( actdepth == 0 && !(*cutoff) && !(*unbounded) && !(*postpone) )
47694769
{
47704770
/* the root pseudo objective value and pseudo objective value should be equal in the root node */
4771-
assert(SCIPsetIsFeasEQ(set, SCIPlpGetGlobalPseudoObjval(lp, set, transprob), SCIPlpGetPseudoObjval(lp, set, transprob)));
4771+
assert(SCIPsetIsRelEQ(set, SCIPlpGetGlobalPseudoObjval(lp, set, transprob), SCIPlpGetPseudoObjval(lp, set, transprob)));
47724772

47734773
SCIPprobStoreRootSol(transprob, set, stat, lp, SCIPtreeHasFocusNodeLP(tree));
47744774
}

tests/src/bugs/varboundnumerics.c

Lines changed: 0 additions & 67 deletions
This file was deleted.

0 commit comments

Comments
 (0)