cons_linear.h
Go to the documentation of this file.
18 * @brief Constraint handler for linear constraints in their most general form, \f$lhs <= a^T x <= rhs\f$. 28 * with \f$a_i \in Q, i = 1,\dots,n\f$, \f$lhs\in Q \cup \{-\infty\}\f$, \f$rhs\in Q \cup \{\infty\}\f$, 31 * Furthermore, this header offers the upgrade functionality of a general linear constraint into a more specific 32 * constraint, such as a knapsack constraint, via SCIP_DECL_LINCONSUPGD() and SCIPincludeLinconsUpgrade() 35 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/ 64 * - nposimpl : number of implicit integer variables with positive coefficient (including implicit binary variables) 65 * - nnegimpl : number of implicit integer variables with negative coefficient (including implicit binary variables) 81 #define SCIP_DECL_LINCONSUPGD(x) SCIP_RETCODE x (SCIP* scip, SCIP_CONS* cons, int nvars, SCIP_VAR** vars, SCIP_Real* vals, SCIP_Real lhs, SCIP_Real rhs, \ 82 int nposbin, int nnegbin, int nposint, int nnegint, int nposimpl, int nnegimpl, int nposimplbin, int nnegimplbin, int nposcont, int nnegcont, \ 83 int ncoeffspone, int ncoeffsnone, int ncoeffspint, int ncoeffsnint, int ncoeffspfrac, int ncoeffsnfrac, \ 108 * @note the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons() 140 SCIP_Bool stickingatnode /**< should the constraint always be kept at the node where it was added, even 146 * in its most basic version, i. e., all constraint flags are set to their basic value as explained for the 151 * @note the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons() 174 SCIP_Real* sourcecoefs, /**< coefficient array of the linear constraint, or NULL if all coefficients are one */ 179 SCIP_HASHMAP* consmap, /**< a hashmap to store the mapping of source constraints to the corresponding 189 SCIP_Bool removable, /**< should the relaxation be removed from the LP due to aging or cleanup? */ 190 SCIP_Bool stickingatnode, /**< should the constraint always be kept at the node where it was added, even 205 /** changes coefficient of variable in linear constraint; deletes the variable if coefficient is zero; adds variable if 208 * @note This method may only be called during problem creation stage for an original constraint and variable. 210 * @note This method requires linear time to search for occurences of the variable in the constraint data. 222 * @note This method may only be called during problem creation stage for an original constraint and variable. 224 * @note This method requires linear time to search for occurences of the variable in the constraint data. 270 /** gets the array of variables in the linear constraint; the user must not modify this array! */ 277 /** gets the array of coefficient values in the linear constraint; the user must not modify this array! */ 286 * @note if the solution contains values at infinity, this method will return SCIP_INVALID in case the activity 318 /** returns the linear relaxation of the given linear constraint; may return NULL if no LP row was yet created; 327 /** tries to automatically convert a linear constraint into a more specific and more specialized constraint */ SCIP_RETCODE SCIPchgRhsLinear(SCIP *scip, SCIP_CONS *cons, SCIP_Real rhs) SCIP_RETCODE SCIPincludeConshdlrLinear(SCIP *scip) SCIP_RETCODE SCIPupgradeConsLinear(SCIP *scip, SCIP_CONS *cons, SCIP_CONS **upgdcons) int SCIPgetNVarsLinear(SCIP *scip, SCIP_CONS *cons) SCIP_RETCODE SCIPcreateConsBasicLinear(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Real *vals, SCIP_Real lhs, SCIP_Real rhs) SCIP_Real SCIPgetDualfarkasLinear(SCIP *scip, SCIP_CONS *cons) SCIP_Real SCIPgetFeasibilityLinear(SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol) SCIP_RETCODE SCIPdelCoefLinear(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var) SCIP_Real SCIPgetRhsLinear(SCIP *scip, SCIP_CONS *cons) SCIP_ROW * SCIPgetRowLinear(SCIP *scip, SCIP_CONS *cons) SCIP_RETCODE SCIPchgCoefLinear(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real val) SCIP_RETCODE SCIPchgLhsLinear(SCIP *scip, SCIP_CONS *cons, SCIP_Real lhs) SCIP_RETCODE SCIPcopyConsLinear(SCIP *scip, SCIP_CONS **cons, SCIP *sourcescip, const char *name, int nvars, SCIP_VAR **sourcevars, SCIP_Real *sourcecoefs, SCIP_Real lhs, SCIP_Real rhs, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, 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_Bool global, SCIP_Bool *valid) SCIP_Real SCIPgetActivityLinear(SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol) SCIP_RETCODE SCIPcreateConsLinear(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Real *vals, 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_Real SCIPgetDualsolLinear(SCIP *scip, SCIP_CONS *cons) SCIP_Real SCIPgetLhsLinear(SCIP *scip, SCIP_CONS *cons) SCIP_Real * SCIPgetValsLinear(SCIP *scip, SCIP_CONS *cons) SCIP_RETCODE SCIPaddCoefLinear(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real val) Definition: objbranchrule.h:33 SCIP_RETCODE SCIPincludeLinconsUpgrade(SCIP *scip, SCIP_DECL_LINCONSUPGD((*linconsupgd)), int priority, const char *conshdlrname) SCIP_VAR ** SCIPgetVarsLinear(SCIP *scip, SCIP_CONS *cons) SCIP callable library. |