Scippy

SCIP

Solving Constraint Integer Programs

pub_event.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-2022 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_event.h
17  * @ingroup PUBLICCOREAPI
18  * @brief public methods for managing events
19  * @author Tobias Achterberg
20  */
21 
22 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
23 
24 #ifndef __SCIP_PUB_EVENT_H__
25 #define __SCIP_PUB_EVENT_H__
26 
27 
28 #include "scip/def.h"
29 #include "scip/type_event.h"
30 #include "scip/type_lp.h"
31 #include "scip/type_sol.h"
32 #include "scip/type_tree.h"
33 #include "scip/type_var.h"
34 
35 /* In optimized mode, some function calls are overwritten by defines to reduce the number of function calls and
36  * speed up the algorithms. For this, we need to include struct_event.h.
37  */
38 #ifdef NDEBUG
39 #include "scip/struct_event.h"
40 #endif
41 
42 #ifdef __cplusplus
43 extern "C" {
44 #endif
45 
46 /*
47  * Event handler methods
48  */
49 
50 /**@addtogroup PublicEventHandlerMethods
51  *
52  * @{
53  */
54 
55 /** gets name of event handler */
56 SCIP_EXPORT
57 const char* SCIPeventhdlrGetName(
58  SCIP_EVENTHDLR* eventhdlr /**< event handler */
59  );
60 
61 /** gets user data of event handler */
62 SCIP_EXPORT
64  SCIP_EVENTHDLR* eventhdlr /**< event handler */
65  );
66 
67 /** sets user data of event handler; user has to free old data in advance! */
68 SCIP_EXPORT
70  SCIP_EVENTHDLR* eventhdlr, /**< event handler */
71  SCIP_EVENTHDLRDATA* eventhdlrdata /**< new event handler user data */
72  );
73 
74 /** is event handler initialized? */
75 SCIP_EXPORT
77  SCIP_EVENTHDLR* eventhdlr /**< event handler */
78  );
79 
80 /** gets time in seconds used in this event handler for setting up for next stages */
81 SCIP_EXPORT
83  SCIP_EVENTHDLR* eventhdlr /**< event handler */
84  );
85 
86 /** gets time in seconds used in this event handler */
87 SCIP_EXPORT
89  SCIP_EVENTHDLR* eventhdlr /**< event handler */
90  );
91 
92 /** @} */
93 
94 /*
95  * Event methods
96  */
97 
98 /**@addtogroup PublicEventMethods
99  *
100  * @{
101  */
102 
103 /** gets type of event */
104 SCIP_EXPORT
106  SCIP_EVENT* event /**< event */
107  );
108 
109 /** gets variable for a variable event (var added, var deleted, var fixed,
110  * objective value or domain change, domain hole added or removed) */
111 SCIP_EXPORT
113  SCIP_EVENT* event /**< event */
114  );
115 
116 /** gets old objective value for an objective value change event */
117 SCIP_EXPORT
119  SCIP_EVENT* event /**< event */
120  );
121 
122 /** gets new objective value for an objective value change event */
123 SCIP_EXPORT
125  SCIP_EVENT* event /**< event */
126  );
127 
128 /** gets old bound for a bound change event */
129 SCIP_EXPORT
131  SCIP_EVENT* event /**< event */
132  );
133 
134 /** gets new bound for a bound change event */
135 SCIP_EXPORT
137  SCIP_EVENT* event /**< event */
138  );
139 
140 /** gets old variable type for a variable type change event */
141 SCIP_EXPORT
143  SCIP_EVENT* event /**< event */
144  );
145 
146 /** gets new variable type for a variable type change event */
147 SCIP_EXPORT
149  SCIP_EVENT* event /**< event */
150  );
151 
152 /** gets node for a node or LP event */
153 SCIP_EXPORT
155  SCIP_EVENT* event /**< event */
156  );
157 
158 /** gets solution for a primal solution event */
159 SCIP_EXPORT
161  SCIP_EVENT* event /**< event */
162  );
163 
164 /** gets the left bound of open interval in the hole */
165 SCIP_EXPORT
167  SCIP_EVENT* event /**< event */
168  );
169 
170 /** gets the right bound of open interval in the hole */
171 SCIP_EXPORT
173  SCIP_EVENT* event /**< event */
174  );
175 
176 /** gets row for a row event */
177 SCIP_EXPORT
179  SCIP_EVENT* event /**< event */
180  );
181 
182 /** gets column for a row change coefficient event */
183 SCIP_EXPORT
185  SCIP_EVENT* event /**< event */
186  );
187 
188 /** gets old coefficient value for a row change coefficient event */
189 SCIP_EXPORT
191  SCIP_EVENT* event /**< event */
192  );
193 
194 /** gets new coefficient value for a row change coefficient event */
195 SCIP_EXPORT
197  SCIP_EVENT* event /**< event */
198  );
199 
200 /** gets old constant value for a row change constant event */
201 SCIP_EXPORT
203  SCIP_EVENT* event /**< event */
204  );
205 
206 /** gets new constant value for a row change constant event */
207 SCIP_EXPORT
209  SCIP_EVENT* event /**< event */
210  );
211 
212 /** gets side for a row change side event */
213 SCIP_EXPORT
215  SCIP_EVENT* event /**< event */
216  );
217 
218 /** gets old side value for a row change side event */
219 SCIP_EXPORT
221  SCIP_EVENT* event /**< event */
222  );
223 
224 /** gets new side value for a row change side event */
225 SCIP_EXPORT
227  SCIP_EVENT* event /**< event */
228  );
229 
230 #ifdef NDEBUG
231 
232 /* In optimized mode, the function calls are overwritten by defines to reduce the number of function calls and
233  * speed up the algorithms.
234  */
235 
236 #define SCIPeventGetType(event) ((event)->eventtype)
237 #define SCIPeventGetOldobj(event) ((event)->data.eventobjchg.oldobj)
238 #define SCIPeventGetNewobj(event) ((event)->data.eventobjchg.newobj)
239 #define SCIPeventGetOldbound(event) ((event)->data.eventbdchg.oldbound)
240 #define SCIPeventGetNewbound(event) ((event)->data.eventbdchg.newbound)
241 #define SCIPeventGetOldtype(event) ((event)->data.eventtypechg.oldtype)
242 #define SCIPeventGetNewtype(event) ((event)->data.eventtypechg.newtype)
243 #define SCIPeventGetNode(event) ((event)->data.node)
244 #define SCIPeventGetSol(event) ((event)->data.sol)
245 #define SCIPeventGetRowCol(event) ((event)->data.eventrowcoefchanged.col)
246 #define SCIPeventGetRowOldCoefVal(event) ((event)->data.eventrowcoefchanged.oldval)
247 #define SCIPeventGetRowNewCoefVal(event) ((event)->data.eventrowcoefchanged.newval)
248 #define SCIPeventGetRowOldConstVal(event) ((event)->data.eventrowconstchanged.oldval)
249 #define SCIPeventGetRowNewConstVal(event) ((event)->data.eventrowconstchanged.newval)
250 #define SCIPeventGetRowSide(event) ((event)->data.eventrowsidechanged.side)
251 #define SCIPeventGetRowOldSideVal(event) ((event)->data.eventrowsidechanged.oldval)
252 #define SCIPeventGetRowNewSideVal(event) ((event)->data.eventrowsidechanged.newval)
253 
254 #endif
255 
256 /** @} */
257 
258 #ifdef __cplusplus
259 }
260 #endif
261 
262 #endif
SCIP_Real SCIPeventGetRowNewSideVal(SCIP_EVENT *event)
Definition: event.c:1548
SCIP_SIDETYPE SCIPeventGetRowSide(SCIP_EVENT *event)
Definition: event.c:1514
SCIP_Real SCIPeventGetRowNewConstVal(SCIP_EVENT *event)
Definition: event.c:1497
SCIP_VARTYPE SCIPeventGetNewtype(SCIP_EVENT *event)
Definition: event.c:1274
struct SCIP_EventhdlrData SCIP_EVENTHDLRDATA
Definition: type_event.h:146
datastructures for managing events
const char * SCIPeventhdlrGetName(SCIP_EVENTHDLR *eventhdlr)
Definition: event.c:315
SCIP_ROW * SCIPeventGetRow(SCIP_EVENT *event)
Definition: event.c:1399
SCIP_Real SCIPeventGetRowOldSideVal(SCIP_EVENT *event)
Definition: event.c:1531
type definitions for LP management
void SCIPeventhdlrSetData(SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTHDLRDATA *eventhdlrdata)
Definition: event.c:335
SCIP_Real SCIPeventGetHoleLeft(SCIP_EVENT *event)
Definition: event.c:1365
SCIP_Real SCIPeventGetRowOldConstVal(SCIP_EVENT *event)
Definition: event.c:1480
SCIP_Real SCIPeventhdlrGetTime(SCIP_EVENTHDLR *eventhdlr)
Definition: event.c:457
SCIP_Real SCIPeventGetNewbound(SCIP_EVENT *event)
Definition: event.c:1233
SCIP_Real SCIPeventGetOldobj(SCIP_EVENT *event)
Definition: event.c:1175
SCIP_VARTYPE SCIPeventGetOldtype(SCIP_EVENT *event)
Definition: event.c:1257
SCIP_Bool SCIPeventhdlrIsInitialized(SCIP_EVENTHDLR *eventhdlr)
Definition: event.c:423
SCIP_NODE * SCIPeventGetNode(SCIP_EVENT *event)
Definition: event.c:1291
SCIP_Real SCIPeventhdlrGetSetupTime(SCIP_EVENTHDLR *eventhdlr)
Definition: event.c:445
SCIP_Real SCIPeventGetNewobj(SCIP_EVENT *event)
Definition: event.c:1192
type definitions for problem variables
SCIP_COL * SCIPeventGetRowCol(SCIP_EVENT *event)
Definition: event.c:1429
type definitions for managing events
SCIP_VAR * SCIPeventGetVar(SCIP_EVENT *event)
Definition: event.c:1044
SCIP_Real SCIPeventGetRowNewCoefVal(SCIP_EVENT *event)
Definition: event.c:1463
#define SCIP_Bool
Definition: def.h:84
SCIP_EVENTTYPE SCIPeventGetType(SCIP_EVENT *event)
Definition: event.c:1021
type definitions for branch and bound tree
type definitions for storing primal CIP solutions
SCIP_Real SCIPeventGetRowOldCoefVal(SCIP_EVENT *event)
Definition: event.c:1446
SCIP_Real SCIPeventGetOldbound(SCIP_EVENT *event)
Definition: event.c:1209
SCIP_Real SCIPeventGetHoleRight(SCIP_EVENT *event)
Definition: event.c:1382
#define SCIP_Real
Definition: def.h:177
enum SCIP_Vartype SCIP_VARTYPE
Definition: type_var.h:60
common defines and data types used in all packages of SCIP
SCIP_EVENTHDLRDATA * SCIPeventhdlrGetData(SCIP_EVENTHDLR *eventhdlr)
Definition: event.c:325
SCIP_SOL * SCIPeventGetSol(SCIP_EVENT *event)
Definition: event.c:1328
uint64_t SCIP_EVENTTYPE
Definition: type_event.h:142
enum SCIP_SideType SCIP_SIDETYPE
Definition: type_lp.h:58