Detailed Description
absolute expression handler
Definition in file expr_abs.c.
Go to the source code of this file.
Macros | |
#define | EXPRHDLR_NAME "abs" |
#define | EXPRHDLR_DESC "absolute value expression" |
#define | EXPRHDLR_PRECEDENCE 70000 |
#define | EXPRHDLR_HASHKEY SCIPcalcFibHash(7187.0) |
Functions | |
static SCIP_RETCODE | computeCutsAbs (SCIP *scip, SCIP_INTERVAL bounds, SCIP_Bool overestimate, SCIP_Real **coefs, SCIP_Real *constant, int *nreturned) |
static | SCIP_DECL_EXPRSIMPLIFY (simplifyAbs) |
static | SCIP_DECL_EXPRCOPYHDLR (copyhdlrAbs) |
static | SCIP_DECL_EXPRPARSE (parseAbs) |
static | SCIP_DECL_EXPREVAL (evalAbs) |
static | SCIP_DECL_EXPRBWDIFF (bwdiffAbs) |
static | SCIP_DECL_EXPRINTEVAL (intevalAbs) |
static | SCIP_DECL_EXPRESTIMATE (estimateAbs) |
static | SCIP_DECL_EXPRINITESTIMATES (initEstimatesAbs) |
static | SCIP_DECL_EXPRREVERSEPROP (reversepropAbs) |
static | SCIP_DECL_EXPRHASH (hashAbs) |
static | SCIP_DECL_EXPRCURVATURE (curvatureAbs) |
static | SCIP_DECL_EXPRMONOTONICITY (monotonicityAbs) |
static | SCIP_DECL_EXPRINTEGRALITY (integralityAbs) |
SCIP_RETCODE | SCIPincludeExprhdlrAbs (SCIP *scip) |
SCIP_RETCODE | SCIPcreateExprAbs (SCIP *scip, SCIP_EXPR **expr, SCIP_EXPR *child, SCIP_DECL_EXPR_OWNERCREATE((*ownercreate)), void *ownercreatedata) |
SCIP_Bool | SCIPisExprAbs (SCIP *scip, SCIP_EXPR *expr) |
Macro Definition Documentation
◆ EXPRHDLR_NAME
#define EXPRHDLR_NAME "abs" |
Definition at line 31 of file expr_abs.c.
Referenced by SCIP_DECL_EXPRESTIMATE(), SCIP_DECL_EXPRINITESTIMATES(), SCIPcreateExprAbs(), SCIPincludeExprhdlrAbs(), and SCIPisExprAbs().
◆ EXPRHDLR_DESC
#define EXPRHDLR_DESC "absolute value expression" |
Definition at line 32 of file expr_abs.c.
Referenced by SCIPincludeExprhdlrAbs().
◆ EXPRHDLR_PRECEDENCE
#define EXPRHDLR_PRECEDENCE 70000 |
Definition at line 33 of file expr_abs.c.
Referenced by SCIPincludeExprhdlrAbs().
◆ EXPRHDLR_HASHKEY
#define EXPRHDLR_HASHKEY SCIPcalcFibHash(7187.0) |
Definition at line 34 of file expr_abs.c.
Referenced by SCIP_DECL_EXPRHASH().
Function Documentation
◆ computeCutsAbs()
|
static |
computes both tangent underestimates and secant
! [SnippetExprInitestimatesAbs]
! [SnippetExprInitestimatesAbs]
- Parameters
-
scip SCIP data structure bounds bounds of child overestimate whether the expression shall be overestimated or underestimated coefs buffer to store coefficients of computed estimators constant buffer to store constant of computed estimators nreturned buffer to store number of estimators that have been computed
Definition at line 46 of file expr_abs.c.
References SCIP_Interval::inf, NULL, REALABS, SCIP_OKAY, SCIP_Real, SCIPisEQ(), SCIPisInfinity(), SCIPisNegative(), SCIPisPositive(), and SCIP_Interval::sup.
Referenced by SCIP_DECL_EXPRINITESTIMATES().
◆ SCIP_DECL_EXPRSIMPLIFY()
|
static |
simplifies an abs expression
Evaluates the absolute value function when its child is a value expression.
TODO: abs(*) = * if * >= 0 or - * if * < 0
Definition at line 133 of file expr_abs.c.
References NULL, REALABS, SCIP_CALL, SCIP_OKAY, SCIPcaptureExpr(), SCIPcreateExprValue(), SCIPexprGetChildren(), SCIPexprGetNChildren(), SCIPgetValueExprValue(), and SCIPisExprValue().
◆ SCIP_DECL_EXPRCOPYHDLR()
|
static |
Definition at line 162 of file expr_abs.c.
References SCIP_CALL, SCIP_OKAY, and SCIPincludeExprhdlrAbs().
◆ SCIP_DECL_EXPRPARSE()
|
static |
Definition at line 170 of file expr_abs.c.
References NULL, SCIP_CALL, SCIP_OKAY, SCIPcreateExprAbs(), SCIPparseExpr(), SCIPreleaseExpr(), and TRUE.
◆ SCIP_DECL_EXPREVAL()
|
static |
expression point evaluation callback
Definition at line 194 of file expr_abs.c.
References NULL, REALABS, SCIP_INVALID, SCIP_OKAY, SCIPexprGetChildren(), SCIPexprGetEvalValue(), and SCIPexprGetNChildren().
◆ SCIP_DECL_EXPRBWDIFF()
|
static |
expression derivative evaluation callback
Definition at line 208 of file expr_abs.c.
References NULL, SCIP_INVALID, SCIP_OKAY, SCIPexprGetChildren(), SCIPexprGetEvalValue(), SCIPexprGetHdlr(), and SCIPexprhdlrGetName().
◆ SCIP_DECL_EXPRINTEVAL()
|
static |
expression interval evaluation callback
Definition at line 227 of file expr_abs.c.
References NULL, SCIP_INTERVAL_INFINITY, SCIP_OKAY, SCIPexprGetActivity(), SCIPexprGetChildren(), SCIPexprGetNChildren(), SCIPintervalAbs(), SCIPintervalIsEmpty(), and SCIPintervalSetEmpty().
◆ SCIP_DECL_EXPRESTIMATE()
|
static |
expression estimator callback
! [SnippetExprEstimateAbs]
! [SnippetExprEstimateAbs]
Definition at line 246 of file expr_abs.c.
References EXPRHDLR_NAME, FALSE, NULL, SCIP_OKAY, SCIP_Real, SCIPdebugMsg, SCIPexprGetHdlr(), SCIPexprGetNChildren(), SCIPexprhdlrGetName(), SCIPisNegative(), SCIPisPositive(), SCIPisRelEQ(), and TRUE.
◆ SCIP_DECL_EXPRINITESTIMATES()
|
static |
expression estimate initialization callback
Definition at line 341 of file expr_abs.c.
References computeCutsAbs(), EXPRHDLR_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIPexprGetHdlr(), SCIPexprGetNChildren(), and SCIPexprhdlrGetName().
◆ SCIP_DECL_EXPRREVERSEPROP()
|
static |
expression reverse propagation callback
! [SnippetExprReversepropAbs]
! [SnippetExprReversepropAbs]
Definition at line 355 of file expr_abs.c.
References SCIP_Interval::inf, NULL, SCIP_OKAY, SCIPexprGetNChildren(), SCIPintervalIntersect(), SCIPintervalSetBounds(), SCIPintervalUnify(), and SCIP_Interval::sup.
◆ SCIP_DECL_EXPRHASH()
|
static |
expression hash callback
Definition at line 388 of file expr_abs.c.
References EXPRHDLR_HASHKEY, NULL, SCIP_OKAY, and SCIPexprGetNChildren().
◆ SCIP_DECL_EXPRCURVATURE()
|
static |
expression curvature detection callback
! [SnippetExprCurvatureAbs]
! [SnippetExprCurvatureAbs]
Definition at line 404 of file expr_abs.c.
References FALSE, NULL, SCIP_CALL, SCIP_EXPRCURV_CONVEX, SCIP_EXPRCURV_LINEAR, SCIP_EXPRCURV_UNKNOWN, SCIP_OKAY, SCIP_Real, SCIPevalExprActivity(), SCIPexprcurvNegate(), SCIPexprGetActivity(), SCIPexprGetChildren(), SCIPexprGetNChildren(), SCIPintervalGetInf(), SCIPintervalGetSup(), and TRUE.
◆ SCIP_DECL_EXPRMONOTONICITY()
|
static |
expression monotonicity detection callback
! [SnippetExprMonotonicityAbs]
! [SnippetExprMonotonicityAbs]
Definition at line 444 of file expr_abs.c.
References SCIP_Interval::inf, NULL, SCIP_CALL, SCIP_MONOTONE_DEC, SCIP_MONOTONE_INC, SCIP_MONOTONE_UNKNOWN, SCIP_OKAY, SCIPevalExprActivity(), SCIPexprGetActivity(), SCIPexprGetChildren(), and SCIP_Interval::sup.
◆ SCIP_DECL_EXPRINTEGRALITY()
|
static |
expression integrality detection callback
Definition at line 474 of file expr_abs.c.
References NULL, SCIP_OKAY, SCIPexprGetChildren(), SCIPexprGetNChildren(), and SCIPexprIsIntegral().