Skip to content

Commit f629611

Browse files
committed
Merge branch 'strongbranching_dynamiclookahead_lognormal' into 'master'
Dynamic Lookahead SB See merge request integer/scip!3618
2 parents e2237d4 + 65f9184 commit f629611

File tree

3 files changed

+385
-12
lines changed

3 files changed

+385
-12
lines changed

CHANGELOG

+5
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ Features
3232
the problem is now solved in a Benders' decomposition relaxator; instead of decomposing the original SCIP instance, the relaxator builds the decomposed problem in
3333
sub-SCIPs and solves it via default Benders' Decomposition; a solution to the original (undecomposed) problem is now made available by the relaxator;
3434
the SCIP shell dialog "display statistics" now also prints the statistics from solving the Benders' decomposition in the relaxator
35+
- added a dynamic max-lookahead criterion for strong branching. Fits a probability distribution to the observed candidate gains and
36+
stop evaluating further candidates once the expected tree-size reduction no longer justifies the LP evaluation cost.
3537

3638
Performance improvements
3739
------------------------
@@ -193,6 +195,9 @@ Interface changes
193195
solving after the completion of the Benders' decomposition algorithm if the problem is not solved to optimality. The
194196
"nodelimit" parameter allows the user to provide a node limit for the Benders' decomposition master problem (by
195197
default the limits from the original SCIP instance are copied to the master problem).
198+
- new parameters "branching/relpscost/dynamiclookahead", "branching/relpscost/dynamiclookaheadquot", "branching/relpscost/dynamiclookdistribution",
199+
and "branching/relpscost/minsamplesize" to configure the dynamic max-lookahead criterion for strong branching: enable flag, fraction threshold,
200+
distribution choice, and minimum sample size.
196201

197202
### Data structures
198203

src/scip/branch.c

+9-9
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ SCIP_RETCODE SCIPbranchcandGetExternCands(
466466
int* nprioexterncands, /**< pointer to store the number of candidates with maximal priority, or NULL */
467467
int* nprioexternbins, /**< pointer to store the number of binary candidates with maximal priority, or NULL */
468468
int* nprioexternints, /**< pointer to store the number of integer candidates with maximal priority, or NULL */
469-
int* nprioexternimpls /**< pointer to store the number of implicit integer candidates with maximal priority,
469+
int* nprioexternimpls /**< pointer to store the number of implicit integer candidates with maximal priority,
470470
* or NULL */
471471
)
472472
{
@@ -643,7 +643,7 @@ SCIP_RETCODE SCIPbranchcandAddExternCand(
643643
{
644644
/* candidate has equal priority as the current maximum:
645645
* move away the first non-maximal priority candidate, move the current candidate to the correct
646-
* slot (binaries first, integers next, implicit integers next, continuous last) and increase the number
646+
* slot (binaries first, integers next, implicit integers next, continuous last) and increase the number
647647
* of maximal priority candidates
648648
*/
649649
if( insertpos != branchcand->nprioexterncands )
@@ -675,11 +675,11 @@ SCIP_RETCODE SCIPbranchcandAddExternCand(
675675
assert(vartype != SCIP_VARTYPE_CONTINUOUS);
676676
if( insertpos != branchcand->nprioexternbins + branchcand->nprioexternints )
677677
{
678-
branchcand->externcands[insertpos] =
678+
branchcand->externcands[insertpos] =
679679
branchcand->externcands[branchcand->nprioexternbins + branchcand->nprioexternints];
680-
branchcand->externcandsscore[insertpos] =
680+
branchcand->externcandsscore[insertpos] =
681681
branchcand->externcandsscore[branchcand->nprioexternbins + branchcand->nprioexternints];
682-
branchcand->externcandssol[insertpos] =
682+
branchcand->externcandssol[insertpos] =
683683
branchcand->externcandssol[branchcand->nprioexternbins + branchcand->nprioexternints];
684684

685685
insertpos = branchcand->nprioexternbins + branchcand->nprioexternints;
@@ -793,7 +793,7 @@ SCIP_Bool SCIPbranchcandContainsExternCand(
793793
}
794794
/* the variable is continuous, look at the slots containing continuous variables */
795795
assert(vartype == SCIP_VARTYPE_CONTINUOUS);
796-
for( i = branchcand->nprioexternbins + branchcand->nprioexternints + branchcand->nprioexternimpls;
796+
for( i = branchcand->nprioexternbins + branchcand->nprioexternints + branchcand->nprioexternimpls;
797797
i < branchcand->nprioexterncands; i++ )
798798
if( branchcand->externcands[i] == var )
799799
return TRUE;
@@ -2326,7 +2326,7 @@ SCIP_Real SCIPbranchGetScoreMultiple(
23262326
/** computes a branching point for a (not necessarily discrete) variable
23272327
* a suggested branching point is first projected onto the box
23282328
* if no point is suggested, then the value in the current LP or pseudo solution is used
2329-
* if this value is at infinity, then 0.0 projected onto the bounds and then moved inside the interval is used
2329+
* if this value is at infinity, then 0.0 projected onto the bounds and then moved inside the interval is used
23302330
* for a discrete variable, it is ensured that the returned value is fractional
23312331
* for a continuous variable, the parameter branching/clamp defines how far a branching point need to be from the bounds of a variable
23322332
* the latter is only applied if no point has been suggested, or the suggested point is not inside the variable's interval
@@ -2385,7 +2385,7 @@ SCIP_Real SCIPbranchGetBranchingPoint(
23852385
else if( (SCIPsetIsInfinity(set, -lb) || SCIPsetIsRelGT(set, branchpoint, lb)) &&
23862386
(SCIPsetIsInfinity(set, ub) || SCIPsetIsRelLT(set, branchpoint, ub)) )
23872387
{
2388-
/* if it is continuous and inside the box, then accept it */
2388+
/* if it is continuous and inside the box, then accept it */
23892389
return branchpoint;
23902390
}
23912391
/* if it is continuous and suggestion is one of the bounds, continue below */
@@ -2445,7 +2445,7 @@ SCIP_Real SCIPbranchGetBranchingPoint(
24452445
branchpoint = 0.0;
24462446
}
24472447
else if( SCIPsetIsInfinity(set, -branchpoint) )
2448-
{
2448+
{
24492449
/* if value is at -infty, then the lower bound should be at -infinity */
24502450
assert(SCIPsetIsInfinity(set, -lb));
24512451

0 commit comments

Comments
 (0)