Detailed Description
logarithm expression handler
Definition in file expr_log.c.
Go to the source code of this file.
Macros | |
#define | EXPRHDLR_NAME "log" |
#define | EXPRHDLR_DESC "natural logarithm expression" |
#define | EXPRHDLR_PRECEDENCE 80000 |
#define | EXPRHDLR_HASHKEY SCIPcalcFibHash(16273.0) |
Macro Definition Documentation
◆ EXPRHDLR_NAME
#define EXPRHDLR_NAME "log" |
Definition at line 41 of file expr_log.c.
Referenced by SCIP_DECL_EXPRESTIMATE(), SCIP_DECL_EXPRINITESTIMATES(), SCIP_DECL_EXPRINTEVAL(), SCIP_DECL_EXPRREVERSEPROP(), SCIPcreateExprLog(), SCIPincludeExprhdlrLog(), and SCIPisExprLog().
◆ EXPRHDLR_DESC
#define EXPRHDLR_DESC "natural logarithm expression" |
Definition at line 42 of file expr_log.c.
Referenced by SCIPincludeExprhdlrLog().
◆ EXPRHDLR_PRECEDENCE
#define EXPRHDLR_PRECEDENCE 80000 |
Definition at line 43 of file expr_log.c.
Referenced by SCIPincludeExprhdlrLog().
◆ EXPRHDLR_HASHKEY
#define EXPRHDLR_HASHKEY SCIPcalcFibHash(16273.0) |
Definition at line 44 of file expr_log.c.
Referenced by SCIP_DECL_EXPRHASH().
Function Documentation
◆ addLogSecant()
|
static |
computes coefficients of secant of a logarithmic term
- Parameters
-
scip SCIP data structure lb lower bound on variable ub upper bound on variable lincoef buffer to add coefficient of secant linconstant buffer to add constant of secant success buffer to set to FALSE if secant has failed due to large numbers or unboundedness
Definition at line 63 of file expr_log.c.
References FALSE, NULL, REALABS, SCIP_Real, SCIPisEQ(), SCIPisInfinity(), and SCIPisLE().
Referenced by SCIP_DECL_EXPRESTIMATE(), and SCIP_DECL_EXPRINITESTIMATES().
◆ addLogLinearization()
|
static |
computes coefficients of linearization of a logarithmic term in a reference point
- Parameters
-
scip SCIP data structure refpoint point for which to compute value of linearization isint whether corresponding variable is a discrete variable, and thus linearization could be moved lincoef buffer to add coefficient of secant linconstant buffer to add constant of secant success buffer to set to FALSE if secant has failed due to large numbers or unboundedness
Definition at line 114 of file expr_log.c.
References FALSE, NULL, REALABS, SCIP_Real, SCIPfloor(), SCIPisInfinity(), SCIPisIntegral(), and SCIPisLE().
Referenced by SCIP_DECL_EXPRESTIMATE(), and SCIP_DECL_EXPRINITESTIMATES().
◆ SCIP_DECL_EXPRSIMPLIFY()
|
static |
simplifies a log expression
Evaluates the logarithm function when its child is a value expression.
TODO: split products ? TODO: log(exp(*)) = *
Definition at line 178 of file expr_log.c.
References NULL, SCIP_CALL, SCIP_OKAY, SCIPcaptureExpr(), SCIPcreateExprValue(), SCIPexprGetChildren(), SCIPexprGetNChildren(), SCIPgetValueExprValue(), and SCIPisExprValue().
◆ SCIP_DECL_EXPRCOPYHDLR()
|
static |
expression handler copy callback
Definition at line 212 of file expr_log.c.
References SCIP_CALL, SCIP_OKAY, and SCIPincludeExprhdlrLog().
◆ SCIP_DECL_EXPRFREEHDLR()
|
static |
expression handler free callback
Definition at line 221 of file expr_log.c.
References NULL, SCIP_OKAY, and SCIPfreeBlockMemory.
◆ SCIP_DECL_EXPRCOPYDATA()
|
static |
expression data copy callback
Definition at line 233 of file expr_log.c.
References NULL, SCIP_OKAY, and SCIPexprGetData().
◆ SCIP_DECL_EXPRFREEDATA()
|
static |
expression data free callback
Definition at line 246 of file expr_log.c.
References NULL, SCIP_OKAY, and SCIPexprSetData().
◆ SCIP_DECL_EXPRPARSE()
|
static |
expression parse callback
Definition at line 257 of file expr_log.c.
References NULL, SCIP_CALL, SCIP_OKAY, SCIPcreateExprLog(), SCIPparseExpr(), SCIPreleaseExpr(), and TRUE.
◆ SCIP_DECL_EXPREVAL()
|
static |
expression point evaluation callback
! [SnippetExprEvalLog]
! [SnippetExprEvalLog]
Definition at line 281 of file expr_log.c.
References NULL, SCIP_INVALID, SCIP_OKAY, SCIPdebugMsg, SCIPexprGetChildren(), SCIPexprGetData(), SCIPexprGetEvalValue(), and SCIPexprGetNChildren().
◆ SCIP_DECL_EXPRBWDIFF()
|
static |
expression derivative evaluation callback
Definition at line 305 of file expr_log.c.
References NULL, SCIP_INVALID, SCIP_OKAY, SCIPexprGetChildren(), SCIPexprGetEvalValue(), SCIPexprGetHdlr(), and SCIPexprhdlrGetName().
◆ SCIP_DECL_EXPRINTEVAL()
|
static |
expression interval evaluation callback
Definition at line 325 of file expr_log.c.
References EXPRHDLR_NAME, SCIP_Interval::inf, NULL, SCIP_CALL, SCIP_INTERVAL_INFINITY, SCIP_OKAY, SCIP_VERBLEVEL_NONE, SCIPexprGetActivity(), SCIPexprGetChildren(), SCIPexprGetData(), SCIPexprGetHdlr(), SCIPexprGetNChildren(), SCIPexprhdlrGetData(), SCIPgetVerbLevel(), SCIPinfoMessage(), SCIPintervalIsEmpty(), SCIPintervalLog(), SCIPintervalSetEmpty(), SCIPprintExpr(), and TRUE.
◆ SCIP_DECL_EXPRESTIMATE()
|
static |
expression estimation callback
Definition at line 368 of file expr_log.c.
References addLogLinearization(), addLogSecant(), EXPRHDLR_NAME, FALSE, NULL, SCIP_OKAY, SCIP_Real, SCIPexprGetChildren(), SCIPexprGetHdlr(), SCIPexprGetNChildren(), SCIPexprhdlrGetName(), SCIPexprIsIntegral(), SCIPisPositive(), SCIPisZero(), and TRUE.
◆ SCIP_DECL_EXPRINITESTIMATES()
|
static |
initial estimates callback that provides initial linear estimators for a logarithm expression
Definition at line 424 of file expr_log.c.
References addLogLinearization(), addLogSecant(), EXPRHDLR_NAME, FALSE, MAX, MIN, NULL, SCIP_Bool, SCIP_INVALID, SCIP_OKAY, SCIP_Real, SCIPdebugMsg, SCIPexprGetChildren(), SCIPexprGetHdlr(), SCIPexprGetNChildren(), SCIPexprhdlrGetName(), SCIPexprIsIntegral(), SCIPintervalGetInf(), SCIPintervalGetSup(), SCIPisEQ(), SCIPisGE(), SCIPisInfinity(), SCIPisLE(), and TRUE.
◆ SCIP_DECL_EXPRREVERSEPROP()
|
static |
expression reverse propagation callback
Definition at line 502 of file expr_log.c.
References EXPRHDLR_NAME, NULL, SCIP_CALL, SCIP_INTERVAL_INFINITY, SCIP_OKAY, SCIP_VERBLEVEL_NONE, SCIPdebugMsg, SCIPepsilon(), SCIPexprGetHdlr(), SCIPexprGetNChildren(), SCIPexprhdlrGetData(), SCIPgetVerbLevel(), SCIPinfoMessage(), SCIPintervalExp(), SCIPprintExpr(), and TRUE.
◆ SCIP_DECL_EXPRHASH()
|
static |
expression hash callback
Definition at line 545 of file expr_log.c.
References EXPRHDLR_HASHKEY, NULL, SCIP_OKAY, and SCIPexprGetNChildren().
◆ SCIP_DECL_EXPRCURVATURE()
|
static |
expression curvature detection callback
Definition at line 561 of file expr_log.c.
References FALSE, NULL, SCIP_EXPRCURV_CONCAVE, SCIP_OKAY, SCIPexprGetNChildren(), and TRUE.
◆ SCIP_DECL_EXPRMONOTONICITY()
|
static |
expression monotonicity detection callback
Definition at line 582 of file expr_log.c.
References NULL, SCIP_MONOTONE_INC, and SCIP_OKAY.