SCIP_BranchruleData
125assert(branchruledata !=
NULL);
126assert(bestvar !=
NULL);
127assert(bestbrpoint !=
NULL);
128assert(bestscore !=
NULL);
129assert(cand !=
NULL);
169 for( i = 0; i < nmultvars; ++i )
177assert(multscalars !=
NULL);
178assert(multscalars[i] != 0.0);
184 if( multscalars[i] > 0.0 )
190aggrvarsol1 = (candsol - maxact) / multscalars[i] + multvarub;
196aggrvarsol2 = (candsol - minact) / multscalars[i] + multvarlb;
204aggrvarsol2 = (candsol - maxact) / multscalars[i] + multvarlb;
210aggrvarsol1 = (candsol - minact) / multscalars[i] + multvarub;
223aggrvarsol = aggrvarsol2;
228aggrvarsol = aggrvarsol1;
230aggrvarsol =
REALABS(aggrvarsol1) <
REALABS(aggrvarsol2) ? aggrvarsol1 : aggrvarsol2;
235multvars[i], candscoremin, candscoremax, candscoresum, candrndscore, aggrvarsol) );
240 for( i = 0; i < nmultvars; ++i )
249multvars[i], candscoremin, candscoremax, candscoresum, candrndscore,
SCIP_INVALID) );
252assert(*bestvar !=
NULL);
271strategy = (branchruledata->strategy ==
'u'? branchruledata->updatestrategy : branchruledata->strategy);
273strategy = (branchruledata->strategy ==
'u'?
'l': branchruledata->strategy);
314deltaminus = deltaplus;
334 SCIPdebugMsg(
scip,
"branching score variable <%s>[%g,%g] = %g; wscore = %g; type=%d bestbrscore=%g\n",
343(*bestscore) = branchscore;
344(*bestrndscore) = candrndscore;
346(*bestbrpoint) = candbrpoint;
364(*bestscore) = branchscore;
365(*bestrndscore) = candrndscore;
367(*bestbrpoint) = candbrpoint;
385(*bestscore) = branchscore;
386(*bestrndscore) = candrndscore;
388(*bestbrpoint) = candbrpoint;
407(*bestscore) = branchscore;
408(*bestrndscore) = candrndscore;
410(*bestbrpoint) = candbrpoint;
425(*bestscore) = branchscore;
426(*bestrndscore) = candrndscore;
428(*bestbrpoint) = candbrpoint;
438 if( candrndscore >= (*bestrndscore) )
440(*bestscore) = branchscore;
441(*bestrndscore) = candrndscore;
443(*bestbrpoint) = candbrpoint;
480assert(brvar !=
NULL);
481assert(brpoint !=
NULL);
490assert(branchruledata !=
NULL);
495 for( i = 0; i < ncands; ++i )
498 SCIPsortPtrInt((
void**)candssorted, candsorigidx, SCIPvarComp, ncands);
500bestbranchscore = -1.0;
503 for( i = 0; i < ncands; ++i )
505cand = candssorted[i];
512scoremin = candsscore[candsorigidx[i]];
515candsol = candssol[candsorigidx[i]];
516 for( j = i+1 ; j < ncands &&
SCIPvarCompare(candssorted[j], cand) == 0; ++j )
518assert(candsscore[candsorigidx[j]] >= 0.0);
519scoresum += candsscore[candsorigidx[j]];
520 if( candsscore[candsorigidx[j]] < scoremin )
521scoremin = candsscore[candsorigidx[j]];
522 else if( candsscore[candsorigidx[j]] > scoremax )
523scoremax = candsscore[candsorigidx[j]];
527candsol = candssol[candsorigidx[j]];
531assert(candssorted[i] == cand);
535scoremin, scoremax, scoresum,
SCIPrandomGetReal(branchruledata->randnumgen, 0.0, 1.0), candsol) );
542 if( (*brvar) ==
NULL)
544 SCIPerrorMessage(
"no branching could be created: all external candidates have huge bounds\n");
564assert(branchrule !=
NULL);
581assert(branchruledata !=
NULL);
601assert(branchruledata !=
NULL);
620assert(branchrule !=
NULL);
623assert(result !=
NULL);
629assert(nlpcands > 0);
634 for( c = 0; c < nlpcands; ++c )
642rootdiff =
REALABS(lpcandssol[c] - rootsolval);
647bestrootdiff = rootdiff;
650assert(0 <= bestcand && bestcand < nlpcands);
655 SCIPdebugMsg(
scip,
" -> %d cands, selected cand %d: variable <%s> (solval=%g, score=%g)\n",
656nlpcands, bestcand,
SCIPvarGetName(lpcands[bestcand]), lpcandssol[bestcand], bestscore);
674 intnprioexterncands;
679assert(branchrule !=
NULL);
682assert(result !=
NULL);
685assert(branchruledata !=
NULL);
691assert(nprioexterncands > 0);
694 if( branchruledata->strategy ==
'u')
711 SCIPdebugMsg(
scip,
"branching on variable <%s>: new intervals: [%g, %g] and [%g, %g]\n",
765assert(branchrule !=
NULL);
778 "strategy for utilizing pseudo-costs of external branching candidates (multiply as in pseudo costs 'u'pdate rule, or by 'd'omain reduction, or by domain reduction of 's'ibling, or by 'v'ariable score)",
782 "weight for minimum of scores of a branching candidate when building weighted sum of min/max/sum of scores",
786 "weight for maximum of scores of a branching candidate when building weighted sum of min/max/sum of scores",
790 "weight for sum of scores of a branching candidate when building weighted sum of min/max/sum of scores",
794 "number of children to create in n-ary branching",
798 "maximal depth where to do n-ary branching, -1 to turn off",
802 "minimal domain width in children when doing n-ary branching, relative to global bounds",
806 "factor of domain width in n-ary branching when creating nodes with increasing distance from branching value",
830assert(branchrule !=
NULL);
static SCIP_DECL_BRANCHFREE(branchFreePscost)
static SCIP_DECL_BRANCHEXECLP(branchExeclpPscost)
#define BRANCHRULE_NCHILDREN_DEFAULT
#define BRANCHRULE_PRIORITY
static SCIP_DECL_BRANCHEXECEXT(branchExecextPscost)
#define BRANCHRULE_NARYMAXDEPTH_DEFAULT
static SCIP_RETCODE selectBranchVar(SCIP *scip, SCIP_BRANCHRULE *branchrule, SCIP_VAR **cands, SCIP_Real *candssol, SCIP_Real *candsscore, int ncands, SCIP_VAR **brvar, SCIP_Real *brpoint)
static SCIP_DECL_BRANCHINIT(branchInitPscost)
#define BRANCHRULE_SCOREMAXWEIGHT_DEFAULT
static SCIP_RETCODE updateBestCandidate(SCIP *scip, SCIP_BRANCHRULEDATA *branchruledata, SCIP_VAR **bestvar, SCIP_Real *bestbrpoint, SCIP_Real *bestscore, SCIP_Real *bestrndscore, SCIP_VAR *cand, SCIP_Real candscoremin, SCIP_Real candscoremax, SCIP_Real candscoresum, SCIP_Real candrndscore, SCIP_Real candsol)
#define BRANCHRULE_RANDSEED_DEFAULT
#define BRANCHRULE_NARYMINWIDTH_DEFAULT
#define WEIGHTEDSCORING(data, min, max, sum)
#define BRANCHRULE_NARYWIDTHFAC_DEFAULT
#define BRANCHRULE_SCOREMINWEIGHT_DEFAULT
#define BRANCHRULE_SCORESUMWEIGHT_DEFAULT
static SCIP_DECL_BRANCHCOPY(branchCopyPscost)
#define BRANCHRULE_STRATEGY_DEFAULT
#define BRANCHRULE_STRATEGIES
#define BRANCHRULE_MAXDEPTH
#define BRANCHRULE_MAXBOUNDDIST
pseudo costs branching rule
SCIP_RETCODE SCIPselectBranchVarPscost(SCIP *scip, SCIP_VAR **branchcands, SCIP_Real *branchcandssol, SCIP_Real *branchcandsscore, int nbranchcands, SCIP_VAR **var, SCIP_Real *brpoint)
SCIP_RETCODE SCIPincludeBranchrulePscost(SCIP *scip)
SCIP_Real SCIPrelDiff(SCIP_Real val1, SCIP_Real val2)
SCIP_RETCODE SCIPaddCharParam(SCIP *scip, const char *name, const char *desc, char *valueptr, SCIP_Bool isadvanced, char defaultvalue, const char *allowedvalues, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
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 SCIPgetCharParam(SCIP *scip, const char *name, char *value)
SCIP_RETCODE SCIPsetBranchruleExecExt(SCIP *scip, SCIP_BRANCHRULE *branchrule, SCIP_DECL_BRANCHEXECEXT((*branchexecext)))
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)))
void SCIPbranchruleSetData(SCIP_BRANCHRULE *branchrule, SCIP_BRANCHRULEDATA *branchruledata)
SCIP_RETCODE SCIPgetExternBranchCands(SCIP *scip, SCIP_VAR ***externcands, SCIP_Real **externcandssol, SCIP_Real **externcandsscore, int *nexterncands, int *nprioexterncands, int *nprioexternbins, int *nprioexternints, int *nprioexternimpls)
SCIP_Real SCIPgetBranchingPoint(SCIP *scip, SCIP_VAR *var, SCIP_Real suggestion)
SCIP_RETCODE SCIPbranchVarValNary(SCIP *scip, SCIP_VAR *var, SCIP_Real val, int n, SCIP_Real minwidth, SCIP_Real widthfactor, int *nchildren)
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)
SCIP_Real SCIPgetBranchScore(SCIP *scip, SCIP_VAR *var, SCIP_Real downgain, SCIP_Real upgain)
#define SCIPallocBufferArray(scip, ptr, num)
#define SCIPfreeBufferArray(scip, ptr)
#define SCIPduplicateBufferArray(scip, ptr, source, num)
#define SCIPfreeBlockMemory(scip, ptr)
#define SCIPallocBlockMemory(scip, ptr)
int SCIPnodeGetDepth(SCIP_NODE *node)
SCIP_Real SCIPgetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var)
SCIP_Bool SCIPisFeasGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Real SCIPinfinity(SCIP *scip)
SCIP_Bool SCIPisIntegral(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisHugeValue(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisFeasLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisSumEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisFeasIntegral(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisNegative(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisSumGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_NODE * SCIPgetCurrentNode(SCIP *scip)
SCIP_Real SCIPvarGetSol(SCIP_VAR *var, SCIP_Bool getlpval)
SCIP_Bool SCIPvarIsActive(SCIP_VAR *var)
SCIP_VARSTATUS SCIPvarGetStatus(SCIP_VAR *var)
SCIP_Real SCIPvarGetUbLocal(SCIP_VAR *var)
SCIP_VAR * SCIPvarGetProbvar(SCIP_VAR *var)
SCIP_VARTYPE SCIPvarGetType(SCIP_VAR *var)
SCIP_Real SCIPvarGetUbGlobal(SCIP_VAR *var)
const char * SCIPvarGetName(SCIP_VAR *var)
SCIP_Real SCIPadjustedVarUb(SCIP *scip, SCIP_VAR *var, SCIP_Real ub)
SCIP_Real SCIPvarGetRootSol(SCIP_VAR *var)
SCIP_Real SCIPgetVarPseudocostVal(SCIP *scip, SCIP_VAR *var, SCIP_Real solvaldelta)
SCIP_Real SCIPadjustedVarLb(SCIP *scip, SCIP_VAR *var, SCIP_Real lb)
SCIP_VAR ** SCIPvarGetMultaggrVars(SCIP_VAR *var)
int SCIPvarGetMultaggrNVars(SCIP_VAR *var)
SCIP_Real SCIPvarGetLbLocal(SCIP_VAR *var)
SCIP_Real SCIPcomputeVarLbLocal(SCIP *scip, SCIP_VAR *var)
SCIP_Real SCIPvarGetLbGlobal(SCIP_VAR *var)
int SCIPvarCompare(SCIP_VAR *var1, SCIP_VAR *var2)
SCIP_Real SCIPcomputeVarUbLocal(SCIP *scip, SCIP_VAR *var)
SCIP_Real SCIPgetVarPseudocostScore(SCIP *scip, SCIP_VAR *var, SCIP_Real solval)
SCIP_Real * SCIPvarGetMultaggrScalars(SCIP_VAR *var)
void SCIPfreeRandom(SCIP *scip, SCIP_RANDNUMGEN **randnumgen)
void SCIPsetRandomSeed(SCIP *scip, SCIP_RANDNUMGEN *randnumgen, unsigned int seed)
SCIP_Real SCIPrandomGetReal(SCIP_RANDNUMGEN *randnumgen, SCIP_Real minrandval, SCIP_Real maxrandval)
SCIP_RETCODE SCIPcreateRandom(SCIP *scip, SCIP_RANDNUMGEN **randnumgen, unsigned int initialseed, SCIP_Bool useglobalseed)
void SCIPsortPtrInt(void **ptrarray, int *intarray, SCIP_DECL_SORTPTRCOMP((*ptrcomp)), int len)
memory allocation routines
public methods for branching rules
public methods for message output
public data structures and miscellaneous methods
methods for sorting joint arrays of various types
public methods for branch and bound tree
public methods for problem variables
public methods for branching rule plugins and branching
public methods for memory management
public methods for message handling
public methods for numerical tolerances
public methods for SCIP parameter handling
public methods for random numbers
public methods for solutions
public methods for the branch-and-bound tree
public methods for SCIP variables
struct SCIP_BranchruleData SCIP_BRANCHRULEDATA
enum SCIP_Retcode SCIP_RETCODE
@ SCIP_VARTYPE_CONTINUOUS
@ SCIP_VARSTATUS_MULTAGGR
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