Scippy

SCIP

Solving Constraint Integer Programs

cons_bivariate.h File Reference

Detailed Description

constraint handler for bivariate nonlinear constraints $\textrm{lhs} \leq f(x,y) + c z \leq \textrm{rhs}$

Author
Martin Ballerstein
Dennis Michaels
Stefan Vigerske

This constraint handler handles constraints of the form

\[ \textrm{lhs} \leq f(x,y) + c z \leq \textrm{rhs} \]

for a bivariate nonlinear function $f(x,y)$ (given as expression tree) that has a fixed convexity behaviour, that is, $f(x,y)$ has to be either jointly convex in $(x,y)$, or convex in $x$ and concave in $y$, or convex in $x$ and convex in $y$, but indefinite w.r.t. $(x,y)$. See also

Martin Ballerstein, Dennis Michaels, and Stefan Vigerske
Linear Underestimators for bivariate functions with a fixed convexity behavior
ZIB Report 13-02, 2013. http://opus4.kobv.de/opus4-zib/frontdoor/index/index/docId/1764

Definition in file cons_bivariate.h.

#include "scip/scip.h"

Go to the source code of this file.

Enumerations

enum  SCIP_BIVAR_CONVEXITY {
  SCIP_BIVAR_ALLCONVEX = 0,
  SCIP_BIVAR_1CONVEX_INDEFINITE = 1,
  SCIP_BIVAR_CONVEX_CONCAVE = 2,
  SCIP_BIVAR_UNKNOWN = 3
}
 

Functions

SCIP_RETCODE SCIPincludeConshdlrBivariate (SCIP *scip)
 
SCIP_RETCODE SCIPcreateConsBivariate (SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_EXPRTREE *f, SCIP_BIVAR_CONVEXITY convextype, SCIP_VAR *z, SCIP_Real zcoef, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)
 
SCIP_RETCODE SCIPcreateConsBasicBivariate (SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_EXPRTREE *f, SCIP_BIVAR_CONVEXITY convextype, SCIP_VAR *z, SCIP_Real zcoef, SCIP_Real lhs, SCIP_Real rhs)
 
SCIP_VARSCIPgetLinearVarBivariate (SCIP *scip, SCIP_CONS *cons)
 
