cons_nonlinear.h
Go to the documentation of this file.
18 * @brief constraint handler for nonlinear constraints \f$\textrm{lhs} \leq \sum_{i=1}^n a_ix_i + \sum_{j=1}^m c_jf_j(x) \leq \textrm{rhs}\f$
23 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
116 * For convex or concave \f$f_j(x)\f$, cuts that separate on the convex hull of the function graph are implemented.
117 * For \f$f_j(x)\f$ that are not known to be convex or concave, a simple variant of linear estimation based on interval gradients is implemented.
119 * Branching is performed for variables in nonconvex terms, if the relaxation solution cannot be separated.
121 * This header offers the upgrade functionality to upgrade a general nonlinear constraint into a more specific constraint
124 * Furthermore, the definition of callbacks used to reformulate an expression graph is offered by
127 * Further, the function representation is stored in an expression graph, which allows to propagate variable domains
129 * During presolve, the expression graph is reformulated, whereby new variables and constraints are created
130 * such that for the remaining nonlinear constraints the functions \f$f_j(x)\f$ are known to be convex or concave.
135 * Decomposition of Multistage Stochastic Programs and a Constraint Integer Programming Approach to Mixed-Integer Nonlinear Programming@n
143 SCIP_DECL_NONLINCONSUPGD((*nonlinconsupgd)),/**< method to call for upgrading nonlinear constraint, or NULL */
144 SCIP_DECL_EXPRGRAPHNODEREFORM((*nodereform)),/**< method to call for reformulating expression graph node, or NULL */
153 * @note the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
165 SCIP_Real* nonlincoefs, /**< coefficients for expression trees for nonlinear part, or NULL if all 1.0 */
188 SCIP_Bool stickingatnode /**< should the constraint always be kept at the node where it was added, even
194 * in its most basic version, i. e., all constraint flags are set to their basic value as explained for the
195 * method SCIPcreateConsNonlinear(); all flags can be set via SCIPsetConsFLAGNAME-methods in scip.h
201 * @note the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
213 SCIP_Real* nonlincoefs, /**< coefficients for expression trees for nonlinear part, or NULL if all 1.0 */
219 * this variant takes a node of the expression graph as input and can only be used during presolving
220 * it is assumed that the nonlinear constraint will be added to the transformed problem short after creation
223 * @note the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
233 SCIP_EXPRGRAPHNODE* exprgraphnode, /**< expression graph node associated to nonlinear expression */
256 SCIP_Bool stickingatnode /**< should the constraint always be kept at the node where it was added, even
262 * in its most basic version, i. e., all constraint flags are set to their basic value as explained for the
263 * method SCIPcreateConsNonlinear2(); all flags can be set via SCIPsetConsFLAGNAME-methods in scip.h
265 * this variant takes a node of the expression graph as input and can only be used during presolving
266 * it is assumed that the nonlinear constraint will be added to the transformed problem short after creation
271 * @note the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
281 SCIP_EXPRGRAPHNODE* exprgraphnode, /**< expression graph node associated to nonlinear expression */
410 /** gets the curvature of the expression trees (multiplied by their coefficient) of a nonlinear constraint */
428 /** get index of a linear variable of a nonlinear constraint that may be decreased without making any other constraint infeasible, or -1 if none */
435 /** get index of a linear variable of a nonlinear constraint that may be increased without making any other constraint infeasible, or -1 if none */
449 /** given three points, constructs coefficient of equation for hyperplane generated by these three points
SCIP_EXPORT SCIP_RETCODE SCIPcreateConsNonlinear2(SCIP *scip, SCIP_CONS **cons, const char *name, int nlinvars, SCIP_VAR **linvars, SCIP_Real *lincoefs, SCIP_EXPRGRAPHNODE *exprgraphnode, 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)
Definition: cons_nonlinear.c:9585
SCIP_EXPORT SCIP_Real * SCIPgetExprtreeCoefsNonlinear(SCIP *scip, SCIP_CONS *cons)
Definition: cons_nonlinear.c:9858
SCIP_EXPORT SCIP_RETCODE SCIPgetCurvatureNonlinear(SCIP *scip, SCIP_CONS *cons, SCIP_Bool checkcurv, SCIP_EXPRCURV *curvature)
Definition: cons_nonlinear.c:9933
SCIP_EXPORT SCIP_RETCODE SCIPcheckCurvatureNonlinear(SCIP *scip, SCIP_CONS *cons)
Definition: cons_nonlinear.c:9911
Definition: struct_scip.h:59
type definitions for NLP management
SCIP_EXPORT int SCIPgetNExprtreesNonlinear(SCIP *scip, SCIP_CONS *cons)
Definition: cons_nonlinear.c:9830
Definition: struct_var.h:198
SCIP_EXPORT SCIP_EXPRTREE ** SCIPgetExprtreesNonlinear(SCIP *scip, SCIP_CONS *cons)
Definition: cons_nonlinear.c:9844
SCIP_EXPORT SCIP_Real SCIPgetRhsNonlinear(SCIP *scip, SCIP_CONS *cons)
Definition: cons_nonlinear.c:9898
type definitions for return codes for SCIP methods
#define SCIP_DECL_EXPRGRAPHNODEREFORM(x)
Definition: cons_nonlinear.h:86
Definition: struct_sol.h:64
SCIP_EXPORT SCIP_RETCODE SCIPgetExprtreeCurvaturesNonlinear(SCIP *scip, SCIP_CONS *cons, SCIP_Bool checkcurv, SCIP_EXPRCURV **curvatures)
Definition: cons_nonlinear.c:9967
SCIP_EXPORT SCIP_RETCODE SCIPcreateConsBasicNonlinear(SCIP *scip, SCIP_CONS **cons, const char *name, int nlinvars, SCIP_VAR **linvars, SCIP_Real *lincoefs, int nexprtrees, SCIP_EXPRTREE **exprtrees, SCIP_Real *nonlincoefs, SCIP_Real lhs, SCIP_Real rhs)
Definition: cons_nonlinear.c:9555
Definition: struct_cons.h:37
Definition: struct_cons.h:117
SCIP_EXPORT SCIP_RETCODE SCIPaddExprtreesNonlinear(SCIP *scip, SCIP_CONS *cons, int nexprtrees, SCIP_EXPRTREE **exprtrees, SCIP_Real *coefs)
Definition: cons_nonlinear.c:9746
type definitions for SCIP's main datastructure
SCIP_EXPORT SCIP_RETCODE SCIPgetNlRowNonlinear(SCIP *scip, SCIP_CONS *cons, SCIP_NLROW **nlrow)
Definition: cons_nonlinear.c:9766
SCIP_EXPORT SCIP_RETCODE SCIPcreateConsBasicNonlinear2(SCIP *scip, SCIP_CONS **cons, const char *name, int nlinvars, SCIP_VAR **linvars, SCIP_Real *lincoefs, SCIP_EXPRGRAPHNODE *exprgraphnode, SCIP_Real lhs, SCIP_Real rhs)
Definition: cons_nonlinear.c:9683
SCIP_EXPORT int SCIPgetLinvarMayDecreaseNonlinear(SCIP *scip, SCIP_CONS *cons)
Definition: cons_nonlinear.c:10047
SCIP_EXPORT SCIP_RETCODE SCIPcreateConsNonlinear(SCIP *scip, SCIP_CONS **cons, const char *name, int nlinvars, SCIP_VAR **linvars, SCIP_Real *lincoefs, int nexprtrees, SCIP_EXPRTREE **exprtrees, SCIP_Real *nonlincoefs, 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)
Definition: cons_nonlinear.c:9462
SCIP_EXPORT SCIP_RETCODE SCIPsetExprtreesNonlinear(SCIP *scip, SCIP_CONS *cons, int nexprtrees, SCIP_EXPRTREE **exprtrees, SCIP_Real *coefs)
Definition: cons_nonlinear.c:9724
type definitions for problem variables
SCIP_EXPORT SCIP_RETCODE SCIPgetViolationNonlinear(SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_Real *violation)
Definition: cons_nonlinear.c:10004
SCIP_EXPORT int SCIPgetNLinearVarsNonlinear(SCIP *scip, SCIP_CONS *cons)
Definition: cons_nonlinear.c:9791
Definition: struct_expr.h:116
SCIP_EXPORT int SCIPgetLinvarMayIncreaseNonlinear(SCIP *scip, SCIP_CONS *cons)
Definition: cons_nonlinear.c:10067
SCIP_EXPORT SCIP_Real SCIPgetLhsNonlinear(SCIP *scip, SCIP_CONS *cons)
Definition: cons_nonlinear.c:9885
SCIP_EXPORT SCIP_Real * SCIPgetLinearCoefsNonlinear(SCIP *scip, SCIP_CONS *cons)
Definition: cons_nonlinear.c:9817
type definitions for storing primal CIP solutions
SCIP_EXPORT SCIP_RETCODE SCIPincludeNonlinconsUpgrade(SCIP *scip, SCIP_DECL_NONLINCONSUPGD((*nonlinconsupgd)), SCIP_DECL_EXPRGRAPHNODEREFORM((*nodereform)), int priority, SCIP_Bool active, const char *conshdlrname)
Definition: cons_nonlinear.c:9377
SCIP_EXPORT SCIP_EXPRGRAPH * SCIPgetExprgraphNonlinear(SCIP *scip, SCIP_CONSHDLR *conshdlr)
Definition: cons_nonlinear.c:10087
type definitions for expressions and expression trees
Definition: struct_nlp.h:63
SCIP_EXPORT SCIP_EXPRGRAPHNODE * SCIPgetExprgraphNodeNonlinear(SCIP *scip, SCIP_CONS *cons)
Definition: cons_nonlinear.c:9872
Definition: struct_expr.h:155
Definition: struct_expr.h:55
common defines and data types used in all packages of SCIP
Definition: objbenders.h:33
SCIP_EXPORT SCIP_VAR ** SCIPgetLinearVarsNonlinear(SCIP *scip, SCIP_CONS *cons)
Definition: cons_nonlinear.c:9804
SCIP_EXPORT SCIP_RETCODE SCIPaddLinearVarNonlinear(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real coef)
Definition: cons_nonlinear.c:9704
SCIP_EXPORT SCIP_RETCODE SCIPincludeConshdlrNonlinear(SCIP *scip)
Definition: cons_nonlinear.c:9271
type definitions for constraints and constraint handlers
SCIP_EXPORT SCIP_RETCODE SCIPcomputeHyperplaneThreePoints(SCIP *scip, SCIP_Real a1, SCIP_Real a2, SCIP_Real a3, SCIP_Real b1, SCIP_Real b2, SCIP_Real b3, SCIP_Real c1, SCIP_Real c2, SCIP_Real c3, SCIP_Real *alpha, SCIP_Real *beta, SCIP_Real *gamma_, SCIP_Real *delta)
Definition: cons_nonlinear.c:10109