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-2017 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 execdelayed, /**< execute separator even if it is marked to be delayed */
120  SCIP_RESULT* result /**< pointer to store the result of the callback method */
121  );
122 
123 /** calls primal solution separation method of separator */
124 extern
126  SCIP_SEPA* sepa, /**< separator */
127  SCIP_SET* set, /**< global SCIP settings */
128  SCIP_STAT* stat, /**< dynamic problem statistics */
129  SCIP_SEPASTORE* sepastore, /**< separation storage */
130  SCIP_SOL* sol, /**< primal solution that should be separated */
131  int depth, /**< depth of current node */
132  SCIP_Bool execdelayed, /**< execute separator even if it is marked to be delayed */
133  SCIP_RESULT* result /**< pointer to store the result of the callback method */
134  );
135 
136 /** sets priority of separator */
137 extern
139  SCIP_SEPA* sepa, /**< separator */
140  SCIP_SET* set, /**< global SCIP settings */
141  int priority /**< new priority of the separator */
142  );
143 
144 /** sets copy method of separator */
145 extern
146 void SCIPsepaSetCopy(
147  SCIP_SEPA* sepa, /**< separator */
148  SCIP_DECL_SEPACOPY ((*sepacopy)) /**< copy method of separator or NULL if you don't want to copy your plugin into sub-SCIPs */
149  );
150 
151 /** sets destructor method of separator */
152 extern
153 void SCIPsepaSetFree(
154  SCIP_SEPA* sepa, /**< separator */
155  SCIP_DECL_SEPAFREE ((*sepafree)) /**< destructor of separator */
156  );
157 
158 /** sets initialization method of separator */
159 extern
160 void SCIPsepaSetInit(
161  SCIP_SEPA* sepa, /**< separator */
162  SCIP_DECL_SEPAINIT ((*sepainit)) /**< initialize separator */
163  );
164 
165 /** sets deinitialization method of separator */
166 extern
167 void SCIPsepaSetExit(
168  SCIP_SEPA* sepa, /**< separator */
169  SCIP_DECL_SEPAEXIT ((*sepaexit)) /**< deinitialize separator */
170  );
171 
172 /** sets solving process initialization method of separator */
173 extern
174 void SCIPsepaSetInitsol(
175  SCIP_SEPA* sepa, /**< separator */
176  SCIP_DECL_SEPAINITSOL ((*sepainitsol)) /**< solving process initialization method of separator */
177  );
178 
179 /** sets solving process deinitialization method of separator */
180 extern
181 void SCIPsepaSetExitsol(
182  SCIP_SEPA* sepa, /**< separator */
183  SCIP_DECL_SEPAEXITSOL ((*sepaexitsol)) /**< solving process deinitialization method of separator */
184  );
185 
186 /** enables or disables all clocks of \p sepa, depending on the value of the flag */
187 extern
189  SCIP_SEPA* sepa, /**< the separator for which all clocks should be enabled or disabled */
190  SCIP_Bool enable /**< should the clocks of the separator be enabled? */
191  );
192 
193 /** increase count of applied cuts */
194 extern
196  SCIP_SEPA* sepa /**< separator */
197  );
198 
199 /** increase count of found cuts */
200 extern
202  SCIP_SEPA* sepa /**< separator */
203  );
204 
205 /** increase count of found cuts at current node */
206 extern
208  SCIP_SEPA* sepa /**< separator */
209  );
210 
211 #ifdef __cplusplus
212 }
213 #endif
214 
215 #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:809
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:179
void SCIPsepaEnableOrDisableClocks(SCIP_SEPA *sepa, SCIP_Bool enable)
Definition: sepa.c:717
void SCIPsepaSetExit(SCIP_SEPA *sepa, SCIP_DECL_SEPAEXIT((*sepaexit)))
Definition: sepa.c:599
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:283
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:440
#define SCIP_DECL_SEPACOPY(x)
Definition: type_sepa.h:47
SCIP_RETCODE SCIPsepaInit(SCIP_SEPA *sepa, SCIP_SET *set)
Definition: sepa.c:205
void SCIPsepaSetCopy(SCIP_SEPA *sepa, SCIP_DECL_SEPACOPY((*sepacopy)))
Definition: sepa.c:566
void SCIPsepaIncNCutsFoundAtNode(SCIP_SEPA *sepa)
Definition: sepa.c:819
void SCIPsepaSetExitsol(SCIP_SEPA *sepa, SCIP_DECL_SEPAEXITSOL((*sepaexitsol)))
Definition: sepa.c:621
void SCIPsepaSetInitsol(SCIP_SEPA *sepa, SCIP_DECL_SEPAINITSOL((*sepainitsol)))
Definition: sepa.c:610
type definitions for storing separated cuts
#define SCIP_Bool
Definition: def.h:61
#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:334
#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:310
void SCIPsepaSetPriority(SCIP_SEPA *sepa, SCIP_SET *set, int priority)
Definition: sepa.c:662
#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:253
#define SCIP_Real
Definition: def.h:135
result codes for SCIP callback methods
void SCIPsepaSetFree(SCIP_SEPA *sepa, SCIP_DECL_SEPAFREE((*sepafree)))
Definition: sepa.c:577
public methods for separators
void SCIPsepaSetInit(SCIP_SEPA *sepa, SCIP_DECL_SEPAINIT((*sepainit)))
Definition: sepa.c:588
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:799
memory allocation routines