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-2018 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 #ifdef __cplusplus
36 extern "C" {
37 #endif
38 
39 /*
40  * Event handler methods
41  */
42 
43 /**@addtogroup PublicEventHandlerMethods
44  *
45  * @{
46  */
47 
48 /** gets name of event handler */
49 extern
50 const char* SCIPeventhdlrGetName(
51  SCIP_EVENTHDLR* eventhdlr /**< event handler */
52  );
53 
54 /** gets user data of event handler */
55 extern
57  SCIP_EVENTHDLR* eventhdlr /**< event handler */
58  );
59 
60 /** sets user data of event handler; user has to free old data in advance! */
61 extern
63  SCIP_EVENTHDLR* eventhdlr, /**< event handler */
64  SCIP_EVENTHDLRDATA* eventhdlrdata /**< new event handler user data */
65  );
66 
67 /** is event handler initialized? */
68 extern
70  SCIP_EVENTHDLR* eventhdlr /**< event handler */
71  );
72 
73 /** gets time in seconds used in this event handler for setting up for next stages */
74 extern
76  SCIP_EVENTHDLR* eventhdlr /**< event handler */
77  );
78 
79 /** gets time in seconds used in this event handler */
80 extern
82  SCIP_EVENTHDLR* eventhdlr /**< event handler */
83  );
84 
85 /* @} */
86 
87 /*
88  * Event methods
89  */
90 
91 /**@addtogroup PublicEventMethods
92  *
93  * @{
94  */
95 
96 /** gets type of event */
97 extern
99  SCIP_EVENT* event /**< event */
100  );
101 
102 /** gets variable for a variable event (var added, var deleted, var fixed,
103  * objective value or domain change, domain hole added or removed) */
104 extern
106  SCIP_EVENT* event /**< event */
107  );
108 
109 /** gets old objective value for an objective value change event */
110 extern
112  SCIP_EVENT* event /**< event */
113  );
114 
115 /** gets new objective value for an objective value change event */
116 extern
118  SCIP_EVENT* event /**< event */
119  );
120 
121 /** gets old bound for a bound change event */
122 extern
124  SCIP_EVENT* event /**< event */
125  );
126 
127 /** gets new bound for a bound change event */
128 extern
130  SCIP_EVENT* event /**< event */
131  );
132 
133 /** gets node for a node or LP event */
134 extern
136  SCIP_EVENT* event /**< event */
137  );
138 
139 /** gets solution for a primal solution event */
140 extern
142  SCIP_EVENT* event /**< event */
143  );
144 
145 /** gets the left bound of open interval in the hole */
146 extern
148  SCIP_EVENT* event /**< event */
149  );
150 
151 /** gets the right bound of open interval in the hole */
152 extern
154  SCIP_EVENT* event /**< event */
155  );
156 
157 /** gets row for a row event */
158 extern
160  SCIP_EVENT* event /**< event */
161  );
162 
163 /** gets column for a row change coefficient event */
164 extern
166  SCIP_EVENT* event /**< event */
167  );
168 
169 /** gets old coefficient value for a row change coefficient event */
170 extern
172  SCIP_EVENT* event /**< event */
173  );
174 
175 /** gets new coefficient value for a row change coefficient event */
176 extern
178  SCIP_EVENT* event /**< event */
179  );
180 
181 /** gets old constant value for a row change constant event */
182 extern
184  SCIP_EVENT* event /**< event */
185  );
186 
187 /** gets new constant value for a row change constant event */
188 extern
190  SCIP_EVENT* event /**< event */
191  );
192 
193 /** gets side for a row change side event */
194 extern
196  SCIP_EVENT* event /**< event */
197  );
198 
199 /** gets old side value for a row change side event */
200 extern
202  SCIP_EVENT* event /**< event */
203  );
204 
205 /** gets new side value for a row change side event */
206 extern
208  SCIP_EVENT* event /**< event */
209  );
210 
211 #ifdef NDEBUG
212 
213 /* In optimized mode, the function calls are overwritten by defines to reduce the number of function calls and
214  * speed up the algorithms.
215  */
216 
217 #define SCIPeventGetType(event) ((event)->eventtype)
218 #define SCIPeventGetOldobj(event) ((event)->data.eventobjchg.oldobj)
219 #define SCIPeventGetNewobj(event) ((event)->data.eventobjchg.newobj)
220 #define SCIPeventGetOldbound(event) ((event)->data.eventbdchg.oldbound)
221 #define SCIPeventGetNewbound(event) ((event)->data.eventbdchg.newbound)
222 #define SCIPeventGetNode(event) ((event)->data.node)
223 #define SCIPeventGetSol(event) ((event)->data.sol)
224 #define SCIPeventGetRowCol(event) ((event)->data.eventrowcoefchanged.col)
225 #define SCIPeventGetRowOldCoefVal(event) ((event)->data.eventrowcoefchanged.oldval)
226 #define SCIPeventGetRowNewCoefVal(event) ((event)->data.eventrowcoefchanged.newval)
227 #define SCIPeventGetRowOldConstVal(event) ((event)->data.eventrowconstchanged.oldval)
228 #define SCIPeventGetRowNewConstVal(event) ((event)->data.eventrowconstchanged.newval)
229 #define SCIPeventGetRowSide(event) ((event)->data.eventrowsidechanged.side)
230 #define SCIPeventGetRowOldSideVal(event) ((event)->data.eventrowsidechanged.oldval)
231 #define SCIPeventGetRowNewSideVal(event) ((event)->data.eventrowsidechanged.newval)
232 
233 #endif
234 
235 /* @} */
236 
237 #ifdef __cplusplus
238 }
239 #endif
240 
241 #endif
SCIP_Real SCIPeventGetRowNewSideVal(SCIP_EVENT *event)
Definition: event.c:1479
SCIP_SIDETYPE SCIPeventGetRowSide(SCIP_EVENT *event)
Definition: event.c:1445
SCIP_Real SCIPeventGetRowNewConstVal(SCIP_EVENT *event)
Definition: event.c:1428
struct SCIP_EventhdlrData SCIP_EVENTHDLRDATA
Definition: type_event.h:138
const char * SCIPeventhdlrGetName(SCIP_EVENTHDLR *eventhdlr)
Definition: event.c:314
SCIP_ROW * SCIPeventGetRow(SCIP_EVENT *event)
Definition: event.c:1330
SCIP_Real SCIPeventGetRowOldSideVal(SCIP_EVENT *event)
Definition: event.c:1462
type definitions for LP management
void SCIPeventhdlrSetData(SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTHDLRDATA *eventhdlrdata)
Definition: event.c:334
SCIP_Real SCIPeventGetHoleLeft(SCIP_EVENT *event)
Definition: event.c:1296
SCIP_Real SCIPeventGetRowOldConstVal(SCIP_EVENT *event)
Definition: event.c:1411
SCIP_Real SCIPeventhdlrGetTime(SCIP_EVENTHDLR *eventhdlr)
Definition: event.c:456
SCIP_Real SCIPeventGetNewbound(SCIP_EVENT *event)
Definition: event.c:1198
SCIP_Real SCIPeventGetOldobj(SCIP_EVENT *event)
Definition: event.c:1140
SCIP_Bool SCIPeventhdlrIsInitialized(SCIP_EVENTHDLR *eventhdlr)
Definition: event.c:422
SCIP_NODE * SCIPeventGetNode(SCIP_EVENT *event)
Definition: event.c:1222
SCIP_Real SCIPeventhdlrGetSetupTime(SCIP_EVENTHDLR *eventhdlr)
Definition: event.c:444
SCIP_Real SCIPeventGetNewobj(SCIP_EVENT *event)
Definition: event.c:1157
type definitions for problem variables
SCIP_COL * SCIPeventGetRowCol(SCIP_EVENT *event)
Definition: event.c:1360
type definitions for managing events
SCIP_VAR * SCIPeventGetVar(SCIP_EVENT *event)
Definition: event.c:1018
SCIP_Real SCIPeventGetRowNewCoefVal(SCIP_EVENT *event)
Definition: event.c:1394
#define SCIP_Bool
Definition: def.h:62
SCIP_EVENTTYPE SCIPeventGetType(SCIP_EVENT *event)
Definition: event.c:995
type definitions for branch and bound tree
type definitions for storing primal CIP solutions
SCIP_Real SCIPeventGetRowOldCoefVal(SCIP_EVENT *event)
Definition: event.c:1377
SCIP_Real SCIPeventGetOldbound(SCIP_EVENT *event)
Definition: event.c:1174
SCIP_Real SCIPeventGetHoleRight(SCIP_EVENT *event)
Definition: event.c:1313
#define SCIP_Real
Definition: def.h:150
common defines and data types used in all packages of SCIP
SCIP_EVENTHDLRDATA * SCIPeventhdlrGetData(SCIP_EVENTHDLR *eventhdlr)
Definition: event.c:324
SCIP_SOL * SCIPeventGetSol(SCIP_EVENT *event)
Definition: event.c:1259
uint64_t SCIP_EVENTTYPE
Definition: type_event.h:134
enum SCIP_SideType SCIP_SIDETYPE
Definition: type_lp.h:58