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-2016 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  * This constraint handler handles bound disjunction constraints of the form
22  * \f[
23  * (x_1 \{\leq,\geq\} b_1) \vee \ldots \vee (x_n \{\leq,\geq\} b_n)
24  * \f]
25  * with bounds \f$b_i \in Q\f$, decision variables \f$x_i\f$, which can be of any type,
26  * and bound types \f$\leq\f$ or \f$\geq\f$.
27  */
28 
29 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
30 
31 #ifndef __SCIP_CONS_BOUNDDISJUNCTION_H__
32 #define __SCIP_CONS_BOUNDDISJUNCTION_H__
33 
34 
35 #include "scip/scip.h"
36 
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40 
41 /** creates the handler for bound disjunction constraints and includes it in SCIP */
42 extern
44  SCIP* scip /**< SCIP data structure */
45  );
46 
47 /** creates and captures a bound disjunction constraint
48  *
49  * @note the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
50  */
51 extern
53  SCIP* scip, /**< SCIP data structure */
54  SCIP_CONS** cons, /**< pointer to hold the created constraint */
55  const char* name, /**< name of constraint */
56  int nvars, /**< number of variables in the constraint */
57  SCIP_VAR** vars, /**< variables of the literals in the constraint */
58  SCIP_BOUNDTYPE* boundtypes, /**< types of bounds of the literals (lower or upper bounds) */
59  SCIP_Real* bounds, /**< bounds of the literals */
60  SCIP_Bool initial, /**< should the LP relaxation of constraint be in the initial LP?
61  * Usually set to TRUE. Set to FALSE for 'lazy constraints'. */
62  SCIP_Bool separate, /**< should the constraint be separated during LP processing?
63  * Usually set to TRUE. */
64  SCIP_Bool enforce, /**< should the constraint be enforced during node processing?
65  * TRUE for model constraints, FALSE for additional, redundant constraints. */
66  SCIP_Bool check, /**< should the constraint be checked for feasibility?
67  * TRUE for model constraints, FALSE for additional, redundant constraints. */
68  SCIP_Bool propagate, /**< should the constraint be propagated during node processing?
69  * Usually set to TRUE. */
70  SCIP_Bool local, /**< is constraint only valid locally?
71  * Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints. */
72  SCIP_Bool modifiable, /**< is constraint modifiable (subject to column generation)?
73  * Usually set to FALSE. In column generation applications, set to TRUE if pricing
74  * adds coefficients to this constraint. */
75  SCIP_Bool dynamic, /**< is constraint subject to aging?
76  * Usually set to FALSE. Set to TRUE for own cuts which
77  * are separated as constraints. */
78  SCIP_Bool removable, /**< should the relaxation be removed from the LP due to aging or cleanup?
79  * Usually set to FALSE. Set to TRUE for 'lazy constraints' and 'user cuts'. */
80  SCIP_Bool stickingatnode /**< should the constraint always be kept at the node where it was added, even
81  * if it may be moved to a more global node?
82  * Usually set to FALSE. Set to TRUE to for constraints that represent node data. */
83  );
84 
85 /** creates and captures an and constraint
86  * in its most basic version, i. e., all constraint flags are set to their basic value as explained for the
87  * method SCIPcreateConsBounddisjunction(); all flags can be set via SCIPsetConsFLAGNAME-methods in scip.h
88  *
89  * @see SCIPcreateConsBounddisjunction() for information about the basic constraint flag configuration
90  *
91  * @note the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
92  */
93 extern
95  SCIP* scip, /**< SCIP data structure */
96  SCIP_CONS** cons, /**< pointer to hold the created constraint */
97  const char* name, /**< name of constraint */
98  int nvars, /**< number of variables in the constraint */
99  SCIP_VAR** vars, /**< variables of the literals in the constraint */
100  SCIP_BOUNDTYPE* boundtypes, /**< types of bounds of the literals (lower or upper bounds) */
101  SCIP_Real* bounds /**< bounds of the literals */
102  );
103 
104 /** gets number of variables in bound disjunction constraint */
105 extern
107  SCIP* scip, /**< SCIP data structure */
108  SCIP_CONS* cons /**< constraint data */
109  );
110 
111 /** gets array of variables in bound disjunction constraint */
112 extern
114  SCIP* scip, /**< SCIP data structure */
115  SCIP_CONS* cons /**< constraint data */
116  );
117 
118 /** gets array of bound types in bound disjunction constraint */
119 extern
121  SCIP* scip, /**< SCIP data structure */
122  SCIP_CONS* cons /**< constraint data */
123  );
124 
125 /** gets array of bounds in bound disjunction constraint */
126 extern
128  SCIP* scip, /**< SCIP data structure */
129  SCIP_CONS* cons /**< constraint data */
130  );
131 
132 #ifdef __cplusplus
133 }
134 #endif
135 
136 #endif
int SCIPgetNVarsBounddisjunction(SCIP *scip, SCIP_CONS *cons)
enum SCIP_BoundType SCIP_BOUNDTYPE
Definition: type_lp.h:50
SCIP_Real * SCIPgetBoundsBounddisjunction(SCIP *scip, SCIP_CONS *cons)
SCIP_BOUNDTYPE * SCIPgetBoundtypesBounddisjunction(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)
SCIP_VAR ** SCIPgetVarsBounddisjunction(SCIP *scip, SCIP_CONS *cons)
#define SCIP_Bool
Definition: def.h:53
SCIP_RETCODE SCIPincludeConshdlrBounddisjunction(SCIP *scip)
#define SCIP_Real
Definition: def.h:127
SCIP_RETCODE SCIPcreateConsBasicBounddisjunction(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_BOUNDTYPE *boundtypes, SCIP_Real *bounds)
SCIP callable library.