Scippy

SCIP

Solving Constraint Integer Programs

Detailed Description

Macros

#define SCIPisFinite(x)   ((x) == (x))
 

Functions

SCIP_Real SCIPcalcMachineEpsilon (void)
 
SCIP_Longint SCIPcalcGreComDiv (SCIP_Longint val1, SCIP_Longint val2)
 
SCIP_Longint SCIPcalcSmaComMul (SCIP_Longint val1, SCIP_Longint val2)
 
SCIP_Bool SCIPrealToRational (SCIP_Real val, SCIP_Real mindelta, SCIP_Real maxdelta, SCIP_Longint maxdnom, SCIP_Longint *nominator, SCIP_Longint *denominator)
 
SCIP_RETCODE SCIPcalcIntegralScalar (SCIP_Real *vals, int nvals, SCIP_Real mindelta, SCIP_Real maxdelta, SCIP_Longint maxdnom, SCIP_Real maxscale, SCIP_Real *intscalar, SCIP_Bool *success)
 
SCIP_Bool SCIPfindSimpleRational (SCIP_Real lb, SCIP_Real ub, SCIP_Longint maxdnom, SCIP_Longint *nominator, SCIP_Longint *denominator)
 
SCIP_Real SCIPselectSimpleValue (SCIP_Real lb, SCIP_Real ub, SCIP_Longint maxdnom)
 
SCIP_Real SCIPrelDiff (SCIP_Real val1, SCIP_Real val2)
 

Macro Definition Documentation

Function Documentation

SCIP_Real SCIPcalcMachineEpsilon ( void  )

returns the machine epsilon: the smallest number eps > 0, for which 1.0 + eps > 1.0

Definition at line 6563 of file misc.c.

References SCIP_Real.

SCIP_Longint SCIPcalcGreComDiv ( SCIP_Longint  val1,
SCIP_Longint  val2 
)

calculates the greatest common divisor of the two given values

Parameters
val1first value of greatest common devisor calculation
val2second value of greatest common devisor calculation

Definition at line 6586 of file misc.c.

Referenced by deleteRedundantVars(), normalizeCons(), normalizeCumulativeCondition(), normalizeWeights(), presolveTryAddLinearReform(), SCIPcalcIntegralScalar(), SCIPcalcSmaComMul(), SCIPprobScaleObj(), SCIProwCalcIntegralScalar(), SCIPsolveKnapsackExactly(), simplifyInequalities(), and tryAggregateIntVars().

SCIP_Longint SCIPcalcSmaComMul ( SCIP_Longint  val1,
SCIP_Longint  val2 
)

calculates the smallest common multiple of the two given values

Parameters
val1first value of smallest common multiple calculation
val2second value of smallest common multiple calculation

Definition at line 6697 of file misc.c.

References SCIP_Longint, and SCIPcalcGreComDiv().

Referenced by normalizeCons(), and tryAggregateIntVars().

SCIP_Bool SCIPrealToRational ( SCIP_Real  val,
SCIP_Real  mindelta,
SCIP_Real  maxdelta,
SCIP_Longint  maxdnom,
SCIP_Longint nominator,
SCIP_Longint denominator 
)

converts a real number into a (approximate) rational representation, and returns TRUE iff the conversion was successful

Parameters
valreal value r to convert into rational number
mindeltaminimal allowed difference r - q of real r and rational q = n/d
maxdeltamaximal allowed difference r - q of real r and rational q = n/d
maxdnommaximal denominator allowed
nominatorpointer to store the nominator n of the rational number
denominatorpointer to store the denominator d of the rational number

Definition at line 6718 of file misc.c.

References EPSFLOOR, EPSGT, FALSE, MIN, NULL, REALABS, SCIP_Longint, SCIP_LONGINT_MAX, SCIP_Real, and TRUE.

Referenced by normalizeCons(), prettifyConss(), SCIPcalcIntegralScalar(), SCIPfindSimpleRational(), SCIProwCalcIntegralScalar(), and tryAggregateIntVars().

SCIP_RETCODE SCIPcalcIntegralScalar ( SCIP_Real vals,
int  nvals,
SCIP_Real  mindelta,
SCIP_Real  maxdelta,
SCIP_Longint  maxdnom,
SCIP_Real  maxscale,
SCIP_Real intscalar,
SCIP_Bool success 
)

tries to find a value, such that all given values, if scaled with this value become integral in relative allowed difference in between mindelta and maxdelta

Parameters
valsvalues to scale
nvalsnumber of values to scale
mindeltaminimal relative allowed difference of scaled coefficient s*c and integral i
maxdeltamaximal relative allowed difference of scaled coefficient s*c and integral i
maxdnommaximal denominator allowed in rational numbers
maxscalemaximal allowed scalar
intscalarpointer to store scalar that would make the coefficients integral, or NULL
successstores whether returned value is valid

Definition at line 6878 of file misc.c.

References EPSEQ, FALSE, isIntegralScalar(), MIN, nscalars, NULL, REALABS, SCIP_Bool, SCIP_DEFAULT_EPSILON, SCIP_INVALID, SCIP_Longint, SCIP_OKAY, SCIP_Real, SCIP_REAL_MAX, SCIPcalcGreComDiv(), SCIPdebugMessage, SCIPrealToRational(), and TRUE.

Referenced by getFlowCover(), getRelevantRows(), SCIPprobScaleObj(), and SCIPseparateRelaxedKnapsack().

SCIP_Bool SCIPfindSimpleRational ( SCIP_Real  lb,
SCIP_Real  ub,
SCIP_Longint  maxdnom,
SCIP_Longint nominator,
SCIP_Longint denominator 
)

given a (usually very small) interval, tries to find a rational number with simple denominator (i.e. a small number, probably multiplied with powers of 10) out of this interval; returns TRUE iff a valid rational number inside the interval was found

Parameters
lblower bound of the interval
ubupper bound of the interval
maxdnommaximal denominator allowed for resulting rational number
nominatorpointer to store the nominator n of the rational number
denominatorpointer to store the denominator d of the rational number

Definition at line 7082 of file misc.c.

References SCIP_Real, SCIPintervalGetRoundingMode(), SCIPintervalHasRoundingControl(), SCIPintervalSetRoundingMode(), SCIPintervalSetRoundingModeDownwards(), and SCIPrealToRational().

Referenced by SCIPselectSimpleValue().

SCIP_Real SCIPselectSimpleValue ( SCIP_Real  lb,
SCIP_Real  ub,
SCIP_Longint  maxdnom 
)

given a (usually very small) interval, selects a value inside this interval; it is tried to select a rational number with simple denominator (i.e. a small number, probably multiplied with powers of 10); if no valid rational number inside the interval was found, selects the central value of the interval

Parameters
lblower bound of the interval
ubupper bound of the interval
maxdnommaximal denominator allowed for resulting rational number

Definition at line 7123 of file misc.c.

References MAX, SCIP_Bool, SCIP_Longint, SCIP_Real, SCIPdebugMessage, SCIPdebugPrintf, and SCIPfindSimpleRational().

Referenced by convertUnaryEquality(), fixVariables(), presolveTryAddLinearReform(), SCIP_DECL_PRESOLEXEC(), and SCIPanalyzeDeductionsProbing().