Scippy

SCIP

Solving Constraint Integer Programs

scip_event.c
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 scip_event.c
17  * @brief public methods for event handler plugins and event handlers
18  * @author Tobias Achterberg
19  * @author Timo Berthold
20  * @author Gerald Gamrath
21  * @author Robert Lion Gottwald
22  * @author Stefan Heinz
23  * @author Gregor Hendel
24  * @author Thorsten Koch
25  * @author Alexander Martin
26  * @author Marc Pfetsch
27  * @author Michael Winkler
28  * @author Kati Wolter
29  *
30  * @todo check all SCIP_STAGE_* switches, and include the new stages TRANSFORMED and INITSOLVE
31  */
32 
33 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
34 
35 #include "scip/debug.h"
36 #include "scip/event.h"
37 #include "scip/lp.h"
38 #include "scip/pub_message.h"
39 #include "scip/pub_var.h"
40 #include "scip/scip_event.h"
41 #include "scip/set.h"
42 #include "scip/struct_mem.h"
43 #include "scip/struct_scip.h"
44 #include "scip/struct_set.h"
45 #include "scip/var.h"
46 
47 /** creates an event handler and includes it in SCIP
48  *
49  * @note method has all event handler callbacks as arguments and is thus changed every time a new
50  * callback is added in future releases; consider using SCIPincludeEventhdlrBasic() and setter functions
51  * if you seek for a method which is less likely to change in future releases
52  */
54  SCIP* scip, /**< SCIP data structure */
55  const char* name, /**< name of event handler */
56  const char* desc, /**< description of event handler */
57  SCIP_DECL_EVENTCOPY ((*eventcopy)), /**< copy method of event handler or NULL if you don't want to copy your plugin into sub-SCIPs */
58  SCIP_DECL_EVENTFREE ((*eventfree)), /**< destructor of event handler */
59  SCIP_DECL_EVENTINIT ((*eventinit)), /**< initialize event handler */
60  SCIP_DECL_EVENTEXIT ((*eventexit)), /**< deinitialize event handler */
61  SCIP_DECL_EVENTINITSOL((*eventinitsol)), /**< solving process initialization method of event handler */
62  SCIP_DECL_EVENTEXITSOL((*eventexitsol)), /**< solving process deinitialization method of event handler */
63  SCIP_DECL_EVENTDELETE ((*eventdelete)), /**< free specific event data */
64  SCIP_DECL_EVENTEXEC ((*eventexec)), /**< execute event handler */
65  SCIP_EVENTHDLRDATA* eventhdlrdata /**< event handler data */
66  )
67 {
68  SCIP_EVENTHDLR* eventhdlr;
69 
70  SCIP_CALL( SCIPcheckStage(scip, "SCIPincludeEventhdlr", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
71 
72  /* check whether event handler is already present */
73  if( SCIPfindEventhdlr(scip, name) != NULL )
74  {
75  SCIPerrorMessage("event handler <%s> already included.\n", name);
76  return SCIP_INVALIDDATA;
77  }
78 
79  SCIP_CALL( SCIPeventhdlrCreate(&eventhdlr, scip->set, name, desc,
80  eventcopy, eventfree, eventinit, eventexit, eventinitsol, eventexitsol, eventdelete, eventexec,
81  eventhdlrdata) );
82  SCIP_CALL( SCIPsetIncludeEventhdlr(scip->set, eventhdlr) );
83 
84  return SCIP_OKAY;
85 }
86 
87 /** creates an event handler and includes it in SCIP with all its non-fundamental callbacks set
88  * to NULL; if needed, non-fundamental callbacks can be set afterwards via setter functions
89  * SCIPsetEventhdlrCopy(), SCIPsetEventhdlrFree(), SCIPsetEventhdlrInit(), SCIPsetEventhdlrExit(),
90  * SCIPsetEventhdlrInitsol(), SCIPsetEventhdlrExitsol(), and SCIPsetEventhdlrDelete()
91  *
92  * @note if you want to set all callbacks with a single method call, consider using SCIPincludeEventhdlr() instead
93  */
95  SCIP* scip, /**< SCIP data structure */
96  SCIP_EVENTHDLR** eventhdlrptr, /**< reference to an event handler, or NULL */
97  const char* name, /**< name of event handler */
98  const char* desc, /**< description of event handler */
99  SCIP_DECL_EVENTEXEC ((*eventexec)), /**< execute event handler */
100  SCIP_EVENTHDLRDATA* eventhdlrdata /**< event handler data */
101  )
102 {
103  SCIP_EVENTHDLR* eventhdlr;
104 
105  SCIP_CALL( SCIPcheckStage(scip, "SCIPincludeEventhdlrBasic", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
106 
107  /* check whether event handler is already present */
108  if( SCIPfindEventhdlr(scip, name) != NULL )
109  {
110  SCIPerrorMessage("event handler <%s> already included.\n", name);
111  return SCIP_INVALIDDATA;
112  }
113 
114  SCIP_CALL( SCIPeventhdlrCreate(&eventhdlr, scip->set, name, desc,
115  NULL, NULL, NULL, NULL, NULL, NULL, NULL, eventexec,
116  eventhdlrdata) );
117  SCIP_CALL( SCIPsetIncludeEventhdlr(scip->set, eventhdlr) );
118 
119  if( eventhdlrptr != NULL )
120  *eventhdlrptr = eventhdlr;
121 
122  return SCIP_OKAY;
123 }
124 
125 /** sets copy callback of the event handler */
127  SCIP* scip, /**< scip instance */
128  SCIP_EVENTHDLR* eventhdlr, /**< event handler */
129  SCIP_DECL_EVENTCOPY ((*eventcopy)) /**< copy callback of the event handler */
130  )
131 {
132  assert(scip != NULL);
133  SCIP_CALL( SCIPcheckStage(scip, "SCIPsetEventhdlrCopy", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
134 
135  SCIPeventhdlrSetCopy(eventhdlr, eventcopy);
136  return SCIP_OKAY;
137 }
138 
139 /** sets deinitialization callback of the event handler */
141  SCIP* scip, /**< scip instance */
142  SCIP_EVENTHDLR* eventhdlr, /**< event handler */
143  SCIP_DECL_EVENTFREE ((*eventfree)) /**< deinitialization callback of the event handler */
144  )
145 {
146  assert(scip != NULL);
147  SCIP_CALL( SCIPcheckStage(scip, "SCIPsetEventhdlrFree", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
148 
149  SCIPeventhdlrSetFree(eventhdlr, eventfree);
150  return SCIP_OKAY;
151 }
152 
153 /** sets initialization callback of the event handler */
155  SCIP* scip, /**< scip instance */
156  SCIP_EVENTHDLR* eventhdlr, /**< event handler */
157  SCIP_DECL_EVENTINIT ((*eventinit)) /**< initialize event handler */
158  )
159 {
160  assert(scip != NULL);
161  SCIP_CALL( SCIPcheckStage(scip, "SCIPsetEventhdlrInit", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
162 
163  SCIPeventhdlrSetInit(eventhdlr, eventinit);
164  return SCIP_OKAY;
165 }
166 
167 /** sets deinitialization callback of the event handler */
169  SCIP* scip, /**< scip instance */
170  SCIP_EVENTHDLR* eventhdlr, /**< event handler */
171  SCIP_DECL_EVENTEXIT ((*eventexit)) /**< deinitialize event handler */
172  )
173 {
174  assert(scip != NULL);
175  SCIP_CALL( SCIPcheckStage(scip, "SCIPsetEventhdlrExit", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
176 
177  SCIPeventhdlrSetExit(eventhdlr, eventexit);
178  return SCIP_OKAY;
179 }
180 
181 /** sets solving process initialization callback of the event handler */
183  SCIP* scip, /**< scip instance */
184  SCIP_EVENTHDLR* eventhdlr, /**< event handler */
185  SCIP_DECL_EVENTINITSOL((*eventinitsol)) /**< solving process initialization callback of event handler */
186  )
187 {
188  assert(scip != NULL);
189  SCIP_CALL( SCIPcheckStage(scip, "SCIPsetEventhdlrInitsol", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
190 
191  SCIPeventhdlrSetInitsol(eventhdlr, eventinitsol);
192  return SCIP_OKAY;
193 }
194 
195 /** sets solving process deinitialization callback of the event handler */
197  SCIP* scip, /**< scip instance */
198  SCIP_EVENTHDLR* eventhdlr, /**< event handler */
199  SCIP_DECL_EVENTEXITSOL((*eventexitsol)) /**< solving process deinitialization callback of event handler */
200  )
201 {
202  assert(scip != NULL);
203  SCIP_CALL( SCIPcheckStage(scip, "SCIPsetEventhdlrExitsol", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
204 
205  SCIPeventhdlrSetExitsol(eventhdlr, eventexitsol);
206  return SCIP_OKAY;
207 }
208 
209 /** sets callback of the event handler to free specific event data */
211  SCIP* scip, /**< scip instance */
212  SCIP_EVENTHDLR* eventhdlr, /**< event handler */
213  SCIP_DECL_EVENTDELETE ((*eventdelete)) /**< free specific event data */
214  )
215 {
216  assert(scip != NULL);
217  SCIP_CALL( SCIPcheckStage(scip, "SCIPsetEventhdlrDelete", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
218 
219  SCIPeventhdlrSetDelete(eventhdlr, eventdelete);
220  return SCIP_OKAY;
221 }
222 
223 /** returns the event handler of the given name, or NULL if not existing */
225  SCIP* scip, /**< SCIP data structure */
226  const char* name /**< name of event handler */
227  )
228 {
229  assert(scip != NULL);
230  assert(scip->set != NULL);
231  assert(name != NULL);
232 
233  return SCIPsetFindEventhdlr(scip->set, name);
234 }
235 
236 /** returns the array of currently available event handlers */
238  SCIP* scip /**< SCIP data structure */
239  )
240 {
241  assert(scip != NULL);
242  assert(scip->set != NULL);
243 
244  return scip->set->eventhdlrs;
245 }
246 
247 /** returns the number of currently available event handlers */
249  SCIP* scip /**< SCIP data structure */
250  )
251 {
252  assert(scip != NULL);
253  assert(scip->set != NULL);
254 
255  return scip->set->neventhdlrs;
256 }
257 
258 /** catches a global (not variable or row dependent) event
259  *
260  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
261  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
262  *
263  * @pre This method can be called if @p scip is in one of the following stages:
264  * - \ref SCIP_STAGE_TRANSFORMING
265  * - \ref SCIP_STAGE_TRANSFORMED
266  * - \ref SCIP_STAGE_INITPRESOLVE
267  * - \ref SCIP_STAGE_PRESOLVING
268  * - \ref SCIP_STAGE_EXITPRESOLVE
269  * - \ref SCIP_STAGE_PRESOLVED
270  * - \ref SCIP_STAGE_INITSOLVE
271  * - \ref SCIP_STAGE_SOLVING
272  * - \ref SCIP_STAGE_SOLVED
273  * - \ref SCIP_STAGE_EXITSOLVE
274  * - \ref SCIP_STAGE_FREETRANS
275  */
277  SCIP* scip, /**< SCIP data structure */
278  SCIP_EVENTTYPE eventtype, /**< event type mask to select events to catch */
279  SCIP_EVENTHDLR* eventhdlr, /**< event handler to process events with */
280  SCIP_EVENTDATA* eventdata, /**< event data to pass to the event handler when processing this event */
281  int* filterpos /**< pointer to store position of event filter entry, or NULL */
282  )
283 {
284  SCIP_CALL( SCIPcheckStage(scip, "SCIPcatchEvent", FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE) );
285 
286  SCIP_CALL( SCIPeventfilterAdd(scip->eventfilter, scip->mem->probmem, scip->set,
287  eventtype, eventhdlr, eventdata, filterpos) );
288 
289  return SCIP_OKAY;
290 }
291 
292 /** drops a global event (stops to track event)
293  *
294  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
295  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
296  *
297  * @pre This method can be called if @p scip is in one of the following stages:
298  * - \ref SCIP_STAGE_TRANSFORMING
299  * - \ref SCIP_STAGE_TRANSFORMED
300  * - \ref SCIP_STAGE_INITPRESOLVE
301  * - \ref SCIP_STAGE_PRESOLVING
302  * - \ref SCIP_STAGE_EXITPRESOLVE
303  * - \ref SCIP_STAGE_PRESOLVED
304  * - \ref SCIP_STAGE_INITSOLVE
305  * - \ref SCIP_STAGE_SOLVING
306  * - \ref SCIP_STAGE_SOLVED
307  * - \ref SCIP_STAGE_EXITSOLVE
308  * - \ref SCIP_STAGE_FREETRANS
309  */
311  SCIP* scip, /**< SCIP data structure */
312  SCIP_EVENTTYPE eventtype, /**< event type mask of dropped event */
313  SCIP_EVENTHDLR* eventhdlr, /**< event handler to process events with */
314  SCIP_EVENTDATA* eventdata, /**< event data to pass to the event handler when processing this event */
315  int filterpos /**< position of event filter entry returned by SCIPcatchEvent(), or -1 */
316  )
317 {
318  SCIP_CALL( SCIPcheckStage(scip, "SCIPdropEvent", FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE) );
319 
320  SCIP_CALL( SCIPeventfilterDel(scip->eventfilter, scip->mem->probmem, scip->set,
321  eventtype, eventhdlr, eventdata, filterpos) );
322 
323  return SCIP_OKAY;
324 }
325 
326 /** catches an objective value or domain change event on the given transformed variable
327  *
328  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
329  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
330  *
331  * @pre This method can be called if @p scip is in one of the following stages:
332  * - \ref SCIP_STAGE_TRANSFORMING
333  * - \ref SCIP_STAGE_TRANSFORMED
334  * - \ref SCIP_STAGE_INITPRESOLVE
335  * - \ref SCIP_STAGE_PRESOLVING
336  * - \ref SCIP_STAGE_EXITPRESOLVE
337  * - \ref SCIP_STAGE_PRESOLVED
338  * - \ref SCIP_STAGE_INITSOLVE
339  * - \ref SCIP_STAGE_SOLVING
340  * - \ref SCIP_STAGE_SOLVED
341  * - \ref SCIP_STAGE_EXITSOLVE
342  * - \ref SCIP_STAGE_FREETRANS
343  */
345  SCIP* scip, /**< SCIP data structure */
346  SCIP_VAR* var, /**< transformed variable to catch event for */
347  SCIP_EVENTTYPE eventtype, /**< event type mask to select events to catch */
348  SCIP_EVENTHDLR* eventhdlr, /**< event handler to process events with */
349  SCIP_EVENTDATA* eventdata, /**< event data to pass to the event handler when processing this event */
350  int* filterpos /**< pointer to store position of event filter entry, or NULL */
351  )
352 {
353  SCIP_CALL( SCIPcheckStage(scip, "SCIPcatchVarEvent", FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE) );
354 
355  if( (eventtype & SCIP_EVENTTYPE_VARCHANGED) == 0 )
356  {
357  SCIPerrorMessage("event does not operate on a single variable\n");
358  return SCIP_INVALIDDATA;
359  }
360 
361  if( SCIPvarIsOriginal(var) )
362  {
363  SCIPerrorMessage("cannot catch events on original variable <%s>\n", SCIPvarGetName(var));
364  return SCIP_INVALIDDATA;
365  }
366 
367  SCIP_CALL( SCIPvarCatchEvent(var, scip->mem->probmem, scip->set, eventtype, eventhdlr, eventdata, filterpos) );
368 
369  return SCIP_OKAY;
370 }
371 
372 /** drops an objective value or domain change event (stops to track event) on the given transformed variable
373  *
374  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
375  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
376  *
377  * @pre This method can be called if @p scip is in one of the following stages:
378  * - \ref SCIP_STAGE_TRANSFORMING
379  * - \ref SCIP_STAGE_TRANSFORMED
380  * - \ref SCIP_STAGE_INITPRESOLVE
381  * - \ref SCIP_STAGE_PRESOLVING
382  * - \ref SCIP_STAGE_EXITPRESOLVE
383  * - \ref SCIP_STAGE_PRESOLVED
384  * - \ref SCIP_STAGE_INITSOLVE
385  * - \ref SCIP_STAGE_SOLVING
386  * - \ref SCIP_STAGE_SOLVED
387  * - \ref SCIP_STAGE_EXITSOLVE
388  * - \ref SCIP_STAGE_FREETRANS
389  */
391  SCIP* scip, /**< SCIP data structure */
392  SCIP_VAR* var, /**< transformed variable to drop event for */
393  SCIP_EVENTTYPE eventtype, /**< event type mask of dropped event */
394  SCIP_EVENTHDLR* eventhdlr, /**< event handler to process events with */
395  SCIP_EVENTDATA* eventdata, /**< event data to pass to the event handler when processing this event */
396  int filterpos /**< position of event filter entry returned by SCIPcatchVarEvent(), or -1 */
397  )
398 {
399  SCIP_CALL( SCIPcheckStage(scip, "SCIPdropVarEvent", FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE) );
400 
401  if( SCIPvarIsOriginal(var) )
402  {
403  SCIPerrorMessage("cannot drop events on original variable <%s>\n", SCIPvarGetName(var));
404  return SCIP_INVALIDDATA;
405  }
406 
407  SCIP_CALL( SCIPvarDropEvent(var, scip->mem->probmem, scip->set, eventtype, eventhdlr, eventdata, filterpos) );
408 
409  return SCIP_OKAY;
410 }
411 
412 /** catches a row coefficient, constant, or side change event on the given row
413  *
414  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
415  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
416  *
417  * @pre This method can be called if @p scip is in one of the following stages:
418  * - \ref SCIP_STAGE_TRANSFORMING
419  * - \ref SCIP_STAGE_TRANSFORMED
420  * - \ref SCIP_STAGE_INITPRESOLVE
421  * - \ref SCIP_STAGE_PRESOLVING
422  * - \ref SCIP_STAGE_EXITPRESOLVE
423  * - \ref SCIP_STAGE_PRESOLVED
424  * - \ref SCIP_STAGE_INITSOLVE
425  * - \ref SCIP_STAGE_SOLVING
426  * - \ref SCIP_STAGE_SOLVED
427  * - \ref SCIP_STAGE_EXITSOLVE
428  * - \ref SCIP_STAGE_FREETRANS
429  */
431  SCIP* scip, /**< SCIP data structure */
432  SCIP_ROW* row, /**< linear row to catch event for */
433  SCIP_EVENTTYPE eventtype, /**< event type mask to select events to catch */
434  SCIP_EVENTHDLR* eventhdlr, /**< event handler to process events with */
435  SCIP_EVENTDATA* eventdata, /**< event data to pass to the event handler when processing this event */
436  int* filterpos /**< pointer to store position of event filter entry, or NULL */
437  )
438 {
439  SCIP_CALL( SCIPcheckStage(scip, "SCIPcatchRowEvent", FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE) );
440 
441  if( (eventtype & SCIP_EVENTTYPE_ROWCHANGED) == 0 )
442  {
443  SCIPerrorMessage("event does not operate on a single row\n");
444  return SCIP_INVALIDDATA;
445  }
446 
447  SCIP_CALL( SCIProwCatchEvent(row, scip->mem->probmem, scip->set, eventtype, eventhdlr, eventdata, filterpos) );
448 
449  return SCIP_OKAY;
450 }
451 
452 /** drops a row coefficient, constant, or side change event (stops to track event) on the given row
453  *
454  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
455  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
456  *
457  * @pre This method can be called if @p scip is in one of the following stages:
458  * - \ref SCIP_STAGE_TRANSFORMING
459  * - \ref SCIP_STAGE_TRANSFORMED
460  * - \ref SCIP_STAGE_INITPRESOLVE
461  * - \ref SCIP_STAGE_PRESOLVING
462  * - \ref SCIP_STAGE_EXITPRESOLVE
463  * - \ref SCIP_STAGE_PRESOLVED
464  * - \ref SCIP_STAGE_INITSOLVE
465  * - \ref SCIP_STAGE_SOLVING
466  * - \ref SCIP_STAGE_SOLVED
467  * - \ref SCIP_STAGE_EXITSOLVE
468  * - \ref SCIP_STAGE_FREETRANS
469  */
471  SCIP* scip, /**< SCIP data structure */
472  SCIP_ROW* row, /**< linear row to drop event for */
473  SCIP_EVENTTYPE eventtype, /**< event type mask of dropped event */
474  SCIP_EVENTHDLR* eventhdlr, /**< event handler to process events with */
475  SCIP_EVENTDATA* eventdata, /**< event data to pass to the event handler when processing this event */
476  int filterpos /**< position of event filter entry returned by SCIPcatchVarEvent(), or -1 */
477  )
478 {
479  SCIP_CALL( SCIPcheckStage(scip, "SCIPdropRowEvent", FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE) );
480 
481  SCIP_CALL( SCIProwDropEvent(row, scip->mem->probmem, scip->set, eventtype, eventhdlr, eventdata, filterpos) );
482 
483  return SCIP_OKAY;
484 }
void SCIPeventhdlrSetInit(SCIP_EVENTHDLR *eventhdlr, SCIP_DECL_EVENTINIT((*eventinit)))
Definition: event.c:367
void SCIPeventhdlrSetCopy(SCIP_EVENTHDLR *eventhdlr, SCIP_DECL_EVENTCOPY((*eventcopy)))
Definition: event.c:345
SCIP_RETCODE SCIPsetIncludeEventhdlr(SCIP_SET *set, SCIP_EVENTHDLR *eventhdlr)
Definition: set.c:4566
#define NULL
Definition: def.h:253
internal methods for managing events
int SCIPgetNEventhdlrs(SCIP *scip)
Definition: scip_event.c:248
void SCIPeventhdlrSetExitsol(SCIP_EVENTHDLR *eventhdlr, SCIP_DECL_EVENTEXITSOL((*eventexitsol)))
Definition: event.c:400
SCIP_EVENTHDLR * SCIPfindEventhdlr(SCIP *scip, const char *name)
Definition: scip_event.c:224
SCIP_EVENTHDLR * SCIPsetFindEventhdlr(SCIP_SET *set, const char *name)
Definition: set.c:4589
SCIP_RETCODE SCIPeventfilterDel(SCIP_EVENTFILTER *eventfilter, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int filterpos)
Definition: event.c:1892
SCIP_DECL_EVENTEXIT(EventhdlrNewSol::scip_exit)
struct SCIP_EventhdlrData SCIP_EVENTHDLRDATA
Definition: type_event.h:138
SCIP_RETCODE SCIPvarCatchEvent(SCIP_VAR *var, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int *filterpos)
Definition: var.c:17832
#define SCIP_EVENTTYPE_ROWCHANGED
Definition: type_event.h:131
#define FALSE
Definition: def.h:73
SCIP_RETCODE SCIPsetEventhdlrInitsol(SCIP *scip, SCIP_EVENTHDLR *eventhdlr, SCIP_DECL_EVENTINITSOL((*eventinitsol)))
Definition: scip_event.c:182
#define TRUE
Definition: def.h:72
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:53
public methods for problem variables
internal methods for LP management
SCIP_RETCODE SCIPsetEventhdlrCopy(SCIP *scip, SCIP_EVENTHDLR *eventhdlr, SCIP_DECL_EVENTCOPY((*eventcopy)))
Definition: scip_event.c:126
SCIP_DECL_EVENTINITSOL(EventhdlrNewSol::scip_initsol)
int neventhdlrs
Definition: struct_set.h:118
SCIP_EVENTHDLR ** SCIPgetEventhdlrs(SCIP *scip)
Definition: scip_event.c:237
SCIP_DECL_EVENTINIT(EventhdlrNewSol::scip_init)
SCIP_DECL_EVENTFREE(EventhdlrNewSol::scip_free)
SCIP_MEM * mem
Definition: struct_scip.h:61
SCIP_RETCODE SCIProwCatchEvent(SCIP_ROW *row, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int *filterpos)
Definition: lp.c:7740
void SCIPeventhdlrSetInitsol(SCIP_EVENTHDLR *eventhdlr, SCIP_DECL_EVENTINITSOL((*eventinitsol)))
Definition: event.c:389
SCIP_RETCODE SCIPsetEventhdlrFree(SCIP *scip, SCIP_EVENTHDLR *eventhdlr, SCIP_DECL_EVENTFREE((*eventfree)))
Definition: scip_event.c:140
SCIP_EXPORT const char * SCIPvarGetName(SCIP_VAR *var)
Definition: var.c:16738
SCIP_RETCODE SCIPeventfilterAdd(SCIP_EVENTFILTER *eventfilter, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int *filterpos)
Definition: event.c:1799
#define SCIPerrorMessage
Definition: pub_message.h:45
SCIP_EVENTFILTER * eventfilter
Definition: struct_scip.h:77
public methods for event handler plugins and event handlers
SCIP_RETCODE SCIPcatchEvent(SCIP *scip, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int *filterpos)
Definition: scip_event.c:276
SCIP_RETCODE SCIPcheckStage(SCIP *scip, const char *method, SCIP_Bool init, SCIP_Bool problem, SCIP_Bool transforming, SCIP_Bool transformed, SCIP_Bool initpresolve, SCIP_Bool presolving, SCIP_Bool exitpresolve, SCIP_Bool presolved, SCIP_Bool initsolve, SCIP_Bool solving, SCIP_Bool solved, SCIP_Bool exitsolve, SCIP_Bool freetrans, SCIP_Bool freescip)
Definition: debug.c:2010
struct SCIP_EventData SCIP_EVENTDATA
Definition: type_event.h:155
void SCIPeventhdlrSetExit(SCIP_EVENTHDLR *eventhdlr, SCIP_DECL_EVENTEXIT((*eventexit)))
Definition: event.c:378
internal methods for global SCIP settings
#define SCIP_CALL(x)
Definition: def.h:365
SCIP main data structure.
internal methods for problem variables
SCIP_RETCODE SCIPdropVarEvent(SCIP *scip, SCIP_VAR *var, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int filterpos)
Definition: scip_event.c:390
void SCIPeventhdlrSetFree(SCIP_EVENTHDLR *eventhdlr, SCIP_DECL_EVENTFREE((*eventfree)))
Definition: event.c:356
SCIP_EXPORT SCIP_Bool SCIPvarIsOriginal(SCIP_VAR *var)
Definition: var.c:16867
methods for debugging
datastructures for block memory pools and memory buffers
SCIP_RETCODE SCIPcatchRowEvent(SCIP *scip, SCIP_ROW *row, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int *filterpos)
Definition: scip_event.c:430
SCIP_RETCODE SCIPsetEventhdlrExitsol(SCIP *scip, SCIP_EVENTHDLR *eventhdlr, SCIP_DECL_EVENTEXITSOL((*eventexitsol)))
Definition: scip_event.c:196
SCIP_RETCODE SCIPincludeEventhdlrBasic(SCIP *scip, SCIP_EVENTHDLR **eventhdlrptr, const char *name, const char *desc, SCIP_DECL_EVENTEXEC((*eventexec)), SCIP_EVENTHDLRDATA *eventhdlrdata)
Definition: scip_event.c:94
SCIP_RETCODE SCIProwDropEvent(SCIP_ROW *row, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int filterpos)
Definition: lp.c:7764
BMS_BLKMEM * probmem
Definition: struct_mem.h:40
SCIP_RETCODE SCIPsetEventhdlrDelete(SCIP *scip, SCIP_EVENTHDLR *eventhdlr, SCIP_DECL_EVENTDELETE((*eventdelete)))
Definition: scip_event.c:210
SCIP_RETCODE SCIPsetEventhdlrInit(SCIP *scip, SCIP_EVENTHDLR *eventhdlr, SCIP_DECL_EVENTINIT((*eventinit)))
Definition: scip_event.c:154
SCIP_RETCODE SCIPdropEvent(SCIP *scip, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int filterpos)
Definition: scip_event.c:310
SCIP_SET * set
Definition: struct_scip.h:62
public methods for message output
SCIP_RETCODE SCIPincludeEventhdlr(SCIP *scip, const char *name, const char *desc, SCIP_DECL_EVENTCOPY((*eventcopy)), SCIP_DECL_EVENTFREE((*eventfree)), SCIP_DECL_EVENTINIT((*eventinit)), SCIP_DECL_EVENTEXIT((*eventexit)), SCIP_DECL_EVENTINITSOL((*eventinitsol)), SCIP_DECL_EVENTEXITSOL((*eventexitsol)), SCIP_DECL_EVENTDELETE((*eventdelete)), SCIP_DECL_EVENTEXEC((*eventexec)), SCIP_EVENTHDLRDATA *eventhdlrdata)
Definition: scip_event.c:53
SCIP_DECL_EVENTEXEC(EventhdlrNewSol::scip_exec)
#define SCIP_EVENTTYPE_VARCHANGED
Definition: type_event.h:113
SCIP_DECL_EVENTEXITSOL(EventhdlrNewSol::scip_exitsol)
#define SCIP_DECL_EVENTCOPY(x)
Definition: type_event.h:165
SCIP_RETCODE SCIPcatchVarEvent(SCIP *scip, SCIP_VAR *var, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int *filterpos)
Definition: scip_event.c:344
SCIP_RETCODE SCIPdropRowEvent(SCIP *scip, SCIP_ROW *row, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int filterpos)
Definition: scip_event.c:470
SCIP_DECL_EVENTDELETE(EventhdlrNewSol::scip_delete)
void SCIPeventhdlrSetDelete(SCIP_EVENTHDLR *eventhdlr, SCIP_DECL_EVENTDELETE((*eventdelete)))
Definition: event.c:411
SCIP_RETCODE SCIPvarDropEvent(SCIP_VAR *var, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int filterpos)
Definition: var.c:17859
SCIP_RETCODE SCIPeventhdlrCreate(SCIP_EVENTHDLR **eventhdlr, SCIP_SET *set, const char *name, const char *desc, SCIP_DECL_EVENTCOPY((*eventcopy)), SCIP_DECL_EVENTFREE((*eventfree)), SCIP_DECL_EVENTINIT((*eventinit)), SCIP_DECL_EVENTEXIT((*eventexit)), SCIP_DECL_EVENTINITSOL((*eventinitsol)), SCIP_DECL_EVENTEXITSOL((*eventexitsol)), SCIP_DECL_EVENTDELETE((*eventdelete)), SCIP_DECL_EVENTEXEC((*eventexec)), SCIP_EVENTHDLRDATA *eventhdlrdata)
Definition: event.c:113
datastructures for global SCIP settings
SCIP_EVENTHDLR ** eventhdlrs
Definition: struct_set.h:82
SCIP_RETCODE SCIPsetEventhdlrExit(SCIP *scip, SCIP_EVENTHDLR *eventhdlr, SCIP_DECL_EVENTEXIT((*eventexit)))
Definition: scip_event.c:168
uint64_t SCIP_EVENTTYPE
Definition: type_event.h:134