Scippy

SCIP

Solving Constraint Integer Programs

scip_cutsel.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 scip_cutsel.h
26  * @ingroup PUBLICCOREAPI
27  * @brief public methods for cut selector plugins
28  * @author Felipe Serrano
29  * @author Mark Turner
30  */
31 
32 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
33 
34 #ifndef __SCIP_SCIP_CUTSEL_H__
35 #define __SCIP_SCIP_CUTSEL_H__
36 
37 
38 #include "scip/def.h"
39 #include "scip/type_cutsel.h"
40 #include "scip/type_retcode.h"
41 #include "scip/type_scip.h"
42 #include "scip/type_tree.h"
43 
44 #ifdef __cplusplus
45 extern "C" {
46 #endif
47 
48 /**@addtogroup PublicCutSelectorMethods
49  *
50  * @{
51  */
52 
53 /** creates a cut selector and includes it in SCIP
54  *
55  * @note this method has all cut selector callbacks as arguments and is thus changed every time a new
56  * callback is added in future releases; consider using SCIPincludeCutselBasic() and setter functions
57  * if you seek for a method which is less likely to change in future releases
58  */
59 SCIP_EXPORT
61  SCIP* scip, /**< SCIP data structure */
62  const char* name, /**< name of cut selector */
63  const char* desc, /**< description of cut selector */
64  int priority, /**< priority of the cut selector */
65  SCIP_DECL_CUTSELCOPY ((*cutselcopy)), /**< copy method of cut selector or NULL if you don't want to copy your plugin into sub-SCIPs */
66  SCIP_DECL_CUTSELFREE ((*cutselfree)), /**< destructor of cut selector */
67  SCIP_DECL_CUTSELINIT ((*cutselinit)), /**< initialize cut selector */
68  SCIP_DECL_CUTSELEXIT ((*cutselexit)), /**< deinitialize cut selector */
69  SCIP_DECL_CUTSELINITSOL((*cutselinitsol)),/**< solving process initialization method of cut selector */
70  SCIP_DECL_CUTSELEXITSOL((*cutselexitsol)),/**< solving process deinitialization method of cut selector */
71  SCIP_DECL_CUTSELSELECT((*cutselselect)), /**< cut selection method */
72  SCIP_CUTSELDATA* cutseldata /**< cut selector data */
73  );
74 
75 /** Creates a cut selector and includes it in SCIP with its most fundamental callbacks.
76  *
77  * All non-fundamental (or optional) callbacks as, e.g., init and exit callbacks, will be set to NULL. Optional
78  * callbacks can be set via specific setter functions, see SCIPsetCutselCopy(), SCIPsetCutselFree(),
79  * SCIPsetCutselInit(), SCIPsetCutselExit(), SCIPsetCutselInitsol(), and SCIPsetCutselExitsol()
80  *
81  * @note if you want to set all callbacks with a single method call, consider using SCIPincludeCutsel() instead
82  */
83 SCIP_EXPORT
85  SCIP* scip, /**< SCIP data structure */
86  SCIP_CUTSEL** cutsel, /**< reference to a cut selector, or NULL */
87  const char* name, /**< name of cut selector */
88  const char* desc, /**< description of cut selector */
89  int priority, /**< priority of the cut selector in standard mode */
90  SCIP_DECL_CUTSELSELECT((*cutselselect)), /**< cut selection method */
91  SCIP_CUTSELDATA* cutseldata /**< cut selector data */
92  );
93 
94 /** sets copy method of cut selector */
95 SCIP_EXPORT
97  SCIP* scip, /**< SCIP data structure */
98  SCIP_CUTSEL* cutsel, /**< cut selector */
99  SCIP_DECL_CUTSELCOPY ((*cutselcopy)) /**< copy method of cut selector or NULL if you don't want to copy your plugin into sub-SCIPs */
100  );
101 
102 /** sets destructor method of cut selector */
103 SCIP_EXPORT
105  SCIP* scip, /**< SCIP data structure */
106  SCIP_CUTSEL* cutsel, /**< cut selector */
107  SCIP_DECL_CUTSELFREE ((*cutselfree)) /**< destructor of cut selector */
108  );
109 
110 /** sets initialization method of cut selector */
111 SCIP_EXPORT
113  SCIP* scip, /**< SCIP data structure */
114  SCIP_CUTSEL* cutsel, /**< cut selector */
115  SCIP_DECL_CUTSELINIT ((*cutselinit)) /**< initialize cut selector */
116  );
117 
118 /** sets deinitialization method of cut selector */
119 SCIP_EXPORT
121  SCIP* scip, /**< SCIP data structure */
122  SCIP_CUTSEL* cutsel, /**< cut selector */
123  SCIP_DECL_CUTSELEXIT ((*cutselexit)) /**< deinitialize cut selector */
124  );
125 
126 /** sets solving process initialization method of cut selector */
127 SCIP_EXPORT
129  SCIP* scip, /**< SCIP data structure */
130  SCIP_CUTSEL* cutsel, /**< cut selector */
131  SCIP_DECL_CUTSELINITSOL ((*cutselinitsol))/**< solving process initialization method of cut selector */
132  );
133 
134 /** sets solving process deinitialization method of cut selector */
135 SCIP_EXPORT
137  SCIP* scip, /**< SCIP data structure */
138  SCIP_CUTSEL* cutsel, /**< cut selector */
139  SCIP_DECL_CUTSELEXITSOL ((*cutselexitsol))/**< solving process deinitialization method of cut selector */
140  );
141 
142 /** returns the cut selector of the given name, or NULL if not existing */
143 SCIP_EXPORT
145  SCIP* scip, /**< SCIP data structure */
146  const char* name /**< name of cut selector */
147  );
148 
149 /** returns the array of currently available cut selectors */
150 SCIP_EXPORT
152  SCIP* scip /**< SCIP data structure */
153  );
154 
155 /** returns the number of currently available cut selectors */
156 SCIP_EXPORT
157 int SCIPgetNCutsels(
158  SCIP* scip /**< SCIP data structure */
159  );
160 
161 /** sets the priority of a cut selector */
162 SCIP_EXPORT
164  SCIP* scip, /**< SCIP data structure */
165  SCIP_CUTSEL* cutsel, /**< cut selector */
166  int priority /**< new priority of the separator */
167  );
168 
169 /** @} */
170 
171 #ifdef __cplusplus
172 }
173 #endif
174 
175 #endif
SCIP_RETCODE SCIPsetCutselExit(SCIP *scip, SCIP_CUTSEL *cutsel, SCIP_DECL_CUTSELEXIT((*cutselexit)))
Definition: scip_cutsel.c:173
int SCIPgetNCutsels(SCIP *scip)
Definition: scip_cutsel.c:247
SCIP_RETCODE SCIPsetCutselInitsol(SCIP *scip, SCIP_CUTSEL *cutsel, SCIP_DECL_CUTSELINITSOL((*cutselinitsol)))
Definition: scip_cutsel.c:189
#define SCIP_DECL_CUTSELINITSOL(x)
Definition: type_cutsel.h:97
struct SCIP_CutselData SCIP_CUTSELDATA
Definition: type_cutsel.h:53
type definitions for cut selectors
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:63
#define SCIP_DECL_CUTSELEXIT(x)
Definition: type_cutsel.h:86
type definitions for return codes for SCIP methods
#define SCIP_DECL_CUTSELSELECT(x)
Definition: type_cutsel.h:132
SCIP_CUTSEL ** SCIPgetCutsels(SCIP *scip)
Definition: scip_cutsel.c:234
SCIP_CUTSEL * SCIPfindCutsel(SCIP *scip, const char *name)
Definition: scip_cutsel.c:221
type definitions for SCIP&#39;s main datastructure
SCIP_RETCODE SCIPsetCutselCopy(SCIP *scip, SCIP_CUTSEL *cutsel, SCIP_DECL_CUTSELCOPY((*cutselcopy)))
Definition: scip_cutsel.c:125
#define SCIP_DECL_CUTSELINIT(x)
Definition: type_cutsel.h:78
#define SCIP_DECL_CUTSELCOPY(x)
Definition: type_cutsel.h:62
SCIP_RETCODE SCIPsetCutselInit(SCIP *scip, SCIP_CUTSEL *cutsel, SCIP_DECL_CUTSELINIT((*cutselinit)))
Definition: scip_cutsel.c:157
SCIP_RETCODE SCIPsetCutselPriority(SCIP *scip, SCIP_CUTSEL *cutsel, int priority)
Definition: scip_cutsel.c:258
type definitions for branch and bound tree
SCIP_RETCODE SCIPincludeCutsel(SCIP *scip, const char *name, const char *desc, int priority, SCIP_DECL_CUTSELCOPY((*cutselcopy)), SCIP_DECL_CUTSELFREE((*cutselfree)), SCIP_DECL_CUTSELINIT((*cutselinit)), SCIP_DECL_CUTSELEXIT((*cutselexit)), SCIP_DECL_CUTSELINITSOL((*cutselinitsol)), SCIP_DECL_CUTSELEXITSOL((*cutselexitsol)), SCIP_DECL_CUTSELSELECT((*cutselselect)), SCIP_CUTSELDATA *cutseldata)
Definition: scip_cutsel.c:50
#define SCIP_DECL_CUTSELFREE(x)
Definition: type_cutsel.h:70
SCIP_RETCODE SCIPsetCutselFree(SCIP *scip, SCIP_CUTSEL *cutsel, SCIP_DECL_CUTSELFREE((*cutselfree)))
Definition: scip_cutsel.c:141
common defines and data types used in all packages of SCIP
SCIP_RETCODE SCIPsetCutselExitsol(SCIP *scip, SCIP_CUTSEL *cutsel, SCIP_DECL_CUTSELEXITSOL((*cutselexitsol)))
Definition: scip_cutsel.c:205
#define SCIP_DECL_CUTSELEXITSOL(x)
Definition: type_cutsel.h:108
SCIP_RETCODE SCIPincludeCutselBasic(SCIP *scip, SCIP_CUTSEL **cutsel, const char *name, const char *desc, int priority, SCIP_DECL_CUTSELSELECT((*cutselselect)), SCIP_CUTSELDATA *cutseldata)
Definition: scip_cutsel.c:92