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-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_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 */
57 const char* SCIPeventhdlrGetName(
58  SCIP_EVENTHDLR* eventhdlr /**< event handler */
59  );
60 
61 /** gets user data of event handler */
64  SCIP_EVENTHDLR* eventhdlr /**< event handler */
65  );
66 
67 /** sets user data of event handler; user has to free old data in advance! */
70  SCIP_EVENTHDLR* eventhdlr, /**< event handler */
71  SCIP_EVENTHDLRDATA* eventhdlrdata /**< new event handler user data */
72  );
73 
74 /** is event handler initialized? */
77  SCIP_EVENTHDLR* eventhdlr /**< event handler */
78  );
79 
80 /** gets time in seconds used in this event handler for setting up for next stages */
83  SCIP_EVENTHDLR* eventhdlr /**< event handler */
84  );
85 
86 /** gets time in seconds used in this event handler */
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 */
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) */
113  SCIP_EVENT* event /**< event */
114  );
115 
116 /** gets old objective value for an objective value change event */
119  SCIP_EVENT* event /**< event */
120  );
121 
122 /** gets new objective value for an objective value change event */
125  SCIP_EVENT* event /**< event */
126  );
127 
128 /** gets old bound for a bound change event */
131  SCIP_EVENT* event /**< event */
132  );
133 
134 /** gets new bound for a bound change event */
137  SCIP_EVENT* event /**< event */
138  );
139 
140 /** gets old variable type for a variable type change event */
143  SCIP_EVENT* event /**< event */
144  );
145 
146 /** gets new variable type for a variable type change event */
149  SCIP_EVENT* event /**< event */
150  );
151 
152 /** gets node for a node or LP event */
155  SCIP_EVENT* event /**< event */
156  );
157 
158 /** gets solution for a primal solution event */
161  SCIP_EVENT* event /**< event */
162  );
163 
164 /** gets the left bound of open interval in the hole */
167  SCIP_EVENT* event /**< event */
168  );
169 
170 /** gets the right bound of open interval in the hole */
173  SCIP_EVENT* event /**< event */
174  );
175 
176 /** gets row for a row event */
179  SCIP_EVENT* event /**< event */
180  );
181 
182 /** gets column for a row change coefficient event */
185  SCIP_EVENT* event /**< event */
186  );
187 
188 /** gets old coefficient value for a row change coefficient event */
191  SCIP_EVENT* event /**< event */
192  );
193 
194 /** gets new coefficient value for a row change coefficient event */
197  SCIP_EVENT* event /**< event */
198  );
199 
200 /** gets old constant value for a row change constant event */
203  SCIP_EVENT* event /**< event */
204  );
205 
206 /** gets new constant value for a row change constant event */
209  SCIP_EVENT* event /**< event */
210  );
211 
212 /** gets side for a row change side event */
215  SCIP_EVENT* event /**< event */
216  );
217 
218 /** gets old side value for a row change side event */
221  SCIP_EVENT* event /**< event */
222  );
223 
224 /** gets new side value for a row change side event */
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_EXPORT void SCIPeventhdlrSetData(SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTHDLRDATA *eventhdlrdata)
Definition: event.c:335
SCIP_EXPORT SCIP_Real SCIPeventhdlrGetSetupTime(SCIP_EVENTHDLR *eventhdlr)
Definition: event.c:445
SCIP_EXPORT SCIP_NODE * SCIPeventGetNode(SCIP_EVENT *event)
Definition: event.c:1291
#define SCIP_EXPORT
Definition: def.h:100
struct SCIP_EventhdlrData SCIP_EVENTHDLRDATA
Definition: type_event.h:146
SCIP_EXPORT const char * SCIPeventhdlrGetName(SCIP_EVENTHDLR *eventhdlr)
Definition: event.c:315
datastructures for managing events
SCIP_EXPORT SCIP_Real SCIPeventGetRowNewCoefVal(SCIP_EVENT *event)
Definition: event.c:1463
SCIP_EXPORT SCIP_COL * SCIPeventGetRowCol(SCIP_EVENT *event)
Definition: event.c:1429
SCIP_EXPORT SCIP_SIDETYPE SCIPeventGetRowSide(SCIP_EVENT *event)
Definition: event.c:1514
SCIP_EXPORT SCIP_Real SCIPeventGetRowOldSideVal(SCIP_EVENT *event)
Definition: event.c:1531
type definitions for LP management
SCIP_EXPORT SCIP_EVENTHDLRDATA * SCIPeventhdlrGetData(SCIP_EVENTHDLR *eventhdlr)
Definition: event.c:325
SCIP_EXPORT SCIP_Real SCIPeventGetHoleLeft(SCIP_EVENT *event)
Definition: event.c:1365
SCIP_EXPORT SCIP_Real SCIPeventGetRowOldConstVal(SCIP_EVENT *event)
Definition: event.c:1480
SCIP_EXPORT SCIP_EVENTTYPE SCIPeventGetType(SCIP_EVENT *event)
Definition: event.c:1021
SCIP_EXPORT SCIP_Real SCIPeventGetNewbound(SCIP_EVENT *event)
Definition: event.c:1233
type definitions for problem variables
SCIP_EXPORT SCIP_Real SCIPeventGetOldobj(SCIP_EVENT *event)
Definition: event.c:1175
SCIP_EXPORT SCIP_Real SCIPeventGetRowOldCoefVal(SCIP_EVENT *event)
Definition: event.c:1446
type definitions for managing events
SCIP_EXPORT SCIP_VARTYPE SCIPeventGetOldtype(SCIP_EVENT *event)
Definition: event.c:1257
SCIP_EXPORT SCIP_Real SCIPeventGetOldbound(SCIP_EVENT *event)
Definition: event.c:1209
#define SCIP_Bool
Definition: def.h:70
type definitions for branch and bound tree
SCIP_EXPORT SCIP_Real SCIPeventGetRowNewConstVal(SCIP_EVENT *event)
Definition: event.c:1497
SCIP_EXPORT SCIP_ROW * SCIPeventGetRow(SCIP_EVENT *event)
Definition: event.c:1399
type definitions for storing primal CIP solutions
SCIP_EXPORT SCIP_Real SCIPeventGetRowNewSideVal(SCIP_EVENT *event)
Definition: event.c:1548
SCIP_EXPORT SCIP_Real SCIPeventGetNewobj(SCIP_EVENT *event)
Definition: event.c:1192
#define SCIP_Real
Definition: def.h:163
SCIP_EXPORT SCIP_VARTYPE SCIPeventGetNewtype(SCIP_EVENT *event)
Definition: event.c:1274
SCIP_EXPORT SCIP_VAR * SCIPeventGetVar(SCIP_EVENT *event)
Definition: event.c:1044
enum SCIP_Vartype SCIP_VARTYPE
Definition: type_var.h:60
common defines and data types used in all packages of SCIP
SCIP_EXPORT SCIP_Real SCIPeventhdlrGetTime(SCIP_EVENTHDLR *eventhdlr)
Definition: event.c:457
SCIP_EXPORT SCIP_Real SCIPeventGetHoleRight(SCIP_EVENT *event)
Definition: event.c:1382
SCIP_EXPORT SCIP_SOL * SCIPeventGetSol(SCIP_EVENT *event)
Definition: event.c:1328
SCIP_EXPORT SCIP_Bool SCIPeventhdlrIsInitialized(SCIP_EVENTHDLR *eventhdlr)
Definition: event.c:423
uint64_t SCIP_EVENTTYPE
Definition: type_event.h:142
enum SCIP_SideType SCIP_SIDETYPE
Definition: type_lp.h:58