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