disjunctive cut separator
We separate disjunctive cuts for two term disjunctions of the form \(x_1 = 0 \vee x_2 = 0\). They can be generated directly from the simplex tableau. For further information, we refer to
"A complementarity-based partitioning and disjunctive cut algorithm for mathematical programming problems with
equilibrium constraints"
Júdice, J.J., Sherali, H.D., Ribeiro, I.M., Faustino, A.M., Journal of Global Optimization 36(1), 89–114 (2006)
Cut coefficients belonging to integer variables can be strengthened by the 'monoidal cut strengthening' procedure, see
"Strengthening cuts for mixed integer programs"
Egon Balas, Robert G. Jeroslow, European Journal of Operational Research, Volume 4, Issue 4, 1980, Pages 224-234
Definition in file sepa_disjunctive.c.
#include <assert.h>
#include <string.h>
#include <ctype.h>
#include "scip/sepa_disjunctive.h"
#include "scip/cons_sos1.h"
Go to the source code of this file.
Macros | |
#define | SEPA_NAME "disjunctive" |
#define | SEPA_DESC "disjunctive cut separator" |
#define | SEPA_PRIORITY 10 |
#define | SEPA_FREQ 0 |
#define | SEPA_MAXBOUNDDIST 0.0 |
#define | SEPA_USESSUBSCIP FALSE |
#define | SEPA_DELAY TRUE |
#define | DEFAULT_MAXRANK 20 |
#define | DEFAULT_MAXRANKINTEGRAL -1 |
#define | DEFAULT_MAXWEIGHTRANGE 1e+03 |
#define | DEFAULT_STRENGTHEN TRUE |
#define | DEFAULT_MAXDEPTH -1 |
#define | DEFAULT_MAXROUNDS 25 |
#define | DEFAULT_MAXROUNDSROOT 100 |
#define | DEFAULT_MAXINVCUTS 50 |
#define | DEFAULT_MAXINVCUTSROOT 250 |
#define | DEFAULT_MAXCONFSDELAY 100000 |
#define | MAKECONTINTEGRAL FALSE |
Functions | |
static int | getVarRank (SCIP *scip, SCIP_Real *binvrow, SCIP_Real *rowsmaxval, SCIP_Real maxweightrange, SCIP_ROW **rows, int nrows) |
static SCIP_RETCODE | getSimplexCoefficients (SCIP *scip, SCIP_ROW **rows, int nrows, SCIP_COL **cols, int ncols, SCIP_Real *coef, SCIP_Real *binvrow, SCIP_Real *simplexcoefs, int *nonbasicnumber) |
static SCIP_RETCODE | generateDisjCutSOS1 (SCIP *scip, SCIP_SEPA *sepa, SCIP_ROW **rows, int nrows, SCIP_COL **cols, int ncols, int ndisjcuts, SCIP_Bool scale, SCIP_Bool strengthen, SCIP_Real cutlhs1, SCIP_Real cutlhs2, SCIP_Real bound1, SCIP_Real bound2, SCIP_Real *simplexcoefs1, SCIP_Real *simplexcoefs2, SCIP_Real *cutcoefs, SCIP_ROW **row, SCIP_Bool *madeintegral) |
static | SCIP_DECL_SEPACOPY (sepaCopyDisjunctive) |
static | SCIP_DECL_SEPAFREE (sepaFreeDisjunctive) |
static | SCIP_DECL_SEPAEXITSOL (sepaInitsolDisjunctive) |
static | SCIP_DECL_SEPAEXECLP (sepaExeclpDisjunctive) |
SCIP_RETCODE | SCIPincludeSepaDisjunctive (SCIP *scip) |
#define SEPA_NAME "disjunctive" |
Definition at line 41 of file sepa_disjunctive.c.
Referenced by SCIP_DECL_SEPACOPY(), SCIP_DECL_SEPAEXECLP(), SCIP_DECL_SEPAFREE(), and SCIPincludeSepaDisjunctive().
#define SEPA_DESC "disjunctive cut separator" |
Definition at line 42 of file sepa_disjunctive.c.
Referenced by SCIPincludeSepaDisjunctive().
#define SEPA_PRIORITY 10 |
priority for separation
Definition at line 43 of file sepa_disjunctive.c.
Referenced by SCIPincludeSepaDisjunctive().
#define SEPA_FREQ 0 |
frequency for separating cuts; zero means to separate only in the root node
Definition at line 44 of file sepa_disjunctive.c.
Referenced by SCIPincludeSepaDisjunctive().
#define SEPA_MAXBOUNDDIST 0.0 |
maximal relative distance from the current node's dual bound to primal bound compared to best node's dual bound for applying separation.
Definition at line 45 of file sepa_disjunctive.c.
Referenced by SCIPincludeSepaDisjunctive().
#define SEPA_USESSUBSCIP FALSE |
does the separator use a secondary SCIP instance?
Definition at line 48 of file sepa_disjunctive.c.
Referenced by SCIPincludeSepaDisjunctive().
#define SEPA_DELAY TRUE |
should separation method be delayed, if other separators found cuts?
Definition at line 49 of file sepa_disjunctive.c.
Referenced by SCIPincludeSepaDisjunctive().
#define DEFAULT_MAXRANK 20 |
maximal rank of a cut that could not be scaled to integral coefficients (-1: unlimited)
Definition at line 51 of file sepa_disjunctive.c.
Referenced by SCIPincludeSepaDisjunctive().
#define DEFAULT_MAXRANKINTEGRAL -1 |
maximal rank of a cut that could be scaled to integral coefficients (-1: unlimited)
Definition at line 52 of file sepa_disjunctive.c.
Referenced by SCIPincludeSepaDisjunctive().
#define DEFAULT_MAXWEIGHTRANGE 1e+03 |
maximal valid range max(|weights|)/min(|weights|) of row weights
Definition at line 53 of file sepa_disjunctive.c.
Referenced by SCIPincludeSepaDisjunctive().
#define DEFAULT_STRENGTHEN TRUE |
strengthen cut if integer variables are present
Definition at line 54 of file sepa_disjunctive.c.
Referenced by SCIPincludeSepaDisjunctive().
#define DEFAULT_MAXDEPTH -1 |
node depth of separating cuts (-1: no limit)
Definition at line 56 of file sepa_disjunctive.c.
Referenced by SCIPincludeSepaDisjunctive().
#define DEFAULT_MAXROUNDS 25 |
maximal number of separation rounds in a branching node (-1: no limit)
Definition at line 57 of file sepa_disjunctive.c.
Referenced by SCIPincludeSepaDisjunctive().
#define DEFAULT_MAXROUNDSROOT 100 |
maximal number of separation rounds in the root node (-1: no limit)
Definition at line 58 of file sepa_disjunctive.c.
Referenced by SCIPincludeSepaDisjunctive().
#define DEFAULT_MAXINVCUTS 50 |
maximal number of cuts investigated per iteration in a branching node
Definition at line 59 of file sepa_disjunctive.c.
Referenced by SCIPincludeSepaDisjunctive().
#define DEFAULT_MAXINVCUTSROOT 250 |
maximal number of cuts investigated per iteration in the root node
Definition at line 60 of file sepa_disjunctive.c.
Referenced by SCIPincludeSepaDisjunctive().
#define DEFAULT_MAXCONFSDELAY 100000 |
delay separation if number of conflict graph edges is larger than predefined value (-1: no limit)
Definition at line 61 of file sepa_disjunctive.c.
Referenced by SCIPincludeSepaDisjunctive().
#define MAKECONTINTEGRAL FALSE |
convert continuous variable to integral variables in SCIPmakeRowIntegral()
Definition at line 63 of file sepa_disjunctive.c.
Referenced by SCIP_DECL_SEPAEXECLP().
|
static |
gets rank of variable corresponding to row of \(B^{-1}\)
scip | SCIP pointer |
binvrow | row of \(B^{-1}\) |
rowsmaxval | maximal row multiplicator from nonbasic matrix A_N |
maxweightrange | maximal valid range max(|weights|)/min(|weights|) of row weights |
rows | rows of LP relaxation of scip |
nrows | number of rows |
Definition at line 86 of file sepa_disjunctive.c.
References getSimplexCoefficients(), REALABS, SCIP_Real, SCIPisGT(), and SCIProwGetRank().
Referenced by SCIP_DECL_SEPAEXECLP().
|
static |
gets the nonbasic coefficients of a simplex row
scip | SCIP pointer |
rows | LP rows |
nrows | number LP rows |
cols | LP columns |
ncols | number of LP columns |
coef | row of \(B^{-1} \cdot A\) |
binvrow | row of \(B^{-1}\) |
simplexcoefs | pointer to store the nonbasic simplex-coefficients |
nonbasicnumber | pointer to store the number of nonbasic simplex-coefficients |
Definition at line 132 of file sepa_disjunctive.c.
References generateDisjCutSOS1(), SCIP_BASESTAT_LOWER, SCIP_BASESTAT_UPPER, SCIP_OKAY, SCIPcolGetBasisStatus(), SCIPgetRowLPActivity(), SCIPisFeasZero(), SCIProwGetBasisStatus(), SCIProwGetLhs(), and SCIProwGetRhs().
Referenced by getVarRank(), and SCIP_DECL_SEPAEXECLP().
|
static |
computes a disjunctive cut inequality based on two simplex taubleau rows
scip | SCIP pointer |
sepa | separator |
rows | LP rows |
nrows | number of LP rows |
cols | LP columns |
ncols | number of LP columns |
ndisjcuts | number of disjunctive cuts found so far |
scale | should cut be scaled |
strengthen | should cut be strengthened if integer variables are present |
cutlhs1 | left hand side of the first simplex row |
cutlhs2 | left hand side of the second simplex row |
bound1 | bound of first simplex row |
bound2 | bound of second simplex row |
simplexcoefs1 | simplex coefficients of first row |
simplexcoefs2 | simplex coefficients of second row |
cutcoefs | pointer to store cut coefficients (length: nscipvars) |
row | pointer to store disjunctive cut inequality |
madeintegral | pointer to store whether cut has been scaled to integral values |
Definition at line 189 of file sepa_disjunctive.c.
References FALSE, MAX, REALABS, SCIP_BASESTAT_BASIC, SCIP_BASESTAT_LOWER, SCIP_BASESTAT_UPPER, SCIP_BASESTAT_ZERO, SCIP_CALL, SCIP_DECL_SEPACOPY(), SCIP_Longint, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIPaddVarToRow(), SCIPcacheRowExtensions(), SCIPceil(), SCIPcolGetBasisStatus(), SCIPcolGetLb(), SCIPcolGetLPPos(), SCIPcolGetUb(), SCIPcolGetVar(), SCIPcolIsIntegral(), SCIPcreateEmptyRowSepa(), SCIPepsilon(), SCIPfloor(), SCIPflushRowExtensions(), SCIPgetDepth(), SCIPgetNLPs(), SCIPgetRowLPActivity(), SCIPinfinity(), SCIPisFeasLE(), SCIPisFeasPositive(), SCIPisFeasZero(), SCIPisInfinity(), SCIPisNegative(), SCIPmakeRowIntegral(), SCIProwGetBasisStatus(), SCIProwGetCols(), SCIProwGetConstant(), SCIProwGetLhs(), SCIProwGetNNonz(), SCIProwGetRhs(), SCIProwGetVals(), SCIProwIsInLP(), SCIPsepaGetName(), SCIPsnprintf(), SCIPsumepsilon(), and TRUE.
Referenced by getSimplexCoefficients(), and SCIP_DECL_SEPAEXECLP().
|
static |
copy method for separator plugins (called when SCIP copies plugins)
Definition at line 418 of file sepa_disjunctive.c.
References SCIP_CALL, SCIP_DECL_SEPAFREE(), SCIP_OKAY, SCIPincludeSepaDisjunctive(), SCIPsepaGetName(), and SEPA_NAME.
Referenced by generateDisjCutSOS1().
|
static |
destructor of separator to free user data (called when SCIP is exiting)
Definition at line 433 of file sepa_disjunctive.c.
References SCIP_DECL_SEPAEXITSOL(), SCIP_OKAY, SCIPfreeBlockMemory, SCIPsepaGetData(), SCIPsepaGetName(), SCIPsepaSetData(), and SEPA_NAME.
Referenced by SCIP_DECL_SEPACOPY().
|
static |
solving process initialization method of separator
Definition at line 453 of file sepa_disjunctive.c.
References SCIP_DECL_SEPAEXECLP(), SCIP_OKAY, SCIPfindConshdlr(), and SCIPsepaGetData().
Referenced by SCIP_DECL_SEPAFREE().
|
static |
LP solution separation method for disjunctive cuts
Definition at line 468 of file sepa_disjunctive.c.
References FALSE, generateDisjCutSOS1(), getSimplexCoefficients(), getVarRank(), MAKECONTINTEGRAL, MAX, REALABS, SCIP_BASESTAT_BASIC, SCIP_BASESTAT_LOWER, SCIP_BASESTAT_UPPER, SCIP_BASESTAT_ZERO, SCIP_Bool, SCIP_CALL, SCIP_CUTOFF, SCIP_DELAYED, SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_LPSOLSTAT_OPTIMAL, SCIP_OKAY, SCIP_Real, SCIP_SEPARATED, SCIPaddRow(), SCIPallocBufferArray, SCIPceil(), SCIPcolGetBasisStatus(), SCIPcolGetLb(), SCIPcolGetLPPos(), SCIPcolGetPrimsol(), SCIPcolGetUb(), SCIPconshdlrGetNConss(), SCIPdebug, SCIPdebugMsg, SCIPdigraphGetNArcs(), SCIPdigraphGetNSuccessors(), SCIPdigraphGetSuccessors(), SCIPfreeBufferArrayNull, SCIPgetConflictgraphSOS1(), SCIPgetDepth(), SCIPgetLPBasisInd(), SCIPgetLPBInvARow(), SCIPgetLPBInvRow(), SCIPgetLPColsData(), SCIPgetLPRowsData(), SCIPgetLPSolstat(), SCIPgetNCutsFound(), SCIPgetNSOS1Vars(), SCIPgetRowLPActivity(), SCIPgetSolVal(), SCIPincludeSepaDisjunctive(), SCIPisCutEfficacious(), SCIPisEQ(), SCIPisFeasGT(), SCIPisFeasPositive(), SCIPisFeasZero(), SCIPisInfinity(), SCIPisLPSolBasic(), SCIPisStopped(), SCIPnodeGetVarSOS1(), SCIPprintRow(), SCIPreleaseRow(), SCIProwChgRank(), SCIProwGetBasisStatus(), SCIProwGetCols(), SCIProwGetLhs(), SCIProwGetNNonz(), SCIProwGetRhs(), SCIProwGetVals(), SCIProwIsInLP(), SCIPsepaGetData(), SCIPsepaGetName(), SCIPsepaGetNCallsAtNode(), SCIPsepaWasLPDelayed(), SCIPsortDownRealInt(), SCIPvarGetCol(), SCIPvarIsActive(), and SEPA_NAME.
Referenced by SCIP_DECL_SEPAEXITSOL().