SCIP

    Solving Constraint Integer Programs

    Detailed Description

    exponential expression handler

    Author
    Stefan Vigerske
    Benjamin Mueller
    Ksenia Bestuzheva

    Definition in file expr_exp.c.

    #include <math.h>
    #include "scip/expr_exp.h"
    #include "scip/expr_value.h"

    Go to the source code of this file.

    Macros

    #define EXPRHDLR_NAME   "exp"
     
    #define EXPRHDLR_DESC   "exponential expression"
     
    #define EXPRHDLR_PRECEDENCE   85000
     
    #define EXPRHDLR_HASHKEY   SCIPcalcFibHash(10181.0)
     

    Functions

    static void addExpSecant (SCIP *scip, SCIP_Real lb, SCIP_Real ub, SCIP_Real *lincoef, SCIP_Real *linconstant, SCIP_Bool *success)
     
    static void addExpLinearization (SCIP *scip, SCIP_Real refpoint, SCIP_Bool isint, SCIP_Real *lincoef, SCIP_Real *linconstant, SCIP_Bool *success)
     
    static SCIP_DECL_EXPRSIMPLIFY (simplifyExp)
     
    static SCIP_DECL_EXPRCOPYHDLR (copyhdlrExp)
     
    static SCIP_DECL_EXPRCOPYDATA (copydataExp)
     
    static SCIP_DECL_EXPRFREEDATA (freedataExp)
     
    static SCIP_DECL_EXPRPARSE (parseExp)
     
    static SCIP_DECL_EXPREVAL (evalExp)
     
    static SCIP_DECL_EXPRBWDIFF (bwdiffExp)
     
    static SCIP_DECL_EXPRINTEVAL (intevalExp)
     
    static SCIP_DECL_EXPRESTIMATE (estimateExp)
     
    static SCIP_DECL_EXPRINITESTIMATES (initestimatesExp)
     
    static SCIP_DECL_EXPRREVERSEPROP (reversepropExp)
     
    static SCIP_DECL_EXPRHASH (hashExp)
     
    static SCIP_DECL_EXPRCURVATURE (curvatureExp)
     
    static SCIP_DECL_EXPRMONOTONICITY (monotonicityExp)
     
    SCIP_RETCODE SCIPincludeExprhdlrExp (SCIP *scip)
     
    SCIP_RETCODE SCIPcreateExprExp (SCIP *scip, SCIP_EXPR **expr, SCIP_EXPR *child, SCIP_DECL_EXPR_OWNERCREATE((*ownercreate)), void *ownercreatedata)
     
    SCIP_Bool SCIPisExprExp (SCIP *scip, SCIP_EXPR *expr)
     

    Macro Definition Documentation

    ◆ EXPRHDLR_NAME

    #define EXPRHDLR_NAME   "exp"

    Definition at line 42 of file expr_exp.c.

    ◆ EXPRHDLR_DESC

    #define EXPRHDLR_DESC   "exponential expression"

    Definition at line 43 of file expr_exp.c.

    ◆ EXPRHDLR_PRECEDENCE

    #define EXPRHDLR_PRECEDENCE   85000

    Definition at line 44 of file expr_exp.c.

    ◆ EXPRHDLR_HASHKEY

    #define EXPRHDLR_HASHKEY   SCIPcalcFibHash(10181.0)

    Definition at line 45 of file expr_exp.c.

    Function Documentation

    ◆ addExpSecant()

    static void addExpSecant ( SCIP *  scip,
    SCIP_Real  lb,
    SCIP_Real  ub,
    SCIP_Real *  lincoef,
    SCIP_Real *  linconstant,
    SCIP_Bool *  success 
    )
    static

    computes coefficients of secant of an exponential term

    Parameters
    scipSCIP data structure
    lblower bound on variable
    ubupper bound on variable
    lincoefbuffer to add coefficient of secant
    linconstantbuffer to add constant of secant
    successbuffer to set to FALSE if secant has failed due to large numbers or unboundedness

    Definition at line 57 of file expr_exp.c.

    References FALSE, NULL, REALABS, SCIP_Real, SCIPisEQ(), SCIPisInfinity(), and SCIPisLE().

    Referenced by SCIP_DECL_EXPRESTIMATE(), and SCIP_DECL_EXPRINITESTIMATES().

    ◆ addExpLinearization()

    static void addExpLinearization ( SCIP *  scip,
    SCIP_Real  refpoint,
    SCIP_Bool  isint,
    SCIP_Real *  lincoef,
    SCIP_Real *  linconstant,
    SCIP_Bool *  success 
    )
    static

    computes coefficients of linearization of an exponential term in a reference point

    Parameters
    scipSCIP data structure
    refpointpoint for which to compute value of linearization
    isintwhether corresponding variable is a discrete variable, and thus linearization could be moved
    lincoefbuffer to add coefficient of secant
    linconstantbuffer to add constant of secant
    successbuffer to set to FALSE if secant has failed due to large numbers or unboundedness

    Definition at line 108 of file expr_exp.c.

    References FALSE, NULL, REALABS, SCIP_Real, SCIPfloor(), SCIPisInfinity(), and SCIPisIntegral().

    Referenced by SCIP_DECL_EXPRESTIMATE(), and SCIP_DECL_EXPRINITESTIMATES().

    ◆ SCIP_DECL_EXPRSIMPLIFY()

    static SCIP_DECL_EXPRSIMPLIFY ( simplifyExp  )
    static

    simplifies an exp expression

    Evaluates the exponential function when its child is a value expression.

    TODO: exp(log(*)) = *

    ! [SnippetExprSimplifyExp]

    ! [SnippetExprSimplifyExp]

    Definition at line 168 of file expr_exp.c.

    References NULL, SCIP_CALL, SCIP_OKAY, SCIPcaptureExpr(), SCIPcreateExprValue(), SCIPexprGetChildren(), SCIPexprGetNChildren(), SCIPgetValueExprValue(), and SCIPisExprValue().

    ◆ SCIP_DECL_EXPRCOPYHDLR()

    static SCIP_DECL_EXPRCOPYHDLR ( copyhdlrExp  )
    static

    expression handler copy callback

    Definition at line 200 of file expr_exp.c.

    References SCIP_CALL, SCIP_OKAY, and SCIPincludeExprhdlrExp().

    ◆ SCIP_DECL_EXPRCOPYDATA()

    static SCIP_DECL_EXPRCOPYDATA ( copydataExp  )
    static

    expression data copy callback

    Definition at line 209 of file expr_exp.c.

    References NULL, SCIP_OKAY, and SCIPexprGetData().

    ◆ SCIP_DECL_EXPRFREEDATA()

    static SCIP_DECL_EXPRFREEDATA ( freedataExp  )
    static

    expression data free callback

    Definition at line 222 of file expr_exp.c.

    References NULL, SCIP_OKAY, and SCIPexprSetData().

    ◆ SCIP_DECL_EXPRPARSE()

    static SCIP_DECL_EXPRPARSE ( parseExp  )
    static

    expression parse callback

    ! [SnippetExprParseExp]

    ! [SnippetExprParseExp]

    Definition at line 233 of file expr_exp.c.

    References NULL, SCIP_CALL, SCIP_OKAY, SCIPcreateExprExp(), SCIPparseExpr(), SCIPreleaseExpr(), and TRUE.

    ◆ SCIP_DECL_EXPREVAL()

    static SCIP_DECL_EXPREVAL ( evalExp  )
    static

    expression point evaluation callback

    Definition at line 259 of file expr_exp.c.

    References NULL, SCIP_INVALID, SCIP_OKAY, SCIPexprGetChildren(), SCIPexprGetData(), SCIPexprGetEvalValue(), and SCIPexprGetNChildren().

    ◆ SCIP_DECL_EXPRBWDIFF()

    static SCIP_DECL_EXPRBWDIFF ( bwdiffExp  )
    static

    expression derivative evaluation callback

    Definition at line 273 of file expr_exp.c.

    References NULL, SCIP_INVALID, SCIP_OKAY, SCIPexprGetChildren(), SCIPexprGetEvalValue(), and SCIPisExprValue().

    ◆ SCIP_DECL_EXPRINTEVAL()

    static SCIP_DECL_EXPRINTEVAL ( intevalExp  )
    static

    ◆ SCIP_DECL_EXPRESTIMATE()

    static SCIP_DECL_EXPRESTIMATE ( estimateExp  )
    static

    ◆ SCIP_DECL_EXPRINITESTIMATES()

    static SCIP_DECL_EXPRINITESTIMATES ( initestimatesExp  )
    static

    ◆ SCIP_DECL_EXPRREVERSEPROP()

    static SCIP_DECL_EXPRREVERSEPROP ( reversepropExp  )
    static

    expression reverse propagation callback

    Definition at line 413 of file expr_exp.c.

    References NULL, SCIP_INTERVAL_INFINITY, SCIP_OKAY, SCIPexprGetNChildren(), SCIPintervalGetInf(), SCIPintervalGetSup(), SCIPintervalLog(), and TRUE.

    ◆ SCIP_DECL_EXPRHASH()

    static SCIP_DECL_EXPRHASH ( hashExp  )
    static

    expression hash callback

    Definition at line 434 of file expr_exp.c.

    References EXPRHDLR_HASHKEY, NULL, SCIP_OKAY, and SCIPexprGetNChildren().

    ◆ SCIP_DECL_EXPRCURVATURE()

    static SCIP_DECL_EXPRCURVATURE ( curvatureExp  )
    static

    expression curvature detection callback

    Definition at line 450 of file expr_exp.c.

    References FALSE, NULL, SCIP_EXPRCURV_CONVEX, SCIP_OKAY, SCIPexprGetNChildren(), and TRUE.

    ◆ SCIP_DECL_EXPRMONOTONICITY()

    static SCIP_DECL_EXPRMONOTONICITY ( monotonicityExp  )
    static

    expression monotonicity detection callback

    Definition at line 472 of file expr_exp.c.

    References NULL, SCIP_MONOTONE_INC, and SCIP_OKAY.