Scippy

    SCIP

    Solving Constraint Integer Programs

    cuts.h
    Go to the documentation of this file.
    1/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
    2/* */
    3/* This file is part of the program and library */
    4/* SCIP --- Solving Constraint Integer Programs */
    5/* */
    6/* Copyright (c) 2002-2025 Zuse Institute Berlin (ZIB) */
    7/* */
    8/* Licensed under the Apache License, Version 2.0 (the "License"); */
    9/* you may not use this file except in compliance with the License. */
    10/* You may obtain a copy of the License at */
    11/* */
    12/* http://www.apache.org/licenses/LICENSE-2.0 */
    13/* */
    14/* Unless required by applicable law or agreed to in writing, software */
    15/* distributed under the License is distributed on an "AS IS" BASIS, */
    16/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
    17/* See the License for the specific language governing permissions and */
    18/* limitations under the License. */
    19/* */
    20/* You should have received a copy of the Apache-2.0 license */
    21/* along with SCIP; see the file LICENSE. If not visit scipopt.org. */
    22/* */
    23/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
    24
    25/**@file cuts.h
    26 * @ingroup PUBLICCOREAPI
    27 * @brief methods for the aggregation rows
    28 * @author Jakob Witzig
    29 * @author Leona Gottwald
    30 *
    31 */
    32
    33/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
    34
    35#ifndef __SCIP_CUTS_H__
    36#define __SCIP_CUTS_H__
    37
    38#include "scip/def.h"
    39#include "scip/struct_cuts.h"
    40#include "scip/type_cuts.h"
    41#include "scip/type_lp.h"
    42#include "scip/type_misc.h"
    43#include "scip/type_retcode.h"
    44#include "scip/type_scip.h"
    45#include "scip/type_sol.h"
    46#include "scip/type_var.h"
    47
    48#ifdef __cplusplus
    49extern "C" {
    50#endif
    51
    52/**@addtogroup PublicCutMethods
    53 *
    54 * @{
    55 */
    56
    57/** perform activity based coefficient tigthening on the given cut; returns TRUE if the cut was detected
    58 * to be redundant due to acitivity bounds
    59 *
    60 * See also cons_linear.c:consdataTightenCoefs().
    61 */
    62SCIP_EXPORT
    64 SCIP* scip, /**< SCIP data structure */
    65 SCIP_Bool cutislocal, /**< is the cut local? */
    66 SCIP_Real* cutcoefs, /**< array of the non-zero coefficients in the cut */
    67 SCIP_Real* cutrhs, /**< the right hand side of the cut */
    68 int* cutinds, /**< array of the problem indices of variables with a non-zero coefficient in the cut */
    69 int* cutnnz, /**< the number of non-zeros in the cut */
    70 int* nchgcoefs /**< number of changed coefficients */
    71 );
    72
    73/** create an empty aggregation row
    74 *
    75 * @note By default, this data structure uses quad precision via double-double arithmetic, i.e., it allocates a
    76 * SCIP_Real array of length two times SCIPgetNVars() for storing the coefficients. In exact solving mode, we
    77 * cannot use quad precision because we need to control the ronding mode, hence only the first SCIPgetNVars()
    78 * entries are used.
    79 */
    80SCIP_EXPORT
    82 SCIP* scip, /**< SCIP data structure */
    83 SCIP_AGGRROW** aggrrow /**< pointer to return the aggregation row */
    84 );
    85
    86/** free a the aggregation row */
    87SCIP_EXPORT
    89 SCIP* scip, /**< SCIP data structure */
    90 SCIP_AGGRROW** aggrrow /**< pointer to the aggregation row that should be freed */
    91 );
    92
    93/** output aggregation row to file stream */
    94SCIP_EXPORT
    96 SCIP* scip, /**< SCIP data structure */
    97 SCIP_AGGRROW* aggrrow, /**< pointer to return aggregation row */
    98 FILE* file /**< output file (or NULL for standard output) */
    99 );
    100
    101/** copy the aggregation row */
    102SCIP_EXPORT
    104 SCIP* scip, /**< SCIP data structure */
    105 SCIP_AGGRROW** aggrrow, /**< pointer to return the aggregation row */
    106 SCIP_AGGRROW* source /**< source the aggregation row */
    107 );
    108
    109/** add weighted row to the aggregation row */
    110SCIP_EXPORT
    112 SCIP* scip, /**< SCIP data structure */
    113 SCIP_AGGRROW* aggrrow, /**< the aggregation row */
    114 SCIP_ROW* row, /**< row to add to the aggregation row */
    115 SCIP_Real weight, /**< scale for adding given row to the aggregation row */
    116 int sidetype /**< specify row side type (-1 = lhs, 0 = automatic, 1 = rhs) */
    117 );
    118
    119/** add weighted row to aggregation row
    120 * @note this method is the variant of SCIPaggrRowAddRow that is safe to use in exact solving mode
    121 */
    122SCIP_EXPORT
    124 SCIP* scip, /**< SCIP data structure */
    125 SCIP_AGGRROW* aggrrow, /**< aggregation row */
    126 SCIP_ROW* row, /**< row to add to aggregation row */
    127 SCIP_Real weight, /**< scale for adding given row to aggregation row */
    128 int sidetype, /**< specify row side type (-1 = lhs, 0 = automatic, 1 = rhs) */
    129 SCIP_Bool* success /**< was the row added successfully */
    130 );
    131
    132/** Removes a given variable @p var from position @p pos the aggregation row and updates the right-hand side according
    133 * to sign of the coefficient, i.e., rhs -= coef * bound, where bound = lb if coef >= 0 and bound = ub, otherwise.
    134 *
    135 * @note: The choice of global or local bounds depend on the validity (global or local) of the aggregation row.
    136 *
    137 * @note: The list of non-zero indices will be updated by swapping the last non-zero index to @p pos.
    138 */
    139SCIP_EXPORT
    141 SCIP* scip, /**< SCIP data structure */
    142 SCIP_AGGRROW* aggrrow, /**< the aggregation row */
    143 SCIP_VAR* var, /**< variable that should be removed */
    144 int pos, /**< position of the variable in the aggregation row */
    145 SCIP_Bool* valid /**< pointer to return whether the aggregation row is still valid */
    146 );
    147
    148/** add the objective function with right-hand side @p rhs and scaled by @p scale to the aggregation row */
    149SCIP_EXPORT
    151 SCIP* scip, /**< SCIP data structure */
    152 SCIP_AGGRROW* aggrrow, /**< the aggregation row */
    153 SCIP_Real rhs, /**< right-hand side of the artificial row */
    154 SCIP_Real scale /**< scalar */
    155 );
    156
    157/** add the objective function with right-hand side @p rhs and scaled by @p scale to the aggregation row
    158 * variant of SCIPaggrRowAddObjectiveFunction that is safe to use in exact mode */
    159SCIP_EXPORT
    161 SCIP* scip, /**< SCIP data structure */
    162 SCIP_AGGRROW* aggrrow, /**< the aggregation row */
    163 SCIP_Real rhs, /**< right-hand side of the artificial row */
    164 SCIP_Real scale /**< scalar */
    165 );
    166
    167/** add weighted constraint to the aggregation row */
    168SCIP_EXPORT
    170 SCIP* scip, /**< SCIP data structure */
    171 SCIP_AGGRROW* aggrrow, /**< the aggregation row */
    172 int* inds, /**< variable problem indices in constraint to add to the aggregation row */
    173 SCIP_Real* vals, /**< values of constraint to add to the aggregation row */
    174 int len, /**< length of constraint to add to the aggregation row */
    175 SCIP_Real rhs, /**< right hand side of constraint to add to the aggregation row */
    176 SCIP_Real weight, /**< (positive) scale for adding given constraint to the aggregation row */
    177 int rank, /**< rank to use for given constraint */
    178 SCIP_Bool local /**< is constraint only valid locally */
    179 );
    180
    181/** calculates the efficacy norm of the given aggregation row, which depends on the "separating/efficacynorm" parameter
    182 *
    183 * @return the efficacy norm of the given aggregation row, which depends on the "separating/efficacynorm" parameter
    184 */
    185SCIP_EXPORT
    187 SCIP* scip, /**< SCIP data structure */
    188 SCIP_AGGRROW* aggrrow /**< the aggregation row */
    189 );
    190
    191/** clear all entries in the aggregation row but do not free the internal memory */
    192SCIP_EXPORT
    194 SCIP_AGGRROW* aggrrow /**< the aggregation row */
    195 );
    196
    197/** version for use in exact solving mode of SCIPaggrRowClear() */
    198SCIP_EXPORT
    200 SCIP_AGGRROW* aggrrow /**< the aggregation row */
    201 );
    202
    203/** aggregate rows using the given weights; the current content of the aggregation row, \p aggrrow, is overwritten
    204 *
    205 * @note this method is safe for usage in exact solving mode
    206 */
    207SCIP_EXPORT
    209 SCIP* scip, /**< SCIP data structure */
    210 SCIP_AGGRROW* aggrrow, /**< the aggregation row */
    211 SCIP_Real* weights, /**< row weights in row summation */
    212 int* rowinds, /**< array to store indices of non-zero entries of the weights array, or NULL */
    213 int nrowinds, /**< number of non-zero entries in weights array, -1 if rowinds is NULL */
    214 SCIP_Bool sidetypebasis, /**< choose sidetypes of row (lhs/rhs) based on basis information? */
    215 SCIP_Bool allowlocal, /**< should local rows be used? */
    216 int negslack, /**< should negative slack variables be used? (0: no, 1: only for integral rows, 2: yes) */
    217 int maxaggrlen, /**< maximal number of non-zeros in the aggregation row */
    218 SCIP_Bool* valid /**< is the aggregation valid */
    219 );
    220
    221/** removes all (close enough to) zero entries in the aggregation row */
    222SCIP_EXPORT
    224 SCIP* scip, /**< SCIP datastructure */
    225 SCIP_AGGRROW* aggrrow, /**< the aggregation row */
    226 SCIP_Bool useglbbounds, /**< consider global bound although the cut is local? */
    227 SCIP_Bool* valid /**< pointer to return whether the aggregation row is still valid */
    228 );
    229
    230/** get array with lp positions of aggregated rows */
    231SCIP_EXPORT
    233 SCIP_AGGRROW* aggrrow /**< the aggregation row */
    234 );
    235
    236/** get array with weights of aggregated rows */
    237SCIP_EXPORT
    239 SCIP_AGGRROW* aggrrow /**< the aggregation row */
    240 );
    241
    242/** checks whether a given row has been added to the aggregation row */
    243SCIP_EXPORT
    245 SCIP_AGGRROW* aggrrow, /**< the aggregation row */
    246 SCIP_ROW* row /**< row for which it is checked whether it has been added to the aggregation */
    247 );
    248
    249/** gets the min and max absolute value of the weights used to aggregate the rows;
    250 * must not be called for empty aggregation rows
    251 */
    252SCIP_EXPORT
    254 SCIP_AGGRROW* aggrrow, /**< the aggregation row */
    255 SCIP_Real* minabsrowweight, /**< pointer to store smallest absolute value of weights used for aggregating rows */
    256 SCIP_Real* maxabsrowweight /**< pointer to store largest absolute value of weights used for aggregating rows */
    257 );
    258
    259/** gets the array of corresponding variable problem indices for each non-zero in the aggregation row */
    260SCIP_EXPORT
    262 SCIP_AGGRROW* aggrrow
    263 );
    264
    265/** gets the number of non-zeros in the aggregation row */
    266SCIP_EXPORT
    268 SCIP_AGGRROW* aggrrow /**< the aggregation row */
    269 );
    270
    271/** gets the non-zero value for the given non-zero index */
    272static INLINE
    274 SCIP_AGGRROW* aggrrow, /**< the aggregation row */
    275 int i /**< non-zero index; must be between 0 and SCIPaggrRowGetNNz(aggrrow) - 1 */
    276 )
    277{
    278 SCIP_Real QUAD(val);
    279
    280 QUAD_ARRAY_LOAD(val, aggrrow->vals, aggrrow->inds[i]);
    281
    282 return QUAD_TO_DBL(val);
    283}
    284
    285/** gets the non-zero value for the given non-zero index */
    286static INLINE
    288 SCIP_AGGRROW* aggrrow, /**< the aggregation row */
    289 int i /**< non-zero index; must be between 0 and SCIPaggrRowGetNNz(aggrrow) - 1 */
    290 )
    291{
    292 return aggrrow->vals[aggrrow->inds[i]];
    293}
    294
    295/** gets the non-zero value for the given problem index of a variable */
    296static INLINE
    298 SCIP_AGGRROW* aggrrow, /**< the aggregation row */
    299 int probindex /**< problem index of variable; must be between 0 and SCIPgetNVars(scip) - 1 */
    300 )
    301{
    302 SCIP_Real QUAD(val);
    303
    304 QUAD_ARRAY_LOAD(val, aggrrow->vals, probindex);
    305
    306 return QUAD_TO_DBL(val);
    307}
    308
    309/** gets the rank of the aggregation row */
    310SCIP_EXPORT
    312 SCIP_AGGRROW* aggrrow /**< the aggregation row */
    313 );
    314
    315/** checks if the aggregation row is only valid locally */
    316SCIP_EXPORT
    318 SCIP_AGGRROW* aggrrow /**< the aggregation row */
    319 );
    320
    321/** gets the right hand side of the aggregation row */
    322SCIP_EXPORT
    324 SCIP_AGGRROW* aggrrow /**< the aggregation row */
    325 );
    326
    327/** gets the number of row aggregations */
    328SCIP_EXPORT
    330 SCIP_AGGRROW* aggrrow /**< aggregation row */
    331 );
    332
    333/** calculates an MIR cut out of the weighted sum of LP rows given by an aggregation row; the
    334 * aggregation row must not contain non-zero weights for modifiable rows, because these rows cannot
    335 * participate in an MIR cut.
    336 *
    337 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    338 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    339 *
    340 * @pre This method can be called if @p scip is in one of the following stages:
    341 * - \ref SCIP_STAGE_SOLVING
    342 *
    343 * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
    344 */
    345SCIP_EXPORT
    347 SCIP* scip, /**< SCIP data structure */
    348 SCIP_SOL* sol, /**< the solution that should be separated, or NULL for LP solution */
    349 SCIP_Bool postprocess, /**< apply a post-processing step to the resulting cut? */
    350 SCIP_Real boundswitch, /**< fraction of domain up to which lower bound is used in transformation */
    351 int vartypeusevbds, /**< for all variable types with index smaller than this number, variable
    352 * type substitution is allowed. The indices are: 0: continuous,
    353 * 1: continuous implint., 2: integer implint, 3: binary implint,
    354 * 4: integer, 5: binary */
    355 SCIP_Bool allowlocal, /**< should local information allowed to be used, resulting in a local cut? */
    356 SCIP_Bool fixintegralrhs, /**< should complementation tried to be adjusted such that rhs gets fractional? */
    357 int* boundsfortrans, /**< bounds that should be used for transformed variables: vlb_idx/vub_idx,
    358 * -1 for global lb/ub, -2 for local lb/ub, or -3 for using closest bound;
    359 * NULL for using closest bound for all variables */
    360 SCIP_BOUNDTYPE* boundtypesfortrans, /**< type of bounds that should be used for transformed variables;
    361 * NULL for using closest bound for all variables */
    362 SCIP_Real minfrac, /**< minimal fractionality of rhs to produce MIR cut for */
    363 SCIP_Real maxfrac, /**< maximal fractionality of rhs to produce MIR cut for */
    364 SCIP_Real scale, /**< additional scaling factor multiplied to the aggrrow; must be positive */
    365 SCIP_AGGRROW* aggrrow, /**< the aggregation row to compute an MIR cut for */
    366 SCIP_Real* cutcoefs, /**< array to store the non-zero coefficients in the cut */
    367 SCIP_Real* cutrhs, /**< pointer to store the right hand side of the cut */
    368 int* cutinds, /**< array to store the problem indices of variables with a non-zero coefficient in the cut */
    369 int* cutnnz, /**< pointer to store the number of non-zeros in the cut */
    370 SCIP_Real* cutefficacy, /**< pointer to store the efficacy of the cut, or NULL */
    371 int* cutrank, /**< pointer to return rank of generated cut */
    372 SCIP_Bool* cutislocal, /**< pointer to store whether the generated cut is only valid locally */
    373 SCIP_Bool* success /**< pointer to store whether the returned coefficients are a valid MIR cut */
    374 );
    375
    376/** calculates an MIR cut out of the weighted sum of LP rows given by an aggregation row; the
    377 * aggregation row must not contain non-zero weights for modifiable rows, because these rows cannot
    378 * participate in an MIR cut. The function uses a cut generation heuristic which tries different scaling
    379 * factors and complementations of the variables to improve the cut's efficacy.
    380 * For further details we refer to:
    381 *
    382 * Marchand, H., & Wolsey, L. A. (2001). Aggregation and mixed integer rounding to solve MIPs.
    383 * Operations research, 49(3), 363-371.
    384 *
    385 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    386 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    387 *
    388 * @pre This method can be called if @p scip is in one of the following stages:
    389 * - \ref SCIP_STAGE_SOLVING
    390 *
    391 * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
    392 */
    393SCIP_EXPORT
    395 SCIP* scip, /**< SCIP data structure */
    396 SCIP_SOL* sol, /**< the solution that should be separated, or NULL for LP solution */
    397 SCIP_Bool postprocess, /**< apply a post-processing step to the resulting cut? */
    398 SCIP_Real boundswitch, /**< fraction of domain up to which lower bound is used in transformation */
    399 int vartypeusevbds, /**< for all variable types with index smaller than this number, variable
    400 * type substitution is allowed. The indices are: 0: continuous,
    401 * 1: continuous implint., 2: integer implint, 3: binary implint,
    402 * 4: integer, 5: binary */
    403 SCIP_Bool allowlocal, /**< should local information allowed to be used, resulting in a local cut? */
    404 int maxtestdelta, /**< maximum number of deltas to test */
    405 int* boundsfortrans, /**< bounds that should be used for transformed variables: vlb_idx/vub_idx,
    406 * -1 for global lb/ub, -2 for local lb/ub, or -3 for using closest bound;
    407 * NULL for using closest bound for all variables */
    408 SCIP_BOUNDTYPE* boundtypesfortrans, /**< type of bounds that should be used for transformed variables;
    409 * NULL for using closest bound for all variables */
    410 SCIP_Real minfrac, /**< minimal fractionality of rhs to produce MIR cut for */
    411 SCIP_Real maxfrac, /**< maximal fractionality of rhs to produce MIR cut for */
    412 SCIP_AGGRROW* aggrrow, /**< the aggregation row to compute MIR cut for */
    413 SCIP_Real* cutcoefs, /**< array to store the non-zero coefficients in the cut */
    414 SCIP_Real* cutrhs, /**< pointer to store the right hand side of the cut */
    415 int* cutinds, /**< array to store the problem indices of variables with a non-zero coefficient in the cut */
    416 int* cutnnz, /**< pointer to store the number of non-zeros in the cut */
    417 SCIP_Real* cutefficacy, /**< pointer to store efficacy of best cut; only cuts that are strictly better than the value of
    418 * this efficacy on input to this function are returned */
    419 int* cutrank, /**< pointer to return rank of generated cut */
    420 SCIP_Bool* cutislocal, /**< pointer to store whether the generated cut is only valid locally */
    421 SCIP_Bool* success /**< pointer to store whether a valid and efficacious cut was returned */
    422 );
    423
    424/** calculates a lifted simple generalized flow cover cut out of the weighted sum of LP rows given by an aggregation row; the
    425 * aggregation row must not contain non-zero weights for modifiable rows, because these rows cannot
    426 * participate in the cut.
    427 * For further details we refer to:
    428 *
    429 * Gu, Z., Nemhauser, G. L., & Savelsbergh, M. W. (1999). Lifted flow cover inequalities for mixed 0-1 integer programs.
    430 * Mathematical Programming, 85(3), 439-467.
    431 *
    432 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    433 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    434 *
    435 * @pre This method can be called if @p scip is in one of the following stages:
    436 * - \ref SCIP_STAGE_SOLVING
    437 *
    438 * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
    439 */
    440SCIP_EXPORT
    442 SCIP* scip, /**< SCIP data structure */
    443 SCIP_SOL* sol, /**< the solution that should be separated, or NULL for LP solution */
    444 SCIP_Bool postprocess, /**< apply a post-processing step to the resulting cut? */
    445 SCIP_Real boundswitch, /**< fraction of domain up to which lower bound is used in transformation */
    446 SCIP_Bool allowlocal, /**< should local information allowed to be used, resulting in a local cut? */
    447 SCIP_AGGRROW* aggrrow, /**< the aggregation row to compute flow cover cut for */
    448 SCIP_Real* cutcoefs, /**< array to store the non-zero coefficients in the cut */
    449 SCIP_Real* cutrhs, /**< pointer to store the right hand side of the cut */
    450 int* cutinds, /**< array to store the problem indices of variables with a non-zero coefficient in the cut */
    451 int* cutnnz, /**< pointer to store the number of non-zeros in the cut */
    452 SCIP_Real* cutefficacy, /**< pointer to store the efficacy of the cut, or NULL */
    453 int* cutrank, /**< pointer to return rank of generated cut */
    454 SCIP_Bool* cutislocal, /**< pointer to store whether the generated cut is only valid locally */
    455 SCIP_Bool* success /**< pointer to store whether a valid cut was returned */
    456 );
    457
    458/** calculates a lifted knapsack cover cut out of the weighted sum of LP rows given by an aggregation row; the
    459 * aggregation row must not contain non-zero weights for modifiable rows, because these rows cannot
    460 * participate in the cut.
    461 * For further details we refer to:
    462 *
    463 * Letchford, A. N., & Souli, G. (2019). On lifted cover inequalities: A new lifting procedure with unusual properties.
    464 * Operations Research Letters, 47(2), 83-87.
    465 *
    466 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    467 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    468 *
    469 * @pre This method can be called if @p scip is in one of the following stages:
    470 * - \ref SCIP_STAGE_SOLVING
    471 *
    472 * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
    473 */
    474SCIP_EXPORT
    476 SCIP* scip, /**< SCIP data structure */
    477 SCIP_SOL* sol, /**< the solution that should be separated, or NULL for LP solution */
    478 SCIP_Bool allowlocal, /**< should local information allowed to be used, resulting in a local cut? */
    479 SCIP_AGGRROW* aggrrow, /**< the aggregation row to compute flow cover cut for */
    480 SCIP_Real* cutcoefs, /**< array to store the non-zero coefficients in the cut */
    481 SCIP_Real* cutrhs, /**< pointer to store the right hand side of the cut */
    482 int* cutinds, /**< array to store the problem indices of variables with a non-zero coefficient in the cut */
    483 int* cutnnz, /**< pointer to store the number of non-zeros in the cut */
    484 SCIP_Real* cutefficacy, /**< pointer to store the efficacy of the cut, or NULL */
    485 int* cutrank, /**< pointer to return rank of generated cut */
    486 SCIP_Bool* cutislocal, /**< pointer to store whether the generated cut is only valid locally */
    487 SCIP_Bool* success /**< pointer to store whether a valid cut was returned */
    488 );
    489
    490/** calculates a strong CG cut out of the weighted sum of LP rows given by an aggregation row; the
    491 * aggregation row must not contain non-zero weights for modifiable rows, because these rows cannot
    492 * participate in a strongcg cut
    493 *
    494 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    495 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    496 *
    497 * @pre This method can be called if @p scip is in one of the following stages:
    498 * - \ref SCIP_STAGE_SOLVING
    499 *
    500 * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
    501 */
    502SCIP_EXPORT
    504 SCIP* scip, /**< SCIP data structure */
    505 SCIP_SOL* sol, /**< the solution that should be separated, or NULL for LP solution */
    506 SCIP_Bool postprocess, /**< apply a post-processing step to the resulting cut? */
    507 SCIP_Real boundswitch, /**< fraction of domain up to which lower bound is used in transformation */
    508 int vartypeusevbds, /**< for all variable types with index smaller than this number, variable
    509 * type substitution is allowed. The indices are: 0: continuous,
    510 * 1: continuous implint., 2: integer implint, 3: binary implint,
    511 * 4: integer, 5: binary */
    512 SCIP_Bool allowlocal, /**< should local information allowed to be used, resulting in a local cut? */
    513 SCIP_Real minfrac, /**< minimal fractionality of rhs to produce strong CG cut for */
    514 SCIP_Real maxfrac, /**< maximal fractionality of rhs to produce strong CG cut for */
    515 SCIP_Real scale, /**< additional scaling factor multiplied to all rows */
    516 SCIP_AGGRROW* aggrrow, /**< the aggregation row to compute a strong CG cut for */
    517 SCIP_Real* cutcoefs, /**< array to store the non-zero coefficients in the cut */
    518 SCIP_Real* cutrhs, /**< pointer to store the right hand side of the cut */
    519 int* cutinds, /**< array to store the problem indices of variables with a non-zero coefficient in the cut */
    520 int* cutnnz, /**< pointer to store the number of non-zeros in the cut */
    521 SCIP_Real* cutefficacy, /**< pointer to store the efficacy of the cut, or NULL */
    522 int* cutrank, /**< pointer to return rank of generated cut */
    523 SCIP_Bool* cutislocal, /**< pointer to store whether the generated cut is only valid locally */
    524 SCIP_Bool* success /**< pointer to store whether a valid cut was returned */
    525 );
    526
    527/** @} */
    528
    529#ifdef __cplusplus
    530}
    531#endif
    532
    533#endif
    #define QUAD(x)
    Definition: dbldblarith.h:47
    #define QUAD_ARRAY_LOAD(r, a, idx)
    Definition: dbldblarith.h:54
    #define QUAD_TO_DBL(x)
    Definition: dbldblarith.h:49
    common defines and data types used in all packages of SCIP
    #define INLINE
    Definition: def.h:120
    #define SCIP_Bool
    Definition: def.h:91
    #define SCIP_Real
    Definition: def.h:156
    void SCIPaggrRowGetAbsWeightRange(SCIP_AGGRROW *aggrrow, SCIP_Real *minabsrowweight, SCIP_Real *maxabsrowweight)
    void SCIPaggrRowCancelVarWithBound(SCIP *scip, SCIP_AGGRROW *aggrrow, SCIP_VAR *var, int pos, SCIP_Bool *valid)
    Definition: cuts.c:3008
    SCIP_Bool SCIPaggrRowHasRowBeenAdded(SCIP_AGGRROW *aggrrow, SCIP_ROW *row)
    Definition: cuts.c:4005
    SCIP_RETCODE SCIPcutGenerationHeuristicCMIR(SCIP *scip, SCIP_SOL *sol, SCIP_Bool postprocess, SCIP_Real boundswitch, int vartypeusevbds, 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:8339
    SCIP_RETCODE SCIPcalcMIR(SCIP *scip, SCIP_SOL *sol, SCIP_Bool postprocess, SCIP_Real boundswitch, int vartypeusevbds, 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:7923
    int SCIPaggrRowGetRank(SCIP_AGGRROW *aggrrow)
    Definition: cuts.c:4048
    SCIP_Bool SCIPcutsTightenCoefficients(SCIP *scip, SCIP_Bool cutislocal, SCIP_Real *cutcoefs, SCIP_Real *cutrhs, int *cutinds, int *cutnnz, int *nchgcoefs)
    Definition: cuts.c:2466
    void SCIPaggrRowClearSafely(SCIP_AGGRROW *aggrrow)
    Definition: cuts.c:3196
    SCIP_RETCODE SCIPaggrRowCreate(SCIP *scip, SCIP_AGGRROW **aggrrow)
    Definition: cuts.c:2668
    SCIP_RETCODE SCIPaggrRowAddRowSafely(SCIP *scip, SCIP_AGGRROW *aggrrow, SCIP_ROW *row, SCIP_Real weight, int sidetype, SCIP_Bool *success)
    Definition: cuts.c:2887
    SCIP_RETCODE SCIPcalcKnapsackCover(SCIP *scip, SCIP_SOL *sol, 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:12270
    SCIP_RETCODE SCIPaggrRowAddObjectiveFunctionSafely(SCIP *scip, SCIP_AGGRROW *aggrrow, SCIP_Real rhs, SCIP_Real scale)
    void SCIPaggrRowClear(SCIP_AGGRROW *aggrrow)
    Definition: cuts.c:3218
    SCIP_RETCODE SCIPaggrRowCopy(SCIP *scip, SCIP_AGGRROW **aggrrow, SCIP_AGGRROW *source)
    Definition: cuts.c:2758
    SCIP_Bool SCIPaggrRowIsLocal(SCIP_AGGRROW *aggrrow)
    Definition: cuts.c:4058
    SCIP_Real SCIPaggrRowGetRhs(SCIP_AGGRROW *aggrrow)
    Definition: cuts.c:4068
    int SCIPaggrRowGetNRows(SCIP_AGGRROW *aggrrow)
    Definition: cuts.c:3973
    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:3143
    SCIP_RETCODE SCIPcalcStrongCG(SCIP *scip, SCIP_SOL *sol, SCIP_Bool postprocess, SCIP_Real boundswitch, int vartypeusevbds, 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:13281
    static INLINE SCIP_Real SCIPaggrRowGetValue(SCIP_AGGRROW *aggrrow, int i)
    Definition: cuts.h:273
    void SCIPaggrRowFree(SCIP *scip, SCIP_AGGRROW **aggrrow)
    Definition: cuts.c:2700
    int * SCIPaggrRowGetInds(SCIP_AGGRROW *aggrrow)
    Definition: cuts.c:4028
    void SCIPaggrRowPrint(SCIP *scip, SCIP_AGGRROW *aggrrow, FILE *file)
    Definition: cuts.c:2721
    void SCIPaggrRowRemoveZeros(SCIP *scip, SCIP_AGGRROW *aggrrow, SCIP_Bool useglbbounds, SCIP_Bool *valid)
    Definition: cuts.c:3949
    SCIP_Real * SCIPaggrRowGetRowWeights(SCIP_AGGRROW *aggrrow)
    Definition: cuts.c:3994
    int SCIPaggrRowGetNNz(SCIP_AGGRROW *aggrrow)
    Definition: cuts.c:4038
    SCIP_RETCODE SCIPaggrRowAddRow(SCIP *scip, SCIP_AGGRROW *aggrrow, SCIP_ROW *row, SCIP_Real weight, int sidetype)
    Definition: cuts.c:2804
    static INLINE SCIP_Real SCIPaggrRowGetProbvarValue(SCIP_AGGRROW *aggrrow, int probindex)
    Definition: cuts.h:297
    int * SCIPaggrRowGetRowInds(SCIP_AGGRROW *aggrrow)
    Definition: cuts.c:3983
    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:3523
    SCIP_RETCODE SCIPaggrRowAddObjectiveFunction(SCIP *scip, SCIP_AGGRROW *aggrrow, SCIP_Real rhs, SCIP_Real scale)
    Definition: cuts.c:3067
    static INLINE SCIP_Real SCIPaggrRowGetValueSafely(SCIP_AGGRROW *aggrrow, int i)
    Definition: cuts.h:287
    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:11645
    SCIP_Real SCIPaggrRowCalcEfficacyNorm(SCIP *scip, SCIP_AGGRROW *aggrrow)
    Definition: cuts.c:3243
    SCIP_Real * vals
    Definition: struct_cuts.h:42
    struct definitions for cuts
    type definitions for cuts
    type definitions for LP management
    enum SCIP_BoundType SCIP_BOUNDTYPE
    Definition: type_lp.h:60
    type definitions for miscellaneous datastructures
    type definitions for return codes for SCIP methods
    enum SCIP_Retcode SCIP_RETCODE
    Definition: type_retcode.h:63
    type definitions for SCIP's main datastructure
    type definitions for storing primal CIP solutions
    type definitions for problem variables