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   pub_prop.h
17  * @ingroup PUBLICCOREAPI
18  * @brief  public methods for propagators
19  * @author Tobias Achterberg
20  */
21 
22 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
23 
24 #ifndef __SCIP_PUB_PROP_H__
25 #define __SCIP_PUB_PROP_H__
26 
27 
28 #include "scip/def.h"
29 #include "scip/type_misc.h"
30 #include "scip/type_prop.h"
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
36 /**@addtogroup PublicPropagatorMethods
37  *
38  * @{
39  */
40 
41 /** compares two propagators w. r. to their priority */
42 SCIP_EXPORT
43 SCIP_DECL_SORTPTRCOMP(SCIPpropComp);
44 
45 /** compares two propagators w. r. to their presolving priority */
46 SCIP_EXPORT
47 SCIP_DECL_SORTPTRCOMP(SCIPpropCompPresol);
48 
49 /** comparison method for sorting propagators w.r.t. to their name */
50 SCIP_EXPORT
51 SCIP_DECL_SORTPTRCOMP(SCIPpropCompName);
52 
53 /** gets user data of propagator */
54 SCIP_EXPORT
55 SCIP_PROPDATA* SCIPpropGetData(
56    SCIP_PROP*            prop                /**< propagator */
57    );
58 
59 /** sets user data of propagator; user has to free old data in advance! */
60 SCIP_EXPORT
61 void SCIPpropSetData(
62    SCIP_PROP*            prop,               /**< propagator */
63    SCIP_PROPDATA*        propdata            /**< new propagator user data */
64    );
65 
66 /** gets name of propagator */
67 SCIP_EXPORT
68 const char* SCIPpropGetName(
69    SCIP_PROP*            prop                /**< propagator */
70    );
71 
72 /** gets description of propagator */
73 SCIP_EXPORT
74 const char* SCIPpropGetDesc(
75    SCIP_PROP*            prop                /**< propagator */
76    );
77 
78 /** gets priority of propagator */
79 SCIP_EXPORT
80 int SCIPpropGetPriority(
81    SCIP_PROP*            prop                /**< propagator */
82    );
83 
84 /** gets presolving priority of propagator */
85 SCIP_EXPORT
86 int SCIPpropGetPresolPriority(
87    SCIP_PROP*            prop                /**< propagator */
88    );
89 
90 /** gets frequency of propagator */
91 SCIP_EXPORT
92 int SCIPpropGetFreq(
93    SCIP_PROP*            prop                /**< propagator */
94    );
95 
96 /** gets time in seconds used for setting up this propagator for new stages */
97 SCIP_EXPORT
98 SCIP_Real SCIPpropGetSetupTime(
99    SCIP_PROP*            prop                /**< propagator */
100    );
101 
102 /** sets frequency of propagator */
103 SCIP_EXPORT
104 void SCIPpropSetFreq(
105    SCIP_PROP*            prop,               /**< propagator */
106    int                   freq                /**< new frequency of propagator */
107    );
108 
109 /** gets time in seconds used in this propagator */
110 SCIP_EXPORT
111 SCIP_Real SCIPpropGetTime(
112    SCIP_PROP*            prop                /**< propagator */
113    );
114 
115 /** gets time in seconds used in this propagator during strong branching */
116 SCIP_EXPORT
117 SCIP_Real SCIPpropGetStrongBranchPropTime(
118    SCIP_PROP*            prop                /**< propagator */
119    );
120 
121 /** gets time in seconds used in this propagator for resolve propagation */
122 SCIP_EXPORT
123 SCIP_Real SCIPpropGetRespropTime(
124    SCIP_PROP*            prop                /**< propagator */
125    );
126 
127 /** gets time in seconds used in this propagator for presolving */
128 SCIP_EXPORT
129 SCIP_Real SCIPpropGetPresolTime(
130    SCIP_PROP*            prop                /**< propagator */
131    );
132 
133 /** gets the total number of times, the propagator was called */
134 SCIP_EXPORT
135 SCIP_Longint SCIPpropGetNCalls(
136    SCIP_PROP*            prop                /**< propagator */
137    );
138 
139 /** gets the total number of times, the propagator was called for resolving a propagation */
140 SCIP_EXPORT
141 SCIP_Longint SCIPpropGetNRespropCalls(
142    SCIP_PROP*            prop                /**< propagator */
143    );
144 
145 /** gets total number of times, this propagator detected a cutoff */
146 SCIP_EXPORT
147 SCIP_Longint SCIPpropGetNCutoffs(
148    SCIP_PROP*            prop                /**< propagator */
149    );
150 
151 /** gets total number of domain reductions found by this propagator */
152 SCIP_EXPORT
153 SCIP_Longint SCIPpropGetNDomredsFound(
154    SCIP_PROP*            prop                /**< propagator */
155    );
156 
157 /** should propagator be delayed, if other propagators found reductions? */
158 SCIP_EXPORT
159 SCIP_Bool SCIPpropIsDelayed(
160    SCIP_PROP*            prop                /**< propagator */
161    );
162 
163 /** was propagator delayed at the last call? */
164 SCIP_EXPORT
165 SCIP_Bool SCIPpropWasDelayed(
166    SCIP_PROP*            prop                /**< propagator */
167    );
168 
169 /** is propagator initialized? */
170 SCIP_EXPORT
171 SCIP_Bool SCIPpropIsInitialized(
172    SCIP_PROP*            prop                /**< propagator */
173    );
174 
175 /** gets number of variables fixed during presolving of propagator */
176 SCIP_EXPORT
177 int SCIPpropGetNFixedVars(
178    SCIP_PROP*            prop                /**< propagator */
179    );
180 
181 /** gets number of variables aggregated during presolving of propagator  */
182 SCIP_EXPORT
183 int SCIPpropGetNAggrVars(
184    SCIP_PROP*            prop                /**< propagator */
185    );
186 
187 /** gets number of variable types changed during presolving of propagator  */
188 SCIP_EXPORT
189 int SCIPpropGetNChgVarTypes(
190    SCIP_PROP*            prop                /**< propagator */
191    );
192 
193 /** gets number of bounds changed during presolving of propagator  */
194 SCIP_EXPORT
195 int SCIPpropGetNChgBds(
196    SCIP_PROP*            prop                /**< propagator */
197    );
198 
199 /** gets number of holes added to domains of variables during presolving of propagator  */
200 SCIP_EXPORT
201 int SCIPpropGetNAddHoles(
202    SCIP_PROP*            prop                /**< propagator */
203    );
204 
205 /** gets number of constraints deleted during presolving of propagator */
206 SCIP_EXPORT
207 int SCIPpropGetNDelConss(
208    SCIP_PROP*            prop                /**< propagator */
209    );
210 
211 /** gets number of constraints added during presolving of propagator */
212 SCIP_EXPORT
213 int SCIPpropGetNAddConss(
214    SCIP_PROP*            prop                /**< propagator */
215    );
216 
217 /** gets number of constraints upgraded during presolving of propagator  */
218 SCIP_EXPORT
219 int SCIPpropGetNUpgdConss(
220    SCIP_PROP*            prop                /**< propagator */
221    );
222 
223 /** gets number of coefficients changed during presolving of propagator */
224 SCIP_EXPORT
225 int SCIPpropGetNChgCoefs(
226    SCIP_PROP*            prop                /**< propagator */
227    );
228 
229 /** gets number of constraint sides changed during presolving of propagator */
230 SCIP_EXPORT
231 int SCIPpropGetNChgSides(
232    SCIP_PROP*            prop                /**< propagator */
233    );
234 
235 /** gets number of times the propagator was called in presolving and tried to find reductions */
236 SCIP_EXPORT
237 int SCIPpropGetNPresolCalls(
238    SCIP_PROP*            prop                /**< propagator */
239    );
240 
241 /** returns the timing mask of the propagator */
242 SCIP_EXPORT
243 SCIP_PROPTIMING SCIPpropGetTimingmask(
244    SCIP_PROP*            prop                /**< propagator */
245    );
246 
247 /** does the propagator perform presolving? */
248 SCIP_EXPORT
249 SCIP_Bool SCIPpropDoesPresolve(
250    SCIP_PROP*            prop                /**< propagator */
251    );
252 
253 /** returns the timing mask of the presolving method of the propagator */
254 SCIP_EXPORT
255 SCIP_PRESOLTIMING SCIPpropGetPresolTiming(
256    SCIP_PROP*            prop                /**< propagator */
257    );
258 
259 /** sets the timing mask of the presolving method of the propagator */
260 SCIP_EXPORT
261 void SCIPpropSetPresolTiming(
262    SCIP_PROP*            prop,               /**< propagator */
263    SCIP_PRESOLTIMING     presoltiming        /** timing mask to be set */
264    );
265 
266 /** @} */
267 
268 #ifdef __cplusplus
269 }
270 #endif
271 
272 #endif
273