SCIP Doxygen Documentation
 
Loading...
Searching...
No Matches

Detailed Description

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.

Functions

SCIP_RETCODE SCIPcreateRowprep (SCIP *scip, SCIP_ROWPREP **rowprep, SCIP_SIDETYPE sidetype, SCIP_Bool local)
 
void SCIPfreeRowprep (SCIP *scip, SCIP_ROWPREP **rowprep)
 
SCIP_RETCODE SCIPcopyRowprep (SCIP *scip, SCIP_ROWPREP **target, SCIP_ROWPREP *source)
 
int SCIProwprepGetNVars (SCIP_ROWPREP *rowprep)
 
SCIP_VAR ** SCIProwprepGetVars (SCIP_ROWPREP *rowprep)
 
SCIP_RealSCIProwprepGetCoefs (SCIP_ROWPREP *rowprep)
 
SCIP_Real SCIProwprepGetSide (SCIP_ROWPREP *rowprep)
 
SCIP_SIDETYPE SCIProwprepGetSidetype (SCIP_ROWPREP *rowprep)
 
SCIP_Bool SCIProwprepIsLocal (SCIP_ROWPREP *rowprep)
 
char * SCIProwprepGetName (SCIP_ROWPREP *rowprep)
 
int SCIProwprepGetNModifiedVars (SCIP_ROWPREP *rowprep)
 
SCIP_VAR ** SCIProwprepGetModifiedVars (SCIP_ROWPREP *rowprep)
 
void SCIProwprepReset (SCIP_ROWPREP *rowprep)
 
void SCIProwprepSetCoef (SCIP_ROWPREP *rowprep, int idx, SCIP_Real newcoef)
 
void SCIProwprepAddSide (SCIP_ROWPREP *rowprep, SCIP_Real side)
 
void SCIProwprepAddConstant (SCIP_ROWPREP *rowprep, SCIP_Real constant)
 
void SCIProwprepSetSidetype (SCIP_ROWPREP *rowprep, SCIP_SIDETYPE sidetype)
 
void SCIProwprepSetLocal (SCIP_ROWPREP *rowprep, SCIP_Bool islocal)
 
void SCIProwprepRecordModifications (SCIP_ROWPREP *rowprep)
 
void SCIPprintRowprep (SCIP *scip, SCIP_ROWPREP *rowprep, FILE *file)
 
void SCIPprintRowprepSol (SCIP *scip, SCIP_ROWPREP *rowprep, SCIP_SOL *sol, FILE *file)
 
SCIP_RETCODE SCIPensureRowprepSize (SCIP *scip, SCIP_ROWPREP *rowprep, int size)
 
SCIP_RETCODE SCIPaddRowprepTerm (SCIP *scip, SCIP_ROWPREP *rowprep, SCIP_VAR *var, SCIP_Real coef)
 
SCIP_RETCODE SCIPaddRowprepTerms (SCIP *scip, SCIP_ROWPREP *rowprep, int nvars, SCIP_VAR **vars, SCIP_Real *coefs)
 
SCIP_Real SCIPgetRowprepViolation (SCIP *scip, SCIP_ROWPREP *rowprep, SCIP_SOL *sol, SCIP_Bool *reliable)
 
SCIP_Bool SCIPisRowprepViolationReliable (SCIP *scip, SCIP_ROWPREP *rowprep, SCIP_SOL *sol)
 
void SCIPmergeRowprepTerms (SCIP *scip, SCIP_ROWPREP *rowprep)
 
SCIP_RETCODE SCIPcleanupRowprep (SCIP *scip, SCIP_ROWPREP *rowprep, SCIP_SOL *sol, SCIP_Real minviol, SCIP_Real *viol, SCIP_Bool *success)
 
SCIP_RETCODE SCIPcleanupRowprep2 (SCIP *scip, SCIP_ROWPREP *rowprep, SCIP_SOL *sol, SCIP_Real maxcoefbound, SCIP_Bool *success)
 
