73 assert(num <= branchcand->lpcandssize);
96 assert(num <= branchcand->pseudocandssize);
121 assert(num <= branchcand->externcandssize);
137 assert(branchcand !=
NULL);
140 (*branchcand)->lpcands =
NULL;
141 (*branchcand)->lpcandssol =
NULL;
142 (*branchcand)->lpcandsfrac =
NULL;
143 (*branchcand)->externcands =
NULL;
144 (*branchcand)->externcandssol =
NULL;
145 (*branchcand)->externcandsscore =
NULL;
146 (*branchcand)->pseudocands =
NULL;
147 (*branchcand)->lpcandssize = 0;
148 (*branchcand)->nlpcands = 0;
149 (*branchcand)->nimpllpfracs = 0;
150 (*branchcand)->npriolpcands = 0;
151 (*branchcand)->npriolpbins = 0;
152 (*branchcand)->lpmaxpriority = INT_MIN;
153 (*branchcand)->externcandssize = 0;
154 (*branchcand)->nexterncands = 0;
155 (*branchcand)->nprioexterncands = 0;
156 (*branchcand)->nprioexternbins = 0;
157 (*branchcand)->nprioexternints = 0;
158 (*branchcand)->nprioexternimpls = 0;
159 (*branchcand)->externmaxpriority = INT_MIN;
160 (*branchcand)->pseudocandssize = 0;
161 (*branchcand)->npseudocands = 0;
162 (*branchcand)->npriopseudocands = 0;
163 (*branchcand)->npriopseudobins = 0;
164 (*branchcand)->npriopseudoints = 0;
165 (*branchcand)->pseudomaxpriority = INT_MIN;
177 assert(branchcand !=
NULL);
196 assert(branchcand !=
NULL);
210 assert(branchcand !=
NULL);
211 assert(stat !=
NULL);
217 SCIPsetDebugMsg(
set,
"calculating LP branching candidates: validlp=%" SCIP_LONGINT_FORMAT
", lpcount=%" SCIP_LONGINT_FORMAT
"\n",
260 for( c = 0; c < ncols; ++c )
264 assert(col->
lppos == c);
306 assert(insertpos < branchcand->lpcandssize);
309 branchpriority = INT_MIN;
368 branchcand->
lpcands[insertpos] = var;
378 SCIPsetDebugMsg(
set,
" -> candidate %d: var=<%s>, sol=%g, frac=%g, prio=%d (max: %d) -> pos %d\n",
421 if( lpcands !=
NULL )
422 *lpcands = branchcand->
lpcands;
423 if( lpcandssol !=
NULL )
425 if( lpcandsfrac !=
NULL )
427 if( nlpcands !=
NULL )
429 if( npriolpcands !=
NULL )
432 if( nfracimplvars !=
NULL )
445 int* nprioexterncands,
446 int* nprioexternbins,
447 int* nprioexternints,
448 int* nprioexternimpls
452 assert(branchcand !=
NULL);
455 if( externcands !=
NULL )
457 if( externcandssol !=
NULL )
459 if( externcandsscore !=
NULL )
461 if( nexterncands !=
NULL )
463 if( nprioexterncands !=
NULL )
465 if( nprioexternbins !=
NULL )
467 if( nprioexternints !=
NULL )
469 if( nprioexternimpls !=
NULL )
480 assert(branchcand !=
NULL);
490 assert(branchcand !=
NULL);
500 assert(branchcand !=
NULL);
510 assert(branchcand !=
NULL);
520 assert(branchcand !=
NULL);
530 assert(branchcand !=
NULL);
550 assert(branchcand !=
NULL);
564 SCIPsetDebugMsg(
set,
"inserting external candidate <%s> of type %d and priority %d into candidate set (maxprio: %d), score = %g, solval = %g\n",
672 assert(branchcand !=
NULL);
691 assert(branchcand !=
NULL);
743 i < branchcand->nprioexterncands; i++ )
750 assert(branchpriority < branchcand->externmaxpriority);
765 int* npriopseudocands
768 assert(branchcand !=
NULL);
777 assert(prob !=
NULL);
811 if( pseudocands !=
NULL )
813 if( npseudocands !=
NULL )
815 if( npriopseudocands !=
NULL )
827 assert(branchcand !=
NULL);
837 assert(branchcand !=
NULL);
847 assert(branchcand !=
NULL);
857 assert(branchcand !=
NULL);
867 assert(branchcand !=
NULL);
885 assert(branchcand !=
NULL);
887 assert(branchcand->
npriopseudocands <= insertpos && insertpos < branchcand->npseudocands);
893 SCIPdebugMessage(
"inserting pseudo candidate <%s> of type %d and priority %d into candidate set at position %d (maxprio: %d)\n",
973 assert(branchcand !=
NULL);
1012 assert(branchcand !=
NULL);
1013 assert(var !=
NULL);
1021 SCIPdebugMessage(
"removing pseudo candidate <%s> of type %d and priority %d at %d from candidate set (maxprio: %d)\n",
1030 assert(0 <= freepos && freepos < branchcand->npseudocands);
1032 if( freepos < branchcand->npriopseudobins )
1046 if( freepos < branchcand->npriopseudobins + branchcand->
npriopseudoints )
1060 if( freepos < branchcand->npriopseudocands )
1095 assert(var !=
NULL);
1113 assert(branchcand !=
NULL);
1114 assert(var !=
NULL);
1154 int oldbranchpriority;
1155 int pseudomaxpriority;
1157 assert(branchcand !=
NULL);
1161 if( oldbranchpriority == branchpriority )
1168 if( oldbranchpriority == pseudomaxpriority || branchpriority > pseudomaxpriority )
1209 assert(paramdata !=
NULL);
1223 assert(branchrule !=
NULL);
1224 assert(
set !=
NULL);
1225 assert(set->scip !=
NULL);
1227 if( branchrule->branchcopy !=
NULL )
1230 SCIP_CALL( branchrule->branchcopy(set->scip, branchrule) );
1264 assert(branchrule !=
NULL);
1265 assert(name !=
NULL);
1266 assert(desc !=
NULL);
1271 (*branchrule)->priority = priority;
1272 (*branchrule)->maxdepth = maxdepth;
1273 (*branchrule)->maxbounddist = maxbounddist;
1274 (*branchrule)->branchcopy = branchcopy;
1275 (*branchrule)->branchfree = branchfree;
1276 (*branchrule)->branchinit = branchinit;
1277 (*branchrule)->branchexit = branchexit;
1278 (*branchrule)->branchinitsol = branchinitsol;
1279 (*branchrule)->branchexitsol = branchexitsol;
1280 (*branchrule)->branchexeclp = branchexeclp;
1281 (*branchrule)->branchexecext = branchexecext;
1282 (*branchrule)->branchexecps = branchexecps;
1283 (*branchrule)->branchruledata = branchruledata;
1286 (*branchrule)->nlpcalls = 0;
1287 (*branchrule)->nexterncalls = 0;
1288 (*branchrule)->npseudocalls = 0;
1289 (*branchrule)->ncutoffs = 0;
1290 (*branchrule)->ncutsfound = 0;
1291 (*branchrule)->nconssfound = 0;
1292 (*branchrule)->ndomredsfound = 0;
1293 (*branchrule)->nchildren = 0;
1294 (*branchrule)->initialized =
FALSE;
1300 &(*branchrule)->priority,
FALSE, priority, INT_MIN/4, INT_MAX/4,
1303 (void)
SCIPsnprintf(paramdesc,
SCIP_MAXSTRLEN,
"maximal depth level, up to which branching rule <%s> should be used (-1 for no limit)", name);
1308 (void)
SCIPsnprintf(paramdesc,
SCIP_MAXSTRLEN,
"maximal relative distance from current node's dual bound to primal bound compared to best node's dual bound for applying branching rule (0.0: only on current best node, 1.0: on all nodes)");
1310 &(*branchrule)->maxbounddist,
FALSE, maxbounddist, 0.0, 1.0,
1322 assert(branchrule !=
NULL);
1323 assert(*branchrule !=
NULL);
1324 assert(!(*branchrule)->initialized);
1325 assert(
set !=
NULL);
1328 if( (*branchrule)->branchfree !=
NULL )
1330 SCIP_CALL( (*branchrule)->branchfree(set->scip, *branchrule) );
1348 assert(branchrule !=
NULL);
1349 assert(
set !=
NULL);
1357 if( set->misc_resetstat )
1371 if( branchrule->branchinit !=
NULL )
1376 SCIP_CALL( branchrule->branchinit(set->scip, branchrule) );
1392 assert(branchrule !=
NULL);
1393 assert(
set !=
NULL);
1401 if( branchrule->branchexit !=
NULL )
1406 SCIP_CALL( branchrule->branchexit(set->scip, branchrule) );
1422 assert(branchrule !=
NULL);
1423 assert(
set !=
NULL);
1426 if( branchrule->branchinitsol !=
NULL )
1431 SCIP_CALL( branchrule->branchinitsol(set->scip, branchrule) );
1446 assert(branchrule !=
NULL);
1447 assert(
set !=
NULL);
1450 if( branchrule->branchexitsol !=
NULL )
1455 SCIP_CALL( branchrule->branchexitsol(set->scip, branchrule) );
1476 assert(branchrule !=
NULL);
1477 assert(
set !=
NULL);
1478 assert(tree !=
NULL);
1481 assert(result !=
NULL);
1484 if( branchrule->branchexeclp !=
NULL 1500 runbranchrule =
SCIPsetIsLE(
set, loclowerbound - glblowerbound, branchrule->
maxbounddist * (cutoffbound - glblowerbound));
1521 SCIP_CALL( branchrule->branchexeclp(set->scip, branchrule, allowaddcons, result) );
1535 SCIPerrorMessage(
"branching rule <%s> returned invalid result code <%d> from LP solution branching\n",
1536 branchrule->
name, *result);
1541 SCIPerrorMessage(
"branching rule <%s> added a constraint in LP solution branching without permission\n",
1583 assert(branchrule !=
NULL);
1584 assert(
set !=
NULL);
1585 assert(tree !=
NULL);
1588 assert(result !=
NULL);
1591 if( branchrule->branchexecext !=
NULL 1608 runbranchrule =
SCIPsetIsLE(
set, loclowerbound - glblowerbound, branchrule->
maxbounddist * (cutoffbound - glblowerbound));
1616 int oldnactiveconss;
1618 SCIPsetDebugMsg(
set,
"executing external solution branching rule <%s>\n", branchrule->
name);
1629 SCIP_CALL( branchrule->branchexecext(set->scip, branchrule, allowaddcons, result) );
1643 SCIPerrorMessage(
"branching rule <%s> returned invalid result code <%d> from external solution branching\n",
1644 branchrule->
name, *result);
1649 SCIPerrorMessage(
"branching rule <%s> added a constraint in external solution branching without permission\n",
1689 assert(branchrule !=
NULL);
1690 assert(
set !=
NULL);
1691 assert(tree !=
NULL);
1693 assert(result !=
NULL);
1696 if( branchrule->branchexecps !=
NULL 1712 runbranchrule =
SCIPsetIsLE(
set, loclowerbound - glblowerbound, branchrule->
maxbounddist * (cutoffbound - glblowerbound));
1731 SCIP_CALL( branchrule->branchexecps(set->scip, branchrule, allowaddcons, result) );
1744 SCIPerrorMessage(
"branching rule <%s> returned invalid result code <%d> from pseudo solution branching\n",
1745 branchrule->
name, *result);
1750 SCIPerrorMessage(
"branching rule <%s> added a constraint in pseudo solution branching without permission\n",
1784 assert(branchrule !=
NULL);
1795 assert(branchrule !=
NULL);
1806 assert(branchrule !=
NULL);
1808 branchrule->branchcopy = branchcopy;
1817 assert(branchrule !=
NULL);
1819 branchrule->branchfree = branchfree;
1828 assert(branchrule !=
NULL);
1830 branchrule->branchinit = branchinit;
1839 assert(branchrule !=
NULL);
1841 branchrule->branchexit = branchexit;
1850 assert(branchrule !=
NULL);
1852 branchrule->branchinitsol = branchinitsol;
1861 assert(branchrule !=
NULL);
1863 branchrule->branchexitsol = branchexitsol;
1874 assert(branchrule !=
NULL);
1876 branchrule->branchexeclp = branchexeclp;
1885 assert(branchrule !=
NULL);
1887 branchrule->branchexecext = branchexecext;
1896 assert(branchrule !=
NULL);
1898 branchrule->branchexecps = branchexecps;
1906 assert(branchrule !=
NULL);
1908 return branchrule->
name;
1916 assert(branchrule !=
NULL);
1918 return branchrule->
desc;
1926 assert(branchrule !=
NULL);
1938 assert(branchrule !=
NULL);
1939 assert(
set !=
NULL);
1942 set->branchrulessorted =
FALSE;
1950 assert(branchrule !=
NULL);
1961 assert(branchrule !=
NULL);
1962 assert(maxdepth >= -1);
1972 assert(branchrule !=
NULL);
1983 assert(branchrule !=
NULL);
1984 assert(maxbounddist >= -1);
1995 assert(branchrule !=
NULL);
2006 assert(branchrule !=
NULL);
2016 assert(branchrule !=
NULL);
2026 assert(branchrule !=
NULL);
2036 assert(branchrule !=
NULL);
2046 assert(branchrule !=
NULL);
2056 assert(branchrule !=
NULL);
2066 assert(branchrule !=
NULL);
2078 assert(branchrule !=
NULL);
2088 assert(branchrule !=
NULL);
2098 assert(branchrule !=
NULL);
2108 assert(branchrule !=
NULL);
2131 assert(
set !=
NULL);
2135 if( set->branch_sumadjustscore )
2138 downgain = downgain + eps;
2139 upgain = upgain + eps;
2144 downgain =
MAX(downgain, eps);
2145 upgain =
MAX(upgain, eps);
2148 switch( set->branch_scorefunc )
2152 if( downgain > upgain )
2153 score =
set->branch_scorefac * downgain + (1.0-
set->branch_scorefac) * upgain;
2155 score =
set->branch_scorefac * upgain + (1.0-
set->branch_scorefac) * downgain;
2159 score = downgain * upgain;
2162 if( downgain > upgain )
2163 score = upgain * upgain / downgain;
2165 score = downgain * downgain / upgain;
2168 SCIPerrorMessage(
"invalid branching score function <%c>\n", set->branch_scorefunc);
2192 assert(nchildren == 0 || gains !=
NULL);
2197 for( c = 0; c < nchildren; ++c )
2199 if( gains[c] < min1 )
2204 else if( gains[c] < min2 )
2230 assert(
set !=
NULL);
2231 assert(var !=
NULL);
2244 branchpoint =
MAX(lb,
MIN(suggestion, ub));
2275 if(
REALABS(branchpoint) > 1e+12 )
2277 branchpoint =
MAX(lb,
MIN(branchpoint, ub));
2288 branchpoint = lb + 1000.0;
2299 branchpoint = ub - 1000.0;
2325 branchpoint = (lb+ub)/2.0;
2339 scale = MAX3(lbabs, ubabs, 1.0);
2345 minbrpoint = (1.0 -
set->branch_clamp) * lb + set->branch_clamp * ub;
2352 maxbrpoint =
set->branch_clamp * lb + (1.0 -
set->branch_clamp) * ub;
2356 branchpoint =
MAX(minbrpoint,
MIN(branchpoint, maxbrpoint));
2376 return branchpoint - 0.5;
2384 if( branchpoint <= lb + 0.5 )
2389 else if( branchpoint >= ub - 0.5 )
2401 return branchpoint - 0.5;
2435 assert(branchcand !=
NULL);
2436 assert(result !=
NULL);
2445 SCIPsetDebugMsg(
set,
"branching on LP solution with %d (+%d) fractional (+implicit fractional) variables (%d of maximal priority)\n",
2450 if( nalllpcands == 0 )
2458 SCIP_CALL(
SCIPbranchExecPseudo(blkmem,
set, stat, transprob, origprob, tree, reopt, lp, branchcand, eventqueue, cutoffbound,
2459 allowaddcons, result) );
2486 bestpriority = INT_MIN;
2488 for( i = 0; i < nalllpcands; ++i )
2492 if( priority > bestpriority || (priority == bestpriority && factor > bestfactor) )
2495 bestpriority = priority;
2496 bestfactor = factor;
2499 assert(0 <= bestcand && bestcand < nalllpcands);
2501 var = branchcand->
lpcands[bestcand];
2507 SCIP_CALL(
SCIPtreeBranchVar(tree, reopt, blkmem,
set, stat, transprob, origprob, lp, branchcand, eventqueue, var,
SCIP_INVALID,
2536 assert(branchcand !=
NULL);
2537 assert(result !=
NULL);
2543 SCIPsetDebugMsg(
set,
"branching on external solution with %d branching candidates (%d of maximal priority)\n",
2558 SCIP_CALL(
SCIPbranchExecPseudo(blkmem,
set, stat, transprob, origprob, tree, reopt, lp, branchcand, eventqueue, cutoffbound,
2559 allowaddcons, result) );
2589 bestpriority = INT_MIN;
2610 if( priority > bestpriority || (priority == bestpriority && factor > bestfactor) || (priority == bestpriority && factor == bestfactor && domain > bestdomain) )
2613 bestpriority = priority;
2614 bestfactor = factor;
2615 bestdomain = domain;
2618 assert(0 <= bestcand && bestcand < branchcand->nexterncands);
2628 SCIPsetDebugMsg(
set,
"no branching method succeeded; fallback selected to branch on variable <%s> with bounds [%g, %g] on value %g\n",
2631 SCIP_CALL(
SCIPtreeBranchVar(tree, reopt, blkmem,
set, stat, transprob, origprob, lp, branchcand, eventqueue, var, val,
2666 assert(branchcand !=
NULL);
2667 assert(result !=
NULL);
2699 bestpriority = INT_MIN;
2705 if( priority > bestpriority || (priority == bestpriority && factor > bestfactor) )
2708 bestpriority = priority;
2709 bestfactor = factor;
2712 assert(0 <= bestcand && bestcand < branchcand->npseudocands);
2718 SCIP_CALL(
SCIPtreeBranchVar(tree, reopt, blkmem,
set, stat, transprob, origprob, lp, branchcand, eventqueue, var,
SCIP_INVALID,
enum SCIP_Result SCIP_RESULT
int SCIPbranchcandGetNPrioExternBins(SCIP_BRANCHCAND *branchcand)
SCIP_Bool SCIPsolveIsStopped(SCIP_SET *set, SCIP_STAT *stat, SCIP_Bool checknodelimits)
SCIP_RETCODE SCIPbranchruleCreate(SCIP_BRANCHRULE **branchrule, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, BMS_BLKMEM *blkmem, const char *name, const char *desc, int priority, int maxdepth, SCIP_Real maxbounddist, SCIP_DECL_BRANCHCOPY((*branchcopy)), SCIP_DECL_BRANCHFREE((*branchfree)), SCIP_DECL_BRANCHINIT((*branchinit)), SCIP_DECL_BRANCHEXIT((*branchexit)), SCIP_DECL_BRANCHINITSOL((*branchinitsol)), SCIP_DECL_BRANCHEXITSOL((*branchexitsol)), SCIP_DECL_BRANCHEXECLP((*branchexeclp)), SCIP_DECL_BRANCHEXECEXT((*branchexecext)), SCIP_DECL_BRANCHEXECPS((*branchexecps)), SCIP_BRANCHRULEDATA *branchruledata)
SCIP_Bool SCIPsetIsInfinity(SCIP_SET *set, SCIP_Real val)
SCIP_BRANCHRULEDATA * SCIPbranchruleGetData(SCIP_BRANCHRULE *branchrule)
internal methods for managing events
SCIP_Bool SCIPbranchruleIsInitialized(SCIP_BRANCHRULE *branchrule)
SCIP_Bool SCIPsetIsLE(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
SCIP_RETCODE SCIPtreeBranchVar(SCIP_TREE *tree, SCIP_REOPT *reopt, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_LP *lp, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue, SCIP_VAR *var, SCIP_Real val, SCIP_NODE **downchild, SCIP_NODE **eqchild, SCIP_NODE **upchild)
SCIP_Bool SCIPsetIsFeasZero(SCIP_SET *set, SCIP_Real val)
SCIP_DECL_SORTPTRCOMP(SCIPbranchruleComp)
void SCIPbranchruleSetCopy(SCIP_BRANCHRULE *branchrule, SCIP_DECL_BRANCHCOPY((*branchcopy)))
#define BMSfreeMemoryArrayNull(ptr)
internal methods for branch and bound tree
SCIP_Real SCIPbranchruleGetMaxbounddist(SCIP_BRANCHRULE *branchrule)
SCIP_Real SCIPsetFeastol(SCIP_SET *set)
SCIP_Real SCIPvarGetBranchFactor(SCIP_VAR *var)
SCIP_Real SCIPsetFloor(SCIP_SET *set, SCIP_Real val)
SCIP_RETCODE SCIPbranchruleExitsol(SCIP_BRANCHRULE *branchrule, SCIP_SET *set)
SCIP_Real SCIPnodeGetLowerbound(SCIP_NODE *node)
SCIP_PARAMDATA * SCIPparamGetData(SCIP_PARAM *param)
SCIP_Longint SCIPbranchruleGetNChildren(SCIP_BRANCHRULE *branchrule)
#define SCIP_DECL_BRANCHEXECPS(x)
SCIP_Longint ndomredsfound
internal methods for clocks and timing issues
int SCIPbranchcandGetNPseudoCands(SCIP_BRANCHCAND *branchcand)
SCIP_BRANCHRULEDATA * branchruledata
SCIP_Bool SCIPsetIsPositive(SCIP_SET *set, SCIP_Real val)
struct SCIP_ParamData SCIP_PARAMDATA
void SCIPbranchruleSetFree(SCIP_BRANCHRULE *branchrule, SCIP_DECL_BRANCHFREE((*branchfree)))
SCIP_Real SCIPvarGetLbLocal(SCIP_VAR *var)
struct SCIP_BranchruleData SCIP_BRANCHRULEDATA
SCIP_RETCODE SCIPbranchcandCreate(SCIP_BRANCHCAND **branchcand)
SCIP_Real SCIPsetInfinity(SCIP_SET *set)
SCIP_Longint nactiveconssadded
SCIP_Real SCIPvarGetSol(SCIP_VAR *var, SCIP_Bool getlpval)
int SCIPbranchcandGetNPrioExternCands(SCIP_BRANCHCAND *branchcand)
const char * SCIPbranchruleGetDesc(SCIP_BRANCHRULE *branchrule)
SCIP_Real SCIPbranchGetScore(SCIP_SET *set, SCIP_VAR *var, SCIP_Real downgain, SCIP_Real upgain)
#define SCIP_DECL_BRANCHFREE(x)
void SCIPclockStop(SCIP_CLOCK *clck, SCIP_SET *set)
SCIP_Longint SCIPbranchruleGetNDomredsFound(SCIP_BRANCHRULE *branchrule)
SCIP_Bool SCIPsetIsFeasIntegral(SCIP_SET *set, SCIP_Real val)
SCIP_Real SCIPrelDiff(SCIP_Real val1, SCIP_Real val2)
SCIP_RETCODE SCIPbranchExecPseudo(BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_TREE *tree, SCIP_REOPT *reopt, SCIP_LP *lp, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue, SCIP_Real cutoffbound, SCIP_Bool allowaddcons, SCIP_RESULT *result)
void SCIPclockStart(SCIP_CLOCK *clck, SCIP_SET *set)
int SCIPbranchcandGetNPrioPseudoImpls(SCIP_BRANCHCAND *branchcand)
int SCIPsnprintf(char *t, int len, const char *s,...)
enum SCIP_Retcode SCIP_RETCODE
int SCIPtreeGetCurrentDepth(SCIP_TREE *tree)
SCIP_Longint SCIPbranchruleGetNCutoffs(SCIP_BRANCHRULE *branchrule)
internal methods for branching rules and branching candidate storage
void SCIPbranchcandClearExternCands(SCIP_BRANCHCAND *branchcand)
int SCIPsetCalcMemGrowSize(SCIP_SET *set, int num)
SCIP_Real SCIPsetRound(SCIP_SET *set, SCIP_Real val)
#define SCIP_DECL_BRANCHEXECEXT(x)
SCIP_RETCODE SCIPbranchruleInitsol(SCIP_BRANCHRULE *branchrule, SCIP_SET *set)
static SCIP_RETCODE ensureLpcandsSize(SCIP_BRANCHCAND *branchcand, SCIP_SET *set, int num)
SCIP_Longint SCIPbranchruleGetNExternCalls(SCIP_BRANCHRULE *branchrule)
internal methods for handling parameter settings
SCIP_Bool SCIPsetIsNegative(SCIP_SET *set, SCIP_Real val)
void SCIPclockEnableOrDisable(SCIP_CLOCK *clck, SCIP_Bool enable)
#define SCIP_DECL_BRANCHEXITSOL(x)
#define BMSfreeMemory(ptr)
static SCIP_RETCODE ensureExterncandsSize(SCIP_BRANCHCAND *branchcand, SCIP_SET *set, int num)
SCIP_RETCODE SCIPbranchruleExecLPSol(SCIP_BRANCHRULE *branchrule, SCIP_SET *set, SCIP_STAT *stat, SCIP_TREE *tree, SCIP_SEPASTORE *sepastore, SCIP_Real cutoffbound, SCIP_Bool allowaddcons, SCIP_RESULT *result)
int SCIPbranchcandGetNPrioExternInts(SCIP_BRANCHCAND *branchcand)
SCIP_LPSOLSTAT SCIPlpGetSolstat(SCIP_LP *lp)
SCIP_Real SCIPsetCeil(SCIP_SET *set, SCIP_Real val)
internal methods for LP management
SCIP_Bool SCIPsetIsFeasFracIntegral(SCIP_SET *set, SCIP_Real val)
int SCIPbranchcandGetNPrioPseudoCands(SCIP_BRANCHCAND *branchcand)
SCIP_RETCODE SCIPbranchruleExecPseudoSol(SCIP_BRANCHRULE *branchrule, SCIP_SET *set, SCIP_STAT *stat, SCIP_TREE *tree, SCIP_Real cutoffbound, SCIP_Bool allowaddcons, SCIP_RESULT *result)
int SCIPlpGetNCols(SCIP_LP *lp)
SCIP_Longint nexterncalls
SCIP_Bool SCIPsetIsGE(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
SCIP_RETCODE SCIPbranchExecLP(BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_TREE *tree, SCIP_REOPT *reopt, SCIP_LP *lp, SCIP_SEPASTORE *sepastore, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue, SCIP_Real cutoffbound, SCIP_Bool allowaddcons, SCIP_RESULT *result)
int SCIPbranchcandGetNExternCands(SCIP_BRANCHCAND *branchcand)
SCIP_Bool SCIPsetIsLT(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
SCIP_RETCODE SCIPbranchcandAddExternCand(SCIP_BRANCHCAND *branchcand, SCIP_SET *set, SCIP_VAR *var, SCIP_Real score, SCIP_Real solval)
#define SCIP_DECL_BRANCHINIT(x)
SCIP_RETCODE SCIPvarChgBranchPriority(SCIP_VAR *var, int branchpriority)
SCIP_Real SCIPcolGetPrimsol(SCIP_COL *col)
#define SCIP_DECL_BRANCHCOPY(x)
SCIP_RETCODE SCIPbranchcandGetExternCands(SCIP_BRANCHCAND *branchcand, SCIP_VAR ***externcands, SCIP_Real **externcandssol, SCIP_Real **externcandsscore, int *nexterncands, int *nprioexterncands, int *nprioexternbins, int *nprioexternints, int *nprioexternimpls)
#define BMSfreeMemoryArray(ptr)
internal methods for storing and manipulating the main problem
SCIP_Real SCIPbranchruleGetSetupTime(SCIP_BRANCHRULE *branchrule)
SCIP_Real SCIPbranchGetBranchingPoint(SCIP_SET *set, SCIP_TREE *tree, SCIP_VAR *var, SCIP_Real suggestion)
void SCIPclockReset(SCIP_CLOCK *clck)
SCIP_COL ** SCIPlpGetCols(SCIP_LP *lp)
#define SCIP_DECL_BRANCHINITSOL(x)
SCIP_RETCODE SCIPbranchruleExit(SCIP_BRANCHRULE *branchrule, SCIP_SET *set)
int SCIPsepastoreGetNCuts(SCIP_SEPASTORE *sepastore)
#define SCIP_DECL_BRANCHEXECLP(x)
const char * SCIPvarGetName(SCIP_VAR *var)
SCIP_RETCODE SCIPbranchcandGetPseudoCands(SCIP_BRANCHCAND *branchcand, SCIP_SET *set, SCIP_PROB *prob, SCIP_VAR ***pseudocands, int *npseudocands, int *npriopseudocands)
SCIP_Real SCIPclockGetTime(SCIP_CLOCK *clck)
void SCIPbranchruleSetInit(SCIP_BRANCHRULE *branchrule, SCIP_DECL_BRANCHINIT((*branchinit)))
SCIP_Real * externcandsscore
SCIP_RETCODE SCIPbranchcandGetLPCands(SCIP_BRANCHCAND *branchcand, SCIP_SET *set, SCIP_STAT *stat, SCIP_LP *lp, SCIP_VAR ***lpcands, SCIP_Real **lpcandssol, SCIP_Real **lpcandsfrac, int *nlpcands, int *npriolpcands, int *nfracimplvars)
SCIP_Real * externcandssol
SCIP_Longint SCIPbranchruleGetNConssFound(SCIP_BRANCHRULE *branchrule)
SCIP_Bool SCIPsetIsRelGT(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
SCIP_RETCODE SCIPsetBranchrulePriority(SCIP *scip, SCIP_BRANCHRULE *branchrule, int priority)
static SCIP_RETCODE branchcandCalcLPCands(SCIP_BRANCHCAND *branchcand, SCIP_SET *set, SCIP_STAT *stat, SCIP_LP *lp)
internal methods for global SCIP settings
SCIP_Longint SCIPbranchruleGetNLPCalls(SCIP_BRANCHRULE *branchrule)
SCIP_Bool SCIPsetIsFeasGE(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
SCIP_Real SCIPbranchruleGetTime(SCIP_BRANCHRULE *branchrule)
SCIP_RETCODE SCIPsetAddIntParam(SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, BMS_BLKMEM *blkmem, 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_Bool SCIPsetIsEQ(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPbranchcandContainsExternCand(SCIP_BRANCHCAND *branchcand, SCIP_VAR *var)
internal methods for storing separated cuts
SCIP_Bool SCIPsetIsFeasLE(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
#define BMSduplicateMemoryArray(ptr, source, num)
SCIP_Longint nprobboundchgs
SCIP_RETCODE SCIPclockCreate(SCIP_CLOCK **clck, SCIP_CLOCKTYPE clocktype)
void SCIPbranchruleSetMaxdepth(SCIP_BRANCHRULE *branchrule, int maxdepth)
SCIP_Longint SCIPbranchruleGetNCutsFound(SCIP_BRANCHRULE *branchrule)
internal methods for problem variables
void SCIPbranchruleSetExecLp(SCIP_BRANCHRULE *branchrule, SCIP_DECL_BRANCHEXECLP((*branchexeclp)))
void SCIPbranchruleSetPriority(SCIP_BRANCHRULE *branchrule, SCIP_SET *set, int priority)
SCIP_Bool SCIPsetIsIntegral(SCIP_SET *set, SCIP_Real val)
SCIP_Longint npseudocalls
SCIP_Real SCIPsetSumepsilon(SCIP_SET *set)
int SCIPbranchcandGetNPrioExternConts(SCIP_BRANCHCAND *branchcand)
static const char * paramname[]
int SCIPvarGetBranchPriority(SCIP_VAR *var)
void SCIPclockFree(SCIP_CLOCK **clck)
void SCIPbranchruleSetData(SCIP_BRANCHRULE *branchrule, SCIP_BRANCHRULEDATA *branchruledata)
void SCIPbranchruleEnableOrDisableClocks(SCIP_BRANCHRULE *branchrule, SCIP_Bool enable)
SCIP_Bool SCIPsetIsRelLT(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
static SCIP_DECL_PARAMCHGD(paramChgdBranchrulePriority)
SCIP_Bool SCIPtreeHasCurrentNodeLP(SCIP_TREE *tree)
SCIP_COL * SCIPvarGetCol(SCIP_VAR *var)
SCIP_Real SCIPbranchGetScoreMultiple(SCIP_SET *set, SCIP_VAR *var, int nchildren, SCIP_Real *gains)
SCIP_RETCODE SCIPbranchcandUpdateVar(SCIP_BRANCHCAND *branchcand, SCIP_SET *set, SCIP_VAR *var)
void SCIPbranchruleSetExecPs(SCIP_BRANCHRULE *branchrule, SCIP_DECL_BRANCHEXECPS((*branchexecps)))
SCIP_RETCODE SCIPbranchruleExecExternSol(SCIP_BRANCHRULE *branchrule, SCIP_SET *set, SCIP_STAT *stat, SCIP_TREE *tree, SCIP_SEPASTORE *sepastore, SCIP_Real cutoffbound, SCIP_Bool allowaddcons, SCIP_RESULT *result)
void SCIPbranchcandInvalidate(SCIP_BRANCHCAND *branchcand)
#define SCIP_MAXTREEDEPTH
SCIP_RETCODE SCIPbranchcandFree(SCIP_BRANCHCAND **branchcand)
void SCIPbranchruleSetInitsol(SCIP_BRANCHRULE *branchrule, SCIP_DECL_BRANCHINITSOL((*branchinitsol)))
int SCIPbranchruleGetMaxdepth(SCIP_BRANCHRULE *branchrule)
SCIP_Real SCIPsetFeasFrac(SCIP_SET *set, SCIP_Real val)
int SCIPparamGetInt(SCIP_PARAM *param)
void SCIPbranchruleSetExecExt(SCIP_BRANCHRULE *branchrule, SCIP_DECL_BRANCHEXECEXT((*branchexecext)))
void SCIPsetSortBranchrules(SCIP_SET *set)
SCIP_Longint SCIPbranchruleGetNPseudoCalls(SCIP_BRANCHRULE *branchrule)
internal methods for main solving loop and node processing
void SCIPbranchruleSetExitsol(SCIP_BRANCHRULE *branchrule, SCIP_DECL_BRANCHEXITSOL((*branchexitsol)))
SCIP_RETCODE SCIPbranchruleInit(SCIP_BRANCHRULE *branchrule, SCIP_SET *set)
SCIP_RETCODE SCIPbranchruleCopyInclude(SCIP_BRANCHRULE *branchrule, SCIP_SET *set)
int SCIPbranchcandGetNPrioPseudoBins(SCIP_BRANCHCAND *branchcand)
SCIP_Longint validlpcandslp
SCIP_VARSTATUS SCIPvarGetStatus(SCIP_VAR *var)
static void branchcandSortPseudoCands(SCIP_BRANCHCAND *branchcand)
internal methods for problem statistics
const char * SCIPbranchruleGetName(SCIP_BRANCHRULE *branchrule)
datastructures for branching rules and branching candidate storage
SCIP_RETCODE SCIPbranchruleFree(SCIP_BRANCHRULE **branchrule, SCIP_SET *set)
SCIP_Bool SCIPsetIsFeasPositive(SCIP_SET *set, SCIP_Real val)
#define BMSallocMemory(ptr)
#define BMSreallocMemoryArray(ptr, num)
void SCIPbranchruleSetMaxbounddist(SCIP_BRANCHRULE *branchrule, SCIP_Real maxbounddist)
void SCIPbranchruleSetExit(SCIP_BRANCHRULE *branchrule, SCIP_DECL_BRANCHEXIT((*branchexit)))
static void branchcandRemovePseudoCand(SCIP_BRANCHCAND *branchcand, SCIP_VAR *var)
static void branchcandInsertPseudoCand(SCIP_BRANCHCAND *branchcand, SCIP_VAR *var, int insertpos)
SCIP_RETCODE SCIPbranchcandRemoveVar(SCIP_BRANCHCAND *branchcand, SCIP_VAR *var)
SCIP_VARTYPE SCIPvarGetType(SCIP_VAR *var)
SCIP_Real SCIPvarGetMultaggrUbLocal(SCIP_VAR *var, SCIP_SET *set)
SCIP_Real SCIPsetEpsilon(SCIP_SET *set)
int SCIPbranchcandGetNPrioPseudoInts(SCIP_BRANCHCAND *branchcand)
enum SCIP_Vartype SCIP_VARTYPE
SCIP_Real SCIPvarGetUbLocal(SCIP_VAR *var)
SCIP_Real SCIPtreeGetLowerbound(SCIP_TREE *tree, SCIP_SET *set)
common defines and data types used in all packages of SCIP
struct BMS_BlkMem BMS_BLKMEM
SCIP_RETCODE SCIPsetAddRealParam(SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, BMS_BLKMEM *blkmem, 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 SCIPbranchExecExtern(BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_TREE *tree, SCIP_REOPT *reopt, SCIP_LP *lp, SCIP_SEPASTORE *sepastore, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue, SCIP_Real cutoffbound, SCIP_Bool allowaddcons, SCIP_RESULT *result)
SCIP_Longint nprobholechgs
SCIP_Real SCIPvarGetMultaggrLbLocal(SCIP_VAR *var, SCIP_SET *set)
#define SCIP_DECL_BRANCHEXIT(x)
SCIP_Bool SCIPsetIsFeasNegative(SCIP_SET *set, SCIP_Real val)
SCIP_RETCODE SCIPbranchcandUpdateVarBranchPriority(SCIP_BRANCHCAND *branchcand, SCIP_SET *set, SCIP_VAR *var, int branchpriority)
int SCIPbranchcandGetNPrioExternImpls(SCIP_BRANCHCAND *branchcand)
int SCIPbranchruleGetPriority(SCIP_BRANCHRULE *branchrule)
static SCIP_RETCODE ensurePseudocandsSize(SCIP_BRANCHCAND *branchcand, SCIP_SET *set, int num)
memory allocation routines