cons_indicator.h
Go to the documentation of this file.
23 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
64 * @note The constraint only implements an implication not an equivalence, i.e., it does not ensure
67 * This constraint is equivalent to a linear constraint \f$ax - s \leq b\f$ and an SOS1 constraint on
77 * @note the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
89 SCIP_Bool initial, /**< should the LP relaxation of constraint be in the initial LP? Usually set to TRUE. */
105 SCIP_Bool stickingatnode /**< should the constraint always be kept at the node where it was added, even
110 /** creates and captures an indicator constraint in its most basic version, i. e., all constraint flags are set to their
116 * @note the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
134 * 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$.
148 SCIP_Bool lessthanineq, /**< is the linear constraint a less than RHS (TRUE) or greater than RHS (FALSE)? */
149 SCIP_Bool initial, /**< should the LP relaxation of constraint be in the initial LP? Usually set to TRUE. */
165 SCIP_Bool stickingatnode /**< should the constraint always be kept at the node where it was added, even
170 /** creates and captures an indicator constraint with given linear constraint and slack variable
175 * @note we assume that @a slackvar actually appears in @a lincons and we also assume that it takes
178 * @note the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
188 SCIP_Bool initial, /**< should the LP relaxation of constraint be in the initial LP? Usually set to TRUE. */
204 SCIP_Bool stickingatnode /**< should the constraint always be kept at the node where it was added, even
209 /** creates and captures an indicator constraint with given linear constraint and slack variable
210 * in a generic version, i. e., with a flag activeone indicating whether the constraint is active on
216 * @note we assume that @a slackvar actually appears in @a lincons and we also assume that it takes
219 * @note the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
221 * @see SCIPcreateConsIndicatorLinCons() for information about the basic constraint flag configuration
232 SCIP_Bool initial, /**< should the LP relaxation of constraint be in the initial LP? Usually set to TRUE. */
248 SCIP_Bool stickingatnode /**< should the constraint always be kept at the node where it was added, even
253 /** creates and captures an indicator constraint with given linear constraint and slack variable
254 * in its most basic version, i. e., all constraint flags are set to their basic value as explained for the
255 * method SCIPcreateConsIndicator(); all flags can be set via SCIPsetConsFLAGNAME-methods in scip.h
260 * @note we assume that @a slackvar actually appears in @a lincons and we also assume that it takes
263 * @note the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
265 * @see SCIPcreateConsIndicatorLinCons() for information about the basic constraint flag configuration
267 * @note the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
310 /** gets activation value of an indicator constraint, TRUE for active on 1, FALSE for active on 0 */
316 /** gets binary variable corresponding to indicator constraint. Returns the negative of the original binary variable if activeone was set to false */
322 /** similar to SCIPgetBinaryVarIndicator but returns the original binary variable passed by the user. */
336 * Use with care if you know that the maximal violation of the corresponding constraint is at most @p ub. This bound
358 /** based on values of other variables, computes slack and binary variable to turn constraint feasible */
367 /** based on values of other variables, computes slack and binary variable to turn all constraints feasible */
376 /** adds additional linear constraint that is not connected with an indicator constraint, but can be used for separation */
384 /** 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:8272
Definition: struct_scip.h:59
SCIP_RETCODE SCIPaddVarIndicator(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real val)
Definition: cons_indicator.c:7964
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:7467
Definition: struct_var.h:198
SCIP_RETCODE SCIPsetSlackVarUb(SCIP *scip, SCIP_CONS *cons, SCIP_Real ub)
Definition: cons_indicator.c:8246
SCIP_RETCODE SCIPsetLinearConsIndicator(SCIP *scip, SCIP_CONS *cons, SCIP_CONS *lincons)
Definition: cons_indicator.c:8016
SCIP_RETCODE SCIPmakeIndicatorFeasible(SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_Bool *changed)
Definition: cons_indicator.c:8327
type definitions for return codes for SCIP methods
type definitions for LP management
Definition: struct_sol.h:64
SCIP_VAR * SCIPgetSlackVarIndicator(SCIP_CONS *cons)
Definition: cons_indicator.c:8221
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:7715
Definition: struct_cons.h:37
Definition: struct_cons.h:117
type definitions for SCIP's main datastructure
SCIP_VAR * SCIPgetBinaryVarIndicatorGeneric(SCIP_CONS *cons)
Definition: cons_indicator.c:8119
type definitions for problem variables
SCIP_RETCODE SCIPaddLinearConsIndicator(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS *lincons)
Definition: cons_indicator.c:8549
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:7896
Definition: struct_lp.h:192
SCIP_VAR * SCIPgetBinaryVarIndicator(SCIP_CONS *cons)
Definition: cons_indicator.c:8103
type definitions for storing primal CIP solutions
SCIP_Bool SCIPgetActiveOnIndicator(SCIP_CONS *cons)
Definition: cons_indicator.c:8086
SCIP_RETCODE SCIPincludeConshdlrIndicator(SCIP *scip)
Definition: cons_indicator.c:7166
SCIP_RETCODE SCIPsetBinaryVarIndicator(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *binvar)
Definition: cons_indicator.c:8141
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:7426
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:7748
SCIP_RETCODE SCIPaddRowIndicator(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_ROW *row)
Definition: cons_indicator.c:8581
SCIP_RETCODE SCIPcreateConsBasicIndicatorLinCons(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *binvar, SCIP_CONS *lincons, SCIP_VAR *slackvar)
Definition: cons_indicator.c:7945
SCIP_RETCODE SCIPmakeIndicatorsFeasible(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_SOL *sol, SCIP_Bool *changed)
Definition: cons_indicator.c:8502
common defines and data types used in all packages of SCIP
Definition: objbenders.h:33
SCIP_CONS * SCIPgetLinearConsIndicator(SCIP_CONS *cons)
Definition: cons_indicator.c:7999
type definitions for constraints and constraint handlers