Scippy

SCIP

Solving Constraint Integer Programs

scip_prop.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-2021 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 scip_prop.h
17  * @ingroup PUBLICCOREAPI
18  * @brief public methods for propagator plugins
19  * @author Tobias Achterberg
20  * @author Timo Berthold
21  * @author Thorsten Koch
22  * @author Alexander Martin
23  * @author Marc Pfetsch
24  * @author Kati Wolter
25  * @author Gregor Hendel
26  * @author Leona Gottwald
27  */
28 
29 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
30 
31 #ifndef __SCIP_SCIP_PROP_H__
32 #define __SCIP_SCIP_PROP_H__
33 
34 
35 #include "scip/def.h"
36 #include "scip/type_lp.h"
37 #include "scip/type_prop.h"
38 #include "scip/type_result.h"
39 #include "scip/type_retcode.h"
40 #include "scip/type_scip.h"
41 #include "scip/type_timing.h"
42 #include "scip/type_var.h"
43 
44 #ifdef __cplusplus
45 extern "C" {
46 #endif
47 
48 /**@addtogroup PublicPropagatorMethods
49  *
50  * @{
51  */
52 
53 /** creates a propagator and includes it in SCIP.
54  *
55 
56  * @note method has all propagator callbacks as arguments and is thus changed every time a new
57  * callback is added in future releases; consider using SCIPincludePropBasic() and setter functions
58  * if you seek for a method which is less likely to change in future releases
59  */
62  SCIP* scip, /**< SCIP data structure */
63  const char* name, /**< name of propagator */
64  const char* desc, /**< description of propagator */
65  int priority, /**< priority of the propagator (>= 0: before, < 0: after constraint handlers) */
66  int freq, /**< frequency for calling propagator */
67  SCIP_Bool delay, /**< should propagator be delayed, if other propagators found reductions? */
68  SCIP_PROPTIMING timingmask, /**< positions in the node solving loop where propagator should be executed */
69  int presolpriority, /**< presolving priority of the propagator (>= 0: before, < 0: after constraint handlers) */
70  int presolmaxrounds, /**< maximal number of presolving rounds the propagator participates in (-1: no limit) */
71  SCIP_PRESOLTIMING presoltiming, /**< timing mask of the propagator's presolving method */
72  SCIP_DECL_PROPCOPY ((*propcopy)), /**< copy method of propagator or NULL if you don't want to copy your plugin into sub-SCIPs */
73  SCIP_DECL_PROPFREE ((*propfree)), /**< destructor of propagator */
74  SCIP_DECL_PROPINIT ((*propinit)), /**< initialize propagator */
75  SCIP_DECL_PROPEXIT ((*propexit)), /**< deinitialize propagator */
76  SCIP_DECL_PROPINITPRE ((*propinitpre)), /**< presolving initialization method of propagator */
77  SCIP_DECL_PROPEXITPRE ((*propexitpre)), /**< presolving deinitialization method of propagator */
78  SCIP_DECL_PROPINITSOL ((*propinitsol)), /**< solving process initialization method of propagator */
79  SCIP_DECL_PROPEXITSOL ((*propexitsol)), /**< solving process deinitialization method of propagator */
80  SCIP_DECL_PROPPRESOL ((*proppresol)), /**< presolving method */
81  SCIP_DECL_PROPEXEC ((*propexec)), /**< execution method of propagator */
82  SCIP_DECL_PROPRESPROP ((*propresprop)), /**< propagation conflict resolving method */
83  SCIP_PROPDATA* propdata /**< propagator data */
84  );
85 
86 /** creates a propagator and includes it in SCIP. All non-fundamental (or optional) callbacks will be set to NULL.
87  * Optional callbacks can be set via specific setter functions, see SCIPsetPropInit(), SCIPsetPropExit(),
88  * SCIPsetPropCopy(), SCIPsetPropFree(), SCIPsetPropInitsol(), SCIPsetPropExitsol(),
89  * SCIPsetPropInitpre(), SCIPsetPropExitpre(), SCIPsetPropPresol(), and SCIPsetPropResprop().
90  *
91  * @note if you want to set all callbacks with a single method call, consider using SCIPincludeProp() instead
92  */
95  SCIP* scip, /**< SCIP data structure */
96  SCIP_PROP** propptr, /**< reference to a propagator pointer, or NULL */
97  const char* name, /**< name of propagator */
98  const char* desc, /**< description of propagator */
99  int priority, /**< priority of the propagator (>= 0: before, < 0: after constraint handlers) */
100  int freq, /**< frequency for calling propagator */
101  SCIP_Bool delay, /**< should propagator be delayed, if other propagators found reductions? */
102  SCIP_PROPTIMING timingmask, /**< positions in the node solving loop where propagators should be executed */
103  SCIP_DECL_PROPEXEC ((*propexec)), /**< execution method of propagator */
104  SCIP_PROPDATA* propdata /**< propagator data */
105  );
106 
107 /** sets copy method of propagator */
110  SCIP* scip, /**< SCIP data structure */
111  SCIP_PROP* prop, /**< propagator */
112  SCIP_DECL_PROPCOPY ((*propcopy)) /**< copy method of propagator or NULL if you don't want to copy your plugin into sub-SCIPs */
113  );
114 
115 /** sets destructor method of propagator */
118  SCIP* scip, /**< SCIP data structure */
119  SCIP_PROP* prop, /**< propagator */
120  SCIP_DECL_PROPFREE ((*propfree)) /**< destructor of propagator */
121  );
122 
123 /** sets initialization method of propagator */
126  SCIP* scip, /**< SCIP data structure */
127  SCIP_PROP* prop, /**< propagator */
128  SCIP_DECL_PROPINIT ((*propinit)) /**< initialize propagator */
129  );
130 
131 /** sets deinitialization method of propagator */
134  SCIP* scip, /**< SCIP data structure */
135  SCIP_PROP* prop, /**< propagator */
136  SCIP_DECL_PROPEXIT ((*propexit)) /**< deinitialize propagator */
137  );
138 
139 /** sets solving process initialization method of propagator */
142  SCIP* scip, /**< SCIP data structure */
143  SCIP_PROP* prop, /**< propagator */
144  SCIP_DECL_PROPINITSOL((*propinitsol)) /**< solving process initialization method of propagator */
145  );
146 
147 /** sets solving process deinitialization method of propagator */
150  SCIP* scip, /**< SCIP data structure */
151  SCIP_PROP* prop, /**< propagator */
152  SCIP_DECL_PROPEXITSOL ((*propexitsol)) /**< solving process deinitialization method of propagator */
153  );
154 
155 /** sets preprocessing initialization method of propagator */
158  SCIP* scip, /**< SCIP data structure */
159  SCIP_PROP* prop, /**< propagator */
160  SCIP_DECL_PROPINITPRE((*propinitpre)) /**< preprocessing initialization method of propagator */
161  );
162 
163 /** sets preprocessing deinitialization method of propagator */
166  SCIP* scip, /**< SCIP data structure */
167  SCIP_PROP* prop, /**< propagator */
168  SCIP_DECL_PROPEXITPRE((*propexitpre)) /**< preprocessing deinitialization method of propagator */
169  );
170 
171 /** sets presolving method of propagator */
174  SCIP* scip, /**< SCIP data structure */
175  SCIP_PROP* prop, /**< propagator */
176  SCIP_DECL_PROPPRESOL((*proppresol)), /**< presolving method of propagator */
177  int presolpriority, /**< presolving priority of the propagator (>= 0: before, < 0: after constraint handlers) */
178  int presolmaxrounds, /**< maximal number of presolving rounds the propagator participates in (-1: no limit) */
179  SCIP_PRESOLTIMING presoltiming /**< timing mask of the propagator's presolving method */
180  );
181 
182 /** sets propagation conflict resolving callback of propagator */
185  SCIP* scip, /**< SCIP data structure */
186  SCIP_PROP* prop, /**< propagator */
187  SCIP_DECL_PROPRESPROP ((*propresprop)) /**< propagation conflict resolving callback */
188  );
189 
190 /** returns the propagator of the given name, or NULL if not existing */
193  SCIP* scip, /**< SCIP data structure */
194  const char* name /**< name of propagator */
195  );
196 
197 /** returns the array of currently available propagators */
200  SCIP* scip /**< SCIP data structure */
201  );
202 
203 /** returns the number of currently available propagators */
205 int SCIPgetNProps(
206  SCIP* scip /**< SCIP data structure */
207  );
208 
209 /** sets the priority of a propagator */
212  SCIP* scip, /**< SCIP data structure */
213  SCIP_PROP* prop, /**< propagator */
214  int priority /**< new priority of the propagator */
215  );
216 
217 /** sets the presolving priority of a propagator */
220  SCIP* scip, /**< SCIP data structure */
221  SCIP_PROP* prop, /**< propagator */
222  int presolpriority /**< new presol priority of the propagator */
223  );
224 
225 /** @} */
226 
227 #ifdef __cplusplus
228 }
229 #endif
230 
231 #endif
SCIP_EXPORT SCIP_RETCODE SCIPincludeProp(SCIP *scip, const char *name, const char *desc, int priority, int freq, SCIP_Bool delay, SCIP_PROPTIMING timingmask, int presolpriority, int presolmaxrounds, SCIP_PRESOLTIMING presoltiming, SCIP_DECL_PROPCOPY((*propcopy)), SCIP_DECL_PROPFREE((*propfree)), SCIP_DECL_PROPINIT((*propinit)), SCIP_DECL_PROPEXIT((*propexit)), SCIP_DECL_PROPINITPRE((*propinitpre)), SCIP_DECL_PROPEXITPRE((*propexitpre)), SCIP_DECL_PROPINITSOL((*propinitsol)), SCIP_DECL_PROPEXITSOL((*propexitsol)), SCIP_DECL_PROPPRESOL((*proppresol)), SCIP_DECL_PROPEXEC((*propexec)), SCIP_DECL_PROPRESPROP((*propresprop)), SCIP_PROPDATA *propdata)
Definition: scip_prop.c:53
SCIP_EXPORT SCIP_RETCODE SCIPsetPropInitpre(SCIP *scip, SCIP_PROP *prop, SCIP_DECL_PROPINITPRE((*propinitpre)))
Definition: scip_prop.c:238
timing definitions for SCIP
#define SCIP_EXPORT
Definition: def.h:100
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:54
#define SCIP_DECL_PROPEXITPRE(x)
Definition: type_prop.h:105
type definitions for return codes for SCIP methods
#define SCIP_DECL_PROPEXEC(x)
Definition: type_prop.h:208
SCIP_EXPORT SCIP_RETCODE SCIPsetPropPresolPriority(SCIP *scip, SCIP_PROP *prop, int presolpriority)
Definition: scip_prop.c:372
SCIP_EXPORT SCIP_RETCODE SCIPsetPropCopy(SCIP *scip, SCIP_PROP *prop, SCIP_DECL_PROPCOPY((*propcopy)))
Definition: scip_prop.c:142
type definitions for LP management
SCIP_EXPORT SCIP_RETCODE SCIPsetPropExitpre(SCIP *scip, SCIP_PROP *prop, SCIP_DECL_PROPEXITPRE((*propexitpre)))
Definition: scip_prop.c:254
type definitions for SCIP&#39;s main datastructure
#define SCIP_DECL_PROPEXITSOL(x)
Definition: type_prop.h:132
#define SCIP_DECL_PROPCOPY(x)
Definition: type_prop.h:52
SCIP_EXPORT SCIP_RETCODE SCIPsetPropFree(SCIP *scip, SCIP_PROP *prop, SCIP_DECL_PROPFREE((*propfree)))
Definition: scip_prop.c:158
SCIP_EXPORT SCIP_RETCODE SCIPsetPropExitsol(SCIP *scip, SCIP_PROP *prop, SCIP_DECL_PROPEXITSOL((*propexitsol)))
Definition: scip_prop.c:222
unsigned int SCIP_PRESOLTIMING
Definition: type_timing.h:52
#define SCIP_DECL_PROPINITPRE(x)
Definition: type_prop.h:90
type definitions for problem variables
#define SCIP_Bool
Definition: def.h:70
#define SCIP_DECL_PROPFREE(x)
Definition: type_prop.h:60
SCIP_EXPORT SCIP_PROP ** SCIPgetProps(SCIP *scip)
Definition: scip_prop.c:333
SCIP_EXPORT SCIP_PROP * SCIPfindProp(SCIP *scip, const char *name)
Definition: scip_prop.c:320
#define SCIP_DECL_PROPINITSOL(x)
Definition: type_prop.h:120
SCIP_EXPORT SCIP_RETCODE SCIPsetPropResprop(SCIP *scip, SCIP_PROP *prop, SCIP_DECL_PROPRESPROP((*propresprop)))
Definition: scip_prop.c:303
SCIP_EXPORT SCIP_RETCODE SCIPsetPropExit(SCIP *scip, SCIP_PROP *prop, SCIP_DECL_PROPEXIT((*propexit)))
Definition: scip_prop.c:190
SCIP_EXPORT SCIP_RETCODE SCIPsetPropInit(SCIP *scip, SCIP_PROP *prop, SCIP_DECL_PROPINIT((*propinit)))
Definition: scip_prop.c:174
type definitions for propagators
unsigned int SCIP_PROPTIMING
Definition: type_timing.h:66
SCIP_EXPORT SCIP_RETCODE SCIPsetPropPriority(SCIP *scip, SCIP_PROP *prop, int priority)
Definition: scip_prop.c:357
#define SCIP_DECL_PROPRESPROP(x)
Definition: type_prop.h:249
#define SCIP_DECL_PROPPRESOL(x)
Definition: type_prop.h:184
struct SCIP_PropData SCIP_PROPDATA
Definition: type_prop.h:43
result codes for SCIP callback methods
SCIP_EXPORT SCIP_RETCODE SCIPsetPropPresol(SCIP *scip, SCIP_PROP *prop, SCIP_DECL_PROPPRESOL((*proppresol)), int presolpriority, int presolmaxrounds, SCIP_PRESOLTIMING presoltiming)
Definition: scip_prop.c:270
#define SCIP_DECL_PROPEXIT(x)
Definition: type_prop.h:76
common defines and data types used in all packages of SCIP
SCIP_EXPORT SCIP_RETCODE SCIPincludePropBasic(SCIP *scip, SCIP_PROP **propptr, const char *name, const char *desc, int priority, int freq, SCIP_Bool delay, SCIP_PROPTIMING timingmask, SCIP_DECL_PROPEXEC((*propexec)), SCIP_PROPDATA *propdata)
Definition: scip_prop.c:105
SCIP_EXPORT SCIP_RETCODE SCIPsetPropInitsol(SCIP *scip, SCIP_PROP *prop, SCIP_DECL_PROPINITSOL((*propinitsol)))
Definition: scip_prop.c:206
SCIP_EXPORT int SCIPgetNProps(SCIP *scip)
Definition: scip_prop.c:346
#define SCIP_DECL_PROPINIT(x)
Definition: type_prop.h:68