SCIP_Real SCIPscaleupRowprep (SCIP *scip, SCIP_ROWPREP *rowprep, SCIP_Real minscaleup, SCIP_Bool *success)
 
int SCIPscaleRowprep (SCIP_ROWPREP *rowprep, SCIP_Real factor)
 
SCIP_RETCODE SCIPgetRowprepRowConshdlr (SCIP *scip, SCIP_ROW **row, SCIP_ROWPREP *rowprep, SCIP_CONSHDLR *conshdlr)
 
SCIP_RETCODE SCIPgetRowprepRowCons (SCIP *scip, SCIP_ROW **row, SCIP_ROWPREP *rowprep, SCIP_CONS *cons)
 
SCIP_RETCODE SCIPgetRowprepRowSepa (SCIP *scip, SCIP_ROW **row, SCIP_ROWPREP *rowprep, SCIP_SEPA *sepa)
 

Function Documentation

◆ SCIPcreateRowprep()

SCIP_RETCODE SCIPcreateRowprep ( SCIP * scip,
SCIP_ROWPREP ** rowprep,
SCIP_SIDETYPE sidetype,
SCIP_Bool local )

creates a SCIP_ROWPREP datastructure

Initial row represents 0 ≤ 0.

Parameters
scipSCIP data structure
rowprepbuffer to store pointer to rowprep
sidetypewhether cut will be or lower-equal or larger-equal type
localwhether 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().

◆ SCIPfreeRowprep()

◆ SCIPcopyRowprep()

SCIP_RETCODE SCIPcopyRowprep ( SCIP * scip,
SCIP_ROWPREP ** target,
SCIP_ROWPREP * source )

creates a copy of a SCIP_ROWPREP datastructure

Parameters
scipSCIP data structure
targetbuffer to store pointer of rowprep copy
sourcerowprep to copy

Definition at line 599 of file misc_rowprep.c.

References assert(), FALSE, i, NULL, SCIP_CALL, SCIP_OKAY, SCIPduplicateBlockMemory, and SCIPduplicateBlockMemoryArray.

◆ SCIProwprepGetNVars()

int SCIProwprepGetNVars ( SCIP_ROWPREP * rowprep)

gives number of terms in rowprep

Parameters
rowpreprowprep

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().

◆ SCIProwprepGetVars()

SCIP_VAR ** SCIProwprepGetVars ( SCIP_ROWPREP * rowprep)

gives variables of rowprep (feel free to modify)

Parameters
rowpreprowprep

Definition at line 639 of file misc_rowprep.c.

References assert(), i, and NULL.

Referenced by SCIP_DECL_NLHDLRENFO(), SCIPprocessRowprepNonlinear(), and sparsifyIntercut().

◆ SCIProwprepGetCoefs()

SCIP_Real * SCIProwprepGetCoefs ( SCIP_ROWPREP * rowprep)

gives coefficients of rowprep (feel free to modify)

Parameters
rowpreprowprep

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().

◆ SCIProwprepGetSide()

SCIP_Real SCIProwprepGetSide ( SCIP_ROWPREP * rowprep)

gives side of rowprep

Parameters
rowpreprowprep

Definition at line 659 of file misc_rowprep.c.

References assert(), i, and NULL.

Referenced by generateIntercut(), and SCIP_DECL_NLHDLRENFO().

◆ SCIProwprepGetSidetype()

SCIP_SIDETYPE SCIProwprepGetSidetype ( SCIP_ROWPREP * rowprep)

gives kind of inequality of rowprep

Parameters
rowpreprowprep

Definition at line 669 of file misc_rowprep.c.

References assert(), i, and NULL.

Referenced by enforceExprNlhdlr(), and SCIP_DECL_NLHDLRINITSEPA().

◆ SCIProwprepIsLocal()

SCIP_Bool SCIProwprepIsLocal ( SCIP_ROWPREP * rowprep)

