scip_numerics.c
Go to the documentation of this file.
43/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
237 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
255 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
280 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
290 /* mark the LP unsolved, if the convergence tolerance was tightened, and the LP was solved with the barrier algorithm */
292 && (scip->lp->lastlpalgo == SCIP_LPALGO_BARRIER || scip->lp->lastlpalgo == SCIP_LPALGO_BARRIERCROSSOVER) )
303 * This tolerance value is used by the SCIP core and plugins to tighten then feasibility tolerance on relaxations
304 * (especially the LP relaxation) during a solve. It is set to SCIP_INVALID initially, which means that only the
305 * feasibility tolerance of the particular relaxation is taken into account. If set to a valid value, however,
306 * then this value should be used to reduce the primal feasibility tolerance of a relaxation (thus, use the
309 * @pre The value of relaxfeastol is reset to SCIP_INVALID when initializing the solve (INITSOL).
310 * Therefore, this method can only be called in one of the following stages of the SCIP solving process:
324 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPchgRelaxfeastol", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE) );
372 char** endptr /**< pointer to store the final string position if successfully parsed, otherwise @p str */
413 char** endptr /**< pointer to store the final string position if successfully parsed, otherwise @p str */
535/** returns the minimum value that is regarded as huge and should be handled separately (e.g., in activity
969/** checks if relative difference of val1 and val2 is not greater than dual feasibility tolerance */
995/** checks if relative difference of val1 and val2 is not lower than -dual feasibility tolerance */
1276/** converts the given real number representing an integer to an int; in optimized mode the function gets inlined for
1292/** converts the given real number representing an integer to a long integer; in optimized mode the function gets inlined for
1301 assert(SCIPisFeasEQ(scip, real, (SCIP_Real)(SCIP_Longint)(real < 0 ? real - 0.5 : real + 0.5)));
1309 * This is useful, if the value, e.g., the activity of a linear constraint or the pseudo objective value, gets a high
1310 * absolute value during the optimization process which is later reduced significantly. In this case, the last digits
1312 * We do not consider the cancellations which can occur during increasing the absolute value because they just cannot
1314 * In order to get more reliable values, the idea is to always store the last reliable value, where increasing the
1315 * absolute of the value is viewed as preserving reliability. Then, after each update, the new absolute value can be
1316 * compared against the last reliable one with this method, checking whether it was decreased by a factor of at least
1327 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPisUpdateUnreliable", FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE) );
methods for debugging
#define SCIPcheckStage(scip, method, init, problem, transforming, transformed, initpresolve, presolving, exitpresolve, presolved, initsolve, solving, solved, exitsolve, freetrans, freescip)
Definition: debug.h:365
SCIP_Bool SCIPstrToRationalValue(char *desc, SCIP_RATIONAL *value, char **endptr)
Definition: rational.cpp:823
SCIP_Bool SCIPisRelEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:1147
SCIP_Real SCIPdualfeasFloor(SCIP *scip, SCIP_Real val)
Definition: scip_numerics.c:1069
SCIP_Bool SCIPisSumPositive(SCIP *scip, SCIP_Real val)
Definition: scip_numerics.c:747
SCIP_Bool SCIPisRelLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:1173
SCIP_Bool SCIPisUbBetter(SCIP *scip, SCIP_Real newub, SCIP_Real oldlb, SCIP_Real oldub)
Definition: scip_numerics.c:1134
SCIP_Bool SCIPisFeasGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:823
SCIP_Real SCIPdualfeasCeil(SCIP *scip, SCIP_Real val)
Definition: scip_numerics.c:1081
SCIP_Bool SCIPisSumRelGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:1251
SCIP_Bool SCIPisDualfeasNegative(SCIP *scip, SCIP_Real val)
Definition: scip_numerics.c:1033
SCIP_Bool SCIPisGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:488
SCIP_Bool SCIPisFeasFracIntegral(SCIP *scip, SCIP_Real val)
Definition: scip_numerics.c:884
SCIP_Real SCIPchgRelaxfeastol(SCIP *scip, SCIP_Real relaxfeastol)
Definition: scip_numerics.c:316
SCIP_Bool SCIPisRelLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:1160
SCIP_Bool SCIPisSumRelLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:1238
SCIP_Bool SCIPparseRational(SCIP *scip, const char *str, SCIP_RATIONAL *value, char **endptr)
Definition: scip_numerics.c:409
SCIP_Bool SCIPisRelGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:1199
SCIP_Bool SCIPisRelGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:1186
SCIP_Bool SCIPisSumRelEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:1212
SCIP_Bool SCIPisSumNegative(SCIP *scip, SCIP_Real val)
Definition: scip_numerics.c:759
SCIP_Bool SCIPisFeasEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:771
SCIP_Bool SCIPisDualfeasLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:957
SCIP_Bool SCIPisDualfeasIntegral(SCIP *scip, SCIP_Real val)
Definition: scip_numerics.c:1045
SCIP_Bool SCIPisLbBetter(SCIP *scip, SCIP_Real newlb, SCIP_Real oldlb, SCIP_Real oldub)
Definition: scip_numerics.c:1119
SCIP_Bool SCIPisDualfeasPositive(SCIP *scip, SCIP_Real val)
Definition: scip_numerics.c:1021
SCIP_Bool SCIPisLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:462
void SCIPprintReal(SCIP *scip, FILE *file, SCIP_Real val, int width, int precision)
Definition: scip_numerics.c:341
SCIP_Bool SCIPisSumLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:683
SCIP_Real SCIPdualfeasRound(SCIP *scip, SCIP_Real val)
Definition: scip_numerics.c:1093
SCIP_Bool SCIPisSumRelLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:1225
SCIP_Bool SCIPisDualfeasFracIntegral(SCIP *scip, SCIP_Real val)
Definition: scip_numerics.c:1057
SCIP_Bool SCIPisFeasLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:784
SCIP_Bool SCIPisFeasNegative(SCIP *scip, SCIP_Real val)
Definition: scip_numerics.c:860
SCIP_Bool SCIPisFeasLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:797
SCIP_Bool SCIPisFracIntegral(SCIP *scip, SCIP_Real val)
Definition: scip_numerics.c:610
SCIP_Bool SCIPisSumEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:670
SCIP_RETCODE SCIPchgFeastol(SCIP *scip, SCIP_Real feastol)
Definition: scip_numerics.c:240
SCIP_Bool SCIPisFeasIntegral(SCIP *scip, SCIP_Real val)
Definition: scip_numerics.c:872
SCIP_Bool SCIPisDualfeasGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:983
SCIP_Bool SCIPisDualfeasEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:944
SCIP_Bool SCIPisSumGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:722
SCIP_Bool SCIPisDualfeasZero(SCIP *scip, SCIP_Real val)
Definition: scip_numerics.c:1009
SCIP_Real SCIPdualfeasFrac(SCIP *scip, SCIP_Real val)
Definition: scip_numerics.c:1105
SCIP_Bool SCIPisGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:475
SCIP_Longint SCIPconvertRealToLongint(SCIP *scip, SCIP_Real real)
Definition: scip_numerics.c:1295
SCIP_Bool SCIPisSumRelGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:1264
SCIP_Bool SCIPisScalingIntegral(SCIP *scip, SCIP_Real val, SCIP_Real scalar)
Definition: scip_numerics.c:597
SCIP_Bool SCIPisFeasGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:810
SCIP_Bool SCIPisEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:436
SCIP_Bool SCIPisDualfeasGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:996
SCIP_Bool SCIPisUpdateUnreliable(SCIP *scip, SCIP_Real newvalue, SCIP_Real oldvalue)
Definition: scip_numerics.c:1319
int SCIPconvertRealToInt(SCIP *scip, SCIP_Real real)
Definition: scip_numerics.c:1279
SCIP_RETCODE SCIPchgBarrierconvtol(SCIP *scip, SCIP_Real barrierconvtol)
Definition: scip_numerics.c:283
SCIP_Bool SCIPisLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:449
SCIP_Bool SCIPisDualfeasLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:970
SCIP_Bool SCIPisSumGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:709
SCIP_Bool SCIPisFeasPositive(SCIP *scip, SCIP_Real val)
Definition: scip_numerics.c:848
SCIP_Bool SCIPisSumLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:696
SCIP_Bool SCIPparseReal(SCIP *scip, const char *str, SCIP_Real *value, char **endptr)
Definition: scip_numerics.c:368
SCIP_RETCODE SCIPchgDualfeastol(SCIP *scip, SCIP_Real dualfeastol)
Definition: scip_numerics.c:258
SCIP_Bool SCIPstrToRealValue(const char *str, SCIP_Real *value, char **endptr)
Definition: misc.c:10955
void SCIPmessageFPrintInfo(SCIP_MESSAGEHDLR *messagehdlr, FILE *file, const char *formatstr,...)
Definition: message.c:618
Definition: multiprecision.hpp:66
public methods for message output
public data structures and miscellaneous methods
wrapper for rational number arithmetic
public methods for the LP relaxation, rows and columns
public methods for message handling
public methods for numerical tolerances
SCIP_Bool SCIPsetIsDualfeasZero(SCIP_SET *set, SCIP_Real val)
Definition: set.c:7298
SCIP_Bool SCIPsetIsDualfeasLE(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
Definition: set.c:7226
SCIP_RETCODE SCIPsetSetBarrierconvtol(SCIP_SET *set, SCIP_Real barrierconvtol)
Definition: set.c:6166
SCIP_Bool SCIPsetIsLbBetter(SCIP_SET *set, SCIP_Real newlb, SCIP_Real oldlb, SCIP_Real oldub)
Definition: set.c:7408
SCIP_Bool SCIPsetIsRelLT(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
Definition: set.c:7493
SCIP_RETCODE SCIPsetSetFeastol(SCIP_SET *set, SCIP_LP *lp, SCIP_Real feastol)
Definition: set.c:6132
SCIP_Bool SCIPsetIsFeasPositive(SCIP_SET *set, SCIP_Real val)
Definition: set.c:7082
SCIP_Bool SCIPsetIsDualfeasFracIntegral(SCIP_SET *set, SCIP_Real val)
Definition: set.c:7343
SCIP_Real SCIPsetDualfeasCeil(SCIP_SET *set, SCIP_Real val)
Definition: set.c:7369
SCIP_Bool SCIPsetIsGE(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
Definition: set.c:6623
SCIP_Bool SCIPsetIsFeasFracIntegral(SCIP_SET *set, SCIP_Real val)
Definition: set.c:7116
SCIP_Bool SCIPsetIsFeasNegative(SCIP_SET *set, SCIP_Real val)
Definition: set.c:7093
SCIP_Real SCIPsetSetRelaxfeastol(SCIP_SET *set, SCIP_Real relaxfeastol)
Definition: set.c:6184
SCIP_Bool SCIPsetIsSumRelGE(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
Definition: set.c:7685
SCIP_Bool SCIPsetIsSumGT(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
Definition: set.c:6830
SCIP_RETCODE SCIPsetSetDualfeastol(SCIP_SET *set, SCIP_Real dualfeastol)
Definition: set.c:6153
SCIP_Bool SCIPsetIsRelEQ(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
Definition: set.c:7469
SCIP_Bool SCIPsetIsDualfeasLT(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
Definition: set.c:7202
SCIP_Bool SCIPsetIsFeasGT(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
Definition: set.c:7023
SCIP_Bool SCIPsetIsFeasLE(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
Definition: set.c:6999
SCIP_Bool SCIPsetIsFeasEQ(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
Definition: set.c:6951
SCIP_Bool SCIPsetIsSumRelGT(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
Definition: set.c:7661
SCIP_Bool SCIPsetIsLE(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
Definition: set.c:6583
SCIP_Bool SCIPsetIsScalingIntegral(SCIP_SET *set, SCIP_Real val, SCIP_Real scalar)
Definition: set.c:6688
SCIP_Bool SCIPsetIsSumLE(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
Definition: set.c:6810
SCIP_Bool SCIPsetIsDualfeasNegative(SCIP_SET *set, SCIP_Real val)
Definition: set.c:7320
SCIP_Bool SCIPsetIsSumRelEQ(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
Definition: set.c:7589
SCIP_Bool SCIPsetIsSumGE(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
Definition: set.c:6850
SCIP_Bool SCIPsetIsEQ(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
Definition: set.c:6543
SCIP_Bool SCIPsetIsSumNegative(SCIP_SET *set, SCIP_Real val)
Definition: set.c:6892
SCIP_Bool SCIPsetIsSumLT(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
Definition: set.c:6790
SCIP_Bool SCIPsetIsFeasLT(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
Definition: set.c:6975
SCIP_Bool SCIPsetIsUbBetter(SCIP_SET *set, SCIP_Real newub, SCIP_Real oldlb, SCIP_Real oldub)
Definition: set.c:7432
SCIP_Bool SCIPsetIsLT(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
Definition: set.c:6563
SCIP_Real SCIPsetDualfeasRound(SCIP_SET *set, SCIP_Real val)
Definition: set.c:7381
SCIP_Bool SCIPsetIsDualfeasIntegral(SCIP_SET *set, SCIP_Real val)
Definition: set.c:7331
SCIP_Bool SCIPsetIsRelGE(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
Definition: set.c:7565
SCIP_Bool SCIPsetIsDualfeasPositive(SCIP_SET *set, SCIP_Real val)
Definition: set.c:7309
SCIP_Bool SCIPsetIsDualfeasEQ(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
Definition: set.c:7178
SCIP_Bool SCIPsetIsDualfeasGT(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
Definition: set.c:7250
SCIP_Bool SCIPsetIsSumRelLT(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
Definition: set.c:7613
SCIP_Bool SCIPsetIsRelGT(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
Definition: set.c:7541
SCIP_Bool SCIPsetIsGT(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
Definition: set.c:6603
SCIP_Bool SCIPsetIsSumEQ(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
Definition: set.c:6770
SCIP_Real SCIPsetDualfeasFrac(SCIP_SET *set, SCIP_Real val)
Definition: set.c:7393
SCIP_Bool SCIPsetIsUpdateUnreliable(SCIP_SET *set, SCIP_Real newvalue, SCIP_Real oldvalue)
Definition: set.c:7729
SCIP_Real SCIPsetDualfeasFloor(SCIP_SET *set, SCIP_Real val)
Definition: set.c:7357
SCIP_Bool SCIPsetIsFracIntegral(SCIP_SET *set, SCIP_Real val)
Definition: set.c:6708
SCIP_Bool SCIPsetIsSumRelLE(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
Definition: set.c:7637
SCIP_Bool SCIPsetIsDualfeasGE(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
Definition: set.c:7274
SCIP_Bool SCIPsetIsFeasGE(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
Definition: set.c:7047
SCIP_Bool SCIPsetIsRelLE(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
Definition: set.c:7517
SCIP_Bool SCIPsetIsSumPositive(SCIP_SET *set, SCIP_Real val)
Definition: set.c:6881
SCIP_Bool SCIPsetIsFeasIntegral(SCIP_SET *set, SCIP_Real val)
Definition: set.c:7104
internal methods for global SCIP settings
Definition: struct_rational.h:47
Definition: struct_scip.h:72
data structures for LP management
SCIP main data structure.