Loading...
Searching...
No Matches
branch_orig.c
Go to the documentation of this file.
38/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
118 * iter = 0 and branchcand is an integer variable belonging to a unique block with fractional value, or
119 * iter = 1 and branchcand is an integer variable that belongs to no block but was directly transferred to the
139 if (!GCGoriginalVarIsLinking(branchcand) && GCGgetNIdenticalBlocks(gcg, GCGvarGetBlock(branchcand)) != 1)
182 * if solution value is integral, the bounds of x are finite, then two child nodes will be created
186 * if solution value is equal to one of the bounds and the other bound is infinite, only two child nodes
215 assert(strcmp(SCIPbranchruleGetName(GCGbranchGetScipBranchrule(branchrule)), BRANCHRULE_NAME) == 0);
233 /* if there was no explicit value given for branching, the variable has a finite domain and the current LP/pseudo
270 SCIPdebugMessage("integral branch on variable <%s> with value %g, priority %d (current lower bound: %g)\n",
341 GCGconsMasterbranchGetActiveCons(gcg), branchrule, branchdata, origbranchconss, norigbranchconss,
403 GCGconsMasterbranchGetActiveCons(gcg), branchrule, branchdata, origbranchconss, norigbranchconss,
464 GCGconsMasterbranchGetActiveCons(gcg), branchrule, branchdata, origbranchconss, norigbranchconss,
472/* Evaluates the given variable based on a score function of choice. Higher scores are given to better
530 assert(strcmp(SCIPbranchruleGetName(GCGbranchGetScipBranchrule(branchrule)), BRANCHRULE_NAME) == 0);
544 SCIP_CALL( SCIPgetExternBranchCands(origprob, &branchcands, &branchcandssol, NULL, &nbranchcands,
560 * iter = 1: we did not find enough variables to branch on so far, so we look for integer variables that
562 * but were directly transferred to the master problem and which have a fractional value in the current
574 SCIP_CALL( score_function(origprob, branchruledata, branchcands[i], branchcandssol[i], &score) );
609 SCIP_CALL( GCGbranchSelectCandidateStrongBranchingOrig(gcg, branchrule, &branchvar, &upinf, &downinf, result,
652 /* branching restrictions are enforced by variable bounds, this is done automatically, so we can abort here */
874 SCIP_CALL( SCIPgetPseudoBranchCands(origprob, &branchcands, &nbranchcands, &npriobranchcands) );
885 if( GCGvarGetBlock(branchcands[i]) <= -1 || GCGgetNIdenticalBlocks(branchruledata->gcg, GCGvarGetBlock(branchcands[i])) != 1 )
911 /* we did not find a variable to branch on so far, so we look for an unfixed linking variable or an integer variable
1018 SCIP_CALL( GCGrelaxIncludeBranchrule(branchruledata->gcg, &branchrule, &gcgbranchrule, BRANCHRULE_NAME, BRANCHRULE_DESC, BRANCHRULE_PRIORITY,
1020 branchDeactiveMasterOrig, branchPropMasterOrig, branchMasterSolvedOrig, branchDataDeleteOrig, NULL, NULL, NULL) );
1042 "should branching be performed on the most fractional variable? (only if usepseudocosts = FALSE)",
1046 "should the variable on which the branching is performed be selected randomly? (only if usepseudocosts = mostfrac = FALSE)",
1050 "should strong branching with propagation be used to determine the variable on which the branching is performed? (only if usepseudocosts = mostfrac = random = FALSE)",
1054 "should strong branching be used to determine the variable on which the branching is performed?",
1067 "maximum number of output candidates from phase 0 as fraction of total cands during strong branching",
1071 "how much impact should the node gap have on the number of precisely evaluated candidates in phase 1 during strong branching?",
1083 "maximum number of output candidates from phase 1 as fraction of phase 1 cands during strong branching",
static SCIP_DECL_BRANCHFREE(branchFreeBPStrong)
Definition branch_bpstrong.c:1489
static SCIP_Real score_function(GCG *gcg, SCIP_BRANCHRULE *branchrule, SCIP_VAR *var1, SCIP_VAR *var2, SCIP_Real solval1, SCIP_Real solval2, int candinfo, SCIP_Bool useheuristic, SCIP_Bool usehistorical, SCIP_Bool usecolgen, SCIP_Real *score, SCIP_Bool *upinf, SCIP_Bool *downinf)
Definition branch_bpstrong.c:745
static SCIP_DECL_BRANCHINIT(branchInitBPStrong)
Definition branch_bpstrong.c:1527
SCIP_RETCODE GCGbranchSelectCandidateStrongBranchingOrig(GCG *gcg, GCG_BRANCHRULE *origbranchrule, SCIP_VAR **branchvar, SCIP_Bool *upinf, SCIP_Bool *downinf, SCIP_RESULT *result, SCIP_Bool *stillusestrong)
Definition branch_bpstrong.c:1766
generic branch and price strong branching as described in Pecin, D., Pessoa, A., Poggi,...
static SCIP_DECL_BRANCHEXECLP(branchExeclpCompBnd)
Definition branch_compbnd.c:1838
static SCIP_DECL_BRANCHEXECEXT(branchExecextCompBnd)
Definition branch_compbnd.c:1892
static SCIP_DECL_BRANCHEXECPS(branchExecpsCompBnd)
Definition branch_compbnd.c:1908
GCG_BOUNDTYPE GCGbranchOrigGetBoundtype(GCG_BRANCHDATA *branchdata)
Definition branch_orig.c:1104
static SCIP_Bool getUniqueBlockFlagForIter(GCG *gcg, SCIP_VAR *branchcand, int iter)
Definition branch_orig.c:123
SCIP_Real GCGbranchOrigGetNewbound(GCG_BRANCHDATA *branchdata)
Definition branch_orig.c:1114
static SCIP_RETCODE branchVar(GCG *gcg, GCG_BRANCHRULE *branchrule, SCIP_VAR *branchvar, SCIP_Real solval, SCIP_Bool upinf, SCIP_Bool downinf)
Definition branch_orig.c:190
static SCIP_RETCODE branchExtern(GCG *gcg, GCG_BRANCHRULE *branchrule, SCIP_RESULT *result)
Definition branch_orig.c:504
SCIP_RETCODE GCGbranchOrigUpdateExternBranchcands(GCG *gcg)
Definition branch_orig.c:1124
SCIP_VAR * GCGbranchOrigGetOrigvar(GCG_BRANCHDATA *branchdata)
Definition branch_orig.c:1094
branching rule for original problem in GCG
SCIP_RETCODE GCGgetRelpsprobBranchVar(GCG *gcg, SCIP_VAR **branchcands, SCIP_Real *branchcandssol, int nbranchcands, int nvars, SCIP_RESULT *result, SCIP_VAR **branchvar)
Definition branch_relpsprob.c:1547
reliable pseudo costs branching rule
SCIP_BRANCHRULEDATA * GCGbranchGetScipBranchruledata(GCG_BRANCHRULE *branchrule)
Definition branchgcg.c:113
SCIP_BRANCHRULE * GCGbranchGetScipBranchrule(GCG_BRANCHRULE *branchrule)
Definition branchgcg.c:102
constraint handler for the integrality constraint
SCIP_CONS * GCGconsMasterbranchGetActiveCons(GCG *gcg)
Definition cons_masterbranch.c:3056
SCIP_Bool GCGcurrentNodeIsGeneric(GCG *gcg)
Definition cons_masterbranch.c:3202
SCIP_RETCODE GCGcreateConsMasterbranch(GCG *gcg, SCIP_CONS **cons, const char *name, SCIP_NODE *node, SCIP_CONS *parentcons, GCG_BRANCHRULE *branchrule, GCG_BRANCHDATA *branchdata, SCIP_CONS **origbranchconss, int norigbranchconss, int maxorigbranchconss)
Definition cons_masterbranch.c:2670
constraint handler for storing the branching decisions at each node of the tree
constraint handler for storing the branching decisions at each node of the tree
#define SCIP_MAXSTRLEN
#define SCIP_INVALID
#define SCIP_Bool
#define MIN(x, y)
#define SCIP_Real
#define TRUE
#define FALSE
GCG interface methods.
SCIP_RETCODE GCGlinkingVarGetBlocks(SCIP_VAR *var, int nblocks, int *blocks)
Definition gcgvar.c:529
SCIP_RETCODE SCIPaddCoefLinear(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real val)
SCIP_RETCODE SCIPcreateConsLinear(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Real *vals, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)
GCG_EXPORT int GCGgetNIdenticalBlocks(GCG *gcg, int pricingprobnr)
Definition relax_gcg.c:4185
SCIP_STAGE SCIPgetStage(SCIP *scip)
int SCIPgetNVars(SCIP *scip)
SCIP_VAR ** SCIPgetVars(SCIP *scip)
SCIP_RETCODE SCIPaddConsNode(SCIP *scip, SCIP_NODE *node, SCIP_CONS *cons, SCIP_NODE *validnode)
SCIP_Real SCIPgetLocalLowerbound(SCIP *scip)
SCIP_Real SCIPgetLocalTransEstimate(SCIP *scip)
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 SCIPsetBranchruleExecExt(SCIP *scip, SCIP_BRANCHRULE *branchrule, SCIP_DECL_BRANCHEXECEXT((*branchexecext)))
SCIP_RETCODE SCIPsetBranchruleExecLp(SCIP *scip, SCIP_BRANCHRULE *branchrule, SCIP_DECL_BRANCHEXECLP((*branchexeclp)))
SCIP_RETCODE SCIPsetBranchruleExecPs(SCIP *scip, SCIP_BRANCHRULE *branchrule, SCIP_DECL_BRANCHEXECPS((*branchexecps)))
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_RETCODE SCIPaddExternBranchCand(SCIP *scip, SCIP_VAR *var, SCIP_Real score, SCIP_Real solval)
void SCIPclearExternBranchCands(SCIP *scip)
int SCIPgetNExternBranchCands(SCIP *scip)
SCIP_RETCODE SCIPgetPseudoBranchCands(SCIP *scip, SCIP_VAR ***pseudocands, int *npseudocands, int *npriopseudocands)
SCIP_RETCODE SCIPcreateChild(SCIP *scip, SCIP_NODE **node, SCIP_Real nodeselprio, SCIP_Real estimate)
SCIP_RETCODE SCIPreleaseCons(SCIP *scip, SCIP_CONS **cons)
int SCIPcalcMemGrowSize(SCIP *scip, int num)
#define SCIPallocBufferArray(scip, ptr, num)
#define SCIPallocBlockMemoryArray(scip, ptr, num)
#define SCIPfreeBlockMemory(scip, ptr)
#define SCIPfreeBlockMemoryNull(scip, ptr)
#define SCIPallocBlockMemory(scip, ptr)
SCIP_Bool SCIPisFeasGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Real SCIPinfinity(SCIP *scip)
SCIP_Real SCIPfeasCeil(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPfloor(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPfeasFloor(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 SCIPisFeasIntegral(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPceil(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_NODE * SCIPgetCurrentNode(SCIP *scip)
SCIP_Real SCIPvarGetUbLocal(SCIP_VAR *var)
SCIP_VARTYPE SCIPvarGetType(SCIP_VAR *var)
const char * SCIPvarGetName(SCIP_VAR *var)
SCIP_Real SCIPgetRelaxSolVal(SCIP *scip, SCIP_VAR *var)
SCIP_Bool SCIPisRelaxSolValid(SCIP *scip)
SCIP_Real SCIPvarGetLbLocal(SCIP_VAR *var)
SCIP_RETCODE SCIPupdateVarPseudocost(SCIP *scip, SCIP_VAR *var, SCIP_Real solvaldelta, SCIP_Real objdelta, SCIP_Real weight)
int SCIPvarGetBranchPriority(SCIP_VAR *var)
SCIP_Real SCIPgetVarPseudocostScore(SCIP *scip, SCIP_VAR *var, SCIP_Real solval)
int SCIPsnprintf(char *t, int len, const char *s,...)
static assert(heur !=NULL)
SCIP_CALL(SCIPgetExternBranchCands(origprob, &lpcands, &lpcandssol, NULL, &nlpcands, NULL, NULL, NULL, NULL))
SCIPdebugMessage("feasibility pump finished [%d iterations done].\n", nloops)
SCIPfreeBufferArray(scip, &cycles)
#define NULL
Definition class_conspartition.cpp:44
GCG variable pricer.
SCIP_RETCODE GCGrelaxIncludeBranchrule(GCG *gcg, SCIP_BRANCHRULE **branchrule, GCG_BRANCHRULE **gcgbranchrule, const char *name, const char *desc, int priority, int maxdepth, SCIP_Real maxbounddist, SCIP_BRANCHRULEDATA *branchruledata, GCG_DECL_BRANCHACTIVEMASTER((*branchactivemaster)), GCG_DECL_BRANCHDEACTIVEMASTER((*branchdeactivemaster)), GCG_DECL_BRANCHPROPMASTER((*branchpropmaster)), GCG_DECL_BRANCHMASTERSOLVED((*branchmastersolved)), GCG_DECL_BRANCHDATADELETE((*branchdatadelete)), GCG_DECL_BRANCHNEWCOL((*branchnewcol)), GCG_DECL_BRANCHGETEXTENDEDMASTERCONS((*branchgetextendedmastercons)),)
Definition relax_gcg.c:3717
SCIP_RETCODE GCGrelaxTransOrigToMasterCons(GCG *gcg, SCIP_CONS *cons, SCIP_CONS **transcons)
Definition relax_gcg.c:3982
GCG relaxator.
Definition branch_bpstrong.c:110
Definition branch_bpstrong.c:128
struct SCIP_Branchrule SCIP_BRANCHRULE
struct SCIP_BranchruleData SCIP_BRANCHRULEDATA
type definitions for branching rules in GCG projects
struct SCIP_Cons SCIP_CONS
SCIP_DIDNOTRUN
SCIP_CUTOFF
SCIP_DIDNOTFIND
SCIP_BRANCHED
enum SCIP_Result SCIP_RESULT
enum SCIP_Retcode SCIP_RETCODE
struct Scip SCIP
SCIP_STAGE_SOLVING
struct SCIP_Node SCIP_NODE
struct SCIP_Var SCIP_VAR
SCIP_VARTYPE_INTEGER