Scippy

SCIP

Solving Constraint Integer Programs

cons_disjunction.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_disjunction.h
26 * @ingroup CONSHDLRS
27 * @brief constraint handler for disjunction constraints
28 * @author Stefan Heinz
29 * @author Michael Winkler
30 *
31 */
32
33/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
34
35#ifndef __SCIP_CONS_DISJUNCTION_H__
36#define __SCIP_CONS_DISJUNCTION_H__
37
38
39#include "scip/def.h"
40#include "scip/type_cons.h"
41#include "scip/type_retcode.h"
42#include "scip/type_scip.h"
43
44#ifdef __cplusplus
45extern "C" {
46#endif
47
48/** creates the handler for disjunction constraints and includes it in SCIP
49 *
50 * @ingroup ConshdlrIncludes
51 * */
52SCIP_EXPORT
54 SCIP* scip /**< SCIP data structure */
55 );
56
57/**@addtogroup CONSHDLRS
58 *
59 * @{
60 *
61 * @name Disjunction Constraints
62 *
63 * @{
64 *
65 * A disjunction constraint \f$ C \f$ is a constraint of the form
66 * \f[
67 * C = C_1 \vee \dots \vee C_n
68 * \f]
69 * where all the \f$ C_i \f$ are individual constraints themselves.
70 */
71
72/** creates and captures a disjunction constraint
73 *
74 * @note the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
75 */
76SCIP_EXPORT
78 SCIP* scip, /**< SCIP data structure */
79 SCIP_CONS** cons, /**< pointer to hold the created constraint */
80 const char* name, /**< name of constraint */
81 int nconss, /**< number of initial constraints in disjunction */
82 SCIP_CONS** conss, /**< initial constraint in disjunction */
83 SCIP_CONS* relaxcons, /**< a conjunction constraint containing the linear relaxation of the disjunction constraint, or NULL */
84 SCIP_Bool initial, /**< should the LP relaxation of constraint be in the initial LP?
85 * Usually set to TRUE. Set to FALSE for 'lazy constraints'. */
86 SCIP_Bool enforce, /**< should the constraint be enforced during node processing?
87 * TRUE for model constraints, FALSE for additional, redundant constraints. */
88 SCIP_Bool check, /**< should the constraint be checked for feasibility?
89 * TRUE for model constraints, FALSE for additional, redundant constraints. */
90 SCIP_Bool local, /**< is constraint only valid locally?
91 * Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints. */
92 SCIP_Bool modifiable, /**< is constraint modifiable (subject to column generation)?
93 * Usually set to FALSE. In column generation applications, set to TRUE if pricing
94 * adds coefficients to this constraint. */
95 SCIP_Bool dynamic /**< is constraint subject to aging?
96 * Usually set to FALSE. Set to TRUE for own cuts which
97 * are separated as constraints. */
98 );
99
100/** creates and captures a cumulative constraint
101 * in its most basic version, i. e., all constraint flags are set to their basic value as explained for the
102 * method SCIPcreateConsDisjunction(); all flags can be set via SCIPsetConsFLAGNAME-methods in scip.h
103 *
104 * @see SCIPcreateConsDisjunction() for information about the basic constraint flag configuration
105 *
106 * @note the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
107 */
108SCIP_EXPORT
110 SCIP* scip, /**< SCIP data structure */
111 SCIP_CONS** cons, /**< pointer to hold the created constraint */
112 const char* name, /**< name of constraint */
113 int nconss, /**< number of initial constraints in disjunction */
114 SCIP_CONS** conss, /**< initial constraint in disjunction */
115 SCIP_CONS* relaxcons /**< a conjunction constraint containing the linear relaxation of the disjunction constraint, or NULL */
116 );
117
118/** adds constraint to the disjunction of constraints */
119SCIP_EXPORT
121 SCIP* scip, /**< SCIP data structure */
122 SCIP_CONS* cons, /**< disjunction constraint */
123 SCIP_CONS* addcons /**< additional constraint in disjunction */
124 );
125
126/** @} */
127
128/** @} */
129
130#ifdef __cplusplus
131}
132#endif
133
134#endif
common defines and data types used in all packages of SCIP
#define SCIP_Bool
Definition: def.h:91
SCIP_RETCODE SCIPcreateConsBasicDisjunction(SCIP *scip, SCIP_CONS **cons, const char *name, int nconss, SCIP_CONS **conss, SCIP_CONS *relaxcons)
SCIP_RETCODE SCIPaddConsElemDisjunction(SCIP *scip, SCIP_CONS *cons, SCIP_CONS *addcons)
SCIP_RETCODE SCIPcreateConsDisjunction(SCIP *scip, SCIP_CONS **cons, const char *name, int nconss, SCIP_CONS **conss, SCIP_CONS *relaxcons, SCIP_Bool initial, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic)
SCIP_RETCODE SCIPincludeConshdlrDisjunction(SCIP *scip)
type definitions for constraints and constraint handlers
type definitions for return codes for SCIP methods
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:63
type definitions for SCIP's main datastructure