cons_indicator.h
Go to the documentation of this file.
32 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
73 * @note The constraint only implements an implication not an equivalence, i.e., it does not ensure
76 * This constraint is equivalent to a linear constraint \f$ax - s \leq b\f$ and an SOS1 constraint on
86 * @note the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
98 SCIP_Bool initial, /**< should the LP relaxation of constraint be in the initial LP? Usually set to TRUE. */
114 SCIP_Bool stickingatnode /**< should the constraint always be kept at the node where it was added, even
119 /** creates and captures an indicator constraint in its most basic version, i. e., all constraint flags are set to their
125 * @note the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
143 * if lessthanineq then \f$a^T x \leq b\f$ holds, else the passed vectors are assumed to be of the form \f$a^T x \geq b\f$.
157 SCIP_Bool lessthanineq, /**< is the linear constraint a less than RHS (TRUE) or greater than RHS (FALSE)? */
158 SCIP_Bool initial, /**< should the LP relaxation of constraint be in the initial LP? Usually set to TRUE. */
174 SCIP_Bool stickingatnode /**< should the constraint always be kept at the node where it was added, even
179 /** creates and captures an indicator constraint with given linear constraint and slack variable
184 * @note we assume that @a slackvar actually appears in @a lincons and we also assume that it takes
187 * @note the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
197 SCIP_Bool initial, /**< should the LP relaxation of constraint be in the initial LP? Usually set to TRUE. */
213 SCIP_Bool stickingatnode /**< should the constraint always be kept at the node where it was added, even
218 /** creates and captures an indicator constraint with given linear constraint and slack variable
219 * in a generic version, i. e., with a flag activeone indicating whether the constraint is active on
225 * @note we assume that @a slackvar actually appears in @a lincons and we also assume that it takes
228 * @note the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
230 * @see SCIPcreateConsIndicatorLinCons() for information about the basic constraint flag configuration
241 SCIP_Bool initial, /**< should the LP relaxation of constraint be in the initial LP? Usually set to TRUE. */
257 SCIP_Bool stickingatnode /**< should the constraint always be kept at the node where it was added, even
262 /** creates and captures an indicator constraint with given linear constraint and slack variable
263 * in its most basic version, i. e., all constraint flags are set to their basic value as explained for the
264 * method SCIPcreateConsIndicator(); all flags can be set via SCIPsetConsFLAGNAME-methods in scip.h
269 * @note we assume that @a slackvar actually appears in @a lincons and we also assume that it takes
272 * @note the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
274 * @see SCIPcreateConsIndicatorLinCons() for information about the basic constraint flag configuration
276 * @note the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
319 /** gets activation value of an indicator constraint, TRUE for active on 1, FALSE for active on 0 */
325 /** gets binary variable corresponding to indicator constraint. Returns the negative of the original binary variable if activeone was set to false */
331 /** similar to SCIPgetBinaryVarIndicator but returns the original binary variable passed by the user. */
345 * Use with care if you know that the maximal violation of the corresponding constraint is at most @p ub. This bound
367 /** based on values of other variables, computes slack and binary variable to turn constraint feasible */
376 /** based on values of other variables, computes slack and binary variable to turn all constraints feasible */
385 /** adds additional linear constraint that is not connected with an indicator constraint, but can be used for separation */
393 /** adds additional globally valid row that is not connected with an indicator constraint, but can be used for separation */
SCIP_Bool SCIPisViolatedIndicator(SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol)
Definition: cons_indicator.c:8282
Definition: struct_scip.h:68
SCIP_RETCODE SCIPaddVarIndicator(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real val)
Definition: cons_indicator.c:7973
SCIP_RETCODE SCIPcreateConsIndicatorGeneric(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *binvar, int nvars, SCIP_VAR **vars, SCIP_Real *vals, SCIP_Real rhs, SCIP_Bool activeone, SCIP_Bool lessthanineq, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)
Definition: cons_indicator.c:7476
Definition: struct_var.h:207
SCIP_RETCODE SCIPsetSlackVarUb(SCIP *scip, SCIP_CONS *cons, SCIP_Real ub)
Definition: cons_indicator.c:8256
SCIP_RETCODE SCIPsetLinearConsIndicator(SCIP *scip, SCIP_CONS *cons, SCIP_CONS *lincons)
Definition: cons_indicator.c:8025
SCIP_RETCODE SCIPmakeIndicatorFeasible(SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_Bool *changed)
Definition: cons_indicator.c:8337
type definitions for return codes for SCIP methods
type definitions for LP management
Definition: struct_sol.h:73
SCIP_VAR * SCIPgetSlackVarIndicator(SCIP_CONS *cons)
Definition: cons_indicator.c:8231
SCIP_RETCODE SCIPcreateConsBasicIndicator(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *binvar, int nvars, SCIP_VAR **vars, SCIP_Real *vals, SCIP_Real rhs)
Definition: cons_indicator.c:7724
Definition: struct_cons.h:46
Definition: struct_cons.h:126
type definitions for SCIP's main datastructure
SCIP_VAR * SCIPgetBinaryVarIndicatorGeneric(SCIP_CONS *cons)
Definition: cons_indicator.c:8128
type definitions for problem variables
SCIP_RETCODE SCIPaddLinearConsIndicator(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS *lincons)
Definition: cons_indicator.c:8559
SCIP_RETCODE SCIPcreateConsIndicatorLinCons(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *binvar, SCIP_CONS *lincons, SCIP_VAR *slackvar, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)
Definition: cons_indicator.c:7905
Definition: struct_lp.h:201
SCIP_VAR * SCIPgetBinaryVarIndicator(SCIP_CONS *cons)
Definition: cons_indicator.c:8112
type definitions for storing primal CIP solutions
SCIP_Bool SCIPgetActiveOnIndicator(SCIP_CONS *cons)
Definition: cons_indicator.c:8095
SCIP_RETCODE SCIPincludeConshdlrIndicator(SCIP *scip)
Definition: cons_indicator.c:7175
SCIP_RETCODE SCIPsetBinaryVarIndicator(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *binvar)
Definition: cons_indicator.c:8150
SCIP_RETCODE SCIPcreateConsIndicator(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *binvar, int nvars, SCIP_VAR **vars, SCIP_Real *vals, SCIP_Real rhs, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)
Definition: cons_indicator.c:7435
SCIP_RETCODE SCIPcreateConsIndicatorGenericLinCons(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *binvar, SCIP_CONS *lincons, SCIP_VAR *slackvar, SCIP_Bool activeone, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)
Definition: cons_indicator.c:7757
SCIP_RETCODE SCIPaddRowIndicator(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_ROW *row)
Definition: cons_indicator.c:8591
SCIP_RETCODE SCIPcreateConsBasicIndicatorLinCons(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *binvar, SCIP_CONS *lincons, SCIP_VAR *slackvar)
Definition: cons_indicator.c:7954
SCIP_RETCODE SCIPmakeIndicatorsFeasible(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_SOL *sol, SCIP_Bool *changed)
Definition: cons_indicator.c:8512
common defines and data types used in all packages of SCIP
Definition: objbenders.h:43
SCIP_CONS * SCIPgetLinearConsIndicator(SCIP_CONS *cons)
Definition: cons_indicator.c:8008
type definitions for constraints and constraint handlers