Scippy

SCIP

Solving Constraint Integer Programs

scip_conflict.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 scip_conflict.h
17  * @ingroup PUBLICCOREAPI
18  * @brief public methods for conflict handler plugins and conflict analysis
19  * @author Tobias Achterberg
20  * @author Timo Berthold
21  * @author Thorsten Koch
22  * @author Alexander Martin
23  * @author Marc Pfetsch
24  * @author Kati Wolter
25  * @author Gregor Hendel
26  * @author Robert Lion Gottwald
27  */
28 
29 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
30 
31 #ifndef __SCIP_SCIP_CONFLICT_H__
32 #define __SCIP_SCIP_CONFLICT_H__
33 
34 
35 #include "scip/def.h"
36 #include "scip/type_conflict.h"
37 #include "scip/type_cons.h"
38 #include "scip/type_lp.h"
39 #include "scip/type_result.h"
40 #include "scip/type_retcode.h"
41 #include "scip/type_scip.h"
42 #include "scip/type_tree.h"
43 #include "scip/type_var.h"
44 
45 /* In debug mode, we include the SCIP's structure in scip.c, such that no one can access
46  * this structure except the interface methods in scip.c.
47  * In optimized mode, the structure is included in scip.h, because some of the methods
48  * are implemented as defines for performance reasons (e.g. the numerical comparisons).
49  * Additionally, the internal "set.h" is included, such that the defines in set.h are
50  * available in optimized mode.
51  */
52 #ifdef NDEBUG
53 #include "scip/struct_scip.h"
54 #include "scip/struct_stat.h"
55 #include "scip/set.h"
56 #include "scip/tree.h"
57 #include "scip/misc.h"
58 #include "scip/var.h"
59 #include "scip/cons.h"
60 #include "scip/solve.h"
61 #include "scip/debug.h"
62 #endif
63 
64 #ifdef __cplusplus
65 extern "C" {
66 #endif
67 
68 /**@addtogroup PublicConflicthdlrMethods
69  *
70  * @{
71  */
72 
73 /** creates a conflict handler and includes it in SCIP
74  *
75  * @note method has all conflict handler callbacks as arguments and is thus changed every time a new
76  * callback is added
77  * in future releases; consider using SCIPincludeConflicthdlrBasic() and setter functions
78  * if you seek for a method which is less likely to change in future releases
79  */
80 extern
82  SCIP* scip, /**< SCIP data structure */
83  const char* name, /**< name of conflict handler */
84  const char* desc, /**< description of conflict handler */
85  int priority, /**< priority of the conflict handler */
86  SCIP_DECL_CONFLICTCOPY((*conflictcopy)), /**< copy method of conflict handler or NULL if you don't want to copy your plugin into sub-SCIPs */
87  SCIP_DECL_CONFLICTFREE((*conflictfree)), /**< destructor of conflict handler */
88  SCIP_DECL_CONFLICTINIT((*conflictinit)), /**< initialize conflict handler */
89  SCIP_DECL_CONFLICTEXIT((*conflictexit)), /**< deinitialize conflict handler */
90  SCIP_DECL_CONFLICTINITSOL((*conflictinitsol)),/**< solving process initialization method of conflict handler */
91  SCIP_DECL_CONFLICTEXITSOL((*conflictexitsol)),/**< solving process deinitialization method of conflict handler */
92  SCIP_DECL_CONFLICTEXEC((*conflictexec)), /**< conflict processing method of conflict handler */
93  SCIP_CONFLICTHDLRDATA* conflicthdlrdata /**< conflict handler data */
94  );
95 
96 /** creates a conflict handler and includes it in SCIP with its most fundamental callbacks. All non-fundamental
97  * (or optional) callbacks as, e.g., init and exit callbacks, will be set to NULL.
98  * Optional callbacks can be set via specific setter functions SCIPsetConflicthdlrCopy(), SCIPsetConflicthdlrFree(),
99  * SCIPsetConflicthdlrInit(), SCIPsetConflicthdlrExit(), SCIPsetConflicthdlrInitsol(),
100  * and SCIPsetConflicthdlrExitsol()
101  *
102  * @note if you want to set all callbacks with a single method call, consider using SCIPincludeConflicthdlr() instead
103  */
104 extern
106  SCIP* scip, /**< SCIP data structure */
107  SCIP_CONFLICTHDLR** conflicthdlrptr, /**< reference to a conflict handler pointer, or NULL */
108  const char* name, /**< name of conflict handler */
109  const char* desc, /**< description of conflict handler */
110  int priority, /**< priority of the conflict handler */
111  SCIP_DECL_CONFLICTEXEC((*conflictexec)), /**< conflict processing method of conflict handler */
112  SCIP_CONFLICTHDLRDATA* conflicthdlrdata /**< conflict handler data */
113  );
114 
115 /** set copy method of conflict handler */
116 extern
118  SCIP* scip, /**< SCIP data structure */
119  SCIP_CONFLICTHDLR* conflicthdlr, /**< conflict handler */
120  SCIP_DECL_CONFLICTCOPY((*conflictcopy)) /**< copy method of conflict handler */
121  );
122 
123 /** set destructor of conflict handler */
124 extern
126  SCIP* scip, /**< SCIP data structure */
127  SCIP_CONFLICTHDLR* conflicthdlr, /**< conflict handler */
128  SCIP_DECL_CONFLICTFREE((*conflictfree)) /**< destructor of conflict handler */
129  );
130 
131 /** set initialization method of conflict handler */
132 extern
134  SCIP* scip, /**< SCIP data structure */
135  SCIP_CONFLICTHDLR* conflicthdlr, /**< conflict handler */
136  SCIP_DECL_CONFLICTINIT((*conflictinit)) /**< initialize conflict handler */
137  );
138 
139 /** set deinitialization method of conflict handler */
140 extern
142  SCIP* scip, /**< SCIP data structure */
143  SCIP_CONFLICTHDLR* conflicthdlr, /**< conflict handler */
144  SCIP_DECL_CONFLICTEXIT((*conflictexit)) /**< deinitialize conflict handler */
145  );
146 
147 /** set solving process initialization method of conflict handler */
148 extern
150  SCIP* scip, /**< SCIP data structure */
151  SCIP_CONFLICTHDLR* conflicthdlr, /**< conflict handler */
152  SCIP_DECL_CONFLICTINITSOL((*conflictinitsol))/**< solving process initialization method of conflict handler */
153  );
154 
155 /** set solving process deinitialization method of conflict handler */
156 extern
158  SCIP* scip, /**< SCIP data structure */
159  SCIP_CONFLICTHDLR* conflicthdlr, /**< conflict handler */
160  SCIP_DECL_CONFLICTEXITSOL((*conflictexitsol))/**< solving process deinitialization method of conflict handler */
161  );
162 
163 /** returns the conflict handler of the given name, or NULL if not existing */
164 extern
166  SCIP* scip, /**< SCIP data structure */
167  const char* name /**< name of conflict handler */
168  );
169 
170 /** returns the array of currently available conflict handlers */
171 extern
173  SCIP* scip /**< SCIP data structure */
174  );
175 
176 /** returns the number of currently available conflict handlers */
177 extern
179  SCIP* scip /**< SCIP data structure */
180  );
181 
182 /** sets the priority of a conflict handler */
183 extern
185  SCIP* scip, /**< SCIP data structure */
186  SCIP_CONFLICTHDLR* conflicthdlr, /**< conflict handler */
187  int priority /**< new priority of the conflict handler */
188  );
189 
190 /* @} */
191 
192 /**@addtogroup PublicConflictMethods
193  *
194  * @{
195  */
196 
197 /** return TRUE if conflict analysis is applicable; In case the function return FALSE there is no need to initialize the
198  * conflict analysis since it will not be applied
199  *
200  * @return return TRUE if conflict analysis is applicable; In case the function return FALSE there is no need to initialize the
201  * conflict analysis since it will not be applied
202  *
203  * @pre This method can be called if SCIP is in one of the following stages:
204  * - \ref SCIP_STAGE_INITPRESOLVE
205  * - \ref SCIP_STAGE_PRESOLVING
206  * - \ref SCIP_STAGE_EXITPRESOLVE
207  * - \ref SCIP_STAGE_SOLVING
208  *
209  * @note SCIP stage does not get changed
210  */
211 extern
213  SCIP* scip /**< SCIP data structure */
214  );
215 
216 /** initializes the conflict analysis by clearing the conflict candidate queue; this method must be called before you
217  * enter the conflict variables by calling SCIPaddConflictLb(), SCIPaddConflictUb(), SCIPaddConflictBd(),
218  * SCIPaddConflictRelaxedLb(), SCIPaddConflictRelaxedUb(), SCIPaddConflictRelaxedBd(), or SCIPaddConflictBinvar();
219  *
220  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
221  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
222  *
223  * @pre This method can be called if SCIP is in one of the following stages:
224  * - \ref SCIP_STAGE_PRESOLVING
225  * - \ref SCIP_STAGE_SOLVING
226  *
227  * @note SCIP stage does not get changed
228  */
229 extern
231  SCIP* scip, /**< SCIP data structure */
232  SCIP_CONFTYPE conftype, /**< type of conflict */
233  SCIP_Bool iscutoffinvolved /**< is the current cutoff bound involved? */
234  );
235 
236 /** adds lower bound of variable at the time of the given bound change index to the conflict analysis' candidate storage;
237  * this method should be called in one of the following two cases:
238  * 1. Before calling the SCIPanalyzeConflict() method, SCIPaddConflictLb() should be called for each lower bound
239  * that led to the conflict (e.g. the infeasibility of globally or locally valid constraint).
240  * 2. In the propagation conflict resolving method of a constraint handler, SCIPaddConflictLb() should be called
241  * for each lower bound, whose current assignment led to the deduction of the given conflict bound.
242  *
243  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
244  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
245  *
246  * @pre This method can be called if SCIP is in one of the following stages:
247  * - \ref SCIP_STAGE_PRESOLVING
248  * - \ref SCIP_STAGE_SOLVING
249  *
250  * @note SCIP stage does not get changed
251  */
252 extern
254  SCIP* scip, /**< SCIP data structure */
255  SCIP_VAR* var, /**< variable whose lower bound should be added to conflict candidate queue */
256  SCIP_BDCHGIDX* bdchgidx /**< bound change index representing time on path to current node, when the
257  * conflicting bound was valid, NULL for current local bound */
258  );
259 
260 /** adds lower bound of variable at the time of the given bound change index to the conflict analysis' candidate storage
261  * with the additional information of a relaxed lower bound; this relaxed lower bound is the one which would be enough
262  * to explain a certain bound change;
263  * this method should be called in one of the following two cases:
264  * 1. Before calling the SCIPanalyzeConflict() method, SCIPaddConflictRelaxedLb() should be called for each (relaxed) lower bound
265  * that led to the conflict (e.g. the infeasibility of globally or locally valid constraint).
266  * 2. In the propagation conflict resolving method of a constraint handler, SCIPaddConflictRelexedLb() should be called
267  * for each (relaxed) lower bound, whose current assignment led to the deduction of the given conflict bound.
268  *
269  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
270  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
271  *
272  * @pre This method can be called if SCIP is in one of the following stages:
273  * - \ref SCIP_STAGE_PRESOLVING
274  * - \ref SCIP_STAGE_SOLVING
275  *
276  * @note SCIP stage does not get changed
277  */
278 extern
280  SCIP* scip, /**< SCIP data structure */
281  SCIP_VAR* var, /**< variable whose lower bound should be added to conflict candidate queue */
282  SCIP_BDCHGIDX* bdchgidx, /**< bound change index representing time on path to current node, when the
283  * conflicting bound was valid, NULL for current local bound */
284  SCIP_Real relaxedlb /**< the relaxed lower bound */
285  );
286 
287 /** adds upper bound of variable at the time of the given bound change index to the conflict analysis' candidate storage;
288  * this method should be called in one of the following two cases:
289  * 1. Before calling the SCIPanalyzeConflict() method, SCIPaddConflictUb() should be called for each upper bound that
290  * led to the conflict (e.g. the infeasibility of globally or locally valid constraint).
291  * 2. In the propagation conflict resolving method of a constraint handler, SCIPaddConflictUb() should be called for
292  * each upper bound, whose current assignment led to the deduction of the given conflict bound.
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 SCIP is in one of the following stages:
298  * - \ref SCIP_STAGE_PRESOLVING
299  * - \ref SCIP_STAGE_SOLVING
300  *
301  * @note SCIP stage does not get changed
302  */
303 extern
305  SCIP* scip, /**< SCIP data structure */
306  SCIP_VAR* var, /**< variable whose upper bound should be added to conflict candidate queue */
307  SCIP_BDCHGIDX* bdchgidx /**< bound change index representing time on path to current node, when the
308  * conflicting bound was valid, NULL for current local bound */
309  );
310 
311 /** adds upper bound of variable at the time of the given bound change index to the conflict analysis' candidate storage
312  * with the additional information of a relaxed upper bound; this relaxed upper bound is the one which would be enough
313  * to explain a certain bound change;
314  * this method should be called in one of the following two cases:
315  * 1. Before calling the SCIPanalyzeConflict() method, SCIPaddConflictRelaxedUb() should be called for each (relaxed) upper
316  * bound that led to the conflict (e.g. the infeasibility of globally or locally valid constraint).
317  * 2. In the propagation conflict resolving method of a constraint handler, SCIPaddConflictRelaxedUb() should be
318  * called for each (relaxed) upper bound, whose current assignment led to the deduction of the given conflict
319  * bound.
320  *
321  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
322  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
323  *
324  * @pre This method can be called if SCIP is in one of the following stages:
325  * - \ref SCIP_STAGE_PRESOLVING
326  * - \ref SCIP_STAGE_SOLVING
327  *
328  * @note SCIP stage does not get changed
329  */
330 extern
332  SCIP* scip, /**< SCIP data structure */
333  SCIP_VAR* var, /**< variable whose upper bound should be added to conflict candidate queue */
334  SCIP_BDCHGIDX* bdchgidx, /**< bound change index representing time on path to current node, when the
335  * conflicting bound was valid, NULL for current local bound */
336  SCIP_Real relaxedub /**< the relaxed upper bound */
337  );
338 
339 /** adds lower or upper bound of variable at the time of the given bound change index to the conflict analysis' candidate
340  * storage; this method should be called in one of the following two cases:
341  * 1. Before calling the SCIPanalyzeConflict() method, SCIPaddConflictBd() should be called for each bound
342  * that led to the conflict (e.g. the infeasibility of globally or locally valid constraint).
343  * 2. In the propagation conflict resolving method of a constraint handler, SCIPaddConflictBd() should be called
344  * for each bound, whose current assignment led to the deduction of the given conflict bound.
345  *
346  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
347  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
348  *
349  * @pre This method can be called if SCIP is in one of the following stages:
350  * - \ref SCIP_STAGE_PRESOLVING
351  * - \ref SCIP_STAGE_SOLVING
352  *
353  * @note SCIP stage does not get changed
354  */
355 extern
357  SCIP* scip, /**< SCIP data structure */
358  SCIP_VAR* var, /**< variable whose upper bound should be added to conflict candidate queue */
359  SCIP_BOUNDTYPE boundtype, /**< the type of the conflicting bound (lower or upper bound) */
360  SCIP_BDCHGIDX* bdchgidx /**< bound change index representing time on path to current node, when the
361  * conflicting bound was valid, NULL for current local bound */
362  );
363 
364 /** adds lower or upper bound of variable at the time of the given bound change index to the conflict analysis'
365  * candidate storage; with the additional information of a relaxed upper bound; this relaxed upper bound is the one
366  * which would be enough to explain a certain bound change;
367  * this method should be called in one of the following two cases:
368  * 1. Before calling the SCIPanalyzeConflict() method, SCIPaddConflictRelaxedBd() should be called for each (relaxed)
369  * bound that led to the conflict (e.g. the infeasibility of globally or locally valid constraint).
370  * 2. In the propagation conflict resolving method of a constraint handler, SCIPaddConflictRelaxedBd() should be
371  * called for each (relaxed) bound, whose current assignment led to the deduction of the given conflict bound.
372  *
373  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
374  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
375  *
376  * @pre This method can be called if SCIP is in one of the following stages:
377  * - \ref SCIP_STAGE_PRESOLVING
378  * - \ref SCIP_STAGE_SOLVING
379  *
380  * @note SCIP stage does not get changed
381  */
382 extern
384  SCIP* scip, /**< SCIP data structure */
385  SCIP_VAR* var, /**< variable whose upper bound should be added to conflict candidate queue */
386  SCIP_BOUNDTYPE boundtype, /**< the type of the conflicting bound (lower or upper bound) */
387  SCIP_BDCHGIDX* bdchgidx, /**< bound change index representing time on path to current node, when the
388  * conflicting bound was valid, NULL for current local bound */
389  SCIP_Real relaxedbd /**< the relaxed bound */
390  );
391 
392 /** adds changed bound of fixed binary variable to the conflict analysis' candidate storage;
393  * this method should be called in one of the following two cases:
394  * 1. Before calling the SCIPanalyzeConflict() method, SCIPaddConflictBinvar() should be called for each fixed binary
395  * variable that led to the conflict (e.g. the infeasibility of globally or locally valid constraint).
396  * 2. In the propagation conflict resolving method of a constraint handler, SCIPaddConflictBinvar() should be called
397  * for each binary variable, whose current fixing led to the deduction of the given conflict bound.
398  *
399  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
400  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
401  *
402  * @pre This method can be called if SCIP is in one of the following stages:
403  * - \ref SCIP_STAGE_PRESOLVING
404  * - \ref SCIP_STAGE_SOLVING
405  *
406  * @note SCIP stage does not get changed
407  */
408 extern
410  SCIP* scip, /**< SCIP data structure */
411  SCIP_VAR* var /**< binary variable whose changed bound should be added to conflict queue */
412  );
413 
414 /** checks if the given variable is already part of the current conflict set or queued for resolving with the same or
415  * even stronger bound
416  *
417  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
418  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
419  *
420  * @pre This method can be called if SCIP is in one of the following stages:
421  * - \ref SCIP_STAGE_PRESOLVING
422  * - \ref SCIP_STAGE_SOLVING
423  *
424  * @note SCIP stage does not get changed
425  */
426 extern
428  SCIP* scip, /**< SCIP data structure */
429  SCIP_VAR* var, /**< variable whose upper bound should be added to conflict candidate queue */
430  SCIP_BOUNDTYPE boundtype, /**< the type of the conflicting bound (lower or upper bound) */
431  SCIP_BDCHGIDX* bdchgidx, /**< bound change index representing time on path to current node, when the
432  * conflicting bound was valid, NULL for current local bound */
433  SCIP_Bool* used /**< pointer to store if the variable is already used */
434  );
435 
436 /** returns the conflict lower bound if the variable is present in the current conflict set; otherwise the global lower
437  * bound
438  *
439  * @return returns the conflict lower bound if the variable is present in the current conflict set; otherwise the global lower
440  * bound
441  *
442  * @pre This method can be called if SCIP is in one of the following stages:
443  * - \ref SCIP_STAGE_PRESOLVING
444  * - \ref SCIP_STAGE_SOLVING
445  *
446  * @note SCIP stage does not get changed
447  */
448 extern
450  SCIP* scip, /**< SCIP data structure */
451  SCIP_VAR* var /**< problem variable */
452  );
453 
454 /** returns the conflict upper bound if the variable is present in the current conflict set; otherwise minus global
455  * upper bound
456  *
457  * @return returns the conflict upper bound if the variable is present in the current conflict set; otherwise minus global
458  * upper bound
459  *
460  * @pre This method can be called if SCIP is in one of the following stages:
461  * - \ref SCIP_STAGE_PRESOLVING
462  * - \ref SCIP_STAGE_SOLVING
463  *
464  * @note SCIP stage does not get changed
465  */
466 extern
468  SCIP* scip, /**< SCIP data structure */
469  SCIP_VAR* var /**< problem variable */
470  );
471 
472 /** analyzes conflict bounds that were added after a call to SCIPinitConflictAnalysis() with calls to
473  * SCIPaddConflictLb(), SCIPaddConflictUb(), SCIPaddConflictBd(), SCIPaddConflictRelaxedLb(),
474  * SCIPaddConflictRelaxedUb(), SCIPaddConflictRelaxedBd(), or SCIPaddConflictBinvar(); on success, calls the conflict
475  * handlers to create a conflict constraint out of the resulting conflict set; the given valid depth must be a depth
476  * level, at which the conflict set defined by calls to SCIPaddConflictLb(), SCIPaddConflictUb(), SCIPaddConflictBd(),
477  * SCIPaddConflictRelaxedLb(), SCIPaddConflictRelaxedUb(), SCIPaddConflictRelaxedBd(), and SCIPaddConflictBinvar() is
478  * valid for the whole subtree; if the conflict was found by a violated constraint, use SCIPanalyzeConflictCons()
479  * instead of SCIPanalyzeConflict() to make sure, that the correct valid depth is used
480  *
481  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
482  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
483  *
484  * @pre This method can be called if SCIP is in one of the following stages:
485  * - \ref SCIP_STAGE_PRESOLVING
486  * - \ref SCIP_STAGE_SOLVING
487  *
488  * @note SCIP stage does not get changed
489  */
490 extern
492  SCIP* scip, /**< SCIP data structure */
493  int validdepth, /**< minimal depth level at which the initial conflict set is valid */
494  SCIP_Bool* success /**< pointer to store whether a conflict constraint was created, or NULL */
495  );
496 
497 /** analyzes conflict bounds that were added with calls to SCIPaddConflictLb(), SCIPaddConflictUb(),
498  * SCIPaddConflictBd(), SCIPaddConflictRelaxedLb(), SCIPaddConflictRelaxedUb(), SCIPaddConflictRelaxedBd(), or
499  * SCIPaddConflictBinvar(); on success, calls the conflict handlers to create a conflict constraint out of the
500  * resulting conflict set; the given constraint must be the constraint that detected the conflict, i.e. the constraint
501  * that is infeasible in the local bounds of the initial conflict set (defined by calls to SCIPaddConflictLb(),
502  * SCIPaddConflictUb(), SCIPaddConflictBd(), SCIPaddConflictRelaxedLb(), SCIPaddConflictRelaxedUb(),
503  * SCIPaddConflictRelaxedBd(), and SCIPaddConflictBinvar())
504  *
505  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
506  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
507  *
508  * @pre This method can be called if SCIP is in one of the following stages:
509  * - \ref SCIP_STAGE_PRESOLVING
510  * - \ref SCIP_STAGE_SOLVING
511  *
512  * @note SCIP stage does not get changed
513  */
514 extern
516  SCIP* scip, /**< SCIP data structure */
517  SCIP_CONS* cons, /**< constraint that detected the conflict */
518  SCIP_Bool* success /**< pointer to store whether a conflict constraint was created, or NULL */
519  );
520 
521 /**@} */
522 
523 #ifdef __cplusplus
524 }
525 #endif
526 
527 #endif
enum SCIP_BoundType SCIP_BOUNDTYPE
Definition: type_lp.h:50
SCIP_RETCODE SCIPsetConflicthdlrInit(SCIP *scip, SCIP_CONFLICTHDLR *conflicthdlr, SCIP_DECL_CONFLICTINIT((*conflictinit)))
internal methods for branch and bound tree
SCIP_RETCODE SCIPaddConflictBinvar(SCIP *scip, SCIP_VAR *var)
SCIP_RETCODE SCIPsetConflicthdlrCopy(SCIP *scip, SCIP_CONFLICTHDLR *conflicthdlr, SCIP_DECL_CONFLICTCOPY((*conflictcopy)))
SCIP_Real SCIPgetConflictVarUb(SCIP *scip, SCIP_VAR *var)
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:53
SCIP_RETCODE SCIPaddConflictUb(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx)
SCIP_RETCODE SCIPisConflictVarUsed(SCIP *scip, SCIP_VAR *var, SCIP_BOUNDTYPE boundtype, SCIP_BDCHGIDX *bdchgidx, SCIP_Bool *used)
SCIP_RETCODE SCIPaddConflictRelaxedLb(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx, SCIP_Real relaxedlb)
SCIP_RETCODE SCIPinitConflictAnalysis(SCIP *scip, SCIP_CONFTYPE conftype, SCIP_Bool iscutoffinvolved)
SCIP_RETCODE SCIPsetConflicthdlrExit(SCIP *scip, SCIP_CONFLICTHDLR *conflicthdlr, SCIP_DECL_CONFLICTEXIT((*conflictexit)))
type definitions for return codes for SCIP methods
#define SCIP_DECL_CONFLICTEXIT(x)
SCIP_RETCODE SCIPsetConflicthdlrExitsol(SCIP *scip, SCIP_CONFLICTHDLR *conflicthdlr, SCIP_DECL_CONFLICTEXITSOL((*conflictexitsol)))
SCIP_RETCODE SCIPaddConflictLb(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx)
SCIP_RETCODE SCIPsetConflicthdlrInitsol(SCIP *scip, SCIP_CONFLICTHDLR *conflicthdlr, SCIP_DECL_CONFLICTINITSOL((*conflictinitsol)))
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)
type definitions for LP management
SCIP_Bool SCIPisConflictAnalysisApplicable(SCIP *scip)
#define SCIP_DECL_CONFLICTINITSOL(x)
#define SCIP_DECL_CONFLICTEXEC(x)
type definitions for SCIP&#39;s main datastructure
int SCIPgetNConflicthdlrs(SCIP *scip)
SCIP_Real SCIPgetConflictVarLb(SCIP *scip, SCIP_VAR *var)
internal miscellaneous methods
SCIP_RETCODE SCIPaddConflictRelaxedBd(SCIP *scip, SCIP_VAR *var, SCIP_BOUNDTYPE boundtype, SCIP_BDCHGIDX *bdchgidx, SCIP_Real relaxedbd)
struct SCIP_ConflicthdlrData SCIP_CONFLICTHDLRDATA
Definition: type_conflict.h:40
internal methods for global SCIP settings
SCIP main data structure.
type definitions for problem variables
#define SCIP_DECL_CONFLICTCOPY(x)
Definition: type_conflict.h:77
SCIP_RETCODE SCIPanalyzeConflictCons(SCIP *scip, SCIP_CONS *cons, SCIP_Bool *success)
type definitions for conflict analysis
SCIP_CONFLICTHDLR ** SCIPgetConflicthdlrs(SCIP *scip)
internal methods for problem variables
#define SCIP_Bool
Definition: def.h:62
methods for debugging
SCIP_RETCODE SCIPaddConflictRelaxedUb(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx, SCIP_Real relaxedub)
SCIP_RETCODE SCIPaddConflictBd(SCIP *scip, SCIP_VAR *var, SCIP_BOUNDTYPE boundtype, SCIP_BDCHGIDX *bdchgidx)
type definitions for branch and bound tree
SCIP_RETCODE SCIPsetConflicthdlrFree(SCIP *scip, SCIP_CONFLICTHDLR *conflicthdlr, SCIP_DECL_CONFLICTFREE((*conflictfree)))
datastructures for problem statistics
SCIP_CONFLICTHDLR * SCIPfindConflicthdlr(SCIP *scip, const char *name)
internal methods for main solving loop and node processing
SCIP_RETCODE SCIPincludeConflicthdlrBasic(SCIP *scip, SCIP_CONFLICTHDLR **conflicthdlrptr, const char *name, const char *desc, int priority, SCIP_DECL_CONFLICTEXEC((*conflictexec)), SCIP_CONFLICTHDLRDATA *conflicthdlrdata)
#define SCIP_Real
Definition: def.h:150
result codes for SCIP callback methods
enum SCIP_ConflictType SCIP_CONFTYPE
Definition: type_conflict.h:56
#define SCIP_DECL_CONFLICTINIT(x)
Definition: type_conflict.h:93
internal methods for constraints and constraint handlers
common defines and data types used in all packages of SCIP
#define SCIP_DECL_CONFLICTFREE(x)
Definition: type_conflict.h:85
SCIP_RETCODE SCIPanalyzeConflict(SCIP *scip, int validdepth, SCIP_Bool *success)
SCIP_RETCODE SCIPsetConflicthdlrPriority(SCIP *scip, SCIP_CONFLICTHDLR *conflicthdlr, int priority)
type definitions for constraints and constraint handlers
#define SCIP_DECL_CONFLICTEXITSOL(x)