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-2019 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 scip.zib.de. */
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 node for a node or LP event */
143  SCIP_EVENT* event /**< event */
144  );
145 
146 /** gets solution for a primal solution event */
149  SCIP_EVENT* event /**< event */
150  );
151 
152 /** gets the left bound of open interval in the hole */
155  SCIP_EVENT* event /**< event */
156  );
157 
158 /** gets the right bound of open interval in the hole */
161  SCIP_EVENT* event /**< event */
162  );
163 
164 /** gets row for a row event */
167  SCIP_EVENT* event /**< event */
168  );
169 
170 /** gets column for a row change coefficient event */
173  SCIP_EVENT* event /**< event */
174  );
175 
176 /** gets old coefficient value for a row change coefficient event */
179  SCIP_EVENT* event /**< event */
180  );
181 
182 /** gets new coefficient value for a row change coefficient event */
185  SCIP_EVENT* event /**< event */
186  );
187 
188 /** gets old constant value for a row change constant event */
191  SCIP_EVENT* event /**< event */
192  );
193 
194 /** gets new constant value for a row change constant event */
197  SCIP_EVENT* event /**< event */
198  );
199 
200 /** gets side for a row change side event */
203  SCIP_EVENT* event /**< event */
204  );
205 
206 /** gets old side value for a row change side event */
209  SCIP_EVENT* event /**< event */
210  );
211 
212 /** gets new side value for a row change side event */
215  SCIP_EVENT* event /**< event */
216  );
217 
218 #ifdef NDEBUG
219 
220 /* In optimized mode, the function calls are overwritten by defines to reduce the number of function calls and
221  * speed up the algorithms.
222  */
223 
224 #define SCIPeventGetType(event) ((event)->eventtype)
225 #define SCIPeventGetOldobj(event) ((event)->data.eventobjchg.oldobj)
226 #define SCIPeventGetNewobj(event) ((event)->data.eventobjchg.newobj)
227 #define SCIPeventGetOldbound(event) ((event)->data.eventbdchg.oldbound)
228 #define SCIPeventGetNewbound(event) ((event)->data.eventbdchg.newbound)
229 #define SCIPeventGetNode(event) ((event)->data.node)
230 #define SCIPeventGetSol(event) ((event)->data.sol)
231 #define SCIPeventGetRowCol(event) ((event)->data.eventrowcoefchanged.col)
232 #define SCIPeventGetRowOldCoefVal(event) ((event)->data.eventrowcoefchanged.oldval)
233 #define SCIPeventGetRowNewCoefVal(event) ((event)->data.eventrowcoefchanged.newval)
234 #define SCIPeventGetRowOldConstVal(event) ((event)->data.eventrowconstchanged.oldval)
235 #define SCIPeventGetRowNewConstVal(event) ((event)->data.eventrowconstchanged.newval)
236 #define SCIPeventGetRowSide(event) ((event)->data.eventrowsidechanged.side)
237 #define SCIPeventGetRowOldSideVal(event) ((event)->data.eventrowsidechanged.oldval)
238 #define SCIPeventGetRowNewSideVal(event) ((event)->data.eventrowsidechanged.newval)
239 
240 #endif
241 
242 /* @} */
243 
244 #ifdef __cplusplus
245 }
246 #endif
247 
248 #endif
SCIP_EXPORT void SCIPeventhdlrSetData(SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTHDLRDATA *eventhdlrdata)
Definition: event.c:334
SCIP_EXPORT SCIP_Real SCIPeventhdlrGetSetupTime(SCIP_EVENTHDLR *eventhdlr)
Definition: event.c:444
SCIP_EXPORT SCIP_NODE * SCIPeventGetNode(SCIP_EVENT *event)
Definition: event.c:1222
#define SCIP_EXPORT
Definition: def.h:98
struct SCIP_EventhdlrData SCIP_EVENTHDLRDATA
Definition: type_event.h:138
SCIP_EXPORT const char * SCIPeventhdlrGetName(SCIP_EVENTHDLR *eventhdlr)
Definition: event.c:314
datastructures for managing events
SCIP_EXPORT SCIP_Real SCIPeventGetRowNewCoefVal(SCIP_EVENT *event)
Definition: event.c:1394
SCIP_EXPORT SCIP_COL * SCIPeventGetRowCol(SCIP_EVENT *event)
Definition: event.c:1360
SCIP_EXPORT SCIP_SIDETYPE SCIPeventGetRowSide(SCIP_EVENT *event)
Definition: event.c:1445
SCIP_EXPORT SCIP_Real SCIPeventGetRowOldSideVal(SCIP_EVENT *event)
Definition: event.c:1462
type definitions for LP management
SCIP_EXPORT SCIP_EVENTHDLRDATA * SCIPeventhdlrGetData(SCIP_EVENTHDLR *eventhdlr)
Definition: event.c:324
SCIP_EXPORT SCIP_Real SCIPeventGetHoleLeft(SCIP_EVENT *event)
Definition: event.c:1296
SCIP_EXPORT SCIP_Real SCIPeventGetRowOldConstVal(SCIP_EVENT *event)
Definition: event.c:1411
SCIP_EXPORT SCIP_EVENTTYPE SCIPeventGetType(SCIP_EVENT *event)
Definition: event.c:995
SCIP_EXPORT SCIP_Real SCIPeventGetNewbound(SCIP_EVENT *event)
Definition: event.c:1198
type definitions for problem variables
SCIP_EXPORT SCIP_Real SCIPeventGetOldobj(SCIP_EVENT *event)
Definition: event.c:1140
SCIP_EXPORT SCIP_Real SCIPeventGetRowOldCoefVal(SCIP_EVENT *event)
Definition: event.c:1377
type definitions for managing events
SCIP_EXPORT SCIP_Real SCIPeventGetOldbound(SCIP_EVENT *event)
Definition: event.c:1174
#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:1428
SCIP_EXPORT SCIP_ROW * SCIPeventGetRow(SCIP_EVENT *event)
Definition: event.c:1330
type definitions for storing primal CIP solutions
SCIP_EXPORT SCIP_Real SCIPeventGetRowNewSideVal(SCIP_EVENT *event)
Definition: event.c:1479
SCIP_EXPORT SCIP_Real SCIPeventGetNewobj(SCIP_EVENT *event)
Definition: event.c:1157
#define SCIP_Real
Definition: def.h:164
SCIP_EXPORT SCIP_VAR * SCIPeventGetVar(SCIP_EVENT *event)
Definition: event.c:1018
common defines and data types used in all packages of SCIP
SCIP_EXPORT SCIP_Real SCIPeventhdlrGetTime(SCIP_EVENTHDLR *eventhdlr)
Definition: event.c:456
SCIP_EXPORT SCIP_Real SCIPeventGetHoleRight(SCIP_EVENT *event)
Definition: event.c:1313
SCIP_EXPORT SCIP_SOL * SCIPeventGetSol(SCIP_EVENT *event)
Definition: event.c:1259
SCIP_EXPORT SCIP_Bool SCIPeventhdlrIsInitialized(SCIP_EVENTHDLR *eventhdlr)
Definition: event.c:422
uint64_t SCIP_EVENTTYPE
Definition: type_event.h:134
enum SCIP_SideType SCIP_SIDETYPE
Definition: type_lp.h:58