presol_dualinfer.c
Go to the documentation of this file.
26 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/ 38 #define PRESOL_PRIORITY -200 /**< priority of the presolver (>= 0: before, < 0: after constraint handlers) */ 39 #define PRESOL_MAXROUNDS 0 /**< maximal number of presolving rounds the presolver participates in (-1: no limit) */ 40 #define PRESOL_TIMING SCIP_PRESOLTIMING_EXHAUSTIVE /* timing of the presolver (fast, medium, or exhaustive) */ 81 SCIP_Real* lbdualbounds[2], /**< lower bounds of dual variables corresponding to primal variable bounds */ 82 SCIP_Real* ubdualbounds[2] /**< upper bounds of dual variables corresponding to primal variable bounds */ 189 /** calculate minimal column activity from one continuous variable without one row for explicit bounds */ 197 SCIP_Real* lbdualbounds[2], /**< lower bounds of dual variables corresponding to primal variable bounds */ 198 SCIP_Real* ubdualbounds[2], /**< upper bounds of dual variables corresponding to primal variable bounds */ 287 SCIP_Real* lbdualbounds[2], /**< lower bounds of dual variables corresponding to primal variable bounds */ 288 SCIP_Real* ubdualbounds[2], /**< upper bounds of dual variables corresponding to primal variable bounds */ 291 int* maxcolactinf, /**< number of (positive) infinite contributions to maximal column activity */ 292 int* mincolactinf, /**< number of (negative) infinite contributions to minimal column activity */ 323 *mincolresact = getMinColActWithoutRow(scip, matrix, col, row, lbdual, ubdual, part, lbdualbounds, ubdualbounds); 341 *mincolresact = getMinColActWithoutRow(scip, matrix, col, row, lbdual, ubdual, part, lbdualbounds, ubdualbounds); 363 SCIP_Real* lbdualbounds[2], /**< lower bounds of dual variables corresponding to primal variable bounds */ 364 SCIP_Real* ubdualbounds[2], /**< upper bounds of dual variables corresponding to primal variable bounds */ 369 int* maxcolactinf, /**< number of (positive) infinite contributions to maximal column activity */ 370 int* mincolactinf, /**< number of (negative) infinite contributions to minimal column activity */ 403 *mincolresact = getMinColActWithoutBound(scip, matrix, col, lbdual, ubdual, lbdualbounds, ubdualbounds, explicitub, explicitlb); 425 *mincolresact = getMinColActWithoutBound(scip, matrix, col, lbdual, ubdual, lbdualbounds, ubdualbounds, explicitub, explicitlb); 450 SCIP_Real* lbdualbounds[2], /**< lower bounds of dual variables corresponding to primal variable bounds */ 451 SCIP_Real* ubdualbounds[2], /**< upper bounds of dual variables corresponding to primal variable bounds */ 454 int* maxcolactinf, /**< number of (positive) infinite contributions to maximal column activity */ 455 int* mincolactinf /**< number of (negative) infinite contributions to minimal column activity */ 650 SCIP_Real* lbdualbounds[2], /**< lower bounds of dual variables corresponding to variable bounds */ 651 SCIP_Real* ubdualbounds[2], /**< upper bounds of dual variables corresponding to variable bounds */ 723 SCIP_Real* lbdualbounds[2], /**< lower bounds of dual variables corresponding to primal variable bounds */ 724 SCIP_Real* ubdualbounds[2], /**< upper bounds of dual variables corresponding to primal variable bounds */ 728 int* maxcolactinf, /**< number of (positive) infinity contributions to maximal column activity */ 729 int* mincolactinf /**< number of (negative) infinity contributions to minimal column activity */ 760 /* look at all columns entries present within row and update the corresponding infinity counters. 776 calcColActivity(scip, matrix, c, c+1, lbdual, ubdual, lbdualbounds, ubdualbounds, mincolact, maxcolact, maxcolactinf, mincolactinf); 784 calcColActivity(scip, matrix, c, c+1, lbdual, ubdual, lbdualbounds, ubdualbounds, mincolact, maxcolact, maxcolactinf, mincolactinf); 802 calcColActivity(scip, matrix, c, c+1, lbdual, ubdual, lbdualbounds, ubdualbounds, mincolact, maxcolact, maxcolactinf, mincolactinf); 810 calcColActivity(scip, matrix, c, c+1, lbdual, ubdual, lbdualbounds, ubdualbounds, mincolact, maxcolact, maxcolactinf, mincolactinf); 824 SCIP_Real* lbdualbounds[2], /**< lower bounds of dual variables corresponding to variable bounds */ 825 SCIP_Real* ubdualbounds[2], /**< upper bounds of dual variables corresponding to variable bounds */ 830 int* maxcolactinf, /**< number of (positive) infinity contributions to maximal column activity */ 831 int* mincolactinf /**< number of (negative) infinity contributions to minimal column activity */ 864 calcColActivity(scip, matrix, col, col+1, lbdual, ubdual, lbdualbounds, ubdualbounds, mincolact, maxcolact, maxcolactinf, mincolactinf); 876 calcColActivity(scip, matrix, col, col+1, lbdual, ubdual, lbdualbounds, ubdualbounds, mincolact, maxcolact, maxcolactinf, mincolactinf); 887 FIXINGDIRECTION* varstofix, /**< array holding information for later upper/lower bound fixing */ 962 calcColActivity(scip, matrix, 0, ncols, lbdual, ubdual, lbdualbounds, ubdualbounds, mincolact, maxcolact, maxcolactinf, mincolactinf); 997 calcColActResidualCommon(scip, matrix, c, row, val, lbdual, ubdual, part, lbdualbounds, ubdualbounds, mincolact, maxcolact, 1001 updateDualBounds(scip, matrix, objval, val, row, mincolresact, lbdual, ubdual, part, &boundchanges, &updateinfcnt); 1005 infCntUpdate(scip, matrix, val, row, lbdual, ubdual, lbdualbounds, ubdualbounds, part, mincolact, maxcolact, maxcolactinf, mincolactinf); 1012 calcColActResidualExplicitBound(scip, matrix, c, lbdual, ubdual, lbdualbounds, ubdualbounds, TRUE, FALSE, mincolact, maxcolact, 1015 updateDualBoundsExplicit(scip, matrix, objval, c, mincolresact, lbdualbounds, ubdualbounds, TRUE, FALSE, &boundchanges, &updateinfcnt); 1018 infCntUpdateExplicit(scip, matrix, c, lbdual, ubdual, lbdualbounds, ubdualbounds, TRUE, FALSE, mincolact, maxcolact, maxcolactinf, mincolactinf); 1020 calcColActResidualExplicitBound(scip, matrix, c, lbdual, ubdual, lbdualbounds, ubdualbounds, FALSE, TRUE, mincolact, maxcolact, 1023 updateDualBoundsExplicit(scip, matrix, objval, c, mincolresact, lbdualbounds, ubdualbounds, FALSE, TRUE, &boundchanges, &updateinfcnt); 1026 infCntUpdateExplicit(scip, matrix, c, lbdual, ubdual, lbdualbounds, ubdualbounds, FALSE, TRUE, mincolact, maxcolact, maxcolactinf, mincolactinf); 1033 calcColActivity(scip, matrix, 0, ncols, lbdual, ubdual, lbdualbounds, ubdualbounds, mincolact, maxcolact, maxcolactinf, mincolactinf); 1065 if( !SCIPmatrixIsRowRhsInfinity(matrix, r) && !SCIPisEQ(scip,SCIPmatrixGetRowLhs(matrix, r),SCIPmatrixGetRowRhs(matrix, r)) ) 1174 SCIP_CALL( dualBoundStrengthening(scip, matrix, varstofix, &npossiblefixings, sidestochange, &npossiblesidechanges) ); 1303 SCIP_CALL( SCIPincludePresolBasic(scip, &presol, PRESOL_NAME, PRESOL_DESC, PRESOL_PRIORITY, PRESOL_MAXROUNDS, SCIP_RETCODE SCIPfixVar(SCIP *scip, SCIP_VAR *var, SCIP_Real fixedval, SCIP_Bool *infeasible, SCIP_Bool *fixed) Definition: scip.c:22777 Definition: struct_presol.h:36 Definition: type_result.h:33 static void calcColActivity(SCIP *scip, SCIP_MATRIX *matrix, int startcol, int stopcol, SCIP_Real *lbdual[2], SCIP_Real *ubdual[2], SCIP_Real *lbdualbounds[2], SCIP_Real *ubdualbounds[2], SCIP_Real *mincolact, SCIP_Real *maxcolact, int *maxcolactinf, int *mincolactinf) Definition: presol_dualinfer.c:443 Definition: presol_dualinfer.c:60 Definition: struct_scip.h:53 static SCIP_RETCODE dualBoundStrengthening(SCIP *scip, SCIP_MATRIX *matrix, FIXINGDIRECTION *varstofix, int *npossiblefixings, SIDECHANGE *sidestochange, int *npossiblesidechanges) Definition: presol_dualinfer.c:884 SCIP_CONS * SCIPmatrixGetCons(SCIP_MATRIX *matrix, int row) Definition: matrix.c:1525 Definition: type_result.h:49 SCIP_RETCODE SCIPsetPresolCopy(SCIP *scip, SCIP_PRESOL *presol, SCIP_DECL_PRESOLCOPY((*presolcopy))) Definition: scip.c:6226 Definition: struct_var.h:196 Definition: type_var.h:53 static void updateDualBoundsExplicit(SCIP *scip, SCIP_MATRIX *matrix, SCIP_Real objval, int col, SCIP_Real mincolresact, SCIP_Real *lbdualbounds[2], SCIP_Real *ubdualbounds[2], SCIP_Bool explicitub, SCIP_Bool explicitlb, int *boundchanges, SCIP_Bool *updateinfcnt) Definition: presol_dualinfer.c:644 SCIP_RETCODE SCIPmatrixCreate(SCIP *scip, SCIP_MATRIX **matrixptr, SCIP_Bool *initialized, SCIP_Bool *complete) Definition: matrix.c:430 Definition: presol_dualinfer.c:61 int SCIPmatrixGetRowNNonzs(SCIP_MATRIX *matrix, int row) Definition: matrix.c:1373 static void calcColActResidualCommon(SCIP *scip, SCIP_MATRIX *matrix, int col, int row, SCIP_Real val, SCIP_Real *lbdual[2], SCIP_Real *ubdual[2], int part, SCIP_Real *lbdualbounds[2], SCIP_Real *ubdualbounds[2], SCIP_Real *mincolact, SCIP_Real *maxcolact, int *maxcolactinf, int *mincolactinf, SCIP_Real *mincolresact) Definition: presol_dualinfer.c:278 SCIP_Real SCIPmatrixGetRowLhs(SCIP_MATRIX *matrix, int row) Definition: matrix.c:1407 SCIP_Real * SCIPmatrixGetColValPtr(SCIP_MATRIX *matrix, int col) Definition: matrix.c:1233 Definition: type_result.h:35 Definition: struct_cons.h:36 Definition: struct_cons.h:116 static SCIP_Real getMinColActWithoutRow(SCIP *scip, SCIP_MATRIX *matrix, int col, int withoutrow, SCIP_Real *lbdual[2], SCIP_Real *ubdual[2], int part, SCIP_Real *lbdualbounds[2], SCIP_Real *ubdualbounds[2]) Definition: presol_dualinfer.c:73 int * SCIPmatrixGetRowIdxPtr(SCIP_MATRIX *matrix, int row) Definition: matrix.c:1361 SCIP_Real SCIPgetRhsLinear(SCIP *scip, SCIP_CONS *cons) Definition: cons_linear.c:16705 static SCIP_DECL_PRESOLCOPY(presolCopyDualinfer) Definition: presol_dualinfer.c:1107 Definition: type_retcode.h:33 SCIP_Real * SCIPmatrixGetRowValPtr(SCIP_MATRIX *matrix, int row) Definition: matrix.c:1349 static void infCntUpdate(SCIP *scip, SCIP_MATRIX *matrix, SCIP_Real val, int row, SCIP_Real *lbdual[2], SCIP_Real *ubdual[2], SCIP_Real *lbdualbounds[2], SCIP_Real *ubdualbounds[2], int part, SCIP_Real *mincolact, SCIP_Real *maxcolact, int *maxcolactinf, int *mincolactinf) Definition: presol_dualinfer.c:716 int * SCIPmatrixGetColIdxPtr(SCIP_MATRIX *matrix, int col) Definition: matrix.c:1245 Definition: type_set.h:38 Definition: struct_matrix.h:37 Constraint handler for linear constraints in their most general form, . public methods for matrix Definition: presol_dualinfer.c:52 SCIP_RETCODE SCIPchgLhsLinear(SCIP *scip, SCIP_CONS *cons, SCIP_Real lhs) Definition: cons_linear.c:16729 dual inference presolver SCIP_RETCODE SCIPincludePresolDualinfer(SCIP *scip) Definition: presol_dualinfer.c:1293 SCIP_Real SCIPmatrixGetRowRhs(SCIP_MATRIX *matrix, int row) Definition: matrix.c:1419 SCIP_Bool SCIPmatrixIsRowRhsInfinity(SCIP_MATRIX *matrix, int row) Definition: matrix.c:1431 SCIP_RETCODE SCIPchgRhsLinear(SCIP *scip, SCIP_CONS *cons, SCIP_Real rhs) Definition: cons_linear.c:16750 Definition: presol_dualinfer.c:53 SCIP_Real SCIPgetLhsLinear(SCIP *scip, SCIP_CONS *cons) Definition: cons_linear.c:16681 static void calcColActResidualExplicitBound(SCIP *scip, SCIP_MATRIX *matrix, int col, SCIP_Real *lbdual[2], SCIP_Real *ubdual[2], SCIP_Real *lbdualbounds[2], SCIP_Real *ubdualbounds[2], SCIP_Bool explicitub, SCIP_Bool explicitlb, SCIP_Real *mincolact, SCIP_Real *maxcolact, int *maxcolactinf, int *mincolactinf, SCIP_Real *mincolresact) Definition: presol_dualinfer.c:357 static SCIP_DECL_PRESOLEXEC(presolExecDualinfer) Definition: presol_dualinfer.c:1121 static void infCntUpdateExplicit(SCIP *scip, SCIP_MATRIX *matrix, int col, SCIP_Real *lbdual[2], SCIP_Real *ubdual[2], SCIP_Real *lbdualbounds[2], SCIP_Real *ubdualbounds[2], SCIP_Bool explicitub, SCIP_Bool explicitlb, SCIP_Real *mincolact, SCIP_Real *maxcolact, int *maxcolactinf, int *mincolactinf) Definition: presol_dualinfer.c:818 Definition: objbranchrule.h:33 Definition: presol_dualinfer.c:62 SCIP_RETCODE SCIPincludePresolBasic(SCIP *scip, SCIP_PRESOL **presolptr, const char *name, const char *desc, int priority, int maxrounds, SCIP_PRESOLTIMING timing, SCIP_DECL_PRESOLEXEC((*presolexec)), SCIP_PRESOLDATA *presoldata) Definition: scip.c:6191 Definition: type_result.h:39 static SCIP_Real getMinColActWithoutBound(SCIP *scip, SCIP_MATRIX *matrix, int col, SCIP_Real *lbdual[2], SCIP_Real *ubdual[2], SCIP_Real *lbdualbounds[2], SCIP_Real *ubdualbounds[2], SCIP_Bool explicitub, SCIP_Bool explicitlb) Definition: presol_dualinfer.c:191 static void updateDualBounds(SCIP *scip, SCIP_MATRIX *matrix, SCIP_Real objval, SCIP_Real val, int row, SCIP_Real mincolresact, SCIP_Real *lbdual[2], SCIP_Real *ubdual[2], int part, int *boundchanges, SCIP_Bool *updateinfcnt) Definition: presol_dualinfer.c:579 int SCIPmatrixGetColNNonzs(SCIP_MATRIX *matrix, int col) Definition: matrix.c:1257 Definition: type_var.h:56 |