common methods used to manipulate, generate, and strengthen cuts and to organize the cutpool
SCIP_Bool SCIPcutsTightenCoefficients | ( | SCIP * | scip, |
SCIP_Bool | cutislocal, | ||
SCIP_Real * | cutcoefs, | ||
SCIP_Real * | cutrhs, | ||
int * | cutinds, | ||
int * | cutnnz, | ||
int * | nchgcoefs ) |
perform activity based coefficient tigthening on the given cut; returns TRUE if the cut was detected to be redundant due to acitivity bounds
See also cons_linear.c:consdataTightenCoefs().
perform activity based coefficient tightening on the given cut; returns TRUE if the cut was detected to be redundant due to activity bounds
See also cons_linear.c:consdataTightenCoefs().
scip | SCIP data structure |
cutislocal | is the cut local? |
cutcoefs | array of the non-zero coefficients in the cut |
cutrhs | the right hand side of the cut |
cutinds | array of the problem indices of variables with a non-zero coefficient in the cut |
cutnnz | the number of non-zeros in the cut |
nchgcoefs | number of changed coefficients |
Definition at line 1535 of file cuts.c.
References assert(), FALSE, i, MAX, NULL, QUAD, QUAD_ASSIGN, QUAD_TO_DBL, SCIP_CALL_ABORT, SCIPallocBufferArray, SCIPceil(), SCIPdebugMsg, SCIPfloor(), SCIPfreeBufferArray, SCIPfreeBufferArrayNull, SCIPgetNContVars(), SCIPgetNVars(), SCIPgetVars(), SCIPisFeasLE(), SCIPisGT(), SCIPisInfinity(), SCIPisLE(), SCIPisNegative(), SCIPisPositive(), SCIPquadprecProdDD, SCIPquadprecProdQD, SCIPquadprecSumDD, SCIPquadprecSumQD, SCIPquadprecSumQQ, SCIPsortDownRealRealInt(), SCIPvarGetLbGlobal(), SCIPvarGetLbLocal(), SCIPvarGetUbGlobal(), SCIPvarGetUbLocal(), SCIPvarIsIntegral(), TRUE, and vars.
Referenced by computeMIRForOptimalityCut(), generateZerohalfCut(), tightenCoefficients(), and transformNonIntegralRow().
SCIP_RETCODE SCIPaggrRowCreate | ( | SCIP * | scip, |
SCIP_AGGRROW ** | aggrrow ) |
create an empty the aggregation row
create an empty aggregation row
scip | SCIP data structure |
aggrrow | pointer to return aggregation row |
Definition at line 1731 of file cuts.c.
References assert(), BMSclearMemoryArray, FALSE, NULL, nvars, QUAD_ARRAY_SIZE, QUAD_ASSIGN, SCIP_CALL, SCIP_OKAY, SCIPallocBlockMemory, SCIPallocBlockMemoryArray, and SCIPgetNVars().
Referenced by computeMIRForOptimalityCut(), conflictAnalyzeLP(), createCGCuts(), doSeparation(), generateClusterCuts(), generateGMICuts(), SCIP_DECL_SEPAEXECLP(), SCIPrunBoundHeuristic(), and setupAggregationData().
void SCIPaggrRowFree | ( | SCIP * | scip, |
SCIP_AGGRROW ** | aggrrow ) |
free a the aggregation row
free a aggregation row
scip | SCIP data structure |
aggrrow | pointer to aggregation row that should be freed |
Definition at line 1763 of file cuts.c.
References assert(), NULL, nvars, QUAD_ARRAY_SIZE, SCIPfreeBlockMemory, SCIPfreeBlockMemoryArray, SCIPfreeBlockMemoryArrayNull, and SCIPgetNVars().
Referenced by computeMIRForOptimalityCut(), conflictAnalyzeLP(), createCGCuts(), destroyAggregationData(), doSeparation(), generateClusterCuts(), generateGMICuts(), SCIP_DECL_SEPAEXECLP(), and SCIPrunBoundHeuristic().
void SCIPaggrRowPrint | ( | SCIP * | scip, |
SCIP_AGGRROW * | aggrrow, | ||
FILE * | file ) |
output aggregation row to file stream
scip | SCIP data structure |
aggrrow | pointer to return aggregation row |
file | output file (or NULL for standard output) |
Definition at line 1784 of file cuts.c.
References assert(), i, SCIP_AggrRow::inds, SCIP_AggrRow::nnz, NULL, QUAD, QUAD_ARRAY_LOAD, QUAD_TO_DBL, SCIPgetMessagehdlr(), SCIPgetVars(), SCIPmessageFPrintInfo(), SCIPvarGetName(), SCIPvarGetProbindex(), SCIP_AggrRow::vals, and vars.
SCIP_RETCODE SCIPaggrRowCopy | ( | SCIP * | scip, |
SCIP_AGGRROW ** | aggrrow, | ||
SCIP_AGGRROW * | source ) |
copy the aggregation row
copy a aggregation row
scip | SCIP data structure |
aggrrow | pointer to return aggregation row |
source | source aggregation row |
Definition at line 1821 of file cuts.c.
References assert(), SCIP_AggrRow::inds, SCIP_AggrRow::local, SCIP_AggrRow::nnz, SCIP_AggrRow::nrows, NULL, nvars, QUAD_ARRAY_SIZE, QUAD_ASSIGN_Q, SCIP_AggrRow::rank, SCIP_AggrRow::rowsinds, SCIP_AggrRow::rowweights, SCIP_CALL, SCIP_OKAY, SCIPallocBlockMemory, SCIPduplicateBlockMemoryArray, SCIPgetNVars(), SCIP_AggrRow::slacksign, and SCIP_AggrRow::vals.
SCIP_RETCODE SCIPaggrRowAddRow | ( | SCIP * | scip, |
SCIP_AGGRROW * | aggrrow, | ||
SCIP_ROW * | row, | ||
SCIP_Real | weight, | ||
int | sidetype ) |
add weighted row to the aggregation row
add weighted row to aggregation row
scip | SCIP data structure |
aggrrow | aggregation row |
row | row to add to aggregation row |
weight | scale for adding given row to aggregation row |
sidetype | specify row side type (-1 = lhs, 0 = automatic, 1 = rhs) |
Definition at line 1867 of file cuts.c.
References assert(), SCIP_Row::constant, FALSE, i, SCIP_AggrRow::inds, SCIP_Row::integral, SCIP_Row::lhs, SCIP_AggrRow::local, SCIP_Row::local, SCIP_Row::lppos, MAX, SCIP_AggrRow::nnz, SCIP_AggrRow::nrows, QUAD, SCIP_AggrRow::rank, SCIP_Row::rank, SCIP_Row::rhs, SCIP_AggrRow::rowsinds, SCIP_AggrRow::rowssize, SCIP_AggrRow::rowweights, SCIP_CALL, SCIP_OKAY, SCIPcalcMemGrowSize(), SCIPceil(), SCIPfloor(), SCIPisInfinity(), SCIPquadprecProdDD, SCIPquadprecSumQQ, SCIPreallocBlockMemoryArray, SCIProwGetLPPos(), SCIP_AggrRow::slacksign, TRUE, SCIP_AggrRow::vals, and varVecAddScaledRowCoefsQuad().
Referenced by addRowToAggrRow(), aggregateNextRow(), and aggregation().
void SCIPaggrRowCancelVarWithBound | ( | SCIP * | scip, |
SCIP_AGGRROW * | aggrrow, | ||
SCIP_VAR * | var, | ||
int | pos, | ||
SCIP_Bool * | valid ) |
Removes a given variable var
from position pos
the aggregation row and updates the right-hand side according to sign of the coefficient, i.e., rhs -= coef * bound, where bound = lb if coef >= 0 and bound = ub, otherwise.
pos
. scip | SCIP data structure |
aggrrow | the aggregation row |
var | variable that should be removed |
pos | position of the variable in the aggregation row |
valid | pointer to return whether the aggregation row is still valid |
Definition at line 1953 of file cuts.c.
References assert(), FALSE, SCIP_AggrRow::inds, SCIP_AggrRow::local, SCIP_AggrRow::nnz, NULL, QUAD, QUAD_ARRAY_LOAD, QUAD_ARRAY_STORE, QUAD_ASSIGN, QUAD_HI, QUAD_TO_DBL, SCIPinfinity(), SCIPisInfinity(), SCIPquadprecProdQD, SCIPquadprecSumQQ, SCIPvarGetLbGlobal(), SCIPvarGetLbLocal(), SCIPvarGetProbindex(), SCIPvarGetUbGlobal(), SCIPvarGetUbLocal(), TRUE, valid, SCIP_AggrRow::vals, and var.
SCIP_RETCODE SCIPaggrRowAddObjectiveFunction | ( | SCIP * | scip, |
SCIP_AGGRROW * | aggrrow, | ||
SCIP_Real | rhs, | ||
SCIP_Real | scale ) |
add the objective function with right-hand side rhs
and scaled by scale
to the aggregation row
scip | SCIP data structure |
aggrrow | the aggregation row |
rhs | right-hand side of the artificial row |
scale | scalar |
Definition at line 2012 of file cuts.c.
References assert(), i, SCIP_AggrRow::inds, SCIP_AggrRow::nnz, NONZERO, NULL, nvars, QUAD, QUAD_ARRAY_LOAD, QUAD_ARRAY_STORE, QUAD_ASSIGN, QUAD_HI, SCIP_OKAY, SCIPgetNVars(), SCIPgetVars(), SCIPisZero(), SCIPquadprecProdDD, SCIPquadprecSumQQ, SCIPvarGetObj(), SCIPvarGetProbindex(), SCIP_AggrRow::vals, and vars.
Referenced by aggregation(), and SCIPgetDualProof().
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 ) |
add weighted constraint to the aggregation row
scip | SCIP data structure |
aggrrow | the aggregation row |
inds | variable problem indices in constraint to add to the aggregation row |
vals | values of constraint to add to the aggregation row |
len | length of constraint to add to the aggregation row |
rhs | right hand side of constraint to add to the aggregation row |
weight | (positive) scale for adding given constraint to the aggregation row |
rank | rank to use for given constraint |
local | is constraint only valid locally |
Definition at line 2088 of file cuts.c.
References assert(), i, SCIP_AggrRow::inds, SCIP_AggrRow::local, MAX, SCIP_AggrRow::nnz, NONZERO, QUAD, QUAD_ARRAY_LOAD, QUAD_ARRAY_STORE, QUAD_HI, SCIP_AggrRow::rank, REALABS, SCIP_OKAY, SCIPisInfinity(), SCIPquadprecProdDD, SCIPquadprecSumQQ, and SCIP_AggrRow::vals.
Referenced by computeMIRForOptimalityCut().
SCIP_Real SCIPaggrRowCalcEfficacyNorm | ( | SCIP * | scip, |
SCIP_AGGRROW * | aggrrow ) |
calculates the efficacy norm of the given aggregation row, which depends on the "separating/efficacynorm" parameter
scip | SCIP data structure |
aggrrow | the aggregation row |
Definition at line 2166 of file cuts.c.
References calcEfficacyNormQuad(), SCIP_AggrRow::inds, SCIP_AggrRow::nnz, and SCIP_AggrRow::vals.
Referenced by separateAlternativeProofs().
void SCIPaggrRowClear | ( | SCIP_AGGRROW * | aggrrow | ) |
clear all entries in the aggregation row but do not free the internal memory
clear all entries int the aggregation row but don't free memory
aggrrow | the aggregation row |
Definition at line 2141 of file cuts.c.
References FALSE, i, SCIP_AggrRow::inds, SCIP_AggrRow::local, SCIP_AggrRow::nnz, SCIP_AggrRow::nrows, QUAD, QUAD_ARRAY_STORE, QUAD_ASSIGN, SCIP_AggrRow::rank, and SCIP_AggrRow::vals.
Referenced by aggregation(), SCIPaggrRowSumRows(), and SCIPgetDualProof().
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 ) |
aggregate rows using the given weights; the current content of the aggregation row, aggrrow
, gets overwritten
scip | SCIP data structure |
aggrrow | the aggregation row |
weights | row weights in row summation |
rowinds | array to store indices of non-zero entries of the weights array, or NULL |
nrowinds | number of non-zero entries in weights array, -1 if rowinds is NULL |
sidetypebasis | choose sidetypes of row (lhs/rhs) based on basis information? |
allowlocal | should local rows allowed to be used? |
negslack | should negative slack variables allowed to be used? (0: no, 1: only for integral rows, 2: yes) |
maxaggrlen | maximal length of aggregation row |
valid | is the aggregation valid |
Definition at line 2287 of file cuts.c.
References addOneRow(), assert(), FALSE, NULL, nvars, SCIP_CALL, SCIP_OKAY, SCIPaggrRowClear(), SCIPaggrRowRemoveZeros(), SCIPgetLPRowsData(), SCIPgetVarsData(), valid, and vars.
Referenced by createCGCutCMIR(), createCGCutStrongCG(), generateClusterCuts(), generateGMICuts(), and SCIP_DECL_SEPAEXECLP().
void SCIPaggrRowRemoveZeros | ( | SCIP * | scip, |
SCIP_AGGRROW * | aggrrow, | ||
SCIP_Bool | useglbbounds, | ||
SCIP_Bool * | valid ) |
removes all (close enough to) zero entries in the aggregation row
removes almost zero entries from the aggregation row.
scip | SCIP datastructure |
aggrrow | the aggregation row |
useglbbounds | consider global bound although the cut is local? |
valid | pointer to return whether the aggregation row is still valid |
Definition at line 2479 of file cuts.c.
References assert(), FALSE, SCIP_AggrRow::inds, SCIP_AggrRow::local, SCIP_AggrRow::nnz, NULL, QUAD, removeZerosQuad(), SCIPsumepsilon(), valid, and SCIP_AggrRow::vals.
Referenced by addLocalRows(), aggregateNextRow(), SCIPaggrRowSumRows(), SCIPgetDualProof(), and SCIPgetFarkasProof().
int * SCIPaggrRowGetRowInds | ( | SCIP_AGGRROW * | aggrrow | ) |
get array with lp positions of aggregated rows
get array with lp positions of rows used in aggregation
aggrrow | the aggregation row |
Definition at line 2504 of file cuts.c.
References assert(), SCIP_AggrRow::nrows, NULL, and SCIP_AggrRow::rowsinds.
Referenced by aggregation().
SCIP_Real * SCIPaggrRowGetRowWeights | ( | SCIP_AGGRROW * | aggrrow | ) |
get array with weights of aggregated rows
aggrrow | the aggregation row |
Definition at line 2515 of file cuts.c.
References assert(), SCIP_AggrRow::nrows, NULL, and SCIP_AggrRow::rowweights.
SCIP_Bool SCIPaggrRowHasRowBeenAdded | ( | SCIP_AGGRROW * | aggrrow, |
SCIP_ROW * | row ) |
checks whether a given row has been added to the aggregation row
aggrrow | the aggregation row |
row | row for which it is checked whether it has been added to the aggregation |
Definition at line 2526 of file cuts.c.
References assert(), FALSE, i, SCIP_AggrRow::nrows, NULL, SCIP_AggrRow::rowsinds, SCIProwGetLPPos(), and TRUE.
Referenced by aggregateNextRow().
void SCIPaggrRowGetAbsWeightRange | ( | SCIP_AGGRROW * | aggrrow, |
SCIP_Real * | minabsrowweight, | ||
SCIP_Real * | maxabsrowweight ) |
gets the min and max absolute value of the weights used to aggregate the rows; must not be called for empty aggregation rows
aggrrow | the aggregation row |
minabsrowweight | pointer to store smallest absolute value of weights used for aggregating rows |
maxabsrowweight | pointer to store largest absolute value of weights used for aggregating rows |
int * SCIPaggrRowGetInds | ( | SCIP_AGGRROW * | aggrrow | ) |
gets the array of corresponding variable problem indices for each non-zero in the aggregation row
aggrrow | aggregation row |
Definition at line 2549 of file cuts.c.
References assert(), SCIP_AggrRow::inds, and NULL.
Referenced by aggregateNextRow(), conflictAnalyzeLP(), proofsetAddAggrrow(), SCIPaggrRowGetMinActivity(), SCIPrunBoundHeuristic(), separateAlternativeProofs(), and tightenDualproof().
int SCIPaggrRowGetNNz | ( | SCIP_AGGRROW * | aggrrow | ) |
gets the number of non-zeros in the aggregation row
aggrrow | aggregation row |
Definition at line 2559 of file cuts.c.
References assert(), SCIP_AggrRow::nnz, and NULL.
Referenced by aggregateNextRow(), aggregation(), conflictAnalyzeLP(), proofsetAddAggrrow(), SCIPaggrRowGetMinActivity(), SCIPconflictAnalyzeDualProof(), SCIPrunBoundHeuristic(), separateAlternativeProofs(), and tightenDualproof().
|
static |
gets the non-zero value for the given non-zero index
aggrrow | the aggregation row |
i | non-zero index; must be between 0 and SCIPaggrRowGetNNz(aggrrow) - 1 |
Definition at line 237 of file cuts.h.
References i, SCIP_AggrRow::inds, QUAD, QUAD_ARRAY_LOAD, QUAD_TO_DBL, and SCIP_AggrRow::vals.
|
static |
gets the non-zero value for the given problem index of a variable
aggrrow | the aggregation row |
probindex | problem index of variable; must be between 0 and SCIPgetNVars(scip) - 1 |
Definition at line 251 of file cuts.h.
References QUAD, QUAD_ARRAY_LOAD, QUAD_TO_DBL, and SCIP_AggrRow::vals.
Referenced by aggregateNextRow(), conflictAnalyzeLP(), proofsetAddAggrrow(), SCIPaggrRowGetMinActivity(), SCIPrunBoundHeuristic(), and separateAlternativeProofs().
int SCIPaggrRowGetRank | ( | SCIP_AGGRROW * | aggrrow | ) |
gets the rank of the aggregation row
aggrrow | aggregation row |
Definition at line 2569 of file cuts.c.
References assert(), NULL, and SCIP_AggrRow::rank.
SCIP_Bool SCIPaggrRowIsLocal | ( | SCIP_AGGRROW * | aggrrow | ) |
checks if the aggregation row is only valid locally
aggrrow | aggregation row |
Definition at line 2579 of file cuts.c.
References assert(), SCIP_AggrRow::local, and NULL.
SCIP_Real SCIPaggrRowGetRhs | ( | SCIP_AGGRROW * | aggrrow | ) |
gets the right hand side of the aggregation row
aggrrow | aggregation row |
Definition at line 2589 of file cuts.c.
References assert(), NULL, and QUAD_TO_DBL.
Referenced by addLocalRows(), addRowToAggrRow(), conflictAnalyzeLP(), proofsetAddAggrrow(), SCIPconflictAnalyzeDualProof(), SCIPgetDualProof(), SCIPgetFarkasProof(), SCIPrunBoundHeuristic(), separateAlternativeProofs(), and tightenDualproof().
int SCIPaggrRowGetNRows | ( | SCIP_AGGRROW * | aggrrow | ) |
gets the number of row aggregations
get number of aggregated rows
aggrrow | the aggregation row |
Definition at line 2494 of file cuts.c.
References assert(), SCIP_AggrRow::nrows, and NULL.
Referenced by aggregation().
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 ) |
calculates an MIR cut out of the weighted sum of LP rows given by an aggregation row; the aggregation row must not contain non-zero weights for modifiable rows, because these rows cannot participate in an MIR cut.
scip
is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
calculates an MIR cut out of the weighted sum of LP rows; The weights of modifiable rows are set to 0.0, because these rows cannot participate in an MIR cut.
scip
is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
scip | SCIP data structure |
sol | the solution that should be separated, or NULL for LP solution |
postprocess | apply a post-processing step to the resulting cut? |
boundswitch | fraction of domain up to which lower bound is used in transformation |
usevbds | should variable bounds be used in bound transformation? |
allowlocal | should local information allowed to be used, resulting in a local cut? |
fixintegralrhs | should complementation tried to be adjusted such that rhs gets fractional? |
boundsfortrans | bounds that should be used for transformed variables: vlb_idx/vub_idx, -1 for global lb/ub, -2 for local lb/ub, or -3 for using closest bound; NULL for using closest bound for all variables |
boundtypesfortrans | type of bounds that should be used for transformed variables; NULL for using closest bound for all variables |
minfrac | minimal fractionality of rhs to produce MIR cut for |
maxfrac | maximal fractionality of rhs to produce MIR cut for |
scale | additional scaling factor multiplied to the aggrrow; must be positive |
aggrrow | aggrrow to compute MIR cut for |
cutcoefs | array to store the non-zero coefficients in the cut if its efficacy improves cutefficacy |
cutrhs | pointer to store the right hand side of the cut if its efficacy improves cutefficacy |
cutinds | array to store the indices of non-zero coefficients in the cut if its efficacy improves cutefficacy |
cutnnz | pointer to store the number of non-zeros in the cut if its efficacy improves cutefficacy |
cutefficacy | pointer to store efficacy of cut, or NULL |
cutrank | pointer to return rank of generated cut or NULL if it improves cutefficacy |
cutislocal | pointer to store whether the generated cut is only valid locally if it improves cutefficacy |
success | pointer to store whether the returned coefficients are a valid MIR cut and it improves cutefficacy |
Definition at line 3881 of file cuts.c.
References assert(), BMScopyMemoryArray, calcEfficacyDenseStorageQuad(), cutsRoundMIR(), cutsSubstituteMIR(), cutsTransformMIR(), FALSE, i, SCIP_AggrRow::inds, SCIP_AggrRow::local, MAXCMIRSCALE, SCIP_AggrRow::nnz, SCIP_AggrRow::nrows, NULL, nvars, postprocessCutQuad(), QUAD, QUAD_ARRAY_LOAD, QUAD_ARRAY_SIZE, QUAD_ARRAY_STORE, QUAD_ASSIGN, QUAD_ASSIGN_Q, QUAD_HI, QUAD_LO, QUAD_TO_DBL, SCIP_AggrRow::rank, REALABS, removeZerosQuad(), SCIP_AggrRow::rowsinds, SCIP_AggrRow::rowweights, SCIP_CALL, SCIP_OKAY, SCIPallocBufferArray, SCIPallocCleanBufferArray, SCIPdebug, SCIPdebugMsg, SCIPepsilon(), SCIPfreeBufferArray, SCIPfreeCleanBufferArray, SCIPgetNVars(), SCIPisEfficacious(), SCIPisPositive(), SCIPquadprecEpsFloorQ, SCIPquadprecProdQD, SCIPquadprecSumDD, SCIPquadprecSumQQ, SCIPsumepsilon(), SCIP_AggrRow::slacksign, sol, and SCIP_AggrRow::vals.
Referenced by computeMIRForOptimalityCut(), createCGCutCMIR(), generateClusterCuts(), generateGMICuts(), and SCIP_DECL_SEPAEXECLP().
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 ) |
calculates an MIR cut out of the weighted sum of LP rows given by an aggregation row; the aggregation row must not contain non-zero weights for modifiable rows, because these rows cannot participate in an MIR cut. The function uses a cut generation heuristic which tries different scaling factors and complementations of the variables to improve the cut's efficacy. For further details we refer to:
Marchand, H., & Wolsey, L. A. (2001). Aggregation and mixed integer rounding to solve MIPs. Operations research, 49(3), 363-371.
scip
is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
calculates an MIR cut out of an aggregation of LP rows
Given the aggregation, it is transformed to a mixed knapsack set via complementation (using bounds or variable bounds) Then, different scalings of the mkset are used to generate a MIR and the best is chosen. One of the steps of the MIR is to round the coefficients of the integer variables down, so one would prefer to have integer coefficients for integer variables which are far away from their bounds in the mkset.
scip
is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
scip | SCIP data structure |
sol | the solution that should be separated, or NULL for LP solution |
postprocess | apply a post-processing step to the resulting cut? |
boundswitch | fraction of domain up to which lower bound is used in transformation |
usevbds | should variable bounds be used in bound transformation? |
allowlocal | should local information allowed to be used, resulting in a local cut? |
maxtestdelta | maximum number of deltas to test |
boundsfortrans | bounds that should be used for transformed variables: vlb_idx/vub_idx, -1 for global lb/ub, -2 for local lb/ub, or -3 for using closest bound; NULL for using closest bound for all variables |
boundtypesfortrans | type of bounds that should be used for transformed variables; NULL for using closest bound for all variables |
minfrac | minimal fractionality of rhs to produce MIR cut for |
maxfrac | maximal fractionality of rhs to produce MIR cut for |
aggrrow | aggrrow to compute MIR cut for |
cutcoefs | array to store the non-zero coefficients in the cut |
cutrhs | pointer to store the right hand side of the cut |
cutinds | array to store the problem indices of variables with a non-zero coefficient in the cut |
cutnnz | pointer to store the number of non-zeros in the cut |
cutefficacy | pointer to store efficacy of best cut; only cuts that are strictly better than the value of this efficacy on input to this function are returned |
cutrank | pointer to return rank of generated cut (or NULL) |
cutislocal | pointer to store whether the generated cut is only valid locally |
success | pointer to store whether a valid and efficacious cut was returned |
Definition at line 4220 of file cuts.c.
References assert(), BMScopyMemoryArray, calcEfficacyDenseStorageQuad(), computeMIREfficacy(), cutsRoundMIR(), cutsSubstituteMIR(), cutsTransformMIR(), EPSZ, FALSE, findBestLb(), findBestUb(), i, SCIP_AggrRow::inds, SCIP_Row::integral, SCIP_Row::lhs, SCIP_AggrRow::local, MAX, MIN, SCIP_AggrRow::nnz, SCIP_AggrRow::nrows, NULL, nvars, postprocessCutQuad(), primsol, QUAD, QUAD_ARRAY_LOAD, QUAD_ARRAY_SIZE, QUAD_ARRAY_STORE, QUAD_ASSIGN, QUAD_ASSIGN_Q, QUAD_HI, QUAD_LO, QUAD_TO_DBL, SCIP_AggrRow::rank, REALABS, removeZerosQuad(), SCIP_Row::rhs, SCIP_AggrRow::rowsinds, SCIP_AggrRow::rowweights, SCIP_CALL, SCIP_INVALID, SCIP_OKAY, SCIPallocBufferArray, SCIPallocCleanBufferArray, SCIPcalcIntegralScalar(), SCIPceil(), SCIPdebug, SCIPdebugMsg, SCIPepsilon(), SCIPfloor(), SCIPfreeBufferArray, SCIPfreeCleanBufferArray, SCIPgetLPRows(), SCIPgetNContVars(), SCIPgetNVars(), SCIPgetRowSolActivity(), SCIPgetSolVal(), SCIPgetVars(), SCIPinfinity(), SCIPisEfficacious(), SCIPisEQ(), SCIPisFeasIntegral(), SCIPisInfinity(), SCIPquadprecEpsFloorQ, SCIPquadprecProdDD, SCIPquadprecProdQD, SCIPquadprecSumDD, SCIPquadprecSumQQ, SCIPrelDiff(), SCIPsortDownRealRealInt(), SCIPsumepsilon(), SCIPvarGetLbGlobal(), SCIPvarGetLbLocal(), SCIPvarGetUbGlobal(), SCIPvarGetUbLocal(), SCIPvarGetVlbCoefs(), SCIPvarGetVlbConstants(), SCIPvarGetVlbVars(), SCIPvarGetVubCoefs(), SCIPvarGetVubConstants(), SCIPvarGetVubVars(), SCIP_AggrRow::slacksign, sol, SQR, TRUE, SCIP_AggrRow::vals, var, and vars.
Referenced by aggregation(), and separateAlternativeProofs().
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 ) |
calculates a lifted simple generalized flow cover cut out of the weighted sum of LP rows given by an aggregation row; the aggregation row must not contain non-zero weights for modifiable rows, because these rows cannot participate in the cut. For further details we refer to:
Gu, Z., Nemhauser, G. L., & Savelsbergh, M. W. (1999). Lifted flow cover inequalities for mixed 0-1 integer programs. Mathematical Programming, 85(3), 439-467.
scip
is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
scip | SCIP data structure |
sol | the solution that should be separated, or NULL for LP solution |
postprocess | apply a post-processing step to the resulting cut? |
boundswitch | fraction of domain up to which lower bound is used in transformation |
allowlocal | should local information allowed to be used, resulting in a local cut? |
aggrrow | the aggregation row to compute flow cover cut for |
cutcoefs | array to store the non-zero coefficients in the cut |
cutrhs | pointer to store the right hand side of the cut |
cutinds | array to store the problem indices of variables with a non-zero coefficient in the cut |
cutnnz | pointer to store the number of non-zeros in the cut |
cutefficacy | pointer to store the efficacy of the cut, or NULL |
cutrank | pointer to return rank of generated cut |
cutislocal | pointer to store whether the generated cut is only valid locally |
success | pointer to store whether a valid cut was returned |
Definition at line 7425 of file cuts.c.
References allocSNFRelaxation(), assert(), calcEfficacy(), constructSNFRelaxation(), destroySNFRelaxation(), FALSE, generateLiftedFlowCoverCut(), getFlowCover(), i, SCIP_AggrRow::inds, SCIP_AggrRow::local, SCIP_AggrRow::nnz, NULL, nvars, postprocessCut(), QUAD, QUAD_ASSIGN, QUAD_TO_DBL, SCIP_AggrRow::rank, removeZeros(), SCIP_CALL, SCIP_OKAY, SCIPallocBufferArray, SCIPallocCleanBufferArray, SCIPdebug, SCIPdebugMsg, SCIPfreeBufferArray, SCIPfreeCleanBufferArray, SCIPgetNCuts(), SCIPgetNLPs(), SCIPgetNVars(), SCIPsumepsilon(), sol, and SCIP_AggrRow::vals.
Referenced by aggregation(), computeMIRForOptimalityCut(), and separateAlternativeProofs().
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 ) |
calculates a lifted knapsack cover cut out of the weighted sum of LP rows given by an aggregation row; the aggregation row must not contain non-zero weights for modifiable rows, because these rows cannot participate in the cut. For further details we refer to:
Letchford, A. N., & Souli, G. (2019). On lifted cover inequalities: A new lifting procedure with unusual properties. Operations Research Letters, 47(2), 83-87.
scip
is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
scip | SCIP data structure |
sol | the solution that should be separated, or NULL for LP solution |
allowlocal | should local information allowed to be used, resulting in a local cut? |
aggrrow | the aggregation row to compute flow cover cut for |
cutcoefs | array to store the non-zero coefficients in the cut |
cutrhs | pointer to store the right hand side of the cut |
cutinds | array to store the problem indices of variables with a non-zero coefficient in the cut |
cutnnz | pointer to store the number of non-zeros in the cut |
cutefficacy | pointer to store the efficacy of the cut, or NULL |
cutrank | pointer to return rank of generated cut |
cutislocal | pointer to store whether the generated cut is only valid locally |
success | pointer to store whether a valid cut was returned |
Definition at line 8055 of file cuts.c.
References assert(), BMScopyMemoryArray, calcEfficacy(), calcEfficacyDenseStorageQuad(), computeInitialKnapsackCover(), cutsTransformKnapsackCover(), evaluateLiftingFunctionKnapsack(), FALSE, SCIP_AggrRow::inds, SCIP_AggrRow::local, SCIP_AggrRow::nnz, NONZERO, SCIP_AggrRow::nrows, NULL, nvars, prepareLiftingData(), QUAD, QUAD_ARRAY_LOAD, QUAD_ARRAY_SIZE, QUAD_ARRAY_STORE, QUAD_ASSIGN, QUAD_ASSIGN_Q, QUAD_HI, QUAD_LO, QUAD_TO_DBL, SCIP_AggrRow::rank, SCIP_AggrRow::rowweights, SCIP_CALL, SCIP_OKAY, SCIPABORT, SCIPallocBufferArray, SCIPallocCleanBufferArray, SCIPdebug, SCIPdebugMsg, SCIPfreeBufferArray, SCIPfreeCleanBufferArray, SCIPgetNVars(), SCIPquadprecSumQD, SCIP_AggrRow::slacksign, sol, and SCIP_AggrRow::vals.
Referenced by aggregation().
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 ) |
calculates a strong CG cut out of the weighted sum of LP rows given by an aggregation row; the aggregation row must not contain non-zero weights for modifiable rows, because these rows cannot participate in a strongcg cut
scip
is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
scip | SCIP data structure |
sol | the solution that should be separated, or NULL for LP solution |
postprocess | apply a post-processing step to the resulting cut? |
boundswitch | fraction of domain up to which lower bound is used in transformation |
usevbds | should variable bounds be used in bound transformation? |
allowlocal | should local information allowed to be used, resulting in a local cut? |
minfrac | minimal fractionality of rhs to produce strong CG cut for |
maxfrac | maximal fractionality of rhs to produce strong CG cut for |
scale | additional scaling factor multiplied to all rows |
aggrrow | the aggregation row to compute a strong CG cut for |
cutcoefs | array to store the non-zero coefficients in the cut |
cutrhs | pointer to store the right hand side of the cut |
cutinds | array to store the problem indices of variables with a non-zero coefficient in the cut |
cutnnz | pointer to store the number of non-zeros in the cut |
cutefficacy | pointer to store the efficacy of the cut, or NULL |
cutrank | pointer to return rank of generated cut |
cutislocal | pointer to store whether the generated cut is only valid locally |
success | pointer to store whether a valid cut was returned |
Definition at line 8974 of file cuts.c.
References ABS, assert(), BMScopyMemoryArray, calcEfficacy(), cutsRoundStrongCG(), cutsSubstituteStrongCG(), cutsTransformStrongCG(), FALSE, i, SCIP_AggrRow::inds, SCIP_AggrRow::local, SCIP_AggrRow::nnz, NONZERO, SCIP_AggrRow::nrows, NULL, nvars, postprocessCutQuad(), QUAD, QUAD_ARRAY_LOAD, QUAD_ARRAY_SIZE, QUAD_ARRAY_STORE, QUAD_ASSIGN, QUAD_ASSIGN_Q, QUAD_HI, QUAD_LO, QUAD_TO_DBL, SCIP_AggrRow::rank, removeZerosQuad(), SCIP_AggrRow::rowsinds, SCIP_AggrRow::rowweights, SCIP_CALL, SCIP_OKAY, SCIPallocBufferArray, SCIPallocCleanBufferArray, SCIPceil(), SCIPdebug, SCIPdebugMsg, SCIPepsilon(), SCIPfreeBufferArray, SCIPfreeCleanBufferArray, SCIPgetHugeValue(), SCIPgetNContVars(), SCIPgetNVars(), SCIPisPositive(), SCIPquadprecDivDQ, SCIPquadprecEpsFloorQ, SCIPquadprecProdQD, SCIPquadprecSumDD, SCIPquadprecSumQD, SCIPquadprecSumQQ, SCIPsumepsilon(), SCIP_AggrRow::slacksign, sol, and SCIP_AggrRow::vals.
Referenced by createCGCutStrongCG(), and SCIP_DECL_SEPAEXECLP().
gets the row of the cut
cut | cut |
Definition at line 382 of file cutpool.c.
References assert(), NULL, and SCIP_Cut::row.
Referenced by copyCuts(), and takeCut().
int SCIPcutGetAge | ( | SCIP_CUT * | cut | ) |
returns the ratio of LPs where the row belonging to this cut was active in an LP solution, i.e. where the age of its row has not been increased
cut | cut |
Definition at line 406 of file cutpool.c.
References assert(), NULL, SCIP_Cut::row, SCIProwGetActiveLPCount(), and SCIProwGetNLPsAfterCreation().
Referenced by takeCut().
SCIP_CUT ** SCIPcutpoolGetCuts | ( | SCIP_CUTPOOL * | cutpool | ) |
gets array of cuts in the cut pool
cutpool | cut pool |
Definition at line 1075 of file cutpool.c.
References assert(), SCIP_Cutpool::cuts, and NULL.
Referenced by SCIPgetDelayedPoolCuts(), and SCIPgetPoolCuts().
int SCIPcutpoolGetNCuts | ( | SCIP_CUTPOOL * | cutpool | ) |
get number of cuts in the cut pool
gets number of cuts in the cut pool
cutpool | cut pool |
Definition at line 1085 of file cutpool.c.
References assert(), SCIP_Cutpool::ncuts, and NULL.
Referenced by SCIPgetNDelayedPoolCuts(), SCIPgetNPoolCuts(), and SCIPsepaExecLP().
SCIP_Longint SCIPcutpoolGetMaxNCuts | ( | SCIP_CUTPOOL * | cutpool | ) |
get maximum number of cuts that were stored in the cut pool at the same time
gets maximum number of cuts that were stored in the cut pool at the same time
cutpool | cut pool |
Definition at line 1095 of file cutpool.c.
References assert(), SCIP_Cutpool::maxncuts, and NULL.
Referenced by SCIPprintSeparatorStatistics(), and SCIPsolve().
SCIP_Real SCIPcutpoolGetTime | ( | SCIP_CUTPOOL * | cutpool | ) |
gets time in seconds used for separating cuts from the pool
cutpool | cut pool |
Definition at line 1105 of file cutpool.c.
References assert(), NULL, SCIP_Cutpool::poolclock, and SCIPclockGetTime().
Referenced by SCIPprintSeparatorStatistics(), and SCIPsolve().
SCIP_Longint SCIPcutpoolGetNCalls | ( | SCIP_CUTPOOL * | cutpool | ) |
get number of times the cut pool was separated
cutpool | cut pool |
Definition at line 1115 of file cutpool.c.
References assert(), SCIP_Cutpool::ncalls, and NULL.
Referenced by SCIPprintSeparatorStatistics(), and SCIPsolve().
SCIP_Longint SCIPcutpoolGetNRootCalls | ( | SCIP_CUTPOOL * | cutpool | ) |
get number of times the cut pool was separated at the root
cutpool | cut pool |
Definition at line 1125 of file cutpool.c.
References assert(), SCIP_Cutpool::nrootcalls, and NULL.
Referenced by SCIPprintSeparatorStatistics(), and SCIPsolve().
SCIP_Longint SCIPcutpoolGetNCutsFound | ( | SCIP_CUTPOOL * | cutpool | ) |
get total number of cuts that were separated from the cut pool
get total number of cuts that were added to the cut pool
cutpool | cut pool |
Definition at line 1135 of file cutpool.c.
References assert(), SCIP_Cutpool::ncutsfound, and NULL.
Referenced by SCIPprintSeparatorStatistics(), and SCIPsolve().
SCIP_Longint SCIPcutpoolGetNCutsAdded | ( | SCIP_CUTPOOL * | cutpool | ) |
get total number of cuts that were added from the cut pool to sepastore
cutpool | cut pool |
Definition at line 1145 of file cutpool.c.
References assert(), SCIP_Cutpool::ncutsadded, and NULL.
Referenced by SCIPprintSeparatorStatistics(), and SCIPsolve().
returns row's cutoff distance in the direction of the given primal solution
scip
is in one of the following stages:
scip | SCIP data structure |
sol | solution to compute direction for cutoff distance; must not be NULL |
cut | separated cut |
Definition at line 72 of file scip_cut.c.
References assert(), FALSE, NULL, SCIP_CALL_ABORT, SCIPcheckStage(), SCIProwGetLPSolCutoffDistance(), sol, and TRUE.
returns efficacy of the cut with respect to the given primal solution or the current LP solution: e = -feasibility/norm
scip
is in one of the following stages:
scip | SCIP data structure |
sol | primal CIP solution, or NULL for current LP solution |
cut | separated cut |
Definition at line 94 of file scip_cut.c.
References FALSE, NULL, SCIP_CALL_ABORT, SCIPcheckStage(), SCIProwGetLPEfficacy(), SCIProwGetSolEfficacy(), sol, and TRUE.
Referenced by addCut(), addCut(), addCut(), addCut(), computeCut(), computeProjectionScore(), createCGCutCMIR(), createCGCutDirect(), createCGCutStrongCG(), filterWithDynamicParallelism(), SCIP_DECL_BRANCHEXECLP(), SCIP_DECL_NLHDLRENFO(), SCIP_DECL_SEPAEXECLP(), SCIPprocessRowprepNonlinear(), scoring(), scoring(), scoring(), separateCuts(), separateCuts(), and separateDeterminant().
returns whether the cut's efficacy with respect to the given primal solution or the current LP solution is greater than the minimal cut efficacy
scip
is in one of the following stages:
scip | SCIP data structure |
sol | primal CIP solution, or NULL for current LP solution |
cut | separated cut |
Definition at line 117 of file scip_cut.c.
References FALSE, NULL, SCIP_CALL_ABORT, SCIPcheckStage(), SCIProwIsLPEfficacious(), SCIProwIsSolEfficacious(), SCIPtreeGetCurrentDepth(), sol, and TRUE.
Referenced by addBoundCutSepa(), addCut(), addCut(), addCut(), computeCut(), createCGCutCMIR(), createCGCutStrongCG(), createRow(), generateOddCycleCut(), initsepaBoundInequalityFromCardinality(), initsepaBoundInequalityFromSOS1Cons(), SCIP_DECL_CONSSEPALP(), SCIP_DECL_CONSSEPASOL(), SCIP_DECL_SEPAEXECLP(), SCIP_DECL_SEPAEXECLP(), SCIPprocessRowprepNonlinear(), sepaImplBoundCutsSOS1(), separateCuts(), separateCuts(), separateSequLiftedExtendedWeightInequality(), separateSequLiftedMinimalCoverInequality(), separateSupLiftedMinimalCoverInequality(), and sepaSubtour().
checks, if the given cut's efficacy is larger than the minimal cut efficacy
scip | SCIP data structure |
efficacy | efficacy of the cut |
Definition at line 135 of file scip_cut.c.
References assert(), NULL, SCIPsetIsEfficacious(), and SCIPtreeGetCurrentDepth().
Referenced by addCut(), addCut(), addCut(), computeMIRForOptimalityCut(), constructCutRow(), createCGCutCMIR(), createCGCutDirect(), createCGCutStrongCG(), extendToCover(), generateClusterCuts(), generateZerohalfCut(), LOPseparate(), SCIP_DECL_SEPAEXECLP(), SCIPcalcMIR(), SCIPcutGenerationHeuristicCMIR(), separateCons(), separateCoversOrbisack(), separateCuts(), separateIndicators(), separateOrbisack(), separateOrbisackCovers(), separatePerspective(), separateSCIs(), separateSequLiftedExtendedWeightInequality(), separateSequLiftedMinimalCoverInequality(), separateSupLiftedMinimalCoverInequality(), separateSymresackCovers(), solCutIsViolated(), TCLIQUE_NEWSOL(), and TCLIQUE_NEWSOL().
calculates the efficacy norm of the given vector, which depends on the "separating/efficacynorm" parameter
scip | SCIP data structure |
vals | array of values |
nvals | number of values |
Definition at line 149 of file scip_cut.c.
References assert(), FALSE, i, MAX, NULL, REALABS, SCIPerrorMessage, SCIPisZero(), and SQR.
Referenced by calcEfficacy().
indicates whether a cut is applicable
If the cut has only one variable and this method returns FALSE, it may still be possible that the cut can be added to the LP (as a row instead of a boundchange), but it will be a very weak cut. The user is asked to avoid such cuts.
scip
is in one of the following stages:
indicates whether a cut is applicable, i.e., will modify the LP when applied
scip
is in one of the following stages:
scip | SCIP data structure |
cut | separated cut |
Definition at line 207 of file scip_cut.c.
References FALSE, SCIP_CALL_ABORT, SCIPcheckStage(), SCIPsepastoreIsCutApplicable(), and TRUE.
Referenced by addCut(), and SCIPprocessRowprepNonlinear().
SCIP_RETCODE SCIPaddCut | ( | SCIP * | scip, |
SCIP_SOL * | sol, | ||
SCIP_ROW * | cut, | ||
SCIP_Bool | forcecut, | ||
SCIP_Bool * | infeasible ) |
adds cut to separation storage
scip
is in one of the following stages:
adds cut to separation storage
scip
is in one of the following stages:
scip | SCIP data structure |
sol | primal solution that was separated, or NULL for LP solution |
cut | separated cut |
forcecut | should the cut be forced to enter the LP? |
infeasible | pointer to store whether cut has been detected to be infeasible for local bounds |
Definition at line 227 of file scip_cut.c.
References FALSE, SCIP_CALL, SCIP_UNUSED, SCIPaddRow(), SCIPcheckStage(), sol, and TRUE.
SCIP_RETCODE SCIPaddRow | ( | SCIP * | scip, |
SCIP_ROW * | row, | ||
SCIP_Bool | forcecut, | ||
SCIP_Bool * | infeasible ) |
adds row to separation storage
scip
is in one of the following stages:
scip | SCIP data structure |
row | row |
forcecut | should the row be forced to enter the LP? |
infeasible | pointer to store whether row has been detected to be infeasible for local bounds |
Definition at line 250 of file scip_cut.c.
References assert(), SCIP_Row::cols, FALSE, SCIP_Row::lhs, NULL, SCIP_Row::rhs, SCIP_CALL, SCIP_CONFTYPE_PROPAGATION, SCIP_OKAY, SCIPaddConflictLb(), SCIPaddConflictUb(), SCIPanalyzeConflict(), SCIPcheckStage(), SCIPcolGetVar(), SCIPgetDepth(), SCIPinitConflictAnalysis(), SCIPisConflictAnalysisApplicable(), SCIPisGT(), SCIPisInfinity(), SCIPisLT(), SCIPisZero(), SCIPprobAllColsInLP(), SCIProwGetMaxActivity(), SCIProwGetMinActivity(), SCIProwGetNNonz(), SCIPsepastoreAddCut(), SCIPtreeGetCurrentDepth(), SCIPtreeGetCurrentNode(), TRUE, SCIP_Row::vals, and var.
Referenced by addBoundCutSepa(), addCut(), addCut(), addCut(), addCut(), addCut(), addCut(), addCut(), addCut(), addCut(), addCuts(), addCuts(), addOrbisackCover(), addOrbisackInequality(), addRelaxation(), addRelaxation(), addRelaxation(), addRelaxation(), addRelaxation(), addRelaxation(), addRelaxation(), addSymresackInequality(), computeCut(), createCapacityRestrictionIntvars(), createCGCutCMIR(), createCGCutDirect(), createCGCutStrongCG(), createRow(), doSeparation(), extendToCover(), generateAndApplyBendersIntegerCuts(), generateAndApplyBendersNogoodCut(), generateOddCycleCut(), initLP(), initLP(), initsepaBoundInequalityFromCardinality(), initsepaBoundInequalityFromSOS1Cons(), LOPseparate(), SCIP_DECL_CONSENFOLP(), SCIP_DECL_CONSINITLP(), SCIP_DECL_CONSINITLP(), SCIP_DECL_CONSINITLP(), SCIP_DECL_CONSSEPALP(), SCIP_DECL_CONSSEPASOL(), SCIP_DECL_NLHDLRENFO(), SCIP_DECL_NLHDLRENFO(), SCIP_DECL_NLHDLRINITSEPA(), SCIP_DECL_NLHDLRINITSEPA(), SCIP_DECL_NLHDLRINITSEPA(), SCIP_DECL_NLHDLRINITSEPA(), SCIP_DECL_SEPAEXECLP(), SCIP_DECL_SEPAEXECLP(), SCIPaddCut(), SCIPgenerateAndApplyBendersOptCut(), SCIPprocessRowprepNonlinear(), sepaImplBoundCutsSOS1(), separateCons(), separateCons(), separateCons(), separateCons(), separateConsBinaryRepresentation(), separateCoverCutsCons(), separateCoversOrbisack(), separateCuts(), separateCuts(), separateCuts(), separateDeterminant(), separateIndicators(), separateMcCormickImplicit(), separatePerspective(), separateRltCuts(), separateSCIs(), separateSequLiftedExtendedWeightInequality(), separateSequLiftedMinimalCoverInequality(), separateSupLiftedMinimalCoverInequality(), and sepaSubtour().
checks if cut is already existing in global cutpool
scip
is in one of the following stages:
scip | SCIP data structure |
row | cutting plane to add |
Definition at line 343 of file scip_cut.c.
References FALSE, SCIP_CALL_ABORT, SCIPcheckStage(), SCIPcutpoolIsCutNew(), and TRUE.
Referenced by addCut(), addCut(), addCuts(), and generateZerohalfCut().
SCIP_RETCODE SCIPaddPoolCut | ( | SCIP * | scip, |
SCIP_ROW * | row ) |
if not already existing, adds row to global cut pool
scip
is in one of the following stages:
scip | SCIP data structure |
row | row to remove |
Definition at line 361 of file scip_cut.c.
References FALSE, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), SCIPcutpoolAddRow(), and TRUE.
Referenced by addCut(), addCut(), addCut(), addCut(), addCut(), addCutPool(), addCuts(), addPathCuts(), addSubtourCuts(), addTourCuts(), computeCut(), createAndAddTransferredCut(), createCGCutCMIR(), createCGCutDirect(), createCGCutStrongCG(), doSeparation(), extendToCover(), generateAndApplyBendersIntegerCuts(), generateAndApplyBendersNogoodCut(), generateOddCycleCut(), newsolCliqueAddRow(), SCIP_DECL_NLHDLRSOLLINEARIZE(), SCIP_DECL_NLHDLRSOLLINEARIZE(), SCIP_DECL_NLHDLRSOLLINEARIZE(), SCIP_DECL_SEPAEXECLP(), SCIP_DECL_SEPAEXECLP(), SCIP_DECL_SEPAEXECLP(), SCIPgenerateAndApplyBendersOptCut(), and separateRltCuts().
SCIP_RETCODE SCIPdelPoolCut | ( | SCIP * | scip, |
SCIP_ROW * | row ) |
removes the row from the global cut pool
scip
is in one of the following stages:
scip | SCIP data structure |
row | cutting plane to add |
Definition at line 381 of file scip_cut.c.
References FALSE, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), SCIPcutpoolDelRow(), and TRUE.
gets current cuts in the global cut pool
scip
is in one of the following stages:
scip | SCIP data structure |
Definition at line 402 of file scip_cut.c.
References FALSE, SCIP_CALL_ABORT, SCIPcheckStage(), SCIPcutpoolGetCuts(), and TRUE.
Referenced by SCIPcopyCuts().
int SCIPgetNPoolCuts | ( | SCIP * | scip | ) |
gets current number of rows in the global cut pool
scip
is in one of the following stages:
scip | SCIP data structure |
Definition at line 420 of file scip_cut.c.
References FALSE, SCIP_CALL_ABORT, SCIPcheckStage(), SCIPcutpoolGetNCuts(), and TRUE.
Referenced by SCIP_DECL_DISPOUTPUT(), and SCIPcopyCuts().
SCIP_CUTPOOL * SCIPgetGlobalCutpool | ( | SCIP * | scip | ) |
gets the global cut pool used by SCIP
scip
is in one of the following stages:
scip | SCIP data structure |
Definition at line 438 of file scip_cut.c.
References FALSE, SCIP_CALL_ABORT, SCIPcheckStage(), and TRUE.
Referenced by SCIPsepaExecLP().
SCIP_RETCODE SCIPcreateCutpool | ( | SCIP * | scip, |
SCIP_CUTPOOL ** | cutpool, | ||
int | agelimit ) |
creates a cut pool
scip
is in one of the following stages:
scip | SCIP data structure |
cutpool | pointer to store cut pool |
agelimit | maximum age a cut can reach before it is deleted from the pool |
Definition at line 462 of file scip_cut.c.
References FALSE, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), SCIPcutpoolCreate(), and TRUE.
SCIP_RETCODE SCIPfreeCutpool | ( | SCIP * | scip, |
SCIP_CUTPOOL ** | cutpool ) |
frees a cut pool
scip
is in one of the following stages:
scip | SCIP data structure |
cutpool | pointer to store cut pool |
Definition at line 493 of file scip_cut.c.
References FALSE, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), SCIPcutpoolFree(), and TRUE.
SCIP_RETCODE SCIPaddRowCutpool | ( | SCIP * | scip, |
SCIP_CUTPOOL * | cutpool, | ||
SCIP_ROW * | row ) |
if not already existing, adds row to a cut pool and captures it
scip
is in one of the following stages:
scip | SCIP data structure |
cutpool | cut pool |
row | cutting plane to add |
Definition at line 514 of file scip_cut.c.
References FALSE, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), SCIPcutpoolAddRow(), and TRUE.
SCIP_RETCODE SCIPaddNewRowCutpool | ( | SCIP * | scip, |
SCIP_CUTPOOL * | cutpool, | ||
SCIP_ROW * | row ) |
adds row to a cut pool and captures it; doesn't check for multiple cuts
scip
is in one of the following stages:
scip | SCIP data structure |
cutpool | cut pool |
row | cutting plane to add |
Definition at line 536 of file scip_cut.c.
References FALSE, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), SCIPcutpoolAddNewRow(), and TRUE.
SCIP_RETCODE SCIPdelRowCutpool | ( | SCIP * | scip, |
SCIP_CUTPOOL * | cutpool, | ||
SCIP_ROW * | row ) |
removes the LP row from a cut pool
scip
is in one of the following stages:
scip | SCIP data structure |
cutpool | cut pool |
row | row to remove |
Definition at line 559 of file scip_cut.c.
References FALSE, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), SCIPcutpoolDelRow(), and TRUE.
SCIP_RETCODE SCIPseparateCutpool | ( | SCIP * | scip, |
SCIP_CUTPOOL * | cutpool, | ||
SCIP_RESULT * | result ) |
separates cuts from a cut pool
scip
is in one of the following stages:
scip | SCIP data structure |
cutpool | cut pool |
result | pointer to store the result of the separation call |
Definition at line 580 of file scip_cut.c.
References assert(), FALSE, NULL, result, SCIP_CALL, SCIP_INVALIDCALL, SCIP_OKAY, SCIPcheckStage(), SCIPcutpoolSeparate(), SCIPerrorMessage, SCIPtreeGetCurrentDepth(), SCIPtreeGetCurrentNode(), SCIPtreeHasCurrentNodeLP(), and TRUE.
SCIP_RETCODE SCIPseparateSolCutpool | ( | SCIP * | scip, |
SCIP_CUTPOOL * | cutpool, | ||
SCIP_SOL * | sol, | ||
SCIP_Bool | pretendroot, | ||
SCIP_RESULT * | result ) |
separates cuts w.r.t. given solution from a cut pool
scip
is in one of the following stages:
scip | SCIP data structure |
cutpool | cut pool |
sol | solution to be separated |
pretendroot | should the cut separators be called as if we are at the root node? |
result | pointer to store the result of the separation call |
Definition at line 610 of file scip_cut.c.
References assert(), FALSE, NULL, result, SCIP_CALL, SCIP_INVALIDCALL, SCIP_OKAY, SCIPcheckStage(), SCIPcutpoolSeparate(), SCIPerrorMessage, SCIPtreeGetCurrentNode(), SCIPtreeHasCurrentNodeLP(), sol, and TRUE.
SCIP_RETCODE SCIPaddDelayedPoolCut | ( | SCIP * | scip, |
SCIP_ROW * | row ) |
if not already existing, adds row to the delayed global cut pool
scip
is the stages SCIP_STAGE_SOLVINGif not already existing, adds row to delayed global cut pool
scip
is the stages SCIP_STAGE_SOLVING scip | SCIP data structure |
row | cutting plane to add |
Definition at line 641 of file scip_cut.c.
References FALSE, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), SCIPcutpoolAddRow(), and TRUE.
SCIP_RETCODE SCIPdelDelayedPoolCut | ( | SCIP * | scip, |
SCIP_ROW * | row ) |
removes the row from the delayed global cut pool
scip
is the stages SCIP_STAGE_SOLVING scip | SCIP data structure |
row | cutting plane to add |
Definition at line 660 of file scip_cut.c.
References FALSE, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), SCIPcutpoolDelRow(), and TRUE.
gets current cuts in the delayed global cut pool
scip
is the stages SCIP_STAGE_SOLVING scip | SCIP data structure |
Definition at line 679 of file scip_cut.c.
References FALSE, SCIP_CALL_ABORT, SCIPcheckStage(), SCIPcutpoolGetCuts(), and TRUE.
Referenced by SCIPcopyCuts().
int SCIPgetNDelayedPoolCuts | ( | SCIP * | scip | ) |
gets current number of rows in the delayed global cut pool
scip
is the stages SCIP_STAGE_SOLVING scip | SCIP data structure |
Definition at line 695 of file scip_cut.c.
References FALSE, SCIP_CALL_ABORT, SCIPcheckStage(), SCIPcutpoolGetNCuts(), and TRUE.
Referenced by SCIPcopyCuts().
SCIP_CUTPOOL * SCIPgetDelayedGlobalCutpool | ( | SCIP * | scip | ) |
gets the delayed global cut pool used by SCIP
scip
is the stages SCIP_STAGE_SOLVING scip | SCIP data structure |
Definition at line 711 of file scip_cut.c.
References FALSE, SCIP_CALL_ABORT, SCIPcheckStage(), and TRUE.
Referenced by SCIPsepaExecLP().
SCIP_RETCODE SCIPseparateSol | ( | SCIP * | scip, |
SCIP_SOL * | sol, | ||
SCIP_Bool | pretendroot, | ||
SCIP_Bool | allowlocal, | ||
SCIP_Bool | onlydelayed, | ||
SCIP_Bool * | delayed, | ||
SCIP_Bool * | cutoff ) |
separates the given primal solution or the current LP solution by calling the separators and constraint handlers' separation methods; the generated cuts are stored in the separation storage and can be accessed with the methods SCIPgetCuts() and SCIPgetNCuts(); after evaluating the cuts, you have to call SCIPclearCuts() in order to remove the cuts from the separation storage; it is possible to call SCIPseparateSol() multiple times with different solutions and evaluate the found cuts afterwards
scip
is in one of the following stages:
scip | SCIP data structure |
sol | primal solution that should be separated, or NULL for LP solution |
pretendroot | should the cut separators be called as if we are at the root node? |
allowlocal | should the separator be asked to separate local cuts |
onlydelayed | should only separators be called that were delayed in the previous round? |
delayed | pointer to store whether a separator was delayed |
cutoff | pointer to store whether the node can be cut off |
Definition at line 735 of file scip_cut.c.
References cutoff, FALSE, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), SCIPseparationRound(), SCIPtreeGetCurrentDepth(), sol, and TRUE.
Referenced by applySeparation(), and SCIP_DECL_SEPAEXECLP().
gets the array of cuts currently stored in the separation storage
scip
is in one of the following stages:
scip | SCIP data structure |
Definition at line 769 of file scip_cut.c.
References FALSE, SCIP_CALL_ABORT, SCIPcheckStage(), SCIPsepastoreGetCuts(), and TRUE.
int SCIPgetNCuts | ( | SCIP * | scip | ) |
get current number of cuts in the separation storage
scip
is in one of the following stages:
scip | SCIP data structure |
Definition at line 787 of file scip_cut.c.
References FALSE, SCIP_CALL_ABORT, SCIPcheckStage(), SCIPsepastoreGetNCuts(), and TRUE.
Referenced by applySeparation(), SCIP_DECL_SEPAEXECLP(), SCIPcalcFlowCover(), and SCIPrelaxExec().
SCIP_RETCODE SCIPclearCuts | ( | SCIP * | scip | ) |
clears the separation storage
scip
is in one of the following stages:
scip | SCIP data structure |
Definition at line 804 of file scip_cut.c.
References FALSE, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), SCIPsepastoreClearCuts(), and TRUE.
SCIP_RETCODE SCIPremoveInefficaciousCuts | ( | SCIP * | scip | ) |
removes cuts that are inefficacious w.r.t. the current LP solution from separation storage without adding the cuts to the LP
scip
is in one of the following stages:
scip | SCIP data structure |
Definition at line 823 of file scip_cut.c.
References FALSE, SCIP_CALL, SCIP_EFFICIACYCHOICE_LP, SCIP_OKAY, SCIPcheckStage(), SCIPsepastoreRemoveInefficaciousCuts(), SCIPtreeGetCurrentDepth(), and TRUE.
Referenced by SCIP_DECL_SEPAEXECLP().