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