73#define BRANCHRULE_NAME "gomory"
74#define BRANCHRULE_DESC "Gomory cut score branching"
75#define BRANCHRULE_PRIORITY -1000
76#define BRANCHRULE_MAXDEPTH -1
77#define BRANCHRULE_MAXBOUNDDIST 1.0
79#define DEFAULT_MAXNCANDS -1
80#define DEFAULT_EFFICACYWEIGHT 1.0
81#define DEFAULT_OBJPARALLELWEIGHT 0.0
82#define DEFAULT_INTSUPPORTWEIGHT 0.0
83#define DEFAULT_PERFORMRELPSCOST FALSE
84#define DEFAULT_USEWEAKERCUTS TRUE
92struct SCIP_BranchruleData
156 f0complementratio = f0 / (1.0 - f0);
162 for (
c = 0;
c < ncols;
c++ )
172 rowelem = binvarow[
c];
177 rowelem = -binvarow[
c];
194 cutelem = -((1.0 - cutelem) * f0complementratio);
208 cutelem = rowelem * f0complementratio;
235 for (
c = 0;
c < nrows;
c++ )
272 cutelem = -((1.0 - cutelem) * f0complementratio);
286 cutelem = rowelem * f0complementratio;
326 rowrhsslack = rowrhs - rowact;
394 int* basicvarpos2tableaurow;
411 name = (
char *)
"test";
423 SCIPdebugMsg(
scip,
"Could not apply Gomory branching, as the current LP was not solved to optimality.\n");
439 if ( branchruledata->performrelpscost )
453 if( branchruledata->maxncands >= 0 )
455 maxncands =
MIN(
nlpcands, branchruledata->maxncands);
475 for(
i = 0;
i < ncols; ++
i )
477 basicvarpos2tableaurow[
i] = -1;
480 for(
i = 0;
i < nrows; ++
i )
482 if( basisind[
i] >= 0 )
483 basicvarpos2tableaurow[basisind[
i]] =
i;
492 for(
i = 0;
i < maxncands;
i++ )
510 &cutrhs, branchruledata->useweakercuts);
518 for( j = 0; j < ncols; ++j )
527 if ( branchruledata-> efficacyweight != 0 )
529 if ( branchruledata->objparallelweight != 0 )
531 if ( branchruledata->intsupportweight != 0 )
536 if (score > bestscore) {
551 SCIPdebugMsg(
scip,
" -> %d candidates, selected candidate %d: variable <%s> (frac=%g, factor=%g, score=%g)\n",
591 "maximum amount of branching candidates to generate Gomory cuts for (-1: all candidates)",
594 "weight of efficacy in the weighted sum cut scoring rule",
597 "weight of objective parallelism in the weighted sum cut scoring rule",
600 "weight of integer support in the weighted sum cut scoring rule",
603 "whether relpscost branching should be called without branching (used for bound inferences and conflicts)",
606 "use weaker cuts that are exactly derived from the branching split disjunction",
#define BRANCHRULE_PRIORITY
#define BRANCHRULE_MAXDEPTH
#define BRANCHRULE_MAXBOUNDDIST
#define DEFAULT_EFFICACYWEIGHT
#define DEFAULT_OBJPARALLELWEIGHT
static SCIP_Bool getGMIFromRow(SCIP *scip, int ncols, int nrows, SCIP_COL **cols, SCIP_ROW **rows, const SCIP_Real *binvrow, const SCIP_Real *binvarow, const SCIP_Real *lpval, SCIP_Real *cutcoefs, SCIP_Real *cutrhs, SCIP_Bool useweakerscuts)
#define DEFAULT_PERFORMRELPSCOST
#define DEFAULT_USEWEAKERCUTS
#define DEFAULT_INTSUPPORTWEIGHT
#define DEFAULT_MAXNCANDS
Gomory cut branching rule.
reliable pseudo costs branching rule
#define SCIP_LONGINT_FORMAT
SCIP_RETCODE SCIPexecRelpscostBranching(SCIP *scip, SCIP_VAR **branchcands, SCIP_Real *branchcandssol, SCIP_Real *branchcandsfrac, int nbranchcands, SCIP_Bool executebranching, SCIP_RESULT *result)
SCIP_RETCODE SCIPincludeBranchruleGomory(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 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 SCIPsetBranchruleCopy(SCIP *scip, SCIP_BRANCHRULE *branchrule,)
SCIP_RETCODE SCIPsetBranchruleExecLp(SCIP *scip, SCIP_BRANCHRULE *branchrule,)
SCIP_RETCODE SCIPsetBranchruleFree(SCIP *scip, SCIP_BRANCHRULE *branchrule,)
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)
int SCIPcolGetLPPos(SCIP_COL *col)
SCIP_VAR * SCIPcolGetVar(SCIP_COL *col)
SCIP_Bool SCIPcolIsIntegral(SCIP_COL *col)
SCIP_Real SCIPcolGetLb(SCIP_COL *col)
SCIP_Real SCIPcolGetUb(SCIP_COL *col)
SCIP_BASESTAT SCIPcolGetBasisStatus(SCIP_COL *col)
SCIP_Real SCIPgetCutEfficacy(SCIP *scip, SCIP_SOL *sol, SCIP_ROW *cut)
SCIP_RETCODE SCIPgetLPBasisInd(SCIP *scip, int *basisind)
SCIP_RETCODE SCIPgetLPColsData(SCIP *scip, SCIP_COL ***cols, int *ncols)
SCIP_RETCODE SCIPgetLPRowsData(SCIP *scip, SCIP_ROW ***rows, int *nrows)
SCIP_RETCODE SCIPgetLPBInvARow(SCIP *scip, int r, SCIP_Real *binvrow, SCIP_Real *coefs, int *inds, int *ninds)
SCIP_LPSOLSTAT SCIPgetLPSolstat(SCIP *scip)
SCIP_RETCODE SCIPgetLPBInvRow(SCIP *scip, int r, SCIP_Real *coefs, int *inds, int *ninds)
#define SCIPallocBufferArray(scip, ptr, num)
#define SCIPfreeBufferArray(scip, ptr)
#define SCIPfreeBlockMemoryNull(scip, ptr)
#define SCIPallocBlockMemory(scip, ptr)
SCIP_Longint SCIPnodeGetNumber(SCIP_NODE *node)
SCIP_Bool SCIProwIsIntegral(SCIP_ROW *row)
SCIP_Real SCIProwGetLhs(SCIP_ROW *row)
SCIP_Bool SCIProwIsModifiable(SCIP_ROW *row)
int SCIProwGetNNonz(SCIP_ROW *row)
SCIP_COL ** SCIProwGetCols(SCIP_ROW *row)
SCIP_Real SCIProwGetRhs(SCIP_ROW *row)
int SCIProwGetNLPNonz(SCIP_ROW *row)
int SCIProwGetLPPos(SCIP_ROW *row)
SCIP_RETCODE SCIPaddVarToRow(SCIP *scip, SCIP_ROW *row, SCIP_VAR *var, SCIP_Real val)
SCIP_Real SCIPgetRowActivity(SCIP *scip, SCIP_ROW *row)
SCIP_RETCODE SCIPreleaseRow(SCIP *scip, SCIP_ROW **row)
SCIP_RETCODE SCIPcreateEmptyRowUnspec(SCIP *scip, SCIP_ROW **row, const char *name, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool removable)
SCIP_Real SCIProwGetConstant(SCIP_ROW *row)
SCIP_Real SCIPgetRowObjParallelism(SCIP *scip, SCIP_ROW *row)
int SCIPgetRowNumIntCols(SCIP *scip, SCIP_ROW *row)
SCIP_Real * SCIProwGetVals(SCIP_ROW *row)
SCIP_BASESTAT SCIProwGetBasisStatus(SCIP_ROW *row)
SCIP_Real SCIPinfinity(SCIP *scip)
SCIP_Real SCIPfeasFrac(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisFeasZero(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPfeastol(SCIP *scip)
SCIP_Real SCIPfrac(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisZero(SCIP *scip, SCIP_Real val)
SCIP_NODE * SCIPgetCurrentNode(SCIP *scip)
SCIP_COL * SCIPvarGetCol(SCIP_VAR *var)
const char * SCIPvarGetName(SCIP_VAR *var)
SCIP_Real SCIPvarGetBranchFactor(SCIP_VAR *var)
assert(minobj< SCIPgetCutoffbound(scip))
#define BMSclearMemoryArray(ptr, num)
public methods for branching rules
public methods for LP management
public methods for message output
public methods for branch and bound tree
public methods for problem variables
public methods for branching rule plugins and branching
public methods for cuts and aggregation rows
public methods for the LP relaxation, rows and columns
public methods for memory management
public methods for message handling
public methods for numerical tolerances
public methods for SCIP parameter handling
public methods for the branch-and-bound tree
#define SCIP_DECL_BRANCHEXECLP(x)
#define SCIP_DECL_BRANCHCOPY(x)
#define SCIP_DECL_BRANCHFREE(x)
struct SCIP_Branchrule SCIP_BRANCHRULE
struct SCIP_BranchruleData SCIP_BRANCHRULEDATA
enum SCIP_BaseStat SCIP_BASESTAT
enum SCIP_Retcode SCIP_RETCODE