scip_conflict.h
Go to the documentation of this file.
29 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
75 * @note method has all conflict handler callbacks as arguments and is thus changed every time a new
86 SCIP_DECL_CONFLICTCOPY((*conflictcopy)), /**< copy method of conflict handler or NULL if you don't want to copy your plugin into sub-SCIPs */
90 SCIP_DECL_CONFLICTINITSOL((*conflictinitsol)),/**< solving process initialization method of conflict handler */
91 SCIP_DECL_CONFLICTEXITSOL((*conflictexitsol)),/**< solving process deinitialization method of conflict handler */
96 /** creates a conflict handler and includes it in SCIP with its most fundamental callbacks. All non-fundamental
98 * Optional callbacks can be set via specific setter functions SCIPsetConflicthdlrCopy(), SCIPsetConflicthdlrFree(),
102 * @note if you want to set all callbacks with a single method call, consider using SCIPincludeConflicthdlr() instead
152 SCIP_DECL_CONFLICTINITSOL((*conflictinitsol))/**< solving process initialization method of conflict handler */
160 SCIP_DECL_CONFLICTEXITSOL((*conflictexitsol))/**< solving process deinitialization method of conflict handler */
197 /** return TRUE if conflict analysis is applicable; In case the function return FALSE there is no need to initialize the
200 * @return return TRUE if conflict analysis is applicable; In case the function return FALSE there is no need to initialize the
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();
220 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
236 /** adds lower bound of variable at the time of the given bound change index to the conflict analysis' candidate storage;
238 * 1. Before calling the SCIPanalyzeConflict() method, SCIPaddConflictLb() should be called for each lower bound
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.
243 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
256 SCIP_BDCHGIDX* bdchgidx /**< bound change index representing time on path to current node, when the
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
264 * 1. Before calling the SCIPanalyzeConflict() method, SCIPaddConflictRelaxedLb() should be called for each (relaxed) lower bound
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.
269 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
282 SCIP_BDCHGIDX* bdchgidx, /**< bound change index representing time on path to current node, when the
287 /** adds upper bound of variable at the time of the given bound change index to the conflict analysis' candidate storage;
289 * 1. Before calling the SCIPanalyzeConflict() method, SCIPaddConflictUb() should be called for each upper bound that
291 * 2. In the propagation conflict resolving method of a constraint handler, SCIPaddConflictUb() should be called for
294 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
307 SCIP_BDCHGIDX* bdchgidx /**< bound change index representing time on path to current node, when the
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
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
321 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
334 SCIP_BDCHGIDX* bdchgidx, /**< bound change index representing time on path to current node, when the
339 /** adds lower or upper bound of variable at the time of the given bound change index to the conflict analysis' candidate
341 * 1. Before calling the SCIPanalyzeConflict() method, SCIPaddConflictBd() should be called for each bound
343 * 2. In the propagation conflict resolving method of a constraint handler, SCIPaddConflictBd() should be called
346 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
360 SCIP_BDCHGIDX* bdchgidx /**< bound change index representing time on path to current node, when the
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
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.
373 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
387 SCIP_BDCHGIDX* bdchgidx, /**< bound change index representing time on path to current node, when the
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.
399 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
414 /** checks if the given variable is already part of the current conflict set or queued for resolving with the same or
417 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
431 SCIP_BDCHGIDX* bdchgidx, /**< bound change index representing time on path to current node, when the
436 /** returns the conflict lower bound if the variable is present in the current conflict set; otherwise the global lower
439 * @return returns the conflict lower bound if the variable is present in the current conflict set; otherwise the global lower
454 /** returns the conflict upper bound if the variable is present in the current conflict set; otherwise minus global
457 * @return returns the conflict upper bound if the variable is present in the current conflict set; otherwise minus global
472 /** analyzes conflict bounds that were added after a call to SCIPinitConflictAnalysis() with calls to
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()
481 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
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(),
505 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
Definition: struct_var.h:99
SCIP_RETCODE SCIPsetConflicthdlrInit(SCIP *scip, SCIP_CONFLICTHDLR *conflicthdlr, SCIP_DECL_CONFLICTINIT((*conflictinit)))
Definition: scip_conflict.c:241
internal methods for branch and bound tree
Definition: struct_scip.h:58
SCIP_RETCODE SCIPaddConflictBinvar(SCIP *scip, SCIP_VAR *var)
Definition: scip_conflict.c:625
Definition: struct_var.h:198
SCIP_RETCODE SCIPsetConflicthdlrCopy(SCIP *scip, SCIP_CONFLICTHDLR *conflicthdlr, SCIP_DECL_CONFLICTCOPY((*conflictcopy)))
Definition: scip_conflict.c:209
SCIP_Real SCIPgetConflictVarUb(SCIP *scip, SCIP_VAR *var)
Definition: scip_conflict.c:711
SCIP_RETCODE SCIPaddConflictUb(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx)
Definition: scip_conflict.c:488
SCIP_RETCODE SCIPisConflictVarUsed(SCIP *scip, SCIP_VAR *var, SCIP_BOUNDTYPE boundtype, SCIP_BDCHGIDX *bdchgidx, SCIP_Bool *used)
Definition: scip_conflict.c:659
SCIP_RETCODE SCIPaddConflictRelaxedLb(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx, SCIP_Real relaxedlb)
Definition: scip_conflict.c:455
SCIP_RETCODE SCIPinitConflictAnalysis(SCIP *scip, SCIP_CONFTYPE conftype, SCIP_Bool iscutoffinvolved)
Definition: scip_conflict.c:392
SCIP_RETCODE SCIPsetConflicthdlrExit(SCIP *scip, SCIP_CONFLICTHDLR *conflicthdlr, SCIP_DECL_CONFLICTEXIT((*conflictexit)))
Definition: scip_conflict.c:257
type definitions for return codes for SCIP methods
SCIP_RETCODE SCIPsetConflicthdlrExitsol(SCIP *scip, SCIP_CONFLICTHDLR *conflicthdlr, SCIP_DECL_CONFLICTEXITSOL((*conflictexitsol)))
Definition: scip_conflict.c:289
SCIP_RETCODE SCIPaddConflictLb(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx)
Definition: scip_conflict.c:421
SCIP_RETCODE SCIPsetConflicthdlrInitsol(SCIP *scip, SCIP_CONFLICTHDLR *conflicthdlr, SCIP_DECL_CONFLICTINITSOL((*conflictinitsol)))
Definition: scip_conflict.c:273
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:134
Definition: struct_conflict.h:40
type definitions for LP management
SCIP_Bool SCIPisConflictAnalysisApplicable(SCIP *scip)
Definition: scip_conflict.c:370
Definition: struct_cons.h:37
type definitions for SCIP's main datastructure
SCIP_Real SCIPgetConflictVarLb(SCIP *scip, SCIP_VAR *var)
Definition: scip_conflict.c:687
internal miscellaneous methods
SCIP_RETCODE SCIPaddConflictRelaxedBd(SCIP *scip, SCIP_VAR *var, SCIP_BOUNDTYPE boundtype, SCIP_BDCHGIDX *bdchgidx, SCIP_Real relaxedbd)
Definition: scip_conflict.c:591
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
SCIP_RETCODE SCIPanalyzeConflictCons(SCIP *scip, SCIP_CONS *cons, SCIP_Bool *success)
Definition: scip_conflict.c:772
type definitions for conflict analysis
SCIP_CONFLICTHDLR ** SCIPgetConflicthdlrs(SCIP *scip)
Definition: scip_conflict.c:318
internal methods for problem variables
methods for debugging
SCIP_RETCODE SCIPaddConflictRelaxedUb(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx, SCIP_Real relaxedub)
Definition: scip_conflict.c:523
SCIP_RETCODE SCIPaddConflictBd(SCIP *scip, SCIP_VAR *var, SCIP_BOUNDTYPE boundtype, SCIP_BDCHGIDX *bdchgidx)
Definition: scip_conflict.c:556
type definitions for branch and bound tree
SCIP_RETCODE SCIPsetConflicthdlrFree(SCIP *scip, SCIP_CONFLICTHDLR *conflicthdlr, SCIP_DECL_CONFLICTFREE((*conflictfree)))
Definition: scip_conflict.c:225
datastructures for problem statistics
SCIP_CONFLICTHDLR * SCIPfindConflicthdlr(SCIP *scip, const char *name)
Definition: scip_conflict.c:305
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)
Definition: scip_conflict.c:177
result codes for SCIP callback methods
internal methods for constraints and constraint handlers
common defines and data types used in all packages of SCIP
Definition: objbenders.h:33
SCIP_RETCODE SCIPanalyzeConflict(SCIP *scip, int validdepth, SCIP_Bool *success)
Definition: scip_conflict.c:741
SCIP_RETCODE SCIPsetConflicthdlrPriority(SCIP *scip, SCIP_CONFLICTHDLR *conflicthdlr, int priority)
Definition: scip_conflict.c:342
type definitions for constraints and constraint handlers