assert(bestvar !=
NULL);
71assert(bestscore !=
NULL);
72assert(bestobj !=
NULL);
73assert(*bestobj >= 0.0);
74assert(cand !=
NULL);
114 for( i = 0; i < nmultvars; ++i )
122assert(multscalars !=
NULL);
123assert(multscalars[i] != 0.0);
129 if( multscalars[i] > 0.0 )
135aggrvarsol1 = (candsol - maxact) / multscalars[i] + multvarub;
141aggrvarsol2 = (candsol - minact) / multscalars[i] + multvarlb;
149aggrvarsol2 = (candsol - maxact) / multscalars[i] + multvarlb;
155aggrvarsol1 = (candsol - minact) / multscalars[i] + multvarub;
168aggrvarsol = aggrvarsol2;
173aggrvarsol = aggrvarsol1;
175aggrvarsol =
REALABS(aggrvarsol1) <
REALABS(aggrvarsol2) ? aggrvarsol1 : aggrvarsol2;
180multvars[i], candscore, aggrvarsol);
185 for( i = 0; i < nmultvars; ++i )
197assert(*bestvar !=
NULL);
210*bestscore = candscore;
225assert(branchrule !=
NULL);
250assert(branchrule !=
NULL);
253assert(result !=
NULL);
259assert(nlpcands > 0);
265 for( i = 0; i < nlpcands; ++i )
267assert(lpcands[i] !=
NULL);
269infeasibility = lpcandsfrac[i];
270infeasibility =
MIN(infeasibility, 1.0-infeasibility);
271score = 1.0 - infeasibility;
276|| (
SCIPisGE(
scip, score, bestscore) && obj > bestobj) )
283assert(bestcand >= 0);
285 SCIPdebugMsg(
scip,
" -> %d candidates, selected candidate %d: variable <%s> (frac=%g, obj=%g, factor=%g, score=%g)\n",
286nlpcands, bestcand,
SCIPvarGetName(lpcands[bestcand]), lpcandsfrac[bestcand], bestobj,
315assert(branchrule !=
NULL);
318assert(result !=
NULL);
324assert(nexterncands > 0);
331 for( i = 0; i < nexterncands; ++i )
333 updateBestCandidate(
scip, &bestcand, &bestscore, &bestobj, &bestsol, externcands[i], externcandsscore[i], externcandssol[i]);
336 if( bestcand ==
NULL)
338 SCIPerrorMessage(
"branchExecextLeastinf failed to select a branching variable from %d candidates\n", nexterncands);
345 SCIPdebugMsg(
scip,
" -> %d candidates, selected variable <%s> (infeas=%g, obj=%g, factor=%g, score=%g), branching point=%g\n",
352 if( downchild !=
NULL|| eqchild !=
NULL|| upchild !=
NULL)
382assert(branchrule !=
NULL);
#define BRANCHRULE_PRIORITY
static SCIP_DECL_BRANCHEXECLP(branchExeclpLeastinf)
static void updateBestCandidate(SCIP *scip, SCIP_VAR **bestvar, SCIP_Real *bestscore, SCIP_Real *bestobj, SCIP_Real *bestsol, SCIP_VAR *cand, SCIP_Real candscore, SCIP_Real candsol)
static SCIP_DECL_BRANCHEXECEXT(branchExecextLeastinf)
static SCIP_DECL_BRANCHCOPY(branchCopyLeastinf)
#define BRANCHRULE_MAXDEPTH
#define BRANCHRULE_MAXBOUNDDIST
least infeasible LP branching rule
SCIP_RETCODE SCIPincludeBranchruleLeastinf(SCIP *scip)
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_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_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 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 SCIPbranchVar(SCIP *scip, SCIP_VAR *var, SCIP_NODE **downchild, SCIP_NODE **eqchild, SCIP_NODE **upchild)
SCIP_Bool SCIPisFeasGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Real SCIPinfinity(SCIP *scip)
SCIP_Bool SCIPisGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisFeasLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPvarIsActive(SCIP_VAR *var)
SCIP_VARSTATUS SCIPvarGetStatus(SCIP_VAR *var)
SCIP_Real SCIPvarGetUbLocal(SCIP_VAR *var)
SCIP_Real SCIPvarGetObj(SCIP_VAR *var)
SCIP_VAR * SCIPvarGetProbvar(SCIP_VAR *var)
const char * SCIPvarGetName(SCIP_VAR *var)
SCIP_Real SCIPvarGetBranchFactor(SCIP_VAR *var)
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 SCIPcomputeVarUbLocal(SCIP *scip, SCIP_VAR *var)
SCIP_Real * SCIPvarGetMultaggrScalars(SCIP_VAR *var)
public methods for branching rules
public methods for message output
public methods for problem variables
public methods for branching rule plugins and branching
public methods for message handling
public methods for numerical tolerances
public methods for SCIP variables
enum SCIP_Retcode SCIP_RETCODE
@ 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