SCIP_BranchruleData
121assert(cands !=
NULL);
122assert(bestcand !=
NULL);
123assert(bestdown !=
NULL);
124assert(bestup !=
NULL);
125assert(bestscore !=
NULL);
126assert(bestdownvalid !=
NULL);
127assert(bestupvalid !=
NULL);
128assert(provedbound !=
NULL);
133*provedbound = lpobjval;
136*bestdown = lpobjval;
138*bestdownvalid =
FALSE;
139*bestupvalid =
FALSE;
142 if( scores !=
NULL)
143 for( c = 0; c < ncands; ++c )
160 for( c = 0; c < ncands ; ++c )
175assert(var !=
NULL);
183 SCIPdebugMsg(
scip,
"applying vanilla strong branching on variable <%s> with solution %g\n",
190&down, &up, &downvalid, &upvalid, &downinf, &upinf, &downconflict, &upconflict, &lperror) );
195&down, &up, &downvalid, &upvalid, &downinf, &upinf, &downconflict, &upconflict, &lperror) );
203 "(node %" SCIP_LONGINT_FORMAT ") error in strong branching call for variable <%s> with solution %g\n",
209down =
MAX(down, lpobjval);
210up =
MAX(up, lpobjval);
211downgain = down - lpobjval;
212upgain = up - lpobjval;
216assert(downinf || !downconflict);
217assert(upinf || !upconflict);
227 if( !downinf && downvalid )
231 if( !upinf && upvalid )
244 if( scores !=
NULL)
248 if( score > *bestscore )
253*bestdownvalid = downvalid;
254*bestupvalid = upvalid;
258 SCIPdebugMsg(
scip,
" -> cand %d/%d (prio:%d) var <%s> (solval=%g, downgain=%g, upgain=%g, score=%g) -- best: <%s> (%g)\n",
259c, ncands, npriocands,
SCIPvarGetName(var), val, downgain, upgain, score,
263 if( !integral && !scoreall && downinf && upinf )
268assert(*bestcand == c);
283*provedbound =
MAX(*provedbound, minbound);
298assert(branchrule !=
NULL);
315assert(branchruledata !=
NULL);
332assert(branchruledata !=
NULL);
333assert(branchruledata->candscores ==
NULL);
334assert(branchruledata->cands ==
NULL);
347assert(branchruledata !=
NULL);
350 if( branchruledata->candscores !=
NULL)
354 if( branchruledata->cands !=
NULL)
359branchruledata->candcapacity = -1;
360branchruledata->ncands = -1;
361branchruledata->npriocands = -1;
362branchruledata->bestcand = -1;
383assert(branchrule !=
NULL);
386assert(result !=
NULL);
394assert(branchruledata !=
NULL);
398 if( branchruledata->integralcands )
408assert(npriocands > 0);
411 if( ncands > branchruledata->candcapacity )
414 if( branchruledata->candscores !=
NULL)
417branchruledata->candscores =
NULL;
419 if( branchruledata->cands !=
NULL)
422branchruledata->cands =
NULL;
428assert(branchruledata->candcapacity >= ncands);
431 if( branchruledata->cands ==
NULL)
435 if( branchruledata->candscores ==
NULL&& branchruledata->collectscores )
441branchruledata->ncands = ncands;
442branchruledata->npriocands = npriocands;
444 for( i = 0; i < ncands; i++ )
445branchruledata->cands[i] = cands[i];
448branchruledata->scoreall, branchruledata->idempotent, branchruledata->candscores,
449&branchruledata->bestcand, &bestdown, &bestup, &bestscore, &bestdownvalid,
450&bestupvalid, &provedbound) );
452 if( !branchruledata->donotbranch )
454assert(0 <= branchruledata->bestcand && branchruledata->bestcand < branchruledata->ncands);
458 SCIPdebugMsg(
scip,
" -> variable <%s> is infeasible in both directions\n",
459 SCIPvarGetName(branchruledata->cands[branchruledata->bestcand]));
481 if( !branchruledata->idempotent && allcolsinlp && !exactsolve )
488var = branchruledata->cands[branchruledata->bestcand];
492 SCIPdebugMsg(
scip,
" -> %d candidates, selected candidate %d: variable <%s>[%g,%g] (solval=%g, down=%g, up=%g, score=%g)\n",
498 if( !branchruledata->idempotent && allcolsinlp && !exactsolve )
500 if( downchild !=
NULL&& bestdownvalid )
505 if( upchild !=
NULL&& bestupvalid )
534branchruledata->cands =
NULL;
535branchruledata->candscores =
NULL;
536branchruledata->candcapacity = -1;
537branchruledata->ncands = -1;
538branchruledata->npriocands = -1;
539branchruledata->bestcand = -1;
545assert(branchrule !=
NULL);
556 "branching/vanillafullstrong/integralcands",
557 "should integral variables in the current LP solution be considered as branching candidates?",
560 "branching/vanillafullstrong/idempotent",
561 "should strong branching side-effects be prevented (e.g., domain changes, stat updates etc.)?",
564 "branching/vanillafullstrong/scoreall",
565 "should strong branching scores be computed for all candidates, or can we early stop when a variable has infinite score?",
568 "branching/vanillafullstrong/collectscores",
569 "should strong branching scores be collected?",
572 "branching/vanillafullstrong/donotbranch",
573 "should candidates only be scored, but no branching be performed?",
596assert( branchrule !=
NULL);
598assert( branchruledata !=
NULL);
602*cands = branchruledata->cands;
604 if( candscores && branchruledata->collectscores )
606*candscores = branchruledata->candscores;
610*ncands = branchruledata->ncands;
614*npriocands = branchruledata->npriocands;
618*bestcand = branchruledata->bestcand;
#define DEFAULT_IDEMPOTENT
#define BRANCHRULE_PRIORITY
SCIP_RETCODE SCIPgetVanillafullstrongData(SCIP *scip, SCIP_VAR ***cands, SCIP_Real **candscores, int *ncands, int *npriocands, int *bestcand)
static SCIP_DECL_BRANCHCOPY(branchCopyVanillafullstrong)
static SCIP_RETCODE runVanillaStrongBranching(SCIP *scip, SCIP_VAR **cands, int ncands, int npriocands, SCIP_Bool scoreall, SCIP_Bool idempotent, SCIP_Real *scores, int *bestcand, SCIP_Real *bestdown, SCIP_Real *bestup, SCIP_Real *bestscore, SCIP_Bool *bestdownvalid, SCIP_Bool *bestupvalid, SCIP_Real *provedbound)
#define DEFAULT_INTEGRALCANDS
#define DEFAULT_DONOTBRANCH
static SCIP_DECL_BRANCHFREE(branchFreeVanillafullstrong)
static SCIP_DECL_BRANCHEXIT(branchExitVanillafullstrong)
static SCIP_DECL_BRANCHEXECLP(branchExeclpVanillafullstrong)
static SCIP_DECL_BRANCHINIT(branchInitVanillafullstrong)
#define BRANCHRULE_MAXDEPTH
#define DEFAULT_COLLECTSCORES
#define BRANCHRULE_MAXBOUNDDIST
vanilla full strong LP branching rule
#define SCIP_LONGINT_FORMAT
SCIP_RETCODE SCIPincludeBranchruleVanillafullstrong(SCIP *scip)
SCIP_Bool SCIPisStopped(SCIP *scip)
SCIP_Bool SCIPisExactSolve(SCIP *scip)
int SCIPgetNIntVars(SCIP *scip)
int SCIPgetNImplVars(SCIP *scip)
int SCIPgetNBinVars(SCIP *scip)
SCIP_RETCODE SCIPupdateNodeLowerbound(SCIP *scip, SCIP_NODE *node, SCIP_Real newbound)
SCIP_RETCODE SCIPupdateLocalLowerbound(SCIP *scip, SCIP_Real newbound)
void SCIPverbMessage(SCIP *scip, SCIP_VERBLEVEL msgverblevel, FILE *file, const char *formatstr,...)
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_RETCODE SCIPsetBranchruleExit(SCIP *scip, SCIP_BRANCHRULE *branchrule, SCIP_DECL_BRANCHEXIT((*branchexit)))
SCIP_RETCODE SCIPsetBranchruleExecLp(SCIP *scip, SCIP_BRANCHRULE *branchrule, SCIP_DECL_BRANCHEXECLP((*branchexeclp)))
SCIP_BRANCHRULE * SCIPfindBranchrule(SCIP *scip, const char *name)
SCIP_RETCODE SCIPsetBranchruleCopy(SCIP *scip, SCIP_BRANCHRULE *branchrule, SCIP_DECL_BRANCHCOPY((*branchcopy)))
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 SCIPsetBranchruleFree(SCIP *scip, SCIP_BRANCHRULE *branchrule, SCIP_DECL_BRANCHFREE((*branchfree)))
SCIP_RETCODE SCIPsetBranchruleInit(SCIP *scip, SCIP_BRANCHRULE *branchrule, SCIP_DECL_BRANCHINIT((*branchinit)))
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_RETCODE SCIPgetPseudoBranchCands(SCIP *scip, SCIP_VAR ***pseudocands, int *npseudocands, int *npriopseudocands)
SCIP_Real SCIPgetBranchScoreMultiple(SCIP *scip, SCIP_VAR *var, int nchildren, SCIP_Real *gains)
SCIP_LPSOLSTAT SCIPgetLPSolstat(SCIP *scip)
SCIP_Bool SCIPallColsInLP(SCIP *scip)
SCIP_Real SCIPgetLPObjval(SCIP *scip)
#define SCIPallocBlockMemoryArray(scip, ptr, num)
#define SCIPfreeBlockMemoryArrayNull(scip, ptr, num)
#define SCIPfreeBlockMemoryNull(scip, ptr)
#define SCIPallocBlockMemory(scip, ptr)
SCIP_Real SCIPnodeGetLowerbound(SCIP_NODE *node)
SCIP_Longint SCIPgetNNodes(SCIP *scip)
SCIP_Real SCIPgetCutoffbound(SCIP *scip)
SCIP_RETCODE SCIPprintDisplayLine(SCIP *scip, FILE *file, SCIP_VERBLEVEL verblevel, SCIP_Bool endline)
SCIP_Real SCIPinfinity(SCIP *scip)
SCIP_Bool SCIPisGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisFeasIntegral(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPfrac(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
int SCIPgetDepth(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 SCIPgetVarStrongbranchInt(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 SCIPendStrongbranch(SCIP *scip)
SCIP_Real SCIPvarGetUbLocal(SCIP_VAR *var)
const char * SCIPvarGetName(SCIP_VAR *var)
SCIP_Real SCIPvarGetLPSol(SCIP_VAR *var)
SCIP_Real SCIPvarGetLbLocal(SCIP_VAR *var)
SCIP_RETCODE SCIPupdateVarPseudocost(SCIP *scip, SCIP_VAR *var, SCIP_Real solvaldelta, SCIP_Real objdelta, SCIP_Real weight)
SCIP_RETCODE SCIPstartStrongbranch(SCIP *scip, SCIP_Bool enablepropagation)
memory allocation routines
public methods for branching rules
public methods for message output
public methods for branch and bound tree
public methods for problem variables
public methods for branching rule plugins and branching
public methods for the LP relaxation, rows and columns
public methods for memory management
public methods for message handling
public methods for numerical tolerances
public methods for SCIP parameter handling
public methods for global and local (sub)problems
public methods for querying solving statistics
public methods for the branch-and-bound tree
public methods for SCIP variables
struct SCIP_BranchruleData SCIP_BRANCHRULEDATA
enum SCIP_Retcode SCIP_RETCODE
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4