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-2018 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 visit 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/def.h"
29 #include "scip/type_cons.h"
30 #include "scip/type_lp.h"
31 #include "scip/type_retcode.h"
32 #include "scip/type_scip.h"
33 #include "scip/type_var.h"
34 
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38 
39 /** creates the handler for bound disjunction constraints and includes it in SCIP
40  *
41  * @ingroup ConshdlrIncludes
42  * */
43 extern
45  SCIP* scip /**< SCIP data structure */
46  );
47 
48 /**@addtogroup CONSHDLRS
49  *
50  * @{
51  *
52  * @name Bound Disjunction Constraints
53  *
54  * @{
55  *
56  * This constraint handler handles bound disjunction constraints of the form
57  * \f[
58  * (x_1 \{\leq,\geq\} b_1) \vee \ldots \vee (x_n \{\leq,\geq\} b_n)
59  * \f]
60  * with bounds \f$b_i \in Q\f$, decision variables \f$x_i\f$, which can be of any type,
61  * and bound types \f$\leq\f$ or \f$\geq\f$.
62  */
63 
64 /** creates and captures a bound disjunction constraint
65  *
66  * @note the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
67  */
68 extern
70  SCIP* scip, /**< SCIP data structure */
71  SCIP_CONS** cons, /**< pointer to hold the created constraint */
72  const char* name, /**< name of constraint */
73  int nvars, /**< number of variables in the constraint */
74  SCIP_VAR** vars, /**< variables of the literals in the constraint */
75  SCIP_BOUNDTYPE* boundtypes, /**< types of bounds of the literals (lower or upper bounds) */
76  SCIP_Real* bounds, /**< bounds of the literals */
77  SCIP_Bool initial, /**< should the LP relaxation of constraint be in the initial LP?
78  * Usually set to TRUE. Set to FALSE for 'lazy constraints'. */
79  SCIP_Bool separate, /**< should the constraint be separated during LP processing?
80  * Usually set to TRUE. */
81  SCIP_Bool enforce, /**< should the constraint be enforced during node processing?
82  * TRUE for model constraints, FALSE for additional, redundant constraints. */
83  SCIP_Bool check, /**< should the constraint be checked for feasibility?
84  * TRUE for model constraints, FALSE for additional, redundant constraints. */
85  SCIP_Bool propagate, /**< should the constraint be propagated during node processing?
86  * Usually set to TRUE. */
87  SCIP_Bool local, /**< is constraint only valid locally?
88  * Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints. */
89  SCIP_Bool modifiable, /**< is constraint modifiable (subject to column generation)?
90  * Usually set to FALSE. In column generation applications, set to TRUE if pricing
91  * adds coefficients to this constraint. */
92  SCIP_Bool dynamic, /**< is constraint subject to aging?
93  * Usually set to FALSE. Set to TRUE for own cuts which
94  * are separated as constraints. */
95  SCIP_Bool removable, /**< should the relaxation be removed from the LP due to aging or cleanup?
96  * Usually set to FALSE. Set to TRUE for 'lazy constraints' and 'user cuts'. */
97  SCIP_Bool stickingatnode /**< should the constraint always be kept at the node where it was added, even
98  * if it may be moved to a more global node?
99  * Usually set to FALSE. Set to TRUE to for constraints that represent node data. */
100  );
101 
102 /** creates and captures an and constraint
103  * in its most basic version, i. e., all constraint flags are set to their basic value as explained for the
104  * method SCIPcreateConsBounddisjunction(); all flags can be set via SCIPsetConsFLAGNAME-methods in scip.h
105  *
106  * @see SCIPcreateConsBounddisjunction() for information about the basic constraint flag configuration
107  *
108  * @note the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
109  */
110 extern
112  SCIP* scip, /**< SCIP data structure */
113  SCIP_CONS** cons, /**< pointer to hold the created constraint */
114  const char* name, /**< name of constraint */
115  int nvars, /**< number of variables in the constraint */
116  SCIP_VAR** vars, /**< variables of the literals in the constraint */
117  SCIP_BOUNDTYPE* boundtypes, /**< types of bounds of the literals (lower or upper bounds) */
118  SCIP_Real* bounds /**< bounds of the literals */
119  );
120 
121 /** gets number of variables in bound disjunction constraint */
122 extern
124  SCIP* scip, /**< SCIP data structure */
125  SCIP_CONS* cons /**< constraint data */
126  );
127 
128 /** gets array of variables in bound disjunction constraint */
129 extern
131  SCIP* scip, /**< SCIP data structure */
132  SCIP_CONS* cons /**< constraint data */
133  );
134 
135 /** gets array of bound types in bound disjunction constraint */
136 extern
138  SCIP* scip, /**< SCIP data structure */
139  SCIP_CONS* cons /**< constraint data */
140  );
141 
142 /** gets array of bounds in bound disjunction constraint */
143 extern
145  SCIP* scip, /**< SCIP data structure */
146  SCIP_CONS* cons /**< constraint data */
147  );
148 
149 /* @} */
150 
151 /* @} */
152 
153 #ifdef __cplusplus
154 }
155 #endif
156 
157 #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
type definitions for return codes for SCIP methods
type definitions for LP management
type definitions for SCIP&#39;s main datastructure
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)
type definitions for problem variables
#define SCIP_Bool
Definition: def.h:62
SCIP_BOUNDTYPE * SCIPgetBoundtypesBounddisjunction(SCIP *scip, SCIP_CONS *cons)
#define SCIP_Real
Definition: def.h:150
common defines and data types used in all packages of SCIP
type definitions for constraints and constraint handlers