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