cons_linking.h
Go to the documentation of this file.
18 * @brief constraint handler for linking binary variables to a linking (continuous or integer) variable
24 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
57 * The constraints handler stores linking constraints between a linking variable (continuous or integer) and an array of binary variables. Such
62 * with linking variable (continuous or integer) \f$ y \f$, binary variables \f$ x_1, \dots, x_n \f$ and offset \f$b \in Q\f$, and
63 * with the additional side condition that exactly one binary variable has to be one (set partitioning condition).
65 * This constraint can be created only with the linking variable, if it is an integer variable. In this case the binary variables are only created on
66 * demand. That is, whenever someone asks for the binary variables. Therefore, such constraints can be used to get a
67 * "binary representation" of the domain of the linking variable which will be dynamically created.
72 * @note the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
103 SCIP_Bool stickingatnode /**< should the constraint always be kept at the node where it was added, even
109 * in its most basic version, i. e., all constraint flags are set to their basic value as explained for the
110 * method SCIPcreateConsLinking(); all flags can be set via SCIPsetConsFLAGNAME-methods in scip.h
114 * @note the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
128 /** checks if for the given linking variable (continuous or integer) a linking constraint exists */
135 /** returns the linking constraint belonging the given linking variable (continuous or integer) or NULL if it does not exist yet */
SCIP_EXPORT int SCIPgetNBinvarsLinking(SCIP *scip, SCIP_CONS *cons)
Definition: cons_linking.c:3559
SCIP_EXPORT SCIP_RETCODE SCIPcreateConsBasicLinking(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *linkvar, SCIP_VAR **binvars, SCIP_Real *vals, int nbinvars)
Definition: cons_linking.c:3432
SCIP_EXPORT SCIP_RETCODE SCIPgetBinvarsDataLinking(SCIP_CONS *cons, SCIP_VAR ***binvars, SCIP_Real **vals, int *nbinvars)
Definition: cons_linking.c:3606
Definition: struct_scip.h:59
Definition: struct_var.h:198
SCIP_EXPORT SCIP_RETCODE SCIPcreateConsLinking(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *linkvar, SCIP_VAR **binvars, SCIP_Real *vals, int nbinvars, 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_linking.c:3335
type definitions for return codes for SCIP methods
SCIP_EXPORT SCIP_VAR * SCIPgetLinkvarLinking(SCIP *scip, SCIP_CONS *cons)
Definition: cons_linking.c:3490
SCIP_EXPORT SCIP_CONS * SCIPgetConsLinking(SCIP *scip, SCIP_VAR *linkvar)
Definition: cons_linking.c:3469
Definition: struct_cons.h:37
type definitions for SCIP's main datastructure
type definitions for problem variables
SCIP_EXPORT SCIP_Bool SCIPexistsConsLinking(SCIP *scip, SCIP_VAR *linkvar)
Definition: cons_linking.c:3451
common defines and data types used in all packages of SCIP
Definition: objbenders.h:33
SCIP_EXPORT SCIP_Real * SCIPgetValsLinking(SCIP *scip, SCIP_CONS *cons)
Definition: cons_linking.c:3582
SCIP_EXPORT SCIP_RETCODE SCIPincludeConshdlrLinking(SCIP *scip)
Definition: cons_linking.c:3276
SCIP_EXPORT SCIP_RETCODE SCIPgetBinvarsLinking(SCIP *scip, SCIP_CONS *cons, SCIP_VAR ***binvars, int *nbinvars)
Definition: cons_linking.c:3513
type definitions for constraints and constraint handlers