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) |
#define EXPRHDLR_NAME "abs" |
Definition at line 40 of file expr_abs.c.
Referenced by SCIP_DECL_EXPRESTIMATE(), SCIP_DECL_EXPRESTIMATE(), SCIP_DECL_EXPRESTIMATE(), SCIP_DECL_EXPRESTIMATE(), SCIP_DECL_EXPRESTIMATE(), SCIP_DECL_EXPRESTIMATE(), SCIP_DECL_EXPRINITESTIMATES(), SCIP_DECL_EXPRINITESTIMATES(), SCIP_DECL_EXPRINITESTIMATES(), SCIP_DECL_EXPRINITESTIMATES(), SCIP_DECL_EXPRINITESTIMATES(), SCIP_DECL_EXPRINITESTIMATES(), SCIP_DECL_EXPRINTEVAL(), SCIP_DECL_EXPRREVERSEPROP(), SCIPcreateExprAbs(), SCIPcreateExprEntropy(), SCIPcreateExprErf(), SCIPcreateExprExp(), SCIPcreateExprLog(), SCIPcreateExprVaridx(), SCIPgetIndexExprVaridx(), SCIPgetVarExprVar(), SCIPincludeExprhdlrAbs(), SCIPincludeExprhdlrEntropy(), SCIPincludeExprhdlrErf(), SCIPincludeExprhdlrExp(), SCIPincludeExprhdlrLog(), SCIPincludeExprhdlrProduct(), SCIPincludeExprhdlrSum(), SCIPincludeExprhdlrValue(), SCIPincludeExprhdlrVar(), SCIPincludeExprhdlrVaridx(), SCIPisExprAbs(), SCIPisExprEntropy(), SCIPisExprErf(), SCIPisExprExp(), SCIPisExprLog(), SCIPisExprVaridx(), and SCIPsetIndexExprVaridx().
#define EXPRHDLR_DESC "absolute value expression" |
Definition at line 41 of file expr_abs.c.
Referenced by SCIPincludeExprhdlrAbs(), SCIPincludeExprhdlrEntropy(), SCIPincludeExprhdlrErf(), SCIPincludeExprhdlrExp(), SCIPincludeExprhdlrLog(), SCIPincludeExprhdlrProduct(), SCIPincludeExprhdlrSum(), SCIPincludeExprhdlrValue(), SCIPincludeExprhdlrVar(), and SCIPincludeExprhdlrVaridx().
#define EXPRHDLR_PRECEDENCE 70000 |
Definition at line 42 of file expr_abs.c.
Referenced by SCIP_DECL_EXPRPRINT(), SCIP_DECL_EXPRPRINT(), SCIP_DECL_EXPRPRINT(), SCIPincludeExprhdlrAbs(), SCIPincludeExprhdlrEntropy(), SCIPincludeExprhdlrErf(), SCIPincludeExprhdlrExp(), SCIPincludeExprhdlrLog(), SCIPincludeExprhdlrProduct(), SCIPincludeExprhdlrSum(), SCIPincludeExprhdlrValue(), SCIPincludeExprhdlrVar(), and SCIPincludeExprhdlrVaridx().
#define EXPRHDLR_HASHKEY SCIPcalcFibHash(7187.0) |
Definition at line 43 of file expr_abs.c.
Referenced by SCIP_DECL_EXPRHASH(), SCIP_DECL_EXPRHASH(), SCIP_DECL_EXPRHASH(), SCIP_DECL_EXPRHASH(), SCIP_DECL_EXPRHASH(), SCIP_DECL_EXPRHASH(), SCIP_DECL_EXPRHASH(), SCIP_DECL_EXPRHASH(), SCIP_DECL_EXPRHASH(), and SCIP_DECL_EXPRHASH().
|
static |
computes both tangent underestimates and secant
! [SnippetExprInitestimatesAbs]
! [SnippetExprInitestimatesAbs]
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 55 of file expr_abs.c.
References alpha, assert(), SCIP_Interval::inf, NULL, REALABS, SCIP_Bool, SCIP_OKAY, SCIP_Real, SCIPisEQ(), SCIPisInfinity(), SCIPisNegative(), SCIPisPositive(), and SCIP_Interval::sup.
Referenced by SCIP_DECL_EXPRINITESTIMATES().
|
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 142 of file expr_abs.c.
References assert(), NULL, REALABS, SCIP_CALL, SCIP_OKAY, SCIPcaptureExpr(), SCIPcreateExprValue(), SCIPexprGetChildren(), SCIPexprGetNChildren(), SCIPgetValueExprValue(), and SCIPisExprValue().
|
static |
Definition at line 171 of file expr_abs.c.
References SCIP_CALL, SCIP_OKAY, and SCIPincludeExprhdlrAbs().
|
static |
Definition at line 179 of file expr_abs.c.
References assert(), NULL, SCIP_CALL, SCIP_OKAY, SCIPcreateExprAbs(), SCIPparseExpr(), SCIPreleaseExpr(), and TRUE.
|
static |
expression point evaluation callback
Definition at line 203 of file expr_abs.c.
References assert(), NULL, REALABS, SCIP_INVALID, SCIP_OKAY, SCIPexprGetChildren(), SCIPexprGetEvalValue(), and SCIPexprGetNChildren().
|
static |
expression derivative evaluation callback
Definition at line 217 of file expr_abs.c.
References assert(), NULL, SCIP_INVALID, SCIP_OKAY, SCIPexprGetChildren(), SCIPexprGetEvalValue(), SCIPexprGetHdlr(), and SCIPexprhdlrGetName().
|
static |
expression interval evaluation callback
Definition at line 236 of file expr_abs.c.
References assert(), NULL, SCIP_INTERVAL_INFINITY, SCIP_OKAY, SCIPexprGetActivity(), SCIPexprGetChildren(), SCIPexprGetNChildren(), SCIPintervalAbs(), SCIPintervalIsEmpty(), and SCIPintervalSetEmpty().
|
static |
expression estimator callback
! [SnippetExprEstimateAbs]
! [SnippetExprEstimateAbs]
Definition at line 255 of file expr_abs.c.
References alpha, assert(), EXPRHDLR_NAME, FALSE, NULL, SCIP_OKAY, SCIP_Real, SCIPdebugMsg, SCIPexprGetHdlr(), SCIPexprGetNChildren(), SCIPexprhdlrGetName(), SCIPisNegative(), SCIPisPositive(), SCIPisRelEQ(), and TRUE.
|
static |
expression estimate initialization callback
Definition at line 350 of file expr_abs.c.
References assert(), computeCutsAbs(), EXPRHDLR_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIPexprGetHdlr(), SCIPexprGetNChildren(), and SCIPexprhdlrGetName().
|
static |
expression reverse propagation callback
! [SnippetExprReversepropAbs]
! [SnippetExprReversepropAbs]
Definition at line 364 of file expr_abs.c.
References assert(), SCIP_Interval::inf, NULL, SCIP_OKAY, SCIPexprGetNChildren(), SCIPintervalIntersect(), SCIPintervalSetBounds(), SCIPintervalUnify(), and SCIP_Interval::sup.
|
static |
expression hash callback
Definition at line 397 of file expr_abs.c.
References assert(), EXPRHDLR_HASHKEY, NULL, SCIP_OKAY, and SCIPexprGetNChildren().
|
static |
expression curvature detection callback
! [SnippetExprCurvatureAbs]
! [SnippetExprCurvatureAbs]
Definition at line 413 of file expr_abs.c.
References assert(), 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.
|
static |
expression monotonicity detection callback
! [SnippetExprMonotonicityAbs]
! [SnippetExprMonotonicityAbs]
Definition at line 453 of file expr_abs.c.
References assert(), SCIP_Interval::inf, NULL, result, SCIP_CALL, SCIP_MONOTONE_DEC, SCIP_MONOTONE_INC, SCIP_MONOTONE_UNKNOWN, SCIP_OKAY, SCIPevalExprActivity(), SCIPexprGetActivity(), SCIPexprGetChildren(), and SCIP_Interval::sup.
|
static |
expression integrality detection callback
Definition at line 483 of file expr_abs.c.
References assert(), NULL, SCIP_OKAY, SCIPexprGetChildren(), SCIPexprGetNChildren(), and SCIPexprIsIntegral().