Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/v9-minor'
Browse files Browse the repository at this point in the history
  • Loading branch information
scip-ci committed Oct 10, 2024
2 parents be3ef27 + bb6e0d9 commit 075776f
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 38 deletions.
5 changes: 2 additions & 3 deletions .gitlab/merge_request_templates/Code_Review.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,9 @@
### Testing

* [ ] ctest passes without errors (type some of `jenkins ctest {soplex master,soplex bugfix,cplex,gurobi,mosek,xpress,highs}`).
* [ ] The performance impact on MILP has been checked (type some of `jenkins performance {mip,mip quick,mip continue}`), **or** the changed code will not be executed for MILP instances, **or** the changed code will not be executed by default.
* [ ] The performance impact on MINLP has been checked (type some of `jenkins performance {minlp,minlplib,minlp quick,minlp continue}`) **or** the changed code will not be executed by default.
* [ ] The performance impact has been checked (type some of `jenkins performance {mip,minlp,pb} (quick|continue|)`), **or** the changed code will not be executed by default.
* [ ] The new code is sufficiently covered by tests (perhaps, new coverage settings or new unit tests have been added).
* Consider a debug run (type some of `jenkins debug {short,minlp,mip}`).
* Consider a debug run (type some of `jenkins debug {short,minlp,mip,pb}`).

### Does this merge request introduce an API change? :warning:

