79#define SEPA_NAME "gmi"
80#define SEPA_DESC "Gomory Mixed-Integer cuts separator"
81#define SEPA_PRIORITY -1000
83#define SEPA_MAXBOUNDDIST 0.0
84#define SEPA_USESSUBSCIP FALSE
85#define SEPA_DELAY FALSE
87#define DEFAULT_MAXROUNDS 5
88#define DEFAULT_MAXROUNDSROOT 30
89#define DEFAULT_MAXSEPACUTS -1
90#define DEFAULT_MAXSEPACUTSROOT -1
91#define DEFAULT_DYNAMICCUTS TRUE
92#define DEFAULT_SEPARATEROWS TRUE
94#define DEFAULT_AWAY 0.005
95#define DEFAULT_MIN_VIOLATION 0.00
96#define DEFAULT_EPS_COEFF 1e-11
97#define DEFAULT_EPS_RELAX_ABS 1e-11
98#define DEFAULT_EPS_RELAX_REL 1e-13
99#define DEFAULT_MAX_DYN 1.0e+6
100#define DEFAULT_MAX_SUPP_ABS 1000
101#define DEFAULT_MAX_SUPP_REL 0.1
112 SCIP_Bool dynamiccuts;
113 SCIP_Bool separaterows;
115 SCIP_Real minviolation;
117 SCIP_Real epsrelaxabs;
118 SCIP_Real epsrelaxrel;
119 SCIP_Real maxdynamism;
121 SCIP_Real maxsupprel;
162 for(
c = 0;
c < ncols; ++
c )
328 for(
c = 0;
c < ncols; ++
c)
402 for(
c = 0;
c < nrows; ++
c )
424 SCIPdebugMsg(
scip,
"Free nonbasic slack variable, this should not happen!\n");
637 if( ncols == 0 || nrows == 0 )
655 maxsepacuts =
sepadata->maxsepacutsroot;
657 maxsepacuts =
sepadata->maxsepacuts;
659 if( maxsepacuts == -1 )
732 success =
getGMIFromRow(
scip,
sepadata, ncols, nrows, cols, rows,
binvrow,
binvarow,
primsol,
cutcoefs,
cutind, &
cutnz, &
cutrhs, &
cutact,
workcoefs);
771 SCIP_Bool infeasible;
773 SCIPdebugMsg(
scip,
" -> found GMI cut <%s>: act=%f, rhs=%f, norm=%f, eff=%f, min=%f, max=%f (range=%f).\n",
847 "separating/gmi/maxrounds",
848 "maximal number of GMI separation rounds per node (-1: unlimited)",
851 "separating/gmi/maxroundsroot",
852 "maximal number of GMI separation rounds in the root node (-1: unlimited)",
855 "separating/gmi/maxsepacuts",
856 "maximal number of GMI cuts separated per separation round (-1: unlimited)",
859 "separating/gmi/maxsepacutsroot",
860 "maximal number of GMI cuts separated per separation round in the root node (-1: unlimited)",
863 "separating/gmi/dynamiccuts",
864 "should generated cuts be removed from the LP if they are no longer tight?",
867 "separating/gmi/separaterows",
868 "separate rows with integral slack",
871 "separating/gmi/away",
872 "minimal fractionality of a basic variable in order to try GMI cut",
875 "separating/gmi/minviolation",
876 "minimal violation to accept cut",
879 "separating/gmi/epscoeff",
880 "tolerance for zeroing out small coefficients",
883 "separating/gmi/epsrelaxabs",
884 "absolute cut rhs relaxation",
887 "separating/gmi/epsrelaxrel",
888 "relative cut rhs relaxation",
891 "separating/gmi/maxdynamism",
892 "maximal valid range max(|weights|)/min(|weights|) of cut coefficients",
895 "separating/gmi/maxsuppabs",
896 "maximum cut support - absolute value in the formula",
899 "separating/gmi/maxsupprel",
900 "maximum cut support - relative value in the formula",
SCIP_Bool SCIPisStopped(SCIP *scip)
SCIP_RETCODE SCIPgetVarsData(SCIP *scip, SCIP_VAR ***vars, int *nvars, int *nbinvars, int *nintvars, int *nimplvars, int *ncontvars)
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)
int SCIPgetNLPBranchCands(SCIP *scip)
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 SCIPcolGetPrimsol(SCIP_COL *col)
SCIP_Real SCIPcolGetUb(SCIP_COL *col)
SCIP_BASESTAT SCIPcolGetBasisStatus(SCIP_COL *col)
SCIP_RETCODE SCIPaddPoolCut(SCIP *scip, SCIP_ROW *row)
SCIP_Real SCIPgetCutEfficacy(SCIP *scip, SCIP_SOL *sol, SCIP_ROW *cut)
SCIP_Bool SCIPisCutEfficacious(SCIP *scip, SCIP_SOL *sol, SCIP_ROW *cut)
SCIP_RETCODE SCIPaddRow(SCIP *scip, SCIP_ROW *row, SCIP_Bool forcecut, SCIP_Bool *infeasible)
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_Bool SCIPisLPSolBasic(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 SCIPfreeBlockMemory(scip, ptr)
#define SCIPallocBlockMemory(scip, ptr)
SCIP_Bool SCIProwIsIntegral(SCIP_ROW *row)
SCIP_Real SCIPgetRowMaxCoef(SCIP *scip, SCIP_ROW *row)
SCIP_Real SCIProwGetLhs(SCIP_ROW *row)
SCIP_Real SCIPgetRowMinCoef(SCIP *scip, SCIP_ROW *row)
SCIP_Bool SCIProwIsModifiable(SCIP_ROW *row)
SCIP_RETCODE SCIPcacheRowExtensions(SCIP *scip, SCIP_ROW *row)
int SCIProwGetNNonz(SCIP_ROW *row)
SCIP_COL ** SCIProwGetCols(SCIP_ROW *row)
SCIP_Real SCIPgetRowLPActivity(SCIP *scip, SCIP_ROW *row)
SCIP_Real SCIProwGetRhs(SCIP_ROW *row)
int SCIProwGetNLPNonz(SCIP_ROW *row)
SCIP_Real SCIProwGetNorm(SCIP_ROW *row)
int SCIProwGetLPPos(SCIP_ROW *row)
SCIP_RETCODE SCIPflushRowExtensions(SCIP *scip, SCIP_ROW *row)
SCIP_RETCODE SCIPaddVarToRow(SCIP *scip, SCIP_ROW *row, SCIP_VAR *var, SCIP_Real val)
SCIP_RETCODE SCIPprintRow(SCIP *scip, SCIP_ROW *row, FILE *file)
const char * SCIProwGetName(SCIP_ROW *row)
SCIP_Real SCIPgetRowActivity(SCIP *scip, SCIP_ROW *row)
SCIP_RETCODE SCIPreleaseRow(SCIP *scip, SCIP_ROW **row)
SCIP_RETCODE SCIPcreateEmptyRowSepa(SCIP *scip, SCIP_ROW **row, SCIP_SEPA *sepa, 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 * SCIProwGetVals(SCIP_ROW *row)
SCIP_BASESTAT SCIProwGetBasisStatus(SCIP_ROW *row)
SCIP_RETCODE SCIPincludeSepaBasic(SCIP *scip, SCIP_SEPA **sepa, const char *name, const char *desc, int priority, int freq, SCIP_Real maxbounddist, SCIP_Bool usessubscip, SCIP_Bool delay, SCIP_DECL_SEPAEXECLP((*sepaexeclp)), SCIP_DECL_SEPAEXECSOL((*sepaexecsol)), SCIP_SEPADATA *sepadata)
SCIP_RETCODE SCIPsetSepaFree(SCIP *scip, SCIP_SEPA *sepa,)
const char * SCIPsepaGetName(SCIP_SEPA *sepa)
int SCIPsepaGetNCallsAtNode(SCIP_SEPA *sepa)
SCIP_SEPADATA * SCIPsepaGetData(SCIP_SEPA *sepa)
void SCIPsepaSetData(SCIP_SEPA *sepa, SCIP_SEPADATA *sepadata)
SCIP_RETCODE SCIPsetSepaCopy(SCIP *scip, SCIP_SEPA *sepa,)
SCIP_Longint SCIPgetNLPs(SCIP *scip)
int SCIPgetNCutsFound(SCIP *scip)
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_Bool SCIPisFeasNegative(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPfrac(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisZero(SCIP *scip, SCIP_Real val)
SCIP_VARTYPE SCIPvarGetType(SCIP_VAR *var)
const char * SCIPvarGetName(SCIP_VAR *var)
SCIP_Real SCIPgetVarSol(SCIP *scip, SCIP_VAR *var)
int SCIPsnprintf(char *t, int len, const char *s,...)
assert(minobj< SCIPgetCutoffbound(scip))
#define BMSclearMemoryArray(ptr, num)
public data structures and miscellaneous methods
static SCIP_Bool getGMIFromRow(SCIP *scip, SCIP_SEPADATA *sepadata, int ncols, int nrows, SCIP_COL **cols, SCIP_ROW **rows, SCIP_Real *binvrow, SCIP_Real *binvarow, SCIP_Real rowrhs, SCIP_Real *cutcoefs, int *cutind, int *cutnz, SCIP_Real *cutrhs, SCIP_Real *cutact, SCIP_Real *workcoefs)
#define DEFAULT_DYNAMICCUTS
#define DEFAULT_MAX_SUPP_ABS
#define DEFAULT_MAXROUNDSROOT
#define DEFAULT_MIN_VIOLATION
#define DEFAULT_EPS_COEFF
#define DEFAULT_MAXSEPACUTSROOT
#define DEFAULT_EPS_RELAX_REL
#define SEPA_MAXBOUNDDIST
static SCIP_Bool modifyAndPackCut(SCIP *scip, SCIP_SEPADATA *sepadata, int ncols, SCIP_COL **cols, SCIP_Real *densecoefs, SCIP_Real *sparsecoefs, int *cutind, int *cutnz, SCIP_Real *cutrhs)
#define DEFAULT_MAX_SUPP_REL
#define DEFAULT_MAXSEPACUTS
#define DEFAULT_MAXROUNDS
#define DEFAULT_EPS_RELAX_ABS
#define DEFAULT_SEPARATEROWS
SCIP_RETCODE SCIPincludeSepaGMI(SCIP *scip)
static SCIP_Bool checkNumerics(SCIP *scip, SCIP_SEPADATA *sepadata, int ncols, SCIP_COL **cols, SCIP_Real *cutcoefs, int *cutind, int cutnz, SCIP_Real cutrhs, SCIP_Real *cutact)
Gomory Mixed-Integer Cuts.
enum SCIP_Retcode SCIP_RETCODE
struct SCIP_SepaData SCIP_SEPADATA
#define SCIP_DECL_SEPAEXECLP(x)
#define SCIP_DECL_SEPAFREE(x)
#define SCIP_DECL_SEPACOPY(x)
@ SCIP_VARTYPE_CONTINUOUS