35#define _USE_MATH_DEFINES
43#define EXPRHDLR_NAME "exp"
44#define EXPRHDLR_DESC "exponential expression"
45#define EXPRHDLR_PRECEDENCE 85000
46#define EXPRHDLR_HASHKEY SCIPcalcFibHash(10181.0)
63 SCIP_Real* linconstant,
93 coef = (exp(ub) - exp(lb)) / (ub - lb);
94 constant = exp(ub) - coef * ub;
104 *linconstant += constant;
114 SCIP_Real* linconstant,
134 coef = exp(refpoint);
135 constant = exp(refpoint) * (1.0 - refpoint);
144 coef = (M_E - 1.0) * exp(f);
145 constant = exp(f) - f * coef;
155 *linconstant += constant;
189 *simplifiedexpr = expr;
216 *targetexprdata =
NULL;
327 addExpSecant(
scip, localbounds[0].inf, localbounds[0].sup, coefs, constant, success);
373 refpointsunder[0] = (7.0 * lbfinite + ubfinite) / 8.0;
374 refpointsunder[1] = (lbfinite + ubfinite) / 2.0;
375 refpointsunder[2] = (lbfinite + 7.0 * ubfinite) / 8.0;
379 for(
i = 0;
i < 4; ++
i )
381 if( !overest[
i] && overestimate )
389 coefs[*nreturned][0] = 0.0;
390 constant[*nreturned] = 0.0;
401 addExpSecant(
scip, lb, ub, coefs[*nreturned], &constant[*nreturned], &success);
442 *hashkey ^= childrenhashes[0];
515 void* ownercreatedata
#define SCIP_INTERVAL_INFINITY
static void addExpSecant(SCIP *scip, SCIP_Real lb, SCIP_Real ub, SCIP_Real *lincoef, SCIP_Real *linconstant, SCIP_Bool *success)
#define EXPRHDLR_PRECEDENCE
static void addExpLinearization(SCIP *scip, SCIP_Real refpoint, SCIP_Bool isint, SCIP_Real *lincoef, SCIP_Real *linconstant, SCIP_Bool *success)
exponential expression handler
constant value expression handler
SCIP_Bool SCIPisExprExp(SCIP *scip, SCIP_EXPR *expr)
SCIP_RETCODE SCIPcreateExprExp(SCIP *scip, SCIP_EXPR **expr, SCIP_EXPR *child, SCIP_DECL_EXPR_OWNERCREATE((*ownercreate)), void *ownercreatedata)
SCIP_RETCODE SCIPcreateExprValue(SCIP *scip, SCIP_EXPR **expr, SCIP_Real value, SCIP_DECL_EXPR_OWNERCREATE((*ownercreate)), void *ownercreatedata)
SCIP_RETCODE SCIPincludeExprhdlrExp(SCIP *scip)
const char * SCIPexprhdlrGetName(SCIP_EXPRHDLR *exprhdlr)
void SCIPexprhdlrSetCurvature(SCIP_EXPRHDLR *exprhdlr,)
void SCIPexprhdlrSetParse(SCIP_EXPRHDLR *exprhdlr,)
void SCIPexprhdlrSetIntEval(SCIP_EXPRHDLR *exprhdlr,)
void SCIPexprhdlrSetMonotonicity(SCIP_EXPRHDLR *exprhdlr,)
void SCIPexprhdlrSetReverseProp(SCIP_EXPRHDLR *exprhdlr,)
void SCIPexprhdlrSetHash(SCIP_EXPRHDLR *exprhdlr,)
SCIP_RETCODE SCIPincludeExprhdlr(SCIP *scip, SCIP_EXPRHDLR **exprhdlr, const char *name, const char *desc, unsigned int precedence, SCIP_DECL_EXPREVAL((*eval)), SCIP_EXPRHDLRDATA *data)
void SCIPexprhdlrSetSimplify(SCIP_EXPRHDLR *exprhdlr,)
void SCIPexprhdlrSetDiff(SCIP_EXPRHDLR *exprhdlr, SCIP_DECL_EXPRBWDIFF((*bwdiff)), SCIP_DECL_EXPRFWDIFF((*fwdiff)),)
void SCIPexprhdlrSetCopyFreeHdlr(SCIP_EXPRHDLR *exprhdlr, SCIP_DECL_EXPRCOPYHDLR((*copyhdlr)),)
SCIP_EXPRHDLR * SCIPfindExprhdlr(SCIP *scip, const char *name)
void SCIPexprhdlrSetCopyFreeData(SCIP_EXPRHDLR *exprhdlr, SCIP_DECL_EXPRCOPYDATA((*copydata)),)
void SCIPexprhdlrSetEstimate(SCIP_EXPRHDLR *exprhdlr, SCIP_DECL_EXPRINITESTIMATES((*initestimates)),)
SCIP_RETCODE SCIPcreateExpr(SCIP *scip, SCIP_EXPR **expr, SCIP_EXPRHDLR *exprhdlr, SCIP_EXPRDATA *exprdata, int nchildren, SCIP_EXPR **children, SCIP_DECL_EXPR_OWNERCREATE((*ownercreate)), void *ownercreatedata)
void SCIPexprSetData(SCIP_EXPR *expr, SCIP_EXPRDATA *exprdata)
int SCIPexprGetNChildren(SCIP_EXPR *expr)
SCIP_Bool SCIPexprIsIntegral(SCIP_EXPR *expr)
SCIP_Bool SCIPisExprValue(SCIP *scip, SCIP_EXPR *expr)
SCIP_RETCODE SCIPreleaseExpr(SCIP *scip, SCIP_EXPR **expr)
SCIP_EXPRDATA * SCIPexprGetData(SCIP_EXPR *expr)
SCIP_RETCODE SCIPparseExpr(SCIP *scip, SCIP_EXPR **expr, const char *exprstr, const char **finalpos, SCIP_DECL_EXPR_OWNERCREATE((*ownercreate)), void *ownercreatedata)
SCIP_Real SCIPgetValueExprValue(SCIP_EXPR *expr)
SCIP_Real SCIPexprGetEvalValue(SCIP_EXPR *expr)
SCIP_EXPR ** SCIPexprGetChildren(SCIP_EXPR *expr)
SCIP_INTERVAL SCIPexprGetActivity(SCIP_EXPR *expr)
void SCIPcaptureExpr(SCIP_EXPR *expr)
SCIP_EXPRHDLR * SCIPexprGetHdlr(SCIP_EXPR *expr)
SCIP_Real SCIPintervalGetInf(SCIP_INTERVAL interval)
SCIP_Bool SCIPintervalIsEmpty(SCIP_Real infinity, SCIP_INTERVAL operand)
void SCIPintervalLog(SCIP_Real infinity, SCIP_INTERVAL *resultant, SCIP_INTERVAL operand)
SCIP_Real SCIPintervalGetSup(SCIP_INTERVAL interval)
void SCIPintervalExp(SCIP_Real infinity, SCIP_INTERVAL *resultant, SCIP_INTERVAL operand)
void SCIPintervalSetEmpty(SCIP_INTERVAL *resultant)
SCIP_Bool SCIPisGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisIntegral(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Real SCIPfloor(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
assert(minobj< SCIPgetCutoffbound(scip))
#define SCIP_DECL_EXPR_OWNERCREATE(x)
#define SCIP_DECL_EXPRREVERSEPROP(x)
#define SCIP_DECL_EXPRINITESTIMATES(x)
#define SCIP_DECL_EXPRCURVATURE(x)
#define SCIP_DECL_EXPRFREEDATA(x)
#define SCIP_DECL_EXPRPARSE(x)
#define SCIP_DECL_EXPRBWDIFF(x)
#define SCIP_DECL_EXPRINTEVAL(x)
#define SCIP_DECL_EXPRMONOTONICITY(x)
#define SCIP_DECL_EXPRSIMPLIFY(x)
#define SCIP_DECL_EXPREVAL(x)
#define SCIP_DECL_EXPRHASH(x)
#define SCIP_DECL_EXPRCOPYHDLR(x)
#define SCIP_DECL_EXPRCOPYDATA(x)
#define SCIP_DECL_EXPRESTIMATE(x)
enum SCIP_Retcode SCIP_RETCODE