Scippy

SCIP

Solving Constraint Integer Programs

Detailed Description

power and signed power expression handlers

Author
Benjamin Mueller

Definition in file expr_pow.h.

#include "scip/scip.h"
#include "scip/type_expr.h"

Go to the source code of this file.

Functions

SCIP_RETCODE SCIPincludeExprhdlrPow (SCIP *scip)
 
SCIP_RETCODE SCIPincludeExprhdlrSignpower (SCIP *scip)
 
void SCIPaddSquareLinearization (SCIP *scip, SCIP_Real sqrcoef, SCIP_Real refpoint, SCIP_Bool isint, SCIP_Real *lincoef, SCIP_Real *linconstant, SCIP_Bool *success)
 
void SCIPaddSquareSecant (SCIP *scip, SCIP_Real sqrcoef, SCIP_Real lb, SCIP_Real ub, SCIP_Real *lincoef, SCIP_Real *linconstant, SCIP_Bool *success)
 
void SCIPestimateRoot (SCIP *scip, SCIP_Real exponent, SCIP_Bool overestimate, SCIP_Real xlb, SCIP_Real xub, SCIP_Real xref, SCIP_Real *constant, SCIP_Real *slope, SCIP_Bool *islocal, SCIP_Bool *success)
 
Power and signed power expression

These expression handlers provide the power function, that is,

\[ x \mapsto \begin{cases} x^e & \textrm{if}\; x \geq 0\; \textrm{or}\; e\in\mathbb{Z}, \\ \textrm{undefined}, & \textrm{otherwise}. \end{cases} \]

and the signed power function, that is,

\[ x \mapsto \textrm{sign}(x) |x|^e \]

for some exponent \(e\).

SCIP_RETCODE SCIPcreateExprPow (SCIP *scip, SCIP_EXPR **expr, SCIP_EXPR *child, SCIP_Real exponent, SCIP_DECL_EXPR_OWNERCREATE((*ownercreate)), void *ownercreatedata)
 
SCIP_RETCODE SCIPcreateExprSignpower (SCIP *scip, SCIP_EXPR **expr, SCIP_EXPR *child, SCIP_Real exponent, SCIP_DECL_EXPR_OWNERCREATE((*ownercreate)), void *ownercreatedata)
 
SCIP_Bool SCIPisExprSignpower (SCIP *scip, SCIP_EXPR *expr)
 

Function Documentation

◆ SCIPaddSquareLinearization()

void SCIPaddSquareLinearization ( SCIP scip,
SCIP_Real  sqrcoef,
SCIP_Real  refpoint,
SCIP_Bool  isint,
SCIP_Real lincoef,
SCIP_Real linconstant,
SCIP_Bool success 
)

computes coefficients of linearization of a square term in a reference point

Parameters
scipSCIP data structure
sqrcoefcoefficient of square term
refpointpoint where to linearize
isintwhether corresponding variable is a discrete variable, and thus linearization could be moved
lincoefbuffer to add coefficient of linearization
linconstantbuffer to add constant of linearization
successbuffer to set to FALSE if linearization has failed due to large numbers

Definition at line 3253 of file expr_pow.c.

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

Referenced by addBilinearTermToCut(), addRltTerm(), and buildPowEstimator().

◆ SCIPaddSquareSecant()

void SCIPaddSquareSecant ( SCIP scip,
SCIP_Real  sqrcoef,
SCIP_Real  lb,
SCIP_Real  ub,
SCIP_Real lincoef,
SCIP_Real linconstant,
SCIP_Bool success 
)

computes coefficients of secant of a square term

Parameters
scipSCIP data structure
sqrcoefcoefficient of square term
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 3321 of file expr_pow.c.

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

Referenced by addBilinearTermToCut(), addRltTerm(), and buildPowEstimator().

◆ SCIPestimateRoot()

void SCIPestimateRoot ( SCIP scip,
SCIP_Real  exponent,
SCIP_Bool  overestimate,
SCIP_Real  xlb,
SCIP_Real  xub,
SCIP_Real  xref,
SCIP_Real constant,
SCIP_Real slope,
SCIP_Bool islocal,
SCIP_Bool success 
)

Separation for roots with exponent in [0,1]

Separation for roots with exponent in [0,1]

  • x^0.5 with x >= 0
     8 +----------------------------------------------------------------------+
       |             +             +              +             +             |
     7 |-+                                                     x**0.5 ********|
       |                                                             *********|
       |                                                      ********        |
     6 |-+                                             ********             +-|
       |                                         ******                       |
     5 |-+                                 ******                           +-|
       |                             ******                                   |
       |                        *****                                         |
     4 |-+                  ****                                            +-|
       |               *****                                                  |
     3 |-+          ****                                                    +-|
       |         ***                                                          |
       |      ***                                                             |
     2 |-+  **                                                              +-|
       |  **                                                                  |
     1 |**                                                                  +-|
       |*                                                                     |
       |*            +             +              +             +             |
     0 +----------------------------------------------------------------------+
       0             10            20             30            40            50
    
Parameters
scipSCIP data structure
exponentexponent
overestimateshould the power be overestimated?
xlblower bound on x
xubupper bound on x
xrefreference point (where to linearize)
constantbuffer to store constant term of estimator
slopebuffer to store slope of estimator
islocalbuffer to store whether estimator only locally valid, that is, it depends on given bounds
successbuffer to store whether estimator could be computed

Definition at line 3395 of file expr_pow.c.

References computeSecant(), computeTangent(), FALSE, NULL, SCIPisZero(), and TRUE.

Referenced by buildPowEstimator(), and estimateSpecialPower().