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);
540 assert(branchcand != NULL);
550 assert(branchcand != NULL);
560 assert(branchcand != NULL);
580 assert(branchcand != NULL);
594 SCIPsetDebugMsg(
set,
"inserting external candidate <%s> of type %d and priority %d into candidate set (maxprio: %d), score = %g, solval = %g\n",
702 assert(branchcand != NULL);
721 assert(branchcand != NULL);
773 i < branchcand->nprioexterncands; i++ )
780 assert(branchpriority < branchcand->externmaxpriority);
795 int* npriopseudocands
798 assert(branchcand != NULL);
807 assert(prob != NULL);
841 if( pseudocands != NULL )
843 if( npseudocands != NULL )
845 if( npriopseudocands != NULL )
857 assert(branchcand != NULL);
867 assert(branchcand != NULL);
877 assert(branchcand != NULL);
887 assert(branchcand != NULL);
897 assert(branchcand != NULL);
915 assert(branchcand != NULL);
917 assert(branchcand->
npriopseudocands <= insertpos && insertpos < branchcand->npseudocands);
923 SCIPdebugMessage(
"inserting pseudo candidate <%s> of type %d and priority %d into candidate set at position %d (maxprio: %d)\n",
1003 assert(branchcand != NULL);
1042 assert(branchcand != NULL);
1043 assert(var != NULL);
1051 SCIPdebugMessage(
"removing pseudo candidate <%s> of type %d and priority %d at %d from candidate set (maxprio: %d)\n",
1060 assert(0 <= freepos && freepos < branchcand->npseudocands);
1062 if( freepos < branchcand->npriopseudobins )
1076 if( freepos < branchcand->npriopseudobins + branchcand->
npriopseudoints )
1090 if( freepos < branchcand->npriopseudocands )
1125 assert(var != NULL);
1143 assert(branchcand != NULL);
1144 assert(var != NULL);
1184 int oldbranchpriority;
1185 int pseudomaxpriority;
1187 assert(branchcand != NULL);
1191 if( oldbranchpriority == branchpriority )
1198 if( oldbranchpriority == pseudomaxpriority || branchpriority > pseudomaxpriority )
1239 assert(paramdata != NULL);
1253 assert(branchrule != NULL);
1254 assert(
set != NULL);
1255 assert(set->scip != NULL);
1257 if( branchrule->branchcopy != NULL )
1260 SCIP_CALL( branchrule->branchcopy(set->scip, branchrule) );
1294 assert(branchrule != NULL);
1295 assert(name != NULL);
1296 assert(desc != NULL);
1301 (*branchrule)->priority = priority;
1302 (*branchrule)->maxdepth = maxdepth;
1303 (*branchrule)->maxbounddist = maxbounddist;
1304 (*branchrule)->branchcopy = branchcopy;
1305 (*branchrule)->branchfree = branchfree;
1306 (*branchrule)->branchinit = branchinit;
1307 (*branchrule)->branchexit = branchexit;
1308 (*branchrule)->branchinitsol = branchinitsol;
1309 (*branchrule)->branchexitsol = branchexitsol;
1310 (*branchrule)->branchexeclp = branchexeclp;
1311 (*branchrule)->branchexecext = branchexecext;
1312 (*branchrule)->branchexecps = branchexecps;
1313 (*branchrule)->branchruledata = branchruledata;
1316 (*branchrule)->nlpcalls = 0;
1317 (*branchrule)->nexterncalls = 0;
1318 (*branchrule)->npseudocalls = 0;
1319 (*branchrule)->ncutoffs = 0;
1320 (*branchrule)->ncutsfound = 0;
1321 (*branchrule)->nconssfound = 0;
1322 (*branchrule)->ndomredsfound = 0;
1323 (*branchrule)->nchildren = 0;
1324 (*branchrule)->initialized =
FALSE;
1330 &(*branchrule)->priority,
FALSE, priority, INT_MIN/4, INT_MAX/4,
1333 (void)
SCIPsnprintf(paramdesc,
SCIP_MAXSTRLEN,
"maximal depth level, up to which branching rule <%s> should be used (-1 for no limit)", name);
1338 (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)");
1340 &(*branchrule)->maxbounddist,
FALSE, maxbounddist, 0.0, 1.0,
1352 assert(branchrule != NULL);
1353 assert(*branchrule != NULL);
1354 assert(!(*branchrule)->initialized);
1355 assert(
set != NULL);
1358 if( (*branchrule)->branchfree != NULL )
1360 SCIP_CALL( (*branchrule)->branchfree(set->scip, *branchrule) );
1378 assert(branchrule != NULL);
1379 assert(
set != NULL);
1387 if( set->misc_resetstat )
1401 if( branchrule->branchinit != NULL )
1406 SCIP_CALL( branchrule->branchinit(set->scip, branchrule) );
1422 assert(branchrule != NULL);
1423 assert(
set != NULL);
1431 if( branchrule->branchexit != NULL )
1436 SCIP_CALL( branchrule->branchexit(set->scip, branchrule) );
1452 assert(branchrule != NULL);
1453 assert(
set != NULL);
1456 if( branchrule->branchinitsol != NULL )
1461 SCIP_CALL( branchrule->branchinitsol(set->scip, branchrule) );
1476 assert(branchrule != NULL);
1477 assert(
set != NULL);
1480 if( branchrule->branchexitsol != NULL )
1485 SCIP_CALL( branchrule->branchexitsol(set->scip, branchrule) );
1506 assert(branchrule != NULL);
1507 assert(
set != NULL);
1508 assert(tree != NULL);
1511 assert(result != NULL);
1514 if( branchrule->branchexeclp != NULL
1530 runbranchrule =
SCIPsetIsLE(
set, loclowerbound - glblowerbound, branchrule->
maxbounddist * (cutoffbound - glblowerbound));
1551 SCIP_CALL( branchrule->branchexeclp(set->scip, branchrule, allowaddcons, result) );
1565 SCIPerrorMessage(
"branching rule <%s> returned invalid result code <%d> from LP solution branching\n",
1566 branchrule->
name, *result);
1571 SCIPerrorMessage(
"branching rule <%s> added a constraint in LP solution branching without permission\n",
1613 assert(branchrule != NULL);
1614 assert(
set != NULL);
1615 assert(tree != NULL);
1618 assert(result != NULL);
1621 if( branchrule->branchexecext != NULL
1638 runbranchrule =
SCIPsetIsLE(
set, loclowerbound - glblowerbound, branchrule->
maxbounddist * (cutoffbound - glblowerbound));
1646 int oldnactiveconss;
1648 SCIPsetDebugMsg(
set,
"executing external solution branching rule <%s>\n", branchrule->
name);
1659 SCIP_CALL( branchrule->branchexecext(set->scip, branchrule, allowaddcons, result) );
1673 SCIPerrorMessage(
"branching rule <%s> returned invalid result code <%d> from external solution branching\n",
1674 branchrule->
name, *result);
1679 SCIPerrorMessage(
"branching rule <%s> added a constraint in external solution branching without permission\n",
1719 assert(branchrule != NULL);
1720 assert(
set != NULL);
1721 assert(tree != NULL);
1723 assert(result != NULL);
1726 if( branchrule->branchexecps != NULL
1742 runbranchrule =
SCIPsetIsLE(
set, loclowerbound - glblowerbound, branchrule->
maxbounddist * (cutoffbound - glblowerbound));
1761 SCIP_CALL( branchrule->branchexecps(set->scip, branchrule, allowaddcons, result) );
1774 SCIPerrorMessage(
"branching rule <%s> returned invalid result code <%d> from pseudo solution branching\n",
1775 branchrule->
name, *result);
1780 SCIPerrorMessage(
"branching rule <%s> added a constraint in pseudo solution branching without permission\n",
1814 assert(branchrule != NULL);
1825 assert(branchrule != NULL);
1836 assert(branchrule != NULL);
1838 branchrule->branchcopy = branchcopy;
1847 assert(branchrule != NULL);
1849 branchrule->branchfree = branchfree;
1858 assert(branchrule != NULL);
1860 branchrule->branchinit = branchinit;
1869 assert(branchrule != NULL);
1871 branchrule->branchexit = branchexit;
1880 assert(branchrule != NULL);
1882 branchrule->branchinitsol = branchinitsol;
1891 assert(branchrule != NULL);
1893 branchrule->branchexitsol = branchexitsol;
1904 assert(branchrule != NULL);
1906 branchrule->branchexeclp = branchexeclp;
1915 assert(branchrule != NULL);
1917 branchrule->branchexecext = branchexecext;
1926 assert(branchrule != NULL);
1928 branchrule->branchexecps = branchexecps;
1936 assert(branchrule != NULL);
1938 return branchrule->
name;
1946 assert(branchrule != NULL);
1948 return branchrule->
desc;
1956 assert(branchrule != NULL);
1968 assert(branchrule != NULL);
1969 assert(
set != NULL);
1972 set->branchrulessorted =
FALSE;
1980 assert(branchrule != NULL);
1991 assert(branchrule != NULL);
1992 assert(maxdepth >= -1);
2002 assert(branchrule != NULL);
2013 assert(branchrule != NULL);
2014 assert(maxbounddist >= -1);
2025 assert(branchrule != NULL);
2036 assert(branchrule != NULL);
2046 assert(branchrule != NULL);
2056 assert(branchrule != NULL);
2066 assert(branchrule != NULL);
2076 assert(branchrule != NULL);
2086 assert(branchrule != NULL);
2096 assert(branchrule != NULL);
2108 assert(branchrule != NULL);
2118 assert(branchrule != NULL);
2128 assert(branchrule != NULL);
2138 assert(branchrule != NULL);
2161 assert(
set != NULL);
2165 if( set->branch_sumadjustscore )
2168 downgain = downgain +
eps;
2169 upgain = upgain +
eps;
2174 downgain =
MAX(downgain, eps);
2175 upgain =
MAX(upgain, eps);
2178 switch( set->branch_scorefunc )
2182 if( downgain > upgain )
2183 score =
set->branch_scorefac * downgain + (1.0-
set->branch_scorefac) * upgain;
2185 score =
set->branch_scorefac * upgain + (1.0-
set->branch_scorefac) * downgain;
2189 score = downgain * upgain;
2192 if( downgain > upgain )
2193 score = upgain * upgain / downgain;
2195 score = downgain * downgain / upgain;
2198 SCIPerrorMessage(
"invalid branching score function <%c>\n", set->branch_scorefunc);
2222 assert(nchildren == 0 || gains != NULL);
2227 for( c = 0; c < nchildren; ++c )
2229 if( gains[c] < min1 )
2234 else if( gains[c] < min2 )
2260 assert(
set != NULL);
2261 assert(var != NULL);
2274 branchpoint =
MAX(lb, MIN(suggestion, ub));
2305 if(
REALABS(branchpoint) > 1e+12 )
2307 branchpoint =
MAX(lb, MIN(branchpoint, ub));
2318 branchpoint = lb + 1000.0;
2329 branchpoint = ub - 1000.0;
2355 branchpoint = (lb+ub)/2.0;
2369 scale = MAX3(lbabs, ubabs, 1.0);
2375 minbrpoint = (1.0 -
set->branch_clamp) * lb + set->branch_clamp * ub;
2382 maxbrpoint =
set->branch_clamp * lb + (1.0 -
set->branch_clamp) * ub;
2383 maxbrpoint = MIN(ub - 1.01*
SCIPsetEpsilon(
set)*scale, maxbrpoint);
2386 branchpoint =
MAX(minbrpoint, MIN(branchpoint, maxbrpoint));
2406 return branchpoint - 0.5;
2414 if( branchpoint <= lb + 0.5 )
2419 else if( branchpoint >= ub - 0.5 )
2431 return branchpoint - 0.5;
2465 assert(branchcand != NULL);
2466 assert(result != NULL);
2475 SCIPsetDebugMsg(
set,
"branching on LP solution with %d (+%d) fractional (+implicit fractional) variables (%d of maximal priority)\n",
2480 if( nalllpcands == 0 )
2488 SCIP_CALL(
SCIPbranchExecPseudo(blkmem,
set, stat, transprob, origprob, tree, reopt, lp, branchcand, eventqueue, cutoffbound,
2489 allowaddcons, result) );
2516 bestpriority = INT_MIN;
2518 for( i = 0; i < nalllpcands; ++i )
2522 if( priority > bestpriority || (priority == bestpriority && factor > bestfactor) )
2525 bestpriority = priority;
2526 bestfactor = factor;
2529 assert(0 <= bestcand && bestcand < nalllpcands);
2531 var = branchcand->
lpcands[bestcand];
2537 SCIP_CALL(
SCIPtreeBranchVar(tree, reopt, blkmem,
set, stat, transprob, origprob, lp, branchcand, eventqueue, var,
SCIP_INVALID,
2538 NULL, NULL, NULL) );
2566 assert(branchcand != NULL);
2567 assert(result != NULL);
2573 SCIPsetDebugMsg(
set,
"branching on external solution with %d branching candidates (%d of maximal priority)\n",
2588 SCIP_CALL(
SCIPbranchExecPseudo(blkmem,
set, stat, transprob, origprob, tree, reopt, lp, branchcand, eventqueue, cutoffbound,
2589 allowaddcons, result) );
2619 bestpriority = INT_MIN;
2640 if( priority > bestpriority || (priority == bestpriority && factor > bestfactor) || (priority == bestpriority && factor == bestfactor && domain > bestdomain) )
2643 bestpriority = priority;
2644 bestfactor = factor;
2645 bestdomain = domain;
2648 assert(0 <= bestcand && bestcand < branchcand->nexterncands);
2658 SCIPsetDebugMsg(
set,
"no branching method succeeded; fallback selected to branch on variable <%s> with bounds [%g, %g] on value %g\n",
2661 SCIP_CALL(
SCIPtreeBranchVar(tree, reopt, blkmem,
set, stat, transprob, origprob, lp, branchcand, eventqueue, var, val,
2662 NULL, NULL, NULL) );
2696 assert(branchcand != NULL);
2697 assert(result != NULL);
2729 bestpriority = INT_MIN;
2735 if( priority > bestpriority || (priority == bestpriority && factor > bestfactor) )
2738 bestpriority = priority;
2739 bestfactor = factor;
2742 assert(0 <= bestcand && bestcand < branchcand->npseudocands);
2748 SCIP_CALL(
SCIPtreeBranchVar(tree, reopt, blkmem,
set, stat, transprob, origprob, lp, branchcand, eventqueue, var,
SCIP_INVALID,
2749 NULL, NULL, NULL) );
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)
int SCIPbranchcandGetExternMaxPrio(SCIP_BRANCHCAND *branchcand)
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)
int SCIPbranchcandGetNPrioLPCands(SCIP_BRANCHCAND *branchcand)
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
int SCIPbranchcandGetLPMaxPrio(SCIP_BRANCHCAND *branchcand)
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)
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