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 <ctype.h>
36 #include <stdarg.h>
37 #include <assert.h>
38 #include <string.h>
39 #if defined(_WIN32) || defined(_WIN64)
40 #else
41 #include <strings.h> /*lint --e{766}*/
42 #endif
43 
44 
45 #include "lpi/lpi.h"
46 #include "nlpi/exprinterpret.h"
47 #include "nlpi/nlpi.h"
48 #include "scip/benders.h"
49 #include "scip/benderscut.h"
50 #include "scip/branch.h"
51 #include "scip/branch_nodereopt.h"
52 #include "scip/clock.h"
53 #include "scip/compr.h"
54 #include "scip/concsolver.h"
55 #include "scip/concurrent.h"
56 #include "scip/conflict.h"
57 #include "scip/conflictstore.h"
58 #include "scip/cons.h"
59 #include "scip/cons_linear.h"
60 #include "scip/cutpool.h"
61 #include "scip/cuts.h"
62 #include "scip/debug.h"
63 #include "scip/def.h"
64 #include "scip/dialog.h"
65 #include "scip/dialog_default.h"
66 #include "scip/disp.h"
67 #include "scip/event.h"
68 #include "scip/heur.h"
69 #include "scip/heur_ofins.h"
70 #include "scip/heur_reoptsols.h"
72 #include "scip/heuristics.h"
73 #include "scip/history.h"
74 #include "scip/implics.h"
75 #include "scip/interrupt.h"
76 #include "scip/lp.h"
77 #include "scip/mem.h"
78 #include "scip/message_default.h"
79 #include "scip/misc.h"
80 #include "scip/nlp.h"
81 #include "scip/nodesel.h"
82 #include "scip/paramset.h"
83 #include "scip/presol.h"
84 #include "scip/presolve.h"
85 #include "scip/pricer.h"
86 #include "scip/pricestore.h"
87 #include "scip/primal.h"
88 #include "scip/prob.h"
89 #include "scip/prop.h"
90 #include "scip/reader.h"
91 #include "scip/relax.h"
92 #include "scip/reopt.h"
93 #include "scip/retcode.h"
94 #include "scip/scipbuildflags.h"
95 #include "scip/scipcoreplugins.h"
96 #include "scip/scipgithash.h"
97 #include "scip/sepa.h"
98 #include "scip/sepastore.h"
99 #include "scip/set.h"
100 #include "scip/sol.h"
101 #include "scip/solve.h"
102 #include "scip/stat.h"
103 #include "scip/syncstore.h"
104 #include "scip/table.h"
105 #include "scip/tree.h"
106 #include "scip/var.h"
107 #include "scip/visual.h"
108 #include "xml/xml.h"
109 
110 #include "scip/scip_conflict.h"
111 #include "scip/scip_tree.h"
112 
113 #include "scip/pub_cons.h"
114 #include "scip/pub_message.h"
115 #include "scip/pub_var.h"
116 
117 
118 /* In debug mode, we include the SCIP's structure in scip.c, such that no one can access
119  * this structure except the interface methods in scip.c.
120  * In optimized mode, the structure is included in scip.h, because some of the methods
121  * are implemented as defines for performance reasons (e.g. the numerical comparisons)
122  */
123 #ifndef NDEBUG
124 #include "scip/struct_scip.h"
125 #endif
126 
127 /** creates a conflict handler and includes it in SCIP
128  *
129  * @note method has all conflict handler callbacks as arguments and is thus changed every time a new
130  * callback is added
131  * in future releases; consider using SCIPincludeConflicthdlrBasic() and setter functions
132  * if you seek for a method which is less likely to change in future releases
133  */
135  SCIP* scip, /**< SCIP data structure */
136  const char* name, /**< name of conflict handler */
137  const char* desc, /**< description of conflict handler */
138  int priority, /**< priority of the conflict handler */
139  SCIP_DECL_CONFLICTCOPY((*conflictcopy)), /**< copy method of conflict handler or NULL if you don't want to copy your plugin into sub-SCIPs */
140  SCIP_DECL_CONFLICTFREE((*conflictfree)), /**< destructor of conflict handler */
141  SCIP_DECL_CONFLICTINIT((*conflictinit)), /**< initialize conflict handler */
142  SCIP_DECL_CONFLICTEXIT((*conflictexit)), /**< deinitialize conflict handler */
143  SCIP_DECL_CONFLICTINITSOL((*conflictinitsol)),/**< solving process initialization method of conflict handler */
144  SCIP_DECL_CONFLICTEXITSOL((*conflictexitsol)),/**< solving process deinitialization method of conflict handler */
145  SCIP_DECL_CONFLICTEXEC((*conflictexec)), /**< conflict processing method of conflict handler */
146  SCIP_CONFLICTHDLRDATA* conflicthdlrdata /**< conflict handler data */
147  )
148 {
149  SCIP_CONFLICTHDLR* conflicthdlr;
150 
151  SCIP_CALL( SCIPcheckStage(scip, "SCIPincludeConflicthdlr", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
152 
153  /* check whether conflict handler is already present */
154  if( SCIPfindConflicthdlr(scip, name) != NULL )
155  {
156  SCIPerrorMessage("conflict handler <%s> already included.\n", name);
157  return SCIP_INVALIDDATA;
158  }
159 
160  SCIP_CALL( SCIPconflicthdlrCreate(&conflicthdlr, scip->set, scip->messagehdlr, scip->mem->setmem, name, desc, priority,
161  conflictcopy,
162  conflictfree, conflictinit, conflictexit, conflictinitsol, conflictexitsol, conflictexec,
163  conflicthdlrdata) );
164  SCIP_CALL( SCIPsetIncludeConflicthdlr(scip->set, conflicthdlr) );
165 
166  return SCIP_OKAY;
167 }
168 
169 /** creates a conflict handler and includes it in SCIP with its most fundamental callbacks. All non-fundamental
170  * (or optional) callbacks as, e.g., init and exit callbacks, will be set to NULL.
171  * Optional callbacks can be set via specific setter functions SCIPsetConflicthdlrCopy(), SCIPsetConflicthdlrFree(),
172  * SCIPsetConflicthdlrInit(), SCIPsetConflicthdlrExit(), SCIPsetConflicthdlrInitsol(),
173  * and SCIPsetConflicthdlrExitsol()
174  *
175  * @note if you want to set all callbacks with a single method call, consider using SCIPincludeConflicthdlr() instead
176  */
178  SCIP* scip, /**< SCIP data structure */
179  SCIP_CONFLICTHDLR** conflicthdlrptr, /**< reference to a conflict handler pointer, or NULL */
180  const char* name, /**< name of conflict handler */
181  const char* desc, /**< description of conflict handler */
182  int priority, /**< priority of the conflict handler */
183  SCIP_DECL_CONFLICTEXEC((*conflictexec)), /**< conflict processing method of conflict handler */
184  SCIP_CONFLICTHDLRDATA* conflicthdlrdata /**< conflict handler data */
185  )
186 {
187  SCIP_CONFLICTHDLR* conflicthdlr;
188 
189  SCIP_CALL( SCIPcheckStage(scip, "SCIPincludeConflicthdlrBasic", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
190 
191  /* check whether conflict handler is already present */
192  if( SCIPfindConflicthdlr(scip, name) != NULL )
193  {
194  SCIPerrorMessage("conflict handler <%s> already included.\n", name);
195  return SCIP_INVALIDDATA;
196  }
197 
198  SCIP_CALL( SCIPconflicthdlrCreate(&conflicthdlr, scip->set, scip->messagehdlr, scip->mem->setmem, name, desc, priority,
199  NULL, NULL, NULL, NULL, NULL, NULL, conflictexec, conflicthdlrdata) );
200  SCIP_CALL( SCIPsetIncludeConflicthdlr(scip->set, conflicthdlr) );
201 
202  if( conflicthdlrptr != NULL )
203  *conflicthdlrptr = conflicthdlr;
204 
205  return SCIP_OKAY;
206 }
207 
208 /** set copy method of conflict handler */
210  SCIP* scip, /**< SCIP data structure */
211  SCIP_CONFLICTHDLR* conflicthdlr, /**< conflict handler */
212  SCIP_DECL_CONFLICTCOPY((*conflictcopy)) /**< copy method of conflict handler */
213  )
214 {
215  assert(scip != NULL);
216 
217  SCIP_CALL( SCIPcheckStage(scip, "SCIPsetConflicthdlrCopy", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
218 
219  SCIPconflicthdlrSetCopy(conflicthdlr, conflictcopy);
220 
221  return SCIP_OKAY;
222 }
223 
224 /** set destructor of conflict handler */
226  SCIP* scip, /**< SCIP data structure */
227  SCIP_CONFLICTHDLR* conflicthdlr, /**< conflict handler */
228  SCIP_DECL_CONFLICTFREE((*conflictfree)) /**< destructor of conflict handler */
229  )
230 {
231  assert(scip != NULL);
232 
233  SCIP_CALL( SCIPcheckStage(scip, "SCIPsetConflicthdlrFree", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
234 
235  SCIPconflicthdlrSetFree(conflicthdlr, conflictfree);
236 
237  return SCIP_OKAY;
238 }
239 
240 /** set initialization method of conflict handler */
242  SCIP* scip, /**< SCIP data structure */
243  SCIP_CONFLICTHDLR* conflicthdlr, /**< conflict handler */
244  SCIP_DECL_CONFLICTINIT((*conflictinit)) /**< initialize conflict handler */
245  )
246 {
247  assert(scip != NULL);
248 
249  SCIP_CALL( SCIPcheckStage(scip, "SCIPsetConflicthdlrInit", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
250 
251  SCIPconflicthdlrSetInit(conflicthdlr, conflictinit);
252 
253  return SCIP_OKAY;
254 }
255 
256 /** set deinitialization method of conflict handler */
258  SCIP* scip, /**< SCIP data structure */
259  SCIP_CONFLICTHDLR* conflicthdlr, /**< conflict handler */
260  SCIP_DECL_CONFLICTEXIT((*conflictexit)) /**< deinitialize conflict handler */
261  )
262 {
263  assert(scip != NULL);
264 
265  SCIP_CALL( SCIPcheckStage(scip, "SCIPsetConflicthdlrExit", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
266 
267  SCIPconflicthdlrSetExit(conflicthdlr, conflictexit);
268 
269  return SCIP_OKAY;
270 }
271 
272 /** set solving process initialization method of conflict handler */
274  SCIP* scip, /**< SCIP data structure */
275  SCIP_CONFLICTHDLR* conflicthdlr, /**< conflict handler */
276  SCIP_DECL_CONFLICTINITSOL((*conflictinitsol))/**< solving process initialization method of conflict handler */
277  )
278 {
279  assert(scip != NULL);
280 
281  SCIP_CALL( SCIPcheckStage(scip, "SCIPsetConflicthdlrInitsol", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
282 
283  SCIPconflicthdlrSetInitsol(conflicthdlr, conflictinitsol);
284 
285  return SCIP_OKAY;
286 }
287 
288 /** set solving process deinitialization method of conflict handler */
290  SCIP* scip, /**< SCIP data structure */
291  SCIP_CONFLICTHDLR* conflicthdlr, /**< conflict handler */
292  SCIP_DECL_CONFLICTEXITSOL((*conflictexitsol))/**< solving process deinitialization method of conflict handler */
293  )
294 {
295  assert(scip != NULL);
296 
297  SCIP_CALL( SCIPcheckStage(scip, "SCIPsetConflicthdlrExitsol", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
298 
299  SCIPconflicthdlrSetExitsol(conflicthdlr, conflictexitsol);
300 
301  return SCIP_OKAY;
302 }
303 
304 /** returns the conflict handler of the given name, or NULL if not existing */
306  SCIP* scip, /**< SCIP data structure */
307  const char* name /**< name of conflict handler */
308  )
309 {
310  assert(scip != NULL);
311  assert(scip->set != NULL);
312  assert(name != NULL);
313 
314  return SCIPsetFindConflicthdlr(scip->set, name);
315 }
316 
317 /** returns the array of currently available conflict handlers */
319  SCIP* scip /**< SCIP data structure */
320  )
321 {
322  assert(scip != NULL);
323  assert(scip->set != NULL);
324 
326 
327  return scip->set->conflicthdlrs;
328 }
329 
330 /** returns the number of currently available conflict handlers */
332  SCIP* scip /**< SCIP data structure */
333  )
334 {
335  assert(scip != NULL);
336  assert(scip->set != NULL);
337 
338  return scip->set->nconflicthdlrs;
339 }
340 
341 /** sets the priority of a conflict handler */
343  SCIP* scip, /**< SCIP data structure */
344  SCIP_CONFLICTHDLR* conflicthdlr, /**< conflict handler */
345  int priority /**< new priority of the conflict handler */
346  )
347 {
348  assert(scip != NULL);
349  assert(scip->set != NULL);
350 
351  SCIPconflicthdlrSetPriority(conflicthdlr, scip->set, priority);
352 
353  return SCIP_OKAY;
354 }
355 
356 /** return TRUE if conflict analysis is applicable; In case the function return FALSE there is no need to initialize the
357  * conflict analysis since it will not be applied
358  *
359  * @return return TRUE if conflict analysis is applicable; In case the function return FALSE there is no need to initialize the
360  * conflict analysis since it will not be applied
361  *
362  * @pre This method can be called if SCIP is in one of the following stages:
363  * - \ref SCIP_STAGE_INITPRESOLVE
364  * - \ref SCIP_STAGE_PRESOLVING
365  * - \ref SCIP_STAGE_EXITPRESOLVE
366  * - \ref SCIP_STAGE_SOLVING
367  *
368  * @note SCIP stage does not get changed
369  */
371  SCIP* scip /**< SCIP data structure */
372  )
373 {
374  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPisConflictAnalysisApplicable", FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
375 
376  return (SCIPgetDepth(scip) > 0 && SCIPconflictApplicable(scip->set));
377 }
378 
379 /** initializes the conflict analysis by clearing the conflict candidate queue; this method must be called before you
380  * enter the conflict variables by calling SCIPaddConflictLb(), SCIPaddConflictUb(), SCIPaddConflictBd(),
381  * SCIPaddConflictRelaxedLb(), SCIPaddConflictRelaxedUb(), SCIPaddConflictRelaxedBd(), or SCIPaddConflictBinvar();
382  *
383  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
384  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
385  *
386  * @pre This method can be called if SCIP is in one of the following stages:
387  * - \ref SCIP_STAGE_PRESOLVING
388  * - \ref SCIP_STAGE_SOLVING
389  *
390  * @note SCIP stage does not get changed
391  */
393  SCIP* scip, /**< SCIP data structure */
394  SCIP_CONFTYPE conftype, /**< type of conflict */
395  SCIP_Bool iscutoffinvolved /**< is the current cutoff bound involved? */
396  )
397 {
398  SCIP_CALL( SCIPcheckStage(scip, "SCIPinitConflictAnalysis", FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
399 
400  SCIP_CALL( SCIPconflictInit(scip->conflict, scip->set, scip->stat, scip->transprob, conftype, iscutoffinvolved) );
401 
402  return SCIP_OKAY;
403 }
404 
405 /** adds lower bound of variable at the time of the given bound change index to the conflict analysis' candidate storage;
406  * this method should be called in one of the following two cases:
407  * 1. Before calling the SCIPanalyzeConflict() method, SCIPaddConflictLb() should be called for each lower bound
408  * that led to the conflict (e.g. the infeasibility of globally or locally valid constraint).
409  * 2. In the propagation conflict resolving method of a constraint handler, SCIPaddConflictLb() should be called
410  * for each lower bound, whose current assignment led to the deduction of the given conflict bound.
411  *
412  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
413  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
414  *
415  * @pre This method can be called if SCIP is in one of the following stages:
416  * - \ref SCIP_STAGE_PRESOLVING
417  * - \ref SCIP_STAGE_SOLVING
418  *
419  * @note SCIP stage does not get changed
420  */
422  SCIP* scip, /**< SCIP data structure */
423  SCIP_VAR* var, /**< variable whose lower bound should be added to conflict candidate queue */
424  SCIP_BDCHGIDX* bdchgidx /**< bound change index representing time on path to current node, when the
425  * conflicting bound was valid, NULL for current local bound */
426  )
427 {
428  SCIP_CALL( SCIPcheckStage(scip, "SCIPaddConflictLb", FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
429 
430  assert( var->scip == scip );
431 
432  SCIP_CALL( SCIPconflictAddBound(scip->conflict, scip->mem->probmem, scip->set, scip->stat, var, SCIP_BOUNDTYPE_LOWER, bdchgidx) );
433 
434  return SCIP_OKAY;
435 }
436 
437 /** adds lower bound of variable at the time of the given bound change index to the conflict analysis' candidate storage
438  * with the additional information of a relaxed lower bound; this relaxed lower bound is the one which would be enough
439  * to explain a certain bound change;
440  * this method should be called in one of the following two cases:
441  * 1. Before calling the SCIPanalyzeConflict() method, SCIPaddConflictRelaxedLb() should be called for each (relaxed) lower bound
442  * that led to the conflict (e.g. the infeasibility of globally or locally valid constraint).
443  * 2. In the propagation conflict resolving method of a constraint handler, SCIPaddConflictRelexedLb() should be called
444  * for each (relaxed) lower bound, whose current assignment led to the deduction of the given conflict bound.
445  *
446  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
447  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
448  *
449  * @pre This method can be called if SCIP is in one of the following stages:
450  * - \ref SCIP_STAGE_PRESOLVING
451  * - \ref SCIP_STAGE_SOLVING
452  *
453  * @note SCIP stage does not get changed
454  */
456  SCIP* scip, /**< SCIP data structure */
457  SCIP_VAR* var, /**< variable whose lower bound should be added to conflict candidate queue */
458  SCIP_BDCHGIDX* bdchgidx, /**< bound change index representing time on path to current node, when the
459  * conflicting bound was valid, NULL for current local bound */
460  SCIP_Real relaxedlb /**< the relaxed lower bound */
461  )
462 {
463  SCIP_CALL( SCIPcheckStage(scip, "SCIPaddConflictRelaxedLb", FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
464 
465  assert( var->scip == scip );
466 
467  SCIP_CALL( SCIPconflictAddRelaxedBound(scip->conflict, scip->mem->probmem, scip->set, scip->stat, var, SCIP_BOUNDTYPE_LOWER, bdchgidx, relaxedlb) );
468 
469  return SCIP_OKAY;
470 }
471 
472 /** adds upper bound of variable at the time of the given bound change index to the conflict analysis' candidate storage;
473  * this method should be called in one of the following two cases:
474  * 1. Before calling the SCIPanalyzeConflict() method, SCIPaddConflictUb() should be called for each upper bound that
475  * led to the conflict (e.g. the infeasibility of globally or locally valid constraint).
476  * 2. In the propagation conflict resolving method of a constraint handler, SCIPaddConflictUb() should be called for
477  * each upper bound, whose current assignment led to the deduction of the given conflict bound.
478  *
479  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
480  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
481  *
482  * @pre This method can be called if SCIP is in one of the following stages:
483  * - \ref SCIP_STAGE_PRESOLVING
484  * - \ref SCIP_STAGE_SOLVING
485  *
486  * @note SCIP stage does not get changed
487  */
489  SCIP* scip, /**< SCIP data structure */
490  SCIP_VAR* var, /**< variable whose upper bound should be added to conflict candidate queue */
491  SCIP_BDCHGIDX* bdchgidx /**< bound change index representing time on path to current node, when the
492  * conflicting bound was valid, NULL for current local bound */
493  )
494 {
495  SCIP_CALL( SCIPcheckStage(scip, "SCIPaddConflictUb", FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
496 
497  assert( var->scip == scip );
498 
499  SCIP_CALL( SCIPconflictAddBound(scip->conflict, scip->mem->probmem, scip->set, scip->stat, var, SCIP_BOUNDTYPE_UPPER, bdchgidx) );
500 
501  return SCIP_OKAY;
502 }
503 
504 /** adds upper bound of variable at the time of the given bound change index to the conflict analysis' candidate storage
505  * with the additional information of a relaxed upper bound; this relaxed upper bound is the one which would be enough
506  * to explain a certain bound change;
507  * this method should be called in one of the following two cases:
508  * 1. Before calling the SCIPanalyzeConflict() method, SCIPaddConflictRelaxedUb() should be called for each (relaxed) upper
509  * bound that led to the conflict (e.g. the infeasibility of globally or locally valid constraint).
510  * 2. In the propagation conflict resolving method of a constraint handler, SCIPaddConflictRelaxedUb() should be
511  * called for each (relaxed) upper bound, whose current assignment led to the deduction of the given conflict
512  * bound.
513  *
514  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
515  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
516  *
517  * @pre This method can be called if SCIP is in one of the following stages:
518  * - \ref SCIP_STAGE_PRESOLVING
519  * - \ref SCIP_STAGE_SOLVING
520  *
521  * @note SCIP stage does not get changed
522  */
524  SCIP* scip, /**< SCIP data structure */
525  SCIP_VAR* var, /**< variable whose upper bound should be added to conflict candidate queue */
526  SCIP_BDCHGIDX* bdchgidx, /**< bound change index representing time on path to current node, when the
527  * conflicting bound was valid, NULL for current local bound */
528  SCIP_Real relaxedub /**< the relaxed upper bound */
529  )
530 {
531  SCIP_CALL( SCIPcheckStage(scip, "SCIPaddConflictRelaxedUb", FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
532 
533  assert( var->scip == scip );
534 
535  SCIP_CALL( SCIPconflictAddRelaxedBound(scip->conflict, scip->mem->probmem, scip->set, scip->stat, var, SCIP_BOUNDTYPE_UPPER, bdchgidx, relaxedub) );
536 
537  return SCIP_OKAY;
538 }
539 
540 /** adds lower or upper bound of variable at the time of the given bound change index to the conflict analysis' candidate
541  * storage; this method should be called in one of the following two cases:
542  * 1. Before calling the SCIPanalyzeConflict() method, SCIPaddConflictBd() should be called for each bound
543  * that led to the conflict (e.g. the infeasibility of globally or locally valid constraint).
544  * 2. In the propagation conflict resolving method of a constraint handler, SCIPaddConflictBd() should be called
545  * for each bound, whose current assignment led to the deduction of the given conflict bound.
546  *
547  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
548  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
549  *
550  * @pre This method can be called if SCIP is in one of the following stages:
551  * - \ref SCIP_STAGE_PRESOLVING
552  * - \ref SCIP_STAGE_SOLVING
553  *
554  * @note SCIP stage does not get changed
555  */
557  SCIP* scip, /**< SCIP data structure */
558  SCIP_VAR* var, /**< variable whose upper bound should be added to conflict candidate queue */
559  SCIP_BOUNDTYPE boundtype, /**< the type of the conflicting bound (lower or upper bound) */
560  SCIP_BDCHGIDX* bdchgidx /**< bound change index representing time on path to current node, when the
561  * conflicting bound was valid, NULL for current local bound */
562  )
563 {
564  SCIP_CALL( SCIPcheckStage(scip, "SCIPaddConflictBd", FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
565 
566  assert( var->scip == scip );
567 
568  SCIP_CALL( SCIPconflictAddBound(scip->conflict, scip->mem->probmem, scip->set, scip->stat, var, boundtype, bdchgidx) );
569 
570  return SCIP_OKAY;
571 }
572 
573 /** adds lower or upper bound of variable at the time of the given bound change index to the conflict analysis'
574  * candidate storage; with the additional information of a relaxed upper bound; this relaxed upper bound is the one
575  * which would be enough to explain a certain bound change;
576  * this method should be called in one of the following two cases:
577  * 1. Before calling the SCIPanalyzeConflict() method, SCIPaddConflictRelaxedBd() should be called for each (relaxed)
578  * bound that led to the conflict (e.g. the infeasibility of globally or locally valid constraint).
579  * 2. In the propagation conflict resolving method of a constraint handler, SCIPaddConflictRelaxedBd() should be
580  * called for each (relaxed) bound, whose current assignment led to the deduction of the given conflict bound.
581  *
582  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
583  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
584  *
585  * @pre This method can be called if SCIP is in one of the following stages:
586  * - \ref SCIP_STAGE_PRESOLVING
587  * - \ref SCIP_STAGE_SOLVING
588  *
589  * @note SCIP stage does not get changed
590  */
592  SCIP* scip, /**< SCIP data structure */
593  SCIP_VAR* var, /**< variable whose upper bound should be added to conflict candidate queue */
594  SCIP_BOUNDTYPE boundtype, /**< the type of the conflicting bound (lower or upper bound) */
595  SCIP_BDCHGIDX* bdchgidx, /**< bound change index representing time on path to current node, when the
596  * conflicting bound was valid, NULL for current local bound */
597  SCIP_Real relaxedbd /**< the relaxed bound */
598  )
599 {
600  SCIP_CALL( SCIPcheckStage(scip, "SCIPaddConflictRelaxedBd", FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
601 
602  assert( var->scip == scip );
603 
604  SCIP_CALL( SCIPconflictAddRelaxedBound(scip->conflict, scip->mem->probmem, scip->set, scip->stat, var, boundtype, bdchgidx, relaxedbd) );
605 
606  return SCIP_OKAY;
607 }
608 
609 /** adds changed bound of fixed binary variable to the conflict analysis' candidate storage;
610  * this method should be called in one of the following two cases:
611  * 1. Before calling the SCIPanalyzeConflict() method, SCIPaddConflictBinvar() should be called for each fixed binary
612  * variable that led to the conflict (e.g. the infeasibility of globally or locally valid constraint).
613  * 2. In the propagation conflict resolving method of a constraint handler, SCIPaddConflictBinvar() should be called
614  * for each binary variable, whose current fixing led to the deduction of the given conflict bound.
615  *
616  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
617  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
618  *
619  * @pre This method can be called if SCIP is in one of the following stages:
620  * - \ref SCIP_STAGE_PRESOLVING
621  * - \ref SCIP_STAGE_SOLVING
622  *
623  * @note SCIP stage does not get changed
624  */
626  SCIP* scip, /**< SCIP data structure */
627  SCIP_VAR* var /**< binary variable whose changed bound should be added to conflict queue */
628  )
629 {
630  SCIP_CALL( SCIPcheckStage(scip, "SCIPaddConflictBinvar", FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
631 
632  assert(var->scip == scip);
633  assert(SCIPvarIsBinary(var));
634 
635  if( SCIPvarGetLbLocal(var) > 0.5 )
636  {
637  SCIP_CALL( SCIPconflictAddBound(scip->conflict, scip->mem->probmem, scip->set, scip->stat, var, SCIP_BOUNDTYPE_LOWER, NULL) );
638  }
639  else if( SCIPvarGetUbLocal(var) < 0.5 )
640  {
641  SCIP_CALL( SCIPconflictAddBound(scip->conflict, scip->mem->probmem, scip->set, scip->stat, var, SCIP_BOUNDTYPE_UPPER, NULL) );
642  }
643 
644  return SCIP_OKAY;
645 }
646 
647 /** checks if the given variable is already part of the current conflict set or queued for resolving with the same or
648  * even stronger bound
649  *
650  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
651  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
652  *
653  * @pre This method can be called if SCIP is in one of the following stages:
654  * - \ref SCIP_STAGE_PRESOLVING
655  * - \ref SCIP_STAGE_SOLVING
656  *
657  * @note SCIP stage does not get changed
658  */
660  SCIP* scip, /**< SCIP data structure */
661  SCIP_VAR* var, /**< variable whose upper bound should be added to conflict candidate queue */
662  SCIP_BOUNDTYPE boundtype, /**< the type of the conflicting bound (lower or upper bound) */
663  SCIP_BDCHGIDX* bdchgidx, /**< bound change index representing time on path to current node, when the
664  * conflicting bound was valid, NULL for current local bound */
665  SCIP_Bool* used /**< pointer to store if the variable is already used */
666  )
667 {
668  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPisConflictVarUsed", FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
669 
670  assert( var->scip == scip );
671 
672  return SCIPconflictIsVarUsed(scip->conflict, var, scip->set, boundtype, bdchgidx, used);
673 }
674 
675 /** returns the conflict lower bound if the variable is present in the current conflict set; otherwise the global lower
676  * bound
677  *
678  * @return returns the conflict lower bound if the variable is present in the current conflict set; otherwise the global lower
679  * bound
680  *
681  * @pre This method can be called if SCIP is in one of the following stages:
682  * - \ref SCIP_STAGE_PRESOLVING
683  * - \ref SCIP_STAGE_SOLVING
684  *
685  * @note SCIP stage does not get changed
686  */
688  SCIP* scip, /**< SCIP data structure */
689  SCIP_VAR* var /**< problem variable */
690  )
691 {
692  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetConflictVarLb", FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
693 
694  assert( var->scip == scip );
695 
696  return SCIPconflictGetVarLb(scip->conflict, var);
697 }
698 
699 /** returns the conflict upper bound if the variable is present in the current conflict set; otherwise minus global
700  * upper bound
701  *
702  * @return returns the conflict upper bound if the variable is present in the current conflict set; otherwise minus global
703  * upper bound
704  *
705  * @pre This method can be called if SCIP is in one of the following stages:
706  * - \ref SCIP_STAGE_PRESOLVING
707  * - \ref SCIP_STAGE_SOLVING
708  *
709  * @note SCIP stage does not get changed
710  */
712  SCIP* scip, /**< SCIP data structure */
713  SCIP_VAR* var /**< problem variable */
714  )
715 {
716  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetConflictVarUb", FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
717 
718  assert( var->scip == scip );
719 
720  return SCIPconflictGetVarUb(scip->conflict, var);
721 }
722 
723 /** analyzes conflict bounds that were added after a call to SCIPinitConflictAnalysis() with calls to
724  * SCIPaddConflictLb(), SCIPaddConflictUb(), SCIPaddConflictBd(), SCIPaddConflictRelaxedLb(),
725  * SCIPaddConflictRelaxedUb(), SCIPaddConflictRelaxedBd(), or SCIPaddConflictBinvar(); on success, calls the conflict
726  * handlers to create a conflict constraint out of the resulting conflict set; the given valid depth must be a depth
727  * level, at which the conflict set defined by calls to SCIPaddConflictLb(), SCIPaddConflictUb(), SCIPaddConflictBd(),
728  * SCIPaddConflictRelaxedLb(), SCIPaddConflictRelaxedUb(), SCIPaddConflictRelaxedBd(), and SCIPaddConflictBinvar() is
729  * valid for the whole subtree; if the conflict was found by a violated constraint, use SCIPanalyzeConflictCons()
730  * instead of SCIPanalyzeConflict() to make sure, that the correct valid depth is used
731  *
732  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
733  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
734  *
735  * @pre This method can be called if SCIP is in one of the following stages:
736  * - \ref SCIP_STAGE_PRESOLVING
737  * - \ref SCIP_STAGE_SOLVING
738  *
739  * @note SCIP stage does not get changed
740  */
742  SCIP* scip, /**< SCIP data structure */
743  int validdepth, /**< minimal depth level at which the initial conflict set is valid */
744  SCIP_Bool* success /**< pointer to store whether a conflict constraint was created, or NULL */
745  )
746 {
747  SCIP_CALL( SCIPcheckStage(scip, "SCIPanalyzeConflict", FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
748 
749  SCIP_CALL( SCIPconflictAnalyze(scip->conflict, scip->mem->probmem, scip->set, scip->stat,
750  scip->transprob, scip->tree, validdepth, success) );
751 
752  return SCIP_OKAY;
753 }
754 
755 /** analyzes conflict bounds that were added with calls to SCIPaddConflictLb(), SCIPaddConflictUb(),
756  * SCIPaddConflictBd(), SCIPaddConflictRelaxedLb(), SCIPaddConflictRelaxedUb(), SCIPaddConflictRelaxedBd(), or
757  * SCIPaddConflictBinvar(); on success, calls the conflict handlers to create a conflict constraint out of the
758  * resulting conflict set; the given constraint must be the constraint that detected the conflict, i.e. the constraint
759  * that is infeasible in the local bounds of the initial conflict set (defined by calls to SCIPaddConflictLb(),
760  * SCIPaddConflictUb(), SCIPaddConflictBd(), SCIPaddConflictRelaxedLb(), SCIPaddConflictRelaxedUb(),
761  * SCIPaddConflictRelaxedBd(), and SCIPaddConflictBinvar())
762  *
763  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
764  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
765  *
766  * @pre This method can be called if SCIP is in one of the following stages:
767  * - \ref SCIP_STAGE_PRESOLVING
768  * - \ref SCIP_STAGE_SOLVING
769  *
770  * @note SCIP stage does not get changed
771  */
773  SCIP* scip, /**< SCIP data structure */
774  SCIP_CONS* cons, /**< constraint that detected the conflict */
775  SCIP_Bool* success /**< pointer to store whether a conflict constraint was created, or NULL */
776  )
777 {
778  SCIP_CALL( SCIPcheckStage(scip, "SCIPanalyzeConflictCons", FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
779 
780  if( SCIPconsIsGlobal(cons) )
781  {
782  SCIP_CALL( SCIPconflictAnalyze(scip->conflict, scip->mem->probmem, scip->set, scip->stat,
783  scip->transprob, scip->tree, 0, success) );
784  }
785  else if( SCIPconsIsActive(cons) )
786  {
787  SCIP_CALL( SCIPconflictAnalyze(scip->conflict, scip->mem->probmem, scip->set, scip->stat,
788  scip->transprob, scip->tree, SCIPconsGetValidDepth(cons), success) );
789  }
790 
791  return SCIP_OKAY;
792 }
internal methods for separators
SCIP_STAT * stat
Definition: struct_scip.h:69
enum SCIP_BoundType SCIP_BOUNDTYPE
Definition: type_lp.h:50
void SCIPconflicthdlrSetInit(SCIP_CONFLICTHDLR *conflicthdlr, SCIP_DECL_CONFLICTINIT((*conflictinit)))
Definition: conflict.c:717
#define NULL
Definition: def.h:246
internal methods for managing events
default message handler
trivialnegation primal heuristic
internal methods for storing primal CIP solutions
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:4183
SCIP_RETCODE SCIPsetConflicthdlrInit(SCIP *scip, SCIP_CONFLICTHDLR *conflicthdlr, SCIP_DECL_CONFLICTINIT((*conflictinit)))
methods to interpret (evaluate) an expression tree "fast"
SCIP_CONFLICTHDLR ** conflicthdlrs
Definition: struct_set.h:74
internal methods for branch and bound tree
SCIP_CONFLICT * conflict
Definition: struct_scip.h:85
void SCIPconflicthdlrSetExit(SCIP_CONFLICTHDLR *conflicthdlr, SCIP_DECL_CONFLICTEXIT((*conflictexit)))
Definition: conflict.c:728
int SCIPconsGetValidDepth(SCIP_CONS *cons)
Definition: cons.c:8159
void SCIPconflicthdlrSetInitsol(SCIP_CONFLICTHDLR *conflicthdlr, SCIP_DECL_CONFLICTINITSOL((*conflictinitsol)))
Definition: conflict.c:739
methods for implications, variable bounds, and cliques
public methods for conflict handler plugins and conflict analysis
internal methods for clocks and timing issues
void SCIPconflicthdlrSetCopy(SCIP_CONFLICTHDLR *conflicthdlr, SCIP_DECL_CONFLICTCOPY((*conflictcopy)))
Definition: conflict.c:695
SCIP_Real SCIPvarGetLbLocal(SCIP_VAR *var)
Definition: var.c:17400
SCIP_RETCODE SCIPaddConflictBinvar(SCIP *scip, SCIP_VAR *var)
internal methods for NLPI solver interfaces
interface methods for specific LP solvers
SCIP_Bool SCIPvarIsBinary(SCIP_VAR *var)
Definition: var.c:16910
internal methods for displaying statistics tables
SCIP_RETCODE SCIPsetConflicthdlrCopy(SCIP *scip, SCIP_CONFLICTHDLR *conflicthdlr, SCIP_DECL_CONFLICTCOPY((*conflictcopy)))
#define FALSE
Definition: def.h:72
methods for the aggregation rows
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:5435
internal methods for Benders&#39; decomposition
#define TRUE
Definition: def.h:71
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)
methods commonly used by primal heuristics
void SCIPconflicthdlrSetPriority(SCIP_CONFLICTHDLR *conflicthdlr, SCIP_SET *set, int priority)
Definition: conflict.c:791
internal methods for branching rules and branching candidate storage
SCIP_RETCODE SCIPisConflictVarUsed(SCIP *scip, SCIP_VAR *var, SCIP_BOUNDTYPE boundtype, SCIP_BDCHGIDX *bdchgidx, SCIP_Bool *used)
datastructures for concurrent solvers
public methods for problem variables
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)))
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
internal methods for handling parameter settings
SCIP_PROB * transprob
Definition: struct_scip.h:87
void SCIPconflicthdlrSetExitsol(SCIP_CONFLICTHDLR *conflicthdlr, SCIP_DECL_CONFLICTEXITSOL((*conflictexitsol)))
Definition: conflict.c:750
methods for creating output for visualization tools (VBC, BAK)
nodereopt branching rule
#define SCIP_DECL_CONFLICTEXIT(x)
SCIP_RETCODE SCIPsetConflicthdlrExitsol(SCIP *scip, SCIP_CONFLICTHDLR *conflicthdlr, SCIP_DECL_CONFLICTEXITSOL((*conflictexitsol)))
internal methods for LP management
SCIP_Bool SCIPconsIsActive(SCIP_CONS *cons)
Definition: cons.c:8137
SCIP_Real SCIPconflictGetVarUb(SCIP_CONFLICT *conflict, SCIP_VAR *var)
Definition: conflict.c:4485
SCIP_RETCODE SCIPaddConflictLb(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx)
internal methods for branching and inference history
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)
internal methods for collecting primal CIP solutions and primal informations
SCIP_Bool SCIPconsIsGlobal(SCIP_CONS *cons)
Definition: cons.c:8305
internal methods for propagators
SCIP_Bool SCIPisConflictAnalysisApplicable(SCIP *scip)
public methods for the branch-and-bound tree
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)
git hash methods
#define SCIP_DECL_CONFLICTEXEC(x)
internal methods for storing and manipulating the main problem
#define SCIPerrorMessage
Definition: pub_message.h:45
methods for block memory pools and memory buffers
register additional core functionality that is designed as plugins
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
int SCIPgetNConflicthdlrs(SCIP *scip)
SCIP_Real SCIPgetConflictVarLb(SCIP *scip, SCIP_VAR *var)
internal methods for presolvers
SCIP_CONFLICTHDLR * SCIPsetFindConflicthdlr(SCIP_SET *set, const char *name)
Definition: set.c:3924
internal methods for NLP management
internal miscellaneous methods
internal methods for node selectors and node priority queues
SCIP_RETCODE SCIPaddConflictRelaxedBd(SCIP *scip, SCIP_VAR *var, SCIP_BOUNDTYPE boundtype, SCIP_BDCHGIDX *bdchgidx, SCIP_Real relaxedbd)
internal methods for variable pricers
struct SCIP_ConflicthdlrData SCIP_CONFLICTHDLRDATA
Definition: type_conflict.h:40
internal methods for global SCIP settings
internal methods for storing conflicts
#define SCIP_CALL(x)
Definition: def.h:358
SCIP main data structure.
BMS_BLKMEM * setmem
Definition: struct_mem.h:39
#define SCIP_DECL_CONFLICTCOPY(x)
Definition: type_conflict.h:77
SCIP_RETCODE SCIPanalyzeConflictCons(SCIP *scip, SCIP_CONS *cons, SCIP_Bool *success)
internal methods for storing priced variables
internal methods for relaxators
internal methods for storing separated cuts
methods commonly used for presolving
methods for catching the user CTRL-C interrupt
SCIP_CONFLICTHDLR ** SCIPgetConflicthdlrs(SCIP *scip)
internal methods for problem variables
data structures and methods for collecting reoptimization information
the function declarations for the synchronization store
internal methods for user interface dialog
#define SCIP_Bool
Definition: def.h:69
SCIP_Bool SCIPconflictApplicable(SCIP_SET *set)
Definition: conflict.c:3673
int SCIPgetDepth(SCIP *scip)
Definition: scip_tree.c:715
internal methods for input file readers
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)
reoptsols primal heuristic
internal methods for storing cuts in a cut pool
SCIP_RETCODE SCIPsetConflicthdlrFree(SCIP *scip, SCIP_CONFLICTHDLR *conflicthdlr, SCIP_DECL_CONFLICTFREE((*conflictfree)))
Constraint handler for linear constraints in their most general form, .
int nconflicthdlrs
Definition: struct_set.h:104
SCIP * scip
Definition: struct_var.h:201
helper functions for concurrent scip solvers
internal methods for return codes for SCIP methods
SCIP_CONFLICTHDLR * SCIPfindConflicthdlr(SCIP *scip, const char *name)
BMS_BLKMEM * probmem
Definition: struct_mem.h:40
internal methods for conflict analysis
internal methods for tree compressions
internal methods for main solving loop and node processing
void SCIPsetSortConflicthdlrs(SCIP_SET *set)
Definition: set.c:3944
SCIP_SET * set
Definition: struct_scip.h:62
SCIP_RETCODE SCIPincludeConflicthdlrBasic(SCIP *scip, SCIP_CONFLICTHDLR **conflicthdlrptr, const char *name, const char *desc, int priority, SCIP_DECL_CONFLICTEXEC((*conflictexec)), SCIP_CONFLICTHDLRDATA *conflicthdlrdata)
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:3825
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:4244
SCIP_MESSAGEHDLR * messagehdlr
Definition: struct_scip.h:65
default user interface dialog
#define SCIP_Real
Definition: def.h:157
internal methods for problem statistics
enum SCIP_ConflictType SCIP_CONFTYPE
Definition: type_conflict.h:56
SCIP_Real SCIPconflictGetVarLb(SCIP_CONFLICT *conflict, SCIP_VAR *var)
Definition: conflict.c:4468
SCIP_RETCODE SCIPconflictIsVarUsed(SCIP_CONFLICT *conflict, SCIP_VAR *var, SCIP_SET *set, SCIP_BOUNDTYPE boundtype, SCIP_BDCHGIDX *bdchgidx, SCIP_Bool *used)
Definition: conflict.c:4408
#define SCIP_DECL_CONFLICTINIT(x)
Definition: type_conflict.h:93
internal methods for constraints and constraint handlers
SCIP_TREE * tree
Definition: struct_scip.h:84
declarations for XML parsing
build flags methods
SCIP_Real SCIPvarGetUbLocal(SCIP_VAR *var)
Definition: var.c:17410
common defines and data types used in all packages of SCIP
#define SCIP_DECL_CONFLICTFREE(x)
Definition: type_conflict.h:85
#define SCIP_CALL_ABORT(x)
Definition: def.h:337
internal methods for primal heuristics
SCIP_RETCODE SCIPsetIncludeConflicthdlr(SCIP_SET *set, SCIP_CONFLICTHDLR *conflicthdlr)
Definition: set.c:3900
internal methods for Benders&#39; decomposition cuts
SCIP_RETCODE SCIPanalyzeConflict(SCIP *scip, int validdepth, SCIP_Bool *success)
SCIP_RETCODE SCIPsetConflicthdlrPriority(SCIP *scip, SCIP_CONFLICTHDLR *conflicthdlr, int priority)
internal methods for displaying runtime statistics
#define SCIP_DECL_CONFLICTEXITSOL(x)
OFINS - Objective Function Induced Neighborhood Search - a primal heuristic for reoptimization.