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()
288 /** creates and captures an indicator constraint with given linear constraint in a generic version, i. e., with a flag
289 * activeone indicating whether the constraint is active on value 1 or 0 of the binary variable; no slack variable is
295 * @note The linear constraint has to be single sided only, i.e., either rhs or lhs have to be infinite.
297 * @note the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
299 * @see SCIPcreateConsIndicatorLinCons() for information about the basic constraint flag configuration
309 SCIP_Bool initial, /**< should the LP relaxation of constraint be in the initial LP? Usually set to TRUE. */
325 SCIP_Bool stickingatnode /**< should the constraint always be kept at the node where it was added, even
330 /** creates and captures an indicator constraint with given linear constraint; no slack variable is specified
335 * @note The linear constraint has to be single sided only, i.e., either rhs or lhs have to be infinite.
337 * @note the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
346 SCIP_Bool initial, /**< should the LP relaxation of constraint be in the initial LP? Usually set to TRUE. */
362 SCIP_Bool stickingatnode /**< should the constraint always be kept at the node where it was added, even
398 /** gets activation value of an indicator constraint, TRUE for active on 1, FALSE for active on 0 */
404 /** gets binary variable corresponding to indicator constraint. Returns the negative of the original binary variable if activeone was set to false */
410 /** similar to SCIPgetBinaryVarIndicator but returns the original binary variable passed by the user. */
424 * Use with care if you know that the maximal violation of the corresponding constraint is at most @p ub. This bound
446 /** based on values of other variables, computes slack and binary variable to turn constraint feasible */
455 /** based on values of other variables, computes slack and binary variable to turn all constraints feasible */
464 /** adds additional linear constraint that is not connected with an indicator constraint, but can be used for separation */
472 /** 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:9075
SCIP_RETCODE SCIPcreateConsIndicatorLinConsPure(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *binvar, SCIP_CONS *lincons, 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:8733
Definition: struct_scip.h:69
SCIP_RETCODE SCIPaddVarIndicator(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real val)
Definition: cons_indicator.c:8766
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:7933
Definition: struct_var.h:207
SCIP_RETCODE SCIPsetSlackVarUb(SCIP *scip, SCIP_CONS *cons, SCIP_Real ub)
Definition: cons_indicator.c:9049
SCIP_RETCODE SCIPsetLinearConsIndicator(SCIP *scip, SCIP_CONS *cons, SCIP_CONS *lincons)
Definition: cons_indicator.c:8818
SCIP_RETCODE SCIPmakeIndicatorFeasible(SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_Bool *changed)
Definition: cons_indicator.c:9130
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:9024
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:8240
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:8921
type definitions for problem variables
SCIP_RETCODE SCIPaddLinearConsIndicator(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS *lincons)
Definition: cons_indicator.c:9352
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:8429
Definition: struct_lp.h:201
SCIP_VAR * SCIPgetBinaryVarIndicator(SCIP_CONS *cons)
Definition: cons_indicator.c:8905
type definitions for storing primal CIP solutions
SCIP_Bool SCIPgetActiveOnIndicator(SCIP_CONS *cons)
Definition: cons_indicator.c:8888
SCIP_RETCODE SCIPincludeConshdlrIndicator(SCIP *scip)
Definition: cons_indicator.c:7623
SCIP_RETCODE SCIPsetBinaryVarIndicator(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *binvar)
Definition: cons_indicator.c:8943
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:7892
SCIP_RETCODE SCIPcreateConsIndicatorGenericLinConsPure(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *binvar, SCIP_CONS *lincons, 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:8509
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:8273
SCIP_RETCODE SCIPaddRowIndicator(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_ROW *row)
Definition: cons_indicator.c:9384
SCIP_RETCODE SCIPcreateConsBasicIndicatorLinCons(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *binvar, SCIP_CONS *lincons, SCIP_VAR *slackvar)
Definition: cons_indicator.c:8478
SCIP_RETCODE SCIPmakeIndicatorsFeasible(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_SOL *sol, SCIP_Bool *changed)
Definition: cons_indicator.c:9305
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:8801
type definitions for constraints and constraint handlers