returns whether rowprep is locally valid only

Parameters
rowpreprowprep

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().

◆ SCIProwprepGetName()

◆ SCIProwprepGetNModifiedVars()

int SCIProwprepGetNModifiedVars ( SCIP_ROWPREP * rowprep)

returns number of variables which coefficients were modified in cleanup

Parameters
rowpreprowprep

Definition at line 699 of file misc_rowprep.c.

References assert(), i, and NULL.

Referenced by SCIPprocessRowprepNonlinear().

◆ SCIProwprepGetModifiedVars()

SCIP_VAR ** SCIProwprepGetModifiedVars ( SCIP_ROWPREP * rowprep)

returns variables which coefficients were modified in cleanup

Parameters
rowpreprowprep

Definition at line 709 of file misc_rowprep.c.

References assert(), i, and NULL.

Referenced by SCIPprocessRowprepNonlinear().

◆ SCIProwprepReset()

void SCIProwprepReset ( SCIP_ROWPREP * rowprep)

resets rowprep to have 0 terms and side 0.0

Parameters
rowpreprowprep

Definition at line 719 of file misc_rowprep.c.

References assert(), FALSE, i, and NULL.

Referenced by SCIP_DECL_NLHDLRINITSEPA().

◆ SCIProwprepSetCoef()

void SCIProwprepSetCoef ( SCIP_ROWPREP * rowprep,
int idx,
SCIP_Real newcoef )

sets coefficient idx of rowprep

Parameters
rowpreprowprep
idxindex of coef to set
newcoefnew coefficient

Definition at line 734 of file misc_rowprep.c.

References assert(), i, and NULL.

Referenced by sparsifyIntercut().

◆ SCIProwprepAddSide()

void SCIProwprepAddSide ( SCIP_ROWPREP * rowprep,
SCIP_Real side )

adds constant value to side of rowprep

Parameters
rowpreprowprep
sideconstant 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().

◆ SCIProwprepAddConstant()

◆ SCIProwprepSetSidetype()

void SCIProwprepSetSidetype ( SCIP_ROWPREP * rowprep,
SCIP_SIDETYPE sidetype )

sets side type of rowprep

Parameters
rowpreprowprep
sidetypenew side type

Definition at line 769 of file misc_rowprep.c.

References assert(), i, and NULL.

Referenced by generateIntercut(), and SCIP_DECL_NLHDLRINITSEPA().

◆ SCIProwprepSetLocal()

void SCIProwprepSetLocal ( SCIP_ROWPREP * rowprep,
SCIP_Bool islocal )

sets whether rowprep is local

Parameters
rowpreprowprep
islocalwhether 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().

◆ SCIProwprepRecordModifications()

void SCIProwprepRecordModifications ( SCIP_ROWPREP * rowprep)

enables recording for where modifications were done in cleanup

Parameters
rowpreprowprep

Definition at line 791 of file misc_rowprep.c.

References assert(), i, NULL, and TRUE.

Referenced by SCIPprocessRowprepNonlinear().

◆ SCIPprintRowprep()

void SCIPprintRowprep ( SCIP * scip,
SCIP_ROWPREP * rowprep,
FILE * file )

prints a rowprep

Parameters
scipSCIP data structure
rowpreprowprep to be printed
filefile 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().

◆ SCIPprintRowprepSol()

void SCIPprintRowprepSol ( SCIP * scip,
SCIP_ROWPREP * rowprep,
SCIP_SOL * sol,
FILE * file )

prints a rowprep and values in solution

Parameters
scipSCIP data structure
rowpreprowprep to be printed
solsolution for activity
filefile 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().

◆ SCIPensureRowprepSize()

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.

Parameters
scipSCIP data structure
rowpreprowprep
sizenumber 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().

◆ SCIPaddRowprepTerm()

◆ SCIPaddRowprepTerms()

