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
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
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
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 */
common defines and data types used in all packages of SCIP
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:8510
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:8430
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:8241
SCIP_VAR * SCIPgetBinaryVarIndicatorGeneric(SCIP_CONS *cons)
Definition: cons_indicator.c:8922
SCIP_RETCODE SCIPsetSlackVarUb(SCIP *scip, SCIP_CONS *cons, SCIP_Real ub)
Definition: cons_indicator.c:9050
SCIP_RETCODE SCIPaddRowIndicator(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_ROW *row)
Definition: cons_indicator.c:9385
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:7934
SCIP_RETCODE SCIPaddLinearConsIndicator(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS *lincons)
Definition: cons_indicator.c:9353
SCIP_RETCODE SCIPsetLinearConsIndicator(SCIP *scip, SCIP_CONS *cons, SCIP_CONS *lincons)
Definition: cons_indicator.c:8819
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:7893
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:8274
SCIP_RETCODE SCIPcreateConsBasicIndicatorLinCons(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *binvar, SCIP_CONS *lincons, SCIP_VAR *slackvar)
Definition: cons_indicator.c:8479
SCIP_RETCODE SCIPmakeIndicatorsFeasible(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_SOL *sol, SCIP_Bool *changed)
Definition: cons_indicator.c:9306
SCIP_VAR * SCIPgetBinaryVarIndicator(SCIP_CONS *cons)
Definition: cons_indicator.c:8906
SCIP_VAR * SCIPgetSlackVarIndicator(SCIP_CONS *cons)
Definition: cons_indicator.c:9025
SCIP_CONS * SCIPgetLinearConsIndicator(SCIP_CONS *cons)
Definition: cons_indicator.c:8802
SCIP_RETCODE SCIPsetBinaryVarIndicator(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *binvar)
Definition: cons_indicator.c:8944
SCIP_RETCODE SCIPmakeIndicatorFeasible(SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_Bool *changed)
Definition: cons_indicator.c:9131
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:8734
SCIP_Bool SCIPisViolatedIndicator(SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol)
Definition: cons_indicator.c:9076
SCIP_RETCODE SCIPaddVarIndicator(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real val)
Definition: cons_indicator.c:8767
SCIP_Bool SCIPgetActiveOnIndicator(SCIP_CONS *cons)
Definition: cons_indicator.c:8889
SCIP_RETCODE SCIPincludeConshdlrIndicator(SCIP *scip)
Definition: cons_indicator.c:7624
Definition: objbenders.h:44
Definition: struct_cons.h:47
Definition: struct_cons.h:127
Definition: struct_lp.h:202
Definition: struct_sol.h:74
Definition: struct_var.h:208
Definition: struct_scip.h:70
type definitions for constraints and constraint handlers
type definitions for LP management
type definitions for return codes for SCIP methods
type definitions for SCIP's main datastructure
type definitions for storing primal CIP solutions
type definitions for problem variables