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()
130 /** creates and captures an indicator constraint with given linear constraint and slack variable
135 * @note we assume that @a slackvar actually appears in @a lincons and we also assume that it takes
138 * @note the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
148 SCIP_Bool initial, /**< should the LP relaxation of constraint be in the initial LP? Usually set to TRUE. */
164 SCIP_Bool stickingatnode /**< should the constraint always be kept at the node where it was added, even
169 /** creates and captures an indicator constraint with given linear constraint and slack variable
170 * in its most basic version, i. e., all constraint flags are set to their basic value as explained for the
171 * method SCIPcreateConsIndicator(); all flags can be set via SCIPsetConsFLAGNAME-methods in scip.h
176 * @note we assume that @a slackvar actually appears in @a lincons and we also assume that it takes
179 * @note the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
181 * @see SCIPcreateConsIndicatorLinCons() for information about the basic constraint flag configuration
183 * @note the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
240 * Use with care if you know that the maximal violation of the corresponding constraint is at most @p ub. This bound
262 /** based on values of other variables, computes slack and binary variable to turn constraint feasible */
271 /** based on values of other variables, computes slack and binary variable to turn all constraints feasible */
280 /** adds additional linear constraint that is not connected with an indicator constraint, but can be used for separation */
288 /** adds additional globally valid row that is not connected with an indicator constraint, but can be used for separation */
SCIP_EXPORT SCIP_RETCODE SCIPsetBinaryVarIndicator(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *binvar)
Definition: cons_indicator.c:7858
SCIP_EXPORT SCIP_CONS * SCIPgetLinearConsIndicator(SCIP_CONS *cons)
Definition: cons_indicator.c:7753
SCIP_EXPORT 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:7561
Definition: struct_scip.h:59
SCIP_EXPORT SCIP_RETCODE SCIPcreateConsBasicIndicatorLinCons(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *binvar, SCIP_CONS *lincons, SCIP_VAR *slackvar)
Definition: cons_indicator.c:7703
SCIP_EXPORT SCIP_RETCODE SCIPaddLinearConsIndicator(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS *lincons)
Definition: cons_indicator.c:8260
Definition: struct_var.h:198
SCIP_EXPORT SCIP_Bool SCIPisViolatedIndicator(SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol)
Definition: cons_indicator.c:7983
type definitions for return codes for SCIP methods
type definitions for LP management
Definition: struct_sol.h:64
SCIP_EXPORT SCIP_VAR * SCIPgetSlackVarIndicator(SCIP_CONS *cons)
Definition: cons_indicator.c:7932
Definition: struct_cons.h:37
Definition: struct_cons.h:117
SCIP_EXPORT 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:7532
type definitions for SCIP's main datastructure
SCIP_EXPORT SCIP_VAR * SCIPgetBinaryVarIndicator(SCIP_CONS *cons)
Definition: cons_indicator.c:7841
SCIP_EXPORT SCIP_RETCODE SCIPsetSlackVarUb(SCIP *scip, SCIP_CONS *cons, SCIP_Real ub)
Definition: cons_indicator.c:7957
SCIP_EXPORT SCIP_RETCODE SCIPaddRowIndicator(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_ROW *row)
Definition: cons_indicator.c:8292
type definitions for problem variables
SCIP_EXPORT SCIP_RETCODE SCIPaddVarIndicator(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real val)
Definition: cons_indicator.c:7722
SCIP_EXPORT SCIP_RETCODE SCIPmakeIndicatorFeasible(SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_Bool *changed)
Definition: cons_indicator.c:8038
Definition: struct_lp.h:192
SCIP_EXPORT SCIP_RETCODE SCIPincludeConshdlrIndicator(SCIP *scip)
Definition: cons_indicator.c:7061
SCIP_EXPORT SCIP_RETCODE SCIPsetLinearConsIndicator(SCIP *scip, SCIP_CONS *cons, SCIP_CONS *lincons)
Definition: cons_indicator.c:7770
type definitions for storing primal CIP solutions
SCIP_EXPORT SCIP_RETCODE SCIPmakeIndicatorsFeasible(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_SOL *sol, SCIP_Bool *changed)
Definition: cons_indicator.c:8213
common defines and data types used in all packages of SCIP
Definition: objbenders.h:33
SCIP_EXPORT 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:7322
type definitions for constraints and constraint handlers