66#define BRANCHRULE_NAME "relpscost"
67#define BRANCHRULE_DESC "reliability branching on pseudo cost values"
68#define BRANCHRULE_PRIORITY 10000
69#define BRANCHRULE_MAXDEPTH -1
70#define BRANCHRULE_MAXBOUNDDIST 1.0
72#define DEFAULT_CONFLICTWEIGHT 0.01
73#define DEFAULT_CONFLENGTHWEIGHT 0.0
74#define DEFAULT_INFERENCEWEIGHT 0.0001
75#define DEFAULT_CUTOFFWEIGHT 0.0001
76#define DEFAULT_GMIAVGEFFWEIGHT 0.0
77#define DEFAULT_GMILASTEFFWEIGHT 0.00001
78#define DEFAULT_PSCOSTWEIGHT 1.0
79#define DEFAULT_NLSCOREWEIGHT 0.1
80#define DEFAULT_MINRELIABLE 1.0
81#define DEFAULT_MAXRELIABLE 5.0
82#define DEFAULT_SBITERQUOT 0.5
83#define DEFAULT_SBITEROFS 100000
84#define DEFAULT_MAXLOOKAHEAD 9
85#define DEFAULT_INITCAND 100
86#define DEFAULT_INITITER 0
87#define DEFAULT_MAXBDCHGS 5
88#define DEFAULT_MAXPROPROUNDS -2
90#define DEFAULT_PROBINGBOUNDS TRUE
92#define DEFAULT_USERELERRORFORRELIABILITY FALSE
93#define DEFAULT_LOWERRORTOL 0.05
94#define DEFAULT_HIGHERRORTOL 1.0
95#define DEFAULT_USEHYPTESTFORRELIABILITY FALSE
96#define DEFAULT_USEDYNAMICCONFIDENCE FALSE
97#define DEFAULT_STORESEMIINITCOSTS FALSE
98#define DEFAULT_USESBLOCALINFO FALSE
99#define DEFAULT_CONFIDENCELEVEL 2
100#define DEFAULT_SKIPBADINITCANDS TRUE
102#define DEFAULT_STARTRANDSEED 5
103#define DEFAULT_RANDINITORDER FALSE
104#define DEFAULT_USESMALLWEIGHTSITLIM FALSE
105#define DEFAULT_DYNAMICWEIGHTS TRUE
107#define DEFAULT_DEGENERACYAWARE 1
110#define DEFAULT_FILTERCANDSSYM FALSE
111#define DEFAULT_TRANSSYMPSCOST FALSE
114struct SCIP_BranchruleData
116 SCIP_Real conflictweight;
117 SCIP_Real conflengthweight;
118 SCIP_Real inferenceweight;
119 SCIP_Real cutoffweight;
120 SCIP_Real gmiavgeffweight;
121 SCIP_Real gmilasteffweight;
122 SCIP_Real pscostweight;
123 SCIP_Real nlscoreweight;
124 SCIP_Real minreliable;
125 SCIP_Real maxreliable;
126 SCIP_Real sbiterquot;
134 SCIP_Bool probingbounds;
136 SCIP_Bool userelerrorforreliability;
137 SCIP_Real lowerrortol;
138 SCIP_Real higherrortol;
139 SCIP_Bool usehyptestforreliability;
140 SCIP_Bool usedynamicconfidence;
141 SCIP_Bool storesemiinitcosts;
143 SCIP_Bool usesblocalinfo;
144 SCIP_Bool skipbadinitcands;
146 SCIP_Bool dynamicweights;
153 SCIP_Bool randinitorder;
156 SCIP_Bool usesmallweightsitlim;
160 SCIP_Bool filtercandssym;
161 SCIP_Bool transsympscost;
163 SCIP_Bool nosymmetry;
185 int** permstrans =
NULL;
186 int* components =
NULL;
187 int* componentbegins =
NULL;
188 int* vartocomponent =
NULL;
194 assert( branchruledata->filtercandssym );
197 if( branchruledata->nosymmetry || branchruledata->orbits !=
NULL )
200 assert( branchruledata->orbitbegins ==
NULL );
201 assert( branchruledata->varorbitmap ==
NULL );
206 &nperms,
NULL, &permstrans,
NULL,
NULL, &components, &componentbegins, &vartocomponent, &ncomponents) );
211 branchruledata->nosymmetry =
TRUE;
216 assert( branchruledata->npermvars > 0 );
221 assert( ncomponents > 0 );
230 components, componentbegins, vartocomponent, ncomponents,
231 branchruledata->orbits, branchruledata->orbitbegins, &branchruledata->norbits, branchruledata->varorbitmap) );
232 assert( branchruledata->norbits < branchruledata->npermvars );
243 SCIP_Real* origbranchcandssol,
244 SCIP_Real* origbranchcandsfrac,
245 int norigbranchcands,
247 SCIP_Real* branchcandssol,
248 SCIP_Real* branchcandsfrac,
265 assert( ! branchruledata->nosymmetry );
266 assert( branchruledata->orbitbegins !=
NULL );
269 assert( branchruledata->varorbitmap !=
NULL );
271 assert( branchruledata->norbits < branchruledata->npermvars );
274 for(
i = 0;
i < branchruledata->norbits; ++
i )
275 branchruledata->orbitrep[
i] = -1;
279 for(
i = 0;
i < norigbranchcands; ++
i )
288 orbitidx = branchruledata->varorbitmap[
varidx];
290 assert( -1 <= orbitidx && orbitidx < branchruledata->norbits );
296 branchcands[*nbranchcands] = origbranchcands[
i];
297 branchcandssol[*nbranchcands] = origbranchcandssol[
i];
298 branchcandsfrac[*nbranchcands] = origbranchcandsfrac[
i];
299 branchorbitidx[*nbranchcands] = -1;
302 else if( branchruledata->orbitrep[orbitidx] == -1 )
306 branchruledata->orbitrep[orbitidx] =
varidx;
307 branchcands[*nbranchcands] = origbranchcands[
i];
308 branchcandssol[*nbranchcands] = origbranchcandssol[
i];
309 branchcandsfrac[*nbranchcands] = origbranchcandsfrac[
i];
310 branchorbitidx[*nbranchcands] = orbitidx;
315 SCIPdebugMsg(
scip,
"Filtered out %d variables by symmetry.\n", norigbranchcands - *nbranchcands);
328 SCIP_Real solvaldelta,
339 if( branchruledata->nosymmetry || ! branchruledata->transsympscost || branchorbitidx ==
NULL )
346 assert( branchruledata->orbitbegins !=
NULL );
348 assert( 0 <= branchvaridx && branchvaridx < branchruledata->npermvars );
350 orbitidx = branchorbitidx[branchvaridx];
357 assert( 0 <= orbitidx && orbitidx < branchruledata->norbits );
360 for( j = branchruledata->orbitbegins[orbitidx]; j < branchruledata->orbitbegins[orbitidx+1]; ++j )
365 idx = branchruledata->orbits[j];
366 assert( 0 <= idx && idx < branchruledata->npermvars );
368 var = branchruledata->permvars[idx];
400 if( *probindex == -1 )
456 if( andconshdlr !=
NULL )
479 for( v = 0; v < nandvars; v++ )
488 nlcount[probindex]++;
496 nlcount[probindex]++;
504 if( *nlcountmax < nlcount[
i] )
505 *nlcountmax = nlcount[
i];
526 if( branchruledata->nlscoreweight > 0.0 )
528 if( branchruledata->nlcount ==
NULL )
531 branchruledata->nlcountsize =
nvars;
535 else if( branchruledata->nlcountsize <
nvars )
540 branchruledata->nlcountsize =
nvars;
544 assert(branchruledata->nlcountmax >= 1);
549 branchruledata->nlcountsize = 0;
550 branchruledata->nlcountmax = 1;
566 if( nlcountmax >= 1 && nlcount !=
NULL )
574 nlscore = nlcount[probindex] / (
SCIP_Real)nlcountmax;
589 SCIP_Real conflictscore,
590 SCIP_Real avgconflictscore,
591 SCIP_Real conflengthscore,
592 SCIP_Real avgconflengthscore,
593 SCIP_Real inferencescore,
594 SCIP_Real avginferencescore,
595 SCIP_Real cutoffscore,
596 SCIP_Real avgcutoffscore,
597 SCIP_Real gmieffscore,
598 SCIP_Real lastgmieffscore,
599 SCIP_Real pscostscore,
600 SCIP_Real avgpscostscore,
603 SCIP_Real degeneracyfactor
607 SCIP_Real dynamicfactor;
612 if( branchruledata->dynamicweights )
619 dynamicfactor *= degeneracyfactor;
621 score = dynamicfactor * (branchruledata->conflictweight * (1.0 - 1.0/(1.0+conflictscore/avgconflictscore))
622 + branchruledata->conflengthweight * (1.0 - 1.0/(1.0+conflengthscore/avgconflengthscore))
623 + branchruledata->inferenceweight * (1.0 - 1.0/(1.0+inferencescore/avginferencescore))
624 + branchruledata->cutoffweight * (1.0 - 1.0/(1.0+cutoffscore/avgcutoffscore))
625 + branchruledata->gmiavgeffweight * gmieffscore + branchruledata->gmilasteffweight * lastgmieffscore)
626 + branchruledata->pscostweight / dynamicfactor * (1.0 - 1.0/(1.0+pscostscore/avgpscostscore))
627 + branchruledata->nlscoreweight * nlscore;
642 SCIP_Real** bdchgbounds,
661 (*bdchginds)[*nbdchgs] = ind;
662 (*bdchgtypes)[*nbdchgs] = type;
663 (*bdchgbounds)[*nbdchgs] =
bound;
675 SCIP_Real** bdchgbounds,
697 SCIP_Real* bdchgbounds,
706 SCIP_Bool infeasible;
724 for(
i = 0;
i < nbdchgs; ++
i )
744 assert(tightened || (branchruledata->maxproprounds != 0));
759 assert(tightened || (branchruledata->maxproprounds != 0));
773 SCIP_Real* branchcandssol,
774 SCIP_Real* branchcandsfrac,
777 SCIP_Bool executebranch,
783 SCIP_Real bestsbdown;
785 SCIP_Real provedbound;
786 SCIP_Bool bestsbdownvalid;
787 SCIP_Bool bestsbupvalid;
788 SCIP_Bool bestsbdowncutoff;
789 SCIP_Bool bestsbupcutoff;
790 SCIP_Bool bestisstrongbranch;
791 SCIP_Bool allcolsinlp;
792 SCIP_Bool exactsolve;
798 SCIP_Real* sbdown =
NULL;
799 SCIP_Real* sbup =
NULL;
800 SCIP_Bool* sbdownvalid =
NULL;
801 SCIP_Bool* sbupvalid =
NULL;
823 bestisstrongbranch =
FALSE;
826 bestsbdownvalid =
FALSE;
827 bestsbupvalid =
FALSE;
828 bestsbdowncutoff =
FALSE;
829 bestsbupcutoff =
FALSE;
830 provedbound = lpobjval;
840 if( nbranchcands == 1 )
845 sbdownvalid[0] =
FALSE;
846 sbupvalid[0] =
FALSE;
852 SCIP_Real* initcandscores;
853 SCIP_Real* newlbs =
NULL;
854 SCIP_Real* newubs =
NULL;
855 SCIP_Real* mingains =
NULL;
856 SCIP_Real* maxgains =
NULL;
858 SCIP_Real* scores =
NULL;
859 SCIP_Real* scoresfrompc =
NULL;
860 SCIP_Real* scoresfromothers =
NULL;
863 SCIP_Real* bdchgbounds;
868 SCIP_Real avgconflictscore;
869 SCIP_Real avgconflengthscore;
870 SCIP_Real avginferencescore;
871 SCIP_Real avgcutoffscore;
872 SCIP_Real avgpscostscore;
873 SCIP_Real bestpsscore;
874 SCIP_Real bestpsfracscore;
875 SCIP_Real bestpsdomainscore;
876 SCIP_Real bestsbscore;
877 SCIP_Real bestuninitsbscore;
878 SCIP_Real bestsbfracscore;
879 SCIP_Real bestsbdomainscore;
882 SCIP_Real maxlookahead;
884 SCIP_Real relerrorthreshold;
885 SCIP_Bool initstrongbranching;
887 SCIP_Bool probingbounds;
888 SCIP_Longint nodenum;
889 SCIP_Longint nlpiterationsquot;
890 SCIP_Longint nsblpiterations;
891 SCIP_Longint maxnsblpiterations;
896 int bestuninitsbcand;
902 SCIP_Real degeneracyfactor = 1.0;
905 if( branchruledata->degeneracyaware > 0 && (
SCIPgetDepth(
scip) > 0 || branchruledata->degeneracyaware > 1) )
907 SCIP_Real degeneracy;
908 SCIP_Real varconsratio;
913 assert(degeneracy >= 0.0);
914 assert(degeneracy <= 1.0);
915 assert(varconsratio >= 1.0);
918 if( degeneracy >= 0.8 )
920 degeneracy = 10.0 * (degeneracy - 0.7);
921 degeneracyfactor = degeneracyfactor * pow(10.0,degeneracy);
924 if( varconsratio >= 2.0 )
926 degeneracyfactor *= 10.0 * varconsratio;
937 avgconflictscore =
MAX(avgconflictscore, 0.1);
939 avgconflengthscore =
MAX(avgconflengthscore, 0.1);
941 avginferencescore =
MAX(avginferencescore, 0.1);
943 avgcutoffscore =
MAX(avgcutoffscore, 0.1);
945 avgpscostscore =
MAX(avgpscostscore, 0.1);
950 initstrongbranching =
FALSE;
953 propagate = (branchruledata->maxproprounds != 0);
956 probingbounds =
propagate && branchruledata->probingbounds;
961 maxninitcands =
MIN(nbranchcands, branchruledata->initcand);
971 if( nsblpiterations > maxnsblpiterations || degeneracyfactor >= 10.0 )
995 maxbdchgs = branchruledata->maxbdchgs;
996 if( maxbdchgs == -1 )
1000 prio = (maxnsblpiterations - nsblpiterations)/(nsblpiterations + 1.0);
1001 prio =
MIN(prio, 1.0);
1002 prio =
MAX(prio, (nlpiterationsquot - nsblpiterations)/(nsblpiterations + 1.0));
1003 reliable = (1.0-prio) * branchruledata->minreliable + prio * branchruledata->maxreliable;
1006 relerrorthreshold = (1.0 - prio) * branchruledata->higherrortol + prio * branchruledata->lowerrortol;
1010 if( branchruledata->usedynamicconfidence )
1015 else if( prio >= 0.7 )
1017 else if( prio >= 0.5 )
1019 else if( prio >= 0.3 )
1033 if( branchruledata->usehyptestforreliability )
1035 for(
c = 0;
c < nbranchcands; ++
c )
1037 SCIP_Real conflictscore;
1038 SCIP_Real conflengthscore;
1039 SCIP_Real inferencescore;
1040 SCIP_Real cutoffscore;
1041 SCIP_Real gmieffscore;
1042 SCIP_Real lastgmieffscore;
1043 SCIP_Real pscostscore;
1063 SCIP_Real lastlpobjval;
1069 downgain =
MAX(down - lastlpobjval, 0.0);
1070 upgain =
MAX(up - lastlpobjval, 0.0);
1073 SCIPdebugMsg(
scip,
" -> strong branching on variable <%s> already performed (down=%g (%+g), up=%g (%+g), pscostscore=%g)\n",
1074 SCIPvarGetName(branchcands[
c]), down, downgain, up, upgain, pscostscore);
1077 score =
calcScore(
scip, branchruledata, conflictscore, avgconflictscore, conflengthscore, avgconflengthscore,
1078 inferencescore, avginferencescore, cutoffscore, avgcutoffscore, gmieffscore, lastgmieffscore,
1079 pscostscore, avgpscostscore, nlscore, branchcandsfrac[
c], degeneracyfactor);
1084 SCIP_Real fracscore;
1085 SCIP_Real domainscore;
1087 fracscore =
MIN(branchcandsfrac[
c], 1.0 - branchcandsfrac[
c]);
1091 || (
SCIPisSumGE(
scip, fracscore, bestpsfracscore) && domainscore > bestpsdomainscore) )
1094 bestpsscore = score;
1095 bestpsfracscore = fracscore;
1096 bestpsdomainscore = domainscore;
1102 for(
c = 0;
c < nbranchcands; ++
c )
1104 SCIP_Real conflictscore;
1105 SCIP_Real conflengthscore;
1106 SCIP_Real inferencescore;
1107 SCIP_Real cutoffscore;
1108 SCIP_Real gmieffscore;
1109 SCIP_Real lastgmieffscore;
1110 SCIP_Real pscostscore;
1130 mingains[
c] =
MIN(downgain, upgain);
1131 maxgains[
c] =
MAX(downgain, upgain);
1152 SCIP_Real lastlpobjval;
1156 downgain =
MAX(down - lastlpobjval, 0.0);
1157 upgain =
MAX(up - lastlpobjval, 0.0);
1160 mingains[
c] =
MIN(downgain, upgain);
1161 maxgains[
c] =
MAX(downgain, upgain);
1163 SCIPdebugMsg(
scip,
" -> strong branching on variable <%s> already performed (down=%g (%+g), up=%g (%+g), pscostscore=%g)\n",
1164 SCIPvarGetName(branchcands[
c]), down, downgain, up, upgain, pscostscore);
1166 else if( maxninitcands > 0 )
1175 size =
MIN(downsize, upsize);
1179 assert(!branchruledata->usehyptestforreliability || bestpscand >= 0);
1181 if( size < reliable )
1183 else if( branchruledata->userelerrorforreliability && branchruledata->usehyptestforreliability )
1193 else if( branchruledata->userelerrorforreliability &&
1197 else if( branchruledata->usehyptestforreliability &&
1210 scoresfrompc[
c] =
calcScore(
scip, branchruledata, 0.0, avgconflictscore, 0.0, avgconflengthscore,
1211 0.0, avginferencescore, 0.0, avgcutoffscore, 0.0, 0.0,
1212 pscostscore, avgpscostscore, 0.0, branchcandsfrac[
c], degeneracyfactor);
1213 scoresfromothers[
c] =
calcScore(
scip, branchruledata, conflictscore, avgconflictscore, conflengthscore, avgconflengthscore,
1214 inferencescore, avginferencescore, cutoffscore, avgcutoffscore, gmieffscore, lastgmieffscore,
1215 0.0, avgpscostscore, nlscore, branchcandsfrac[
c], degeneracyfactor);
1216 score = scoresfrompc[
c] + scoresfromothers[
c];
1227 scoresfrompc[
c] = 0;
1228 scoresfromothers[
c] = 0;
1231 if( branchruledata->randinitorder )
1235 for( j = ninitcands; j > 0 && score > initcandscores[j-1]; --j )
1237 initcands[j] = initcands[j-1];
1238 initcandscores[j] = initcandscores[j-1];
1241 initcandscores[j] = score;
1243 ninitcands =
MIN(ninitcands, maxninitcands);
1246 else if( !branchruledata->usehyptestforreliability )
1251 SCIP_Real fracscore;
1252 SCIP_Real domainscore;
1254 fracscore =
MIN(branchcandsfrac[
c], 1.0 - branchcandsfrac[
c]);
1258 || (
SCIPisSumGE(
scip, fracscore, bestpsfracscore) && domainscore > bestpsdomainscore) )
1261 bestpsscore = score;
1262 bestpsfracscore = fracscore;
1263 bestpsdomainscore = domainscore;
1270 if( branchruledata->usehyptestforreliability && ninitcands == 1 )
1273 SCIPdebugMsg(
scip,
"Only one single candidate for initialization-->Skipping strong branching\n");
1279 maxlookahead = (
SCIP_Real)branchruledata->maxlookahead * (1.0 + (SCIP_Real)nuninitcands/(SCIP_Real)nbranchcands);
1280 inititer = branchruledata->inititer;
1304 inititer = (int)((SCIP_Real)inititer * (1.0 + 20.0/nodenum));
1305 inititer =
MAX(inititer, 10);
1306 inititer =
MIN(inititer, 500);
1309 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",
1310 reliable, ninitcands, nbranchcands, nuninitcands, maxninitcands, maxlookahead, maxbdchgs, inititer,
1318 bestuninitsbcand = -1;
1320 for(
i = 0;
i < ninitcands && lookahead < maxlookahead && nbdchgs + nbdconflicts < maxbdchgs
1327 SCIP_Bool downvalid;
1329 SCIP_Longint ndomredsdown;
1330 SCIP_Longint ndomredsup;
1334 SCIP_Bool downconflict;
1335 SCIP_Bool upconflict;
1341 if( branchruledata->skipbadinitcands )
1343 SCIP_Bool skipsb =
FALSE;
1347 if( bestsbscore > bestpsscore && bestsbscore > bestuninitsbscore && bestsbupvalid && bestsbdownvalid )
1349 assert(bestsbcand != -1);
1364 else if( bestpscand != -1 && bestpsscore > bestuninitsbscore )
1373 else if( bestuninitsbcand != -1 )
1385 if( bestuninitsbcand == -1 )
1387 bestuninitsbcand =
c;
1388 bestuninitsbscore = initcandscores[
i];
1400 if( !initstrongbranching )
1402 initstrongbranching =
TRUE;
1418 branchruledata->maxproprounds, &down, &up, &downvalid, &upvalid, &ndomredsdown, &ndomredsup, &downinf, &upinf,
1419 &downconflict, &upconflict, &
lperror, newlbs, newubs) );
1425 &down, &up, &downvalid, &upvalid, &downinf, &upinf, &downconflict, &upconflict, &
lperror) );
1427 ndomredsdown = ndomredsup = 0;
1436 "(node %" SCIP_LONGINT_FORMAT ") error in strong branching call for variable <%s> with solution %g\n",
1451 SCIPdebugMsg(
scip,
" -> strong branching on variable <%s> lead to a new incumbent\n",
1467 else if( bestsbcand != -1 && allcolsinlp )
1471 bestsbdowncutoff =
TRUE;
1473 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",
1476 SCIPdebugMsg(
scip,
" -> increase lower bound of best candidate <%s> to %g\n",
1485 bestsbupcutoff =
TRUE;
1487 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",
1490 SCIPdebugMsg(
scip,
" -> decrease upper bound of best candidate <%s> to %g\n",
1500 down =
MAX(down, lpobjval);
1501 up =
MAX(up, lpobjval);
1502 downgain = down - lpobjval;
1503 upgain = up - lpobjval;
1506 assert(downinf || !downconflict);
1507 assert(upinf || !upconflict);
1514#ifdef WITH_LPSOLSTAT
1517 && (!upinf || branchruledata->storesemiinitcosts) )
1522 if( branchruledata->usesmallweightsitlim )
1531#ifdef WITH_LPSOLSTAT
1534 && (!downinf || branchruledata->storesemiinitcosts) )
1539 if( branchruledata->usesmallweightsitlim )
1549 if( allcolsinlp && !exactsolve && downvalid && upvalid )
1553 minbound =
MIN(down, up);
1554 provedbound =
MAX(provedbound, minbound);
1558 if( probingbounds && ( !downinf || !upinf ) )
1565 for( v = 0; v <
nvars; ++v )
1569 SCIPdebugMsg(
scip,
"better lower bound for variable <%s>: %.9g -> %.9g (by strongbranching on <%s>)\n",
1577 SCIPdebugMsg(
scip,
"better upper bound for variable <%s>: %.9g -> %.9g (by strongbranching on <%s>)\n",
1588 if( downinf || upinf )
1593 if( downinf && upinf )
1596 SCIPdebugMsg(
scip,
" -> variable <%s> is infeasible in both directions (conflict: %u/%u)\n",
1604 SCIPdebugMsg(
scip,
" -> variable <%s> is infeasible in %s branch (conflict: %u/%u)\n",
1605 SCIPvarGetName(branchcands[
c]), downinf ?
"downward" :
"upward", downconflict, upconflict);
1609 if( nbdchgs + nbdconflicts >= maxbdchgs )
1615 SCIP_Real conflictscore;
1616 SCIP_Real conflengthscore;
1617 SCIP_Real inferencescore;
1618 SCIP_Real cutoffscore;
1619 SCIP_Real gmieffscore;
1620 SCIP_Real lastgmieffscore;
1621 SCIP_Real pscostscore;
1625 mingains[
c] =
MIN(downgain, upgain);
1626 maxgains[
c] =
MAX(downgain, upgain);
1630 sbdownvalid[
c] = downvalid;
1631 sbupvalid[
c] = upvalid;
1641 inferencescore = branchruledata->usesblocalinfo ?
SCIPgetBranchScore(
scip, branchcands[
c], (SCIP_Real)ndomredsdown, (SCIP_Real)ndomredsup)
1648 scoresfrompc[
c] =
calcScore(
scip, branchruledata, 0.0, avgconflictscore, 0.0, avgconflengthscore,
1649 0.0, avginferencescore, 0.0, avgcutoffscore, 0.0, 0.0, pscostscore,
1650 avgpscostscore, 0.0, branchcandsfrac[
c], degeneracyfactor);
1651 scoresfromothers[
c] =
calcScore(
scip, branchruledata, conflictscore, avgconflictscore, conflengthscore, avgconflengthscore,
1652 inferencescore, avginferencescore, cutoffscore, avgcutoffscore, gmieffscore,
1653 lastgmieffscore, 0.0, avgpscostscore, nlscore, branchcandsfrac[
c],
1655 score = scoresfrompc[
c] + scoresfromothers[
c];
1663 SCIP_Real fracscore;
1664 SCIP_Real domainscore;
1666 fracscore =
MIN(branchcandsfrac[
c], 1.0 - branchcandsfrac[
c]);
1670 || (
SCIPisSumGE(
scip, fracscore, bestsbfracscore) && domainscore > bestsbdomainscore) )
1673 bestsbscore = score;
1676 bestsbdownvalid = downvalid;
1677 bestsbupvalid = upvalid;
1678 bestsbdowncutoff =
FALSE;
1679 bestsbupcutoff =
FALSE;
1680 bestsbfracscore = fracscore;
1681 bestsbdomainscore = domainscore;
1690 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",
1691 SCIPvarGetName(branchcands[
c]), branchcandssol[
c], down, downgain, downvalid, up, upgain, upvalid,
1692 pscostscore, conflictscore, conflengthscore, inferencescore, cutoffscore, gmieffscore, score);
1696 if( bestsbcand >= 0 )
1699 SCIPvarGetName(branchcands[bestsbcand]), bestsbscore, bestsbfracscore, bestsbdomainscore,
1700 lookahead, maxlookahead);
1704 if( initstrongbranching )
1727 if(
i < ninitcands && bestuninitsbcand == -1 )
1728 bestuninitsbscore = initcandscores[
i];
1733 if( bestpsscore > bestuninitsbscore &&
SCIPisSumGT(
scip, bestpsscore, bestsbscore) )
1736 bestisstrongbranch =
FALSE;
1738 else if( bestsbcand >= 0 )
1741 bestisstrongbranch =
TRUE;
1750 bestisstrongbranch =
FALSE;
1754 if( allcolsinlp && !exactsolve )
1771 freeBdchgs(
scip, &bdchginds, &bdchgtypes, &bdchgbounds, &nbdchgs);
1777 SCIP_Real smallpscost;
1778 SCIP_Bool usetreemodel;
1780 usetreemodel =
TRUE;
1785 usetreemodel =
FALSE;
1792 if( usetreemodel ==
TRUE && avgpscostscore <= smallpscost )
1795 for( cand = 0; cand < nbranchcands; ++cand )
1797 if( scoresfrompc[cand] > scoresfrompc[
bestcand] )
1799 usetreemodel =
FALSE;
1805 if( usetreemodel ==
TRUE )
1809 branchruledata->treemodel,
1844 assert(!bestsbdowncutoff && !bestsbupcutoff);
1850 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",
1852 bestsbdown, bestsbdown - lpobjval, bestsbup, bestsbup - lpobjval, bestisstrongbranch,
1862 if( allcolsinlp && !exactsolve )
1940 branchruledata->nlcount =
NULL;
1941 branchruledata->nlcountsize = 0;
1942 branchruledata->nlcountmax = 1;
1943 assert(branchruledata->startrandseed >= 0);
1947 (
unsigned int)branchruledata->startrandseed,
TRUE) );
1970 branchruledata->nosymmetry =
FALSE;
1971 branchruledata->norbits = 0;
1972 branchruledata->permvars =
NULL;
1973 branchruledata->permvarmap =
NULL;
1974 branchruledata->npermvars = 0;
1989 SCIP_Real* filteredlpcandssol;
1990 SCIP_Real* filteredlpcandsfrac;
1991 SCIP_Bool runfiltering;
1992 int* filteredlpcandsorbitidx =
NULL;
1993 int nfilteredlpcands;
2006 SCIPdebugMsg(
scip,
"Could not apply relpscost branching, as the current LP was not solved to optimality.\n");
2028 if( runfiltering && branchruledata->norbits != 0 )
2037 filteredlpcands, filteredlpcandssol, filteredlpcandsfrac, filteredlpcandsorbitidx, &nfilteredlpcands) );
2075 branchruledata->nosymmetry =
FALSE;
2076 branchruledata->orbits =
NULL;
2077 branchruledata->orbitbegins =
NULL;
2078 branchruledata->orbitrep =
NULL;
2079 branchruledata->varorbitmap =
NULL;
2080 branchruledata->norbits = 0;
2081 branchruledata->permvars =
NULL;
2082 branchruledata->npermvars = 0;
2083 branchruledata->permvarmap =
NULL;
2100 "branching/relpscost/conflictweight",
2101 "weight in score calculations for conflict score",
2104 "branching/relpscost/conflictlengthweight",
2105 "weight in score calculations for conflict length score",
2108 "branching/relpscost/inferenceweight",
2109 "weight in score calculations for inference score",
2112 "branching/relpscost/cutoffweight",
2113 "weight in score calculations for cutoff score",
2116 "branching/relpscost/gmiavgeffweight",
2117 "weight in score calculations for average GMI cuts normalized efficacy",
2120 "branching/relpscost/gmilasteffweight",
2121 "weight in score calculations for last GMI cuts normalized efficacy",
2124 "branching/relpscost/pscostweight",
2125 "weight in score calculations for pseudo cost score",
2128 "branching/relpscost/nlscoreweight",
2129 "weight in score calculations for nlcount score",
2132 "branching/relpscost/minreliable",
2133 "minimal value for minimum pseudo cost size to regard pseudo cost value as reliable",
2136 "branching/relpscost/maxreliable",
2137 "maximal value for minimum pseudo cost size to regard pseudo cost value as reliable",
2140 "branching/relpscost/sbiterquot",
2141 "maximal fraction of strong branching LP iterations compared to node relaxation LP iterations",
2144 "branching/relpscost/sbiterofs",
2145 "additional number of allowed strong branching LP iterations",
2148 "branching/relpscost/maxlookahead",
2149 "maximal number of further variables evaluated without better score",
2152 "branching/relpscost/initcand",
2153 "maximal number of candidates initialized with strong branching per node",
2156 "branching/relpscost/inititer",
2157 "iteration limit for strong branching initializations of pseudo cost entries (0: auto)",
2160 "branching/relpscost/maxbdchgs",
2161 "maximal number of bound tightenings before the node is reevaluated (-1: unlimited)",
2164 "branching/relpscost/maxproprounds",
2165 "maximum number of propagation rounds to be performed during strong branching before solving the LP (-1: no limit, -2: parameter settings)",
2168 "branching/relpscost/probingbounds",
2169 "should valid bounds be identified in a probing-like fashion during strong branching (only with propagation)?",
2185 "should strong branching result be considered for pseudo costs if the other direction was infeasible?",
2192 "should the scoring function use only local cutoff and inference information obtained for strong branching candidates?",
2197 "should the strong branching decision be based on a hypothesis test?",
2202 "should the confidence level be adjusted dynamically?",
2206 "should branching rule skip candidates that have a low probability to "
2207 "be better than the best strong-branching or pseudo-candidate?",
2211 "branching/relpscost/confidencelevel",
2212 "the confidence level for statistical methods, between 0 (Min) and 4 (Max).",
2216 "should candidates be initialized in randomized order?",
2221 "should smaller weights be used for pseudo cost updates after hitting the LP iteration limit?",
2226 "should the weights of the branching rule be adjusted dynamically during solving based on objective and infeasible leaf counters?",
2230 "should degeneracy be taken into account to update weights and skip strong branching? (0: off, 1: after root, 2: always)",
2237 "Use symmetry to filter branching candidates?",
2241 "Transfer pscost information to symmetric variables?",
2254 SCIP_Real* branchcandssol,
2255 SCIP_Real* branchcandsfrac,
2257 SCIP_Bool executebranching,
#define DEFAULT_DEGENERACYAWARE
#define DEFAULT_USESBLOCALINFO
#define DEFAULT_SKIPBADINITCANDS
#define DEFAULT_SBITERQUOT
static SCIP_Real calcNlscore(SCIP *scip, int *nlcount, int nlcountmax, int probindex)
#define DEFAULT_HIGHERRORTOL
#define BRANCHRULE_PRIORITY
#define DEFAULT_PROBINGBOUNDS
#define DEFAULT_USESMALLWEIGHTSITLIM
static SCIP_RETCODE applyBdchgs(SCIP *scip, SCIP_VAR **vars, int *bdchginds, SCIP_BOUNDTYPE *bdchgtypes, SCIP_Real *bdchgbounds, int nbdchgs, SCIP_RESULT *result)
#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_INFERENCEWEIGHT
#define DEFAULT_RANDINITORDER
static SCIP_RETCODE initOrbits(SCIP *scip, SCIP_BRANCHRULEDATA *branchruledata)
#define DEFAULT_MAXLOOKAHEAD
#define DEFAULT_SBITEROFS
#define DEFAULT_NLSCOREWEIGHT
#define DEFAULT_CONFLICTWEIGHT
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 DEFAULT_CUTOFFWEIGHT
static SCIP_RETCODE countNonlinearities(SCIP *scip, int *nlcount, int nlcountsize, int *nlcountmax)
#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)
#define DEFAULT_CONFLENGTHWEIGHT
#define DEFAULT_CONFIDENCELEVEL
#define DEFAULT_MINRELIABLE
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_RETCODE binvarGetActiveProbindex(SCIP *scip, SCIP_VAR *var, int *probindex)
#define DEFAULT_MAXPROPROUNDS
#define BRANCHRULE_MAXDEPTH
#define DEFAULT_MAXRELIABLE
#define DEFAULT_PSCOSTWEIGHT
#define BRANCHRULE_MAXBOUNDDIST
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_Bool SCIPisExactSolve(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 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)
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_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_Longint SCIPnodeGetNumber(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 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_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_Real SCIPfeasCeil(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPfeasFloor(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)
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_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_Bool SCIPvarIsBinary(SCIP_VAR *var)
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_VARSTATUS SCIPvarGetStatus(SCIP_VAR *var)
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_RETCODE SCIPtightenVarUb(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
int SCIPvarGetProbindex(SCIP_VAR *var)
const char * SCIPvarGetName(SCIP_VAR *var)
SCIP_Longint SCIPgetVarStrongbranchNode(SCIP *scip, SCIP_VAR *var)
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_Real SCIPvarGetLPSol(SCIP_VAR *var)
SCIP_Real SCIPgetVarPseudocostScoreCurrentRun(SCIP *scip, SCIP_VAR *var, SCIP_Real solval)
SCIP_Real SCIPvarGetLbLocal(SCIP_VAR *var)
SCIP_Bool SCIPvarIsNegated(SCIP_VAR *var)
SCIP_VAR * SCIPvarGetNegationVar(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 SCIPgetBinvarRepresentative(SCIP *scip, SCIP_VAR *var, SCIP_VAR **repvar, SCIP_Bool *negated)
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 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 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.
#define SCIP_DECL_BRANCHEXECLP(x)
#define SCIP_DECL_BRANCHINITSOL(x)
#define SCIP_DECL_BRANCHCOPY(x)
#define SCIP_DECL_BRANCHFREE(x)
struct SCIP_BranchruleData SCIP_BRANCHRULEDATA
#define SCIP_DECL_BRANCHEXITSOL(x)
@ SCIP_BRANCHDIR_DOWNWARDS
enum SCIP_BoundType SCIP_BOUNDTYPE
@ SCIP_LPSOLSTAT_INFEASIBLE
@ SCIP_LPSOLSTAT_OBJLIMIT
@ SCIP_LPSOLSTAT_ITERLIMIT
@ 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