SCIP_BranchruleData
115assert(branchrule !=
NULL);
133 if( branchruledata->cloudclock !=
NULL)
141ntried = branchruledata->ntried;
142nuseful = branchruledata->nuseful;
143ncloudpoints = branchruledata->ncloudpoints;
144nsavedlps = branchruledata->nsavedlps;
149 SCIPstatisticMessage(
"cloud success rates useful/tried: %8.6g points/useful: %8.6g saved/useful: %8.6g \n",
150ntried == 0 ? -1 : (
SCIP_Real)nuseful / ntried, nuseful == 0 ? -1 : (
SCIP_Real)ncloudpoints / nuseful, nuseful == 0 ? -1 : (
SCIP_Real)nsavedlps / nuseful);
174branchruledata->lastcand = 0;
175branchruledata->nuseful = 0;
176branchruledata->nusefulunions = 0;
177branchruledata->ntried = 0;
178branchruledata->ntriedunions = 0;
179branchruledata->ncloudpoints = 0;
180branchruledata->nsavedlps = 0;
182 if( branchruledata->cloudclock !=
NULL)
230assert(branchrule !=
NULL);
233assert(result !=
NULL);
249assert(nlpcands > 0);
253assert(branchruledata !=
NULL);
256 if( branchruledata->skipdown ==
NULL)
258assert(branchruledata->skipup ==
NULL);
260branchruledata->skipsize = nvars;
275newlpcandsmin =
NULL;
276newlpcandsmax =
NULL;
277 if( branchruledata->useunion &&
SCIPgetDepth(
scip) < branchruledata->maxdepthunion && !branchruledata->onlyF2)
289branchruledata->ntried++;
295 for( i = 0; i < nvars; ++i )
315 for( i = 0; i < nlprows; ++i )
335 if( branchruledata->useunion && !branchruledata->onlyF2 &&
SCIPgetDepth(
scip) < branchruledata->maxdepthunion )
338 for( i = 0; i < ndiscvars; ++i)
343assert(newlpcandsmin !=
NULL);
344assert(newlpcandsmax !=
NULL);
346newlpcandsmin[i] = solval;
347newlpcandsmax[i] = solval;
352 while( newpoint && branchruledata->usecloud )
359 for( i = 0; i < nlpcands; ++i )
419 for( i = 0; i < nlpcands; ++i)
427lpcandsmin[i] =
MIN(lpcandsmin[i], solval);
428lpcandsmax[i] =
MAX(lpcandsmax[i], solval);
431 if( branchruledata->useunion && !branchruledata->onlyF2 &&
SCIPgetDepth(
scip) < branchruledata->maxdepthunion )
434 for( i = 0; i < ndiscvars; ++i)
439assert(newlpcandsmin !=
NULL);
440assert(newlpcandsmax !=
NULL);
442newlpcandsmin[i] =
MIN(newlpcandsmin[i], solval);
443newlpcandsmax[i] =
MAX(newlpcandsmax[i], solval);
450 if( branchruledata->maxpoints != -1 && counter >= branchruledata->maxpoints )
454 SCIPdebugMsg(
scip,
"considered %d additional points in the cloud\n",counter);
460ncomplete = nlpcands;
464branchruledata->ncloudpoints += (counter+1);
465branchruledata->nuseful++;
470 for( i = 0; i < nlpcands; ++i)
474assert(counter <= i);
475lpcandscopy[counter] = lpcandscopy[i];
476lpcandssolcopy[counter] = lpcandssolcopy[i];
477lpcandsfraccopy[counter] = lpcandsfraccopy[i];
483assert(nlpcands - counter > 0);
488 for( i = 0; i < nlpcands && !branchruledata->onlyF2; ++i)
492assert(counter < nlpcands);
493lpcandscopy[counter] = lpcandscopy[i];
494lpcandssolcopy[counter] = lpcandssolcopy[i];
495lpcandsfraccopy[counter] = lpcandsfraccopy[i];
498branchruledata->skipdown[counter] =
TRUE;
500branchruledata->skipup[counter] =
TRUE;
501assert(branchruledata->skipdown[counter] != branchruledata->skipup[counter]);
507 SCIPdebugMsg(
scip,
"can fully skip %d/%d strong branching candidates\n", nlpcands - counter, nlpcands);
508 SCIPdebugMsg(
scip,
"can half skip %d/%d strong branching candidates\n", counter - ncomplete, nlpcands);
514 if( branchruledata->usecloud &&
515branchruledata->ntried > 100 &&
516(
SCIP_Real)branchruledata->nuseful / branchruledata->ntried < branchruledata->minsuccessrate )
519branchruledata->usecloud =
FALSE;
522 if( branchruledata->onlyF2 )
523counter =
MAX(counter,1);
527branchruledata->skipup, counter, counter, ncomplete, &branchruledata->lastcand, 0,
FALSE,
FALSE,
528&bestcand, &bestdown, &bestup, &bestscore, &bestdownvalid, &bestupvalid, &provedbound, result) );
530 if( branchruledata->lastcand <= ncomplete )
532 SCIPdebugMsg(
scip,
"saved %d of %d LPs\n", 2*(nlpcands - ncomplete), 2*nlpcands);
533branchruledata->nsavedlps += 2*(nlpcands - ncomplete);
537 SCIPdebugMsg(
scip,
"saved %d of %d LPs\n", 2*(nlpcands - counter)+counter - ncomplete, 2*nlpcands);
538branchruledata->nsavedlps += 2*(nlpcands - counter)+counter - ncomplete;
552assert(0 <= bestcand && bestcand < nlpcands);
555var = lpcandscopy[bestcand];
556newselected =
FALSE;
559 if( branchruledata->useunion && !branchruledata->onlyF2 &&
SCIPgetDepth(
scip) < branchruledata->maxdepthunion && branchruledata->lastcand > ncomplete )
571 for( i = 0; i < ndiscvars; ++i)
576assert(newlpcandsmin !=
NULL);
577assert(newlpcandsmax !=
NULL);
581newlpcands[counter] = vars[i];
584branchruledata->skipdown[counter] =
TRUE;
586branchruledata->skipup[counter] =
TRUE;
587assert(branchruledata->skipdown[counter] != branchruledata->skipup[counter]);
604branchruledata->ntriedunions++;
607&newcand, &newdown, &newup, &newscore, &newdownvalid, &newupvalid, &newbound, result) );
615 if( newscore > bestscore )
618var = newlpcands[newcand];
621bestdownvalid = newdownvalid;
622bestupvalid = newupvalid;
623bestscore = newscore;
625branchruledata->nusefulunions++;
635 SCIPdebugMsg(
scip,
" -> %d candidates, selected candidate %d: variable <%s> (solval=%g, down=%g, up=%g, score=%g)\n",
636counter, bestcand,
SCIPvarGetName(var), lpcandssolcopy[bestcand], bestdown, bestup, bestscore);
640 SCIPdebugMsg(
scip,
" -> selected from %d new candidates, candidate %d: variable <%s> (down=%g, up=%g, score=%g)\n",
641counter, bestcand,
SCIPvarGetName(var), bestdown, bestup, bestscore);
647assert(downchild !=
NULL);
648assert(upchild !=
NULL);
659 if( allcolsinlp && !exactsolve )
671 if( branchruledata->useunion && !branchruledata->onlyF2 &&
SCIPgetDepth(
scip) < branchruledata->maxdepthunion )
683 if( branchruledata->useunion &&
684branchruledata->ntriedunions > 10 &&
685(
SCIP_Real)branchruledata->nusefulunions / branchruledata->ntriedunions < branchruledata->minsuccessunion )
688branchruledata->useunion =
FALSE;
708branchruledata->lastcand = 0;
709branchruledata->skipsize = 0;
710branchruledata->skipup =
NULL;
711branchruledata->skipdown =
NULL;
718assert(branchrule !=
NULL);
729 "should a cloud of points be used?",
733 "should only F2 be used?",
737 "should the union of candidates be used?",
741 "maximum number of points for the cloud (-1 means no limit)",
745 "minimum success rate for the cloud",
749 "minimum success rate for the union",
753 "maximum depth for the union",
SCIP_RETCODE SCIPselectVarPseudoStrongBranching(SCIP *scip, SCIP_VAR **pseudocands, SCIP_Bool *skipdown, SCIP_Bool *skipup, int npseudocands, int npriopseudocands, int *bestpseudocand, SCIP_Real *bestdown, SCIP_Real *bestup, SCIP_Real *bestscore, SCIP_Bool *bestdownvalid, SCIP_Bool *bestupvalid, SCIP_Real *provedbound, SCIP_RESULT *result)
all variables full strong LP branching rule
static SCIP_DECL_BRANCHINIT(branchInitCloud)
#define BRANCHRULE_PRIORITY
#define DEFAULT_MAXPOINTS
#define DEFAULT_MINSUCCESSUNION
static SCIP_DECL_BRANCHCOPY(branchCopyCloud)
#define DEFAULT_MAXDEPTHUNION
static SCIP_DECL_BRANCHEXECLP(branchExeclpCloud)
#define DEFAULT_MINSUCCESSRATE
static SCIP_DECL_BRANCHFREE(branchFreeCloud)
#define BRANCHRULE_MAXDEPTH
#define BRANCHRULE_MAXBOUNDDIST
full strong LP branching rule
SCIP_RETCODE SCIPselectVarStrongBranching(SCIP *scip, SCIP_VAR **lpcands, SCIP_Real *lpcandssol, SCIP_Real *lpcandsfrac, SCIP_Bool *skipdown, SCIP_Bool *skipup, int nlpcands, int npriolpcands, int ncomplete, int *start, int maxproprounds, SCIP_Bool probingbounds, SCIP_Bool forcestrongbranch, int *bestcand, SCIP_Real *bestdown, SCIP_Real *bestup, SCIP_Real *bestscore, SCIP_Bool *bestdownvalid, SCIP_Bool *bestupvalid, SCIP_Real *provedbound, SCIP_RESULT *result)
SCIP_RETCODE SCIPincludeBranchruleCloud(SCIP *scip)
SCIP_Bool SCIPisExactSolve(SCIP *scip)
int SCIPgetNIntVars(SCIP *scip)
SCIP_RETCODE SCIPgetVarsData(SCIP *scip, SCIP_VAR ***vars, int *nvars, int *nbinvars, int *nintvars, int *nimplvars, int *ncontvars)
int SCIPgetNBinVars(SCIP *scip)
SCIP_RETCODE SCIPupdateNodeLowerbound(SCIP *scip, SCIP_NODE *node, SCIP_Real newbound)
void SCIPwarningMessage(SCIP *scip, 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 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 SCIPsetBranchruleExecLp(SCIP *scip, SCIP_BRANCHRULE *branchrule, SCIP_DECL_BRANCHEXECLP((*branchexeclp)))
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)))
void SCIPbranchruleSetData(SCIP_BRANCHRULE *branchrule, SCIP_BRANCHRULEDATA *branchruledata)
SCIP_RETCODE SCIPgetLPBranchCands(SCIP *scip, SCIP_VAR ***lpcands, SCIP_Real **lpcandssol, SCIP_Real **lpcandsfrac, int *nlpcands, int *npriolpcands, int *nfracimplvars)
SCIP_RETCODE SCIPbranchVar(SCIP *scip, SCIP_VAR *var, SCIP_NODE **downchild, SCIP_NODE **eqchild, SCIP_NODE **upchild)
int SCIPgetNLPBranchCands(SCIP *scip)
SCIP_RETCODE SCIPchgVarLbDive(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound)
SCIP_RETCODE SCIPchgVarUbDive(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound)
SCIP_RETCODE SCIPchgRowLhsDive(SCIP *scip, SCIP_ROW *row, SCIP_Real newlhs)
SCIP_RETCODE SCIPchgRowRhsDive(SCIP *scip, SCIP_ROW *row, SCIP_Real newrhs)
SCIP_RETCODE SCIPstartDive(SCIP *scip)
SCIP_RETCODE SCIPchgVarObjDive(SCIP *scip, SCIP_VAR *var, SCIP_Real newobj)
SCIP_RETCODE SCIPsolveDiveLP(SCIP *scip, int itlim, SCIP_Bool *lperror, SCIP_Bool *cutoff)
SCIP_RETCODE SCIPendDive(SCIP *scip)
SCIP_ROW ** SCIPgetLPRows(SCIP *scip)
int SCIPgetNLPRows(SCIP *scip)
SCIP_LPSOLSTAT SCIPgetLPSolstat(SCIP *scip)
SCIP_Bool SCIPallColsInLP(SCIP *scip)
SCIP_Bool SCIPisLPSolBasic(SCIP *scip)
#define SCIPallocBufferArray(scip, ptr, num)
#define SCIPfreeBufferArray(scip, ptr)
#define SCIPallocBlockMemoryArray(scip, ptr, num)
#define SCIPfreeBlockMemory(scip, ptr)
#define SCIPfreeBlockMemoryArrayNull(scip, ptr, num)
#define SCIPallocBlockMemory(scip, ptr)
SCIP_Real SCIPnodeGetLowerbound(SCIP_NODE *node)
SCIP_Real SCIProwGetLhs(SCIP_ROW *row)
SCIP_Real SCIProwGetRhs(SCIP_ROW *row)
SCIP_Real SCIPgetRowActivity(SCIP *scip, SCIP_ROW *row)
SCIP_Real SCIProwGetDualsol(SCIP_ROW *row)
SCIP_RETCODE SCIPcreateSol(SCIP *scip, SCIP_SOL **sol, SCIP_HEUR *heur)
SCIP_RETCODE SCIPtrySolFree(SCIP *scip, SCIP_SOL **sol, SCIP_Bool printreason, SCIP_Bool completely, SCIP_Bool checkbounds, SCIP_Bool checkintegrality, SCIP_Bool checklprows, SCIP_Bool *stored)
SCIP_RETCODE SCIPlinkLPSol(SCIP *scip, SCIP_SOL *sol)
SCIP_Real SCIPgetSolOrigObj(SCIP *scip, SCIP_SOL *sol)
SCIP_Real SCIPgetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var)
SCIP_Real SCIPgetCutoffbound(SCIP *scip)
SCIP_RETCODE SCIPcreateClock(SCIP *scip, SCIP_CLOCK **clck)
SCIP_RETCODE SCIPresetClock(SCIP *scip, SCIP_CLOCK *clck)
SCIP_RETCODE SCIPstopClock(SCIP *scip, SCIP_CLOCK *clck)
SCIP_RETCODE SCIPfreeClock(SCIP *scip, SCIP_CLOCK **clck)
SCIP_Real SCIPgetClockTime(SCIP *scip, SCIP_CLOCK *clck)
SCIP_RETCODE SCIPstartClock(SCIP *scip, SCIP_CLOCK *clck)
SCIP_Real SCIPinfinity(SCIP *scip)
SCIP_Bool SCIPisIntegral(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisFeasEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisFeasZero(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPfloor(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisFeasIntegral(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPfrac(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPceil(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisZero(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
int SCIPgetDepth(SCIP *scip)
SCIP_Real SCIPvarGetSol(SCIP_VAR *var, SCIP_Bool getlpval)
SCIP_VARTYPE SCIPvarGetType(SCIP_VAR *var)
const char * SCIPvarGetName(SCIP_VAR *var)
SCIP_Real SCIPgetVarRedcost(SCIP *scip, SCIP_VAR *var)
memory allocation routines
#define BMScopyMemoryArray(ptr, source, num)
#define BMSclearMemoryArray(ptr, num)
public methods for branching rules
public methods for LP management
public methods for message output
#define SCIPstatisticMessage
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 solutions
public methods for querying solving statistics
public methods for timing
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