Expand Down
2 changes: 1 addition & 1 deletion doc/xternal.c
Original file line number Diff line number Diff line change
Expand Up @@ -8799,7 +8799,7 @@
* to use SCIP and SCIP-SDP from Matlab and Octave.
* - <a href="https://github.com/scipopt/JSCIPOpt">JSCIPOpt</a> is an interface for Java.
* - <a href="https://github.com/scipopt/russcip">Russcip</a> is an interface for Rust.
* - <a href="https://github.com/scipopt/SCIPpp">SCIP++</a> is a modeling interfaces for C++.
* - <a href="https://github.com/scipopt/SCIPpp">SCIP++</a> is a modeling interface for C++.
*
* Contributions to these projects are very welcome.
*
Expand Down
14 changes: 3 additions & 11 deletions src/scip/branch_allfullstrong.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,6 @@ SCIP_RETCODE branch(
int npseudocands;
int npriopseudocands;
int bestpseudocand;
#ifndef NDEBUG
SCIP_Real cutoffbound;
cutoffbound = SCIPgetCutoffbound(scip);
#endif

assert(branchrule != NULL);
assert(strcmp(SCIPbranchruleGetName(branchrule), BRANCHRULE_NAME) == 0);
Expand Down Expand Up @@ -165,7 +161,7 @@ SCIP_RETCODE branch(

assert(*result == SCIP_DIDNOTRUN);
assert(0 <= bestpseudocand && bestpseudocand < npseudocands);
assert(SCIPisLT(scip, provedbound, cutoffbound));
assert(SCIPisLT(scip, provedbound, SCIPgetCutoffbound(scip)));

var = pseudocandscopy[bestpseudocand];

Expand Down Expand Up @@ -316,10 +312,6 @@ SCIP_RETCODE SCIPselectVarPseudoStrongBranching(
SCIP_Real lpobjval;
SCIP_Bool allcolsinlp;
SCIP_Bool exactsolve;
#ifndef NDEBUG
SCIP_Real cutoffbound;
cutoffbound = SCIPgetCutoffbound(scip);
#endif

assert(scip != NULL);
assert(pseudocands != NULL);
Expand Down Expand Up @@ -442,8 +434,8 @@ SCIP_RETCODE SCIPselectVarPseudoStrongBranching(
up = MAX(up, lpobjval);
downgain = down - lpobjval;
upgain = up - lpobjval;
assert(!allcolsinlp || exactsolve || !downvalid || downinf == SCIPisGE(scip, down, cutoffbound));
assert(!allcolsinlp || exactsolve || !upvalid || upinf == SCIPisGE(scip, up, cutoffbound));
assert(!allcolsinlp || exactsolve || !downvalid || downinf == SCIPisGE(scip, down, SCIPgetCutoffbound(scip)));
assert(!allcolsinlp || exactsolve || !upvalid || upinf == SCIPisGE(scip, up, SCIPgetCutoffbound(scip)));
assert(downinf || !downconflict);
assert(upinf || !upconflict);

Expand Down
8 changes: 6 additions & 2 deletions src/scip/scip_prob.c
Original file line number Diff line number Diff line change
Expand Up @@ -3725,7 +3725,9 @@ SCIP_RETCODE SCIPupdateLocalLowerbound(
}

/** if given value is tighter (higher for minimization, lower for maximization) than the node's dual bound, sets the
* node's dual bound to the new value. Only applicable to non-leafs because the node priority queue remains untouched.
* node's dual bound to the new value.
*
* @note must not be used on a leaf because the node priority queue remains untouched
*
* @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
* SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
Expand All @@ -3747,7 +3749,9 @@ SCIP_RETCODE SCIPupdateNodeDualbound(
}

/** if given value is higher than the node's lower bound (in transformed problem), sets the node's lower bound to the
* new value. Only applicable to non-leafs because the node priority queue remains untouched.
* new value.
*
* @note must not be used on a leaf because the node priority queue remains untouched
*
* @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
* SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
Expand Down
2 changes: 2 additions & 0 deletions src/scip/scip_tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,8 @@ SCIP_RETCODE SCIPgetOpenNodesData(
}

/** cuts off node and whole sub tree from branch and bound tree
*
* @note must not be used on a leaf because the node priority queue remains untouched
*
* @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
* SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
Expand Down
35 changes: 16 additions & 19 deletions src/scip/scip_var.c
Original file line number Diff line number Diff line change
Expand Up @@ -2946,7 +2946,7 @@ SCIP_RETCODE SCIPgetVarStrongbranchFrac(

assert(var != NULL);
assert(lperror != NULL);
assert(!SCIPtreeProbing(scip->tree)); /* we should not be in strong branching with propagation mode */
assert(!SCIPinProbing(scip)); /* we should not be in strong branching with propagation mode */
assert(var->scip == scip);

SCIP_CALL( SCIPcheckStage(scip, "SCIPgetVarStrongbranchFrac", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
Expand Down Expand Up @@ -3044,15 +3044,13 @@ SCIP_RETCODE SCIPgetVarStrongbranchFrac(
{
if( !idempotent ) /*lint !e774*/
{
SCIP_CALL( analyzeStrongbranch(scip, var, downinf, upinf, downconflict, upconflict) );
}
else
{
if( downinf != NULL )
*downinf = localdownvalid && SCIPsetIsGE(scip->set, localdown, scip->lp->cutoffbound);
if( upinf != NULL )
*upinf = localupvalid && SCIPsetIsGE(scip->set, localup, scip->lp->cutoffbound);
SCIP_CALL( analyzeStrongbranch(scip, var, NULL, NULL, downconflict, upconflict) );
}

if( downinf != NULL )
*downinf = localdownvalid && SCIPsetIsGE(scip->set, localdown, scip->lp->cutoffbound);
if( upinf != NULL )
*upinf = localupvalid && SCIPsetIsGE(scip->set, localup, scip->lp->cutoffbound);
}

if( down != NULL )
Expand Down Expand Up @@ -3766,11 +3764,12 @@ SCIP_RETCODE SCIPgetVarStrongbranchInt(
SCIP_Bool localdownvalid;
SCIP_Bool localupvalid;

SCIP_CALL( SCIPcheckStage(scip, "SCIPgetVarStrongbranchInt", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );

assert(var != NULL);
assert(lperror != NULL);
assert(var->scip == scip);

SCIP_CALL( SCIPcheckStage(scip, "SCIPgetVarStrongbranchInt", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );

lpobjval = SCIPgetLPObjval(scip);
if( downvalid != NULL )
*downvalid = FALSE;
Expand Down Expand Up @@ -3864,15 +3863,13 @@ SCIP_RETCODE SCIPgetVarStrongbranchInt(
{
if( !idempotent ) /*lint !e774*/
{
SCIP_CALL( analyzeStrongbranch(scip, var, downinf, upinf, downconflict, upconflict) );
}
else
{
if( downinf != NULL )
*downinf = localdownvalid && SCIPsetIsGE(scip->set, localdown, scip->lp->cutoffbound);
if( upinf != NULL )
*upinf = localupvalid && SCIPsetIsGE(scip->set, localup, scip->lp->cutoffbound);
SCIP_CALL( analyzeStrongbranch(scip, var, NULL, NULL, downconflict, upconflict) );
}

if( downinf != NULL )
*downinf = localdownvalid && SCIPsetIsGE(scip->set, localdown, scip->lp->cutoffbound);
if( upinf != NULL )
*upinf = localupvalid && SCIPsetIsGE(scip->set, localup, scip->lp->cutoffbound);
}

if( down != NULL )
Expand Down
10 changes: 8 additions & 2 deletions src/scip/tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -1231,7 +1231,10 @@ SCIP_RETCODE SCIPnodeFree(
return SCIP_OKAY;
}

/** cuts off node and whole sub tree from branch and bound tree */
/** cuts off node and whole sub tree from branch and bound tree
*
* @note must not be used on a leaf because the node priority queue remains untouched
*/
SCIP_RETCODE SCIPnodeCutoff(
SCIP_NODE* node, /**< node that should be cut off */
SCIP_SET* set, /**< global SCIP settings */
Expand Down Expand Up @@ -2377,7 +2380,10 @@ SCIP_RETCODE treeApplyPendingBdchgs(
return SCIP_OKAY;
}

/** if given value is larger than the node's lower bound, sets the node's lower bound to the new value */
/** if given value is larger than the node's lower bound, sets the node's lower bound to the new value
*
* @note must not be used on a leaf because the node priority queue remains untouched
*/
void SCIPnodeUpdateLowerbound(
SCIP_NODE* node, /**< node to update lower bound for */
SCIP_STAT* stat, /**< problem statistics */
Expand Down

0 comments on commit 075776f

Please sign in to comment.