Scippy

SCIP

Solving Constraint Integer Programs

cons_conjunction.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-2024 Zuse Institute Berlin (ZIB) */
7 /* */
8 /* Licensed under the Apache License, Version 2.0 (the "License"); */
9 /* you may not use this file except in compliance with the License. */
10 /* You may obtain a copy of the License at */
11 /* */
12 /* http://www.apache.org/licenses/LICENSE-2.0 */
13 /* */
14 /* Unless required by applicable law or agreed to in writing, software */
15 /* distributed under the License is distributed on an "AS IS" BASIS, */
16 /* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
17 /* See the License for the specific language governing permissions and */
18 /* limitations under the License. */
19 /* */
20 /* You should have received a copy of the Apache-2.0 license */
21 /* along with SCIP; see the file LICENSE. If not visit scipopt.org. */
22 /* */
23 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
24 
25 /**@file cons_conjunction.h
26  * @ingroup CONSHDLRS
27  * @brief constraint handler for conjunction constraints
28  * @author Tobias Achterberg
29  *
30  */
31 
32 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
33 
34 #ifndef __SCIP_CONS_CONJUNCTION_H__
35 #define __SCIP_CONS_CONJUNCTION_H__
36 
37 
38 #include "scip/def.h"
39 #include "scip/type_cons.h"
40 #include "scip/type_retcode.h"
41 #include "scip/type_scip.h"
42 
43 #ifdef __cplusplus
44 extern "C" {
45 #endif
46 
47 /** creates the handler for conjunction constraints and includes it in SCIP
48  *
49  * @ingroup ConshdlrIncludes
50  * */
51 SCIP_EXPORT
53  SCIP* scip /**< SCIP data structure */
54  );
55 
56 /**@addtogroup CONSHDLRS
57  *
58  * @{
59  *
60  * @name Conjunction Constraints
61  *
62  * @{
63  *
64  * A conjunction constraint \f$ C \f$ is a constraint of the form
65  * \f[
66  * C = C_1 \wedge \dots \wedge C_n
67  * \f]
68  * where all the \f$ C_i \f$ are individual constraints themselves.
69  */
70 
71 /** creates and captures a conjunction constraint
72  *
73  * @note the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
74  */
75 SCIP_EXPORT
77  SCIP* scip, /**< SCIP data structure */
78  SCIP_CONS** cons, /**< pointer to hold the created constraint */
79  const char* name, /**< name of constraint */
80  int nconss, /**< number of initial constraints in conjunction */
81  SCIP_CONS** conss, /**< initial constraint in conjunction */
82  SCIP_Bool enforce, /**< should the constraint be enforced during node processing?
83  * TRUE for model constraints, FALSE for additional, redundant constraints. */
84  SCIP_Bool check, /**< should the constraint be checked for feasibility?
85  * TRUE for model constraints, FALSE for additional, redundant constraints. */
86  SCIP_Bool local, /**< is constraint only valid locally?
87  * Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints. */
88  SCIP_Bool modifiable, /**< is constraint modifiable (subject to column generation)?
89  * Usually set to FALSE. In column generation applications, set to TRUE if pricing
90  * adds coefficients to this constraint. */
91  SCIP_Bool dynamic /**< is constraint subject to aging?
92  * Usually set to FALSE. Set to TRUE for own cuts which
93  * are separated as constraints. */
94  );
95 
96 /** creates and captures an and constraint
97  * in its most basic version, i. e., all constraint flags are set to their basic value as explained for the
98  * method SCIPcreateConsConjunction(); all flags can be set via SCIPsetConsFLAGNAME-methods in scip.h
99  *
100  * @see SCIPcreateConsConjunction() for information about the basic constraint flag configuration
101  *
102  * @note the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
103  */
104 SCIP_EXPORT
106  SCIP* scip, /**< SCIP data structure */
107  SCIP_CONS** cons, /**< pointer to hold the created constraint */
108  const char* name, /**< name of constraint */
109  int nconss, /**< number of initial constraints in conjunction */
110  SCIP_CONS** conss /**< initial constraint in conjunction */
111  );
112 
113 /** adds constraint to the conjunction of constraints */
114 SCIP_EXPORT
116  SCIP* scip, /**< SCIP data structure */
117  SCIP_CONS* cons, /**< conjunction constraint */
118  SCIP_CONS* addcons /**< additional constraint in conjunction */
119  );
120 
121 /** @} */
122 
123 /** @} */
124 
125 #ifdef __cplusplus
126 }
127 #endif
128 
129 #endif
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:63
type definitions for return codes for SCIP methods
SCIP_RETCODE SCIPcreateConsBasicConjunction(SCIP *scip, SCIP_CONS **cons, const char *name, int nconss, SCIP_CONS **conss)
type definitions for SCIP&#39;s main datastructure
SCIP_RETCODE SCIPaddConsElemConjunction(SCIP *scip, SCIP_CONS *cons, SCIP_CONS *addcons)
SCIP_RETCODE SCIPincludeConshdlrConjunction(SCIP *scip)
#define SCIP_Bool
Definition: def.h:91
SCIP_RETCODE SCIPcreateConsConjunction(SCIP *scip, SCIP_CONS **cons, const char *name, int nconss, SCIP_CONS **conss, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic)
common defines and data types used in all packages of SCIP
type definitions for constraints and constraint handlers