Loading...
Searching...
No Matches
branch_compbnd.c
Go to the documentation of this file.
37 * On Dantzig-Wolfe decomposition in integer programming and ways to perform branching in a branch-and-price algorithm.
48/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
95 int constant; /**< constant value of the branching constraint in the master problem - either lhs or rhs, depending on branchtype */
96 GCG_COMPBND* compBndSeq; /**< component bound sequence which induce the current branching constraint */
98 int blocknr; /**< id of the pricing problem (or block) to which this branching constraint belongs */
99 int nvars; /**< number of master variables the last time the node has been visited - neccessary to later include newly generated master variables */
100 GCG_EXTENDEDMASTERCONSDATA* mastercons; /**< master constraint along with its corresponding inferred pricing modifications */
106#define CHOOSE_COMPBND(x) SCIP_RETCODE x (GCG* gcg, SCIP_VAR** satisfyingMastervars, int satisfyingMastervarsSize, SCIP_VAR** indexSet, int indexSetSize, GCG_COMPBND* compBndSeq, int compBndSeqSize, int blocknr, SCIP_VAR** selectedOrigvar, SCIP_Real* value)
109#define CHOOSE_COMPBNDSEQ(x) SCIP_RETCODE x (GCG* gcg, GCG_COMPBND** compBndSeqList, int* compBndSeqSizeList, int compBndListSize, int blocknr, GCG_COMPBND** selectedCompBndSeq, int* selectedCompBndSeqSize)
141 int constant, /**< constant value of the branching constraint in the master problem - either lhs or rhs, depending on branchtype */
142 GCG_COMPBND* compBndSeq, /**< component bound sequence which induce the current branching constraint */
158 SCIP_CALL( SCIPduplicateBlockMemoryArray(scip, &((*nodebranchdata)->compBndSeq), compBndSeq, compBndSeqSize));
163/** simplify a component bound sequence by strengthening bounds of the same sense on the same component */
224 SCIP_CALL( SCIPreallocBlockMemoryArray(scip, &newCompBndSeq, newCompBndSeqSize, newCompBndSeqSize+1) );
322 if ( (compBndSeq[i].sense == GCG_COMPBND_SENSE_GE && !SCIPisGE(scip, generatorentry, compBndSeq[i].bound)) ||
323 (compBndSeq[i].sense == GCG_COMPBND_SENSE_LE && !SCIPisLE(scip, generatorentry, compBndSeq[i].bound)) )
355 if ( (compBndSeq[i].sense == GCG_COMPBND_SENSE_GE && !SCIPisGE(scip, generatorentry, compBndSeq[i].bound)) ||
356 (compBndSeq[i].sense == GCG_COMPBND_SENSE_LE && !SCIPisLE(scip, generatorentry, compBndSeq[i].bound)) )
387 SCIP_CALL( GCGbranchGetExtendedmasterconsCoeff(gcg, branchdata->mastercons, origvars, origvals, norigvars, GCGvarGetBlock(mastervar), NULL, &coef) );
391 SCIPdebugMessage("Adding variable %s to branching constraint: %s %d\n", SCIPvarGetName(mastervar), branchdata->branchtype == GCG_BRANCH_DOWN ? "<=" : ">=", branchdata->constant);
417 if( !isColInCompBndSeq(masterprob, solvars, solvals, nsolvars, branchdata->compBndSeq, branchdata->compBndSeqSize) )
451 GCG_PRICINGMODIFICATION** pricingmods; // will always only contain one element in this branching rule
476 (void) SCIPsnprintf(name, SCIP_MAXSTRLEN, "compbnd_%d_child(%d_LE_%d)", uuid, branchdata->compBndSeqSize, branchdata->constant);
478 -SCIPinfinity(masterprob), (SCIP_Real) branchdata->constant, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE) );
482 (void) SCIPsnprintf(name, SCIP_MAXSTRLEN, "compbnd_%d_child(%d_GE_%d)", uuid, branchdata->compBndSeqSize, branchdata->constant);
484 (SCIP_Real) branchdata->constant, SCIPinfinity(masterprob), TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE) );
507 SCIP_CALL( GCGcreateInferredPricingVar(pricingscip, &coefvar, pricingvarname, 0.0, 1.0, TRUE, 0.0, SCIP_VARTYPE_BINARY, branchdata->blocknr) );
519 (void) SCIPsnprintf(pricingvarname, SCIP_MAXSTRLEN, "y(%s,%s_%s_%d)", name, SCIPvarGetName(branchdata->compBndSeq[i].component), branchdata->compBndSeq[i].sense == GCG_COMPBND_SENSE_GE ? "GE" : "LE", branchdata->compBndSeq[i].bound);
520 SCIP_CALL( GCGcreateInferredPricingVar(pricingscip, &additionalvars[i], pricingvarname, 0.0, 1.0, FALSE, 0.0, SCIP_VARTYPE_BINARY, branchdata->blocknr) );
533 SCIP_CALL( SCIPcreateConsLinear(pricingscip, &additionalcons[0], consname, 0, NULL, NULL, (SCIP_Real) (1 - branchdata->compBndSeqSize), SCIPinfinity(pricingscip),
543 (void) SCIPsnprintf(consname, SCIP_MAXSTRLEN, "c(y(%s,%s_%s_%d))", name, SCIPvarGetName(branchdata->compBndSeq[i].component), branchdata->compBndSeq[i].sense == GCG_COMPBND_SENSE_GE ? "GE" : "LE", branchdata->compBndSeq[i].bound);
554 SCIP_CALL( SCIPcreateConsVarbound(pricingscip, &additionalcons[i+1], consname, pricing_var, additionalvars[i], bound - lowerbound, bound, SCIPinfinity(pricingscip),
567 SCIP_CALL( SCIPcreateConsVarbound(pricingscip, &additionalcons[i+1], consname, pricing_var, additionalvars[i], bound - upperbound, -SCIPinfinity(pricingscip), bound,
582 (void) SCIPsnprintf(consname, SCIP_MAXSTRLEN, "c(g(%s,%s))", name, SCIPvarGetName(additionalvars[i]));
583 SCIP_CALL( SCIPcreateConsVarbound(pricingscip, &additionalcons[i], consname, additionalvars[i], coefvar, -1.0, 0.0, SCIPinfinity(pricingscip),
589 (void) SCIPsnprintf(consname, SCIP_MAXSTRLEN, "c1(y(%s,%s_%s_%d))", name, SCIPvarGetName(branchdata->compBndSeq[i].component), branchdata->compBndSeq[i].sense == GCG_COMPBND_SENSE_GE ? "GE" : "LE", branchdata->compBndSeq[i].bound);
600 SCIP_CALL( SCIPcreateConsVarbound(pricingscip, &additionalcons[i+branchdata->compBndSeqSize], consname, pricing_var, additionalvars[i], upperbound - bound, -SCIPinfinity(pricingscip), upperbound,
613 SCIP_CALL( SCIPcreateConsVarbound(pricingscip, &additionalcons[i+branchdata->compBndSeqSize], consname, pricing_var, additionalvars[i], lowerbound - bound, lowerbound, SCIPinfinity(pricingscip),
634 SCIP_CALL( GCGbranchCreateExtendedmastercons(gcg, branchruledata->gcgbranchrule, &branchdata->mastercons, branchcons, pricingmods, 1, branchdata) );
677 SCIPdebugMessage("Component bound branching rule Node creation for blocknr %d with %d identical blocks \n", blocknr, GCGgetNIdenticalBlocks(gcg, blocknr));
682 /* determine the constant value of the master constraint, i.e. the rhs for the down branch, and lhs for the up branch */
697 // sanity check: the sum must be fractional, otherwise something went wrong during separation, i.e. compBndSeq is incorrect
702 SCIP_CALL( initNodeBranchdata(masterprob, &downBranchData, GCG_BRANCH_DOWN, FLOOR(origprob, constantSum), compBndSeq, compBndSeqSize, blocknr) );
703 SCIP_CALL( initNodeBranchdata(masterprob, &upBranchData, GCG_BRANCH_UP, CEIL(origprob, constantSum), compBndSeq, compBndSeqSize, blocknr) );
711 (void) SCIPsnprintf(downChildname, SCIP_MAXSTRLEN, "node(%d) (last comp=%s %s %d) <= %d", blocknr,
713 downBranchData->compBndSeq[downBranchData->compBndSeqSize-1].sense == GCG_COMPBND_SENSE_GE ? ">=": "<=",
716 (void) SCIPsnprintf(upChildname, SCIP_MAXSTRLEN, "node(%d) (last comp=%s %s %d) >= %d", blocknr,
718 upBranchData->compBndSeq[upBranchData->compBndSeqSize-1].sense == GCG_COMPBND_SENSE_GE ? ">=": "<=",
723 SCIP_CALL( SCIPcreateChild(masterprob, &downChild, 0.0, SCIPgetLocalTransEstimate(masterprob)) );
774 * the index set denotes the set of all integral original variables contained in the provided master variables
781 SCIP_VAR** mastervars, /**< mastervariables currently satisfying the component bound sequence in the specified block */
926 SCIP_VAR** satisfyingMastervars, /**< mastervariables currently satisfying the component bound sequence in the specified block */
947 // Sanity check: All variables in satisfyingMastervars must satisfy the component bound sequence
951 assert(isMasterVarInCompBndSeq(masterprob, satisfyingMastervars[i], compBndSeq, compBndSeqSize, blocknr));
958 if( SCIPisEQ(masterprob, fractionality, 0.0) ) // should never happen - the branching scheme is sound and complete
985 SCIP_CALL( SCIPreallocBlockMemoryArray(masterprob, foundCompBndSeqList, *foundCompBndSeqListSize, *foundCompBndSeqListSize + 1) );
986 SCIP_CALL( SCIPreallocBlockMemoryArray(masterprob, foundCompBndSeqSizeList, *foundCompBndSeqListSize, *foundCompBndSeqListSize + 1) );
998 SCIP_CALL( initIndexSet(masterprob, &indexSet, &indexSetSize, satisfyingMastervars, satisfyingMastervarsSize) );
1002 SCIP_CALL( chooseCompBnd(gcg, satisfyingMastervars, satisfyingMastervarsSize, indexSet, indexSetSize, compBndSeq, compBndSeqSize, blocknr, &selectedOrigvar, &value) );
1004 assert(SCIPvarGetLbGlobal(selectedOrigvar) < value && value < SCIPvarGetUbGlobal(selectedOrigvar));
1024 lowCompBndSeq[compBndSeqSize] = (GCG_COMPBND){selectedOrigvar, GCG_COMPBND_SENSE_LE, FLOOR(masterprob, value)};
1025 highCompBndSeq[compBndSeqSize] = (GCG_COMPBND){selectedOrigvar, GCG_COMPBND_SENSE_GE, FLOOR(masterprob, value) + 1};
1033 SCIPdebugMessage("lowCompBndSeq[%d]: %s %s %d\n", i, SCIPvarGetName(lowCompBndSeq[i].component),
1036 SCIPdebugMessage("highCompBndSeq[%d]: %s %s %d\n", i, SCIPvarGetName(highCompBndSeq[i].component),
1041 // assign the master variables to lowMastervars and highMastervars, depending on whether they satisfy the new component bound sequences
1052 if( isMasterVarInCompBndSeq(masterprob, satisfyingMastervars[i], lowCompBndSeq, newCompBndSeqSize, blocknr) )
1058 SCIP_CALL( SCIPreallocBlockMemoryArray(masterprob, &lowMastervars, lowMastervarsSize, lowMastervarsSize+1) );
1066 if( isMasterVarInCompBndSeq(masterprob, satisfyingMastervars[i], highCompBndSeq, newCompBndSeqSize, blocknr) )
1072 SCIP_CALL( SCIPreallocBlockMemoryArray(masterprob, &highMastervars, highMastervarsSize, highMastervarsSize+1) );
1084 SCIPdebugMessage("lowMastervarsSize: %d, highMastervarsSize: %d\n", lowMastervarsSize, highMastervarsSize);
1095 assert(SCIPisLE(masterprob, fractionality / 2, fractionality1) || SCIPisLE(masterprob, fractionality / 2, fractionality2));
1097 (SCIPisFeasIntegral(masterprob, fractionality1) && SCIPisFeasIntegral(masterprob, fractionality2)) ||
1098 (!SCIPisFeasIntegral(masterprob, fractionality1) && !SCIPisFeasIntegral(masterprob, fractionality2))
1103 SCIP_CALL( separation_helper(gcg, lowMastervars, lowMastervarsSize, lowCompBndSeq, newCompBndSeqSize, blocknr, chooseCompBnd, foundCompBndSeqList, foundCompBndSeqSizeList, foundCompBndSeqListSize, result) );
1109 SCIP_CALL( separation_helper(gcg, highMastervars, highMastervarsSize, highCompBndSeq, newCompBndSeqSize, blocknr, chooseCompBnd, foundCompBndSeqList, foundCompBndSeqSizeList, foundCompBndSeqListSize, result) );
1118/** collects all currently mastervariables in the given block that satisfy the given component bound sequence */
1122 SCIP_VAR*** satisfyingMastervars, /**< mastervariables in the given block satisfying the compBndSeq */
1143 SCIP_CALL( SCIPgetVarsData(masterscip, &allMastervars, &allMastervarsSize, NULL, NULL, NULL, NULL) );
1159 if( compBndSeqSize > 0 && !isMasterVarInCompBndSeq(masterscip, allMastervars[i], compBndSeq, compBndSeqSize, blocknr) )
1168 SCIP_CALL( SCIPreallocBlockMemoryArray(masterscip, satisfyingMastervars, *satisfyingMastervarsSize, *satisfyingMastervarsSize+1) );
1177/* @todo: Vanderbeck (2000) suggests other (also optimal?) algorithms to find a good (best?) component bound sequence; we should check that */
1183 // Task: Find fractional mastervarMin, mastervarMax, indexed by x1, x2, s.t. for some j, xj1 < xj2
1223 if ( !SCIPisFeasPositive(masterprob, currentSolutionValue) || SCIPisFeasIntegral(masterprob, currentSolutionValue) ) {
1267 SCIPdebugMessage("Found %d for origvar %s, j=%d, min=%f, max=%f\n", found, SCIPvarGetName(*selectedOrigvar), j, largestDiffMin, largestDiffMax);
1275/** choose to separate on original variable which has the largest number of distinct numbers, and find the median value */
1308 if ( !SCIPisFeasPositive(masterprob, current_solution_value) || SCIPisFeasIntegral(masterprob, current_solution_value) ) {
1343 int new_current_distinctValuesSize = SCIPcalcMemGrowSize(masterprob, currentNumDistinctValues + 1);
1344 SCIP_CALL( SCIPreallocBlockMemoryArray(masterprob, &distinctValues, distinctValuesSize, new_current_distinctValuesSize) );
1366 int new_current_distinctValuesSize = SCIPcalcMemGrowSize(masterprob, currentNumDistinctValues + 1);
1367 SCIP_CALL( SCIPreallocBlockMemoryArray(masterprob, &distinctValues, distinctValuesSize, new_current_distinctValuesSize) );
1420 findSatisfyingMastervars(masterscip, &satisfyingMastervars, &satisfyingMastervarsSize, blocknr, compBndSeq, compBndSeqSize);
1434/** choose the component bound of which the sum is closest to K/2, where K is the number of identical subproblems in the current block */
1558 SCIP_CALL( SCIPreallocBlockMemoryArray(masterprob, &newCompBndSeqList, newCompBndSeqListSize, newCompBndSeqListSize + 1) );
1559 SCIP_CALL( SCIPreallocBlockMemoryArray(masterprob, &newCompBndSeqSizeList, newCompBndSeqListSize, newCompBndSeqListSize + 1) );
1571 //SCIP_CALL( chooseClosestToKHalf(masterscip, newCompBndSeqList, newCompBndSeqSizeList, newCompBndSeqListSize, blocknr, selectedCompBndSeq, selectedCompBndSeqSize) );
1614 findSatisfyingMastervars(masterprob, &satisfyingMastervars, &satisfyingMastervarsSize, blocknr, NULL, 0);
1621 assert(branchruledata->useMaxRangeMidrangeHeuristic || branchruledata->useMostDistinctMedianHeuristic);
1625 SCIP_CALL( separation_helper(gcg, satisfyingMastervars, satisfyingMastervarsSize, NULL, 0, blocknr, chooseMaxMin, &compBndSeqList, &compBndSeqSizeList, &compBndSeqListSize, result) );
1635 SCIP_CALL( separation_helper(gcg, satisfyingMastervars, satisfyingMastervarsSize, NULL, 0, blocknr, chooseMostDistinctValuesMedian, &compBndSeqList, &compBndSeqSizeList, &compBndSeqListSize, result) );
1703 SCIP_CALL( SCIPgetLPBranchCands(masterprob, &branchcands, NULL, NULL, &nbranchcands, NULL, NULL) );
1727 findSatisfyingMastervars(masterprob, &satisfyingMastervars, &satisfyingMastervarsSize, blocknr, NULL, 0);
1828/** solving process initialization method of branching rule (called when branch and bound process is about to begin) */
1832/** solving process deinitialization method of branching rule (called before branch and bound process data is freed) */
1869 if( GCGisMasterSetCovering(branchruledata->gcg) || GCGisMasterSetPartitioning(branchruledata->gcg) )
1871 SCIPdebugMessage("Component bound branching executed on a set covering or set partitioning problem\n");
1920 SCIPwarningMessage(scip, "No branching could be created, solving process cannot be restarted...\n" );
1929 SCIPdialogMessage(scip, NULL, "You can try to disable discretization and aggregation and resolve the problem.\n");
1951 SCIPdebugMessage("branchActiveMasterCompBnd: Block %d, Ssize %d\n", branchdata->blocknr, branchdata->compBndSeqSize);
1957/** deactivation method for branchrule, called when a node in the master problem is deactivated,
1968 SCIPdebugMessage("branchDeactiveMasterCompBnd: Block %d, Ssize %d\n", branchdata->blocknr, branchdata->compBndSeqSize);
1993/** frees branching data of an origbranch constraint (called when the origbranch constraint is deleted) */
2008 SCIPdebugMessage("branchDataDeleteCompBnd: Block %d, Ssize %d\n", (*branchdata)->blocknr, (*branchdata)->compBndSeqSize);
2018 SCIPfreeBlockMemoryArray(masterscip, &((*branchdata)->compBndSeq), (*branchdata)->compBndSeqSize);
2072 SCIP_CALL( SCIPgetBoolParam(origprob, "pricing/masterpricer/stabilizationtree", &stabilization_tree) );
2079 // "stats_compbnd" + (if useMaxRangeMidrangeHeuristic && useMostDistinctMedianHeuristic ? "" : (if useMaxRangeMidrangeHeuristic ? "-mrm" : "-mdm")) + (if stabilization_tree ? "+dvs" : "") + ".csv"
2083 branchruledata->useMaxRangeMidrangeHeuristic && branchruledata->useMostDistinctMedianHeuristic ? "" :
2135 SCIP_CALL( GCGrelaxIncludeBranchrule(branchruledata->gcg, &branchrule, &branchruledata->gcgbranchrule, BRANCHRULE_NAME,
2136 BRANCHRULE_DESC, BRANCHRULE_PRIORITY, BRANCHRULE_MAXDEPTH, BRANCHRULE_MAXBOUNDDIST, branchruledata, branchActiveMasterCompBnd,
2137 branchDeactiveMasterCompBnd, branchPropMasterCompBnd, branchMasterSolvedCompBnd, branchDataDeleteCompBnd,
2138 branchNewColCompBnd, branchGetExtendedmasterconsCompBnd, branchGetExtendedmasterconsCoeffCompBnd) );
2147 "should the max range midrange heuristic be used?", &branchruledata->useMaxRangeMidrangeHeuristic, FALSE, TRUE, NULL, NULL) );
2149 "should the most distinct median heuristic be used?", &branchruledata->useMostDistinctMedianHeuristic, FALSE, TRUE, NULL, NULL) );
2162 return (branchrule != NULL) && (strcmp(BRANCHRULE_NAME, SCIPbranchruleGetName(branchrule)) == 0);
static SCIP_DECL_BRANCHFREE(branchFreeBPStrong)
Definition branch_bpstrong.c:1489
static SCIP_DECL_BRANCHINIT(branchInitBPStrong)
Definition branch_bpstrong.c:1527
static SCIP_Bool isMasterVarInCompBndSeq(SCIP *scip, SCIP_VAR *mastervar, GCG_COMPBND *compBndSeq, int compBndSeqSize, int blocknr)
Definition branch_compbnd.c:334
static SCIP_Real calcSum(SCIP *masterscip, GCG_COMPBND *compBndSeq, int compBndSeqSize, int blocknr)
Definition branch_compbnd.c:1404
static SCIP_Real calcFractionality(SCIP *masterscip, SCIP_VAR **mastervars, int nmastervars)
Definition branch_compbnd.c:744
SCIP_RETCODE GCGincludeBranchruleCompBnd(GCG *gcg)
Definition branch_compbnd.c:2111
static SCIP_RETCODE initIndexSet(SCIP *scip, SCIP_VAR ***indexSet, int *indexSetSize, SCIP_VAR **mastervars, int mastervarsSize)
Definition branch_compbnd.c:777
static SCIP_RETCODE initBranch(GCG *gcg, GCG_BRANCHRULE *branchrule, SCIP_RESULT *result)
Definition branch_compbnd.c:1673
static SCIP_RETCODE separation_helper(GCG *gcg, SCIP_VAR **satisfyingMastervars, int satisfyingMastervarsSize, GCG_COMPBND *compBndSeq, int compBndSeqSize, int blocknr, CHOOSE_COMPBND((*chooseCompBnd)), GCG_COMPBND ***foundCompBndSeqList, int **foundCompBndSeqSizeList, int *foundCompBndSeqListSize, SCIP_RESULT *result)
Definition branch_compbnd.c:924
static SCIP_RETCODE findSatisfyingMastervars(SCIP *masterscip, SCIP_VAR ***satisfyingMastervars, int *satisfyingMastervarsSize, int blocknr, GCG_COMPBND *compBndSeq, int compBndSeqSize)
Definition branch_compbnd.c:1120
SCIP_Bool GCGisBranchruleCompBnd(SCIP_BRANCHRULE *branchrule)
Definition branch_compbnd.c:2158
static SCIP_Real getLowerBound(SCIP *scip, SCIP_VAR *origvar, GCG_COMPBND *compBndSeq, int compBndSeqSize)
Definition branch_compbnd.c:859
static SCIP_RETCODE addVarToMasterbranch(GCG *gcg, SCIP_VAR *mastervar, GCG_BRANCHDATA *branchdata)
Definition branch_compbnd.c:367
static SCIP_DECL_BRANCHEXECLP(branchExeclpCompBnd)
Definition branch_compbnd.c:1838
static SCIP_DECL_BRANCHEXECEXT(branchExecextCompBnd)
Definition branch_compbnd.c:1892
static SCIP_RETCODE separation(GCG *gcg, GCG_BRANCHRULE *branchrule, GCG_COMPBND **compBndSeq, int *compBndSeqSize, int blocknr, SCIP_RESULT *result)
Definition branch_compbnd.c:1583
static SCIP_DECL_BRANCHEXECPS(branchExecpsCompBnd)
Definition branch_compbnd.c:1908
static SCIP_RETCODE createBranchingCons(GCG *gcg, GCG_BRANCHRULE *branchrule, SCIP_NODE *node, GCG_BRANCHDATA *branchdata)
Definition branch_compbnd.c:427
static SCIP_RETCODE simplifyComponentBoundSequence(SCIP *scip, GCG_COMPBND **compBndSeq, int *compBndSeqSize)
Definition branch_compbnd.c:165
static SCIP_Real getGeneratorEntryCol(SCIP_VAR **solvars, SCIP_Real *solvals, int nsolvars, SCIP_VAR *origvar)
Definition branch_compbnd.c:257
static SCIP_Bool isColInCompBndSeq(SCIP *scip, SCIP_VAR **solvars, SCIP_Real *solvals, int nsolvars, GCG_COMPBND *compBndSeq, int compBndSeqSize)
Definition branch_compbnd.c:304
static SCIP_Real getUpperBound(SCIP *scip, SCIP_VAR *origvar, GCG_COMPBND *compBndSeq, int compBndSeqSize)
Definition branch_compbnd.c:891
static SCIP_RETCODE initNodeBranchdata(SCIP *scip, GCG_BRANCHDATA **nodebranchdata, GCG_BRANCH_TYPE branchtype, int constant, GCG_COMPBND *compBndSeq, int compBndSeqSize, int blocknr)
Definition branch_compbnd.c:137
static SCIP_RETCODE createChildNodesCompBndSeq(GCG *gcg, GCG_BRANCHRULE *branchrule, GCG_COMPBND *compBndSeq, int compBndSeqSize, int blocknr)
Definition branch_compbnd.c:647
static void freeComponentBoundSequence(SCIP *scip, GCG_COMPBND **compBndSeq, int *compBndSeqSize)
Definition branch_compbnd.c:121
static SCIP_Real getGeneratorEntry(SCIP_VAR *mastervar, SCIP_VAR *origvar)
Definition branch_compbnd.c:292
component bound branching rule
SCIP_BRANCHRULEDATA * GCGbranchGetScipBranchruledata(GCG_BRANCHRULE *branchrule)
Definition branchgcg.c:113
SCIP_RETCODE GCGbranchFreeExtendedmasterconsBranchData(GCG *gcg, GCG_EXTENDEDMASTERCONSDATA **extendedmasterconsdata)
Definition branchgcg.c:83
SCIP_RETCODE GCGbranchCreateExtendedmastercons(GCG *gcg, GCG_BRANCHRULE *branchrule, GCG_EXTENDEDMASTERCONSDATA **extendedmasterconsdata, SCIP_CONS *cons, GCG_PRICINGMODIFICATION **pricingmodifications, int npricingmodifications, GCG_BRANCHDATA *branchdata)
Definition branchgcg.c:41
SCIP_BRANCHRULE * GCGbranchGetScipBranchrule(GCG_BRANCHRULE *branchrule)
Definition branchgcg.c:102
SCIP_RETCODE GCGbranchGetExtendedmasterconsCoeff(GCG *gcg, GCG_EXTENDEDMASTERCONSDATA *extendedmasterconsdata, SCIP_VAR **solvars, SCIP_Real *solvals, int nsolvars, int probnr, GCG_COL *gcgcol, SCIP_Real *coeff)
Definition branchgcg.c:61
constraint handler for the integrality constraint
SCIP_CONS * GCGconsMasterbranchGetActiveCons(GCG *gcg)
Definition cons_masterbranch.c:3056
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
#define SCIP_MAXSTRLEN
#define SCIP_Longint
#define SCIP_INVALID
#define SCIP_Bool
#define MIN(x, y)
#define SCIP_Real
#define ABS(x)
#define MAX(x, y)
#define TRUE
#define FALSE
SCIP_RETCODE GCGextendedmasterconsAddMasterVar(GCG *gcg, GCG_EXTENDEDMASTERCONSDATA *extendedmasterconsdata, SCIP_VAR *var, SCIP_Real coef)
Definition extendedmasterconsdata.c:338
internal methods for interacting with GCG_EXTENDEDMASTERCONSDATA
GCG interface methods.
SCIP_RETCODE GCGcreateInferredPricingVar(SCIP *pricingscip, SCIP_VAR **newvar, const char *varname, SCIP_Real lb, SCIP_Real ub, SCIP_Bool iscoefvar, SCIP_Real objcoeff, SCIP_VARTYPE vartype, int prob)
Definition gcgvar.c:1674
SCIP_VAR * GCGoriginalVarGetPricingVar(SCIP_VAR *var)
Definition gcgvar.c:281
SCIP_Bool GCGisMasterVarInBlock(SCIP_VAR *mastervar, int block)
Definition gcgvar.c:1169
SCIP_Real GCGmasterVarGetOrigval(SCIP_VAR *mastervar, SCIP_VAR *origvar)
Definition gcgvar.c:1034
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)
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)
SCIP_RETCODE GCGpricingmodificationCreate(GCG *gcg, GCG_PRICINGMODIFICATION **pricingmodification, int blocknr, SCIP_VAR *coefvar, SCIP_VAR **additionalvars, int nadditionalvars, SCIP_CONS **additionalconss, int nadditionalconss)
Definition extendedmasterconsdata.c:90
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
GCG_EXPORT int GCGgetNIdenticalBlocks(GCG *gcg, int pricingprobnr)
Definition relax_gcg.c:4185
GCG_EXPORT int GCGgetBlockRepresentative(GCG *gcg, int pricingprobnr)
Definition relax_gcg.c:4155
GCG_EXPORT SCIP_Bool GCGisPricingprobRelevant(GCG *gcg, int pricingprobnr)
Definition relax_gcg.c:4132
SCIP_Bool SCIPisStopped(SCIP *scip)
SCIP_RETCODE SCIPgetVarsData(SCIP *scip, SCIP_VAR ***vars, int *nvars, int *nbinvars, int *nintvars, int *nimplvars, int *ncontvars)
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 SCIPgetLocalTransEstimate(SCIP *scip)
void SCIPdialogMessage(SCIP *scip, FILE *file, const char *formatstr,...)
void SCIPwarningMessage(SCIP *scip, const char *formatstr,...)
SCIP_RETCODE SCIPgetBoolParam(SCIP *scip, const char *name, SCIP_Bool *value)
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_BRANCHRULE * SCIPfindBranchrule(SCIP *scip, const char *name)
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 SCIPgetLPBranchCands(SCIP *scip, SCIP_VAR ***lpcands, SCIP_Real **lpcandssol, SCIP_Real **lpcandsfrac, int *nlpcands, int *npriolpcands, int *nfracimplvars)
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 SCIPfreeBlockMemoryArrayNull(scip, ptr, num)
#define SCIPallocBlockMemory(scip, ptr)
#define SCIPduplicateBlockMemoryArray(scip, ptr, source, num)
SCIP_Longint SCIPnodeGetNumber(SCIP_NODE *node)
SCIP_Real SCIPgetSolOrigObj(SCIP *scip, SCIP_SOL *sol)
SCIP_Real SCIPgetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var)
SCIP_Real SCIPinfinity(SCIP *scip)
SCIP_Bool SCIPisGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisPositive(SCIP *scip, SCIP_Real val)
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 SCIPisFeasIntegral(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPfrac(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisZero(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisFeasPositive(SCIP *scip, SCIP_Real val)
int SCIPgetDepth(SCIP *scip)
SCIP_VARTYPE SCIPvarGetType(SCIP_VAR *var)
SCIP_Real SCIPvarGetUbGlobal(SCIP_VAR *var)
const char * SCIPvarGetName(SCIP_VAR *var)
SCIP_Real SCIPvarGetLbGlobal(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
#define SCIP_UNUSED(x)
Definition class_conspartition.cpp:44
GCG variable pricer.
public methods for interacting with GCG_EXTENDEDMASTERCONSDATA
public methods for GCG variables
#define SCIPerrorMessage
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
SCIP_Bool useMostDistinctMedianHeuristic
Definition branch_compbnd.c:85
SCIP_Bool useMaxRangeMidrangeHeuristic
Definition branch_compbnd.c:84
struct SCIP_Branchrule SCIP_BRANCHRULE
struct SCIP_BranchruleData SCIP_BRANCHRULEDATA
type definitions for branching rules in GCG projects
#define GCG_DECL_BRANCHGETEXTENDEDMASTERCONSCOEFF(x)
Definition type_branchgcg.h:151
#define GCG_DECL_BRANCHGETEXTENDEDMASTERCONS(x)
Definition type_branchgcg.h:136
struct SCIP_Cons SCIP_CONS
type definitions for extended master conss in GCG projects
struct GCG_ExtendedMasterConsData GCG_EXTENDEDMASTERCONSDATA
Definition type_extendedmasterconsdata.h:57
struct GCG_PricingModification GCG_PRICINGMODIFICATION
Definition type_extendedmasterconsdata.h:56
SCIP_DIDNOTRUN
SCIP_CUTOFF
SCIP_DIDNOTFIND
SCIP_BRANCHED
enum SCIP_Result SCIP_RESULT
SCIP_ERROR
enum SCIP_Retcode SCIP_RETCODE
struct Scip SCIP
struct SCIP_Node SCIP_NODE
struct SCIP_Var SCIP_VAR
SCIP_VARTYPE_INTEGER
SCIP_VARTYPE_BINARY