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-2014 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 /** increase count of applied cuts */
186 extern
188  SCIP_SEPA* sepa /**< separator */
189  );
190 
191 /** increase count of found cuts */
192 extern
194  SCIP_SEPA* sepa /**< separator */
195  );
196 
197 /** increase count of found cuts at current node */
198 extern
200  SCIP_SEPA* sepa /**< separator */
201  );
202 
203 #ifdef __cplusplus
204 }
205 #endif
206 
207 #endif
208