Scippy

SCIP

Solving Constraint Integer Programs

pub_benderscut.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-2023 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 pub_benderscut.h
26  * @ingroup PUBLICCOREAPI
27  * @brief public methods for Benders' decomposition cuts
28  * @author Stephen J. Maher
29  */
30 
31 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
32 
33 #ifndef __SCIP_PUB_BENDERSCUT_H__
34 #define __SCIP_PUB_BENDERSCUT_H__
35 
36 #include "scip/def.h"
37 #include "scip/type_benderscut.h"
38 #include "scip/type_cons.h"
39 #include "scip/type_lp.h"
40 #include "scip/type_misc.h"
41 #include "scip/type_retcode.h"
42 
43 #ifdef __cplusplus
44 extern "C" {
45 #endif
46 
47 /**@addtogroup PublicBenderscutsMethods
48  *
49  * @{
50  */
51 
52 /** compares two Benders' decomposition cuts w. r. to their priority */
53 SCIP_EXPORT
54 SCIP_DECL_SORTPTRCOMP(SCIPbenderscutComp);
55 
56 /** comparison method for sorting Benders' decomposition cuts w.r.t. to their name */
57 SCIP_EXPORT
58 SCIP_DECL_SORTPTRCOMP(SCIPbenderscutCompName);
59 
60 /** gets user data of the Benders' decomposition cut */
61 SCIP_EXPORT
63  SCIP_BENDERSCUT* benderscut /**< Benders' decomposition cut */
64  );
65 
66 /** sets user data of the Benders' decomposition cut; user has to free old data in advance! */
67 SCIP_EXPORT
69  SCIP_BENDERSCUT* benderscut, /**< Benders' decomposition cut */
70  SCIP_BENDERSCUTDATA* benderscutdata /**< new Benders' decomposition cut user data */
71  );
72 
73 /** gets name of the Benders' decomposition cut */
74 SCIP_EXPORT
75 const char* SCIPbenderscutGetName(
76  SCIP_BENDERSCUT* benderscut /**< Benders' decomposition cut */
77  );
78 
79 /** gets description of the Benders' decomposition cut */
80 SCIP_EXPORT
81 const char* SCIPbenderscutGetDesc(
82  SCIP_BENDERSCUT* benderscut /**< Benders' decomposition cut */
83  );
84 
85 /** gets priority of the Benders' decomposition cut */
86 SCIP_EXPORT
88  SCIP_BENDERSCUT* benderscut /**< Benders' decomposition cut */
89  );
90 
91 /** gets the number of times, the Benders' decomposition cut was called and tried to find a violated cut */
92 SCIP_EXPORT
94  SCIP_BENDERSCUT* benderscut /**< Benders' decomposition cut */
95  );
96 
97 /** gets the number of the cuts found by this Benders' decomposition cut */
98 SCIP_EXPORT
100  SCIP_BENDERSCUT* benderscut /**< Benders' decomposition cut */
101  );
102 
103 /** is the Benders' decomposition cut initialized? */
104 SCIP_EXPORT
106  SCIP_BENDERSCUT* benderscut /**< Benders' decomposition cut */
107  );
108 
109 /** gets time in seconds used in this Benders' decomposition cut for setting up for next stages */
110 SCIP_EXPORT
112  SCIP_BENDERSCUT* benderscut /**< Benders' decomposition cut */
113  );
114 
115 /** gets time in seconds used in this Benders' decomposition cut */
116 SCIP_EXPORT
118  SCIP_BENDERSCUT* benderscut /**< Benders' decomposition cut */
119  );
120 
121 /** returns whether the Benders' cut uses the LP information */
122 SCIP_EXPORT
124  SCIP_BENDERSCUT* benderscut /**< Benders' decomposition cut */
125  );
126 
127 /** sets the enabled flag of the Benders' decomposition cut method */
128 SCIP_EXPORT
130  SCIP_BENDERSCUT* benderscut, /**< Benders' decomposition cut */
131  SCIP_Bool enabled /**< flag to indicate whether the Benders' decomposition cut is enabled */
132  );
133 
134 /** @} */
135 
136 #ifdef __cplusplus
137 }
138 #endif
139 
140 #endif
const char * SCIPbenderscutGetName(SCIP_BENDERSCUT *benderscut)
Definition: benderscut.c:492
type definitions for miscellaneous datastructures
struct SCIP_BenderscutData SCIP_BENDERSCUTDATA
SCIP_BENDERSCUTDATA * SCIPbenderscutGetData(SCIP_BENDERSCUT *benderscut)
Definition: benderscut.c:403
void SCIPbenderscutSetData(SCIP_BENDERSCUT *benderscut, SCIP_BENDERSCUTDATA *benderscutdata)
Definition: benderscut.c:413
SCIP_Bool SCIPbenderscutIsInitialized(SCIP_BENDERSCUT *benderscut)
Definition: benderscut.c:553
const char * SCIPbenderscutGetDesc(SCIP_BENDERSCUT *benderscut)
Definition: benderscut.c:502
type definitions for return codes for SCIP methods
SCIP_Real SCIPbenderscutGetTime(SCIP_BENDERSCUT *benderscut)
Definition: benderscut.c:573
SCIP_Longint SCIPbenderscutGetNFound(SCIP_BENDERSCUT *benderscut)
Definition: benderscut.c:543
type definitions for LP management
void SCIPbenderscutSetEnabled(SCIP_BENDERSCUT *benderscut, SCIP_Bool enabled)
Definition: benderscut.c:593
SCIP_Longint SCIPbenderscutGetNCalls(SCIP_BENDERSCUT *benderscut)
Definition: benderscut.c:533
int SCIPbenderscutGetPriority(SCIP_BENDERSCUT *benderscut)
Definition: benderscut.c:512
#define SCIP_Bool
Definition: def.h:93
SCIP_DECL_SORTPTRCOMP(SCIPbenderscutComp)
Definition: benderscut.c:53
SCIP_Real SCIPbenderscutGetSetupTime(SCIP_BENDERSCUT *benderscut)
Definition: benderscut.c:563
type definitions for Benders&#39; decomposition cut
SCIP_Bool SCIPbenderscutIsLPCut(SCIP_BENDERSCUT *benderscut)
Definition: benderscut.c:583
#define SCIP_Real
Definition: def.h:186
#define SCIP_Longint
Definition: def.h:171
common defines and data types used in all packages of SCIP
type definitions for constraints and constraint handlers