scip_numerics.h
Go to the documentation of this file.
29 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
137 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
150 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
162 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
173 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
184 * This tolerance value is used by the SCIP core and plugins to tighten then feasibility tolerance on relaxations
185 * (especially the LP relaxation) during a solve. It is set to SCIP_INVALID initially, which means that only the
186 * feasibility tolerance of the particular relaxation is taken into account. If set to a valid value, however,
187 * then this value should be used to reduce the primal feasibility tolerance of a relaxation (thus, use the
190 * @pre The value of relaxfeastol is reset to SCIP_INVALID when initializing the solve (INITSOL).
191 * Therefore, this method can only be called in one of the following stages of the SCIP solving process:
215 /** returns the minimum value that is regarded as huge and should be handled separately (e.g., in activity
270 /** checks, if value is huge and should be handled separately (e.g., in activity computation) */
425 /** checks, if relative difference of val1 and val2 is not greater than feasibility tolerance */
528 /** checks, if relative difference of val1 and val2 is not greater than dual feasibility tolerance */
536 /** checks, if relative difference of val1 and val2 is greater than dual feasibility tolerance */
544 /** checks, if relative difference of val1 and val2 is not lower than -dual feasibility tolerance */
615 /** checks, if the given new lower bound is tighter (w.r.t. bound strengthening epsilon) than the old one */
624 /** checks, if the given new upper bound is tighter (w.r.t. bound strengthening epsilon) than the old one */
715 /** converts the given real number representing an integer to an int; in optimized mode the function gets inlined for
726 /** converts the given real number representing an integer to a long integer; in optimized mode the function gets inlined for
736 * This is useful, if the value, e.g., the activity of a linear constraint or the pseudo objective value, gets a high
737 * absolute value during the optimization process which is later reduced significantly. In this case, the last digits
739 * We do not consider the cancellations which can occur during increasing the absolute value because they just cannot
741 * In order to get more reliable values, the idea is to always store the last reliable value, where increasing the
742 * absolute of the value is viewed as preserving reliability. Then, after each update, the new absolute value can be
743 * compared against the last reliable one with this method, checking whether it was decreased by a factor of at least
755 /* In optimized mode, the function calls are overwritten by defines to reduce the number of function calls and
772 #define SCIPisScalingIntegral(scip, val, scalar) SCIPsetIsScalingIntegral((scip)->set, val, scalar)
818 #define SCIPisLbBetter(scip, newlb, oldlb, oldub) SCIPsetIsLbBetter(scip->set, newlb, oldlb, oldub)
819 #define SCIPisUbBetter(scip, newub, oldlb, oldub) SCIPsetIsUbBetter(scip->set, newub, oldlb, oldub)
833 #define SCIPconvertRealToLongint(scip, real) ((SCIP_Longint)((real) < 0 ? ((real) - 0.5) : ((real) + 0.5)))
835 #define SCIPisUpdateUnreliable(scip, newval, oldval) SCIPsetIsUpdateUnreliable((scip)->set, newval, oldval)
855 char** endptr /**< pointer to store the final string position if successfully parsed, otherwise @p str */
SCIP_EXPORT SCIP_Bool SCIPisEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:438
SCIP_EXPORT SCIP_RETCODE SCIPchgLpfeastol(SCIP *scip, SCIP_Real lpfeastol, SCIP_Bool printnewvalue)
Definition: scip_numerics.c:266
SCIP_EXPORT SCIP_Bool SCIPisRelEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:1149
SCIP_EXPORT SCIP_Bool SCIPisPositive(SCIP *scip, SCIP_Real val)
Definition: scip_numerics.c:563
SCIP_EXPORT SCIP_Bool SCIPisSumEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:672
SCIP_EXPORT SCIP_Bool SCIPisIntegral(SCIP *scip, SCIP_Real val)
Definition: scip_numerics.c:587
SCIP_EXPORT SCIP_Bool SCIPisSumRelGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:1253
SCIP_EXPORT SCIP_Bool SCIPisGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:490
Definition: struct_scip.h:59
SCIP_EXPORT SCIP_Bool SCIPisDualfeasLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:959
SCIP_EXPORT SCIP_Bool SCIPisUbBetter(SCIP *scip, SCIP_Real newub, SCIP_Real oldlb, SCIP_Real oldub)
Definition: scip_numerics.c:1136
SCIP_EXPORT SCIP_Bool SCIPisSumPositive(SCIP *scip, SCIP_Real val)
Definition: scip_numerics.c:749
SCIP_EXPORT SCIP_Real SCIPdualfeasCeil(SCIP *scip, SCIP_Real val)
Definition: scip_numerics.c:1083
SCIP_EXPORT SCIP_Bool SCIPisDualfeasFracIntegral(SCIP *scip, SCIP_Real val)
Definition: scip_numerics.c:1059
SCIP_EXPORT SCIP_Bool SCIPisRelGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:1188
SCIP_EXPORT SCIP_Real SCIPfeasRound(SCIP *scip, SCIP_Real val)
Definition: scip_numerics.c:922
SCIP_EXPORT SCIP_Bool SCIPisDualfeasGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:985
SCIP_EXPORT SCIP_Bool SCIPisSumZero(SCIP *scip, SCIP_Real val)
Definition: scip_numerics.c:737
SCIP_EXPORT SCIP_Bool SCIPisSumRelLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:1240
SCIP_EXPORT SCIP_Bool SCIPisRelGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:1201
SCIP_EXPORT SCIP_Bool SCIPisFeasNegative(SCIP *scip, SCIP_Real val)
Definition: scip_numerics.c:862
SCIP_EXPORT SCIP_Bool SCIPisRelLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:1175
SCIP_EXPORT SCIP_Bool SCIPisFeasLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:799
type definitions for return codes for SCIP methods
SCIP_EXPORT SCIP_Bool SCIPisDualfeasEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:946
SCIP_EXPORT SCIP_Bool SCIPisSumLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:698
SCIP_EXPORT SCIP_Bool SCIPisFeasIntegral(SCIP *scip, SCIP_Real val)
Definition: scip_numerics.c:874
SCIP_EXPORT SCIP_Bool SCIPisDualfeasNegative(SCIP *scip, SCIP_Real val)
Definition: scip_numerics.c:1035
SCIP_EXPORT SCIP_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)
Definition: scip_numerics.c:514
SCIP_EXPORT SCIP_Bool SCIPisDualfeasZero(SCIP *scip, SCIP_Real val)
Definition: scip_numerics.c:1011
SCIP_EXPORT SCIP_Bool SCIPisLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:464
SCIP_EXPORT SCIP_Bool SCIPisSumGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:724
SCIP_EXPORT SCIP_Real SCIPdualfeasFloor(SCIP *scip, SCIP_Real val)
Definition: scip_numerics.c:1071
SCIP_EXPORT SCIP_Bool SCIPisFeasEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:773
SCIP_EXPORT SCIP_Bool SCIPisSumRelLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:1227
SCIP_EXPORT SCIP_Bool SCIPisUpdateUnreliable(SCIP *scip, SCIP_Real newvalue, SCIP_Real oldvalue)
Definition: scip_numerics.c:1321
type definitions for SCIP's main datastructure
SCIP_EXPORT SCIP_Bool SCIPisSumRelEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:1214
SCIP_EXPORT SCIP_Real SCIPfeasFrac(SCIP *scip, SCIP_Real val)
Definition: scip_numerics.c:934
SCIP_EXPORT SCIP_Bool SCIPisZero(SCIP *scip, SCIP_Real val)
Definition: scip_numerics.c:551
SCIP_EXPORT void SCIPprintReal(SCIP *scip, FILE *file, SCIP_Real val, int width, int precision)
Definition: scip_numerics.c:370
SCIP_EXPORT SCIP_Bool SCIPisRelLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:1162
internal methods for global SCIP settings
SCIP main data structure.
SCIP_EXPORT SCIP_Longint SCIPconvertRealToLongint(SCIP *scip, SCIP_Real real)
Definition: scip_numerics.c:1297
SCIP_EXPORT SCIP_Real SCIPdualfeasFrac(SCIP *scip, SCIP_Real val)
Definition: scip_numerics.c:1107
SCIP_EXPORT SCIP_Bool SCIPisFeasFracIntegral(SCIP *scip, SCIP_Real val)
Definition: scip_numerics.c:886
SCIP_EXPORT SCIP_Real SCIPcutoffbounddelta(SCIP *scip)
Definition: scip_numerics.c:216
SCIP_EXPORT SCIP_Real SCIPdualfeasRound(SCIP *scip, SCIP_Real val)
Definition: scip_numerics.c:1095
SCIP_EXPORT SCIP_Real SCIPfeasFloor(SCIP *scip, SCIP_Real val)
Definition: scip_numerics.c:898
SCIP_EXPORT SCIP_Bool SCIPisSumRelGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:1266
SCIP_EXPORT SCIP_Bool SCIPisDualfeasLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:972
SCIP_EXPORT SCIP_Bool SCIPisFeasZero(SCIP *scip, SCIP_Real val)
Definition: scip_numerics.c:838
SCIP_EXPORT SCIP_Bool SCIPisSumGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:711
SCIP_EXPORT SCIP_Bool SCIPisSumLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:685
SCIP_EXPORT SCIP_Bool SCIPisSumNegative(SCIP *scip, SCIP_Real val)
Definition: scip_numerics.c:761
SCIP_EXPORT SCIP_Bool SCIPisLbBetter(SCIP *scip, SCIP_Real newlb, SCIP_Real oldlb, SCIP_Real oldub)
Definition: scip_numerics.c:1121
SCIP_EXPORT SCIP_Bool SCIPisDualfeasPositive(SCIP *scip, SCIP_Real val)
Definition: scip_numerics.c:1023
SCIP_EXPORT SCIP_Bool SCIPisNegative(SCIP *scip, SCIP_Real val)
Definition: scip_numerics.c:575
SCIP_EXPORT SCIP_Bool SCIPisFracIntegral(SCIP *scip, SCIP_Real val)
Definition: scip_numerics.c:612
SCIP_EXPORT SCIP_Real SCIPchgRelaxfeastol(SCIP *scip, SCIP_Real relaxfeastol)
Definition: scip_numerics.c:345
SCIP_EXPORT SCIP_Bool SCIPisFeasGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:825
SCIP_EXPORT void SCIPmarkLimitChanged(SCIP *scip)
Definition: scip_numerics.c:359
SCIP_EXPORT int SCIPconvertRealToInt(SCIP *scip, SCIP_Real real)
Definition: scip_numerics.c:1281
SCIP_EXPORT SCIP_Bool SCIPisDualfeasIntegral(SCIP *scip, SCIP_Real val)
Definition: scip_numerics.c:1047
SCIP_EXPORT SCIP_Bool SCIPisFeasGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:812
SCIP_EXPORT SCIP_Bool SCIPisHugeValue(SCIP *scip, SCIP_Real val)
Definition: scip_numerics.c:526
SCIP_EXPORT SCIP_Bool SCIPisFeasLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:786
SCIP_EXPORT SCIP_Bool SCIPisLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:451
SCIP_EXPORT SCIP_Bool SCIPisGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:477
SCIP_EXPORT SCIP_Bool SCIPisDualfeasGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:998
SCIP_EXPORT SCIP_Real SCIPbarrierconvtol(SCIP *scip)
Definition: scip_numerics.c:202
SCIP_EXPORT SCIP_Real SCIPfeasCeil(SCIP *scip, SCIP_Real val)
Definition: scip_numerics.c:910
SCIP_EXPORT SCIP_RETCODE SCIPchgDualfeastol(SCIP *scip, SCIP_Real dualfeastol)
Definition: scip_numerics.c:287
common defines and data types used in all packages of SCIP
SCIP_EXPORT SCIP_RETCODE SCIPchgBarrierconvtol(SCIP *scip, SCIP_Real barrierconvtol)
Definition: scip_numerics.c:312
Definition: objbenders.h:33
SCIP_EXPORT SCIP_RETCODE SCIPchgFeastol(SCIP *scip, SCIP_Real feastol)
Definition: scip_numerics.c:246
SCIP_EXPORT SCIP_Bool SCIPparseReal(SCIP *scip, const char *str, SCIP_Real *value, char **endptr)
Definition: scip_numerics.c:397
SCIP_EXPORT SCIP_Bool SCIPisScalingIntegral(SCIP *scip, SCIP_Real val, SCIP_Real scalar)
Definition: scip_numerics.c:599
SCIP_EXPORT SCIP_Bool SCIPisFeasPositive(SCIP *scip, SCIP_Real val)
Definition: scip_numerics.c:850