Scippy

SCIP

Solving Constraint Integer Programs

scip_nodesel.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-2021 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_nodesel.h
17  * @ingroup PUBLICCOREAPI
18  * @brief public methods for node selector plugins
19  * @author Tobias Achterberg
20  * @author Timo Berthold
21  * @author Thorsten Koch
22  * @author Alexander Martin
23  * @author Marc Pfetsch
24  * @author Kati Wolter
25  * @author Gregor Hendel
26  * @author Leona Gottwald
27  */
28 
29 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
30 
31 #ifndef __SCIP_SCIP_NODESEL_H__
32 #define __SCIP_SCIP_NODESEL_H__
33 
34 
35 #include "scip/def.h"
36 #include "scip/type_nodesel.h"
37 #include "scip/type_retcode.h"
38 #include "scip/type_scip.h"
39 #include "scip/type_tree.h"
40 
41 #ifdef __cplusplus
42 extern "C" {
43 #endif
44 
45 /**@addtogroup PublicNodeSelectorMethods
46  *
47  * @{
48  */
49 
50 /** creates a node selector and includes it in SCIP.
51  *
52  * @note method has all node selector callbacks as arguments and is thus changed every time a new
53  * callback is added in future releases; consider using SCIPincludeNodeselBasic() and setter functions
54  * if you seek for a method which is less likely to change in future releases
55  */
58  SCIP* scip, /**< SCIP data structure */
59  const char* name, /**< name of node selector */
60  const char* desc, /**< description of node selector */
61  int stdpriority, /**< priority of the node selector in standard mode */
62  int memsavepriority, /**< priority of the node selector in memory saving mode */
63  SCIP_DECL_NODESELCOPY ((*nodeselcopy)), /**< copy method of node selector or NULL if you don't want to copy your plugin into sub-SCIPs */
64  SCIP_DECL_NODESELFREE ((*nodeselfree)), /**< destructor of node selector */
65  SCIP_DECL_NODESELINIT ((*nodeselinit)), /**< initialize node selector */
66  SCIP_DECL_NODESELEXIT ((*nodeselexit)), /**< deinitialize node selector */
67  SCIP_DECL_NODESELINITSOL((*nodeselinitsol)),/**< solving process initialization method of node selector */
68  SCIP_DECL_NODESELEXITSOL((*nodeselexitsol)),/**< solving process deinitialization method of node selector */
69  SCIP_DECL_NODESELSELECT((*nodeselselect)),/**< node selection method */
70  SCIP_DECL_NODESELCOMP ((*nodeselcomp)), /**< node comparison method */
71  SCIP_NODESELDATA* nodeseldata /**< node selector data */
72  );
73 
74 /** Creates a node selector and includes it in SCIP with its most fundamental callbacks. All non-fundamental
75  * (or optional) callbacks as, e.g., init and exit callbacks, will be set to NULL.
76  * Optional callbacks can be set via specific setter functions, see SCIPsetNodeselCopy(), SCIPsetNodeselFree(),
77  * SCIPsetNodeselInit(), SCIPsetNodeselExit(), SCIPsetNodeselInitsol(), and SCIPsetNodeselExitsol()
78  *
79  * @note if you want to set all callbacks with a single method call, consider using SCIPincludeNodesel() instead
80  */
83  SCIP* scip, /**< SCIP data structure */
84  SCIP_NODESEL** nodesel, /**< reference to a node selector, or NULL */
85  const char* name, /**< name of node selector */
86  const char* desc, /**< description of node selector */
87  int stdpriority, /**< priority of the node selector in standard mode */
88  int memsavepriority, /**< priority of the node selector in memory saving mode */
89  SCIP_DECL_NODESELSELECT((*nodeselselect)),/**< node selection method */
90  SCIP_DECL_NODESELCOMP ((*nodeselcomp)), /**< node comparison method */
91  SCIP_NODESELDATA* nodeseldata /**< node selector data */
92  );
93 
94 /** sets copy method of node selector */
97  SCIP* scip, /**< SCIP data structure */
98  SCIP_NODESEL* nodesel, /**< node selector */
99  SCIP_DECL_NODESELCOPY ((*nodeselcopy)) /**< copy method of node selector or NULL if you don't want to copy your plugin into sub-SCIPs */
100  );
101 
102 /** sets destructor method of node selector */
105  SCIP* scip, /**< SCIP data structure */
106  SCIP_NODESEL* nodesel, /**< node selector */
107  SCIP_DECL_NODESELFREE ((*nodeselfree)) /**< destructor of node selector */
108  );
109 
110 /** sets initialization method of node selector */
113  SCIP* scip, /**< SCIP data structure */
114  SCIP_NODESEL* nodesel, /**< node selector */
115  SCIP_DECL_NODESELINIT ((*nodeselinit)) /**< initialize node selector */
116  );
117 
118 /** sets deinitialization method of node selector */
121  SCIP* scip, /**< SCIP data structure */
122  SCIP_NODESEL* nodesel, /**< node selector */
123  SCIP_DECL_NODESELEXIT ((*nodeselexit)) /**< deinitialize node selector */
124  );
125 
126 /** sets solving process initialization method of node selector */
129  SCIP* scip, /**< SCIP data structure */
130  SCIP_NODESEL* nodesel, /**< node selector */
131  SCIP_DECL_NODESELINITSOL ((*nodeselinitsol))/**< solving process initialization method of node selector */
132  );
133 
134 /** sets solving process deinitialization method of node selector */
137  SCIP* scip, /**< SCIP data structure */
138  SCIP_NODESEL* nodesel, /**< node selector */
139  SCIP_DECL_NODESELEXITSOL ((*nodeselexitsol))/**< solving process deinitialization method of node selector */
140  );
141 
142 /** returns the node selector of the given name, or NULL if not existing */
145  SCIP* scip, /**< SCIP data structure */
146  const char* name /**< name of node selector */
147  );
148 
149 /** returns the array of currently available node selectors */
152  SCIP* scip /**< SCIP data structure */
153  );
154 
155 /** returns the number of currently available node selectors */
157 int SCIPgetNNodesels(
158  SCIP* scip /**< SCIP data structure */
159  );
160 
161 /** sets the priority of a node selector in standard mode */
164  SCIP* scip, /**< SCIP data structure */
165  SCIP_NODESEL* nodesel, /**< node selector */
166  int priority /**< new standard priority of the node selector */
167  );
168 
169 /** sets the priority of a node selector in memory saving mode */
172  SCIP* scip, /**< SCIP data structure */
173  SCIP_NODESEL* nodesel, /**< node selector */
174  int priority /**< new memory saving priority of the node selector */
175  );
176 
177 /** returns the currently used node selector */
180  SCIP* scip /**< SCIP data structure */
181  );
182 
183 /** @} */
184 
185 #ifdef __cplusplus
186 }
187 #endif
188 
189 #endif
#define SCIP_DECL_NODESELCOMP(x)
Definition: type_nodesel.h:131
SCIP_EXPORT SCIP_RETCODE SCIPsetNodeselMemsavePriority(SCIP *scip, SCIP_NODESEL *nodesel, int priority)
Definition: scip_nodesel.c:275
SCIP_EXPORT SCIP_RETCODE SCIPsetNodeselExitsol(SCIP *scip, SCIP_NODESEL *nodesel, SCIP_DECL_NODESELEXITSOL((*nodeselexitsol)))
Definition: scip_nodesel.c:209
SCIP_EXPORT SCIP_RETCODE SCIPsetNodeselCopy(SCIP *scip, SCIP_NODESEL *nodesel, SCIP_DECL_NODESELCOPY((*nodeselcopy)))
Definition: scip_nodesel.c:129
#define SCIP_DECL_NODESELINITSOL(x)
Definition: type_nodesel.h:88
SCIP_EXPORT SCIP_NODESEL ** SCIPgetNodesels(SCIP *scip)
Definition: scip_nodesel.c:238
#define SCIP_EXPORT
Definition: def.h:100
SCIP_EXPORT SCIP_RETCODE SCIPsetNodeselExit(SCIP *scip, SCIP_NODESEL *nodesel, SCIP_DECL_NODESELEXIT((*nodeselexit)))
Definition: scip_nodesel.c:177
SCIP_EXPORT SCIP_RETCODE SCIPsetNodeselFree(SCIP *scip, SCIP_NODESEL *nodesel, SCIP_DECL_NODESELFREE((*nodeselfree)))
Definition: scip_nodesel.c:145
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:54
SCIP_EXPORT SCIP_RETCODE SCIPsetNodeselInitsol(SCIP *scip, SCIP_NODESEL *nodesel, SCIP_DECL_NODESELINITSOL((*nodeselinitsol)))
Definition: scip_nodesel.c:193
type definitions for return codes for SCIP methods
SCIP_EXPORT int SCIPgetNNodesels(SCIP *scip)
Definition: scip_nodesel.c:249
#define SCIP_DECL_NODESELEXITSOL(x)
Definition: type_nodesel.h:99
SCIP_EXPORT SCIP_RETCODE SCIPsetNodeselStdPriority(SCIP *scip, SCIP_NODESEL *nodesel, int priority)
Definition: scip_nodesel.c:260
#define SCIP_DECL_NODESELINIT(x)
Definition: type_nodesel.h:69
struct SCIP_NodeselData SCIP_NODESELDATA
Definition: type_nodesel.h:43
type definitions for SCIP&#39;s main datastructure
#define SCIP_DECL_NODESELFREE(x)
Definition: type_nodesel.h:61
SCIP_EXPORT SCIP_NODESEL * SCIPfindNodesel(SCIP *scip, const char *name)
Definition: scip_nodesel.c:225
#define SCIP_DECL_NODESELEXIT(x)
Definition: type_nodesel.h:77
type definitions for branch and bound tree
SCIP_EXPORT SCIP_RETCODE SCIPincludeNodeselBasic(SCIP *scip, SCIP_NODESEL **nodesel, const char *name, const char *desc, int stdpriority, int memsavepriority, SCIP_DECL_NODESELSELECT((*nodeselselect)), SCIP_DECL_NODESELCOMP((*nodeselcomp)), SCIP_NODESELDATA *nodeseldata)
Definition: scip_nodesel.c:94
SCIP_EXPORT SCIP_NODESEL * SCIPgetNodesel(SCIP *scip)
Definition: scip_nodesel.c:290
SCIP_EXPORT SCIP_RETCODE SCIPincludeNodesel(SCIP *scip, const char *name, const char *desc, int stdpriority, int memsavepriority, SCIP_DECL_NODESELCOPY((*nodeselcopy)), SCIP_DECL_NODESELFREE((*nodeselfree)), SCIP_DECL_NODESELINIT((*nodeselinit)), SCIP_DECL_NODESELEXIT((*nodeselexit)), SCIP_DECL_NODESELINITSOL((*nodeselinitsol)), SCIP_DECL_NODESELEXITSOL((*nodeselexitsol)), SCIP_DECL_NODESELSELECT((*nodeselselect)), SCIP_DECL_NODESELCOMP((*nodeselcomp)), SCIP_NODESELDATA *nodeseldata)
Definition: scip_nodesel.c:51
#define SCIP_DECL_NODESELCOPY(x)
Definition: type_nodesel.h:52
SCIP_EXPORT SCIP_RETCODE SCIPsetNodeselInit(SCIP *scip, SCIP_NODESEL *nodesel, SCIP_DECL_NODESELINIT((*nodeselinit)))
Definition: scip_nodesel.c:161
common defines and data types used in all packages of SCIP
type definitions for node selectors
#define SCIP_DECL_NODESELSELECT(x)
Definition: type_nodesel.h:114