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-2019 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 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
59  * your plugin into sub-SCIPs */
60  SCIP_DECL_COMPRFREE ((*comprfree)), /**< destructor of tree compression */
61  SCIP_DECL_COMPRINIT ((*comprinit)), /**< initialize tree compression */
62  SCIP_DECL_COMPREXIT ((*comprexit)), /**< deinitialize tree compression */
63  SCIP_DECL_COMPRINITSOL ((*comprinitsol)), /**< solving process initialization method of tree compression */
64  SCIP_DECL_COMPREXITSOL ((*comprexitsol)), /**< solving process deinitialization method of tree compression */
65  SCIP_DECL_COMPREXEC ((*comprexec)), /**< execution method of tree compression */
66  SCIP_COMPRDATA* comprdata /**< tree compression data */
67  );
68 
69 /** calls destructor and frees memory of tree compression */
70 extern
72  SCIP_COMPR** compr, /**< pointer to tree compression data structure */
73  SCIP_SET* set /**< global SCIP settings */
74  );
75 
76 /** initializes tree compression */
77 extern
79  SCIP_COMPR* compr, /**< tree compression */
80  SCIP_SET* set /**< global SCIP settings */
81  );
82 
83 /** calls exit method of tree compression */
84 extern
86  SCIP_COMPR* compr, /**< tree compression */
87  SCIP_SET* set /**< global SCIP settings */
88  );
89 
90 /** informs tree compression that the branch and bound process is being started */
91 extern
93  SCIP_COMPR* compr, /**< tree compression */
94  SCIP_SET* set /**< global SCIP settings */
95  );
96 
97 /** informs tree compression that the branch and bound process data is being freed */
98 extern
100  SCIP_COMPR* compr, /**< tree compression */
101  SCIP_SET* set /**< global SCIP settings */
102  );
103 
104 /** calls execution method of tree compression */
105 extern
107  SCIP_COMPR* compr, /**< tree compression */
108  SCIP_SET* set, /**< global SCIP settings */
109  SCIP_REOPT* reopt, /**< reoptimization data structure */
110  SCIP_RESULT* result /**< pointer to store the result of the callback method */
111  );
112 
113 /** sets priority of tree compression */
114 extern
116  SCIP_COMPR* compr, /**< tree compression */
117  SCIP_SET* set, /**< global SCIP settings */
118  int priority /**< new priority of the tree compression */
119  );
120 
121 /** sets copy callback of tree compression */
122 extern
123 void SCIPcomprSetCopy(
124  SCIP_COMPR* compr, /**< tree compression */
125  SCIP_DECL_COMPRCOPY ((*comprcopy)) /**< copy callback of tree compression or NULL if you don't want to copy your plugin into sub-SCIPs */
126  );
127 
128 /** sets destructor callback of tree compression */
129 extern
130 void SCIPcomprSetFree(
131  SCIP_COMPR* compr, /**< tree compression */
132  SCIP_DECL_COMPRFREE ((*comprfree)) /**< destructor of tree compression */
133  );
134 
135 /** sets initialization callback of tree compression */
136 extern
137 void SCIPcomprSetInit(
138  SCIP_COMPR* compr, /**< tree compression */
139  SCIP_DECL_COMPRINIT ((*comprinit)) /**< initialize tree compression */
140  );
141 
142 /** sets deinitialization callback of tree compression */
143 extern
144 void SCIPcomprSetExit(
145  SCIP_COMPR* compr, /**< tree compression */
146  SCIP_DECL_COMPREXIT ((*comprexit)) /**< deinitialize tree compression */
147  );
148 
149 /** sets solving process initialization callback of tree compression */
150 extern
152  SCIP_COMPR* compr, /**< tree compression */
153  SCIP_DECL_COMPRINITSOL ((*comprinitsol)) /**< solving process initialization callback of tree compression */
154  );
155 
156 /** sets solving process deinitialization callback of tree compression */
157 extern
159  SCIP_COMPR* compr, /**< tree compression */
160  SCIP_DECL_COMPREXITSOL ((*comprexitsol)) /**< solving process deinitialization callback of tree compression */
161  );
162 
163 /** should the compression be executed at the given depth, frequency, timing, ... */
164 extern
166  SCIP_COMPR* compr, /**< tree compression */
167  int depth, /**< depth of current node */
168  int nnodes /**< number of open nodes */
169  );
170 
171 #ifdef __cplusplus
172 }
173 #endif
174 
175 #endif
enum SCIP_Result SCIP_RESULT
Definition: type_result.h:52
void SCIPcomprSetCopy(SCIP_COMPR *compr, SCIP_DECL_COMPRCOPY((*comprcopy)))
Definition: compr.c:366
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:160
#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:220
void SCIPcomprSetPriority(SCIP_COMPR *compr, SCIP_SET *set, int priority)
Definition: compr.c:476
SCIP_RETCODE SCIPcomprExec(SCIP_COMPR *compr, SCIP_SET *set, SCIP_REOPT *reopt, SCIP_RESULT *result)
Definition: compr.c:289
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:421
type definitions for return codes for SCIP methods
SCIP_RETCODE SCIPcomprFree(SCIP_COMPR **compr, SCIP_SET *set)
Definition: compr.c:193
void SCIPcomprSetInit(SCIP_COMPR *compr, SCIP_DECL_COMPRINIT((*comprinit)))
Definition: compr.c:388
#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:432
SCIP_RETCODE SCIPcomprExit(SCIP_COMPR *compr, SCIP_SET *set)
Definition: compr.c:259
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:69
#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:377
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:426
void SCIPcomprSetInitsol(SCIP_COMPR *compr, SCIP_DECL_COMPRINITSOL((*comprinitsol)))
Definition: compr.c:410
void SCIPcomprSetExit(SCIP_COMPR *compr, SCIP_DECL_COMPREXIT((*comprexit)))
Definition: compr.c:399
memory allocation routines