SCIP_RETCODE SCIPaddRowprepTerms ( SCIP * scip,
SCIP_ROWPREP * rowprep,
int nvars,
SCIP_VAR ** vars,
SCIP_Real * coefs )

adds several terms coef*var to a rowprep

Parameters
scipSCIP data structure
rowpreprowprep
nvarsnumber of terms to add
varsvariables to add
coefscoefficients 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().

◆ SCIPgetRowprepViolation()

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|) \).

Parameters
scipSCIP data structure
rowpreprowprep
solsolution or NULL for LP solution
reliablebuffer 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().

◆ SCIPisRowprepViolationReliable()

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

See also
SCIPgetRowprepViolation()
Parameters
scipSCIP data structure
rowpreprowprep
solsolution or NULL for LP solution

Definition at line 1064 of file misc_rowprep.c.

References assert(), i, NULL, SCIPgetRowprepViolation(), and sol.

◆ SCIPmergeRowprepTerms()

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.

Parameters
scipSCIP data structure
rowpreprowprep 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().

◆ SCIPcleanupRowprep()

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:

  • the coefratio is below separating/maxcoefratiofacrowprep / numerics/feastol
  • the violation is at least minviol
  • the violation is reliable or minviol = 0
  • the absolute value of coefficients are below SCIPinfinity()
  • the absolute value of the side is below SCIPinfinity()

Cleans 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:

  • the coefrange is below maxcoefrange
  • the violation is at least minviol
  • the violation is reliable or minviol = 0
  • the absolute value of coefficients are below SCIPinfinity()
  • the absolute value of the side is below SCIPinfinity()
Parameters
scipSCIP data structure
rowpreprowprep to be cleaned
solsolution that we try to cut off, or NULL for LP solution
minviolminimal absolute violation the row should achieve (w.r.t. sol)
violbuffer to store absolute violation of cleaned up cut in sol, or NULL if not of interest
successbuffer 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().

◆ SCIPcleanupRowprep2()

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:

  • the coefratio is below separating/maxcoefratiofacrowprep / numerics/feastol
  • the absolute value of coefficients are below SCIPinfinity()
  • the absolute value of the side is below SCIPinfinity()

In difference to SCIPcleanupRowprep(), this function does not scale up the row to increase the absolute violation.

Parameters
scipSCIP data structure
rowpreprowprep to be cleaned
solsolution that we try to cut off, or NULL for LP solution
maxcoefboundbound on absolute value of largest coefficient
successbuffer 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().

◆ SCIPscaleupRowprep()

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.

Returns
The applied scaling factor, if success is set to TRUE.
Parameters
scipSCIP data structure
rowpreprowprep to be cleaned
minscaleupminimal factor by which to scale up row, or <= 1.0 if to be ignored
successbuffer 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().

◆ SCIPscaleRowprep()

int SCIPscaleRowprep ( SCIP_ROWPREP * rowprep,
SCIP_Real factor )

scales a rowprep by given factor (after some rounding)

Returns
Exponent of actually applied scaling factor, if written as \(2^x\).
Parameters
rowpreprowprep to be scaled
factorsuggested scale factor

Definition at line 1626 of file misc_rowprep.c.

References assert(), i, and NULL.

Referenced by rowprepCleanupIntegralCoefs(), rowprepCleanupScaledown(), rowprepCleanupScaleup(), SCIPcleanupRowprep2(), and SCIPscaleupRowprep().

◆ SCIPgetRowprepRowConshdlr()

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

Parameters
scipSCIP data structure
rowbuffer to store pointer to new row
rowpreprowprep to be turned into a row
conshdlrconstraint 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.

◆ SCIPgetRowprepRowCons()

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

Parameters
scipSCIP data structure
rowbuffer to store pointer to new row
rowpreprowprep to be turned into a row
consconstraint

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().

◆ SCIPgetRowprepRowSepa()

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

Parameters
scipSCIP data structure
rowbuffer to store pointer to new row
rowpreprowprep to be turned into a row
sepaseparator

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().