Scippy

SCIP

Solving Constraint Integer Programs

cons_bounddisjunction.h
Go to the documentation of this file.
1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2 /* */
3 /* This file is part of the program and library */
4 /* SCIP --- Solving Constraint Integer Programs */
5 /* */
6 /* Copyright (C) 2002-2017 Konrad-Zuse-Zentrum */
7 /* fuer Informationstechnik Berlin */
8 /* */
9 /* SCIP is distributed under the terms of the ZIB Academic License. */
10 /* */
11 /* You should have received a copy of the ZIB Academic License */
12 /* along with SCIP; see the file COPYING. If not email to scip@zib.de. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file cons_bounddisjunction.h
17  * @ingroup CONSHDLRS
18  * @brief constraint handler for bound disjunction constraints \f$(x_1 \{\leq,\geq\} b_1) \vee \ldots \vee (x_n \{\leq,\geq\} b_n)\f$
19  * @author Tobias Achterberg
20  */
21 
22 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
23 
24 #ifndef __SCIP_CONS_BOUNDDISJUNCTION_H__
25 #define __SCIP_CONS_BOUNDDISJUNCTION_H__
26 
27 
28 #include "scip/scip.h"
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
34 /** creates the handler for bound disjunction constraints and includes it in SCIP
35  *
36  * @ingroup ConshdlrIncludes
37  * */
38 extern
40  SCIP* scip /**< SCIP data structure */
41  );
42 
43 /**@addtogroup CONSHDLRS
44  *
45  * @{
46  *
47  * @name Bound Disjunction Constraints
48  *
49  * @{
50  *
51  * This constraint handler handles bound disjunction constraints of the form
52  * \f[
53  * (x_1 \{\leq,\geq\} b_1) \vee \ldots \vee (x_n \{\leq,\geq\} b_n)
54  * \f]
55  * with bounds \f$b_i \in Q\f$, decision variables \f$x_i\f$, which can be of any type,
56  * and bound types \f$\leq\f$ or \f$\geq\f$.
57  */
58 
59 /** creates and captures a bound disjunction constraint
60  *
61  * @note the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
62  */
63 extern
65  SCIP* scip, /**< SCIP data structure */
66  SCIP_CONS** cons, /**< pointer to hold the created constraint */
67  const char* name, /**< name of constraint */
68  int nvars, /**< number of variables in the constraint */
69  SCIP_VAR** vars, /**< variables of the literals in the constraint */
70  SCIP_BOUNDTYPE* boundtypes, /**< types of bounds of the literals (lower or upper bounds) */
71  SCIP_Real* bounds, /**< bounds of the literals */
72  SCIP_Bool initial, /**< should the LP relaxation of constraint be in the initial LP?
73  * Usually set to TRUE. Set to FALSE for 'lazy constraints'. */
74  SCIP_Bool separate, /**< should the constraint be separated during LP processing?
75  * Usually set to TRUE. */
76  SCIP_Bool enforce, /**< should the constraint be enforced during node processing?
77  * TRUE for model constraints, FALSE for additional, redundant constraints. */
78  SCIP_Bool check, /**< should the constraint be checked for feasibility?
79  * TRUE for model constraints, FALSE for additional, redundant constraints. */
80  SCIP_Bool propagate, /**< should the constraint be propagated during node processing?
81  * Usually set to TRUE. */
82  SCIP_Bool local, /**< is constraint only valid locally?
83  * Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints. */
84  SCIP_Bool modifiable, /**< is constraint modifiable (subject to column generation)?
85  * Usually set to FALSE. In column generation applications, set to TRUE if pricing
86  * adds coefficients to this constraint. */
87  SCIP_Bool dynamic, /**< is constraint subject to aging?
88  * Usually set to FALSE. Set to TRUE for own cuts which
89  * are separated as constraints. */
90  SCIP_Bool removable, /**< should the relaxation be removed from the LP due to aging or cleanup?
91  * Usually set to FALSE. Set to TRUE for 'lazy constraints' and 'user cuts'. */
92  SCIP_Bool stickingatnode /**< should the constraint always be kept at the node where it was added, even
93  * if it may be moved to a more global node?
94  * Usually set to FALSE. Set to TRUE to for constraints that represent node data. */
95  );
96 
97 /** creates and captures an and constraint
98  * in its most basic version, i. e., all constraint flags are set to their basic value as explained for the
99  * method SCIPcreateConsBounddisjunction(); all flags can be set via SCIPsetConsFLAGNAME-methods in scip.h
100  *
101  * @see SCIPcreateConsBounddisjunction() for information about the basic constraint flag configuration
102  *
103  * @note the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
104  */
105 extern
107  SCIP* scip, /**< SCIP data structure */
108  SCIP_CONS** cons, /**< pointer to hold the created constraint */
109  const char* name, /**< name of constraint */
110  int nvars, /**< number of variables in the constraint */
111  SCIP_VAR** vars, /**< variables of the literals in the constraint */
112  SCIP_BOUNDTYPE* boundtypes, /**< types of bounds of the literals (lower or upper bounds) */
113  SCIP_Real* bounds /**< bounds of the literals */
114  );
115 
116 /** gets number of variables in bound disjunction constraint */
117 extern
119  SCIP* scip, /**< SCIP data structure */
120  SCIP_CONS* cons /**< constraint data */
121  );
122 
123 /** gets array of variables in bound disjunction constraint */
124 extern
126  SCIP* scip, /**< SCIP data structure */
127  SCIP_CONS* cons /**< constraint data */
128  );
129 
130 /** gets array of bound types in bound disjunction constraint */
131 extern
133  SCIP* scip, /**< SCIP data structure */
134  SCIP_CONS* cons /**< constraint data */
135  );
136 
137 /** gets array of bounds in bound disjunction constraint */
138 extern
140  SCIP* scip, /**< SCIP data structure */
141  SCIP_CONS* cons /**< constraint data */
142  );
143 
144 /* @} */
145 
146 /* @} */
147 
148 #ifdef __cplusplus
149 }
150 #endif
151 
152 #endif
enum SCIP_BoundType SCIP_BOUNDTYPE
Definition: type_lp.h:50
SCIP_RETCODE SCIPincludeConshdlrBounddisjunction(SCIP *scip)
int SCIPgetNVarsBounddisjunction(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPcreateConsBasicBounddisjunction(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_BOUNDTYPE *boundtypes, SCIP_Real *bounds)
SCIP_VAR ** SCIPgetVarsBounddisjunction(SCIP *scip, SCIP_CONS *cons)
SCIP_Real * SCIPgetBoundsBounddisjunction(SCIP *scip, SCIP_CONS *cons)
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:53
SCIP_RETCODE SCIPcreateConsBounddisjunction(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_BOUNDTYPE *boundtypes, SCIP_Real *bounds, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)
#define SCIP_Bool
Definition: def.h:61
SCIP_BOUNDTYPE * SCIPgetBoundtypesBounddisjunction(SCIP *scip, SCIP_CONS *cons)
#define SCIP_Real
Definition: def.h:135
SCIP callable library.