Detailed Description
constraint handler for linking binary variables to a linking (continuous or integer) variable
Definition in file cons_linking.h.
#include "scip/def.h"
#include "scip/type_cons.h"
#include "scip/type_retcode.h"
#include "scip/type_scip.h"
#include "scip/type_var.h"
Go to the source code of this file.
Functions | |
SCIP_EXPORT SCIP_RETCODE | SCIPincludeConshdlrLinking (SCIP *scip) |
Linking Constraints | |
The constraints handler stores linking constraints between a linking variable (continuous or integer) and an array of binary variables. Such a linking constraint has the form: \[ y = \sum_{i=1}^n {c_i * x_i} \] with linking variable (continuous or integer) \( y \), binary variables \( x_1, \dots, x_n \) and offset \(b \in Q\), and with the additional side condition that exactly one binary variable has to be one (set partitioning condition). 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 demand. That is, whenever someone asks for the binary variables. Therefore, such constraints can be used to get a "binary representation" of the domain of the linking variable which will be dynamically created. | |
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) |
SCIP_EXPORT SCIP_RETCODE | SCIPcreateConsBasicLinking (SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *linkvar, SCIP_VAR **binvars, SCIP_Real *vals, int nbinvars) |
SCIP_EXPORT SCIP_Bool | SCIPexistsConsLinking (SCIP *scip, SCIP_VAR *linkvar) |
SCIP_EXPORT SCIP_CONS * | SCIPgetConsLinking (SCIP *scip, SCIP_VAR *linkvar) |
SCIP_EXPORT SCIP_VAR * | SCIPgetLinkvarLinking (SCIP *scip, SCIP_CONS *cons) |
SCIP_EXPORT SCIP_RETCODE | SCIPgetBinvarsLinking (SCIP *scip, SCIP_CONS *cons, SCIP_VAR ***binvars, int *nbinvars) |
SCIP_EXPORT int | SCIPgetNBinvarsLinking (SCIP *scip, SCIP_CONS *cons) |
SCIP_EXPORT SCIP_Real * | SCIPgetValsLinking (SCIP *scip, SCIP_CONS *cons) |
SCIP_EXPORT SCIP_RETCODE | SCIPgetBinvarsDataLinking (SCIP_CONS *cons, SCIP_VAR ***binvars, SCIP_Real **vals, int *nbinvars) |