a linear inequality that is prepared to become a SCIP_ROW
This data structure helps to work around some limitations of SCIP_ROW's, in particular, that it rounds coefficients or sides close to integral values without the appropriate care. On the other hand, a SCIP_ROWPREP is limited to inequalities.
SCIP_RETCODE SCIPcreateRowprep | ( | SCIP * | scip, |
SCIP_ROWPREP ** | rowprep, | ||
SCIP_SIDETYPE | sidetype, | ||
SCIP_Bool | local ) |
creates a SCIP_ROWPREP datastructure
Initial row represents 0 ≤ 0.
scip | SCIP data structure |
rowprep | buffer to store pointer to rowprep |
sidetype | whether cut will be or lower-equal or larger-equal type |
local | whether cut will be valid only locally |
Definition at line 563 of file misc_rowprep.c.
References assert(), BMSclearMemory, i, NULL, SCIP_CALL, SCIP_OKAY, and SCIPallocBlockMemory.
Referenced by addCut(), generateCutSolDisagg(), generateCutSolSOC(), SCIP_DECL_NLHDLRENFO(), SCIP_DECL_NLHDLRESTIMATE(), SCIP_DECL_NLHDLRESTIMATE(), SCIP_DECL_NLHDLRESTIMATE(), SCIP_DECL_NLHDLRESTIMATE(), SCIP_DECL_NLHDLRESTIMATE(), SCIP_DECL_NLHDLRINITSEPA(), SCIP_DECL_NLHDLRINITSEPA(), SCIP_DECL_NLHDLRINITSEPA(), SCIP_DECL_NLHDLRSOLLINEARIZE(), SCIP_DECL_NLHDLRSOLLINEARIZE(), SCIP_DECL_NLHDLRSOLLINEARIZE(), and separateDeterminant().
void SCIPfreeRowprep | ( | SCIP * | scip, |
SCIP_ROWPREP ** | rowprep ) |
frees a SCIP_ROWPREP datastructure
scip | SCIP data structure |
rowprep | pointer that stores pointer to rowprep |
Definition at line 583 of file misc_rowprep.c.
References assert(), i, NULL, SCIPfreeBlockMemory, and SCIPfreeBlockMemoryArrayNull.
Referenced by addCut(), enforceExprNlhdlr(), SCIP_DECL_NLHDLRENFO(), SCIP_DECL_NLHDLRENFO(), SCIP_DECL_NLHDLRENFO(), SCIP_DECL_NLHDLRESTIMATE(), SCIP_DECL_NLHDLRESTIMATE(), SCIP_DECL_NLHDLRESTIMATE(), SCIP_DECL_NLHDLRESTIMATE(), SCIP_DECL_NLHDLRINITSEPA(), SCIP_DECL_NLHDLRINITSEPA(), SCIP_DECL_NLHDLRINITSEPA(), SCIP_DECL_NLHDLRINITSEPA(), SCIP_DECL_NLHDLRSOLLINEARIZE(), SCIP_DECL_NLHDLRSOLLINEARIZE(), SCIP_DECL_NLHDLRSOLLINEARIZE(), SCIP_DECL_NLHDLRSOLLINEARIZE(), and separateDeterminant().
SCIP_RETCODE SCIPcopyRowprep | ( | SCIP * | scip, |
SCIP_ROWPREP ** | target, | ||
SCIP_ROWPREP * | source ) |
creates a copy of a SCIP_ROWPREP datastructure
scip | SCIP data structure |
target | buffer to store pointer of rowprep copy |
source | rowprep to copy |
Definition at line 599 of file misc_rowprep.c.
References assert(), FALSE, i, NULL, SCIP_CALL, SCIP_OKAY, SCIPduplicateBlockMemory, and SCIPduplicateBlockMemoryArray.
int SCIProwprepGetNVars | ( | SCIP_ROWPREP * | rowprep | ) |
gives number of terms in rowprep
rowprep | rowprep |
Definition at line 629 of file misc_rowprep.c.
References assert(), i, and NULL.
Referenced by addCutPool(), SCIP_DECL_NLHDLRENFO(), SCIP_DECL_NLHDLRENFO(), SCIP_DECL_NLHDLRINITSEPA(), SCIPprocessRowprepNonlinear(), and sparsifyIntercut().
SCIP_VAR ** SCIProwprepGetVars | ( | SCIP_ROWPREP * | rowprep | ) |
gives variables of rowprep (feel free to modify)
rowprep | rowprep |
Definition at line 639 of file misc_rowprep.c.
References assert(), i, and NULL.
Referenced by SCIP_DECL_NLHDLRENFO(), SCIPprocessRowprepNonlinear(), and sparsifyIntercut().
SCIP_Real * SCIProwprepGetCoefs | ( | SCIP_ROWPREP * | rowprep | ) |
gives coefficients of rowprep (feel free to modify)
rowprep | rowprep |
Definition at line 649 of file misc_rowprep.c.
References assert(), i, and NULL.
Referenced by estimateVertexPolyhedral(), SCIP_DECL_NLHDLRENFO(), SCIP_DECL_NLHDLRESTIMATE(), SCIP_DECL_NLHDLRSOLLINEARIZE(), SCIPprocessRowprepNonlinear(), and sparsifyIntercut().
SCIP_Real SCIProwprepGetSide | ( | SCIP_ROWPREP * | rowprep | ) |
gives side of rowprep
rowprep | rowprep |
Definition at line 659 of file misc_rowprep.c.
References assert(), i, and NULL.
Referenced by generateIntercut(), and SCIP_DECL_NLHDLRENFO().
SCIP_SIDETYPE SCIProwprepGetSidetype | ( | SCIP_ROWPREP * | rowprep | ) |
gives kind of inequality of rowprep
rowprep | rowprep |
Definition at line 669 of file misc_rowprep.c.
References assert(), i, and NULL.
Referenced by enforceExprNlhdlr(), and SCIP_DECL_NLHDLRINITSEPA().
SCIP_Bool SCIProwprepIsLocal | ( | SCIP_ROWPREP * | rowprep | ) |
returns whether rowprep is locally valid only
rowprep | rowprep |
Definition at line 679 of file misc_rowprep.c.
References assert(), i, and NULL.
Referenced by addCutPool(), SCIP_DECL_NLHDLRSOLLINEARIZE(), SCIP_DECL_NLHDLRSOLLINEARIZE(), and SCIP_DECL_NLHDLRSOLLINEARIZE().
char * SCIProwprepGetName | ( | SCIP_ROWPREP * | rowprep | ) |
returns name of rowprep (feel free to modify)
rowprep | rowprep |
Definition at line 689 of file misc_rowprep.c.
References assert(), i, and NULL.
Referenced by addCut(), estimateBivariateQuotient(), estimateUnivariateQuotient(), generateCutSolDisagg(), generateCutSolSOC(), SCIP_DECL_NLHDLRENFO(), SCIP_DECL_NLHDLRENFO(), SCIP_DECL_NLHDLRESTIMATE(), SCIP_DECL_NLHDLRESTIMATE(), SCIP_DECL_NLHDLRESTIMATE(), SCIP_DECL_NLHDLRINITSEPA(), SCIP_DECL_NLHDLRINITSEPA(), SCIP_DECL_NLHDLRINITSEPA(), SCIP_DECL_NLHDLRSOLLINEARIZE(), SCIP_DECL_NLHDLRSOLLINEARIZE(), SCIP_DECL_NLHDLRSOLLINEARIZE(), and SCIPprocessRowprepNonlinear().
int SCIProwprepGetNModifiedVars | ( | SCIP_ROWPREP * | rowprep | ) |
returns number of variables which coefficients were modified in cleanup
rowprep | rowprep |
Definition at line 699 of file misc_rowprep.c.
References assert(), i, and NULL.
Referenced by SCIPprocessRowprepNonlinear().
SCIP_VAR ** SCIProwprepGetModifiedVars | ( | SCIP_ROWPREP * | rowprep | ) |
returns variables which coefficients were modified in cleanup
rowprep | rowprep |
Definition at line 709 of file misc_rowprep.c.
References assert(), i, and NULL.
Referenced by SCIPprocessRowprepNonlinear().
void SCIProwprepReset | ( | SCIP_ROWPREP * | rowprep | ) |
resets rowprep to have 0 terms and side 0.0
rowprep | rowprep |
Definition at line 719 of file misc_rowprep.c.
References assert(), FALSE, i, and NULL.
Referenced by SCIP_DECL_NLHDLRINITSEPA().
void SCIProwprepSetCoef | ( | SCIP_ROWPREP * | rowprep, |
int | idx, | ||
SCIP_Real | newcoef ) |
sets coefficient idx of rowprep
rowprep | rowprep |
idx | index of coef to set |
newcoef | new coefficient |
Definition at line 734 of file misc_rowprep.c.
References assert(), i, and NULL.
Referenced by sparsifyIntercut().
void SCIProwprepAddSide | ( | SCIP_ROWPREP * | rowprep, |
SCIP_Real | side ) |
adds constant value to side of rowprep
rowprep | rowprep |
side | constant value to be added to side |
Definition at line 746 of file misc_rowprep.c.
References assert(), i, and NULL.
Referenced by createRowprep(), generateCutSolDisagg(), generateCutSolSOC(), generateIntercut(), SCIProwprepAddConstant(), separateDeterminant(), and sparsifyIntercut().
void SCIProwprepAddConstant | ( | SCIP_ROWPREP * | rowprep, |
SCIP_Real | constant ) |
adds constant term to rowprep
Substracts constant from side.
rowprep | rowprep |
constant | constant value to be added |
Definition at line 760 of file misc_rowprep.c.
References i, and SCIProwprepAddSide().
Referenced by addColToCut(), addColToCut(), addCut(), addRowToCut(), addRowToCut(), estimateConvexSecant(), estimateGradientInner(), estimateVertexPolyhedral(), rowprepCleanupImproveCoefrange(), rowprepCleanupIntegralCoefs(), SCIP_DECL_NLHDLRENFO(), SCIP_DECL_NLHDLRESTIMATE(), SCIP_DECL_NLHDLRESTIMATE(), SCIP_DECL_NLHDLRINITSEPA(), SCIP_DECL_NLHDLRSOLLINEARIZE(), and SCIP_DECL_NLHDLRSOLLINEARIZE().
void SCIProwprepSetSidetype | ( | SCIP_ROWPREP * | rowprep, |
SCIP_SIDETYPE | sidetype ) |
sets side type of rowprep
rowprep | rowprep |
sidetype | new side type |
Definition at line 769 of file misc_rowprep.c.
References assert(), i, and NULL.
Referenced by generateIntercut(), and SCIP_DECL_NLHDLRINITSEPA().
void SCIProwprepSetLocal | ( | SCIP_ROWPREP * | rowprep, |
SCIP_Bool | islocal ) |
sets whether rowprep is local
rowprep | rowprep |
islocal | whether rowprep is local |
Definition at line 780 of file misc_rowprep.c.
References assert(), i, and NULL.
Referenced by estimateConvexSecant(), estimateGradientInner(), estimateUnivariateQuotient(), estimateVertexPolyhedral(), and SCIP_DECL_NLHDLRESTIMATE().
void SCIProwprepRecordModifications | ( | SCIP_ROWPREP * | rowprep | ) |
enables recording for where modifications were done in cleanup
rowprep | rowprep |
Definition at line 791 of file misc_rowprep.c.
References assert(), i, NULL, and TRUE.
Referenced by SCIPprocessRowprepNonlinear().
void SCIPprintRowprep | ( | SCIP * | scip, |
SCIP_ROWPREP * | rowprep, | ||
FILE * | file ) |
prints a rowprep
scip | SCIP data structure |
rowprep | rowprep to be printed |
file | file to print to, or NULL for stdout |
Definition at line 801 of file misc_rowprep.c.
References assert(), i, NULL, SCIP_SIDETYPE_LEFT, SCIPinfoMessage(), and SCIPvarGetName().
Referenced by addCut(), estimateVertexPolyhedral(), SCIP_DECL_NLHDLRENFO(), SCIPcleanupRowprep(), SCIPcleanupRowprep2(), SCIPprocessRowprepNonlinear(), and SCIPscaleupRowprep().
void SCIPprintRowprepSol | ( | SCIP * | scip, |
SCIP_ROWPREP * | rowprep, | ||
SCIP_SOL * | sol, | ||
FILE * | file ) |
prints a rowprep and values in solution
scip | SCIP data structure |
rowprep | rowprep to be printed |
sol | solution for activity |
file | file to print to, or NULL for stdout |
Definition at line 826 of file misc_rowprep.c.
References assert(), i, NULL, REALABS, SCIP_SIDETYPE_LEFT, SCIP_SIDETYPE_RIGHT, SCIPgetSolVal(), SCIPinfoMessage(), SCIPvarGetName(), sol, and var.
Referenced by SCIP_DECL_NLHDLRESTIMATE(), and SCIP_DECL_NLHDLRSOLLINEARIZE().
SCIP_RETCODE SCIPensureRowprepSize | ( | SCIP * | scip, |
SCIP_ROWPREP * | rowprep, | ||
int | size ) |
ensures that rowprep has space for at least given number of additional terms
Useful when knowing in advance how many terms will be added.
scip | SCIP data structure |
rowprep | rowprep |
size | number of additional terms for which to alloc space in rowprep |
Definition at line 887 of file misc_rowprep.c.
References assert(), i, NULL, SCIP_CALL, SCIP_OKAY, SCIPcalcMemGrowSize(), and SCIPreallocBlockMemoryArray.
Referenced by createRowprep(), estimateVertexPolyhedral(), generateCutSolDisagg(), generateCutSolSOC(), SCIP_DECL_NLHDLRESTIMATE(), SCIP_DECL_NLHDLRESTIMATE(), SCIP_DECL_NLHDLRINITSEPA(), SCIP_DECL_NLHDLRSOLLINEARIZE(), SCIPaddRowprepTerm(), and SCIPaddRowprepTerms().
SCIP_RETCODE SCIPaddRowprepTerm | ( | SCIP * | scip, |
SCIP_ROWPREP * | rowprep, | ||
SCIP_VAR * | var, | ||
SCIP_Real | coef ) |
adds a term coef*var to a rowprep
scip | SCIP data structure |
rowprep | rowprep |
var | variable to add |
coef | coefficient to add |
Definition at line 913 of file misc_rowprep.c.
References assert(), i, NULL, SCIP_CALL, SCIP_OKAY, SCIPensureRowprepSize(), and var.
Referenced by addColToCut(), addColToCut(), addRowToCut(), addRowToCut(), enforceExprNlhdlr(), estimateConvexSecant(), estimateGradientInner(), estimateVertexPolyhedral(), generateCutSolDisagg(), generateCutSolSOC(), SCIP_DECL_NLHDLRENFO(), SCIP_DECL_NLHDLRESTIMATE(), SCIP_DECL_NLHDLRESTIMATE(), SCIP_DECL_NLHDLRINITSEPA(), SCIP_DECL_NLHDLRINITSEPA(), SCIP_DECL_NLHDLRINITSEPA(), SCIP_DECL_NLHDLRSOLLINEARIZE(), SCIP_DECL_NLHDLRSOLLINEARIZE(), and SCIP_DECL_NLHDLRSOLLINEARIZE().
SCIP_RETCODE SCIPaddRowprepTerms | ( | SCIP * | scip, |
SCIP_ROWPREP * | rowprep, | ||
int | nvars, | ||
SCIP_VAR ** | vars, | ||
SCIP_Real * | coefs ) |
adds several terms coef*var to a rowprep
scip | SCIP data structure |
rowprep | rowprep |
nvars | number of terms to add |
vars | variables to add |
coefs | coefficients to add |
Definition at line 938 of file misc_rowprep.c.
References assert(), BMScopyMemoryArray, i, NULL, nvars, SCIP_CALL, SCIP_OKAY, SCIPensureRowprepSize(), and vars.
Referenced by addCut(), and createRowprep().
SCIP_Real SCIPgetRowprepViolation | ( | SCIP * | scip, |
SCIP_ROWPREP * | rowprep, | ||
SCIP_SOL * | sol, | ||
SCIP_Bool * | reliable ) |
computes violation of rowprep in a given solution
Can return whether the violation value is reliable from a floating-point accuracy point of view. The value will not be deemed reliable when its calculation involved the subtraction of large numbers. To be precise, the violation of an inequality \( \sum_i a_ix_i \leq b \) in a solution \(x^*\) is deemed reliable if \( |\sum_i a_ix^*_i - b| \geq 2^{-50} \max (|b|, \max_i |a_ix^*_i|) \).
scip | SCIP data structure |
rowprep | rowprep |
sol | solution or NULL for LP solution |
reliable | buffer to store whether computed violation is reliable (numerically), or NULL if not of interest |
Definition at line 972 of file misc_rowprep.c.
References i, MAX, NULL, REALABS, SCIP_SIDETYPE_RIGHT, SCIP_VARSTATUS_LOOSE, SCIPgetSolVal(), SCIPinfinity(), SCIPisInfinity(), SCIPvarGetStatus(), sol, and TRUE.
Referenced by addCut(), addCut(), SCIPcleanupRowprep(), SCIPisRowprepViolationReliable(), and SCIPprocessRowprepNonlinear().
SCIP_Bool SCIPisRowprepViolationReliable | ( | SCIP * | scip, |
SCIP_ROWPREP * | rowprep, | ||
SCIP_SOL * | sol ) |
computes violation of rowprep in a given solution and reports whether that value seem numerically reliable
scip | SCIP data structure |
rowprep | rowprep |
sol | solution or NULL for LP solution |
Definition at line 1064 of file misc_rowprep.c.
References assert(), i, NULL, SCIPgetRowprepViolation(), and sol.
void SCIPmergeRowprepTerms | ( | SCIP * | scip, |
SCIP_ROWPREP * | rowprep ) |
Merge terms that use same variable and eliminate zero coefficients.
Removes a variable if its bounds have a relative difference of below epsilon. Local bounds are checked for local rows, otherwise global bounds are used. If the bounds are not absolute equal, the bound that relaxes the row is used.
Terms are sorted by variable (see SCIPvarComp()) after return.
scip | SCIP data structure |
rowprep | rowprep to be cleaned up |
Definition at line 1088 of file misc_rowprep.c.
References assert(), i, NULL, nvars, SCIP_SIDETYPE_RIGHT, SCIPisRelEQ(), SCIPsortPtrReal(), SCIPvarGetLbGlobal(), SCIPvarGetLbLocal(), SCIPvarGetUbGlobal(), and SCIPvarGetUbLocal().
Referenced by SCIP_DECL_NLHDLRENFO(), and separateDeterminant().
SCIP_RETCODE SCIPcleanupRowprep | ( | SCIP * | scip, |
SCIP_ROWPREP * | rowprep, | ||
SCIP_SOL * | sol, | ||
SCIP_Real | minviol, | ||
SCIP_Real * | viol, | ||
SCIP_Bool * | success ) |
Cleans up and attempts to improve rowprep
Drops small or large coefficients if their ratio is beyond separating/maxcoefratiofacrowprep / numerics/feastol, if this can be done by relaxing the row. Scales coefficients up to reach minimal violation, if possible. Scaling is omitted if violation is very small (ROWPREP_SCALEUP_VIOLNONZERO) or maximal coefficient would become huge (ROWPREP_SCALEUP_MAXMAXCOEF). Scales coefficients and side down if they are large and if the minimal violation is still reached. Rounds coefficients close to integral values to integrals, if this can be done by relaxing the row. Rounds side within epsilon of 0 to 0.0 or +/-1.1*epsilon, whichever relaxes the row least.
After return, the terms in the rowprep will be sorted by absolute value of coefficient, in decreasing order. Thus, the coefratio can be obtained via REALABS(rowprep->coefs[0]) / REALABS(rowprep->coefs[rowprep->nvars-1])
(if nvars>0).
success
is set to TRUE if and only if the rowprep satisfies the following:
minviol
minviol
= 0Cleans up and attempts to improve rowprep
Drops small or large coefficients if coefrange is too large, if this can be done by relaxing the row. Scales coefficients up to reach minimal violation, if possible. Scaling is omitted if violation is very small (ROWPREP_SCALEUP_VIOLNONZERO) or maximal coefficient would become huge (ROWPREP_SCALEUP_MAXMAXCOEF). Scales coefficients and side down if they are large and if the minimal violation is still reached. Rounds coefficients close to integral values to integrals, if this can be done by relaxing the row. Rounds side within epsilon of 0 to 0.0 or +/-1.1*epsilon, whichever relaxes the row least.
After return, the terms in the rowprep will be sorted by absolute value of coefficient, in decreasing order. Thus, the coefrange can be obtained via REALABS(rowprep->coefs[0]) / REALABS(rowprep->coefs[rowprep->nvars-1])
(if nvars>0).
success
is set to TRUE if and only if the rowprep satisfies the following:
maxcoefrange
minviol
minviol
= 0scip | SCIP data structure |
rowprep | rowprep to be cleaned |
sol | solution that we try to cut off, or NULL for LP solution |
minviol | minimal absolute violation the row should achieve (w.r.t. sol) |
viol | buffer to store absolute violation of cleaned up cut in sol, or NULL if not of interest |
success | buffer to store whether cut cleanup was successful, or NULL if not of interest |
Definition at line 1201 of file misc_rowprep.c.
References assert(), FALSE, i, MAX, NULL, REALABS, rowprepCleanupImproveCoefrange(), rowprepCleanupIntegralCoefs(), rowprepCleanupScaledown(), rowprepCleanupScaleup(), rowprepCleanupSide(), rowprepCleanupSortTerms(), SCIP_CALL, SCIP_INVALID, SCIP_OKAY, SCIPdebugMsg, SCIPgetRowprepViolation(), SCIPgetSepaMinEfficacy(), SCIPinfoMessage(), SCIPisInfinity(), SCIPprintRowprep(), SCIPsetGetSepaMaxCoefRatioRowprep(), sol, and TRUE.
Referenced by addCut(), SCIP_DECL_NLHDLRENFO(), SCIPprocessRowprepNonlinear(), and separateDeterminant().
SCIP_RETCODE SCIPcleanupRowprep2 | ( | SCIP * | scip, |
SCIP_ROWPREP * | rowprep, | ||
SCIP_SOL * | sol, | ||
SCIP_Real | maxcoefbound, | ||
SCIP_Bool * | success ) |
Cleans up and attempts to improve rowprep without regard for violation
Drops small or large coefficients if their ratio is beyond separating/maxcoefratiofacrowprep / numerics/feastol, if this can be done by relaxing the row. Scales coefficients and side to have maximal coefficient in [1/maxcoefbound,maxcoefbound]
. Rounds coefficients close to integral values to integrals, if this can be done by relaxing the row. Rounds side within epsilon of 0 to 0.0 or +/-1.1*epsilon, whichever relaxes the row least.
After return, the terms in the rowprep will be sorted by absolute value of coefficient, in decreasing order. Thus, the coefratio can be obtained via REALABS(rowprep->coefs[0]) / REALABS(rowprep->coefs[rowprep->nvars-1])
(if nvars>0).
success
is set to TRUE if and only if the rowprep satisfies the following:
In difference to SCIPcleanupRowprep(), this function does not scale up the row to increase the absolute violation.
scip | SCIP data structure |
rowprep | rowprep to be cleaned |
sol | solution that we try to cut off, or NULL for LP solution |
maxcoefbound | bound on absolute value of largest coefficient |
success | buffer to store whether cut cleanup was successful, or NULL if not of interest |
Definition at line 1376 of file misc_rowprep.c.
References assert(), FALSE, i, NULL, REALABS, rowprepCleanupImproveCoefrange(), rowprepCleanupIntegralCoefs(), rowprepCleanupSide(), rowprepCleanupSortTerms(), SCIP_CALL, SCIP_OKAY, SCIPdebugMsg, SCIPinfoMessage(), SCIPisInfinity(), SCIPprintRowprep(), SCIPscaleRowprep(), SCIPsetGetSepaMaxCoefRatioRowprep(), sol, and TRUE.
Referenced by addCut(), addCutPool(), SCIP_DECL_NLHDLRINITSEPA(), SCIP_DECL_NLHDLRINITSEPA(), SCIP_DECL_NLHDLRINITSEPA(), SCIP_DECL_NLHDLRINITSEPA(), SCIP_DECL_NLHDLRSOLLINEARIZE(), SCIP_DECL_NLHDLRSOLLINEARIZE(), SCIP_DECL_NLHDLRSOLLINEARIZE(), and SCIPprocessRowprepNonlinear().
SCIP_Real SCIPscaleupRowprep | ( | SCIP * | scip, |
SCIP_ROWPREP * | rowprep, | ||
SCIP_Real | minscaleup, | ||
SCIP_Bool * | success ) |
Scales up a rowprep to increase coefficients/sides that are within epsilon to an integer value, if possible.
Computes the minimal fractionality of all fractional coefficients and the side of the rowprep. If this fractionality is below epsilon, the rowprep is scaled up such that the fractionality exceeds epsilon, if this will not put any coefficient or side above SCIPhugeValue().
This function does not relax the rowprep.
success
is set to TRUE if the resulting rowprep can be turned into a SCIP_ROW, that is, all coefs and the side is below SCIPinfinity() and fractionalities are above epsilon. If success
is set to FALSE, then the rowprep will not have been modified.
success
is set to TRUE. scip | SCIP data structure |
rowprep | rowprep to be cleaned |
minscaleup | minimal factor by which to scale up row, or <= 1.0 if to be ignored |
success | buffer to store whether rowprep could be turned into SCIP_ROW without loss, or NULL if not of interest |
Definition at line 1504 of file misc_rowprep.c.
References FALSE, frac, i, M_SQRT2, MAX, MIN, NULL, REALABS, SCIPdebugMsg, SCIPepsilon(), SCIPinfoMessage(), SCIPisHugeValue(), SCIPisInfinity(), SCIPprintRowprep(), SCIPscaleRowprep(), and TRUE.
Referenced by SCIP_DECL_NLHDLRINITSEPA().
int SCIPscaleRowprep | ( | SCIP_ROWPREP * | rowprep, |
SCIP_Real | factor ) |
scales a rowprep by given factor (after some rounding)
rowprep | rowprep to be scaled |
factor | suggested scale factor |
Definition at line 1626 of file misc_rowprep.c.
References assert(), i, and NULL.
Referenced by rowprepCleanupIntegralCoefs(), rowprepCleanupScaledown(), rowprepCleanupScaleup(), SCIPcleanupRowprep2(), and SCIPscaleupRowprep().
SCIP_RETCODE SCIPgetRowprepRowConshdlr | ( | SCIP * | scip, |
SCIP_ROW ** | row, | ||
SCIP_ROWPREP * | rowprep, | ||
SCIP_CONSHDLR * | conshdlr ) |
generates a SCIP_ROW from a rowprep, setting its origin to given constraint handler
scip | SCIP data structure |
row | buffer to store pointer to new row |
rowprep | rowprep to be turned into a row |
conshdlr | constraint handler |
Definition at line 1655 of file misc_rowprep.c.
References assert(), FALSE, i, NULL, SCIP_CALL, SCIP_OKAY, SCIP_SIDETYPE_LEFT, SCIP_SIDETYPE_RIGHT, SCIPaddVarsToRow(), SCIPcreateEmptyRowConshdlr(), SCIPgetDepth(), SCIPinfinity(), and TRUE.
SCIP_RETCODE SCIPgetRowprepRowCons | ( | SCIP * | scip, |
SCIP_ROW ** | row, | ||
SCIP_ROWPREP * | rowprep, | ||
SCIP_CONS * | cons ) |
generates a SCIP_ROW from a rowprep, setting its origin to given constraint
scip | SCIP data structure |
row | buffer to store pointer to new row |
rowprep | rowprep to be turned into a row |
cons | constraint |
Definition at line 1678 of file misc_rowprep.c.
References assert(), FALSE, i, NULL, SCIP_CALL, SCIP_OKAY, SCIP_SIDETYPE_LEFT, SCIP_SIDETYPE_RIGHT, SCIPaddVarsToRow(), SCIPcreateEmptyRowCons(), SCIPgetDepth(), SCIPinfinity(), and TRUE.
Referenced by addCut(), addCutPool(), SCIP_DECL_NLHDLRENFO(), SCIP_DECL_NLHDLRINITSEPA(), SCIP_DECL_NLHDLRINITSEPA(), SCIP_DECL_NLHDLRINITSEPA(), SCIP_DECL_NLHDLRINITSEPA(), SCIP_DECL_NLHDLRSOLLINEARIZE(), SCIP_DECL_NLHDLRSOLLINEARIZE(), SCIP_DECL_NLHDLRSOLLINEARIZE(), and SCIPprocessRowprepNonlinear().
SCIP_RETCODE SCIPgetRowprepRowSepa | ( | SCIP * | scip, |
SCIP_ROW ** | row, | ||
SCIP_ROWPREP * | rowprep, | ||
SCIP_SEPA * | sepa ) |
generates a SCIP_ROW from a rowprep, setting its origin to given separator
scip | SCIP data structure |
row | buffer to store pointer to new row |
rowprep | rowprep to be turned into a row |
sepa | separator |
Definition at line 1701 of file misc_rowprep.c.
References assert(), FALSE, i, NULL, SCIP_CALL, SCIP_OKAY, SCIP_SIDETYPE_LEFT, SCIP_SIDETYPE_RIGHT, SCIPaddVarsToRow(), SCIPcreateEmptyRowSepa(), SCIPgetDepth(), SCIPinfinity(), and TRUE.
Referenced by addCut(), and separateDeterminant().