Scippy

SCIP

Solving Constraint Integer Programs

sepa.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 sepa.h
17  * @brief internal methods for separators
18  * @author Tobias Achterberg
19  */
20 
21 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
22 
23 #ifndef __SCIP_SEPA_H__
24 #define __SCIP_SEPA_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_stat.h"
33 #include "scip/type_sepastore.h"
34 #include "scip/type_sepa.h"
35 #include "scip/pub_sepa.h"
36 
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40 
41 /** copies the given separator to a new scip */
42 extern
44  SCIP_SEPA* sepa, /**< separator */
45  SCIP_SET* set /**< SCIP_SET of SCIP to copy to */
46  );
47 
48 /** creates a separator */
49 extern
51  SCIP_SEPA** sepa, /**< pointer to separator data structure */
52  SCIP_SET* set, /**< global SCIP settings */
53  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
54  BMS_BLKMEM* blkmem, /**< block memory for parameter settings */
55  const char* name, /**< name of separator */
56  const char* desc, /**< description of separator */
57  int priority, /**< priority of separator (>= 0: before, < 0: after constraint handlers) */
58  int freq, /**< frequency for calling separator */
59  SCIP_Real maxbounddist, /**< maximal relative distance from current node's dual bound to primal bound compared
60  * to best node's dual bound for applying separation */
61  SCIP_Bool usessubscip, /**< does the separator use a secondary SCIP instance? */
62  SCIP_Bool delay, /**< should separator be delayed, if other separators found cuts? */
63  SCIP_DECL_SEPACOPY ((*sepacopy)), /**< copy method of separator or NULL if you don't want to copy your plugin into sub-SCIPs */
64  SCIP_DECL_SEPAFREE ((*sepafree)), /**< destructor of separator */
65  SCIP_DECL_SEPAINIT ((*sepainit)), /**< initialize separator */
66  SCIP_DECL_SEPAEXIT ((*sepaexit)), /**< deinitialize separator */
67  SCIP_DECL_SEPAINITSOL ((*sepainitsol)), /**< solving process initialization method of separator */
68  SCIP_DECL_SEPAEXITSOL ((*sepaexitsol)), /**< solving process deinitialization method of separator */
69  SCIP_DECL_SEPAEXECLP ((*sepaexeclp)), /**< LP solution separation method of separator */
70  SCIP_DECL_SEPAEXECSOL ((*sepaexecsol)), /**< arbitrary primal solution separation method of separator */
71  SCIP_SEPADATA* sepadata /**< separator data */
72  );
73 
74 /** calls destructor and frees memory of separator */
75 extern
77  SCIP_SEPA** sepa, /**< pointer to separator data structure */
78  SCIP_SET* set /**< global SCIP settings */
79  );
80 
81 /** initializes separator */
82 extern
84  SCIP_SEPA* sepa, /**< separator */
85  SCIP_SET* set /**< global SCIP settings */
86  );
87 
88 /** calls exit method of separator */
89 extern
91  SCIP_SEPA* sepa, /**< separator */
92  SCIP_SET* set /**< global SCIP settings */
93  );
94 
95 /** informs separator that the branch and bound process is being started */
96 extern
98  SCIP_SEPA* sepa, /**< separator */
99  SCIP_SET* set /**< global SCIP settings */
100  );
101 
102 /** informs separator that the branch and bound process data is being freed */
103 extern
105  SCIP_SEPA* sepa, /**< separator */
106  SCIP_SET* set /**< global SCIP settings */
107  );
108 
109 /** calls LP separation method of separator */
110 extern
112  SCIP_SEPA* sepa, /**< separator */
113  SCIP_SET* set, /**< global SCIP settings */
114  SCIP_STAT* stat, /**< dynamic problem statistics */
115  SCIP_SEPASTORE* sepastore, /**< separation storage */
116  int depth, /**< depth of current node */
117  SCIP_Real bounddist, /**< current relative distance of local dual bound to global dual bound */
118  SCIP_Bool execdelayed, /**< execute separator even if it is marked to be delayed */
119  SCIP_RESULT* result /**< pointer to store the result of the callback method */
120  );
121 
122 /** calls primal solution separation method of separator */
123 extern
125  SCIP_SEPA* sepa, /**< separator */
126  SCIP_SET* set, /**< global SCIP settings */
127  SCIP_STAT* stat, /**< dynamic problem statistics */
128  SCIP_SEPASTORE* sepastore, /**< separation storage */
129  SCIP_SOL* sol, /**< primal solution that should be separated */
130  int depth, /**< depth of current node */
131  SCIP_Bool execdelayed, /**< execute separator even if it is marked to be delayed */
132  SCIP_RESULT* result /**< pointer to store the result of the callback method */
133  );
134 
135 /** sets priority of separator */
136 extern
138  SCIP_SEPA* sepa, /**< separator */
139  SCIP_SET* set, /**< global SCIP settings */
140  int priority /**< new priority of the separator */
141  );
142 
143 /** sets copy method of separator */
144 extern
145 void SCIPsepaSetCopy(
146  SCIP_SEPA* sepa, /**< separator */
147  SCIP_DECL_SEPACOPY ((*sepacopy)) /**< copy method of separator or NULL if you don't want to copy your plugin into sub-SCIPs */
148  );
149 
150 /** sets destructor method of separator */
151 extern
152 void SCIPsepaSetFree(
153  SCIP_SEPA* sepa, /**< separator */
154  SCIP_DECL_SEPAFREE ((*sepafree)) /**< destructor of separator */
155  );
156 
157 /** sets initialization method of separator */
158 extern
159 void SCIPsepaSetInit(
160  SCIP_SEPA* sepa, /**< separator */
161  SCIP_DECL_SEPAINIT ((*sepainit)) /**< initialize separator */
162  );
163 
164 /** sets deinitialization method of separator */
165 extern
166 void SCIPsepaSetExit(
167  SCIP_SEPA* sepa, /**< separator */
168  SCIP_DECL_SEPAEXIT ((*sepaexit)) /**< deinitialize separator */
169  );
170 
171 /** sets solving process initialization method of separator */
172 extern
173 void SCIPsepaSetInitsol(
174  SCIP_SEPA* sepa, /**< separator */
175  SCIP_DECL_SEPAINITSOL ((*sepainitsol)) /**< solving process initialization method of separator */
176  );
177 
178 /** sets solving process deinitialization method of separator */
179 extern
180 void SCIPsepaSetExitsol(
181  SCIP_SEPA* sepa, /**< separator */
182  SCIP_DECL_SEPAEXITSOL ((*sepaexitsol)) /**< solving process deinitialization method of separator */
183  );
184 
185 /** enables or disables all clocks of \p sepa, depending on the value of the flag */
186 extern
188  SCIP_SEPA* sepa, /**< the separator for which all clocks should be enabled or disabled */
189  SCIP_Bool enable /**< should the clocks of the separator be enabled? */
190  );
191 
192 /** increase count of applied cuts */
193 extern
195  SCIP_SEPA* sepa /**< separator */
196  );
197 
198 /** increase count of found cuts */
199 extern
201  SCIP_SEPA* sepa /**< separator */
202  );
203 
204 /** increase count of found cuts at current node */
205 extern
207  SCIP_SEPA* sepa /**< separator */
208  );
209 
210 #ifdef __cplusplus
211 }
212 #endif
213 
214 #endif
enum SCIP_Result SCIP_RESULT
Definition: type_result.h:51
SCIP_RETCODE SCIPsepaCopyInclude(SCIP_SEPA *sepa, SCIP_SET *set)
Definition: sepa.c:70
void SCIPsepaIncNCutsFound(SCIP_SEPA *sepa)
Definition: sepa.c:810
SCIP_RETCODE SCIPsepaCreate(SCIP_SEPA **sepa, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, BMS_BLKMEM *blkmem, const char *name, const char *desc, int priority, int freq, SCIP_Real maxbounddist, SCIP_Bool usessubscip, SCIP_Bool delay, SCIP_DECL_SEPACOPY((*sepacopy)), SCIP_DECL_SEPAFREE((*sepafree)), SCIP_DECL_SEPAINIT((*sepainit)), SCIP_DECL_SEPAEXIT((*sepaexit)), SCIP_DECL_SEPAINITSOL((*sepainitsol)), SCIP_DECL_SEPAEXITSOL((*sepaexitsol)), SCIP_DECL_SEPAEXECLP((*sepaexeclp)), SCIP_DECL_SEPAEXECSOL((*sepaexecsol)), SCIP_SEPADATA *sepadata)
Definition: sepa.c:88
SCIP_RETCODE SCIPsepaFree(SCIP_SEPA **sepa, SCIP_SET *set)
Definition: sepa.c:180
void SCIPsepaEnableOrDisableClocks(SCIP_SEPA *sepa, SCIP_Bool enable)
Definition: sepa.c:718
void SCIPsepaSetExit(SCIP_SEPA *sepa, SCIP_DECL_SEPAEXIT((*sepaexit)))
Definition: sepa.c:600
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:53
type definitions for global SCIP settings
SCIP_RETCODE SCIPsepaInitsol(SCIP_SEPA *sepa, SCIP_SET *set)
Definition: sepa.c:284
type definitions for return codes for SCIP methods
#define SCIP_DECL_SEPAEXECLP(x)
Definition: type_sepa.h:115
type definitions for problem statistics
SCIP_RETCODE SCIPsepaExecSol(SCIP_SEPA *sepa, SCIP_SET *set, SCIP_STAT *stat, SCIP_SEPASTORE *sepastore, SCIP_SOL *sol, int depth, SCIP_Bool execdelayed, SCIP_RESULT *result)
Definition: sepa.c:441
#define SCIP_DECL_SEPACOPY(x)
Definition: type_sepa.h:47
SCIP_RETCODE SCIPsepaInit(SCIP_SEPA *sepa, SCIP_SET *set)
Definition: sepa.c:206
void SCIPsepaSetCopy(SCIP_SEPA *sepa, SCIP_DECL_SEPACOPY((*sepacopy)))
Definition: sepa.c:567
void SCIPsepaIncNCutsFoundAtNode(SCIP_SEPA *sepa)
Definition: sepa.c:820
void SCIPsepaSetExitsol(SCIP_SEPA *sepa, SCIP_DECL_SEPAEXITSOL((*sepaexitsol)))
Definition: sepa.c:622
void SCIPsepaSetInitsol(SCIP_SEPA *sepa, SCIP_DECL_SEPAINITSOL((*sepainitsol)))
Definition: sepa.c:611
type definitions for storing separated cuts
#define SCIP_Bool
Definition: def.h:53
#define SCIP_DECL_SEPAINIT(x)
Definition: type_sepa.h:63
SCIP_RETCODE SCIPsepaExecLP(SCIP_SEPA *sepa, SCIP_SET *set, SCIP_STAT *stat, SCIP_SEPASTORE *sepastore, int depth, SCIP_Real bounddist, SCIP_Bool execdelayed, SCIP_RESULT *result)
Definition: sepa.c:335
#define SCIP_DECL_SEPAEXITSOL(x)
Definition: type_sepa.h:93
#define SCIP_DECL_SEPAEXECSOL(x)
Definition: type_sepa.h:138
SCIP_RETCODE SCIPsepaExitsol(SCIP_SEPA *sepa, SCIP_SET *set)
Definition: sepa.c:311
void SCIPsepaSetPriority(SCIP_SEPA *sepa, SCIP_SET *set, int priority)
Definition: sepa.c:663
#define SCIP_DECL_SEPAEXIT(x)
Definition: type_sepa.h:71
type definitions for separators
#define SCIP_DECL_SEPAINITSOL(x)
Definition: type_sepa.h:82
SCIP_RETCODE SCIPsepaExit(SCIP_SEPA *sepa, SCIP_SET *set)
Definition: sepa.c:254
#define SCIP_Real
Definition: def.h:127
result codes for SCIP callback methods
void SCIPsepaSetFree(SCIP_SEPA *sepa, SCIP_DECL_SEPAFREE((*sepafree)))
Definition: sepa.c:578
public methods for separators
void SCIPsepaSetInit(SCIP_SEPA *sepa, SCIP_DECL_SEPAINIT((*sepainit)))
Definition: sepa.c:589
common defines and data types used in all packages of SCIP
struct BMS_BlkMem BMS_BLKMEM
Definition: memory.h:392
#define SCIP_DECL_SEPAFREE(x)
Definition: type_sepa.h:55
struct SCIP_SepaData SCIP_SEPADATA
Definition: type_sepa.h:38
void SCIPsepaIncNAppliedCuts(SCIP_SEPA *sepa)
Definition: sepa.c:800
memory allocation routines