69#define BRANCHRULE_NAME "relpscost"
70#define BRANCHRULE_DESC "reliability branching on pseudo cost values"
71#define BRANCHRULE_PRIORITY 10000
72#define BRANCHRULE_MAXDEPTH -1
73#define BRANCHRULE_MAXBOUNDDIST 1.0
75#define DEFAULT_CONFLICTWEIGHT 0.01
76#define DEFAULT_CONFLENGTHWEIGHT 0.0
77#define DEFAULT_INFERENCEWEIGHT 0.0001
78#define DEFAULT_CUTOFFWEIGHT 0.0001
79#define DEFAULT_GMIAVGEFFWEIGHT 0.0
80#define DEFAULT_GMILASTEFFWEIGHT 0.00001
81#define DEFAULT_PSCOSTWEIGHT 1.0
82#define DEFAULT_NLSCOREWEIGHT 0.1
83#define DEFAULT_MINRELIABLE 1.0
84#define DEFAULT_MAXRELIABLE 5.0
85#define DEFAULT_SBITERQUOT 0.5
86#define DEFAULT_DYNAMICLOOKAHEADQUOT 0.6
87#define DEFAULT_SBITEROFS 100000
88#define DEFAULT_MAXLOOKAHEAD 9
89#define DEFAULT_INITCAND 100
90#define DEFAULT_INITITER 0
91#define DEFAULT_MAXBDCHGS 5
92#define DEFAULT_MAXPROPROUNDS -2
94#define DEFAULT_PROBINGBOUNDS TRUE
96#define DEFAULT_USERELERRORFORRELIABILITY FALSE
97#define DEFAULT_LOWERRORTOL 0.05
98#define DEFAULT_HIGHERRORTOL 1.0
99#define DEFAULT_USEHYPTESTFORRELIABILITY FALSE
100#define DEFAULT_USEDYNAMICCONFIDENCE FALSE
101#define DEFAULT_STORESEMIINITCOSTS FALSE
102#define DEFAULT_USESBLOCALINFO FALSE
103#define DEFAULT_CONFIDENCELEVEL 2
104#define DEFAULT_SKIPBADINITCANDS TRUE
106#define DEFAULT_STARTRANDSEED 5
107#define DEFAULT_DYNAMICLOOKAHEAD FALSE
108#define DEFAULT_MINSAMPLESIZE 10
109#define DEFAULT_DYNAMICLOOKDISTRIBUTION 1
110#define DEFAULT_RANDINITORDER FALSE
111#define DEFAULT_USESMALLWEIGHTSITLIM FALSE
112#define DEFAULT_DYNAMICWEIGHTS TRUE
114#define DEFAULT_DEGENERACYAWARE 1
117#define DEFAULT_FILTERCANDSSYM FALSE
118#define DEFAULT_TRANSSYMPSCOST FALSE
121#define EXPONENTIALDISTRIBUTION 0
122#define PARETODISTRIBUTION 1
123#define LOGNORMALDISTRIBUTION 2
126#define GEOMMEANSHIFT 0.01
128#define MAXGAINTHRESHOLD 1e15
130#define MINGAINTHRESHOLD 1e-5
133#define BRANCHRULE_DISCOUNTFACTOR 0.2
136struct SCIP_BranchruleData
180 int dynamiclookdistribution;
222 int** permstrans =
NULL;
223 int* components =
NULL;
224 int* componentbegins =
NULL;
225 int* vartocomponent =
NULL;
231 assert( branchruledata->filtercandssym );
234 if( branchruledata->nosymmetry || branchruledata->orbits !=
NULL )
237 assert( branchruledata->orbitbegins ==
NULL );
238 assert( branchruledata->varorbitmap ==
NULL );
243 &nperms,
NULL, &permstrans,
NULL,
NULL, &components, &componentbegins, &vartocomponent, &ncomponents) );
248 branchruledata->nosymmetry =
TRUE;
253 assert( branchruledata->npermvars > 0 );
258 assert( ncomponents > 0 );
267 components, componentbegins, vartocomponent, ncomponents,
268 branchruledata->orbits, branchruledata->orbitbegins, &branchruledata->norbits, branchruledata->varorbitmap) );
269 assert( branchruledata->norbits < branchruledata->npermvars );
282 int norigbranchcands,
302 assert( ! branchruledata->nosymmetry );
303 assert( branchruledata->orbitbegins !=
NULL );
306 assert( branchruledata->varorbitmap !=
NULL );
308 assert( branchruledata->norbits < branchruledata->npermvars );
311 for(
i = 0;
i < branchruledata->norbits; ++
i )
312 branchruledata->orbitrep[
i] = -1;
316 for(
i = 0;
i < norigbranchcands; ++
i )
325 orbitidx = branchruledata->varorbitmap[
varidx];
327 assert( -1 <= orbitidx && orbitidx < branchruledata->norbits );
333 branchcands[*nbranchcands] = origbranchcands[
i];
334 branchcandssol[*nbranchcands] = origbranchcandssol[
i];
335 branchcandsfrac[*nbranchcands] = origbranchcandsfrac[
i];
336 branchorbitidx[*nbranchcands] = -1;
339 else if( branchruledata->orbitrep[orbitidx] == -1 )
343 branchruledata->orbitrep[orbitidx] =
varidx;
344 branchcands[*nbranchcands] = origbranchcands[
i];
345 branchcandssol[*nbranchcands] = origbranchcandssol[
i];
346 branchcandsfrac[*nbranchcands] = origbranchcandsfrac[
i];
347 branchorbitidx[*nbranchcands] = orbitidx;
352 SCIPdebugMsg(
scip,
"Filtered out %d variables by symmetry.\n", norigbranchcands - *nbranchcands);
396 for(
i = 0;
i < nboundchgs; ++
i )
414 if( branchruledata->nosymmetry || ! branchruledata->transsympscost || branchorbitidx ==
NULL )
421 assert( branchruledata->orbitbegins !=
NULL );
423 assert( 0 <= branchvaridx && branchvaridx < branchruledata->npermvars );
425 orbitidx = branchorbitidx[branchvaridx];
432 assert( 0 <= orbitidx && orbitidx < branchruledata->norbits );
435 for( j = branchruledata->orbitbegins[orbitidx]; j < branchruledata->orbitbegins[orbitidx+1]; ++j )
440 idx = branchruledata->orbits[j];
441 assert( 0 <= idx && idx < branchruledata->npermvars );
443 var = branchruledata->permvars[idx];
493 if( andconshdlr !=
NULL )
517 ++nlcount[probindex];
520 for( v = 0; v < nandvars; ++v )
527 ++nlcount[probindex];
537 if( *nlcountmax < nlcount[
i] )
538 *nlcountmax = nlcount[
i];
559 if( branchruledata->nlscoreweight > 0.0 )
561 if( branchruledata->nlcount ==
NULL )
564 branchruledata->nlcountsize =
nvars;
568 else if( branchruledata->nlcountsize <
nvars )
573 branchruledata->nlcountsize =
nvars;
577 assert(branchruledata->nlcountmax >= 1);
582 branchruledata->nlcountsize = 0;
583 branchruledata->nlcountmax = 1;
599 if( nlcountmax >= 1 && nlcount !=
NULL )
607 nlscore = nlcount[probindex] / (
SCIP_Real)nlcountmax;
645 if( branchruledata->dynamicweights )
652 dynamicfactor *= degeneracyfactor;
654 score = dynamicfactor * (branchruledata->conflictweight * (1.0 - 1.0/(1.0+conflictscore/avgconflictscore))
655 + branchruledata->conflengthweight * (1.0 - 1.0/(1.0+conflengthscore/avgconflengthscore))
656 + branchruledata->inferenceweight * (1.0 - 1.0/(1.0+inferencescore/avginferencescore))
657 + branchruledata->cutoffweight * (1.0 - 1.0/(1.0+cutoffscore/avgcutoffscore))
658 + branchruledata->gmiavgeffweight * gmieffscore + branchruledata->gmilasteffweight * lastgmieffscore)
659 + branchruledata->pscostweight / dynamicfactor * (1.0 - 1.0/(1.0+pscostscore/avgpscostscore))
660 + branchruledata->nlscoreweight * nlscore;
694 (*bdchginds)[*nbdchgs] = ind;
695 (*bdchgtypes)[*nbdchgs] = type;
696 (*bdchgbounds)[*nbdchgs] =
bound;
760 for(
i = 0;
i < nbdchgs; ++
i )
780 assert(tightened || (branchruledata->maxproprounds != 0));
795 assert(tightened || (branchruledata->maxproprounds != 0));
832 branchruledata->nzerogains++;
836 branchruledata->currmeandualgain = ((
SCIP_Real) branchruledata->currndualgains / (branchruledata->currndualgains + 1) ) * branchruledata->currmeandualgain + meangain / ( branchruledata->currndualgains + 1 ) ;
838 ++branchruledata->currndualgains;
840 if(branchruledata->currndualgains > 1)
842 oldlogstdevgain = branchruledata->logstdevgain;
843 oldlogmeangain = branchruledata->sumlogmeangains / (branchruledata->currndualgains - 1);
846 branchruledata->sumlogmeangains += log(meangain);
848 logmeangain = branchruledata->sumlogmeangains / branchruledata->currndualgains;
850 int ngains = branchruledata->currndualgains;
853 branchruledata->logstdevgain = pow((log(meangain) - logmeangain), 2.0 );
855 branchruledata->logstdevgain = ( (ngains - 2) * oldlogstdevgain + (ngains - 1) * pow( oldlogmeangain - logmeangain, 2.0) + pow((log(meangain) - logmeangain), 2.0 ) ) / (ngains - 1) ;
857 branchruledata->maxmeangain =
MAX(branchruledata->maxmeangain, meangain);
858 branchruledata->minmeangain =
MIN(branchruledata->minmeangain, meangain);
859 SCIPdebugMsg(
scip,
" -> downgain: %g upgain: %g minmeangain: %g maxmeangain: %g mean-of-two: %g mean-of-%d-dual-gains: %g\n",downgain, upgain, branchruledata->minmeangain, branchruledata->maxmeangain, meangain, branchruledata->currndualgains, branchruledata->currmeandualgain);
871 assert(maxmeangain >= 0.0);
884 return pow(2.0, estimatedepth + 1.0) - 1.0;
901 if (proposedgain < mingain)
904 return zeroprob + (1.0 - zeroprob) * (1.0 - pow(mingain / proposedgain, rate));
909 return zeroprob + (1.0 - zeroprob) * (1.0 - exp(-rate * proposedgain));
914 return zeroprob + (1.0 - zeroprob) * 0.5 * erfc(-(log(proposedgain) - logmeangain) / (logstdevgain * sqrt(2.0)));
935 int depth = (int) currentdepth;
941 nexttreesize = currenttreesize;
947 SCIP_Real p = 1.0 -
cdfProbability(lambda, zeroprob, gap, mingain, logmeangain, logstdevgain, distributioncdf);
948 SCIPdebugMsg(
scip,
" -> Probability of finding a better variable that would reduce the depth: %g\n", p);
961 SCIPdebugMsg(
scip,
" -> Probability of finding a better variable that would reduce the depth: %g\n", pbetter);
972 p =
cdfProbability(lambda, zeroprob, gap / (
depth - 2), mingain, logmeangain, logstdevgain, distributioncdf) -
cdfProbability(lambda, zeroprob, gap / (
depth - 1), mingain, logmeangain, logstdevgain, distributioncdf);
974 pbetter = 1.0 -
cdfProbability(lambda, zeroprob, gap / (
depth - 2), mingain, logmeangain, logstdevgain, distributioncdf);
979 p = 1.0 -
cdfProbability(lambda, zeroprob, gap, mingain, logmeangain, logstdevgain, distributioncdf);
983 if (ptotal + pnotbetter <= 1.0)
991 totalimprovedtree += improvedtree;
1013 return candidx < ninitcands && lookahead < maxlookahead && nbdchgs + nbdconflicts < maxbdchgs
1039 if (!branchruledata->dynamiclookahead)
1043 if( lookahead < branchruledata->dynamiclookaheadquot * maxlookahead)
1047 if ( branchruledata->currndualgains < branchruledata->minsamplesize )
1050 maxmeangain = branchruledata->maxmeangain;
1051 minmeangain = branchruledata->minmeangain;
1060 gaptoclose = absdualgap;
1064 assert(gaptoclose >= 0.0);
1067 SCIP_Real zeroprob = (
SCIP_Real) branchruledata->nzerogains / (branchruledata->nzerogains + branchruledata->currndualgains);
1070 assert(minmeangain > 0.0);
1071 assert(branchruledata->currndualgains > 0);
1072 SCIP_Real sumlambda = branchruledata->sumlogmeangains - branchruledata->currndualgains * log(minmeangain);
1075 lambda = branchruledata->currndualgains / sumlambda;
1079 lambda = 1 / (branchruledata->currmeandualgain);
1084 logmeangain = branchruledata->sumlogmeangains / branchruledata->currndualgains;
1085 logstdevgain = branchruledata->logstdevgain;
1093 if (currentdepth >= 50)
1100 nexttreesize =
expectedTreeSize(
scip, gaptoclose, zeroprob, currentdepth, lambda, minmeangain, logmeangain, logstdevgain, branchruledata->dynamiclookdistribution);
1102 if(
SCIPisLE(
scip, nexttreesize, currenttreesize - 1.0))
1105 SCIPdebugMsg(
scip,
" -> Stopped at lookahead %g, current tree size %g, next tree size %g\n", lookahead, currenttreesize, nexttreesize);
1139 pscostsize =
MIN(pscostdownsize, pscostupsize);
1142 dpscostsize =
MIN(dpscostdownsize, dpscostupsize);
1146 assert(!branchruledata->usehyptestforreliability || bestpscand !=
NULL );
1147 if( pscostsize < reliable || ( useancpscost && dpscostsize < reliable ) )
1149 if( branchruledata->userelerrorforreliability && branchruledata->usehyptestforreliability )
1159 if( branchruledata->userelerrorforreliability &&
1163 if( branchruledata->usehyptestforreliability &&
1180 int* branchorbitidx,
1228 bestisstrongbranch =
FALSE;
1231 bestsbdownvalid =
FALSE;
1232 bestsbupvalid =
FALSE;
1233 bestsbdowncutoff =
FALSE;
1234 bestsbupcutoff =
FALSE;
1235 provedbound = lpobjval;
1245 if( nbranchcands == 1 )
1250 sbdownvalid[0] =
FALSE;
1251 sbupvalid[0] =
FALSE;
1302 int bestuninitsbcand;
1314 if( branchruledata->degeneracyaware > 0 && (
SCIPgetDepth(
scip) > 0 || branchruledata->degeneracyaware > 1) )
1322 assert(degeneracy >= 0.0);
1323 assert(degeneracy <= 1.0);
1324 assert(varconsratio >= 1.0);
1327 if( degeneracy >= 0.8 )
1329 degeneracy = 10.0 * (degeneracy - 0.7);
1330 degeneracyfactor = degeneracyfactor * pow(10.0,degeneracy);
1333 if( varconsratio >= 2.0 )
1335 degeneracyfactor *= 10.0 * varconsratio;
1346 avgconflictscore =
MAX(avgconflictscore, 0.1);
1348 avgconflengthscore =
MAX(avgconflengthscore, 0.1);
1350 avginferencescore =
MAX(avginferencescore, 0.1);
1352 avgcutoffscore =
MAX(avgcutoffscore, 0.1);
1354 avgpscostscore =
MAX(avgpscostscore, 0.1);
1356 avgdpscostscore =
MAX(avgdpscostscore, 0.1);
1361 initstrongbranching =
FALSE;
1367 probingbounds =
propagate && branchruledata->probingbounds;
1372 maxninitcands =
MIN(nbranchcands, branchruledata->initcand);
1382 if( nsblpiterations > maxnsblpiterations || degeneracyfactor >= 10.0 )
1406 maxbdchgs = branchruledata->maxbdchgs;
1407 if( maxbdchgs == -1 )
1408 maxbdchgs = INT_MAX;
1411 prio = (maxnsblpiterations - nsblpiterations)/(nsblpiterations + 1.0);
1412 prio =
MIN(prio, 1.0);
1413 prio =
MAX(prio, (nlpiterationsquot - nsblpiterations)/(nsblpiterations + 1.0));
1414 reliable = (1.0-prio) * branchruledata->minreliable + prio * branchruledata->maxreliable;
1417 relerrorthreshold = (1.0 - prio) * branchruledata->higherrortol + prio * branchruledata->lowerrortol;
1421 if( branchruledata->usedynamicconfidence )
1426 else if( prio >= 0.7 )
1428 else if( prio >= 0.5 )
1430 else if( prio >= 0.3 )
1444 if( branchruledata->usehyptestforreliability )
1446 for(
c = 0;
c < nbranchcands; ++
c )
1480 downgain =
MAX(down - lastlpobjval, 0.0);
1481 upgain =
MAX(up - lastlpobjval, 0.0);
1491 downgain /= (1 + branchruledata->discountfactor);
1492 upgain /= (1 + branchruledata->discountfactor);
1496 SCIPdebugMsg(
scip,
" -> strong branching on variable <%s> already performed (down=%g (%+g), up=%g (%+g), pscostscore=%g)\n",
1497 SCIPvarGetName(branchcands[
c]), down, downgain, up, upgain, pscostscore);
1500 score =
calcScore(
scip, branchruledata, conflictscore, avgconflictscore, conflengthscore, avgconflengthscore,
1501 inferencescore, avginferencescore, cutoffscore, avgcutoffscore, gmieffscore, lastgmieffscore,
1502 pscostscore, avgpscostscore, nlscore, branchcandsfrac[
c], degeneracyfactor);
1510 fracscore =
MIN(branchcandsfrac[
c], 1.0 - branchcandsfrac[
c]);
1514 || (
SCIPisSumGE(
scip, fracscore, bestpsfracscore) && domainscore > bestpsdomainscore) )
1517 bestpsscore = score;
1518 bestpsfracscore = fracscore;
1519 bestpsdomainscore = domainscore;
1526 if( useancpscost && maxninitcands > 0 )
1529 for(
c = 0;
c < nbranchcands; ++
c )
1532 bestpscand >= 0 ? branchcands[bestpscand] :
NULL,
1533 bestpscand >= 0 ? branchcandsfrac[bestpscand] : 0.0,
1534 reliable, relerrorthreshold, clevel, useancpscost) )
1536 useancpscost =
FALSE;
1543 avgpscostscore = avgdpscostscore;
1545 for(
c = 0;
c < nbranchcands; ++
c )
1573 mingains[
c] =
MIN(downgain, upgain);
1574 maxgains[
c] =
MAX(downgain, upgain);
1601 downgain =
MAX(down - lastlpobjval, 0.0);
1602 upgain =
MAX(up - lastlpobjval, 0.0);
1604 if( useancpscost ) {
1612 downgain /= (1 + branchruledata->discountfactor);
1613 upgain /= (1 + branchruledata->discountfactor);
1617 mingains[
c] =
MIN(downgain, upgain);
1618 maxgains[
c] =
MAX(downgain, upgain);
1620 if( branchruledata->dynamiclookahead )
1623 SCIPdebugMsg(
scip,
" -> strong branching on variable <%s> already performed (down=%g (%+g), up=%g (%+g), pscostscore=%g)\n",
1624 SCIPvarGetName(branchcands[
c]), down, downgain, up, upgain, pscostscore);
1626 else if( maxninitcands > 0 )
1635 size =
MIN(downsize, upsize);
1638 bestpscand >= 0 ? branchcands[bestpscand] :
NULL,
1639 bestpscand >= 0 ? branchcandsfrac[bestpscand] : 0.0,
1640 reliable, relerrorthreshold, clevel,
FALSE);
1648 scoresfrompc[
c] =
calcScore(
scip, branchruledata, 0.0, avgconflictscore, 0.0, avgconflengthscore,
1649 0.0, avginferencescore, 0.0, avgcutoffscore, 0.0, 0.0,
1650 pscostscore, avgpscostscore, 0.0, branchcandsfrac[
c], degeneracyfactor);
1651 scoresfromothers[
c] =
calcScore(
scip, branchruledata, conflictscore, avgconflictscore, conflengthscore, avgconflengthscore,
1652 inferencescore, avginferencescore, cutoffscore, avgcutoffscore, gmieffscore, lastgmieffscore,
1653 0.0, avgpscostscore, nlscore, branchcandsfrac[
c], degeneracyfactor);
1654 score = scoresfrompc[
c] + scoresfromothers[
c];
1665 scoresfrompc[
c] = 0;
1666 scoresfromothers[
c] = 0;
1669 if( branchruledata->randinitorder )
1673 for( j = ninitcands; j > 0 && score > initcandscores[j-1]; --j )
1675 initcands[j] = initcands[j-1];
1676 initcandscores[j] = initcandscores[j-1];
1679 initcandscores[j] = score;
1681 ninitcands =
MIN(ninitcands, maxninitcands);
1684 else if( !branchruledata->usehyptestforreliability )
1692 fracscore =
MIN(branchcandsfrac[
c], 1.0 - branchcandsfrac[
c]);
1696 || (
SCIPisSumGE(
scip, fracscore, bestpsfracscore) && domainscore > bestpsdomainscore) )
1699 bestpsscore = score;
1700 bestpsfracscore = fracscore;
1701 bestpsdomainscore = domainscore;
1708 if( branchruledata->usehyptestforreliability && ninitcands == 1 )
1711 SCIPdebugMsg(
scip,
"Only one single candidate for initialization-->Skipping strong branching\n");
1718 inititer = branchruledata->inititer;
1742 inititer = (int)((
SCIP_Real)inititer * (1.0 + 20.0/nodenum));
1743 inititer =
MAX(inititer, 10);
1744 inititer =
MIN(inititer, 500);
1747 SCIPdebugMsg(
scip,
"strong branching (reliable=%g, %d/%d cands, %d uninit, maxcands=%d, maxlookahead=%g, maxbdchgs=%d, inititer=%d, iterations:%" SCIP_LONGINT_FORMAT "/%" SCIP_LONGINT_FORMAT ", basic:%u)\n",
1748 reliable, ninitcands, nbranchcands, nuninitcands, maxninitcands, maxlookahead, maxbdchgs, inititer,
1756 bestuninitsbcand = -1;
1759 for(
i = 0;
continueStrongBranchingLookahead(
scip,
i, ninitcands, lookahead, maxlookahead, nbdchgs, nbdconflicts, maxbdchgs, maxnsblpiterations) &&
continueStrongBranchingTreeSizeEstimation(
scip, branchruledata, lookahead, maxlookahead); ++
i )
1779 if( branchruledata->skipbadinitcands )
1785 if( bestsbscore > bestpsscore && bestsbscore > bestuninitsbscore && bestsbupvalid && bestsbdownvalid )
1787 assert(bestsbcand != -1);
1802 else if( bestpscand != -1 && bestpsscore > bestuninitsbscore )
1811 else if( bestuninitsbcand != -1 )
1823 if( bestuninitsbcand == -1 )
1825 bestuninitsbcand =
c;
1826 bestuninitsbscore = initcandscores[
i];
1838 if( !initstrongbranching )
1840 initstrongbranching =
TRUE;
1856 branchruledata->maxproprounds, &down, &up, &downvalid, &upvalid, &ndomredsdown, &ndomredsup, &downinf, &upinf,
1857 &downconflict, &upconflict, &
lperror, newlbs, newubs) );
1863 &down, &up, &downvalid, &upvalid, &downinf, &upinf, &downconflict, &upconflict, &
lperror) );
1865 ndomredsdown = ndomredsup = 0;
1874 "(node %" SCIP_LONGINT_FORMAT ") error in strong branching call for variable <%s> with solution %g\n",
1889 SCIPdebugMsg(
scip,
" -> strong branching on variable <%s> lead to a new incumbent\n",
1905 else if( bestsbcand != -1 && allcolsinlp )
1909 bestsbdowncutoff =
TRUE;
1911 SCIPdebugMsg(
scip,
" -> valid dual bound for down child of best candidate <%s> is higher than new cutoff bound (valid=%u, bestsbdown=%g, cutoff=%g)\n",
1914 SCIPdebugMsg(
scip,
" -> increase lower bound of best candidate <%s> to %g\n",
1923 bestsbupcutoff =
TRUE;
1925 SCIPdebugMsg(
scip,
" -> valid dual bound for up child of best candidate <%s> is higher than new cutoff bound (valid=%u, bestsbup=%g, cutoff=%g)\n",
1928 SCIPdebugMsg(
scip,
" -> decrease upper bound of best candidate <%s> to %g\n",
1938 down =
MAX(down, lpobjval);
1939 up =
MAX(up, lpobjval);
1940 downgain = down - lpobjval;
1941 upgain = up - lpobjval;
1945 assert(downinf || !downconflict);
1946 assert(upinf || !upconflict);
1948 if( branchruledata->dynamiclookahead )
1956#ifdef WITH_LPSOLSTAT
1959 && (!upinf || branchruledata->storesemiinitcosts) )
1964 if( branchruledata->usesmallweightsitlim )
1973#ifdef WITH_LPSOLSTAT
1976 && (!downinf || branchruledata->storesemiinitcosts) )
1981 if( branchruledata->usesmallweightsitlim )
1991 if( allcolsinlp && !exactsolve && downvalid && upvalid )
1995 minbound =
MIN(down, up);
1996 provedbound =
MAX(provedbound, minbound);
2000 if( probingbounds && ( !downinf || !upinf ) )
2007 for( v = 0; v <
nvars; ++v )
2011 SCIPdebugMsg(
scip,
"better lower bound for variable <%s>: %.9g -> %.9g (by strongbranching on <%s>)\n",
2019 SCIPdebugMsg(
scip,
"better upper bound for variable <%s>: %.9g -> %.9g (by strongbranching on <%s>)\n",
2030 if( (downinf || upinf) && !exactsolve )
2034 if( downinf && upinf )
2037 SCIPdebugMsg(
scip,
" -> variable <%s> is infeasible in both directions (conflict: %u/%u)\n",
2045 SCIPdebugMsg(
scip,
" -> variable <%s> is infeasible in %s branch (conflict: %u/%u)\n",
2046 SCIPvarGetName(branchcands[
c]), downinf ?
"downward" :
"upward", downconflict, upconflict);
2050 if( nbdchgs + nbdconflicts >= maxbdchgs )
2066 mingains[
c] =
MIN(downgain, upgain);
2067 maxgains[
c] =
MAX(downgain, upgain);
2071 sbdownvalid[
c] = downvalid;
2072 sbupvalid[
c] = upvalid;
2089 scoresfrompc[
c] =
calcScore(
scip, branchruledata, 0.0, avgconflictscore, 0.0, avgconflengthscore,
2090 0.0, avginferencescore, 0.0, avgcutoffscore, 0.0, 0.0, pscostscore,
2091 avgpscostscore, 0.0, branchcandsfrac[
c], degeneracyfactor);
2092 scoresfromothers[
c] =
calcScore(
scip, branchruledata, conflictscore, avgconflictscore, conflengthscore, avgconflengthscore,
2093 inferencescore, avginferencescore, cutoffscore, avgcutoffscore, gmieffscore,
2094 lastgmieffscore, 0.0, avgpscostscore, nlscore, branchcandsfrac[
c],
2096 score = scoresfrompc[
c] + scoresfromothers[
c];
2107 fracscore =
MIN(branchcandsfrac[
c], 1.0 - branchcandsfrac[
c]);
2111 || (
SCIPisSumGE(
scip, fracscore, bestsbfracscore) && domainscore > bestsbdomainscore) )
2114 bestsbscore = score;
2117 bestsbdownvalid = downvalid;
2118 bestsbupvalid = upvalid;
2119 bestsbdowncutoff =
FALSE;
2120 bestsbupcutoff =
FALSE;
2121 bestsbfracscore = fracscore;
2122 bestsbdomainscore = domainscore;
2131 SCIPdebugMsg(
scip,
" -> variable <%s> (solval=%g, down=%g (%+g,valid=%u), up=%g (%+g,valid=%u), score=%g/ %g/%g %g/%g %g -> %g)\n",
2132 SCIPvarGetName(branchcands[
c]), branchcandssol[
c], down, downgain, downvalid, up, upgain, upvalid,
2133 pscostscore, conflictscore, conflengthscore, inferencescore, cutoffscore, gmieffscore, score);
2137 if( bestsbcand >= 0 )
2140 SCIPvarGetName(branchcands[bestsbcand]), bestsbscore, bestsbfracscore, bestsbdomainscore,
2141 lookahead, maxlookahead);
2145 if( initstrongbranching )
2168 if(
i < ninitcands && bestuninitsbcand == -1 )
2169 bestuninitsbscore = initcandscores[
i];
2174 if( bestpsscore > bestuninitsbscore &&
SCIPisSumGT(
scip, bestpsscore, bestsbscore) )
2177 bestisstrongbranch =
FALSE;
2179 else if( bestsbcand >= 0 )
2182 bestisstrongbranch =
TRUE;
2191 bestisstrongbranch =
FALSE;
2195 if( allcolsinlp && !exactsolve )
2212 freeBdchgs(
scip, &bdchginds, &bdchgtypes, &bdchgbounds, &nbdchgs);
2221 usetreemodel =
TRUE;
2226 usetreemodel =
FALSE;
2233 if( usetreemodel ==
TRUE && avgpscostscore <= smallpscost )
2236 for( cand = 0; cand < nbranchcands; ++cand )
2238 if( scoresfrompc[cand] > scoresfrompc[
bestcand] )
2240 usetreemodel =
FALSE;
2246 if( usetreemodel ==
TRUE )
2250 branchruledata->treemodel,
2285 assert(!bestsbdowncutoff && !bestsbupcutoff);
2291 SCIPdebugMsg(
scip,
" -> %d (%d) cands, sel cand %d: var <%s> (sol=%g, down=%g (%+g), up=%g (%+g), sb=%u, psc=%g/%g [%g])\n",
2293 bestsbdown, bestsbdown - lpobjval, bestsbup, bestsbup - lpobjval, bestisstrongbranch,
2303 if( allcolsinlp && !exactsolve )
2381 branchruledata->nlcount =
NULL;
2382 branchruledata->nlcountsize = 0;
2383 branchruledata->nlcountmax = 1;
2384 assert(branchruledata->startrandseed >= 0);
2388 (
unsigned int)branchruledata->startrandseed,
TRUE) );
2411 branchruledata->nosymmetry =
FALSE;
2412 branchruledata->norbits = 0;
2413 branchruledata->permvars =
NULL;
2414 branchruledata->permvarmap =
NULL;
2415 branchruledata->npermvars = 0;
2433 int* filteredlpcandsorbitidx =
NULL;
2434 int nfilteredlpcands;
2447 SCIPdebugMsg(
scip,
"Could not apply relpscost branching, as the current LP was not solved to optimality.\n");
2461 branchruledata->sumlogmeangains = 0.0;
2462 branchruledata->logstdevgain = 0.0;
2463 branchruledata->nzerogains = 0;
2475 if( runfiltering && branchruledata->norbits != 0 )
2484 filteredlpcands, filteredlpcandssol, filteredlpcandsfrac, filteredlpcandsorbitidx, &nfilteredlpcands) );
2522 branchruledata->nosymmetry =
FALSE;
2523 branchruledata->orbits =
NULL;
2524 branchruledata->orbitbegins =
NULL;
2525 branchruledata->orbitrep =
NULL;
2526 branchruledata->varorbitmap =
NULL;
2527 branchruledata->norbits = 0;
2528 branchruledata->permvars =
NULL;
2529 branchruledata->npermvars = 0;
2530 branchruledata->permvarmap =
NULL;
2531 branchruledata->meandualgain = 0.0;
2532 branchruledata->currmeandualgain = 0.0;
2533 branchruledata->currndualgains = 0;
2536 branchruledata->sumlogmeangains = 0.0;
2537 branchruledata->logstdevgain = 0.0;
2538 branchruledata->nzerogains = 0;
2555 "branching/relpscost/conflictweight",
2556 "weight in score calculations for conflict score",
2559 "branching/relpscost/conflictlengthweight",
2560 "weight in score calculations for conflict length score",
2563 "branching/relpscost/inferenceweight",
2564 "weight in score calculations for inference score",
2567 "branching/relpscost/cutoffweight",
2568 "weight in score calculations for cutoff score",
2571 "branching/relpscost/gmiavgeffweight",
2572 "weight in score calculations for average GMI cuts normalized efficacy",
2575 "branching/relpscost/gmilasteffweight",
2576 "weight in score calculations for last GMI cuts normalized efficacy",
2579 "branching/relpscost/pscostweight",
2580 "weight in score calculations for pseudo cost score",
2583 "branching/relpscost/nlscoreweight",
2584 "weight in score calculations for nlcount score",
2587 "branching/relpscost/minreliable",
2588 "minimal value for minimum pseudo cost size to regard pseudo cost value as reliable",
2591 "branching/relpscost/maxreliable",
2592 "maximal value for minimum pseudo cost size to regard pseudo cost value as reliable",
2595 "branching/relpscost/sbiterquot",
2596 "maximal fraction of strong branching LP iterations compared to node relaxation LP iterations",
2599 "branching/relpscost/dynamiclookaheadquot",
2600 "apply dynamic lookahead after this fraction maxlookahead is reached",
2603 "branching/relpscost/sbiterofs",
2604 "additional number of allowed strong branching LP iterations",
2607 "branching/relpscost/maxlookahead",
2608 "maximal number of further variables evaluated without better score",
2611 "should we use a dynamic lookahead based on a tree size estimation of further strong branchings?",
2614 "branching/relpscost/initcand",
2615 "maximal number of candidates initialized with strong branching per node",
2618 "which distribution should be used for dynamic lookahead? 0=exponential, 1=Pareto, 2=log-normal?",
2621 "branching/relpscost/inititer",
2622 "iteration limit for strong branching initializations of pseudo cost entries (0: auto)",
2625 "branching/relpscost/maxbdchgs",
2626 "maximal number of bound tightenings before the node is reevaluated (-1: unlimited)",
2629 "branching/relpscost/maxproprounds",
2630 "maximum number of propagation rounds to be performed during strong branching before solving the LP (-1: no limit, -2: parameter settings)",
2633 "branching/relpscost/probingbounds",
2634 "should valid bounds be identified in a probing-like fashion during strong branching (only with propagation)?",
2650 "should strong branching result be considered for pseudo costs if the other direction was infeasible?",
2657 "should the scoring function use only local cutoff and inference information obtained for strong branching candidates?",
2662 "should the strong branching decision be based on a hypothesis test?",
2667 "should the confidence level be adjusted dynamically?",
2671 "should branching rule skip candidates that have a low probability to "
2672 "be better than the best strong-branching or pseudo-candidate?",
2676 "branching/relpscost/confidencelevel",
2677 "the confidence level for statistical methods, between 0 (Min) and 4 (Max).",
2681 "should candidates be initialized in randomized order?",
2686 "should smaller weights be used for pseudo cost updates after hitting the LP iteration limit?",
2691 "should the weights of the branching rule be adjusted dynamically during solving based on objective and infeasible leaf counters?",
2695 "should degeneracy be taken into account to update weights and skip strong branching? (0: off, 1: after root, 2: always)",
2701 "minimum sample size to estimate the tree size for dynamic lookahead",
2704 "Use symmetry to filter branching candidates?",
2708 "Transfer pscost information to symmetric variables?",
2712 "discount factor for ancestral pseudo costs (0.0: disable discounted pseudo costs)",
#define BRANCHRULE_PRIORITY
#define BRANCHRULE_MAXDEPTH
#define BRANCHRULE_MAXBOUNDDIST
#define DEFAULT_PROBINGBOUNDS
#define DEFAULT_MAXPROPROUNDS
#define DEFAULT_INFERENCEWEIGHT
#define DEFAULT_CONFLICTWEIGHT
#define DEFAULT_CUTOFFWEIGHT
#define BRANCHRULE_DISCOUNTFACTOR
#define DEFAULT_DEGENERACYAWARE
#define DEFAULT_USESBLOCALINFO
#define DEFAULT_SKIPBADINITCANDS
#define DEFAULT_SBITERQUOT
#define LOGNORMALDISTRIBUTION
static SCIP_Real strongBranchingTreeSize(SCIP_Real estimatedepth)
static SCIP_Real calcNlscore(SCIP *scip, int *nlcount, int nlcountmax, int probindex)
#define DEFAULT_HIGHERRORTOL
static SCIP_Real expectedTreeSize(SCIP *scip, SCIP_Real gap, SCIP_Real zeroprob, SCIP_Real currentdepth, SCIP_Real lambda, SCIP_Real mingain, SCIP_Real logmeangain, SCIP_Real logstdevgain, int distributioncdf)
#define DEFAULT_USESMALLWEIGHTSITLIM
#define DEFAULT_DYNAMICLOOKAHEADQUOT
static SCIP_RETCODE applyBdchgs(SCIP *scip, SCIP_VAR **vars, int *bdchginds, SCIP_BOUNDTYPE *bdchgtypes, SCIP_Real *bdchgbounds, int nbdchgs, SCIP_RESULT *result)
static SCIP_Real cdfProbability(SCIP_Real rate, SCIP_Real zeroprob, SCIP_Real proposedgain, SCIP_Real mingain, SCIP_Real logmeangain, SCIP_Real logstdevgain, int distributioncdf)
#define DEFAULT_STARTRANDSEED
#define DEFAULT_FILTERCANDSSYM
#define DEFAULT_USEDYNAMICCONFIDENCE
#define DEFAULT_DYNAMICWEIGHTS
#define DEFAULT_MAXBDCHGS
#define DEFAULT_USEHYPTESTFORRELIABILITY
#define DEFAULT_GMIAVGEFFWEIGHT
static SCIP_RETCODE SCIPupdateVarPseudocostSymmetric(SCIP *scip, SCIP_BRANCHRULEDATA *branchruledata, SCIP_VAR *branchvar, int *branchorbitidx, int branchvaridx, SCIP_Real solvaldelta, SCIP_Real objdelta, SCIP_Real weight)
#define DEFAULT_RANDINITORDER
static SCIP_RETCODE initOrbits(SCIP *scip, SCIP_BRANCHRULEDATA *branchruledata)
#define DEFAULT_MAXLOOKAHEAD
#define DEFAULT_SBITEROFS
#define DEFAULT_NLSCOREWEIGHT
static SCIP_RETCODE filterSymmetricVariables(SCIP *scip, SCIP_BRANCHRULEDATA *branchruledata, SCIP_VAR **origbranchcands, SCIP_Real *origbranchcandssol, SCIP_Real *origbranchcandsfrac, int norigbranchcands, SCIP_VAR **branchcands, SCIP_Real *branchcandssol, SCIP_Real *branchcandsfrac, int *branchorbitidx, int *nbranchcands)
#define DEFAULT_GMILASTEFFWEIGHT
#define DEFAULT_USERELERRORFORRELIABILITY
#define PARETODISTRIBUTION
static SCIP_RETCODE countNonlinearities(SCIP *scip, int *nlcount, int nlcountsize, int *nlcountmax)
#define EXPONENTIALDISTRIBUTION
static SCIP_Bool needsStrongBranching(SCIP *scip, SCIP_BRANCHRULE *branchrule, SCIP_VAR *branchcand, SCIP_Real branchcandfrac, SCIP_VAR *bestpscand, SCIP_Real bestpscandfrac, SCIP_Real reliable, SCIP_Real relerrorthreshold, SCIP_CONFIDENCELEVEL clevel, SCIP_Bool useancpscost)
#define DEFAULT_TRANSSYMPSCOST
static SCIP_RETCODE addBdchg(SCIP *scip, int **bdchginds, SCIP_BOUNDTYPE **bdchgtypes, SCIP_Real **bdchgbounds, int *nbdchgs, int ind, SCIP_BOUNDTYPE type, SCIP_Real bound)
#define DEFAULT_LOWERRORTOL
static SCIP_RETCODE execRelpscost(SCIP *scip, SCIP_BRANCHRULE *branchrule, SCIP_VAR **branchcands, SCIP_Real *branchcandssol, SCIP_Real *branchcandsfrac, int *branchorbitidx, int nbranchcands, SCIP_Bool executebranch, SCIP_RESULT *result)
static SCIP_RETCODE branchruledataEnsureNlcount(SCIP *scip, SCIP_BRANCHRULEDATA *branchruledata)
static SCIP_Bool continueStrongBranchingTreeSizeEstimation(SCIP *scip, SCIP_BRANCHRULEDATA *branchruledata, SCIP_Real lookahead, SCIP_Real maxlookahead)
static SCIP_Real strongBranchingDepth(SCIP_Real gap, SCIP_Real maxmeangain)
#define DEFAULT_MINSAMPLESIZE
#define DEFAULT_CONFLENGTHWEIGHT
#define DEFAULT_CONFIDENCELEVEL
static SCIP_RETCODE updateMinMaxMeanGain(SCIP *scip, SCIP_BRANCHRULE *branchrule, SCIP_Real downgain, SCIP_Real upgain)
#define DEFAULT_MINRELIABLE
#define DEFAULT_DYNAMICLOOKAHEAD
static SCIP_Real calcScore(SCIP *scip, SCIP_BRANCHRULEDATA *branchruledata, SCIP_Real conflictscore, SCIP_Real avgconflictscore, SCIP_Real conflengthscore, SCIP_Real avgconflengthscore, SCIP_Real inferencescore, SCIP_Real avginferencescore, SCIP_Real cutoffscore, SCIP_Real avgcutoffscore, SCIP_Real gmieffscore, SCIP_Real lastgmieffscore, SCIP_Real pscostscore, SCIP_Real avgpscostscore, SCIP_Real nlscore, SCIP_Real frac, SCIP_Real degeneracyfactor)
#define DEFAULT_STORESEMIINITCOSTS
static SCIP_Bool continueStrongBranchingLookahead(SCIP *scip, int candidx, int ninitcands, SCIP_Real lookahead, SCIP_Real maxlookahead, int nbdchgs, int nbdconflicts, int maxbdchgs, SCIP_Longint maxnsblpiterations)
#define DEFAULT_MAXRELIABLE
#define DEFAULT_DYNAMICLOOKDISTRIBUTION
#define DEFAULT_PSCOSTWEIGHT
static void freeBdchgs(SCIP *scip, int **bdchginds, SCIP_BOUNDTYPE **bdchgtypes, SCIP_Real **bdchgbounds, int *nbdchgs)
reliable pseudo costs branching rule
Constraint handler for AND constraints, .
#define SCIP_LONGINT_FORMAT
SCIP_RETCODE SCIPexecRelpscostBranching(SCIP *scip, SCIP_VAR **branchcands, SCIP_Real *branchcandssol, SCIP_Real *branchcandsfrac, int nbranchcands, SCIP_Bool executebranching, SCIP_RESULT *result)
SCIP_RETCODE SCIPincludeBranchruleRelpscost(SCIP *scip)
SCIP_VAR * SCIPgetResultantAnd(SCIP *scip, SCIP_CONS *cons)
int SCIPgetNVarsAnd(SCIP *scip, SCIP_CONS *cons)
SCIP_VAR ** SCIPgetVarsAnd(SCIP *scip, SCIP_CONS *cons)
int SCIPgetSubscipDepth(SCIP *scip)
SCIP_Bool SCIPisStopped(SCIP *scip)
SCIP_RETCODE SCIPgetVarsData(SCIP *scip, SCIP_VAR ***vars, int *nvars, int *nbinvars, int *nintvars, int *nimplvars, int *ncontvars)
int SCIPgetNVars(SCIP *scip)
SCIP_VAR ** SCIPgetVars(SCIP *scip)
int SCIPhashmapGetImageInt(SCIP_HASHMAP *hashmap, void *origin)
SCIP_RETCODE SCIPupdateNodeLowerbound(SCIP *scip, SCIP_NODE *node, SCIP_Real newbound)
SCIP_RETCODE SCIPupdateLocalLowerbound(SCIP *scip, SCIP_Real newbound)
SCIP_Real SCIPgetLocalLowerbound(SCIP *scip)
SCIP_Real SCIPgetNodeLowerbound(SCIP *scip, SCIP_NODE *node)
void SCIPverbMessage(SCIP *scip, SCIP_VERBLEVEL msgverblevel, FILE *file, const char *formatstr,...)
SCIP_RETCODE SCIPgetBoolParam(SCIP *scip, const char *name, SCIP_Bool *value)
SCIP_RETCODE SCIPaddIntParam(SCIP *scip, const char *name, const char *desc, int *valueptr, SCIP_Bool isadvanced, int defaultvalue, int minvalue, int maxvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
SCIP_RETCODE SCIPaddRealParam(SCIP *scip, const char *name, const char *desc, SCIP_Real *valueptr, SCIP_Bool isadvanced, SCIP_Real defaultvalue, SCIP_Real minvalue, SCIP_Real maxvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
SCIP_RETCODE SCIPgetRealParam(SCIP *scip, const char *name, SCIP_Real *value)
SCIP_RETCODE SCIPaddBoolParam(SCIP *scip, const char *name, const char *desc, SCIP_Bool *valueptr, SCIP_Bool isadvanced, SCIP_Bool defaultvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
SCIP_BRANCHRULE * SCIPfindBranchrule(SCIP *scip, const char *name)
SCIP_RETCODE SCIPincludeBranchruleBasic(SCIP *scip, SCIP_BRANCHRULE **branchruleptr, const char *name, const char *desc, int priority, int maxdepth, SCIP_Real maxbounddist, SCIP_BRANCHRULEDATA *branchruledata)
const char * SCIPbranchruleGetName(SCIP_BRANCHRULE *branchrule)
SCIP_BRANCHRULEDATA * SCIPbranchruleGetData(SCIP_BRANCHRULE *branchrule)
void SCIPbranchruleMarkExact(SCIP_BRANCHRULE *branchrule)
SCIP_RETCODE SCIPsetBranchruleCopy(SCIP *scip, SCIP_BRANCHRULE *branchrule,)
SCIP_RETCODE SCIPsetBranchruleExecLp(SCIP *scip, SCIP_BRANCHRULE *branchrule,)
SCIP_RETCODE SCIPsetBranchruleExitsol(SCIP *scip, SCIP_BRANCHRULE *branchrule,)
SCIP_RETCODE SCIPsetBranchruleInitsol(SCIP *scip, SCIP_BRANCHRULE *branchrule,)
void SCIPbranchruleSetData(SCIP_BRANCHRULE *branchrule, SCIP_BRANCHRULEDATA *branchruledata)
SCIP_RETCODE SCIPsetBranchruleFree(SCIP *scip, SCIP_BRANCHRULE *branchrule,)
SCIP_RETCODE SCIPbranchVarVal(SCIP *scip, SCIP_VAR *var, SCIP_Real val, SCIP_NODE **downchild, SCIP_NODE **eqchild, SCIP_NODE **upchild)
SCIP_RETCODE SCIPgetLPBranchCands(SCIP *scip, SCIP_VAR ***lpcands, SCIP_Real **lpcandssol, SCIP_Real **lpcandsfrac, int *nlpcands, int *npriolpcands, int *nfracimplvars)
SCIP_Real SCIPgetBranchScore(SCIP *scip, SCIP_VAR *var, SCIP_Real downgain, SCIP_Real upgain)
SCIP_CONSHDLR * SCIPfindConshdlr(SCIP *scip, const char *name)
int SCIPconshdlrGetNActiveConss(SCIP_CONSHDLR *conshdlr)
SCIP_CONS ** SCIPconshdlrGetConss(SCIP_CONSHDLR *conshdlr)
SCIP_Bool SCIPisExact(SCIP *scip)
SCIP_RETCODE SCIPgetLPDualDegeneracy(SCIP *scip, SCIP_Real *degeneracy, SCIP_Real *varconsratio)
SCIP_Bool SCIPinDive(SCIP *scip)
SCIP_Bool SCIPhasCurrentNodeLP(SCIP *scip)
SCIP_LPSOLSTAT SCIPgetLPSolstat(SCIP *scip)
SCIP_Bool SCIPallColsInLP(SCIP *scip)
SCIP_Real SCIPgetLPObjval(SCIP *scip)
SCIP_Bool SCIPisLPSolBasic(SCIP *scip)
#define SCIPfreeBlockMemoryArray(scip, ptr, num)
#define SCIPallocBufferArray(scip, ptr, num)
#define SCIPreallocBufferArray(scip, ptr, num)
#define SCIPfreeBufferArray(scip, ptr)
#define SCIPduplicateBufferArray(scip, ptr, source, num)
#define SCIPallocBlockMemoryArray(scip, ptr, num)
#define SCIPreallocBlockMemoryArray(scip, ptr, oldnum, newnum)
#define SCIPfreeBlockMemory(scip, ptr)
#define SCIPfreeBlockMemoryArrayNull(scip, ptr, num)
#define SCIPfreeBufferArrayNull(scip, ptr)
#define SCIPallocBlockMemory(scip, ptr)
SCIP_Bool SCIPisNLPConstructed(SCIP *scip)
int SCIPgetNNLPVars(SCIP *scip)
SCIP_RETCODE SCIPgetNLPVarsNonlinearity(SCIP *scip, int *nlcount)
SCIP_Real SCIPnodeGetLowerbound(SCIP_NODE *node)
SCIP_DOMCHG * SCIPnodeGetDomchg(SCIP_NODE *node)
SCIP_Longint SCIPnodeGetNumber(SCIP_NODE *node)
int SCIPnodeGetDepth(SCIP_NODE *node)
SCIP_Bool SCIPinProbing(SCIP *scip)
SCIP_SOL * SCIPgetBestSol(SCIP *scip)
int SCIPsolGetIndex(SCIP_SOL *sol)
SCIP_Real SCIPgetAvgInferenceScore(SCIP *scip)
SCIP_Real SCIPgetUpperbound(SCIP *scip)
SCIP_Real SCIPgetAvgConflictlengthScore(SCIP *scip)
SCIP_Longint SCIPgetNInfeasibleLeaves(SCIP *scip)
SCIP_Longint SCIPgetNNodes(SCIP *scip)
SCIP_Longint SCIPgetNNodeInitLPs(SCIP *scip)
SCIP_Longint SCIPgetNStrongbranchLPIterations(SCIP *scip)
SCIP_Longint SCIPgetNNodeLPIterations(SCIP *scip)
SCIP_Real SCIPgetAvgConflictScore(SCIP *scip)
SCIP_Longint SCIPgetNDualResolveLPIterations(SCIP *scip)
SCIP_Real SCIPgetAvgPseudocostScore(SCIP *scip)
SCIP_Real SCIPgetCutoffbound(SCIP *scip)
SCIP_Longint SCIPgetNObjlimLeaves(SCIP *scip)
SCIP_Longint SCIPgetNNodeInitLPIterations(SCIP *scip)
SCIP_Real SCIPgetAvgDPseudocostScore(SCIP *scip, SCIP_Real discountfac)
SCIP_Longint SCIPgetNDualResolveLPs(SCIP *scip)
SCIP_Longint SCIPgetNRootStrongbranchLPIterations(SCIP *scip)
SCIP_Real SCIPgetAvgCutoffScore(SCIP *scip)
SCIP_RETCODE SCIPcomputeOrbitsComponentsSym(SCIP *scip, int npermvars, int **permstrans, int nperms, int *components, int *componentbegins, int *vartocomponent, int ncomponents, int *orbits, int *orbitbegins, int *norbits, int *varorbitmap)
SCIP_Real SCIPinfinity(SCIP *scip)
SCIP_Bool SCIPisGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Real SCIPfeasFrac(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisRelGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Real SCIPfeasCeil(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Real SCIPfeasFloor(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisFeasIntegral(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPfeastol(SCIP *scip)
SCIP_Bool SCIPisSumGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisZero(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisSumGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_NODE * SCIPgetFocusNode(SCIP *scip)
int SCIPgetDepth(SCIP *scip)
SCIP_NODE * SCIPgetCurrentNode(SCIP *scip)
SCIP_RETCODE SCIPgetVarStrongbranchFrac(SCIP *scip, SCIP_VAR *var, int itlim, SCIP_Bool idempotent, SCIP_Real *down, SCIP_Real *up, SCIP_Bool *downvalid, SCIP_Bool *upvalid, SCIP_Bool *downinf, SCIP_Bool *upinf, SCIP_Bool *downconflict, SCIP_Bool *upconflict, SCIP_Bool *lperror)
SCIP_Real SCIPgetVarAncPseudocostCountCurrentRun(SCIP *scip, SCIP_VAR *var, SCIP_BRANCHDIR dir)
SCIP_RETCODE SCIPtightenVarLb(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
SCIP_Bool SCIPpscostThresholdProbabilityTest(SCIP *scip, SCIP_VAR *var, SCIP_Real frac, SCIP_Real threshold, SCIP_BRANCHDIR dir, SCIP_CONFIDENCELEVEL clevel)
SCIP_Bool SCIPvarIsActive(SCIP_VAR *var)
SCIP_VAR * SCIPboundchgGetVar(SCIP_BOUNDCHG *boundchg)
SCIP_Real SCIPgetVarPseudocostCountCurrentRun(SCIP *scip, SCIP_VAR *var, SCIP_BRANCHDIR dir)
SCIP_Real SCIPgetVarAvgInferenceScore(SCIP *scip, SCIP_VAR *var)
SCIP_RETCODE SCIPendStrongbranch(SCIP *scip)
SCIP_BOUNDCHG * SCIPdomchgGetBoundchg(SCIP_DOMCHG *domchg, int pos)
SCIP_BOUNDCHGTYPE SCIPboundchgGetBoundchgtype(SCIP_BOUNDCHG *boundchg)
SCIP_Real SCIPgetVarPseudocostCurrentRun(SCIP *scip, SCIP_VAR *var, SCIP_BRANCHDIR dir)
SCIP_Real SCIPvarGetUbLocal(SCIP_VAR *var)
SCIP_Bool SCIPisVarPscostRelerrorReliable(SCIP *scip, SCIP_VAR *var, SCIP_Real threshold, SCIP_CONFIDENCELEVEL clevel)
SCIP_Real SCIPboundchgGetNewbound(SCIP_BOUNDCHG *boundchg)
SCIP_VAR * SCIPvarGetProbvar(SCIP_VAR *var)
SCIP_RETCODE SCIPtightenVarUb(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
int SCIPdomchgGetNBoundchgs(SCIP_DOMCHG *domchg)
int SCIPvarGetProbindex(SCIP_VAR *var)
const char * SCIPvarGetName(SCIP_VAR *var)
SCIP_Longint SCIPgetVarStrongbranchNode(SCIP *scip, SCIP_VAR *var)
SCIP_Real SCIPgetVarDPseudocostScore(SCIP *scip, SCIP_VAR *var, SCIP_Real solval, SCIP_Real discountfac)
SCIP_LPSOLSTAT SCIPgetLastStrongbranchLPSolStat(SCIP *scip, SCIP_BRANCHDIR branchdir)
SCIP_Real SCIPgetVarPseudocostVal(SCIP *scip, SCIP_VAR *var, SCIP_Real solvaldelta)
SCIP_Real SCIPgetVarConflictlengthScore(SCIP *scip, SCIP_VAR *var)
SCIP_Bool SCIPsignificantVarPscostDifference(SCIP *scip, SCIP_VAR *varx, SCIP_Real fracx, SCIP_VAR *vary, SCIP_Real fracy, SCIP_BRANCHDIR dir, SCIP_CONFIDENCELEVEL clevel, SCIP_Bool onesided)
SCIP_RETCODE SCIPgetVarStrongbranchWithPropagation(SCIP *scip, SCIP_VAR *var, SCIP_Real solval, SCIP_Real lpobjval, int itlim, int maxproprounds, SCIP_Real *down, SCIP_Real *up, SCIP_Bool *downvalid, SCIP_Bool *upvalid, SCIP_Longint *ndomredsdown, SCIP_Longint *ndomredsup, SCIP_Bool *downinf, SCIP_Bool *upinf, SCIP_Bool *downconflict, SCIP_Bool *upconflict, SCIP_Bool *lperror, SCIP_Real *newlbs, SCIP_Real *newubs)
SCIP_Bool SCIPvarIsIntegral(SCIP_VAR *var)
SCIP_Real SCIPgetVarAncPseudocostVal(SCIP *scip, SCIP_VAR *var, SCIP_Real solvaldelta)
SCIP_Real SCIPvarGetLPSol(SCIP_VAR *var)
SCIP_Real SCIPgetVarPseudocostScoreCurrentRun(SCIP *scip, SCIP_VAR *var, SCIP_Real solval)
SCIP_Real SCIPvarGetLbLocal(SCIP_VAR *var)
SCIP_RETCODE SCIPupdateVarPseudocost(SCIP *scip, SCIP_VAR *var, SCIP_Real solvaldelta, SCIP_Real objdelta, SCIP_Real weight)
SCIP_Real SCIPgetVarAvgGMIScore(SCIP *scip, SCIP_VAR *var)
SCIP_Real SCIPgetVarLastGMIScore(SCIP *scip, SCIP_VAR *var)
SCIP_Real SCIPgetVarConflictScore(SCIP *scip, SCIP_VAR *var)
SCIP_Real SCIPgetVarAvgCutoffScore(SCIP *scip, SCIP_VAR *var)
SCIP_RETCODE SCIPupdateVarAncPseudocost(SCIP *scip, SCIP_VAR *var, SCIP_Real solvaldelta, SCIP_Real objdelta, SCIP_Real weight)
SCIP_RETCODE SCIPgetVarStrongbranchLast(SCIP *scip, SCIP_VAR *var, SCIP_Real *down, SCIP_Real *up, SCIP_Bool *downvalid, SCIP_Bool *upvalid, SCIP_Real *solval, SCIP_Real *lpobjval)
SCIP_Real SCIPboundchgGetLPSolVal(SCIP_BOUNDCHG *boundchg)
SCIP_Real SCIPgetVarPseudocostScore(SCIP *scip, SCIP_VAR *var, SCIP_Real solval)
SCIP_RETCODE SCIPstartStrongbranch(SCIP *scip, SCIP_Bool enablepropagation)
SCIP_Real SCIPrandomGetReal(SCIP_RANDNUMGEN *randnumgen, SCIP_Real minrandval, SCIP_Real maxrandval)
SCIPfreeRandom(scip, &heurdata->randnumgen)
SCIPcreateRandom(scip, &heurdata->randnumgen, DEFAULT_RANDSEED, TRUE))
assert(minobj< SCIPgetCutoffbound(scip))
static SCIP_Bool propagate
memory allocation routines
#define BMSclearMemoryArray(ptr, num)
SCIP_RETCODE SCIPgetSymmetry(SCIP *scip, int *npermvars, SCIP_VAR ***permvars, SCIP_HASHMAP **permvarmap, int *nperms, int ***perms, int ***permstrans, SCIP_Real *log10groupsize, SCIP_Bool *binvaraffected, int **components, int **componentbegins, int **vartocomponent, int *ncomponents)
propagator for symmetry handling
public methods for branching rules
public methods for managing constraints
public methods for message output
public data structures and miscellaneous methods
public methods for primal CIP solutions
public methods for branch and bound tree
public methods for problem variables
public methods for branching rule plugins and branching
public methods for constraint handler plugins and constraints
public methods for exact solving
public methods for the LP relaxation, rows and columns
public methods for memory management
public methods for message handling
public methods for nonlinear relaxation
public methods for numerical tolerances
public methods for SCIP parameter handling
public methods for global and local (sub)problems
public methods for random numbers
public methods for solutions
public methods for querying solving statistics
public methods for the branch-and-bound tree
public methods for SCIP variables
methods for handling symmetries
SCIP_RETCODE SCIPtreemodelSelectCandidate(SCIP *scip, SCIP_TREEMODEL *treemodel, SCIP_VAR **branchcands, SCIP_Real *mingains, SCIP_Real *maxgains, SCIP_Real *tiebreakerscore, int nbranchcands, int *bestcand)
SCIP_RETCODE SCIPtreemodelInit(SCIP *scip, SCIP_TREEMODEL **treemodel)
SCIP_RETCODE SCIPtreemodelFree(SCIP *scip, SCIP_TREEMODEL **treemodel)
SCIP_Bool SCIPtreemodelIsEnabled(SCIP *scip, SCIP_TREEMODEL *treemodel)
Branching rules based on the Single-Variable-Branching (SVB) model.
struct SCIP_Treemodel SCIP_TREEMODEL
#define SCIP_DECL_BRANCHEXECLP(x)
#define SCIP_DECL_BRANCHINITSOL(x)
#define SCIP_DECL_BRANCHCOPY(x)
#define SCIP_DECL_BRANCHFREE(x)
struct SCIP_Branchrule SCIP_BRANCHRULE
struct SCIP_BranchruleData SCIP_BRANCHRULEDATA
#define SCIP_DECL_BRANCHEXITSOL(x)
struct SCIP_Cons SCIP_CONS
struct SCIP_Conshdlr SCIP_CONSHDLR
@ SCIP_BRANCHDIR_DOWNWARDS
enum SCIP_BoundType SCIP_BOUNDTYPE
@ SCIP_LPSOLSTAT_INFEASIBLE
@ SCIP_LPSOLSTAT_OBJLIMIT
@ SCIP_LPSOLSTAT_ITERLIMIT
struct SCIP_HashMap SCIP_HASHMAP
struct SCIP_RandNumGen SCIP_RANDNUMGEN
@ SCIP_CONFIDENCELEVEL_MAX
@ SCIP_CONFIDENCELEVEL_MEDIUM
@ SCIP_CONFIDENCELEVEL_HIGH
@ SCIP_CONFIDENCELEVEL_MIN
@ SCIP_CONFIDENCELEVEL_LOW
enum SCIP_Confidencelevel SCIP_CONFIDENCELEVEL
enum SCIP_Result SCIP_RESULT
enum SCIP_Retcode SCIP_RETCODE
struct SCIP_Node SCIP_NODE
union SCIP_DomChg SCIP_DOMCHG
struct SCIP_BoundChg SCIP_BOUNDCHG
@ SCIP_BOUNDCHGTYPE_BRANCHING