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-2020 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 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_reopt.h"
31 #include "scip/type_retcode.h"
32 #include "scip/type_result.h"
33 #include "scip/type_set.h"
34 #include "scip/type_compr.h"
35 #include "scip/pub_compr.h"
36 
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40 
41 /** copies the given tree compression to a new scip */
43  SCIP_COMPR* compr, /**< tree compression */
44  SCIP_SET* set /**< SCIP_SET of SCIP to copy to */
45  );
46 
47 /** creates a tree compression */
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
58  * 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 */
70  SCIP_COMPR** compr, /**< pointer to tree compression data structure */
71  SCIP_SET* set /**< global SCIP settings */
72  );
73 
74 /** initializes tree compression */
76  SCIP_COMPR* compr, /**< tree compression */
77  SCIP_SET* set /**< global SCIP settings */
78  );
79 
80 /** calls exit method of tree compression */
82  SCIP_COMPR* compr, /**< tree compression */
83  SCIP_SET* set /**< global SCIP settings */
84  );
85 
86 /** informs tree compression that the branch and bound process is being started */
88  SCIP_COMPR* compr, /**< tree compression */
89  SCIP_SET* set /**< global SCIP settings */
90  );
91 
92 /** informs tree compression that the branch and bound process data is being freed */
94  SCIP_COMPR* compr, /**< tree compression */
95  SCIP_SET* set /**< global SCIP settings */
96  );
97 
98 /** calls execution method of tree compression */
100  SCIP_COMPR* compr, /**< tree compression */
101  SCIP_SET* set, /**< global SCIP settings */
102  SCIP_REOPT* reopt, /**< reoptimization data structure */
103  SCIP_RESULT* result /**< pointer to store the result of the callback method */
104  );
105 
106 /** sets priority of tree compression */
108  SCIP_COMPR* compr, /**< tree compression */
109  SCIP_SET* set, /**< global SCIP settings */
110  int priority /**< new priority of the tree compression */
111  );
112 
113 /** sets copy callback of tree compression */
114 void SCIPcomprSetCopy(
115  SCIP_COMPR* compr, /**< tree compression */
116  SCIP_DECL_COMPRCOPY ((*comprcopy)) /**< copy callback of tree compression or NULL if you don't want to copy your plugin into sub-SCIPs */
117  );
118 
119 /** sets destructor callback of tree compression */
120 void SCIPcomprSetFree(
121  SCIP_COMPR* compr, /**< tree compression */
122  SCIP_DECL_COMPRFREE ((*comprfree)) /**< destructor of tree compression */
123  );
124 
125 /** sets initialization callback of tree compression */
126 void SCIPcomprSetInit(
127  SCIP_COMPR* compr, /**< tree compression */
128  SCIP_DECL_COMPRINIT ((*comprinit)) /**< initialize tree compression */
129  );
130 
131 /** sets deinitialization callback of tree compression */
132 void SCIPcomprSetExit(
133  SCIP_COMPR* compr, /**< tree compression */
134  SCIP_DECL_COMPREXIT ((*comprexit)) /**< deinitialize tree compression */
135  );
136 
137 /** sets solving process initialization callback of tree compression */
139  SCIP_COMPR* compr, /**< tree compression */
140  SCIP_DECL_COMPRINITSOL ((*comprinitsol)) /**< solving process initialization callback of tree compression */
141  );
142 
143 /** sets solving process deinitialization callback of tree compression */
145  SCIP_COMPR* compr, /**< tree compression */
146  SCIP_DECL_COMPREXITSOL ((*comprexitsol)) /**< solving process deinitialization callback of tree compression */
147  );
148 
149 /** should the compression be executed at the given depth, frequency, timing, ... */
152  SCIP_COMPR* compr, /**< tree compression */
153  int depth, /**< depth of current node */
154  int nnodes /**< number of open nodes */
155  );
156 
157 #ifdef __cplusplus
158 }
159 #endif
160 
161 #endif
enum SCIP_Result SCIP_RESULT
Definition: type_result.h:52
void SCIPcomprSetCopy(SCIP_COMPR *compr, SCIP_DECL_COMPRCOPY((*comprcopy)))
Definition: compr.c:367
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:161
#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:221
void SCIPcomprSetPriority(SCIP_COMPR *compr, SCIP_SET *set, int priority)
Definition: compr.c:477
#define SCIP_EXPORT
Definition: def.h:100
SCIP_RETCODE SCIPcomprExec(SCIP_COMPR *compr, SCIP_SET *set, SCIP_REOPT *reopt, SCIP_RESULT *result)
Definition: compr.c:290
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:54
type definitions for global SCIP settings
void SCIPcomprSetExitsol(SCIP_COMPR *compr, SCIP_DECL_COMPREXITSOL((*comprexitsol)))
Definition: compr.c:422
SCIP_EXPORT SCIP_Bool SCIPcomprShouldBeExecuted(SCIP_COMPR *compr, int depth, int nnodes)
Definition: compr.c:433
type definitions for return codes for SCIP methods
SCIP_RETCODE SCIPcomprFree(SCIP_COMPR **compr, SCIP_SET *set)
Definition: compr.c:194
type definitions for collecting reoptimization information
void SCIPcomprSetInit(SCIP_COMPR *compr, SCIP_DECL_COMPRINIT((*comprinit)))
Definition: compr.c:389
#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_RETCODE SCIPcomprExit(SCIP_COMPR *compr, SCIP_SET *set)
Definition: compr.c:260
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:75
#define SCIP_Bool
Definition: def.h:70
#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:378
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:429
void SCIPcomprSetInitsol(SCIP_COMPR *compr, SCIP_DECL_COMPRINITSOL((*comprinitsol)))
Definition: compr.c:411
void SCIPcomprSetExit(SCIP_COMPR *compr, SCIP_DECL_COMPREXIT((*comprexit)))
Definition: compr.c:400
memory allocation routines