SCIP_Real SCIPgetLinearCoefBivariate (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPRTREESCIPgetExprtreeBivariate (SCIP *scip, SCIP_CONS *cons)
 
SCIP_Real SCIPgetLhsBivariate (SCIP *scip, SCIP_CONS *cons)
 
SCIP_Real SCIPgetRhsBivariate (SCIP *scip, SCIP_CONS *cons)
 

Enumeration Type Documentation

Enumerator
SCIP_BIVAR_ALLCONVEX 
SCIP_BIVAR_1CONVEX_INDEFINITE 
SCIP_BIVAR_CONVEX_CONCAVE 
SCIP_BIVAR_UNKNOWN 

Definition at line 50 of file cons_bivariate.h.

Function Documentation

SCIP_RETCODE SCIPincludeConshdlrBivariate ( SCIP scip)

creates the handler for bivariate constraints and includes it in SCIP

Parameters
scipSCIP data structure

Definition at line 7860 of file cons_bivariate.c.

References BMSclearMemory, CONSHDLR_CHECKPRIORITY, CONSHDLR_DELAYPROP, CONSHDLR_DELAYSEPA, CONSHDLR_DESC, CONSHDLR_EAGERFREQ, CONSHDLR_ENFOPRIORITY, CONSHDLR_MAXPREROUNDS, CONSHDLR_NAME, CONSHDLR_NEEDSCONS, CONSHDLR_PRESOLTIMING, CONSHDLR_PROP_TIMING, CONSHDLR_PROPFREQ, CONSHDLR_SEPAFREQ, CONSHDLR_SEPAPRIORITY, FALSE, NONLINCONSUPGD_PRIORITY, NULL, QUADCONSUPGD_PRIORITY, SCIP_CALL, SCIP_OKAY, SCIPaddBoolParam(), SCIPaddCharParam(), SCIPaddIntParam(), SCIPaddRealParam(), SCIPallocMemory, SCIPblkmem(), SCIPcreateConsBivariate(), SCIPexprgraphCreate(), SCIPexprintCreate(), SCIPfeastol(), SCIPincludeConshdlrBasic(), SCIPincludeEventhdlrBasic(), SCIPincludeNonlinconsUpgrade(), SCIPincludeQuadconsUpgrade(), SCIPinfinity(), SCIPsetConshdlrActive(), SCIPsetConshdlrCopy(), SCIPsetConshdlrDeactive(), SCIPsetConshdlrDelete(), SCIPsetConshdlrDisable(), SCIPsetConshdlrEnable(), SCIPsetConshdlrExit(), SCIPsetConshdlrExitpre(), SCIPsetConshdlrExitsol(), SCIPsetConshdlrFree(), SCIPsetConshdlrGetNVars(), SCIPsetConshdlrGetVars(), SCIPsetConshdlrInit(), SCIPsetConshdlrInitlp(), SCIPsetConshdlrInitpre(), SCIPsetConshdlrInitsol(), SCIPsetConshdlrPresol(), SCIPsetConshdlrPrint(), SCIPsetConshdlrProp(), SCIPsetConshdlrSepa(), SCIPsetConshdlrTrans(), and TRUE.

Referenced by SCIP_DECL_CONSHDLRCOPY(), SCIP_DECL_EXPRGRAPHNODEREFORM(), and SCIPincludeDefaultPlugins().

SCIP_RETCODE SCIPcreateConsBivariate ( SCIP scip,
SCIP_CONS **  cons,
const char *  name,
SCIP_EXPRTREE f,
SCIP_BIVAR_CONVEXITY  convextype,
SCIP_VAR z,
SCIP_Real  zcoef,
SCIP_Real  lhs,
SCIP_Real  rhs,
SCIP_Bool  initial,
SCIP_Bool  separate,
SCIP_Bool  enforce,
SCIP_Bool  check,
SCIP_Bool  propagate,
SCIP_Bool  local,
SCIP_Bool  modifiable,
SCIP_Bool  dynamic,
SCIP_Bool  removable,
SCIP_Bool  stickingatnode 
)

creates and captures a bivariate constraint

Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
Parameters
scipSCIP data structure
conspointer to hold the created constraint
namename of constraint
fexpression tree specifying bivariate function f(x,y)
convextypekind of convexity of f(x,y)
zlinear variable in constraint
zcoefcoefficient of linear variable
lhsleft hand side of constraint
rhsright hand side of constraint
initialshould the LP relaxation of constraint be in the initial LP? Usually set to TRUE. Set to FALSE for 'lazy constraints'.
separateshould the constraint be separated during LP processing? Usually set to TRUE.
enforceshould the constraint be enforced during node processing? TRUE for model constraints, FALSE for additional, redundant constraints.
checkshould the constraint be checked for feasibility? TRUE for model constraints, FALSE for additional, redundant constraints.
propagateshould the constraint be propagated during node processing? Usually set to TRUE.
localis constraint only valid locally? Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints.
modifiableis constraint modifiable (subject to column generation)? Usually set to FALSE. In column generation applications, set to TRUE if pricing adds coefficients to this constraint.
dynamicis constraint subject to aging? Usually set to FALSE. Set to TRUE for own cuts which are seperated as constraints.
removableshould the relaxation be removed from the LP due to aging or cleanup? Usually set to FALSE. Set to TRUE for 'lazy constraints' and 'user cuts'.
stickingatnodeshould the constraint always be kept at the node where it was added, even if it may be moved to a more global node? Usually set to FALSE. Set to TRUE to for constraints that represent node data.

Definition at line 7974 of file cons_bivariate.c.

References BMSclearMemory, CONSHDLR_NAME, FALSE, NULL, REALABS, SCIP_CALL, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIPallocMemory, SCIPblkmem(), SCIPcreateCons(), SCIPcreateConsBasicBivariate(), SCIPerrorMessage, SCIPexprtreeCopy(), SCIPexprtreeGetNVars(), SCIPexprtreeGetVars(), SCIPfindConshdlr(), and SCIPisInfinity().

Referenced by createConsFromMonomial(), createConsFromQuadTerm(), SCIP_DECL_CONSCOPY(), SCIPcreateConsBasicBivariate(), and SCIPincludeConshdlrBivariate().

SCIP_RETCODE SCIPcreateConsBasicBivariate ( SCIP scip,
SCIP_CONS **  cons,
const char *  name,
SCIP_EXPRTREE f,
SCIP_BIVAR_CONVEXITY  convextype,
SCIP_VAR z,
SCIP_Real  zcoef,
SCIP_Real  lhs,
SCIP_Real  rhs 
)

creates and captures an absolute power constraint in its most basic version, i. e., all constraint flags are set to their basic value as explained for the method SCIPcreateConsBivariate(); all flags can be set via SCIPconsSetFLAGNAME-methods in cons.h

See also
SCIPcreateConsBivariate() for information about the basic constraint flag configuration
Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()

creates and captures an absolute power constraint in its most basic version, i. e., all constraint flags are set to their basic value as explained for the method SCIPcreateConsBivariate(); all flags can be set via SCIPsetConsFLAGNAME-methods in scip.h

See also
SCIPcreateConsBivariate() for information about the basic constraint flag configuration
Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
Parameters
scipSCIP data structure
conspointer to hold the created constraint
namename of constraint
fexpression tree specifying bivariate function f(x,y)
convextypekind of convexity of f(x,y)
zlinear variable in constraint
zcoefcoefficient of linear variable
lhsleft hand side of constraint
rhsright hand side of constraint

Definition at line 8058 of file cons_bivariate.c.

References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPcreateConsBivariate(), SCIPgetLinearVarBivariate(), and TRUE.

Referenced by SCIPcreateConsBivariate().

SCIP_VAR* SCIPgetLinearVarBivariate ( SCIP scip,
SCIP_CONS cons 
)

gets the linear variable of a bivariate constraint, or NULL if no such variable

Parameters
scipSCIP data structure
consconstraint

Definition at line 8079 of file cons_bivariate.c.

References NULL, SCIP_Real, SCIPconsGetData(), and SCIPgetLinearCoefBivariate().

Referenced by SCIPcreateConsBasicBivariate(), SCIPwriteGms(), and SCIPwritePip().

SCIP_Real SCIPgetLinearCoefBivariate ( SCIP scip,
SCIP_CONS cons 
)

gets the coefficients of the linear variable of a bivariate constraint

Parameters
scipSCIP data structure
consconstraint

Definition at line 8091 of file cons_bivariate.c.

References NULL, SCIPconsGetData(), and SCIPgetExprtreeBivariate().

Referenced by SCIPgetLinearVarBivariate(), SCIPwriteGms(), and SCIPwritePip().

SCIP_EXPRTREE* SCIPgetExprtreeBivariate ( SCIP scip,
SCIP_CONS cons 
)

gets the expression tree of a bivariate constraint

Parameters
scipSCIP data structure
consconstraint

Definition at line 8103 of file cons_bivariate.c.

References NULL, SCIP_Real, SCIPconsGetData(), and SCIPgetLhsBivariate().

Referenced by SCIPgetLinearCoefBivariate(), SCIPwriteGms(), and SCIPwritePip().

SCIP_Real SCIPgetLhsBivariate ( SCIP scip,
SCIP_CONS cons 
)

gets the left hand side of a bivariate constraint

Parameters
scipSCIP data structure
consconstraint

Definition at line 8115 of file cons_bivariate.c.

References NULL, SCIP_Real, SCIPconsGetData(), and SCIPgetRhsBivariate().

Referenced by SCIPgetExprtreeBivariate(), SCIPwriteGms(), and SCIPwritePip().

SCIP_Real SCIPgetRhsBivariate ( SCIP scip,
SCIP_CONS cons 
)

gets the right hand side of a bivariate constraint

Parameters
scipSCIP data structure
consconstraint

Definition at line 8127 of file cons_bivariate.c.

References NULL, and SCIPconsGetData().

Referenced by SCIPgetLhsBivariate(), SCIPwriteGms(), and SCIPwritePip().