Scippy

SCIP

Solving Constraint Integer Programs

compr.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-2017 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 compr.h
17  * @ingroup INTERNALAPI
18  * @brief internal methods for tree compressions
19  * @author Jakob Witzig
20  */
21 
22 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
23 
24 #ifndef __SCIP_COMPR_H__
25 #define __SCIP_COMPR_H__
26 
27 
28 #include "scip/def.h"
29 #include "blockmemshell/memory.h"
30 #include "scip/type_retcode.h"
31 #include "scip/type_result.h"
32 #include "scip/type_set.h"
33 #include "scip/type_compr.h"
34 #include "scip/pub_compr.h"
35 
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39 
40 /** copies the given tree compression to a new scip */
41 extern
43  SCIP_COMPR* compr, /**< tree compression */
44  SCIP_SET* set /**< SCIP_SET of SCIP to copy to */
45  );
46 
47 /** creates a tree compression */
48 extern
50  SCIP_COMPR** compr, /**< pointer to tree compression data structure */
51  SCIP_SET* set, /**< global SCIP settings */
52  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
53  BMS_BLKMEM* blkmem, /**< block memory for parameter settings */
54  const char* name, /**< name of tree compression */
55  const char* desc, /**< description of tree compression */
56  int priority, /**< priority of the tree compression */
57  int minnnodes, /**< minimal number of nodes for calling compression */
58  SCIP_DECL_COMPRCOPY ((*comprcopy)), /**< copy method of tree compression or NULL if you don't want to copy your plugin into sub-SCIPs */
59  SCIP_DECL_COMPRFREE ((*comprfree)), /**< destructor of tree compression */
60  SCIP_DECL_COMPRINIT ((*comprinit)), /**< initialize tree compression */
61  SCIP_DECL_COMPREXIT ((*comprexit)), /**< deinitialize tree compression */
62  SCIP_DECL_COMPRINITSOL ((*comprinitsol)), /**< solving process initialization method of tree compression */
63  SCIP_DECL_COMPREXITSOL ((*comprexitsol)), /**< solving process deinitialization method of tree compression */
64  SCIP_DECL_COMPREXEC ((*comprexec)), /**< execution method of tree compression */
65  SCIP_COMPRDATA* comprdata /**< tree compression data */
66  );
67 
68 /** calls destructor and frees memory of tree compression */
69 extern
71  SCIP_COMPR** compr, /**< pointer to tree compression data structure */
72  SCIP_SET* set /**< global SCIP settings */
73  );
74 
75 /** initializes tree compression */
76 extern
78  SCIP_COMPR* compr, /**< tree compression */
79  SCIP_SET* set /**< global SCIP settings */
80  );
81 
82 /** calls exit method of tree compression */
83 extern
85  SCIP_COMPR* compr, /**< tree compression */
86  SCIP_SET* set /**< global SCIP settings */
87  );
88 
89 /** informs tree compression that the branch and bound process is being started */
90 extern
92  SCIP_COMPR* compr, /**< tree compression */
93  SCIP_SET* set /**< global SCIP settings */
94  );
95 
96 /** informs tree compression that the branch and bound process data is being freed */
97 extern
99  SCIP_COMPR* compr, /**< tree compression */
100  SCIP_SET* set /**< global SCIP settings */
101  );
102 
103 /** calls execution method of tree compression */
104 extern
106  SCIP_COMPR* compr, /**< tree compression */
107  SCIP_SET* set, /**< global SCIP settings */
108  SCIP_REOPT* reopt, /**< reoptimization data structure */
109  SCIP_RESULT* result /**< pointer to store the result of the callback method */
110  );
111 
112 /** sets priority of tree compression */
113 extern
115  SCIP_COMPR* compr, /**< tree compression */
116  SCIP_SET* set, /**< global SCIP settings */
117  int priority /**< new priority of the tree compression */
118  );
119 
120 /** sets copy callback of tree compression */
121 extern
122 void SCIPcomprSetCopy(
123  SCIP_COMPR* compr, /**< tree compression */
124  SCIP_DECL_COMPRCOPY ((*comprcopy)) /**< copy callback of tree compression or NULL if you don't want to copy your plugin into sub-SCIPs */
125  );
126 
127 /** sets destructor callback of tree compression */
128 extern
129 void SCIPcomprSetFree(
130  SCIP_COMPR* compr, /**< tree compression */
131  SCIP_DECL_COMPRFREE ((*comprfree)) /**< destructor of tree compression */
132  );
133 
134 /** sets initialization callback of tree compression */
135 extern
136 void SCIPcomprSetInit(
137  SCIP_COMPR* compr, /**< tree compression */
138  SCIP_DECL_COMPRINIT ((*comprinit)) /**< initialize tree compression */
139  );
140 
141 /** sets deinitialization callback of tree compression */
142 extern
143 void SCIPcomprSetExit(
144  SCIP_COMPR* compr, /**< tree compression */
145  SCIP_DECL_COMPREXIT ((*comprexit)) /**< deinitialize tree compression */
146  );
147 
148 /** sets solving process initialization callback of tree compression */
149 extern
151  SCIP_COMPR* compr, /**< tree compression */
152  SCIP_DECL_COMPRINITSOL ((*comprinitsol)) /**< solving process initialization callback of tree compression */
153  );
154 
155 /** sets solving process deinitialization callback of tree compression */
156 extern
158  SCIP_COMPR* compr, /**< tree compression */
159  SCIP_DECL_COMPREXITSOL ((*comprexitsol)) /**< solving process deinitialization callback of tree compression */
160  );
161 
162 /** should the compression be executed at the given depth, frequency, timing, ... */
163 extern
165  SCIP_COMPR* compr, /**< tree compression */
166  int depth, /**< depth of current node */
167  int nnodes /**< number of open nodes */
168  );
169 
170 #ifdef __cplusplus
171 }
172 #endif
173 
174 #endif
enum SCIP_Result SCIP_RESULT
Definition: type_result.h:52
void SCIPcomprSetCopy(SCIP_COMPR *compr, SCIP_DECL_COMPRCOPY((*comprcopy)))
Definition: compr.c:329
SCIP_RETCODE SCIPcomprCreate(SCIP_COMPR **compr, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, BMS_BLKMEM *blkmem, const char *name, const char *desc, int priority, int minnnodes, SCIP_DECL_COMPRCOPY((*comprcopy)), SCIP_DECL_COMPRFREE((*comprfree)), SCIP_DECL_COMPRINIT((*comprinit)), SCIP_DECL_COMPREXIT((*comprexit)), SCIP_DECL_COMPRINITSOL((*comprinitsol)), SCIP_DECL_COMPREXITSOL((*comprexitsol)), SCIP_DECL_COMPREXEC((*comprexec)), SCIP_COMPRDATA *comprdata)
Definition: compr.c:93
#define SCIP_DECL_COMPREXEC(x)
Definition: type_compr.h:111
SCIP_RETCODE SCIPcomprExitsol(SCIP_COMPR *compr, SCIP_SET *set)
#define SCIP_DECL_COMPREXITSOL(x)
Definition: type_compr.h:95
SCIP_RETCODE SCIPcomprInit(SCIP_COMPR *compr, SCIP_SET *set)
Definition: compr.c:183
void SCIPcomprSetPriority(SCIP_COMPR *compr, SCIP_SET *set, int priority)
Definition: compr.c:439
SCIP_RETCODE SCIPcomprExec(SCIP_COMPR *compr, SCIP_SET *set, SCIP_REOPT *reopt, SCIP_RESULT *result)
Definition: compr.c:252
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:53
type definitions for global SCIP settings
void SCIPcomprSetExitsol(SCIP_COMPR *compr, SCIP_DECL_COMPREXITSOL((*comprexitsol)))
Definition: compr.c:384
type definitions for return codes for SCIP methods
SCIP_RETCODE SCIPcomprFree(SCIP_COMPR **compr, SCIP_SET *set)
Definition: compr.c:157
void SCIPcomprSetInit(SCIP_COMPR *compr, SCIP_DECL_COMPRINIT((*comprinit)))
Definition: compr.c:351
#define SCIP_DECL_COMPRINIT(x)
Definition: type_compr.h:65
#define SCIP_DECL_COMPRFREE(x)
Definition: type_compr.h:57
#define SCIP_DECL_COMPRCOPY(x)
Definition: type_compr.h:49
SCIP_Bool SCIPcomprShouldBeExecuted(SCIP_COMPR *compr, int depth, int nnodes)
Definition: compr.c:395
SCIP_RETCODE SCIPcomprExit(SCIP_COMPR *compr, SCIP_SET *set)
Definition: compr.c:222
struct SCIP_ComprData SCIP_COMPRDATA
Definition: type_compr.h:40
#define SCIP_DECL_COMPRINITSOL(x)
Definition: type_compr.h:84
SCIP_RETCODE SCIPcomprCopyInclude(SCIP_COMPR *compr, SCIP_SET *set)
Definition: compr.c:74
#define SCIP_Bool
Definition: def.h:61
#define SCIP_DECL_COMPREXIT(x)
Definition: type_compr.h:73
type definitions for tree compression
public methods for tree compressions
void SCIPcomprSetFree(SCIP_COMPR *compr, SCIP_DECL_COMPRFREE((*comprfree)))
Definition: compr.c:340
result codes for SCIP callback methods
SCIP_RETCODE SCIPcomprInitsol(SCIP_COMPR *compr, SCIP_SET *set)
#define nnodes
Definition: gastrans.c:65
common defines and data types used in all packages of SCIP
struct BMS_BlkMem BMS_BLKMEM
Definition: memory.h:396
void SCIPcomprSetInitsol(SCIP_COMPR *compr, SCIP_DECL_COMPRINITSOL((*comprinitsol)))
Definition: compr.c:373
void SCIPcomprSetExit(SCIP_COMPR *compr, SCIP_DECL_COMPREXIT((*comprexit)))
Definition: compr.c:362
memory allocation routines