Scippy

SCIP

Solving Constraint Integer Programs

conflict_resolution.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-2025 Zuse Institute Berlin (ZIB) */
7/* */
8/* Licensed under the Apache License, Version 2.0 (the "License"); */
9/* you may not use this file except in compliance with the License. */
10/* You may obtain a copy of the License at */
11/* */
12/* http://www.apache.org/licenses/LICENSE-2.0 */
13/* */
14/* Unless required by applicable law or agreed to in writing, software */
15/* distributed under the License is distributed on an "AS IS" BASIS, */
16/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
17/* See the License for the specific language governing permissions and */
18/* limitations under the License. */
19/* */
20/* You should have received a copy of the Apache-2.0 license */
21/* along with SCIP; see the file LICENSE. If not visit scipopt.org. */
22/* */
23/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
24
25/**@file conflict_resolution.h
26 * @ingroup OTHER_CFILES
27 * @brief Methods for generalized resolution conflict analysis.
28 * @author Gioni Mexi
29 *
30 * This file implements a conflict analysis method based on generalized resolution,
31 * as detailed in the paper:
32 *
33 * Gioni Mexi, et al. "Cut-based Conflict Analysis in Mixed Integer Programming."
34 * arXiv preprint arXiv:2410.15110 (2024).
35 *
36 * The generalized resolution conflict analysis procedure starts with an initial
37 * conflict row and it iteratively aggregates this row with a reason row—the row
38 * that propagated the bound change causing the conflict. The aggregation
39 * cancels the coefficient of the resolving variable. This process continues
40 * until a first unique implication point (FUIP) is reached. If the aggregation
41 * does not yield a valid (infeasible) row, the algorithm attempts to reduce the
42 * reason row (e.g., using MIR reduction) and retries the aggregation. Once a
43 * valid conflict row with negative slack is generated, a conflict constraint is
44 * constructed and added to the problem.
45 *
46 */
47
48/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
49
50#ifndef __SCIP_CONFLICT_RESOLUTION_H__
51#define __SCIP_CONFLICT_RESOLUTION_H__
52
53#include "scip/type_conflict.h"
54#include "scip/type_reopt.h"
55#include "scip/type_implics.h"
56#include "scip/type_set.h"
57#include "scip/type_stat.h"
58#include "scip/type_lp.h"
59#include "scip/type_branch.h"
60#include "scip/type_var.h"
61#include "scip/type_prob.h"
62#include "scip/type_event.h"
63
64#ifdef __cplusplus
65extern "C" {
66#endif
67
68/** return TRUE if generalized resolution conflict analysis is applicable */
70 SCIP_SET* set /**< global SCIP settings */
71 );
72
73/** gets number of conflict constraints found during propagation with the generalized resolution conflict analysis */
75 SCIP_CONFLICT* conflict /**< conflict analysis data */
76 );
77
78/** gets number of calls to generalized resolution conflict analysis that yield at least one conflict constraint */
80 SCIP_CONFLICT* conflict /**< conflict analysis data */
81 );
82
83/** gets number of calls to generalized resolution conflict analysis terminating because of large coefficients */
85 SCIP_CONFLICT* conflict /**< conflict analysis data */
86 );
87
88/** gets number of calls to generalized resolution conflict analysis terminating because of long conflicts */
90 SCIP_CONFLICT* conflict /**< conflict analysis data */
91 );
92
93/** gets number of calls to generalized resolution conflict analysis */
95 SCIP_CONFLICT* conflict /**< conflict analysis data */
96 );
97
98/** create constraints out of the conflict row and add them to the problem */
100 SCIP_CONFLICT* conflict, /**< conflict analysis data */
101 BMS_BLKMEM* blkmem, /**< block memory */
102 SCIP_SET* set, /**< global SCIP settings */
103 SCIP_STAT* stat, /**< dynamic problem statistics */
104 SCIP_PROB* transprob, /**< transformed problem */
105 SCIP_PROB* origprob, /**< original problem */
106 SCIP_TREE* tree, /**< branch and bound tree */
107 SCIP_REOPT* reopt, /**< reoptimization data structure */
108 SCIP_LP* lp, /**< current LP data */
109 SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
110 SCIP_EVENTQUEUE* eventqueue, /**< event queue */
111 SCIP_EVENTFILTER* eventfilter, /**< global event filter */
112 SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
113 SCIP_CONFLICTROW* conflictrow, /**< conflict row to add to the tree */
114 SCIP_Bool* success /**< true if the conflict is added to the problem */
115 );
116
117/** creates and clears the conflict rows */
119 SCIP_CONFLICT* conflict, /**< conflict analysis data */
120 BMS_BLKMEM* blkmem /**< block memory of transformed problem */
121 );
122
123/** frees a conflict row */
125 SCIP_CONFLICTROW** row, /**< conflict row */
126 BMS_BLKMEM* blkmem /**< block memory */
127 );
128
129#ifdef __cplusplus
130}
131#endif
132
133
134#endif
void SCIPconflictRowFree(SCIP_CONFLICTROW **row, BMS_BLKMEM *blkmem)
SCIP_RETCODE SCIPconflictAddConflictCon(SCIP_CONFLICT *conflict, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_TREE *tree, SCIP_REOPT *reopt, SCIP_LP *lp, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter, SCIP_CLIQUETABLE *cliquetable, SCIP_CONFLICTROW *conflictrow, SCIP_Bool *success)
SCIP_Longint SCIPconflictGetNResConflictConss(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNResLargeCoefs(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNResSuccess(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNResCalls(SCIP_CONFLICT *conflict)
SCIP_RETCODE SCIPconflictInitRows(SCIP_CONFLICT *conflict, BMS_BLKMEM *blkmem)
SCIP_Longint SCIPconflictGetNResLongConflicts(SCIP_CONFLICT *conflict)
SCIP_Bool SCIPconflictResolutionApplicable(SCIP_SET *set)
#define SCIP_Longint
Definition: def.h:141
#define SCIP_Bool
Definition: def.h:91
struct BMS_BlkMem BMS_BLKMEM
Definition: memory.h:437
Definition: heur_padm.c:135
type definitions for branching rules
type definitions for conflict analysis
type definitions for managing events
type definitions for implications, variable bounds, and cliques
type definitions for LP management
type definitions for storing and manipulating the main problem
type definitions for collecting reoptimization information
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:63
type definitions for global SCIP settings
type definitions for problem statistics
type definitions for problem variables