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