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) */
207 SCIP_Real* minabsrowweight, /**< pointer to store smallest absolute value of weights used for aggregating rows */
208 SCIP_Real* maxabsrowweight /**< pointer to store largest absolute value of weights used for aggregating rows */
211 /** gets the array of corresponding variable problem indices for each non-zero in the aggregation row */
290 SCIP_Real efficacyweight, /**< weight of efficacy (shortest cutoff distance) in score calculation */
300 * aggregation row must not contain non-zero weights for modifiable rows, because these rows cannot
303 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
316 SCIP_Real boundswitch, /**< fraction of domain up to which lower bound is used in transformation */
318 SCIP_Bool allowlocal, /**< should local information allowed to be used, resulting in a local cut? */
319 SCIP_Bool fixintegralrhs, /**< should complementation tried to be adjusted such that rhs gets fractional? */
320 int* boundsfortrans, /**< bounds that should be used for transformed variables: vlb_idx/vub_idx,
323 SCIP_BOUNDTYPE* boundtypesfortrans, /**< type of bounds that should be used for transformed variables;
331 int* cutinds, /**< array to store the problem indices of variables with a non-zero coefficient in the cut */
336 SCIP_Bool* success /**< pointer to store whether the returned coefficients are a valid MIR cut */
340 * aggregation row must not contain non-zero weights for modifiable rows, because these rows cannot
341 * participate in an MIR cut. The function uses a cut generation heuristic which tries different scaling
348 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
361 SCIP_Real boundswitch, /**< fraction of domain up to which lower bound is used in transformation */
363 SCIP_Bool allowlocal, /**< should local information allowed to be used, resulting in a local cut? */
365 int* boundsfortrans, /**< bounds that should be used for transformed variables: vlb_idx/vub_idx,
368 SCIP_BOUNDTYPE* boundtypesfortrans, /**< type of bounds that should be used for transformed variables;
375 int* cutinds, /**< array to store the problem indices of variables with a non-zero coefficient in the cut */
377 SCIP_Real* cutefficacy, /**< pointer to store efficacy of best cut; only cuts that are strictly better than the value of
384 /** calculates a lifted simple generalized flow cover cut out of the weighted sum of LP rows given by an aggregation row; the
385 * aggregation row must not contain non-zero weights for modifiable rows, because these rows cannot
389 * Gu, Z., Nemhauser, G. L., & Savelsbergh, M. W. (1999). Lifted flow cover inequalities for mixed 0-1 integer programs.
392 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
405 SCIP_Real boundswitch, /**< fraction of domain up to which lower bound is used in transformation */
406 SCIP_Bool allowlocal, /**< should local information allowed to be used, resulting in a local cut? */
410 int* cutinds, /**< array to store the problem indices of variables with a non-zero coefficient in the cut */
418 /** calculates a strong CG cut out of the weighted sum of LP rows given by an aggregation row; the
419 * aggregation row must not contain non-zero weights for modifiable rows, because these rows cannot
422 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
435 SCIP_Real boundswitch, /**< fraction of domain up to which lower bound is used in transformation */
437 SCIP_Bool allowlocal, /**< should local information allowed to be used, resulting in a local cut? */
444 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:2330
SCIP_EXPORT SCIP_Real SCIPaggrRowCalcEfficacyNorm(SCIP *scip, SCIP_AGGRROW *aggrrow)
Definition: cuts.c:1974
SCIP_EXPORT SCIP_RETCODE SCIPaggrRowCopy(SCIP *scip, SCIP_AGGRROW **aggrrow, SCIP_AGGRROW *source)
Definition: cuts.c:1638
type definitions for miscellaneous datastructures
Definition: struct_scip.h:58
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:255
type definitions for cuts
SCIP_EXPORT void SCIPaggrRowFree(SCIP *scip, SCIP_AGGRROW **aggrrow)
Definition: cuts.c:1581
type definitions for return codes for SCIP methods
SCIP_EXPORT SCIP_RETCODE SCIPaggrRowCreate(SCIP *scip, SCIP_AGGRROW **aggrrow)
Definition: cuts.c:1549
SCIP_EXPORT int * SCIPaggrRowGetRowInds(SCIP_AGGRROW *aggrrow)
Definition: cuts.c:2308
SCIP_EXPORT int * SCIPaggrRowGetInds(SCIP_AGGRROW *aggrrow)
Definition: cuts.c:2353
type definitions for LP management
Definition: struct_sol.h:63
SCIP_EXPORT void SCIPaggrRowCancelVarWithBound(SCIP *scip, SCIP_AGGRROW *aggrrow, SCIP_VAR *var, int pos, SCIP_Bool *valid)
Definition: cuts.c:1771
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:2093
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:1899
SCIP_EXPORT SCIP_Real SCIPaggrRowGetRhs(SCIP_AGGRROW *aggrrow)
Definition: cuts.c:2393
type definitions for SCIP's main datastructure
SCIP_EXPORT void SCIPaggrRowRemoveZeros(SCIP *scip, SCIP_AGGRROW *aggrrow, SCIP_Bool *valid)
Definition: cuts.c:2285
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:1348
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:4225
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:8219
type definitions for storing primal CIP solutions
SCIP_EXPORT int SCIPaggrRowGetNRows(SCIP_AGGRROW *aggrrow)
Definition: cuts.c:2298
SCIP_EXPORT void SCIPaggrRowPrint(SCIP *scip, SCIP_AGGRROW *aggrrow, FILE *file)
Definition: cuts.c:1601
SCIP_EXPORT SCIP_RETCODE SCIPaggrRowAddObjectiveFunction(SCIP *scip, SCIP_AGGRROW *aggrrow, SCIP_Real rhs, SCIP_Real scale)
Definition: cuts.c:1828
SCIP_EXPORT SCIP_RETCODE SCIPaggrRowAddRow(SCIP *scip, SCIP_AGGRROW *aggrrow, SCIP_ROW *row, SCIP_Real weight, int sidetype)
Definition: cuts.c:1684
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:7412
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:2475
SCIP_EXPORT SCIP_Real * SCIPaggrRowGetRowWeights(SCIP_AGGRROW *aggrrow)
Definition: cuts.c:2319
SCIP_EXPORT SCIP_Bool SCIPaggrRowIsLocal(SCIP_AGGRROW *aggrrow)
Definition: cuts.c:2383
static INLINE SCIP_Real SCIPaggrRowGetProbvarValue(SCIP_AGGRROW *aggrrow, int probindex)
Definition: cuts.h:239
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:3907
Definition: objbenders.h:33
static INLINE SCIP_Real SCIPaggrRowGetValue(SCIP_AGGRROW *aggrrow, int i)
Definition: cuts.h:225
struct definitions for cuts