cuts.h
Go to the documentation of this file.
24 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
48 /** perform activity based coefficient tigthening on the given cut; returns TRUE if the cut was detected
57 int* cutinds, /**< array of the problem indices of variables with a non-zero coefficient in the cut */
102 /** Removes a given variable @p var from position @p pos the aggregation row and updates the right-hand side according
103 * to sign of the coefficient, i.e., rhs -= coef * bound, where bound = lb if coef >= 0 and bound = ub, otherwise.
105 * @note: The choice of global or local bounds depend on the validity (global or local) of the aggregation row.
107 * @note: The list of non-zero indices will be updated by swapping the last non-zero index to @p pos.
118 /** add the objective function with right-hand side @p rhs and scaled by @p scale to the aggregation row */
141 /** calculates the efficacy norm of the given aggregation row, which depends on the "separating/efficacynorm" parameter
143 * @return the efficacy norm of the given aggregation row, which depends on the "separating/efficacynorm" parameter
169 int negslack, /**< should negative slack variables be used? (0: no, 1: only for integral rows, 2: yes) */
208 SCIP_Real* minabsrowweight, /**< pointer to store smallest absolute value of weights used for aggregating rows */
209 SCIP_Real* maxabsrowweight /**< pointer to store largest absolute value of weights used for aggregating rows */
212 /** gets the array of corresponding variable problem indices for each non-zero in the aggregation row */
291 SCIP_Real efficacyweight, /**< weight of efficacy (shortest cutoff distance) in score calculation */
301 * aggregation row must not contain non-zero weights for modifiable rows, because these rows cannot
304 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
317 SCIP_Real boundswitch, /**< fraction of domain up to which lower bound is used in transformation */
319 SCIP_Bool allowlocal, /**< should local information allowed to be used, resulting in a local cut? */
320 SCIP_Bool fixintegralrhs, /**< should complementation tried to be adjusted such that rhs gets fractional? */
321 int* boundsfortrans, /**< bounds that should be used for transformed variables: vlb_idx/vub_idx,
324 SCIP_BOUNDTYPE* boundtypesfortrans, /**< type of bounds that should be used for transformed variables;
332 int* cutinds, /**< array to store the problem indices of variables with a non-zero coefficient in the cut */
337 SCIP_Bool* success /**< pointer to store whether the returned coefficients are a valid MIR cut */
341 * aggregation row must not contain non-zero weights for modifiable rows, because these rows cannot
342 * participate in an MIR cut. The function uses a cut generation heuristic which tries different scaling
349 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
362 SCIP_Real boundswitch, /**< fraction of domain up to which lower bound is used in transformation */
364 SCIP_Bool allowlocal, /**< should local information allowed to be used, resulting in a local cut? */
366 int* boundsfortrans, /**< bounds that should be used for transformed variables: vlb_idx/vub_idx,
369 SCIP_BOUNDTYPE* boundtypesfortrans, /**< type of bounds that should be used for transformed variables;
376 int* cutinds, /**< array to store the problem indices of variables with a non-zero coefficient in the cut */
378 SCIP_Real* cutefficacy, /**< pointer to store efficacy of best cut; only cuts that are strictly better than the value of
385 /** calculates a lifted simple generalized flow cover cut out of the weighted sum of LP rows given by an aggregation row; the
386 * aggregation row must not contain non-zero weights for modifiable rows, because these rows cannot
390 * Gu, Z., Nemhauser, G. L., & Savelsbergh, M. W. (1999). Lifted flow cover inequalities for mixed 0-1 integer programs.
393 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
406 SCIP_Real boundswitch, /**< fraction of domain up to which lower bound is used in transformation */
407 SCIP_Bool allowlocal, /**< should local information allowed to be used, resulting in a local cut? */
411 int* cutinds, /**< array to store the problem indices of variables with a non-zero coefficient in the cut */
419 /** calculates a strong CG cut out of the weighted sum of LP rows given by an aggregation row; the
420 * aggregation row must not contain non-zero weights for modifiable rows, because these rows cannot
423 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
436 SCIP_Real boundswitch, /**< fraction of domain up to which lower bound is used in transformation */
438 SCIP_Bool allowlocal, /**< should local information allowed to be used, resulting in a local cut? */
445 int* cutinds, /**< array to store the problem indices of variables with a non-zero coefficient in the cut */
SCIP_EXPORT SCIP_Bool SCIPaggrRowHasRowBeenAdded(SCIP_AGGRROW *aggrrow, SCIP_ROW *row)
Definition: cuts.c:2367
SCIP_EXPORT SCIP_Real SCIPaggrRowCalcEfficacyNorm(SCIP *scip, SCIP_AGGRROW *aggrrow)
Definition: cuts.c:2009
SCIP_EXPORT SCIP_RETCODE SCIPaggrRowCopy(SCIP *scip, SCIP_AGGRROW **aggrrow, SCIP_AGGRROW *source)
Definition: cuts.c:1673
type definitions for miscellaneous datastructures
Definition: struct_scip.h:59
Definition: struct_cuts.h:31
SCIP_EXPORT void SCIPaggrRowGetAbsWeightRange(SCIP_AGGRROW *aggrrow, SCIP_Real *minabsrowweight, SCIP_Real *maxabsrowweight)
Definition: struct_var.h:198
Definition: struct_misc.h:259
type definitions for cuts
SCIP_EXPORT void SCIPaggrRowFree(SCIP *scip, SCIP_AGGRROW **aggrrow)
Definition: cuts.c:1616
type definitions for return codes for SCIP methods
SCIP_EXPORT void SCIPaggrRowRemoveZeros(SCIP *scip, SCIP_AGGRROW *aggrrow, SCIP_Bool useglbbounds, SCIP_Bool *valid)
Definition: cuts.c:2320
SCIP_EXPORT SCIP_RETCODE SCIPaggrRowCreate(SCIP *scip, SCIP_AGGRROW **aggrrow)
Definition: cuts.c:1584
SCIP_EXPORT int * SCIPaggrRowGetRowInds(SCIP_AGGRROW *aggrrow)
Definition: cuts.c:2345
SCIP_EXPORT int * SCIPaggrRowGetInds(SCIP_AGGRROW *aggrrow)
Definition: cuts.c:2390
type definitions for LP management
Definition: struct_sol.h:64
SCIP_EXPORT void SCIPaggrRowCancelVarWithBound(SCIP *scip, SCIP_AGGRROW *aggrrow, SCIP_VAR *var, int pos, SCIP_Bool *valid)
Definition: cuts.c:1806
SCIP_EXPORT SCIP_RETCODE SCIPaggrRowSumRows(SCIP *scip, SCIP_AGGRROW *aggrrow, SCIP_Real *weights, int *rowinds, int nrowinds, SCIP_Bool sidetypebasis, SCIP_Bool allowlocal, int negslack, int maxaggrlen, SCIP_Bool *valid)
Definition: cuts.c:2128
SCIP_EXPORT SCIP_RETCODE SCIPaggrRowAddCustomCons(SCIP *scip, SCIP_AGGRROW *aggrrow, int *inds, SCIP_Real *vals, int len, SCIP_Real rhs, SCIP_Real weight, int rank, SCIP_Bool local)
Definition: cuts.c:1934
SCIP_EXPORT SCIP_Real SCIPaggrRowGetRhs(SCIP_AGGRROW *aggrrow)
Definition: cuts.c:2430
type definitions for SCIP's main datastructure
type definitions for problem variables
SCIP_EXPORT SCIP_Bool SCIPcutsTightenCoefficients(SCIP *scip, SCIP_Bool cutislocal, SCIP_Real *cutcoefs, SCIP_Real *cutrhs, int *cutinds, int *cutnnz, int *nchgcoefs)
Definition: cuts.c:1383
Definition: struct_lp.h:192
SCIP_EXPORT SCIP_RETCODE SCIPcutGenerationHeuristicCMIR(SCIP *scip, SCIP_SOL *sol, SCIP_Bool postprocess, SCIP_Real boundswitch, SCIP_Bool usevbds, SCIP_Bool allowlocal, int maxtestdelta, int *boundsfortrans, SCIP_BOUNDTYPE *boundtypesfortrans, SCIP_Real minfrac, SCIP_Real maxfrac, SCIP_AGGRROW *aggrrow, SCIP_Real *cutcoefs, SCIP_Real *cutrhs, int *cutinds, int *cutnnz, SCIP_Real *cutefficacy, int *cutrank, SCIP_Bool *cutislocal, SCIP_Bool *success)
Definition: cuts.c:4281
SCIP_EXPORT SCIP_RETCODE SCIPcalcStrongCG(SCIP *scip, SCIP_SOL *sol, SCIP_Bool postprocess, SCIP_Real boundswitch, SCIP_Bool usevbds, SCIP_Bool allowlocal, SCIP_Real minfrac, SCIP_Real maxfrac, SCIP_Real scale, SCIP_AGGRROW *aggrrow, SCIP_Real *cutcoefs, SCIP_Real *cutrhs, int *cutinds, int *cutnnz, SCIP_Real *cutefficacy, int *cutrank, SCIP_Bool *cutislocal, SCIP_Bool *success)
Definition: cuts.c:8291
type definitions for storing primal CIP solutions
SCIP_EXPORT int SCIPaggrRowGetNRows(SCIP_AGGRROW *aggrrow)
Definition: cuts.c:2335
SCIP_EXPORT void SCIPaggrRowPrint(SCIP *scip, SCIP_AGGRROW *aggrrow, FILE *file)
Definition: cuts.c:1636
SCIP_EXPORT SCIP_RETCODE SCIPaggrRowAddObjectiveFunction(SCIP *scip, SCIP_AGGRROW *aggrrow, SCIP_Real rhs, SCIP_Real scale)
Definition: cuts.c:1863
SCIP_EXPORT SCIP_RETCODE SCIPaggrRowAddRow(SCIP *scip, SCIP_AGGRROW *aggrrow, SCIP_ROW *row, SCIP_Real weight, int sidetype)
Definition: cuts.c:1719
SCIP_EXPORT SCIP_RETCODE SCIPcalcFlowCover(SCIP *scip, SCIP_SOL *sol, SCIP_Bool postprocess, SCIP_Real boundswitch, SCIP_Bool allowlocal, SCIP_AGGRROW *aggrrow, SCIP_Real *cutcoefs, SCIP_Real *cutrhs, int *cutinds, int *cutnnz, SCIP_Real *cutefficacy, int *cutrank, SCIP_Bool *cutislocal, SCIP_Bool *success)
Definition: cuts.c:7480
SCIP_EXPORT SCIP_RETCODE SCIPselectCuts(SCIP *scip, SCIP_ROW **cuts, SCIP_RANDNUMGEN *randnumgen, SCIP_Real goodscorefac, SCIP_Real badscorefac, SCIP_Real goodmaxparall, SCIP_Real maxparall, SCIP_Real dircutoffdistweight, SCIP_Real efficacyweight, SCIP_Real objparalweight, SCIP_Real intsupportweight, int ncuts, int nforcedcuts, int maxselectedcuts, int *nselectedcuts)
Definition: cuts.c:2512
SCIP_EXPORT SCIP_Real * SCIPaggrRowGetRowWeights(SCIP_AGGRROW *aggrrow)
Definition: cuts.c:2356
SCIP_EXPORT SCIP_Bool SCIPaggrRowIsLocal(SCIP_AGGRROW *aggrrow)
Definition: cuts.c:2420
static INLINE SCIP_Real SCIPaggrRowGetProbvarValue(SCIP_AGGRROW *aggrrow, int probindex)
Definition: cuts.h:240
common defines and data types used in all packages of SCIP
SCIP_EXPORT SCIP_RETCODE SCIPcalcMIR(SCIP *scip, SCIP_SOL *sol, SCIP_Bool postprocess, SCIP_Real boundswitch, SCIP_Bool usevbds, SCIP_Bool allowlocal, SCIP_Bool fixintegralrhs, int *boundsfortrans, SCIP_BOUNDTYPE *boundtypesfortrans, SCIP_Real minfrac, SCIP_Real maxfrac, SCIP_Real scale, SCIP_AGGRROW *aggrrow, SCIP_Real *cutcoefs, SCIP_Real *cutrhs, int *cutinds, int *cutnnz, SCIP_Real *cutefficacy, int *cutrank, SCIP_Bool *cutislocal, SCIP_Bool *success)
Definition: cuts.c:3963
Definition: objbenders.h:33
static INLINE SCIP_Real SCIPaggrRowGetValue(SCIP_AGGRROW *aggrrow, int i)
Definition: cuts.h:226
struct definitions for cuts