Scippy

SCIP

Solving Constraint Integer Programs

type_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-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 type_nodesel.h
26  * @ingroup TYPEDEFINITIONS
27  * @brief type definitions for node selectors
28  * @author Tobias Achterberg
29  */
30 
31 /** @defgroup DEFPLUGINS_NODESEL Default node selectors
32  * @ingroup DEFPLUGINS
33  * @brief implementation files (.c files) of the default node selectors of SCIP
34  */
35 
36 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
37 
38 #ifndef __SCIP_TYPE_NODESEL_H__
39 #define __SCIP_TYPE_NODESEL_H__
40 
41 #include "scip/def.h"
42 #include "scip/type_retcode.h"
43 #include "scip/type_tree.h"
44 #include "scip/type_scip.h"
45 
46 #ifdef __cplusplus
47 extern "C" {
48 #endif
49 
50 typedef struct SCIP_NodePQ SCIP_NODEPQ; /**< node priority queue */
51 typedef struct SCIP_Nodesel SCIP_NODESEL; /**< node selector data structure */
52 typedef struct SCIP_NodeselData SCIP_NODESELDATA; /**< node selector specific data */
53 
54 
55 /** copy method for node selector plugins (called when SCIP copies plugins)
56  *
57  * input:
58  * - scip : SCIP main data structure
59  * - nodesel : the node selector itself
60  */
61 #define SCIP_DECL_NODESELCOPY(x) SCIP_RETCODE x (SCIP* scip, SCIP_NODESEL* nodesel)
62 
63 
64 /** destructor of node selector to free user data (called when SCIP is exiting)
65  *
66  * input:
67  * - scip : SCIP main data structure
68  * - nodesel : the node selector itself
69  */
70 #define SCIP_DECL_NODESELFREE(x) SCIP_RETCODE x (SCIP* scip, SCIP_NODESEL* nodesel)
71 
72 /** initialization method of node selector (called after problem was transformed)
73  *
74  * input:
75  * - scip : SCIP main data structure
76  * - nodesel : the node selector itself
77  */
78 #define SCIP_DECL_NODESELINIT(x) SCIP_RETCODE x (SCIP* scip, SCIP_NODESEL* nodesel)
79 
80 /** deinitialization method of node selector (called before transformed problem is freed)
81  *
82  * input:
83  * - scip : SCIP main data structure
84  * - nodesel : the node selector itself
85  */
86 #define SCIP_DECL_NODESELEXIT(x) SCIP_RETCODE x (SCIP* scip, SCIP_NODESEL* nodesel)
87 
88 /** solving process initialization method of node selector (called when branch and bound process is about to begin)
89  *
90  * This method is called when the presolving was finished and the branch and bound process is about to begin.
91  * The node selector may use this call to initialize its branch and bound specific data.
92  *
93  * input:
94  * - scip : SCIP main data structure
95  * - nodesel : the node selector itself
96  */
97 #define SCIP_DECL_NODESELINITSOL(x) SCIP_RETCODE x (SCIP* scip, SCIP_NODESEL* nodesel)
98 
99 /** solving process deinitialization method of node selector (called before branch and bound process data is freed)
100  *
101  * This method is called before the branch and bound process is freed.
102  * The node selector should use this call to clean up its branch and bound data.
103  *
104  * input:
105  * - scip : SCIP main data structure
106  * - nodesel : the node selector itself
107  */
108 #define SCIP_DECL_NODESELEXITSOL(x) SCIP_RETCODE x (SCIP* scip, SCIP_NODESEL* nodesel)
109 
110 /** node selection method of node selector
111  *
112  * This method is called to select the next leaf of the branch and bound tree to be processed.
113  *
114  * input:
115  * - scip : SCIP main data structure
116  * - nodesel : the node selector itself
117  * - selnode : pointer to store the selected node
118  *
119  * possible return values for *selnode:
120  * - NULL : problem is solved, because tree is empty
121  * - non-NULL: node to be solved next
122  */
123 #define SCIP_DECL_NODESELSELECT(x) SCIP_RETCODE x (SCIP* scip, SCIP_NODESEL* nodesel, SCIP_NODE** selnode)
124 
125 /** node comparison method of node selector
126  *
127  * This method is called to compare two nodes regarding their order in the node priority queue.
128  *
129  * input:
130  * - scip : SCIP main data structure
131  * - nodesel : the node selector itself
132  * - node1 : first node to compare
133  * - node2 : second node to compare
134  *
135  * possible return values:
136  * - value < 0: node1 comes before (is better than) node2
137  * - value = 0: both nodes are equally good
138  * - value > 0: node2 comes after (is worse than) node2
139  */
140 #define SCIP_DECL_NODESELCOMP(x) int x (SCIP* scip, SCIP_NODESEL* nodesel, SCIP_NODE* node1, SCIP_NODE* node2)
141 
142 #ifdef __cplusplus
143 }
144 #endif
145 
146 #endif
type definitions for return codes for SCIP methods
struct SCIP_NodeselData SCIP_NODESELDATA
Definition: type_nodesel.h:52
type definitions for SCIP&#39;s main datastructure
type definitions for branch and bound tree
common defines and data types used in all packages of SCIP