Scippy

    SCIP

    Solving Constraint Integer Programs

    Detailed Description

    Methods for generalized resolution conflict analysis.

    Author
    Gioni Mexi

    This file implements a conflict analysis method based on generalized resolution, as detailed in the paper:

    Gioni Mexi, et al. "Cut-based Conflict Analysis in Mixed Integer Programming." arXiv preprint arXiv:2410.15110 (2024).

    The generalized resolution conflict analysis procedure starts with an initial conflict row and it iteratively aggregates this row with a reason row—the row that propagated the bound change causing the conflict. The aggregation cancels the coefficient of the resolving variable. This process continues until a first unique implication point (FUIP) is reached. If the aggregation does not yield a valid (infeasible) row, the algorithm attempts to reduce the reason row (e.g., using MIR reduction) and retries the aggregation. Once a valid conflict row with negative slack is generated, a conflict constraint is constructed and added to the problem.

    Definition in file conflict_resolution.c.

    #include "blockmemshell/memory.h"
    #include "scip/clock.h"
    #include "scip/conflict.h"
    #include "scip/conflict_resolution.h"
    #include "scip/cons.h"
    #include "scip/cons_linear.h"
    #include "scip/cuts.h"
    #include "scip/history.h"
    #include "scip/prob.h"
    #include "scip/prop.h"
    #include "scip/pub_cons.h"
    #include "scip/pub_conflict.h"
    #include "scip/pub_lp.h"
    #include "scip/pub_message.h"
    #include "scip/pub_misc.h"
    #include "scip/pub_var.h"
    #include "scip/scip_conflict.h"
    #include "scip/scip_cons.h"
    #include "scip/scip_mem.h"
    #include "scip/scip_prob.h"
    #include "scip/scip_sol.h"
    #include "scip/scip_var.h"
    #include "scip/set.h"
    #include "scip/sol.h"
    #include "scip/struct_conflict.h"
    #include "scip/struct_lp.h"
    #include "scip/struct_prob.h"
    #include "scip/struct_set.h"
    #include "scip/struct_stat.h"
    #include "scip/tree.h"
    #include "scip/var.h"
    #include <string.h>
    #include <strings.h>

    Go to the source code of this file.

    Macros

    #define BOUNDSWITCH   0.51
     
    #define POSTPROCESS   FALSE
     
    #define USEVBDS   FALSE
     
    #define FIXINTEGRALRHS   FALSE
     
    #define MINFRAC   0.05
     
    #define MAXFRAC   0.999
     
    #define EPS   1e-06
     

    Functions

    static SCIP_RETCODE conflictRowCopy (SCIP_CONFLICTROW **targetrow, BMS_BLKMEM *blkmem, SCIP_CONFLICTROW *sourcerow)
     
    static SCIP_RETCODE conflictRowReplace (SCIP_CONFLICTROW *targetrow, BMS_BLKMEM *blkmem, SCIP_CONFLICTROW *sourcerow)
     
    static SCIP_RETCODE conflictEnsureConflictRowsMem (SCIP_CONFLICT *conflict, SCIP_SET *set, int num)
     
    static SCIP_RETCODE conflictInsertConflictRow (SCIP_CONFLICT *conflict, SCIP_SET *set, SCIP_CONFLICTROW **conflictrow)
     
    SCIP_Longint SCIPconflictGetNResConflictConss (SCIP_CONFLICT *conflict)
     
    SCIP_Longint SCIPconflictGetNResSuccess (SCIP_CONFLICT *conflict)
     
    SCIP_Longint SCIPconflictGetNResLargeCoefs (SCIP_CONFLICT *conflict)
     
    SCIP_Longint SCIPconflictGetNResLongConflicts (SCIP_CONFLICT *conflict)
     
    SCIP_Longint SCIPconflictGetNResCalls (SCIP_CONFLICT *conflict)
     
    static int conflictCalcResMaxsize (SCIP_SET *set, SCIP_PROB *prob)
     
    static SCIP_RETCODE tightenCoefs (SCIP_SET *set, SCIP_VAR **vars, SCIP_Bool localbounds, SCIP_Real *rowcoefs, int *rowinds, int *rownnz, SCIP_Real *rowlhs, int *nchgcoefs, SCIP_Bool *redundant)
     
    static SCIP_Bool hasRelaxationOnlyVar (SCIP_SET *set, SCIP_VAR **vars, SCIP_CONFLICTROW *row)
     
    static SCIP_Bool isBinaryConflictRow (SCIP_SET *set, SCIP_VAR **vars, SCIP_CONFLICTROW *row)
     
    static void conflictRowRemoveZeroVar (SCIP_CONFLICTROW *row, SCIP_SET *set, int pos)
     
    static void conflictRowRemoveZeroVars (SCIP_CONFLICTROW *row, SCIP_SET *set)
     
    static SCIP_RETCODE ComplementedMirLhs (SCIP_SET *set, SCIP_VAR **vars, SCIP_CONFLICTROW *reasonrow, int *fixsides, SCIP_BDCHGIDX *currbdchgidx, int idxreason, SCIP_Real divisor)
     
    static void linearCombRows (SCIP_SET *set, SCIP_CONFLICTROW *row1, SCIP_CONFLICTROW *row2, SCIP_Real scale)
     
    static SCIP_Bool isResolvableBdchg (SCIP_BDCHGINFO *bdchginfo)
     
    static SCIP_Bool existsResolvablebdchginfo (SCIP_CONFLICT *conflict)
     
    static SCIP_Bool isBdchgConflictRelevant (SCIP_CONFLICT *conflict, SCIP_BDCHGINFO *bdchginfo, int initial)
     
    static SCIP_BDCHGINFOconflictFirstCand (SCIP_SET *set, SCIP_CONFLICT *conflict, int initial)
     
    static SCIP_BDCHGINFOconflictRemoveCand (SCIP_CONFLICT *conflict, int initial)
     
    SCIP_Bool SCIPconflictResolutionApplicable (SCIP_SET *set)
     
    static SCIP_RETCODE conflictRowCreate (SCIP_CONFLICTROW **row, BMS_BLKMEM *blkmem)
     
    SCIP_RETCODE SCIPconflictInitRows (SCIP_CONFLICT *conflict, BMS_BLKMEM *blkmem)
     
    void SCIPconflictRowFree (SCIP_CONFLICTROW **row, BMS_BLKMEM *blkmem)
     
    static void freeConflictResources (SCIP_CONFLICT *conflict, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_Real *fixbounds, int *fixsides)
     
    static void conflictRowClear (BMS_BLKMEM *blkmem, SCIP_CONFLICTROW *row, int nvars)
     
    static SCIP_RETCODE computeSlack (SCIP_SET *set, SCIP_VAR **vars, SCIP_CONFLICTROW *row, SCIP_BDCHGINFO *currbdchginfo, SCIP_Real *fixbounds, int *fixsides)
     
    static SCIP_RETCODE MirReduction (SCIP_SET *set, BMS_BLKMEM *blkmem, SCIP_VAR **vars, int nvars, SCIP_CONFLICTROW *reasonrow, SCIP_BDCHGINFO *currbdchginfo, int varidx, SCIP_Real divisor)
     
    static void weakenVarConflictRow (SCIP_CONFLICTROW *row, SCIP_SET *set, SCIP_VAR *var, int pos)
     
    static void weakenConflictRow (SCIP_CONFLICTROW *row, SCIP_SET *set, SCIP_VAR **vars, SCIP_BDCHGIDX *currbdchgidx, int *fixsides)
     
    static SCIP_RETCODE weakenContinuousVarsConflictRow (SCIP_CONFLICTROW *row, SCIP_SET *set, SCIP_VAR **vars, int residx)
     
    static SCIP_Real getQuotLargestSmallestCoef (SCIP_SET *set, int *inds, SCIP_Real *vals, int nnz)
     
    static SCIP_RETCODE updateBdchgQueue (SCIP_SET *set, SCIP_VAR **vars, SCIP_CONFLICTROW *conflictrow, SCIP_BDCHGIDX *inferbdchgidx)
     
    static SCIP_RETCODE slackReducingContinuousBdchgQueue (SCIP_CONFLICT *conflict, SCIP_VAR **vars, SCIP_CONFLICTROW *row, SCIP_BDCHGIDX *inferbdchgidx)
     
    static SCIP_RETCODE incVSIDS (SCIP_VAR *var, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_BOUNDTYPE boundtype, SCIP_Real value, SCIP_Real weight)
     
    static SCIP_RETCODE updateStatistics (SCIP_CONFLICT *conflict, SCIP_VAR **vars, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_CONFLICTROW *conflictrow, int insertdepth)
     
    static SCIP_RETCODE createAndAddConflictCon (SCIP_CONFLICT *conflict, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_VAR **vars, SCIP_TREE *tree, SCIP_REOPT *reopt, SCIP_LP *lp, SCIP_CLIQUETABLE *cliquetable, SCIP_CONFLICTROW *conflictrow, int insertdepth, SCIP_Bool *success)
     
    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)
     
    static SCIP_RETCODE conflictRowAddSemiSparseData (SCIP_CONFLICTROW *resolutionrow, BMS_BLKMEM *blkmem, SCIP_Real *vals, int *inds, int nnz, SCIP_Real lhs, SCIP_Bool reverse)
     
    static SCIP_Real computeScaleReason (SCIP_SET *set, SCIP_CONFLICTROW *conflictrow, SCIP_CONFLICTROW *reasonrow, int residx)
     
    static SCIP_RETCODE rescaleAndResolve (SCIP_SET *set, SCIP_CONFLICT *conflict, SCIP_CONFLICTROW *row1, SCIP_CONFLICTROW *row2, SCIP_CONFLICTROW *resolvedrow, BMS_BLKMEM *blkmem, int residx, SCIP_Bool *success)
     
    static SCIP_RETCODE reduceReason (SCIP_SET *set, BMS_BLKMEM *blkmem, SCIP_VAR **vars, int nvars, SCIP_CONFLICTROW *rowtoreduce, SCIP_BDCHGINFO *currbdchginfo, int residx, SCIP_Real *fixbounds, int *fixsides)
     
    static SCIP_RETCODE reasonRowFromLpRow (SCIP_SET *set, BMS_BLKMEM *blkmem, SCIP_ROW *row, SCIP_CONFLICTROW *reasonrow, SCIP_BDCHGINFO *bdchginfo)
     
    static SCIP_RETCODE conflictRowFromLpRow (SCIP_SET *set, BMS_BLKMEM *blkmem, SCIP_ROW *row, SCIP_CONFLICTROW *conflictrow, SCIP_BDCHGINFO *bdchginfo)
     
    static SCIP_RETCODE getReasonRow (BMS_BLKMEM *blkmem, SCIP_VAR **vars, SCIP_SET *set, SCIP_BDCHGINFO *currbdchginfo, SCIP_CONFLICTROW *reasonrow, int residx, SCIP_Real *fixbounds, int *fixsides, SCIP_Bool *success)
     
    static SCIP_RETCODE getConflictRow (SCIP_CONFLICT *conflict, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_PROB *prob, SCIP_ROW *initialconflictrow, SCIP_BDCHGINFO *currbdchginfo, int maxsize, SCIP_Bool *success)
     
    static SCIP_RETCODE executeResolutionStep (SCIP_CONFLICT *conflict, SCIP_SET *set, SCIP_VAR **vars, BMS_BLKMEM *blkmem, SCIP_BDCHGINFO *currbdchginfo, int residx, int maxsize, SCIP_Real *fixbounds, int *fixsides, SCIP_Bool *successresolution)
     
    static SCIP_RETCODE markBdchgAsFixed (SCIP_CONFLICT *conflict, SCIP_SET *set, SCIP_VAR **vars, SCIP_BDCHGINFO **currbdchginfo, int *currbdchgdepth, int nressteps, SCIP_Real *fixbounds, int *fixsides, SCIP_Bool *success)
     
    static SCIP_RETCODE addConflictRows (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, int nconstoadd, int *nconss, int *nconfvars)
     
    SCIP_RETCODE conflictAnalyzeResolution (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_ROW *initialconflictrow, int validdepth, int *nconss, int *nconfvars)
     
    SCIP_RETCODE SCIPconflictAnalyzeResolution (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_ROW *initialconflictrow, int validdepth, SCIP_Bool *success)
     

    Macro Definition Documentation

    ◆ BOUNDSWITCH

    #define BOUNDSWITCH   0.51

    threshold for bound switching - see cuts.c

    Definition at line 87 of file conflict_resolution.c.

    ◆ POSTPROCESS

    #define POSTPROCESS   FALSE

    apply postprocessing after MIR calculation - see SCIPcalcMIR()

    Definition at line 88 of file conflict_resolution.c.

    ◆ USEVBDS

    #define USEVBDS   FALSE

    use variable bounds - see SCIPcalcMIR()

    Definition at line 89 of file conflict_resolution.c.

    ◆ FIXINTEGRALRHS

    #define FIXINTEGRALRHS   FALSE

    try to generate an integral rhs - see SCIPcalcMIR()

    Definition at line 90 of file conflict_resolution.c.

    ◆ MINFRAC

    #define MINFRAC   0.05

    minimal fractionality of floor(rhs) - see cuts.c

    Definition at line 91 of file conflict_resolution.c.

    ◆ MAXFRAC

    #define MAXFRAC   0.999

    maximal fractionality of floor(rhs) - see cuts.c

    Definition at line 92 of file conflict_resolution.c.

    ◆ EPS

    #define EPS   1e-06

    Definition at line 94 of file conflict_resolution.c.

    Function Documentation

    ◆ conflictRowCopy()

    static SCIP_RETCODE conflictRowCopy ( SCIP_CONFLICTROW **  targetrow,
    BMS_BLKMEM blkmem,
    SCIP_CONFLICTROW sourcerow 
    )
    static

    creates a copy of the given generalized resolution row, allocating an additional amount of memory

    Parameters
    targetrowpointer to store the generalized resolution row
    blkmemblock memory of transformed problem
    sourcerowsource generalized resolution row

    Definition at line 98 of file conflict_resolution.c.

    References BMSallocBlockMemory, BMSallocBlockMemoryArray, BMScopyMemoryArray, SCIP_ConflictRow::coefquotient, SCIP_ConflictRow::conflictdepth, SCIP_ConflictRow::conflicttype, SCIP_ConflictRow::inds, SCIP_ConflictRow::insertdepth, SCIP_ConflictRow::isbinary, SCIP_ConflictRow::lhs, SCIP_ConflictRow::nnz, NULL, SCIP_ConflictRow::nvars, SCIP_ConflictRow::repropdepth, SCIP_ALLOC, SCIP_OKAY, SCIP_ConflictRow::slack, SCIP_ConflictRow::usescutoffbound, SCIP_ConflictRow::validdepth, and SCIP_ConflictRow::vals.

    Referenced by conflictAnalyzeResolution().

    ◆ conflictRowReplace()

    static SCIP_RETCODE conflictRowReplace ( SCIP_CONFLICTROW targetrow,
    BMS_BLKMEM blkmem,
    SCIP_CONFLICTROW sourcerow 
    )
    static

    ◆ conflictEnsureConflictRowsMem()

    static SCIP_RETCODE conflictEnsureConflictRowsMem ( SCIP_CONFLICT conflict,
    SCIP_SET set,
    int  num 
    )
    static

    resizes conflict rows array to be able to store at least num entries

    Parameters
    conflictconflict analysis data
    setglobal SCIP settings
    numminimal number of slots in array

    Definition at line 184 of file conflict_resolution.c.

    References BMSreallocMemoryArray, SCIP_Conflict::conflictrows, SCIP_Conflict::conflictrowssize, NULL, SCIP_ALLOC, SCIP_OKAY, and SCIPsetCalcMemGrowSize().

    Referenced by conflictInsertConflictRow().

    ◆ conflictInsertConflictRow()

    static SCIP_RETCODE conflictInsertConflictRow ( SCIP_CONFLICT conflict,
    SCIP_SET set,
    SCIP_CONFLICTROW **  conflictrow 
    )
    static

    add conflict row to the array of all conflicts rows

    Parameters
    conflictconflict analysis data
    setglobal SCIP settings
    conflictrowconflict row to add

    Definition at line 208 of file conflict_resolution.c.

    References conflictEnsureConflictRowsMem(), SCIP_Conflict::conflictrows, SCIP_Conflict::nconflictrows, NULL, SCIP_CALL, SCIP_OKAY, and SCIPsetDebugMsgPrint.

    Referenced by conflictAnalyzeResolution().

    ◆ SCIPconflictGetNResConflictConss()

    SCIP_Longint SCIPconflictGetNResConflictConss ( SCIP_CONFLICT conflict)

    gets number of conflict constraints found during propagation with the generalized resolution conflict analysis

    Parameters
    conflictconflict analysis data

    Definition at line 233 of file conflict_resolution.c.

    References SCIP_Conflict::nresconfconss, and NULL.

    Referenced by SCIPgetNConflictConssFound(), and SCIPprintConflictStatistics().

    ◆ SCIPconflictGetNResSuccess()

    SCIP_Longint SCIPconflictGetNResSuccess ( SCIP_CONFLICT conflict)

    gets number of calls to generalized resolution conflict analysis that yield at least one conflict constraint

    Parameters
    conflictconflict analysis data

    Definition at line 243 of file conflict_resolution.c.

    References SCIP_Conflict::nressuccess, and NULL.

    Referenced by SCIPprintConflictStatistics().

    ◆ SCIPconflictGetNResLargeCoefs()

    SCIP_Longint SCIPconflictGetNResLargeCoefs ( SCIP_CONFLICT conflict)

    gets number of calls to generalized resolution conflict analysis terminating because of large coefficients

    Parameters
    conflictconflict analysis data

    Definition at line 254 of file conflict_resolution.c.

    References SCIP_Conflict::nreslargecoefs, and NULL.

    Referenced by SCIPprintConflictStatistics().

    ◆ SCIPconflictGetNResLongConflicts()

    SCIP_Longint SCIPconflictGetNResLongConflicts ( SCIP_CONFLICT conflict)

    gets number of calls to generalized resolution conflict analysis terminating because of long conflicts

    Parameters
    conflictconflict analysis data

    Definition at line 264 of file conflict_resolution.c.

    References SCIP_Conflict::nreslongconfs, and NULL.

    Referenced by SCIPprintConflictStatistics().

    ◆ SCIPconflictGetNResCalls()

    SCIP_Longint SCIPconflictGetNResCalls ( SCIP_CONFLICT conflict)

    gets number of calls to generalized resolution conflict analysis

    Parameters
    conflictconflict analysis data

    Definition at line 274 of file conflict_resolution.c.

    References SCIP_Conflict::nrescalls, and NULL.

    Referenced by SCIPprintConflictStatistics().

    ◆ conflictCalcResMaxsize()

    static int conflictCalcResMaxsize ( SCIP_SET set,
    SCIP_PROB prob 
    )
    static

    calculates the maximal size of conflict sets to be used

    Parameters
    setglobal SCIP settings
    probproblem data

    Definition at line 487 of file conflict_resolution.c.

    References MAX, SCIP_Prob::ncontvars, NULL, and SCIP_Prob::nvars.

    Referenced by conflictAnalyzeResolution(), and SCIPconflictAddConflictCon().

    ◆ tightenCoefs()

    static SCIP_RETCODE tightenCoefs ( SCIP_SET set,
    SCIP_VAR **  vars,
    SCIP_Bool  localbounds,
    SCIP_Real rowcoefs,
    int *  rowinds,
    int *  rownnz,
    SCIP_Real rowlhs,
    int *  nchgcoefs,
    SCIP_Bool redundant 
    )
    static

    perform activity based coefficient tightening on a semi-sparse or sparse row defined with a left hand side

    Parameters
    setglobal SCIP settings
    varsarray of variables
    localboundsdo we use local bounds?
    rowcoefsdense row of coefficients
    rowindsindices of the variables in the row
    rownnznumber of non-zeros in the row
    rowlhsleft hand side of the row
    nchgcoefsnumber of changed coefficients
    redundantpointer to store whether the row is redundant

    Definition at line 504 of file conflict_resolution.c.

    References EPS, FALSE, MAX, NULL, QUAD, QUAD_ASSIGN, QUAD_TO_DBL, SCIP_CALL_ABORT, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPdebugPrintf, SCIPfreeBufferArray, SCIPfreeBufferArrayNull, SCIPgetNContVars(), SCIPgetNVars(), SCIPquadprecProdQD, SCIPquadprecSumDD, SCIPquadprecSumQD, SCIPquadprecSumQQ, SCIPsetIsGE(), SCIPsetIsInfinity(), SCIPsetIsLE(), SCIPsetIsLT(), SCIPsetIsNegative(), SCIPsetIsPositive(), SCIPsetIsRelGE(), SCIPsetIsRelLE(), SCIPsortDownRealInt(), SCIPvarGetLbGlobal(), SCIPvarGetLbLocal(), SCIPvarGetUbGlobal(), SCIPvarGetUbLocal(), SCIPvarIsIntegral(), and TRUE.

    Referenced by conflictAnalyzeResolution().

    ◆ hasRelaxationOnlyVar()

    static SCIP_Bool hasRelaxationOnlyVar ( SCIP_SET set,
    SCIP_VAR **  vars,
    SCIP_CONFLICTROW row 
    )
    static

    check if the generalized resolution row has a relaxation only variable

    Parameters
    setglobal SCIP settings
    varsarray of variables
    rowgeneralized resolution row

    Definition at line 728 of file conflict_resolution.c.

    References FALSE, SCIP_ConflictRow::inds, SCIP_ConflictRow::nnz, NULL, SCIPvarIsRelaxationOnly(), and TRUE.

    Referenced by SCIPconflictAddConflictCon().

    ◆ isBinaryConflictRow()

    static SCIP_Bool isBinaryConflictRow ( SCIP_SET set,
    SCIP_VAR **  vars,
    SCIP_CONFLICTROW row 
    )
    static

    check if a generalized resolution row has only binary variables

    Parameters
    setglobal SCIP settings
    varsarray of variables
    rowgeneralized resolution row

    Definition at line 755 of file conflict_resolution.c.

    References FALSE, SCIP_ConflictRow::inds, SCIP_ConflictRow::nnz, NULL, SCIPvarIsBinary(), and TRUE.

    Referenced by ComplementedMirLhs(), executeResolutionStep(), and reduceReason().

    ◆ conflictRowRemoveZeroVar()

    static void conflictRowRemoveZeroVar ( SCIP_CONFLICTROW row,
    SCIP_SET set,
    int  pos 
    )
    static

    Removes a variable with zero coefficient in the generalized resolution row

    Parameters
    rowgeneralized resolution row
    setglobal SCIP settings
    posposition of variable in conflict row

    Definition at line 782 of file conflict_resolution.c.

    References SCIP_ConflictRow::inds, SCIP_ConflictRow::nnz, NULL, SCIPsetIsZero(), and SCIP_ConflictRow::vals.

    Referenced by conflictRowRemoveZeroVars().

    ◆ conflictRowRemoveZeroVars()

    static void conflictRowRemoveZeroVars ( SCIP_CONFLICTROW row,
    SCIP_SET set 
    )
    static

    Removes all variables with zero coefficient (< 1e-09) in the generalized resolution row

    Parameters
    rowgeneralized resolution row
    setglobal SCIP settings

    Definition at line 803 of file conflict_resolution.c.

    References conflictRowRemoveZeroVar(), SCIP_ConflictRow::inds, SCIP_ConflictRow::nnz, NULL, SCIPsetIsZero(), and SCIP_ConflictRow::vals.

    Referenced by ComplementedMirLhs(), conflictAnalyzeResolution(), linearCombRows(), and MirReduction().

    ◆ ComplementedMirLhs()

    static SCIP_RETCODE ComplementedMirLhs ( SCIP_SET set,
    SCIP_VAR **  vars,
    SCIP_CONFLICTROW reasonrow,
    int *  fixsides,
    SCIP_BDCHGIDX currbdchgidx,
    int  idxreason,
    SCIP_Real  divisor 
    )
    static

    complement and apply MIR to a 0-1 reason constraint lhs <= a^T x

    Parameters
    setglobal SCIP settings
    varsarray of variables
    reasonrowreason row
    fixsidesdense array of variables fixed to a bound
    currbdchgidxcurrent bound change index
    idxreasonindex in the reason
    divisorthe divisor of the row

    Definition at line 821 of file conflict_resolution.c.

    References conflictRowRemoveZeroVars(), SCIP_ConflictRow::inds, isBinaryConflictRow(), SCIP_ConflictRow::lhs, MAXFRAC, MINFRAC, SCIP_ConflictRow::nnz, NULL, SCIP_OKAY, SCIP_Real, SCIPgetVarLbAtIndex(), SCIPgetVarUbAtIndex(), SCIPsetCeil(), SCIPsetDebugMsgPrint, SCIPsetFloor(), SCIPsetIsGT(), SCIPvarIsBinary(), TRUE, and SCIP_ConflictRow::vals.

    Referenced by reduceReason().

    ◆ linearCombRows()

    static void linearCombRows ( SCIP_SET set,
    SCIP_CONFLICTROW row1,
    SCIP_CONFLICTROW row2,
    SCIP_Real  scale 
    )
    static
    Parameters
    setglobal SCIP settings
    row1first row (aggregated row)
    row2second row
    scalescale factor for second row

    Definition at line 975 of file conflict_resolution.c.

    References conflictRowRemoveZeroVars(), SCIP_ConflictRow::inds, SCIP_ConflictRow::lhs, SCIP_ConflictRow::nnz, NULL, SCIPsetIsZero(), and SCIP_ConflictRow::vals.

    Referenced by rescaleAndResolve().

    ◆ isResolvableBdchg()

    static SCIP_Bool isResolvableBdchg ( SCIP_BDCHGINFO bdchginfo)
    static

    returns whether a bound change is resolvable or not

    Parameters
    bdchginfobound change to check

    Definition at line 1012 of file conflict_resolution.c.

    References FALSE, SCIP_BOUNDCHGTYPE_BRANCHING, SCIP_BOUNDCHGTYPE_CONSINFER, SCIP_BOUNDCHGTYPE_PROPINFER, SCIPbdchginfoGetChgtype(), SCIPbdchginfoGetInferCons(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and TRUE.

    Referenced by conflictAnalyzeResolution(), existsResolvablebdchginfo(), and getReasonRow().

    ◆ existsResolvablebdchginfo()

    static SCIP_Bool existsResolvablebdchginfo ( SCIP_CONFLICT conflict)
    static

    returns whether there exists a resolvable bound change or not

    Parameters
    conflictconflict analysis data

    Definition at line 1041 of file conflict_resolution.c.

    References FALSE, isResolvableBdchg(), SCIP_Conflict::resbdchgqueue, SCIPpqueueElems(), SCIPpqueueNElems(), and TRUE.

    Referenced by conflictAnalyzeResolution(), and markBdchgAsFixed().

    ◆ isBdchgConflictRelevant()

    static SCIP_Bool isBdchgConflictRelevant ( SCIP_CONFLICT conflict,
    SCIP_BDCHGINFO bdchginfo,
    int  initial 
    )
    static

    returns whether a bound change is relevant for the infeasibility of the conflict row. A bound change is relevant if:

    • It is an upper bound change with a positive row coefficient,
    • It is a lower bound change with a negative row coefficient
    Parameters
    conflictconflict analysis data
    bdchginfobound change to check
    initialwhether we are in the initialization of conflict analysis

    Definition at line 1064 of file conflict_resolution.c.

    References SCIP_Conflict::conflictrow, FALSE, SCIP_ConflictRow::nnz, SCIP_BOUNDTYPE_LOWER, SCIP_BOUNDTYPE_UPPER, SCIPbdchginfoGetBoundtype(), SCIPbdchginfoGetVar(), SCIPvarGetProbindex(), TRUE, and SCIP_ConflictRow::vals.

    Referenced by conflictFirstCand(), and conflictRemoveCand().

    ◆ conflictFirstCand()

    static SCIP_BDCHGINFO * conflictFirstCand ( SCIP_SET set,
    SCIP_CONFLICT conflict,
    int  initial 
    )
    static

    ◆ conflictRemoveCand()

    static SCIP_BDCHGINFO * conflictRemoveCand ( SCIP_CONFLICT conflict,
    int  initial 
    )
    static

    removes and returns next conflict analysis bound change candidate from the queue

    Parameters
    conflictconflict analysis data
    initialwhether we are in the initialization of conflict analysis

    Definition at line 1141 of file conflict_resolution.c.

    References isBdchgConflictRelevant(), NULL, SCIP_Conflict::resbdchgqueue, SCIPbdchginfoIsRedundant(), and SCIPpqueueRemove().

    Referenced by conflictAnalyzeResolution(), and markBdchgAsFixed().

    ◆ SCIPconflictResolutionApplicable()

    SCIP_Bool SCIPconflictResolutionApplicable ( SCIP_SET set)

    return TRUE if generalized resolution conflict analysis is applicable

    Parameters
    setglobal SCIP settings

    Definition at line 1161 of file conflict_resolution.c.

    References FALSE, and TRUE.

    Referenced by SCIPconflictAnalyzeResolution().

    ◆ conflictRowCreate()

    static SCIP_RETCODE conflictRowCreate ( SCIP_CONFLICTROW **  row,
    BMS_BLKMEM blkmem 
    )
    static

    creates a generalized resolution row

    Parameters
    rowgeneralized resolution row
    blkmemblock memory of transformed problem

    Definition at line 1174 of file conflict_resolution.c.

    References BMSallocBlockMemory, FALSE, NULL, SCIP_ALLOC, SCIP_CONFTYPE_PROPAGATION, and SCIP_OKAY.

    Referenced by SCIPconflictInitRows().

    ◆ SCIPconflictInitRows()

    SCIP_RETCODE SCIPconflictInitRows ( SCIP_CONFLICT conflict,
    BMS_BLKMEM blkmem 
    )

    creates conflict and reason rows

    Parameters
    conflictconflict analysis data
    blkmemblock memory of transformed problem

    Definition at line 1202 of file conflict_resolution.c.

    References SCIP_Conflict::conflictrow, conflictRowCreate(), NULL, SCIP_Conflict::reasonrow, SCIP_Conflict::reducedreasonrow, SCIP_Conflict::resolvedconflictrow, SCIP_CALL, and SCIP_OKAY.

    Referenced by SCIPconflictCreate().

    ◆ SCIPconflictRowFree()

    void SCIPconflictRowFree ( SCIP_CONFLICTROW **  row,
    BMS_BLKMEM blkmem 
    )

    frees a generalized resolution row

    Parameters
    rowconflict row
    blkmemblock memory

    Definition at line 1220 of file conflict_resolution.c.

    References BMSfreeBlockMemory, BMSfreeBlockMemoryArrayNull, and NULL.

    Referenced by freeConflictResources(), SCIPconflictAnalyzeResolution(), and SCIPconflictFree().

    ◆ freeConflictResources()

    static void freeConflictResources ( SCIP_CONFLICT conflict,
    BMS_BLKMEM blkmem,
    SCIP_SET set,
    SCIP_Real fixbounds,
    int *  fixsides 
    )
    static

    frees all conflict rows and arrays that track unresolvable (fixed) variables

    Parameters
    conflictconflict analysis data
    blkmemblock memory
    setglobal SCIP settings
    fixboundsdense array of fixed bounds
    fixsidesdense array of variables fixed to a bound

    Definition at line 1237 of file conflict_resolution.c.

    References SCIP_Conflict::conflictrows, SCIP_Conflict::nconflictrows, SCIPconflictRowFree(), and SCIPsetFreeBufferArray.

    Referenced by conflictAnalyzeResolution().

    ◆ conflictRowClear()

    ◆ computeSlack()

    static SCIP_RETCODE computeSlack ( SCIP_SET set,
    SCIP_VAR **  vars,
    SCIP_CONFLICTROW row,
    SCIP_BDCHGINFO currbdchginfo,
    SCIP_Real fixbounds,
    int *  fixsides 
    )
    static

    calculates the slack (maxact - rhs) for a generalized resolution row given a set of bounds and coefficients

    Parameters
    setglobal SCIP settings
    varsarray of variables
    rowgeneralized resolution row
    currbdchginfocurrent bound change
    fixboundsdense array of fixed bounds
    fixsidesdense array of variables fixed to a bound

    Definition at line 1291 of file conflict_resolution.c.

    References bound, SCIP_ConflictRow::inds, SCIP_ConflictRow::lhs, SCIP_ConflictRow::nnz, NULL, QUAD, QUAD_ASSIGN, QUAD_TO_DBL, SCIP_OKAY, SCIP_Real, SCIPbdchginfoGetDepth(), SCIPbdchginfoGetIdx(), SCIPbdchginfoGetPos(), SCIPgetVarLbAtIndex(), SCIPgetVarUbAtIndex(), SCIPquadprecProdDD, SCIPquadprecSumQD, SCIPquadprecSumQQ, SCIPsetDebugMsgPrint, SCIPvarGetLbGlobal(), SCIPvarGetName(), SCIPvarGetProbindex(), SCIPvarGetUbGlobal(), SCIP_ConflictRow::slack, TRUE, and SCIP_ConflictRow::vals.

    Referenced by conflictAnalyzeResolution(), executeResolutionStep(), getConflictRow(), getReasonRow(), markBdchgAsFixed(), MirReduction(), and reduceReason().

    ◆ MirReduction()

    static SCIP_RETCODE MirReduction ( SCIP_SET set,
    BMS_BLKMEM blkmem,
    SCIP_VAR **  vars,
    int  nvars,
    SCIP_CONFLICTROW reasonrow,
    SCIP_BDCHGINFO currbdchginfo,
    int  varidx,
    SCIP_Real  divisor 
    )
    static

    reduces the reason row by applying MIR. In the reference solution, each variable is set to the value that was used for the propagation of currbdchginfo.

    Parameters
    setglobal SCIP settings
    blkmemblock memory of transformed problem
    varsarray of variables
    nvarsnumber of variables
    reasonrowreason row
    currbdchginfocurrent bound change to resolve
    varidxindex of the variable to resolve
    divisorthe divisor of the row

    Definition at line 1375 of file conflict_resolution.c.

    References BOUNDSWITCH, computeSlack(), conflictRowClear(), conflictRowRemoveZeroVars(), FALSE, FIXINTEGRALRHS, SCIP_ConflictRow::inds, SCIP_ConflictRow::lhs, MAX, MAXFRAC, MIN, MINFRAC, SCIP_ConflictRow::nnz, NULL, POSTPROCESS, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPaggrRowAddCustomCons(), SCIPaggrRowCreate(), SCIPaggrRowFree(), SCIPbdchginfoGetIdx(), SCIPcalcMIR(), SCIPcreateSol(), SCIPdebug, SCIPfreeSol(), SCIPgetVarLbAtIndex(), SCIPgetVarUbAtIndex(), SCIPsetAllocBufferArray, SCIPsetDebugMsgPrint, SCIPsetFreeBufferArray, SCIPsetIsGT(), SCIPsetSolVal(), SCIPvarGetLbGlobal(), SCIPvarGetUbGlobal(), SCIPvarIsIntegral(), SCIP_ConflictRow::slack, USEVBDS, and SCIP_ConflictRow::vals.

    Referenced by reduceReason().

    ◆ weakenVarConflictRow()

    static void weakenVarConflictRow ( SCIP_CONFLICTROW row,
    SCIP_SET set,
    SCIP_VAR var,
    int  pos 
    )
    static

    weaken variable in a generalized resolution row

    Parameters
    rowgeneralized resolution row
    setglobal SCIP settings
    varvariable to weaken
    posposition in array of indices

    Definition at line 1511 of file conflict_resolution.c.

    References SCIP_ConflictRow::inds, SCIP_ConflictRow::lhs, SCIP_ConflictRow::nnz, NULL, SCIPdebugMessage, SCIPsetIsGT(), SCIPsetIsLT(), SCIPsetIsZero(), SCIPvarGetLbGlobal(), SCIPvarGetName(), SCIPvarGetUbGlobal(), and SCIP_ConflictRow::vals.

    Referenced by weakenConflictRow(), and weakenContinuousVarsConflictRow().

    ◆ weakenConflictRow()

    static void weakenConflictRow ( SCIP_CONFLICTROW row,
    SCIP_SET set,
    SCIP_VAR **  vars,
    SCIP_BDCHGIDX currbdchgidx,
    int *  fixsides 
    )
    static

    weaken generalized resolution row by setting variables to their global bounds

    Parameters
    rowgeneralized resolution row
    setglobal SCIP settings
    varsarray of variables
    currbdchgidxcurrent bound change index
    fixsidesdense array of variables fixed to a bound

    Definition at line 1543 of file conflict_resolution.c.

    References SCIP_ConflictRow::inds, SCIP_ConflictRow::nnz, NULL, SCIP_Real, SCIPdebugMessage, SCIPgetVarLbAtIndex(), SCIPgetVarUbAtIndex(), SCIPsetIsEQ(), SCIPvarGetLbGlobal(), SCIPvarGetUbGlobal(), TRUE, SCIP_ConflictRow::vals, and weakenVarConflictRow().

    Referenced by conflictAnalyzeResolution(), and getConflictRow().

    ◆ weakenContinuousVarsConflictRow()

    static SCIP_RETCODE weakenContinuousVarsConflictRow ( SCIP_CONFLICTROW row,
    SCIP_SET set,
    SCIP_VAR **  vars,
    int  residx 
    )
    static

    weaken all continuous variables in a generalized resolution row

    Parameters
    rowgeneralized resolution row
    setglobal SCIP settings
    varsarray of variables
    residxindex of variable we are resolving on

    Definition at line 1600 of file conflict_resolution.c.

    References SCIP_ConflictRow::inds, SCIP_ConflictRow::nnz, NULL, SCIP_OKAY, SCIPdebugMessage, SCIPvarIsIntegral(), SCIP_ConflictRow::vals, and weakenVarConflictRow().

    Referenced by executeResolutionStep().

    ◆ getQuotLargestSmallestCoef()

    static SCIP_Real getQuotLargestSmallestCoef ( SCIP_SET set,
    int *  inds,
    SCIP_Real vals,
    int  nnz 
    )
    static

    returns the quotient of the largest and smallest value in a semi-sparse array

    Parameters
    setglobal SCIP settings
    indsarray of indices
    valsdense array of values
    nnznumber of nonzeros

    Definition at line 1647 of file conflict_resolution.c.

    References MAX, MIN, NULL, REALABS, SCIP_Real, and SCIPsetInfinity().

    Referenced by conflictAnalyzeResolution().

    ◆ updateBdchgQueue()

    static SCIP_RETCODE updateBdchgQueue ( SCIP_SET set,
    SCIP_VAR **  vars,
    SCIP_CONFLICTROW conflictrow,
    SCIP_BDCHGIDX inferbdchgidx 
    )
    static

    for every variable in the row, except the inferred variable, add bound changes

    Parameters
    setglobal SCIP settings
    varsarray of variables
    conflictrowconflict row
    inferbdchgidxbound change index (time stamp of bound change), or NULL for current time

    Definition at line 1678 of file conflict_resolution.c.

    References FALSE, SCIP_ConflictRow::inds, SCIP_ConflictRow::nnz, NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPaddConflictLb(), SCIPaddConflictUb(), SCIPgetVarLbAtIndex(), SCIPgetVarUbAtIndex(), SCIPsetIsGT(), SCIPsetIsLT(), SCIPvarGetLbGlobal(), SCIPvarGetNBdchgInfosLb(), SCIPvarGetNBdchgInfosUb(), SCIPvarGetProbindex(), SCIPvarGetUbGlobal(), and SCIP_ConflictRow::vals.

    Referenced by conflictAnalyzeResolution(), and markBdchgAsFixed().

    ◆ slackReducingContinuousBdchgQueue()

    static SCIP_RETCODE slackReducingContinuousBdchgQueue ( SCIP_CONFLICT conflict,
    SCIP_VAR **  vars,
    SCIP_CONFLICTROW row,
    SCIP_BDCHGIDX inferbdchgidx 
    )
    static

    add all slack reducing continuous bound changes to the continuous bound change queue

    Parameters
    conflictconflict analysis data
    varsarray of variables
    rowconflict row
    inferbdchgidxbound change index of latest continuous bound change

    Definition at line 1730 of file conflict_resolution.c.

    References SCIP_Conflict::continuousbdchgqueue, FALSE, SCIP_ConflictRow::inds, SCIP_ConflictRow::nnz, NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPbdchgidxGetDepth(), SCIPbdchgidxGetPos(), SCIPbdchginfoGetDepth(), SCIPbdchginfoGetPos(), SCIPpqueueClear(), SCIPpqueueInsert(), SCIPpqueueNElems(), SCIPvarGetLbchgInfo(), SCIPvarGetProbindex(), SCIPvarGetUbchgInfo(), SCIPvarIsIntegral(), and SCIP_ConflictRow::vals.

    Referenced by executeResolutionStep().

    ◆ incVSIDS()

    static SCIP_RETCODE incVSIDS ( SCIP_VAR var,
    BMS_BLKMEM blkmem,
    SCIP_SET set,
    SCIP_STAT stat,
    SCIP_BOUNDTYPE  boundtype,
    SCIP_Real  value,
    SCIP_Real  weight 
    )
    static

    increases the conflict score of the variable in the given direction

    Parameters
    varproblem variable
    blkmemblock memory
    setglobal SCIP settings
    statdynamic problem statistics
    boundtypetype of bound for which the score should be increased
    valuevalue of the bound
    weightweight of this VSIDS updates

    Definition at line 1795 of file conflict_resolution.c.

    References SCIP_Stat::glbhistory, SCIP_Stat::glbhistorycrun, NULL, SCIP_BOUNDTYPE_LOWER, SCIP_BRANCHDIR_DOWNWARDS, SCIP_BRANCHDIR_UPWARDS, SCIP_CALL, SCIP_OKAY, SCIPhistoryIncVSIDS(), SCIPsetIsZero(), SCIPvarIncVSIDS(), and SCIP_Stat::vsidsweight.

    Referenced by updateStatistics().

    ◆ updateStatistics()

    static SCIP_RETCODE updateStatistics ( SCIP_CONFLICT conflict,
    SCIP_VAR **  vars,
    BMS_BLKMEM blkmem,
    SCIP_SET set,
    SCIP_STAT stat,
    SCIP_CONFLICTROW conflictrow,
    int  insertdepth 
    )
    static

    update conflict statistics

    Parameters
    conflictconflict analysis data
    varsarray of variables
    blkmemblock memory
    setglobal SCIP settings
    statdynamic problem statistics
    conflictrowconflict row to add to the tree
    insertdepthdepth level at which the conflict set should be added

    Definition at line 1826 of file conflict_resolution.c.

    References bound, SCIP_Stat::glbhistory, SCIP_Stat::glbhistorycrun, incVSIDS(), SCIP_ConflictRow::inds, SCIP_Conflict::nappliedglbconss, SCIP_Conflict::nappliedglbliterals, SCIP_Conflict::nappliedlocconss, SCIP_Conflict::nappliedlocliterals, SCIP_ConflictRow::nnz, NULL, SCIP_BOUNDTYPE_LOWER, SCIP_BOUNDTYPE_UPPER, SCIP_BRANCHDIR_DOWNWARDS, SCIP_BRANCHDIR_UPWARDS, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPhistoryIncNActiveConflicts(), SCIPsetIsZero(), SCIPvarGetLbLocal(), SCIPvarGetUbLocal(), SCIPvarIncNActiveConflicts(), and SCIP_ConflictRow::vals.

    Referenced by createAndAddConflictCon(), and SCIPconflictAddConflictCon().

    ◆ createAndAddConflictCon()

    static SCIP_RETCODE createAndAddConflictCon ( SCIP_CONFLICT conflict,
    BMS_BLKMEM blkmem,
    SCIP_SET set,
    SCIP_STAT stat,
    SCIP_VAR **  vars,
    SCIP_TREE tree,
    SCIP_REOPT reopt,
    SCIP_LP lp,
    SCIP_CLIQUETABLE cliquetable,
    SCIP_CONFLICTROW conflictrow,
    int  insertdepth,
    SCIP_Bool success 
    )
    static

    creates a conflict constraint and tries to add it to the storage

    Parameters
    conflictconflict analysis data
    blkmemblock memory
    setglobal SCIP settings
    statdynamic problem statistics
    varsarray of variables
    treebranch and bound tree
    reoptreoptimization data structure
    lpcurrent LP data
    cliquetableclique table data structure
    conflictrowconflict row to add to the tree
    insertdepthdepth level at which the conflict set should be added
    successpointer to store whether the addition was successful

    Definition at line 1885 of file conflict_resolution.c.

    References SCIP_ConflictRow::conflicttype, FALSE, SCIP_ConflictRow::inds, SCIP_ConflictRow::lhs, SCIP_ConflictRow::nnz, SCIP_Conflict::nresconfconss, NULL, SCIP_Tree::path, SCIP_CALL, SCIP_LONGINT_FORMAT, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIPaddConflict(), SCIPallocBufferArray, SCIPcreateConsLinear(), SCIPdebugCheckConss, SCIPfreeBufferArray, SCIPnodeGetDepth(), SCIPreleaseCons(), SCIPsetInfinity(), SCIPsnprintf(), SCIPupgradeConsLinear(), TRUE, updateStatistics(), SCIP_ConflictRow::usescutoffbound, SCIP_ConflictRow::validdepth, and SCIP_ConflictRow::vals.

    Referenced by SCIPconflictAddConflictCon().

    ◆ SCIPconflictAddConflictCon()

    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 
    )

    create conflict constraints out of conflict row and add them to the problem

    Parameters
    conflictconflict analysis data
    blkmemblock memory
    setglobal SCIP settings
    statdynamic problem statistics
    transprobtransformed problem
    origproboriginal problem
    treebranch and bound tree
    reoptreoptimization data structure
    lpcurrent LP data
    branchcandbranching candidate storage
    eventqueueevent queue
    eventfilterglobal event filter
    cliquetableclique table data structure
    conflictrowconflict row to add to the tree
    successtrue if the conflict is added to the problem

    Definition at line 1958 of file conflict_resolution.c.

    References bound, conflictCalcResMaxsize(), SCIP_ConflictRow::conflictdepth, createAndAddConflictCon(), SCIP_Lp::diving, FALSE, hasRelaxationOnlyVar(), SCIP_ConflictRow::inds, SCIP_ConflictRow::insertdepth, SCIP_ConflictRow::lhs, SCIP_Conflict::nappliedglbresconss, SCIP_ConflictRow::nnz, SCIP_Conflict::nreslongconfs, NULL, SCIP_Tree::path, SCIP_Tree::pathlen, SCIP_ConflictRow::repropdepth, SCIP_BOUNDTYPE_LOWER, SCIP_BOUNDTYPE_UPPER, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPnodeAddBoundchg(), SCIPnodeCutoff(), SCIPprobGetVars(), SCIPsetCeil(), SCIPsetDebugMsg, SCIPsetDebugMsgPrint, SCIPsetFloor(), SCIPsetIsFeasGT(), SCIPsetIsGT(), SCIPsetIsLT(), SCIPsetIsZero(), SCIPtreeGetCurrentDepth(), SCIPtreeGetFocusDepth(), SCIPvarGetLbGlobal(), SCIPvarGetName(), SCIPvarGetUbGlobal(), SCIPvarIsIntegral(), SCIP_Lp::strongbranching, TRUE, updateStatistics(), SCIP_ConflictRow::validdepth, and SCIP_ConflictRow::vals.

    Referenced by addConflictRows().

    ◆ conflictRowAddSemiSparseData()

    static SCIP_RETCODE conflictRowAddSemiSparseData ( SCIP_CONFLICTROW resolutionrow,
    BMS_BLKMEM blkmem,
    SCIP_Real vals,
    int *  inds,
    int  nnz,
    SCIP_Real  lhs,
    SCIP_Bool  reverse 
    )
    static

    adds given data as row to the generalized resolution row

    Parameters
    resolutionrowgeneralized resolution row
    blkmemblock memory
    valsvariable coefficients
    indsvariable array
    nnzsize of variable and coefficient array
    lhsleft-hand side of conflict row
    reversereverse coefficients

    Definition at line 2102 of file conflict_resolution.c.

    References BMSallocBlockMemoryArray, BMSreallocBlockMemoryArray, SCIP_ConflictRow::inds, SCIP_ConflictRow::lhs, SCIP_ConflictRow::nnz, NULL, SCIP_ALLOC, SCIP_OKAY, SCIP_ConflictRow::size, and SCIP_ConflictRow::vals.

    Referenced by conflictRowFromLpRow(), and reasonRowFromLpRow().

    ◆ computeScaleReason()

    static SCIP_Real computeScaleReason ( SCIP_SET set,
    SCIP_CONFLICTROW conflictrow,
    SCIP_CONFLICTROW reasonrow,
    int  residx 
    )
    static

    compute scale for the reason constraint such that the resolving variable cancels out

    Parameters
    setglobal SCIP settings
    conflictrowconflict row
    reasonrowreason row
    residxindex of variable to resolve

    Definition at line 2165 of file conflict_resolution.c.

    References REALABS, SCIP_Real, SCIPsetIsZero(), and SCIP_ConflictRow::vals.

    Referenced by rescaleAndResolve().

    ◆ rescaleAndResolve()

    static SCIP_RETCODE rescaleAndResolve ( SCIP_SET set,
    SCIP_CONFLICT conflict,
    SCIP_CONFLICTROW row1,
    SCIP_CONFLICTROW row2,
    SCIP_CONFLICTROW resolvedrow,
    BMS_BLKMEM blkmem,
    int  residx,
    SCIP_Bool success 
    )
    static

    compute the resolved conflict row resolvedrow = row1 + scale * row2

    Parameters
    setglobal SCIP settings
    conflictconflict analysis data
    row1conflict row
    row2reason conflict row
    resolvedrowresolved conflict row
    blkmemblock memory
    residxindex of variable to resolve
    successapply resolution

    Definition at line 2188 of file conflict_resolution.c.

    References BMSreallocBlockMemoryArray, SCIP_ConflictRow::coefquotient, computeScaleReason(), conflictRowReplace(), FALSE, SCIP_ConflictRow::inds, linearCombRows(), MAX, MIN, SCIP_ConflictRow::nnz, SCIP_Conflict::nreslargecoefs, NULL, SCIP_ALLOC, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPsetDebugMsgPrint, SCIPsetInfinity(), SCIPsetIsGE(), SCIPsetIsGT(), SCIPsetIsZero(), SCIP_ConflictRow::size, SCIP_ConflictRow::slack, TRUE, and SCIP_ConflictRow::vals.

    Referenced by executeResolutionStep().

    ◆ reduceReason()

    static SCIP_RETCODE reduceReason ( SCIP_SET set,
    BMS_BLKMEM blkmem,
    SCIP_VAR **  vars,
    int  nvars,
    SCIP_CONFLICTROW rowtoreduce,
    SCIP_BDCHGINFO currbdchginfo,
    int  residx,
    SCIP_Real fixbounds,
    int *  fixsides 
    )
    static

    reduce the reason constraint

    Parameters
    setglobal SCIP settings
    blkmemblock memory of transformed problem
    varsarray of variables
    nvarsnumber of variables
    rowtoreducethe row to reduce
    currbdchginfocurrent bound change to resolve
    residxindex of variable to resolve
    fixboundsdense array of fixed bounds
    fixsidesdense array of variables fixed to a bound

    Definition at line 2270 of file conflict_resolution.c.

    References ComplementedMirLhs(), computeSlack(), isBinaryConflictRow(), MirReduction(), SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPbdchginfoGetIdx(), SCIPdebug, SCIPsetIsZero(), and SCIP_ConflictRow::vals.

    Referenced by executeResolutionStep().

    ◆ reasonRowFromLpRow()

    static SCIP_RETCODE reasonRowFromLpRow ( SCIP_SET set,
    BMS_BLKMEM blkmem,
    SCIP_ROW row,
    SCIP_CONFLICTROW reasonrow,
    SCIP_BDCHGINFO bdchginfo 
    )
    static

    ◆ conflictRowFromLpRow()

    static SCIP_RETCODE conflictRowFromLpRow ( SCIP_SET set,
    BMS_BLKMEM blkmem,
    SCIP_ROW row,
    SCIP_CONFLICTROW conflictrow,
    SCIP_BDCHGINFO bdchginfo 
    )
    static

    ◆ getReasonRow()

    static SCIP_RETCODE getReasonRow ( BMS_BLKMEM blkmem,
    SCIP_VAR **  vars,
    SCIP_SET set,
    SCIP_BDCHGINFO currbdchginfo,
    SCIP_CONFLICTROW reasonrow,
    int  residx,
    SCIP_Real fixbounds,
    int *  fixsides,
    SCIP_Bool success 
    )
    static

    get the reason for the given bound change

    Parameters
    blkmemblock memory
    varsarray of variables
    setglobal SCIP settings
    currbdchginfobound change to resolve
    reasonrowreason row for the bound change
    residxindex of the bound change to resolve
    fixboundsdense array of fixed bounds
    fixsidesdense array of variables fixed to a bound
    successpointer to store whether we could get a linear reason

    Definition at line 2479 of file conflict_resolution.c.

    References computeSlack(), SCIP_Cons::conshdlr, FALSE, isResolvableBdchg(), SCIP_ConflictRow::lhs, NULL, reasonRowFromLpRow(), SCIP_BOUNDCHGTYPE_CONSINFER, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPbdchginfoGetChgtype(), SCIPbdchginfoGetIdx(), SCIPbdchginfoGetInferCons(), SCIPbdchginfoGetOldbound(), SCIPbdchginfoGetVar(), SCIPconsCreateRow(), SCIPconshdlrGetName(), SCIPconsIsGlobal(), SCIPgetVarLbAtIndex(), SCIPgetVarUbAtIndex(), SCIPsetDebugMsgPrint, SCIPsetIsGT(), SCIPsetIsInfinity(), SCIPsetIsLT(), SCIPvarGetProbindex(), SCIP_ConflictRow::slack, TRUE, and SCIP_ConflictRow::vals.

    Referenced by conflictAnalyzeResolution(), and executeResolutionStep().

    ◆ getConflictRow()

    static SCIP_RETCODE getConflictRow ( SCIP_CONFLICT conflict,
    BMS_BLKMEM blkmem,
    SCIP_SET set,
    SCIP_PROB prob,
    SCIP_ROW initialconflictrow,
    SCIP_BDCHGINFO currbdchginfo,
    int  maxsize,
    SCIP_Bool success 
    )
    static

    get the conflict row for the given bound change from the LP row.

    Parameters
    conflictconflict analysis data
    blkmemblock memory of transformed problem
    setglobal SCIP settings
    probproblem data
    initialconflictrowrow of constraint that detected the conflict
    currbdchginfobound change to resolve
    maxsizemaximal size of conflict rows
    successpointer to store whether we could get a conflict row

    Definition at line 2573 of file conflict_resolution.c.

    References computeSlack(), SCIP_Conflict::conflictrow, conflictRowFromLpRow(), FALSE, SCIP_ConflictRow::nnz, SCIP_Conflict::nreslongconfs, NULL, SCIP_CALL, SCIP_OKAY, SCIPbdchginfoGetIdx(), SCIProwGetName(), SCIProwGetNNonz(), SCIPsetDebugMsgPrint, SCIPsetIsGE(), SCIPsetIsLT(), SCIP_ConflictRow::slack, TRUE, SCIP_Prob::vars, and weakenConflictRow().

    Referenced by conflictAnalyzeResolution().

    ◆ executeResolutionStep()

    static SCIP_RETCODE executeResolutionStep ( SCIP_CONFLICT conflict,
    SCIP_SET set,
    SCIP_VAR **  vars,
    BMS_BLKMEM blkmem,
    SCIP_BDCHGINFO currbdchginfo,
    int  residx,
    int  maxsize,
    SCIP_Real fixbounds,
    int *  fixsides,
    SCIP_Bool successresolution 
    )
    static

    execute resolution; reduce reason if necessary

    Parameters
    conflictconflict analysis data
    setglobal SCIP settings
    varsarray of variables
    blkmemblock memory of transformed problem
    currbdchginfocurrent bound change to resolve
    residxindex of variable to resolve
    maxsizemaximal size of conflict rows
    fixboundsdense array of fixed bounds
    fixsidesdense array of variables fixed to a bound
    successresolutionpointer to store whether the resolution was successful

    Definition at line 2650 of file conflict_resolution.c.

    References computeSlack(), SCIP_Conflict::conflictrow, conflictRowClear(), conflictRowReplace(), SCIP_Conflict::continuousbdchgqueue, FALSE, getReasonRow(), isBinaryConflictRow(), SCIP_ConflictRow::nnz, SCIP_Conflict::nreslongconfs, NULL, SCIP_Conflict::reasonrow, SCIP_Conflict::reducedreasonrow, reduceReason(), rescaleAndResolve(), SCIP_Conflict::resolvedconflictrow, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPbdchginfoGetIdx(), SCIPbdchginfoGetVar(), SCIPdebug, SCIPgetNVars(), SCIPpqueueNElems(), SCIPpqueueRemove(), SCIPsetDebugMsgPrint, SCIPsetIsGE(), SCIPsetIsLE(), SCIPsetIsLT(), SCIPsetIsZero(), SCIPvarGetName(), SCIPvarGetProbindex(), SCIP_ConflictRow::slack, slackReducingContinuousBdchgQueue(), TRUE, SCIP_ConflictRow::vals, and weakenContinuousVarsConflictRow().

    Referenced by conflictAnalyzeResolution().

    ◆ markBdchgAsFixed()

    static SCIP_RETCODE markBdchgAsFixed ( SCIP_CONFLICT conflict,
    SCIP_SET set,
    SCIP_VAR **  vars,
    SCIP_BDCHGINFO **  currbdchginfo,
    int *  currbdchgdepth,
    int  nressteps,
    SCIP_Real fixbounds,
    int *  fixsides,
    SCIP_Bool success 
    )
    static

    If a bound change cannot be resolved, it is treated as a branching decision. Subsequent bound changes for that variable are ignored by recording the variable's index in fixsides and its bound type in fixbounds (1 for upper, -1 for lower).

    Parameters
    conflictconflict analysis data
    setglobal SCIP settings
    varsarray of variables
    currbdchginfopointer to current bound change to resolve
    currbdchgdepthpointer to store the depth of the bound change
    nresstepsnumber of bound changes that have been resolved so far
    fixboundsdense array of fixed bounds
    fixsidesdense array of variables fixed to a bound
    successpointer to store whether the bound change was ignored

    Definition at line 2820 of file conflict_resolution.c.

    References computeSlack(), conflictFirstCand(), conflictRemoveCand(), SCIP_Conflict::conflictrow, SCIP_Conflict::conflictvarslbs, SCIP_Conflict::conflictvarsubs, existsResolvablebdchginfo(), FALSE, NULL, SCIP_BOUNDCHGTYPE_BRANCHING, SCIP_BOUNDCHGTYPE_CONSINFER, SCIP_BOUNDTYPE_LOWER, SCIP_BOUNDTYPE_UPPER, SCIP_CALL, SCIP_OKAY, SCIP_REAL_MAX, SCIP_REAL_MIN, SCIPbdchginfoGetBoundtype(), SCIPbdchginfoGetChgtype(), SCIPbdchginfoGetDepth(), SCIPbdchginfoGetIdx(), SCIPbdchginfoGetInferCons(), SCIPbdchginfoGetNewbound(), SCIPbdchginfoGetVar(), SCIPconsIsGlobal(), SCIPsetDebugMsgPrint, SCIPsetIsLT(), SCIPvarGetName(), SCIPvarGetProbindex(), SCIP_ConflictRow::slack, TRUE, and updateBdchgQueue().

    Referenced by conflictAnalyzeResolution().

    ◆ addConflictRows()

    static SCIP_RETCODE addConflictRows ( 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,
    int  nconstoadd,
    int *  nconss,
    int *  nconfvars 
    )
    static

    add the conflict rows to the problem

    Parameters
    conflictconflict analysis data
    blkmemblock memory
    setglobal SCIP settings
    statdynamic problem statistics
    transprobtransformed problem
    origproboriginal problem
    treebranch and bound tree
    reoptreoptimization data structure
    lpcurrent LP data
    branchcandbranching candidate storage
    eventqueueevent queue
    eventfilterglobal event filter
    cliquetableclique table data structure
    nconstoaddnumber of conflict constraints to add
    nconsspointer to store the number of generated conflict constraints
    nconfvarspointer to store the number of variables in generated conflict constraints

    Definition at line 2909 of file conflict_resolution.c.

    References SCIP_ConflictRow::coefquotient, SCIP_Conflict::conflictrows, SCIP_ConflictRow::nnz, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPconflictAddConflictCon(), SCIPsetIsLT(), and SCIP_ConflictRow::slack.

    Referenced by conflictAnalyzeResolution().

    ◆ conflictAnalyzeResolution()

    SCIP_RETCODE conflictAnalyzeResolution ( 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_ROW initialconflictrow,
    int  validdepth,
    int *  nconss,
    int *  nconfvars 
    )

    Analyzes conflicting bound changes added via SCIPconflictAddBound(). This function performs generalized resolution conflict analysis by iteratively aggregating the infeasible conflict row (conflictrow) with the reason row (reasonrow) that propagated the bound change. In each iteration, the coefficient of the resolving variable is cancelled. If the aggregation does not yield an infeasible row, MIR reduction is applied to the reason row and the aggregation is retried, continuing until a first unique implication point (FUIP) is reached. On success, a linear conflict constraint that explains the infeasibility is added to the problem.

    Parameters
    conflictconflict analysis data
    blkmemblock memory of transformed problem
    setglobal SCIP settings
    statproblem statistics
    transprobtransformed problem
    origproboriginal problem
    treebranch and bound tree
    reoptreoptimization data structure
    lpLP data
    branchcandbranching candidate storage
    eventqueueevent queue
    eventfilterglobal event filter
    cliquetableclique table data structure
    initialconflictrowrow of constraint that detected the conflict
    validdepthminimal depth level at which the initial conflict set is valid
    nconsspointer to store the number of generated conflict constraints
    nconfvarspointer to store the number of variables in generated conflict constraints

    Definition at line 2961 of file conflict_resolution.c.

    References addConflictRows(), SCIP_ConflictRow::coefquotient, computeSlack(), conflictCalcResMaxsize(), SCIP_ConflictRow::conflictdepth, conflictFirstCand(), conflictInsertConflictRow(), conflictRemoveCand(), SCIP_Conflict::conflictrow, conflictRowClear(), conflictRowCopy(), conflictRowRemoveZeroVars(), conflictRowReplace(), SCIP_ConflictRow::conflicttype, SCIP_Conflict::conflictvarslbs, SCIP_Conflict::conflictvarsubs, EPS, executeResolutionStep(), existsResolvablebdchginfo(), FALSE, freeConflictResources(), getConflictRow(), getQuotLargestSmallestCoef(), getReasonRow(), SCIP_ConflictRow::inds, SCIP_ConflictRow::insertdepth, isResolvableBdchg(), SCIP_ConflictRow::lhs, markBdchgAsFixed(), MAX, MIN, SCIP_Conflict::nconflictrows, SCIP_ConflictRow::nnz, SCIP_Conflict::nreslongconfs, NULL, SCIP_Prob::nvars, SCIP_Tree::pathlen, SCIP_Conflict::reasonrow, SCIP_Conflict::reducedreasonrow, SCIP_ConflictRow::repropdepth, SCIP_Conflict::resolvedconflictrow, SCIP_Bool, SCIP_BOUNDTYPE_LOWER, SCIP_CALL, SCIP_CONFTYPE_PROPAGATION, SCIP_OKAY, SCIP_Real, SCIP_REAL_MAX, SCIP_REAL_MIN, SCIPbdchginfoGetBoundtype(), SCIPbdchginfoGetDepth(), SCIPbdchginfoGetIdx(), SCIPbdchginfoGetVar(), SCIPdebug, SCIPprobGetVars(), SCIPsetAllocBufferArray, SCIPsetDebugMsgPrint, SCIPsetIsEQ(), SCIPsetIsGE(), SCIPsetIsLE(), SCIPsetIsLT(), SCIPsetIsRelLE(), SCIPsetIsZero(), SCIPtreeGetCurrentDepth(), SCIPtreeGetFocusDepth(), SCIPvarGetName(), SCIPvarGetProbindex(), SCIPvarIsActive(), SCIP_ConflictRow::slack, tightenCoefs(), TRUE, updateBdchgQueue(), SCIP_ConflictRow::validdepth, SCIP_ConflictRow::vals, and weakenConflictRow().

    Referenced by SCIPconflictAnalyzeResolution().

    ◆ SCIPconflictAnalyzeResolution()

    SCIP_RETCODE SCIPconflictAnalyzeResolution ( 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_ROW initialconflictrow,
    int  validdepth,
    SCIP_Bool success 
    )

    analyzes conflicting bound changes that were added with calls to SCIPconflictAddBound(), and on success, creates a linear constraint that explains the infeasibility

    Parameters
    conflictconflict analysis data
    blkmemblock memory of transformed problem
    setglobal SCIP settings
    statproblem statistics
    transprobtransformed problem
    origproboriginal problem
    treebranch and bound tree
    reoptreoptimization data structure
    lpLP data
    branchcandbranching candidate storage
    eventqueueevent queue
    eventfilterglobal event filter
    cliquetableclique table data structure
    initialconflictrowrow of constraint that detected the conflict
    validdepthminimal depth level at which the initial conflict set is valid
    successpointer to store whether a conflict constraint was created, or NULL

    Definition at line 3336 of file conflict_resolution.c.

    References SCIP_Conflict::bdchgonlyresqueue, conflictAnalyzeResolution(), SCIP_Conflict::conflictrows, SCIP_Conflict::continuousbdchgqueue, FALSE, SCIP_Conflict::nconflictrows, SCIP_Conflict::nrescalls, SCIP_Conflict::nresconfconss, SCIP_Conflict::nresconfvariables, SCIP_Conflict::nressuccess, NULL, SCIP_Conflict::resanalyzetime, SCIP_Conflict::resbdchgqueue, SCIP_CALL, SCIP_OKAY, SCIPclockStart(), SCIPclockStop(), SCIPconflictResolutionApplicable(), SCIPconflictRowFree(), SCIPpqueueClear(), SCIPsetDebugMsgPrint, SCIPtreeGetCurrentDepth(), and TRUE.

    Referenced by SCIPanalyzeConflict(), and SCIPanalyzeConflictCons().