Scippy

SCIP

Solving Constraint Integer Programs

struct_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-2016 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 email to scip@zib.de. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file struct_nodesel.h
17  * @brief datastructures for node selectors and node priority queues
18  * @author Tobias Achterberg
19  */
20 
21 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
22 
23 #ifndef __SCIP_STRUCT_NODESEL_H__
24 #define __SCIP_STRUCT_NODESEL_H__
25 
26 
27 #include "scip/def.h"
28 #include "scip/type_tree.h"
29 #include "scip/type_nodesel.h"
30 
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34 
35 /** node priority queue data structure;
36  * the fields lowerboundnode, lowerbound, nlowerbounds and validlowerbound are only used for node selection rules,
37  * that don't store the lowest bound node in the first slot of the queue
38  */
40 {
41  SCIP_Real lowerboundsum; /**< sum of lower bounds of all nodes in the queue */
42  SCIP_NODESEL* nodesel; /**< node selector used for sorting the nodes in the queue */
43  SCIP_NODE** slots; /**< array of element slots */
44  int* bfsposs; /**< position of the slot in the bfs ordered queue */
45  int* bfsqueue; /**< queue of slots[] indices sorted by best lower bound */
46  int len; /**< number of used element slots */
47  int size; /**< total number of available element slots */
48 };
49 
50 /** node selector */
52 {
53  char* name; /**< name of node selector */
54  char* desc; /**< description of node selector */
55  SCIP_DECL_NODESELCOPY ((*nodeselcopy)); /**< copy method of node selector or NULL if you don't want to copy your plugin into sub-SCIPs */
56  SCIP_DECL_NODESELFREE ((*nodeselfree)); /**< destructor of node selector */
57  SCIP_DECL_NODESELINIT ((*nodeselinit)); /**< initialize node selector */
58  SCIP_DECL_NODESELEXIT ((*nodeselexit)); /**< deinitialize node selector */
59  SCIP_DECL_NODESELINITSOL((*nodeselinitsol));/**< solving process initialization method of node selector */
60  SCIP_DECL_NODESELEXITSOL((*nodeselexitsol));/**< solving process deinitialization method of node selector */
61  SCIP_DECL_NODESELSELECT((*nodeselselect));/**< node selection method */
62  SCIP_DECL_NODESELCOMP ((*nodeselcomp)); /**< node comparison method */
63  SCIP_CLOCK* setuptime; /**< time spend for setting up this node selector for the next stages */
64  SCIP_CLOCK* nodeseltime; /**< node selector execution time */
65  SCIP_NODESELDATA* nodeseldata; /**< node selector data */
66  int stdpriority; /**< priority of the node selector in standard mode */
67  int memsavepriority; /**< priority of the node selector in memory saving mode */
68  SCIP_Bool initialized; /**< is node selector initialized? */
69 };
70 
71 #ifdef __cplusplus
72 }
73 #endif
74 
75 #endif
#define SCIP_DECL_NODESELCOMP(x)
Definition: type_nodesel.h:126
SCIP_Real lowerboundsum
#define SCIP_DECL_NODESELINITSOL(x)
Definition: type_nodesel.h:83
SCIP_Bool initialized
#define SCIP_DECL_NODESELEXITSOL(x)
Definition: type_nodesel.h:94
SCIP_CLOCK * setuptime
#define SCIP_DECL_NODESELINIT(x)
Definition: type_nodesel.h:64
struct SCIP_NodeselData SCIP_NODESELDATA
Definition: type_nodesel.h:38
SCIP_NODE ** slots
SCIP_CLOCK * nodeseltime
#define SCIP_DECL_NODESELFREE(x)
Definition: type_nodesel.h:56
#define SCIP_Bool
Definition: def.h:53
#define SCIP_DECL_NODESELEXIT(x)
Definition: type_nodesel.h:72
type definitions for branch and bound tree
SCIP_NODESELDATA * nodeseldata
#define SCIP_Real
Definition: def.h:127
#define SCIP_DECL_NODESELCOPY(x)
Definition: type_nodesel.h:47
common defines and data types used in all packages of SCIP
SCIP_NODESEL * nodesel
type definitions for node selectors
#define SCIP_DECL_NODESELSELECT(x)
Definition: type_nodesel.h:109