Scippy

SCIP

Solving Constraint Integer Programs

scip_conflict.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_conflict.c
17  * @brief public methods for conflict handler plugins and conflict analysis
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/conflict.h"
36 #include "scip/debug.h"
37 #include "scip/pub_cons.h"
38 #include "scip/pub_message.h"
39 #include "scip/pub_var.h"
40 #include "scip/scip_conflict.h"
41 #include "scip/scip_tree.h"
42 #include "scip/set.h"
43 #include "scip/struct_mem.h"
44 #include "scip/struct_scip.h"
45 #include "scip/struct_set.h"
46 #include "scip/struct_var.h"
47 
48 /** creates a conflict handler and includes it in SCIP
49  *
50  * @note method has all conflict handler callbacks as arguments and is thus changed every time a new
51  * callback is added
52  * in future releases; consider using SCIPincludeConflicthdlrBasic() and setter functions
53  * if you seek for a method which is less likely to change in future releases
54  */
56  SCIP* scip, /**< SCIP data structure */
57  const char* name, /**< name of conflict handler */
58  const char* desc, /**< description of conflict handler */
59  int priority, /**< priority of the conflict handler */
60  SCIP_DECL_CONFLICTCOPY((*conflictcopy)), /**< copy method of conflict handler or NULL if you don't want to copy your plugin into sub-SCIPs */
61  SCIP_DECL_CONFLICTFREE((*conflictfree)), /**< destructor of conflict handler */
62  SCIP_DECL_CONFLICTINIT((*conflictinit)), /**< initialize conflict handler */
63  SCIP_DECL_CONFLICTEXIT((*conflictexit)), /**< deinitialize conflict handler */
64  SCIP_DECL_CONFLICTINITSOL((*conflictinitsol)),/**< solving process initialization method of conflict handler */
65  SCIP_DECL_CONFLICTEXITSOL((*conflictexitsol)),/**< solving process deinitialization method of conflict handler */
66  SCIP_DECL_CONFLICTEXEC((*conflictexec)), /**< conflict processing method of conflict handler */
67  SCIP_CONFLICTHDLRDATA* conflicthdlrdata /**< conflict handler data */
68  )
69 {
70  SCIP_CONFLICTHDLR* conflicthdlr;
71 
72  SCIP_CALL( SCIPcheckStage(scip, "SCIPincludeConflicthdlr", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
73 
74  /* check whether conflict handler is already present */
75  if( SCIPfindConflicthdlr(scip, name) != NULL )
76  {
77  SCIPerrorMessage("conflict handler <%s> already included.\n", name);
78  return SCIP_INVALIDDATA;
79  }
80 
81  SCIP_CALL( SCIPconflicthdlrCreate(&conflicthdlr, scip->set, scip->messagehdlr, scip->mem->setmem, name, desc, priority,
82  conflictcopy,
83  conflictfree, conflictinit, conflictexit, conflictinitsol, conflictexitsol, conflictexec,
84  conflicthdlrdata) );
85  SCIP_CALL( SCIPsetIncludeConflicthdlr(scip->set, conflicthdlr) );
86 
87  return SCIP_OKAY;
88 }
89 
90 /** creates a conflict handler and includes it in SCIP with its most fundamental callbacks. All non-fundamental
91  * (or optional) callbacks as, e.g., init and exit callbacks, will be set to NULL.
92  * Optional callbacks can be set via specific setter functions SCIPsetConflicthdlrCopy(), SCIPsetConflicthdlrFree(),
93  * SCIPsetConflicthdlrInit(), SCIPsetConflicthdlrExit(), SCIPsetConflicthdlrInitsol(),
94  * and SCIPsetConflicthdlrExitsol()
95  *
96  * @note if you want to set all callbacks with a single method call, consider using SCIPincludeConflicthdlr() instead
97  */
99  SCIP* scip, /**< SCIP data structure */
100  SCIP_CONFLICTHDLR** conflicthdlrptr, /**< reference to a conflict handler pointer, or NULL */
101  const char* name, /**< name of conflict handler */
102  const char* desc, /**< description of conflict handler */
103  int priority, /**< priority of the conflict handler */
104  SCIP_DECL_CONFLICTEXEC((*conflictexec)), /**< conflict processing method of conflict handler */
105  SCIP_CONFLICTHDLRDATA* conflicthdlrdata /**< conflict handler data */
106  )
107 {
108  SCIP_CONFLICTHDLR* conflicthdlr;
109 
110  SCIP_CALL( SCIPcheckStage(scip, "SCIPincludeConflicthdlrBasic", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
111 
112  /* check whether conflict handler is already present */
113  if( SCIPfindConflicthdlr(scip, name) != NULL )
114  {
115  SCIPerrorMessage("conflict handler <%s> already included.\n", name);
116  return SCIP_INVALIDDATA;
117  }
118 
119  SCIP_CALL( SCIPconflicthdlrCreate(&conflicthdlr, scip->set, scip->messagehdlr, scip->mem->setmem, name, desc, priority,
120  NULL, NULL, NULL, NULL, NULL, NULL, conflictexec, conflicthdlrdata) );
121  SCIP_CALL( SCIPsetIncludeConflicthdlr(scip->set, conflicthdlr) );
122 
123  if( conflicthdlrptr != NULL )
124  *conflicthdlrptr = conflicthdlr;
125 
126  return SCIP_OKAY;
127 }
128 
129 /** set copy method of conflict handler */
131  SCIP* scip, /**< SCIP data structure */
132  SCIP_CONFLICTHDLR* conflicthdlr, /**< conflict handler */
133  SCIP_DECL_CONFLICTCOPY((*conflictcopy)) /**< copy method of conflict handler */
134  )
135 {
136  assert(scip != NULL);
137 
138  SCIP_CALL( SCIPcheckStage(scip, "SCIPsetConflicthdlrCopy", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
139 
140  SCIPconflicthdlrSetCopy(conflicthdlr, conflictcopy);
141 
142  return SCIP_OKAY;
143 }
144 
145 /** set destructor of conflict handler */
147  SCIP* scip, /**< SCIP data structure */
148  SCIP_CONFLICTHDLR* conflicthdlr, /**< conflict handler */
149  SCIP_DECL_CONFLICTFREE((*conflictfree)) /**< destructor of conflict handler */
150  )
151 {
152  assert(scip != NULL);
153 
154  SCIP_CALL( SCIPcheckStage(scip, "SCIPsetConflicthdlrFree", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
155 
156  SCIPconflicthdlrSetFree(conflicthdlr, conflictfree);
157 
158  return SCIP_OKAY;
159 }
160 
161 /** set initialization method of conflict handler */
163  SCIP* scip, /**< SCIP data structure */
164  SCIP_CONFLICTHDLR* conflicthdlr, /**< conflict handler */
165  SCIP_DECL_CONFLICTINIT((*conflictinit)) /**< initialize conflict handler */
166  )
167 {
168  assert(scip != NULL);
169 
170  SCIP_CALL( SCIPcheckStage(scip, "SCIPsetConflicthdlrInit", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
171 
172  SCIPconflicthdlrSetInit(conflicthdlr, conflictinit);
173 
174  return SCIP_OKAY;
175 }
176 
177 /** set deinitialization method of conflict handler */
179  SCIP* scip, /**< SCIP data structure */
180  SCIP_CONFLICTHDLR* conflicthdlr, /**< conflict handler */
181  SCIP_DECL_CONFLICTEXIT((*conflictexit)) /**< deinitialize conflict handler */
182  )
183 {
184  assert(scip != NULL);
185 
186  SCIP_CALL( SCIPcheckStage(scip, "SCIPsetConflicthdlrExit", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
187 
188  SCIPconflicthdlrSetExit(conflicthdlr, conflictexit);
189 
190  return SCIP_OKAY;
191 }
192 
193 /** set solving process initialization method of conflict handler */
195  SCIP* scip, /**< SCIP data structure */
196  SCIP_CONFLICTHDLR* conflicthdlr, /**< conflict handler */
197  SCIP_DECL_CONFLICTINITSOL((*conflictinitsol))/**< solving process initialization method of conflict handler */
198  )
199 {
200  assert(scip != NULL);
201 
202  SCIP_CALL( SCIPcheckStage(scip, "SCIPsetConflicthdlrInitsol", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
203 
204  SCIPconflicthdlrSetInitsol(conflicthdlr, conflictinitsol);
205 
206  return SCIP_OKAY;
207 }
208 
209 /** set solving process deinitialization method of conflict handler */
211  SCIP* scip, /**< SCIP data structure */
212  SCIP_CONFLICTHDLR* conflicthdlr, /**< conflict handler */
213  SCIP_DECL_CONFLICTEXITSOL((*conflictexitsol))/**< solving process deinitialization method of conflict handler */
214  )
215 {
216  assert(scip != NULL);
217 
218  SCIP_CALL( SCIPcheckStage(scip, "SCIPsetConflicthdlrExitsol", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
219 
220  SCIPconflicthdlrSetExitsol(conflicthdlr, conflictexitsol);
221 
222  return SCIP_OKAY;
223 }
224 
225 /** returns the conflict handler of the given name, or NULL if not existing */
227  SCIP* scip, /**< SCIP data structure */
228  const char* name /**< name of conflict handler */
229  )
230 {
231  assert(scip != NULL);
232  assert(scip->set != NULL);
233  assert(name != NULL);
234 
235  return SCIPsetFindConflicthdlr(scip->set, name);
236 }
237 
238 /** returns the array of currently available conflict handlers */
240  SCIP* scip /**< SCIP data structure */
241  )
242 {
243  assert(scip != NULL);
244  assert(scip->set != NULL);
245 
247 
248  return scip->set->conflicthdlrs;
249 }
250 
251 /** returns the number of currently available conflict handlers */
253  SCIP* scip /**< SCIP data structure */
254  )
255 {
256  assert(scip != NULL);
257  assert(scip->set != NULL);
258 
259  return scip->set->nconflicthdlrs;
260 }
261 
262 /** sets the priority of a conflict handler */
264  SCIP* scip, /**< SCIP data structure */
265  SCIP_CONFLICTHDLR* conflicthdlr, /**< conflict handler */
266  int priority /**< new priority of the conflict handler */
267  )
268 {
269  assert(scip != NULL);
270  assert(scip->set != NULL);
271 
272  SCIPconflicthdlrSetPriority(conflicthdlr, scip->set, priority);
273 
274  return SCIP_OKAY;
275 }
276 
277 /** return TRUE if conflict analysis is applicable; In case the function return FALSE there is no need to initialize the
278  * conflict analysis since it will not be applied
279  *
280  * @return return TRUE if conflict analysis is applicable; In case the function return FALSE there is no need to initialize the
281  * conflict analysis since it will not be applied
282  *
283  * @pre This method can be called if SCIP is in one of the following stages:
284  * - \ref SCIP_STAGE_INITPRESOLVE
285  * - \ref SCIP_STAGE_PRESOLVING
286  * - \ref SCIP_STAGE_EXITPRESOLVE
287  * - \ref SCIP_STAGE_SOLVING
288  *
289  * @note SCIP stage does not get changed
290  */
292  SCIP* scip /**< SCIP data structure */
293  )
294 {
295  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPisConflictAnalysisApplicable", FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
296 
297  return (SCIPgetDepth(scip) > 0 && SCIPconflictApplicable(scip->set));
298 }
299 
300 /** initializes the conflict analysis by clearing the conflict candidate queue; this method must be called before you
301  * enter the conflict variables by calling SCIPaddConflictLb(), SCIPaddConflictUb(), SCIPaddConflictBd(),
302  * SCIPaddConflictRelaxedLb(), SCIPaddConflictRelaxedUb(), SCIPaddConflictRelaxedBd(), or SCIPaddConflictBinvar();
303  *
304  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
305  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
306  *
307  * @pre This method can be called if SCIP is in one of the following stages:
308  * - \ref SCIP_STAGE_PRESOLVING
309  * - \ref SCIP_STAGE_SOLVING
310  *
311  * @note SCIP stage does not get changed
312  */
314  SCIP* scip, /**< SCIP data structure */
315  SCIP_CONFTYPE conftype, /**< type of conflict */
316  SCIP_Bool iscutoffinvolved /**< is the current cutoff bound involved? */
317  )
318 {
319  SCIP_CALL( SCIPcheckStage(scip, "SCIPinitConflictAnalysis", FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
320 
321  SCIP_CALL( SCIPconflictInit(scip->conflict, scip->set, scip->stat, scip->transprob, conftype, iscutoffinvolved) );
322 
323  return SCIP_OKAY;
324 }
325 
326 /** adds lower bound of variable at the time of the given bound change index to the conflict analysis' candidate storage;
327  * this method should be called in one of the following two cases:
328  * 1. Before calling the SCIPanalyzeConflict() method, SCIPaddConflictLb() should be called for each lower bound
329  * that led to the conflict (e.g. the infeasibility of globally or locally valid constraint).
330  * 2. In the propagation conflict resolving method of a constraint handler, SCIPaddConflictLb() should be called
331  * for each lower bound, whose current assignment led to the deduction of the given conflict bound.
332  *
333  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
334  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
335  *
336  * @pre This method can be called if SCIP is in one of the following stages:
337  * - \ref SCIP_STAGE_PRESOLVING
338  * - \ref SCIP_STAGE_SOLVING
339  *
340  * @note SCIP stage does not get changed
341  */
343  SCIP* scip, /**< SCIP data structure */
344  SCIP_VAR* var, /**< variable whose lower bound should be added to conflict candidate queue */
345  SCIP_BDCHGIDX* bdchgidx /**< bound change index representing time on path to current node, when the
346  * conflicting bound was valid, NULL for current local bound */
347  )
348 {
349  SCIP_CALL( SCIPcheckStage(scip, "SCIPaddConflictLb", FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
350 
351  assert( var->scip == scip );
352 
353  SCIP_CALL( SCIPconflictAddBound(scip->conflict, scip->mem->probmem, scip->set, scip->stat, var, SCIP_BOUNDTYPE_LOWER, bdchgidx) );
354 
355  return SCIP_OKAY;
356 }
357 
358 /** adds lower bound of variable at the time of the given bound change index to the conflict analysis' candidate storage
359  * with the additional information of a relaxed lower bound; this relaxed lower bound is the one which would be enough
360  * to explain a certain bound change;
361  * this method should be called in one of the following two cases:
362  * 1. Before calling the SCIPanalyzeConflict() method, SCIPaddConflictRelaxedLb() should be called for each (relaxed) lower bound
363  * that led to the conflict (e.g. the infeasibility of globally or locally valid constraint).
364  * 2. In the propagation conflict resolving method of a constraint handler, SCIPaddConflictRelexedLb() should be called
365  * for each (relaxed) lower bound, whose current assignment led to the deduction of the given conflict bound.
366  *
367  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
368  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
369  *
370  * @pre This method can be called if SCIP is in one of the following stages:
371  * - \ref SCIP_STAGE_PRESOLVING
372  * - \ref SCIP_STAGE_SOLVING
373  *
374  * @note SCIP stage does not get changed
375  */
377  SCIP* scip, /**< SCIP data structure */
378  SCIP_VAR* var, /**< variable whose lower bound should be added to conflict candidate queue */
379  SCIP_BDCHGIDX* bdchgidx, /**< bound change index representing time on path to current node, when the
380  * conflicting bound was valid, NULL for current local bound */
381  SCIP_Real relaxedlb /**< the relaxed lower bound */
382  )
383 {
384  SCIP_CALL( SCIPcheckStage(scip, "SCIPaddConflictRelaxedLb", FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
385 
386  assert( var->scip == scip );
387 
388  SCIP_CALL( SCIPconflictAddRelaxedBound(scip->conflict, scip->mem->probmem, scip->set, scip->stat, var, SCIP_BOUNDTYPE_LOWER, bdchgidx, relaxedlb) );
389 
390  return SCIP_OKAY;
391 }
392 
393 /** adds upper bound of variable at the time of the given bound change index to the conflict analysis' candidate storage;
394  * this method should be called in one of the following two cases:
395  * 1. Before calling the SCIPanalyzeConflict() method, SCIPaddConflictUb() should be called for each upper bound that
396  * led to the conflict (e.g. the infeasibility of globally or locally valid constraint).
397  * 2. In the propagation conflict resolving method of a constraint handler, SCIPaddConflictUb() should be called for
398  * each upper bound, whose current assignment led to the deduction of the given conflict bound.
399  *
400  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
401  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
402  *
403  * @pre This method can be called if SCIP is in one of the following stages:
404  * - \ref SCIP_STAGE_PRESOLVING
405  * - \ref SCIP_STAGE_SOLVING
406  *
407  * @note SCIP stage does not get changed
408  */
410  SCIP* scip, /**< SCIP data structure */
411  SCIP_VAR* var, /**< variable whose upper bound should be added to conflict candidate queue */
412  SCIP_BDCHGIDX* bdchgidx /**< bound change index representing time on path to current node, when the
413  * conflicting bound was valid, NULL for current local bound */
414  )
415 {
416  SCIP_CALL( SCIPcheckStage(scip, "SCIPaddConflictUb", FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
417 
418  assert( var->scip == scip );
419 
420  SCIP_CALL( SCIPconflictAddBound(scip->conflict, scip->mem->probmem, scip->set, scip->stat, var, SCIP_BOUNDTYPE_UPPER, bdchgidx) );
421 
422  return SCIP_OKAY;
423 }
424 
425 /** adds upper bound of variable at the time of the given bound change index to the conflict analysis' candidate storage
426  * with the additional information of a relaxed upper bound; this relaxed upper bound is the one which would be enough
427  * to explain a certain bound change;
428  * this method should be called in one of the following two cases:
429  * 1. Before calling the SCIPanalyzeConflict() method, SCIPaddConflictRelaxedUb() should be called for each (relaxed) upper
430  * bound that led to the conflict (e.g. the infeasibility of globally or locally valid constraint).
431  * 2. In the propagation conflict resolving method of a constraint handler, SCIPaddConflictRelaxedUb() should be
432  * called for each (relaxed) upper bound, whose current assignment led to the deduction of the given conflict
433  * bound.
434  *
435  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
436  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
437  *
438  * @pre This method can be called if SCIP is in one of the following stages:
439  * - \ref SCIP_STAGE_PRESOLVING
440  * - \ref SCIP_STAGE_SOLVING
441  *
442  * @note SCIP stage does not get changed
443  */
445  SCIP* scip, /**< SCIP data structure */
446  SCIP_VAR* var, /**< variable whose upper bound should be added to conflict candidate queue */
447  SCIP_BDCHGIDX* bdchgidx, /**< bound change index representing time on path to current node, when the
448  * conflicting bound was valid, NULL for current local bound */
449  SCIP_Real relaxedub /**< the relaxed upper bound */
450  )
451 {
452  SCIP_CALL( SCIPcheckStage(scip, "SCIPaddConflictRelaxedUb", FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
453 
454  assert( var->scip == scip );
455 
456  SCIP_CALL( SCIPconflictAddRelaxedBound(scip->conflict, scip->mem->probmem, scip->set, scip->stat, var, SCIP_BOUNDTYPE_UPPER, bdchgidx, relaxedub) );
457 
458  return SCIP_OKAY;
459 }
460 
461 /** adds lower or upper bound of variable at the time of the given bound change index to the conflict analysis' candidate
462  * storage; this method should be called in one of the following two cases:
463  * 1. Before calling the SCIPanalyzeConflict() method, SCIPaddConflictBd() should be called for each bound
464  * that led to the conflict (e.g. the infeasibility of globally or locally valid constraint).
465  * 2. In the propagation conflict resolving method of a constraint handler, SCIPaddConflictBd() should be called
466  * for each bound, whose current assignment led to the deduction of the given conflict bound.
467  *
468  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
469  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
470  *
471  * @pre This method can be called if SCIP is in one of the following stages:
472  * - \ref SCIP_STAGE_PRESOLVING
473  * - \ref SCIP_STAGE_SOLVING
474  *
475  * @note SCIP stage does not get changed
476  */
478  SCIP* scip, /**< SCIP data structure */
479  SCIP_VAR* var, /**< variable whose upper bound should be added to conflict candidate queue */
480  SCIP_BOUNDTYPE boundtype, /**< the type of the conflicting bound (lower or upper bound) */
481  SCIP_BDCHGIDX* bdchgidx /**< bound change index representing time on path to current node, when the
482  * conflicting bound was valid, NULL for current local bound */
483  )
484 {
485  SCIP_CALL( SCIPcheckStage(scip, "SCIPaddConflictBd", FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
486 
487  assert( var->scip == scip );
488 
489  SCIP_CALL( SCIPconflictAddBound(scip->conflict, scip->mem->probmem, scip->set, scip->stat, var, boundtype, bdchgidx) );
490 
491  return SCIP_OKAY;
492 }
493 
494 /** adds lower or upper bound of variable at the time of the given bound change index to the conflict analysis'
495  * candidate storage; with the additional information of a relaxed upper bound; this relaxed upper bound is the one
496  * which would be enough to explain a certain bound change;
497  * this method should be called in one of the following two cases:
498  * 1. Before calling the SCIPanalyzeConflict() method, SCIPaddConflictRelaxedBd() should be called for each (relaxed)
499  * bound that led to the conflict (e.g. the infeasibility of globally or locally valid constraint).
500  * 2. In the propagation conflict resolving method of a constraint handler, SCIPaddConflictRelaxedBd() should be
501  * called for each (relaxed) bound, whose current assignment led to the deduction of the given conflict bound.
502  *
503  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
504  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
505  *
506  * @pre This method can be called if SCIP is in one of the following stages:
507  * - \ref SCIP_STAGE_PRESOLVING
508  * - \ref SCIP_STAGE_SOLVING
509  *
510  * @note SCIP stage does not get changed
511  */
513  SCIP* scip, /**< SCIP data structure */
514  SCIP_VAR* var, /**< variable whose upper bound should be added to conflict candidate queue */
515  SCIP_BOUNDTYPE boundtype, /**< the type of the conflicting bound (lower or upper bound) */
516  SCIP_BDCHGIDX* bdchgidx, /**< bound change index representing time on path to current node, when the
517  * conflicting bound was valid, NULL for current local bound */
518  SCIP_Real relaxedbd /**< the relaxed bound */
519  )
520 {
521  SCIP_CALL( SCIPcheckStage(scip, "SCIPaddConflictRelaxedBd", FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
522 
523  assert( var->scip == scip );
524 
525  SCIP_CALL( SCIPconflictAddRelaxedBound(scip->conflict, scip->mem->probmem, scip->set, scip->stat, var, boundtype, bdchgidx, relaxedbd) );
526 
527  return SCIP_OKAY;
528 }
529 
530 /** adds changed bound of fixed binary variable to the conflict analysis' candidate storage;
531  * this method should be called in one of the following two cases:
532  * 1. Before calling the SCIPanalyzeConflict() method, SCIPaddConflictBinvar() should be called for each fixed binary
533  * variable that led to the conflict (e.g. the infeasibility of globally or locally valid constraint).
534  * 2. In the propagation conflict resolving method of a constraint handler, SCIPaddConflictBinvar() should be called
535  * for each binary variable, whose current fixing led to the deduction of the given conflict bound.
536  *
537  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
538  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
539  *
540  * @pre This method can be called if SCIP is in one of the following stages:
541  * - \ref SCIP_STAGE_PRESOLVING
542  * - \ref SCIP_STAGE_SOLVING
543  *
544  * @note SCIP stage does not get changed
545  */
547  SCIP* scip, /**< SCIP data structure */
548  SCIP_VAR* var /**< binary variable whose changed bound should be added to conflict queue */
549  )
550 {
551  SCIP_CALL( SCIPcheckStage(scip, "SCIPaddConflictBinvar", FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
552 
553  assert(var->scip == scip);
554  assert(SCIPvarIsBinary(var));
555 
556  if( SCIPvarGetLbLocal(var) > 0.5 )
557  {
558  SCIP_CALL( SCIPconflictAddBound(scip->conflict, scip->mem->probmem, scip->set, scip->stat, var, SCIP_BOUNDTYPE_LOWER, NULL) );
559  }
560  else if( SCIPvarGetUbLocal(var) < 0.5 )
561  {
562  SCIP_CALL( SCIPconflictAddBound(scip->conflict, scip->mem->probmem, scip->set, scip->stat, var, SCIP_BOUNDTYPE_UPPER, NULL) );
563  }
564 
565  return SCIP_OKAY;
566 }
567 
568 /** checks if the given variable is already part of the current conflict set or queued for resolving with the same or
569  * even stronger bound
570  *
571  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
572  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
573  *
574  * @pre This method can be called if SCIP is in one of the following stages:
575  * - \ref SCIP_STAGE_PRESOLVING
576  * - \ref SCIP_STAGE_SOLVING
577  *
578  * @note SCIP stage does not get changed
579  */
581  SCIP* scip, /**< SCIP data structure */
582  SCIP_VAR* var, /**< variable whose upper bound should be added to conflict candidate queue */
583  SCIP_BOUNDTYPE boundtype, /**< the type of the conflicting bound (lower or upper bound) */
584  SCIP_BDCHGIDX* bdchgidx, /**< bound change index representing time on path to current node, when the
585  * conflicting bound was valid, NULL for current local bound */
586  SCIP_Bool* used /**< pointer to store if the variable is already used */
587  )
588 {
589  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPisConflictVarUsed", FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
590 
591  assert( var->scip == scip );
592 
593  return SCIPconflictIsVarUsed(scip->conflict, var, scip->set, boundtype, bdchgidx, used);
594 }
595 
596 /** returns the conflict lower bound if the variable is present in the current conflict set; otherwise the global lower
597  * bound
598  *
599  * @return returns the conflict lower bound if the variable is present in the current conflict set; otherwise the global lower
600  * bound
601  *
602  * @pre This method can be called if SCIP is in one of the following stages:
603  * - \ref SCIP_STAGE_PRESOLVING
604  * - \ref SCIP_STAGE_SOLVING
605  *
606  * @note SCIP stage does not get changed
607  */
609  SCIP* scip, /**< SCIP data structure */
610  SCIP_VAR* var /**< problem variable */
611  )
612 {
613  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetConflictVarLb", FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
614 
615  assert( var->scip == scip );
616 
617  return SCIPconflictGetVarLb(scip->conflict, var);
618 }
619 
620 /** returns the conflict upper bound if the variable is present in the current conflict set; otherwise minus global
621  * upper bound
622  *
623  * @return returns the conflict upper bound if the variable is present in the current conflict set; otherwise minus global
624  * upper bound
625  *
626  * @pre This method can be called if SCIP is in one of the following stages:
627  * - \ref SCIP_STAGE_PRESOLVING
628  * - \ref SCIP_STAGE_SOLVING
629  *
630  * @note SCIP stage does not get changed
631  */
633  SCIP* scip, /**< SCIP data structure */
634  SCIP_VAR* var /**< problem variable */
635  )
636 {
637  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetConflictVarUb", FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
638 
639  assert( var->scip == scip );
640 
641  return SCIPconflictGetVarUb(scip->conflict, var);
642 }
643 
644 /** analyzes conflict bounds that were added after a call to SCIPinitConflictAnalysis() with calls to
645  * SCIPaddConflictLb(), SCIPaddConflictUb(), SCIPaddConflictBd(), SCIPaddConflictRelaxedLb(),
646  * SCIPaddConflictRelaxedUb(), SCIPaddConflictRelaxedBd(), or SCIPaddConflictBinvar(); on success, calls the conflict
647  * handlers to create a conflict constraint out of the resulting conflict set; the given valid depth must be a depth
648  * level, at which the conflict set defined by calls to SCIPaddConflictLb(), SCIPaddConflictUb(), SCIPaddConflictBd(),
649  * SCIPaddConflictRelaxedLb(), SCIPaddConflictRelaxedUb(), SCIPaddConflictRelaxedBd(), and SCIPaddConflictBinvar() is
650  * valid for the whole subtree; if the conflict was found by a violated constraint, use SCIPanalyzeConflictCons()
651  * instead of SCIPanalyzeConflict() to make sure, that the correct valid depth is used
652  *
653  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
654  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
655  *
656  * @pre This method can be called if SCIP is in one of the following stages:
657  * - \ref SCIP_STAGE_PRESOLVING
658  * - \ref SCIP_STAGE_SOLVING
659  *
660  * @note SCIP stage does not get changed
661  */
663  SCIP* scip, /**< SCIP data structure */
664  int validdepth, /**< minimal depth level at which the initial conflict set is valid */
665  SCIP_Bool* success /**< pointer to store whether a conflict constraint was created, or NULL */
666  )
667 {
668  SCIP_CALL( SCIPcheckStage(scip, "SCIPanalyzeConflict", FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
669 
670  SCIP_CALL( SCIPconflictAnalyze(scip->conflict, scip->mem->probmem, scip->set, scip->stat,
671  scip->transprob, scip->tree, validdepth, success) );
672 
673  return SCIP_OKAY;
674 }
675 
676 /** analyzes conflict bounds that were added with calls to SCIPaddConflictLb(), SCIPaddConflictUb(),
677  * SCIPaddConflictBd(), SCIPaddConflictRelaxedLb(), SCIPaddConflictRelaxedUb(), SCIPaddConflictRelaxedBd(), or
678  * SCIPaddConflictBinvar(); on success, calls the conflict handlers to create a conflict constraint out of the
679  * resulting conflict set; the given constraint must be the constraint that detected the conflict, i.e. the constraint
680  * that is infeasible in the local bounds of the initial conflict set (defined by calls to SCIPaddConflictLb(),
681  * SCIPaddConflictUb(), SCIPaddConflictBd(), SCIPaddConflictRelaxedLb(), SCIPaddConflictRelaxedUb(),
682  * SCIPaddConflictRelaxedBd(), and SCIPaddConflictBinvar())
683  *
684  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
685  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
686  *
687  * @pre This method can be called if SCIP is in one of the following stages:
688  * - \ref SCIP_STAGE_PRESOLVING
689  * - \ref SCIP_STAGE_SOLVING
690  *
691  * @note SCIP stage does not get changed
692  */
694  SCIP* scip, /**< SCIP data structure */
695  SCIP_CONS* cons, /**< constraint that detected the conflict */
696  SCIP_Bool* success /**< pointer to store whether a conflict constraint was created, or NULL */
697  )
698 {
699  SCIP_CALL( SCIPcheckStage(scip, "SCIPanalyzeConflictCons", FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
700 
701  if( SCIPconsIsGlobal(cons) )
702  {
703  SCIP_CALL( SCIPconflictAnalyze(scip->conflict, scip->mem->probmem, scip->set, scip->stat,
704  scip->transprob, scip->tree, 0, success) );
705  }
706  else if( SCIPconsIsActive(cons) )
707  {
708  SCIP_CALL( SCIPconflictAnalyze(scip->conflict, scip->mem->probmem, scip->set, scip->stat,
709  scip->transprob, scip->tree, SCIPconsGetValidDepth(cons), success) );
710  }
711 
712  return SCIP_OKAY;
713 }
SCIP_STAT * stat
Definition: struct_scip.h:69
enum SCIP_BoundType SCIP_BOUNDTYPE
Definition: type_lp.h:50
SCIP_RETCODE SCIPsetConflicthdlrCopy(SCIP *scip, SCIP_CONFLICTHDLR *conflicthdlr, SCIP_DECL_CONFLICTCOPY((*conflictcopy)))
void SCIPconflicthdlrSetInit(SCIP_CONFLICTHDLR *conflicthdlr, SCIP_DECL_CONFLICTINIT((*conflictinit)))
Definition: conflict.c:717
SCIP_Bool SCIPisConflictAnalysisApplicable(SCIP *scip)
#define NULL
Definition: def.h:253
SCIP_RETCODE SCIPconflictAddBound(SCIP_CONFLICT *conflict, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_VAR *var, SCIP_BOUNDTYPE boundtype, SCIP_BDCHGIDX *bdchgidx)
Definition: conflict.c:4235
SCIP_CONFLICTHDLR ** conflicthdlrs
Definition: struct_set.h:74
SCIP_CONFLICT * conflict
Definition: struct_scip.h:85
void SCIPconflicthdlrSetExit(SCIP_CONFLICTHDLR *conflicthdlr, SCIP_DECL_CONFLICTEXIT((*conflictexit)))
Definition: conflict.c:728
SCIP_RETCODE SCIPsetConflicthdlrInit(SCIP *scip, SCIP_CONFLICTHDLR *conflicthdlr, SCIP_DECL_CONFLICTINIT((*conflictinit)))
void SCIPconflicthdlrSetInitsol(SCIP_CONFLICTHDLR *conflicthdlr, SCIP_DECL_CONFLICTINITSOL((*conflictinitsol)))
Definition: conflict.c:739
public methods for conflict handler plugins and conflict analysis
void SCIPconflicthdlrSetCopy(SCIP_CONFLICTHDLR *conflicthdlr, SCIP_DECL_CONFLICTCOPY((*conflictcopy)))
Definition: conflict.c:695
int SCIPconsGetValidDepth(SCIP_CONS *cons)
Definition: cons.c:8159
SCIP_RETCODE SCIPinitConflictAnalysis(SCIP *scip, SCIP_CONFTYPE conftype, SCIP_Bool iscutoffinvolved)
SCIP_EXPORT SCIP_Bool SCIPvarIsBinary(SCIP_VAR *var)
Definition: var.c:16918
SCIP_Bool SCIPconsIsActive(SCIP_CONS *cons)
Definition: cons.c:8137
#define FALSE
Definition: def.h:73
SCIP_RETCODE SCIPconflictAnalyze(SCIP_CONFLICT *conflict, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *prob, SCIP_TREE *tree, int validdepth, SCIP_Bool *success)
Definition: conflict.c:5487
#define TRUE
Definition: def.h:72
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:53
SCIP_RETCODE SCIPsetConflicthdlrInitsol(SCIP *scip, SCIP_CONFLICTHDLR *conflicthdlr, SCIP_DECL_CONFLICTINITSOL((*conflictinitsol)))
void SCIPconflicthdlrSetPriority(SCIP_CONFLICTHDLR *conflicthdlr, SCIP_SET *set, int priority)
Definition: conflict.c:791
SCIP_RETCODE SCIPaddConflictLb(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx)
public methods for problem variables
SCIP_RETCODE SCIPconflicthdlrCreate(SCIP_CONFLICTHDLR **conflicthdlr, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, BMS_BLKMEM *blkmem, const char *name, const char *desc, int priority, SCIP_DECL_CONFLICTCOPY((*conflictcopy)), SCIP_DECL_CONFLICTFREE((*conflictfree)), SCIP_DECL_CONFLICTINIT((*conflictinit)), SCIP_DECL_CONFLICTEXIT((*conflictexit)), SCIP_DECL_CONFLICTINITSOL((*conflictinitsol)), SCIP_DECL_CONFLICTEXITSOL((*conflictexitsol)), SCIP_DECL_CONFLICTEXEC((*conflictexec)), SCIP_CONFLICTHDLRDATA *conflicthdlrdata)
Definition: conflict.c:452
SCIP_RETCODE SCIPanalyzeConflict(SCIP *scip, int validdepth, SCIP_Bool *success)
SCIP_PROB * transprob
Definition: struct_scip.h:87
void SCIPconflicthdlrSetExitsol(SCIP_CONFLICTHDLR *conflicthdlr, SCIP_DECL_CONFLICTEXITSOL((*conflictexitsol)))
Definition: conflict.c:750
SCIP_RETCODE SCIPaddConflictRelaxedLb(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx, SCIP_Real relaxedlb)
#define SCIP_DECL_CONFLICTEXIT(x)
SCIP_Real SCIPgetConflictVarUb(SCIP *scip, SCIP_VAR *var)
SCIP_Real SCIPconflictGetVarUb(SCIP_CONFLICT *conflict, SCIP_VAR *var)
Definition: conflict.c:4537
SCIP_RETCODE SCIPaddConflictRelaxedBd(SCIP *scip, SCIP_VAR *var, SCIP_BOUNDTYPE boundtype, SCIP_BDCHGIDX *bdchgidx, SCIP_Real relaxedbd)
SCIP_RETCODE SCIPincludeConflicthdlr(SCIP *scip, const char *name, const char *desc, int priority, SCIP_DECL_CONFLICTCOPY((*conflictcopy)), SCIP_DECL_CONFLICTFREE((*conflictfree)), SCIP_DECL_CONFLICTINIT((*conflictinit)), SCIP_DECL_CONFLICTEXIT((*conflictexit)), SCIP_DECL_CONFLICTINITSOL((*conflictinitsol)), SCIP_DECL_CONFLICTEXITSOL((*conflictexitsol)), SCIP_DECL_CONFLICTEXEC((*conflictexec)), SCIP_CONFLICTHDLRDATA *conflicthdlrdata)
Definition: scip_conflict.c:55
public methods for the branch-and-bound tree
SCIP_Real SCIPgetConflictVarLb(SCIP *scip, SCIP_VAR *var)
void SCIPconflicthdlrSetFree(SCIP_CONFLICTHDLR *conflicthdlr, SCIP_DECL_CONFLICTFREE((*conflictfree)))
Definition: conflict.c:706
SCIP_MEM * mem
Definition: struct_scip.h:61
public methods for managing constraints
#define SCIP_DECL_CONFLICTINITSOL(x)
#define SCIP_DECL_CONFLICTEXEC(x)
SCIP_CONFLICTHDLR ** SCIPgetConflicthdlrs(SCIP *scip)
SCIP_RETCODE SCIPaddConflictBd(SCIP *scip, SCIP_VAR *var, SCIP_BOUNDTYPE boundtype, SCIP_BDCHGIDX *bdchgidx)
#define SCIPerrorMessage
Definition: pub_message.h:45
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
SCIP_CONFLICTHDLR * SCIPsetFindConflicthdlr(SCIP_SET *set, const char *name)
Definition: set.c:3924
int SCIPgetNConflicthdlrs(SCIP *scip)
struct SCIP_ConflicthdlrData SCIP_CONFLICTHDLRDATA
Definition: type_conflict.h:40
internal methods for global SCIP settings
#define SCIP_CALL(x)
Definition: def.h:365
SCIP main data structure.
BMS_BLKMEM * setmem
Definition: struct_mem.h:39
#define SCIP_DECL_CONFLICTCOPY(x)
Definition: type_conflict.h:77
SCIP_RETCODE SCIPaddConflictUb(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx)
int SCIPgetDepth(SCIP *scip)
Definition: scip_tree.c:637
#define SCIP_Bool
Definition: def.h:70
SCIP_Bool SCIPconflictApplicable(SCIP_SET *set)
Definition: conflict.c:3725
methods for debugging
datastructures for block memory pools and memory buffers
SCIP_RETCODE SCIPaddConflictRelaxedUb(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx, SCIP_Real relaxedub)
SCIP_RETCODE SCIPaddConflictBinvar(SCIP *scip, SCIP_VAR *var)
SCIP_RETCODE SCIPisConflictVarUsed(SCIP *scip, SCIP_VAR *var, SCIP_BOUNDTYPE boundtype, SCIP_BDCHGIDX *bdchgidx, SCIP_Bool *used)
SCIP_RETCODE SCIPsetConflicthdlrFree(SCIP *scip, SCIP_CONFLICTHDLR *conflicthdlr, SCIP_DECL_CONFLICTFREE((*conflictfree)))
SCIP_RETCODE SCIPanalyzeConflictCons(SCIP *scip, SCIP_CONS *cons, SCIP_Bool *success)
int nconflicthdlrs
Definition: struct_set.h:104
SCIP_EXPORT SCIP_Real SCIPvarGetLbLocal(SCIP_VAR *var)
Definition: var.c:17408
SCIP * scip
Definition: struct_var.h:201
SCIP_Bool SCIPconsIsGlobal(SCIP_CONS *cons)
Definition: cons.c:8305
SCIP_EXPORT SCIP_Real SCIPvarGetUbLocal(SCIP_VAR *var)
Definition: var.c:17418
SCIP_RETCODE SCIPsetConflicthdlrPriority(SCIP *scip, SCIP_CONFLICTHDLR *conflicthdlr, int priority)
BMS_BLKMEM * probmem
Definition: struct_mem.h:40
internal methods for conflict analysis
SCIP_RETCODE SCIPsetConflicthdlrExit(SCIP *scip, SCIP_CONFLICTHDLR *conflicthdlr, SCIP_DECL_CONFLICTEXIT((*conflictexit)))
void SCIPsetSortConflicthdlrs(SCIP_SET *set)
Definition: set.c:3944
SCIP_SET * set
Definition: struct_scip.h:62
public methods for message output
SCIP_RETCODE SCIPconflictInit(SCIP_CONFLICT *conflict, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *prob, SCIP_CONFTYPE conftype, SCIP_Bool usescutoffbound)
Definition: conflict.c:3877
SCIP_RETCODE SCIPconflictAddRelaxedBound(SCIP_CONFLICT *conflict, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_VAR *var, SCIP_BOUNDTYPE boundtype, SCIP_BDCHGIDX *bdchgidx, SCIP_Real relaxedbd)
Definition: conflict.c:4296
datastructures for problem variables
SCIP_MESSAGEHDLR * messagehdlr
Definition: struct_scip.h:65
#define SCIP_Real
Definition: def.h:164
SCIP_CONFLICTHDLR * SCIPfindConflicthdlr(SCIP *scip, const char *name)
SCIP_RETCODE SCIPincludeConflicthdlrBasic(SCIP *scip, SCIP_CONFLICTHDLR **conflicthdlrptr, const char *name, const char *desc, int priority, SCIP_DECL_CONFLICTEXEC((*conflictexec)), SCIP_CONFLICTHDLRDATA *conflicthdlrdata)
Definition: scip_conflict.c:98
enum SCIP_ConflictType SCIP_CONFTYPE
Definition: type_conflict.h:56
SCIP_Real SCIPconflictGetVarLb(SCIP_CONFLICT *conflict, SCIP_VAR *var)
Definition: conflict.c:4520
SCIP_RETCODE SCIPconflictIsVarUsed(SCIP_CONFLICT *conflict, SCIP_VAR *var, SCIP_SET *set, SCIP_BOUNDTYPE boundtype, SCIP_BDCHGIDX *bdchgidx, SCIP_Bool *used)
Definition: conflict.c:4460
#define SCIP_DECL_CONFLICTINIT(x)
Definition: type_conflict.h:93
SCIP_TREE * tree
Definition: struct_scip.h:84
#define SCIP_DECL_CONFLICTFREE(x)
Definition: type_conflict.h:85
#define SCIP_CALL_ABORT(x)
Definition: def.h:344
SCIP_RETCODE SCIPsetIncludeConflicthdlr(SCIP_SET *set, SCIP_CONFLICTHDLR *conflicthdlr)
Definition: set.c:3900
datastructures for global SCIP settings
#define SCIP_DECL_CONFLICTEXITSOL(x)
SCIP_RETCODE SCIPsetConflicthdlrExitsol(SCIP *scip, SCIP_CONFLICTHDLR *conflicthdlr, SCIP_DECL_CONFLICTEXITSOL((*conflictexitsol)))