Loading...
Searching...
No Matches
branch_ryanfoster.c
Go to the documentation of this file.
30 * @brief branching rule for original problem in GCG implementing the Ryan and Foster branching scheme
35/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
91 SCIP_CONS* pricecons; /**< constraint enforcing the branching restriction in the pricing problem */
136 SCIPdebugMessage("branchActiveMasterRyanfoster: %s(%s, %s)\n", ( branchdata->same ? "same" : "differ" ),
153 (void) SCIPsnprintf(name, SCIP_MAXSTRLEN, "same(%s,%s)", SCIPvarGetName(branchdata->var1), SCIPvarGetName(branchdata->var2));
162 (void) SCIPsnprintf(name, SCIP_MAXSTRLEN, "differ(%s,%s)", SCIPvarGetName(branchdata->var1), SCIPvarGetName(branchdata->var2));
190 SCIPdebugMessage("branchDeactiveMasterRyanfoster: %s(%s, %s)\n", ( branchdata->same ? "same" : "differ" ),
222 SCIPdebugMessage("branchPropMasterRyanfoster: %s(%s, %s)\n", ( branchdata->same ? "same" : "differ" ),
248 /* if variable belongs to a different block than the branching restriction, we do not have to look at it */
268 /* if branching enforces that both original vars are either both contained or none of them is contained
269 * and the current master variable has different values for both of them, fix the variable to 0 */
285 SCIPdebugMessage("Finished propagation of branching decision constraint: %s(%s, %s), %d vars fixed.\n",
286 ( branchdata->same ? "same" : "differ" ), SCIPvarGetName(branchdata->var1), SCIPvarGetName(branchdata->var2), propcount);
307 SCIPdebugMessage("branchDataDeleteRyanfoster: %s(%s, %s)\n", ( (*branchdata)->same ? "same" : "differ" ),
327/** for the two given original variables, create two Ryan&Foster branching nodes, one for same, one for differ */
393 (void) SCIPsnprintf(samename, SCIP_MAXSTRLEN, "same(%s,%s)", SCIPvarGetName(branchsamedata->var1),
411 (void) SCIPsnprintf(differname, SCIP_MAXSTRLEN, "differ(%s,%s)", SCIPvarGetName(branchsamedata->var1),
415 pricingvar1 = GCGoriginalVarGetPricingVar( !differinf? branchdifferdata->var1 : branchsamedata->var1 );
416 pricingvar2 = GCGoriginalVarGetPricingVar( !differinf? branchdifferdata->var2 : branchsamedata->var2 );
464 1.0, -SCIPinfinity(origprob), 1.0, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE) );
474 GCGconsMasterbranchGetActiveCons(gcg), branchrule, branchsamedata, origbranchconss1, norigvars1,
487 GCGconsMasterbranchGetActiveCons(gcg), branchrule, branchdifferdata, origbranchconss2, norigvars1,
546 /* do not perform Ryan & Foster branching if we have neither a set partitioning nor a set covering structure */
547 if( !GCGisMasterSetCovering(branchruledata->gcg) && !GCGisMasterSetPartitioning(branchruledata->gcg) )
549 SCIPdebugMessage("Not executing Ryan&Foster branching, master is neither set covering nor set partitioning\n");
555 SCIPdebugMessage("Not executing Ryan&Foster branching, node was branched by generic branchrule\n");
584 /* now search for two (fractional) columns mvar1, mvar2 in the master and 2 original variables ovar1, ovar2
615 if( SCIPisZero(origscip, GCGmasterVarGetOrigvals(mvar1)[o1]) || GCGoriginalVarGetNCoefs(ovar1) == 0 )
797 GCGbranchSelectCandidateStrongBranchingRyanfoster(branchruledata->gcg, branchruledata->gcgbranchrule, ovar1s, ovar2s, nspricingblock,
818 SCIP_CALL( createChildNodesRyanfoster(branchruledata->gcg, branchruledata->gcgbranchrule, ovar1, ovar2, GCGvarGetBlock(mvar1), sameinf,
869 /* do not perform Ryan & Foster branching if we have neither a set partitioning nor a set covering structure */
870 if( !GCGisMasterSetCovering(branchruledata->gcg) || !GCGisMasterSetPartitioning(branchruledata->gcg) )
872 SCIPdebugMessage("Not executing Ryanfoster branching, master is neither set covering nor set partitioning\n");
878 SCIPdebugMessage("Not executing Ryanfoster branching, node was branched by generic branchrule\n");
933 SCIP_CALL( createChildNodesRyanfoster(branchruledata->gcg, branchruledata->gcgbranchrule, ovar1, ovar2, GCGvarGetBlock(ovar1), FALSE, FALSE) );
991 SCIP_CALL( GCGrelaxIncludeBranchrule(branchruledata->gcg, &branchrule, &gcgbranchrule, BRANCHRULE_NAME, BRANCHRULE_DESC, BRANCHRULE_PRIORITY,
993 branchDeactiveMasterRyanfoster, branchPropMasterRyanfoster, NULL, branchDataDeleteRyanfoster, NULL, NULL, NULL) );
1004 "should strong branching be used to determine the variables on which the branching is performed?",
1017 "maximum number of output candidates from phase 0 as fraction of total cands during strong branching",
1021 "how much impact should the node gap have on the number of precisely evaluated candidates in phase 1 during strong branching?",
1033 "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
SCIP_RETCODE GCGbranchSelectCandidateStrongBranchingRyanfoster(GCG *gcg, GCG_BRANCHRULE *rfbranchrule, SCIP_VAR **ovar1s, SCIP_VAR **ovar2s, int *nspricingblock, int npairs, SCIP_VAR **ovar1, SCIP_VAR **ovar2, int *pricingblock, SCIP_Bool *sameinf, SCIP_Bool *differinf, SCIP_RESULT *result, SCIP_Bool *stillusestrong)
Definition branch_bpstrong.c:1822
static SCIP_DECL_BRANCHINIT(branchInitBPStrong)
Definition branch_bpstrong.c:1527
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
static SCIP_RETCODE createChildNodesRyanfoster(GCG *gcg, GCG_BRANCHRULE *branchrule, SCIP_VAR *ovar1, SCIP_VAR *ovar2, int blocknr, SCIP_Bool sameinf, SCIP_Bool differinf)
Definition branch_ryanfoster.c:329
SCIP_RETCODE GCGincludeBranchruleRyanfoster(GCG *gcg)
Definition branch_ryanfoster.c:973
branching rule for original problem in GCG implementing the Ryan and Foster branching scheme
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
GCG_BRANCHRULE * GCGconsOrigbranchGetBranchrule(SCIP_CONS *cons)
Definition cons_origbranch.c:605
GCG_BRANCHDATA * GCGconsOrigbranchGetBranchdata(SCIP_CONS *cons)
Definition cons_origbranch.c:592
void GCGconsOrigbranchGetStack(GCG *gcg, SCIP_CONS ***stack, int *nstackelements)
Definition cons_origbranch.c:554
constraint handler for storing the branching decisions at each node of the tree
#define SCIP_MAXSTRLEN
#define SCIP_Bool
#define SCIP_Real
#define TRUE
#define FALSE
GCG interface methods.
SCIP_VAR * GCGoriginalVarGetPricingVar(SCIP_VAR *var)
Definition gcgvar.c:281
SCIP_RETCODE SCIPcreateConsVarbound(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *var, SCIP_VAR *vbdvar, SCIP_Real vbdcoef, 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 SCIP_Bool GCGisMasterSetPartitioning(GCG *gcg)
Definition relax_gcg.c:4366
GCG_EXPORT SCIP * GCGgetPricingprob(GCG *gcg, int pricingprobnr)
Definition relax_gcg.c:4075
GCG_EXPORT SCIP_Bool GCGisMasterSetCovering(GCG *gcg)
Definition relax_gcg.c:4347
int SCIPgetNVars(SCIP *scip)
SCIP_RETCODE SCIPaddCons(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPdelCons(SCIP *scip, SCIP_CONS *cons)
SCIP_VAR ** SCIPgetVars(SCIP *scip)
SCIP_RETCODE SCIPaddConsNode(SCIP *scip, SCIP_NODE *node, SCIP_CONS *cons, SCIP_NODE *validnode)
SCIP_Real SCIPgetLocalTransEstimate(SCIP *scip)
SCIP_RETCODE SCIPgetBoolParam(SCIP *scip, const char *name, SCIP_Bool *value)
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 SCIPsetBoolParam(SCIP *scip, const char *name, SCIP_Bool 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_RETCODE SCIPsetBranchruleCopy(SCIP *scip, SCIP_BRANCHRULE *branchrule, SCIP_DECL_BRANCHCOPY((*branchcopy)))
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)))
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_RETCODE SCIPcreateChild(SCIP *scip, SCIP_NODE **node, SCIP_Real nodeselprio, SCIP_Real estimate)
SCIP_RETCODE SCIPreleaseCons(SCIP *scip, SCIP_CONS **cons)
#define SCIPfreeBlockMemoryArray(scip, ptr, num)
int SCIPcalcMemGrowSize(SCIP *scip, int num)
#define SCIPallocBlockMemoryArray(scip, ptr, num)
#define SCIPreallocBlockMemoryArray(scip, ptr, oldnum, newnum)
#define SCIPfreeBlockMemory(scip, ptr)
#define SCIPallocBlockMemory(scip, ptr)
SCIP_Real SCIPgetSolOrigObj(SCIP *scip, SCIP_SOL *sol)
SCIP_Real SCIPinfinity(SCIP *scip)
SCIP_Bool SCIPisFeasZero(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisZero(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPvarGetUbLocal(SCIP_VAR *var)
SCIP_RETCODE SCIPchgVarUb(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound)
const char * SCIPvarGetName(SCIP_VAR *var)
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)
#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
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_REDUCEDDOM
SCIP_DIDNOTFIND
SCIP_BRANCHED
enum SCIP_Retcode SCIP_RETCODE
struct Scip SCIP
struct SCIP_Node SCIP_NODE
struct SCIP_Var SCIP_VAR