46 #define PRESOL_NAME "domcol" 47 #define PRESOL_DESC "dominated column presolver" 48 #define PRESOL_PRIORITY -1000 49 #define PRESOL_MAXROUNDS -1 50 #define PRESOL_TIMING SCIP_PRESOLTIMING_EXHAUSTIVE 52 #define DEFAULT_NUMMINPAIRS 1024 53 #define DEFAULT_NUMMAXPAIRS 1048576 55 #define DEFAULT_PREDBNDSTR FALSE 56 #define DEFAULT_CONTINUOUS_RED TRUE 65 struct SCIP_PresolData
128 for(; (rowpnt < rowend); rowpnt++, valpnt++)
161 for( i = 0; (colpnt < colend); colpnt++, i++ )
168 for( i = 0; i < numrows; i++ )
214 SCIPdebugMsgPrint(scip,
"\n\n### [%c], obj:%g->%g,\t%s[idx:%d](nrows:%d)->%s[idx:%d](nrows:%d)\twclb=%g, ub'=%g, ub=%g",
220 SCIP_CALL( printRowsOfCol(scip, matrix, dominatingidx) );
253 assert(scip != NULL);
254 assert(matrix != NULL);
256 assert(minresactivity != NULL);
257 assert(maxresactivity != NULL);
262 assert(upperboundvar != NULL);
293 if( upperboundcoef > 0.0 )
297 assert(minactinf > 0);
299 tmpminact += (upperboundcoef * ubupperboundvar);
303 tmpminact = tmpminact - (upperboundcoef * lbupperboundvar) + (upperboundcoef * ubupperboundvar);
311 assert(maxactinf > 0);
313 tmpmaxact += (upperboundcoef * ubupperboundvar);
317 tmpmaxact = tmpmaxact - (upperboundcoef * lbupperboundvar) + (upperboundcoef * ubupperboundvar);
329 assert(maxactinf >= 1);
332 *maxresactivity = tmpmaxact;
342 *maxresactivity = tmpmaxact - coef * ub;
347 assert(minactinf >= 1);
350 *minresactivity = tmpminact;
360 *minresactivity = tmpminact - coef * lb;
368 assert(maxactinf >= 1);
371 *maxresactivity = tmpmaxact;
381 *maxresactivity = tmpmaxact - coef * lb;
386 assert(minactinf >= 1);
389 *minresactivity = tmpminact;
399 *minresactivity = tmpminact - coef * ub;
430 assert(scip != NULL);
431 assert(matrix != NULL);
433 assert(minresactivity != NULL);
434 assert(maxresactivity != NULL);
439 assert(lowerboundvar != NULL);
470 if( lowerboundcoef > 0.0 )
474 assert(maxactinf > 0);
476 tmpmaxact += (lowerboundcoef * lblowerboundvar);
480 tmpmaxact = tmpmaxact - (lowerboundcoef * ublowerboundvar) + (lowerboundcoef * lblowerboundvar);
488 assert(minactinf > 0);
490 tmpminact += (lowerboundcoef * lblowerboundvar);
494 tmpminact = tmpminact - (lowerboundcoef * ublowerboundvar) + (lowerboundcoef * lblowerboundvar);
506 assert(maxactinf >= 1);
509 *maxresactivity = tmpmaxact;
519 *maxresactivity = tmpmaxact - coef * ub;
524 assert(minactinf >= 1);
527 *minresactivity = tmpminact;
537 *minresactivity = tmpminact - coef * lb;
545 assert(maxactinf >= 1);
548 *maxresactivity = tmpmaxact;
558 *maxresactivity = tmpmaxact - coef * lb;
563 assert(minactinf >= 1);
566 *minresactivity = tmpminact;
576 *minresactivity = tmpminact - coef * ub;
609 assert(scip != NULL);
610 assert(matrix != NULL);
615 assert(ubcalculated != NULL);
616 assert(calculatedub != NULL);
617 assert(wclbcalculated != NULL);
618 assert(calculatedwclb != NULL);
619 assert(lbcalculated != NULL);
620 assert(calculatedlb != NULL);
621 assert(wcubcalculated != NULL);
622 assert(calculatedwcub != NULL);
627 *ubcalculated =
FALSE;
628 *wclbcalculated =
FALSE;
629 *lbcalculated =
FALSE;
630 *wcubcalculated =
FALSE;
645 &minresactivity, &maxresactivity, &success);
660 if( valdominated > 0.0 )
665 *calculatedlb = (lhs - maxresactivity)/valdominated;
666 *lbcalculated =
TRUE;
672 *calculatedwclb = (lhs - minresactivity)/valdominated;
673 *wclbcalculated =
TRUE;
679 *wclbcalculated =
TRUE;
688 *calculatedub = (rhs - minresactivity)/valdominated;
689 *ubcalculated =
TRUE;
695 *calculatedwcub = (rhs - maxresactivity)/valdominated;
696 *wcubcalculated =
TRUE;
702 *wcubcalculated =
TRUE;
711 *calculatedub = (lhs - maxresactivity)/valdominated;
712 *ubcalculated =
TRUE;
718 *calculatedwcub = (lhs - minresactivity)/valdominated;
719 *wcubcalculated =
TRUE;
725 *wcubcalculated =
TRUE;
734 *calculatedlb = (rhs - minresactivity)/valdominated;
735 *lbcalculated =
TRUE;
741 *calculatedwclb = (rhs - maxresactivity)/valdominated;
742 *wclbcalculated =
TRUE;
748 *wclbcalculated =
TRUE;
784 assert(scip != NULL);
785 assert(matrix != NULL);
790 assert(ubcalculated != NULL);
791 assert(calculatedub != NULL);
792 assert(wclbcalculated != NULL);
793 assert(calculatedwclb != NULL);
794 assert(lbcalculated != NULL);
795 assert(calculatedlb != NULL);
796 assert(wcubcalculated != NULL);
797 assert(calculatedwcub != NULL);
802 *ubcalculated =
FALSE;
803 *wclbcalculated =
FALSE;
804 *lbcalculated =
FALSE;
805 *wcubcalculated =
FALSE;
820 &minresactivity, &maxresactivity, &success);
835 if( valdominating > 0.0 )
840 *calculatedlb = (lhs - maxresactivity)/valdominating;
841 *lbcalculated =
TRUE;
847 *calculatedwclb = (lhs - minresactivity)/valdominating;
848 *wclbcalculated =
TRUE;
854 *wclbcalculated =
TRUE;
863 *calculatedub = (rhs - minresactivity)/valdominating;
864 *ubcalculated =
TRUE;
870 *calculatedwcub = (rhs - maxresactivity)/valdominating;
871 *wcubcalculated =
TRUE;
877 *wcubcalculated =
TRUE;
886 *calculatedub = (lhs - maxresactivity)/valdominating;
887 *ubcalculated =
TRUE;
893 *calculatedwcub = (lhs - minresactivity)/valdominating;
894 *wcubcalculated =
TRUE;
900 *wcubcalculated =
TRUE;
909 *calculatedlb = (rhs - minresactivity)/valdominating;
910 *lbcalculated =
TRUE;
916 *calculatedwclb = (rhs - maxresactivity)/valdominating;
917 *wclbcalculated =
TRUE;
923 *wclbcalculated =
TRUE;
957 assert(scip != NULL);
958 assert(matrix != NULL);
959 assert(upperbound != NULL);
960 assert(wclowerbound != NULL);
961 assert(lowerbound != NULL);
962 assert(wcupperbound != NULL);
969 if( predictdominating )
973 &ubcalculated, &newub, &wclbcalculated, &newwclb,
974 &lbcalculated, &newlb, &wcubcalculated, &newwcub) );
980 &ubcalculated, &newub, &wclbcalculated, &newwclb,
981 &lbcalculated, &newlb, &wcubcalculated, &newwcub) );
987 if( newub < *upperbound )
992 if( newwclb > *wclowerbound )
993 *wclowerbound = newwclb;
997 if( newlb > *lowerbound )
1000 if( wcubcalculated )
1002 if( newwcub < *wcupperbound )
1003 *wcupperbound = newwcub;
1046 assert(scip != NULL);
1047 assert(matrix != NULL);
1048 assert(pclass != NULL);
1049 assert(varineq != NULL);
1065 classsizes[0] = ncols;
1067 for( t = 1; t < ncols; ++t )
1068 pcset[pcsetfill++] = t;
1071 for( r = 0; r < nrows; ++r )
1081 for( ; (rowpnt < rowend); rowpnt++, valpnt++ )
1087 varineq[colidx] =
TRUE;
1089 if( scale[colidx] == 0.0 )
1090 scale[colidx] = aij;
1091 assert(scale[colidx] != 0.0);
1093 colindices[i] = colidx;
1094 values[i] = aij / scale[colidx];
1095 pc = pclass[colidx];
1099 assert(classsizes[pc] > 0);
1101 if( classsizes[pc] == 0 )
1103 assert(pcsetfill < ncols);
1104 pcset[pcsetfill++] = pc;
1127 while( k < i && pcs[k] == startpc )
1131 if( k - startk > 1 )
1132 SCIPsortRealInt(&(values[startk]), &(colindices[startk]), k - startk);
1137 assert(startk + t < i);
1138 startval = values[startk + t];
1142 while( t < k - startk &&
SCIPisEQ(scip, startval, values[startk + t]) )
1146 newpclass = pcset[0];
1147 assert(pcsetfill > 0);
1148 pcset[0] = pcset[--pcsetfill];
1151 for( m = startk + startt; m < startk + t; m++ )
1154 assert(colindices[m] < ncols);
1155 assert(newpclass < ncols);
1157 pclass[colindices[m]] = newpclass;
1158 classsizes[newpclass]++;
1161 if( t == k - startk )
1209 if( varstofix[dominatingidx] ==
NOFIX )
1223 newub = dominatingub;
1232 SCIPdebugMsg(scip,
"[ub]\tupper bound for dominating variable <%s> changed: [%.17f,%.17f] -> [%.17f,%.17f]\n",
1251 newlb = dominatinglb;
1260 SCIPdebugMsg(scip,
"[lb]\tlower bound of dominating variable <%s> changed: [%.17f,%.17f] -> [%.17f,%.17f]\n",
1280 newlb = dominatingwcub;
1289 SCIPdebugMsg(scip,
"[wcub]\tlower bound of dominating variable <%s> changed: [%.17f,%.17f] -> [%.17f,%.17f]\n",
1297 if( varstofix[dominatedidx] ==
NOFIX )
1310 newub = dominatedub;
1316 SCIPdebugMsg(scip,
"[ub]\tupper bound of dominated variable <%s> changed: [%.17f,%.17f] -> [%.17f,%.17f]\n",
1336 newub = dominatedwclb;
1345 SCIPdebugMsg(scip,
"[wclb]\tupper bound of dominated variable <%s> changed: [%.17f,%.17f] -> [%.17f,%.17f]\n",
1363 newlb = dominatedlb;
1369 SCIPdebugMsg(scip,
"[lb]\tlower bound of dominated variable <%s> changed: [%.17f,%.17f] -> [%.17f,%.17f]\n",
1422 varstofix[dominatedidx] =
FIXATLB;
1441 varstofix[dominatedidx] =
FIXATLB;
1459 varstofix[dominatedidx] =
FIXATLB;
1472 varstofix[dominatingidx] =
FIXATUB;
1484 varstofix[dominatingidx] =
FIXATUB;
1497 varstofix[dominatedidx] =
FIXATLB;
1508 varstofix[dominatingidx] =
FIXATUB;
1513 assert(!onlyoneone);
1537 SCIP_Real tmpwclowerbounddominatingcol1;
1538 SCIP_Real tmpwclowerbounddominatingcol2;
1541 SCIP_Real tmpwcupperbounddominatingcol1;
1542 SCIP_Real tmpwcupperbounddominatingcol2;
1568 assert(scip != NULL);
1569 assert(matrix != NULL);
1570 assert(presoldata != NULL);
1571 assert(searchcols != NULL);
1572 assert(varstofix != NULL);
1573 assert(nfixings != NULL);
1574 assert(ndomrelations != NULL);
1575 assert(nchgbds != NULL);
1578 oldnfixings = *nfixings;
1581 for( cnt1 = 0; cnt1 < searchsize; cnt1++ )
1587 col1 = searchcols[cnt1];
1589 if( varstofix[col1] ==
FIXATLB )
1595 for( cnt2 = cnt1+1; cnt2 < searchsize; cnt2++ )
1598 col2 = searchcols[cnt2];
1611 col1domcol2 = col1domcol2 && (varstofix[col2] ==
NOFIX);
1612 col2domcol1 = col2domcol1 && (varstofix[col1] ==
NOFIX);
1620 col1domcol2 =
FALSE;
1621 col2domcol1 =
FALSE;
1626 if( paircnt == presoldata->numcurrentpairs )
1628 assert(*nfixings >= oldnfixings);
1629 if( *nfixings == oldnfixings )
1632 presoldata->numcurrentpairs >>= 1;
1633 if( presoldata->numcurrentpairs < presoldata->numminpairs )
1634 presoldata->numcurrentpairs = presoldata->numminpairs;
1639 oldnfixings = *nfixings;
1643 presoldata->numcurrentpairs <<= 1;
1644 if( presoldata->numcurrentpairs > presoldata->nummaxpairs )
1645 presoldata->numcurrentpairs = presoldata->nummaxpairs;
1649 if( !col1domcol2 && !col2domcol1 )
1663 if( nrows1 == 0 || nrows2 == 0 )
1668 tmpupperbounddominatingcol2 = tmpupperbounddominatingcol1;
1670 tmpwclowerbounddominatingcol2 = tmpwclowerbounddominatingcol1;
1672 tmplowerbounddominatingcol2 = tmplowerbounddominatingcol1;
1674 tmpwcupperbounddominatingcol2 = tmpwcupperbounddominatingcol1;
1678 tmpupperbounddominatedcol2 = tmpupperbounddominatedcol1;
1680 tmpwclowerbounddominatedcol2 = tmpwclowerbounddominatedcol1;
1682 tmplowerbounddominatedcol2 = tmplowerbounddominatedcol1;
1684 tmpwcupperbounddominatedcol2 = tmpwcupperbounddominatedcol1;
1687 while( (col1domcol2 || col2domcol1) && (r1 < nrows1 || r2 < nrows2) )
1689 assert((r1 >= nrows1-1) || (rows1[r1] < rows1[r1+1]));
1690 assert((r2 >= nrows2-1) || (rows2[r2] < rows2[r2+1]));
1693 if( r1 < nrows1 && (r2 == nrows2 || rows1[r1] < rows2[r2]) )
1699 col2domcol1 =
FALSE;
1700 col1domcol2 =
FALSE;
1705 if( vals1[r1] > 0.0 )
1706 col2domcol1 =
FALSE;
1708 col1domcol2 =
FALSE;
1714 else if( r2 < nrows2 && (r1 == nrows1 || rows1[r1] > rows2[r2]) )
1720 col2domcol1 =
FALSE;
1721 col1domcol2 =
FALSE;
1726 if( vals2[r2] < 0.0 )
1727 col2domcol1 =
FALSE;
1729 col1domcol2 =
FALSE;
1737 assert(r1 < nrows1 && r2 < nrows2);
1738 assert(rows1[r1] == rows2[r2]);
1743 if( onlybinvars && !onlyoneone )
1745 if( vals1[r1] < 0 && vals2[r2] < 0 )
1757 if ( vals1[r1] > 0 && vals2[r2] > 0 )
1772 tmpupperbounddominatingcol2 = tmpupperbounddominatingcol1;
1774 tmpwclowerbounddominatingcol2 = tmpwclowerbounddominatingcol1;
1776 tmplowerbounddominatingcol2 = tmplowerbounddominatingcol1;
1778 tmpwcupperbounddominatingcol2 = tmpwcupperbounddominatingcol1;
1781 tmpupperbounddominatedcol2 = tmpupperbounddominatedcol1;
1783 tmpwclowerbounddominatedcol2 = tmpwclowerbounddominatedcol1;
1785 tmplowerbounddominatedcol2 = tmplowerbounddominatedcol1;
1787 tmpwcupperbounddominatedcol2 = tmpwcupperbounddominatedcol1;
1795 if( !
SCIPisEQ(scip, vals1[r1], vals2[r2]) )
1797 col2domcol1 =
FALSE;
1798 col1domcol2 =
FALSE;
1804 if( vals1[r1] > vals2[r2] )
1805 col2domcol1 =
FALSE;
1806 else if( vals1[r1] < vals2[r2] )
1807 col1domcol2 =
FALSE;
1815 ((vals1[r1] < 0 && vals2[r2] < 0) || (vals1[r1] > 0 && vals2[r2] > 0)) )
1821 col1, vals1[r1], col2, vals2[r2],
TRUE,
1822 &tmpupperbounddominatingcol1, &tmpwclowerbounddominatingcol1,
1823 &tmplowerbounddominatingcol1, &tmpwcupperbounddominatingcol1) );
1827 col1, vals1[r1], col2, vals2[r2],
FALSE,
1828 &tmpupperbounddominatedcol1, &tmpwclowerbounddominatedcol1,
1829 &tmplowerbounddominatedcol1, &tmpwcupperbounddominatedcol1) );
1836 col2, vals2[r2], col1, vals1[r1],
TRUE,
1837 &tmpupperbounddominatingcol2, &tmpwclowerbounddominatingcol2,
1838 &tmplowerbounddominatingcol2, &tmpwcupperbounddominatingcol2) );
1842 col2, vals2[r2], col1, vals1[r1],
FALSE,
1843 &tmpupperbounddominatedcol2, &tmpwclowerbounddominatedcol2,
1844 &tmplowerbounddominatedcol2, &tmpwcupperbounddominatedcol2) );
1854 col1domcol2 = col1domcol2 && r2 == nrows2;
1855 col2domcol1 = col2domcol1 && r1 == nrows1;
1857 if( !col1domcol2 && !col2domcol1 )
1861 while( r1 < nrows1 )
1865 col2domcol1 =
FALSE;
1866 col1domcol2 =
FALSE;
1871 if( !col1domcol2 && !col2domcol1 )
1873 while( r2 < nrows2 )
1877 col2domcol1 =
FALSE;
1878 col1domcol2 =
FALSE;
1884 if( col1domcol2 || col2domcol1 )
1887 if( col1domcol2 && col2domcol1 )
1891 col2domcol1 =
FALSE;
1893 col1domcol2 =
FALSE;
1903 tmpupperbounddominatingcol1, tmpwclowerbounddominatingcol1,
1904 tmplowerbounddominatingcol1, tmpwcupperbounddominatingcol1,
1906 varstofix, onlybinvars, onlyoneone, nfixings) );
1908 if( presoldata->predbndstr )
1911 tmpupperbounddominatingcol1,
1912 tmplowerbounddominatingcol1, tmpwcupperbounddominatingcol1,
1914 tmpupperbounddominatedcol1, tmpwclowerbounddominatedcol1,
1915 tmplowerbounddominatedcol1,
1916 varstofix, nchgbds) );
1919 else if( col2domcol1 )
1922 tmpupperbounddominatingcol2, tmpwclowerbounddominatingcol2,
1923 tmplowerbounddominatingcol2, tmpwcupperbounddominatingcol2,
1925 varstofix, onlybinvars, onlyoneone, nfixings) );
1927 if( presoldata->predbndstr )
1930 tmpupperbounddominatingcol2,
1931 tmplowerbounddominatingcol2, tmpwcupperbounddominatingcol2,
1933 tmpupperbounddominatedcol2, tmpwclowerbounddominatedcol2,
1934 tmplowerbounddominatedcol2,
1935 varstofix, nchgbds) );
1938 if( varstofix[col1] ==
FIXATLB )
1956 assert(scip != NULL);
1957 assert(presol != NULL);
1974 assert(presoldata != NULL);
1991 assert(result != NULL);
2004 assert(presoldata != NULL);
2015 if( initialized && complete )
2035 int nconvarsfixed = 0;
2036 int nintvarsfixed = 0;
2037 int nbinvarsfixed = 0;
2063 for( r = 0; r < nrows; ++r )
2065 rowidxsorted[r] = r;
2072 for( v = 0; v < ncols; v++ )
2079 presoldata->numcurrentpairs = presoldata->nummaxpairs;
2101 pclassstart = pclass[pc];
2102 while( pc < ncols && pclassstart == pclass[pc] )
2106 varidx = colidx[pc];
2112 if( !varsprocessed[varidx] && varineq[varidx] )
2117 consearchcols[nconfill++] = varidx;
2121 binsearchcols[nbinfill++] = varidx;
2126 intsearchcols[nintfill++] = varidx;
2133 if( nconfill > 1 && presoldata->continuousred )
2136 varstofix, &nfixings, &ndomrelations, nchgbds) );
2138 for( v = 0; v < nconfill; ++v )
2139 varsprocessed[consearchcols[v]] =
TRUE;
2141 varcount += nconfill;
2143 else if( nconfill == 1 )
2145 if( varineq[varidx] )
2146 varsprocessed[consearchcols[0]] =
TRUE;
2153 varstofix, &nfixings, &ndomrelations, nchgbds) );
2155 for( v = 0; v < nintfill; ++v )
2156 varsprocessed[intsearchcols[v]] =
TRUE;
2158 varcount += nintfill;
2160 else if( nintfill == 1 )
2162 if( varineq[varidx] )
2163 varsprocessed[intsearchcols[0]] =
TRUE;
2170 varstofix, &nfixings, &ndomrelations, nchgbds) );
2172 for( v = 0; v < nbinfill; ++v )
2173 varsprocessed[binsearchcols[v]] =
TRUE;
2175 varcount += nbinfill;
2177 else if( nbinfill == 1 )
2179 if( varineq[varidx] )
2180 varsprocessed[binsearchcols[0]] =
TRUE;
2183 if( varcount >= ncols )
2191 if( (presoltiming & SCIP_PRESOLTIMING_EXHAUSTIVE) != 0 )
2195 for( r = 0; r < nrows; ++r )
2207 rowidx = rowidxsorted[r];
2218 for( ; rowpnt < rowend; rowpnt++ )
2220 if( !(varsprocessed[*rowpnt]) )
2231 consearchcols[nconfill++] = varidx;
2235 binsearchcols[nbinfill++] = varidx;
2240 intsearchcols[nintfill++] = varidx;
2246 if( nconfill > 1 && presoldata->continuousred )
2249 varstofix, &nfixings, &ndomrelations, nchgbds) );
2251 for( v = 0; v < nconfill; ++v )
2252 varsprocessed[consearchcols[v]] =
TRUE;
2254 varcount += nconfill;
2261 varstofix, &nfixings, &ndomrelations, nchgbds) );
2263 for( v = 0; v < nintfill; ++v )
2264 varsprocessed[intsearchcols[v]] =
TRUE;
2266 varcount += nintfill;
2273 varstofix, &nfixings, &ndomrelations, nchgbds) );
2275 for( v = 0; v < nbinfill; ++v )
2276 varsprocessed[binsearchcols[v]] =
TRUE;
2278 varcount += nbinfill;
2281 if( varcount >= ncols )
2290 oldnfixedvars = *nfixedvars;
2292 for( v = ncols - 1; v >= 0; --v )
2335 else if( varstofix[v] ==
FIXATUB )
2365 if( *result !=
SCIP_CUTOFF && *nfixedvars > oldnfixedvars )
2381 if( (nconvarsfixed + nintvarsfixed + nbinvarsfixed) > 0 )
2383 SCIPdebugMsg(scip,
"### %d vars [%" SCIP_LONGINT_FORMAT
" dom] => fixed [cont: %d, int: %d, bin: %d], %scutoff detected\n",
2384 ncols, ndomrelations, nconvarsfixed, nintvarsfixed, nbinvarsfixed, (*result !=
SCIP_CUTOFF) ?
"no " :
"");
2416 "presolving/domcol/numminpairs",
2417 "minimal number of pair comparisons",
2421 "presolving/domcol/nummaxpairs",
2422 "maximal number of pair comparisons",
2426 "presolving/domcol/predbndstr",
2427 "should predictive bound strengthening be applied?",
2431 "presolving/domcol/continuousred",
2432 "should reductions for continuous variables be performed?",
void SCIPsortRealInt(SCIP_Real *realarray, int *intarray, int len)
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)
int SCIPgetNIntVars(SCIP *scip)
struct SCIP_PresolData SCIP_PRESOLDATA
SCIP_VAR * SCIPmatrixGetVar(SCIP_MATRIX *matrix, int col)
SCIP_Bool SCIPvarsHaveCommonClique(SCIP_VAR *var1, SCIP_Bool value1, SCIP_VAR *var2, SCIP_Bool value2, SCIP_Bool regardimplics)
int SCIPmatrixGetNRows(SCIP_MATRIX *matrix)
SCIP_RETCODE SCIPsetPresolFree(SCIP *scip, SCIP_PRESOL *presol, SCIP_DECL_PRESOLFREE((*presolfree)))
SCIP_STAGE SCIPgetStage(SCIP *scip)
static SCIP_RETCODE calcVarBoundsDominating(SCIP *scip, SCIP_MATRIX *matrix, int row, int coldominating, SCIP_Real valdominating, int coldominated, SCIP_Real valdominated, SCIP_Bool *ubcalculated, SCIP_Real *calculatedub, SCIP_Bool *wclbcalculated, SCIP_Real *calculatedwclb, SCIP_Bool *lbcalculated, SCIP_Real *calculatedlb, SCIP_Bool *wcubcalculated, SCIP_Real *calculatedwcub)
#define DEFAULT_PREDBNDSTR
SCIP_Real SCIPvarGetLbGlobal(SCIP_VAR *var)
SCIP_Bool SCIPisPositive(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPvarIsBinary(SCIP_VAR *var)
static SCIP_RETCODE updateBounds(SCIP *scip, SCIP_MATRIX *matrix, int row, int col1, SCIP_Real val1, int col2, SCIP_Real val2, SCIP_Bool predictdominating, SCIP_Real *upperbound, SCIP_Real *wclowerbound, SCIP_Real *lowerbound, SCIP_Real *wcupperbound)
void SCIPmatrixFree(SCIP *scip, SCIP_MATRIX **matrix)
SCIP_Bool SCIPisFeasGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
dominated column presolver
int SCIPgetNActivePricers(SCIP *scip)
SCIP_Real SCIPinfinity(SCIP *scip)
SCIP_Bool SCIPisNegative(SCIP *scip, SCIP_Real val)
enum SCIP_Retcode SCIP_RETCODE
#define SCIP_PRESOLTIMING_EXHAUSTIVE
SCIP_PRESOLDATA * SCIPpresolGetData(SCIP_PRESOL *presol)
SCIP_RETCODE SCIPincludePresolDomcol(SCIP *scip)
#define SCIPfreeBlockMemory(scip, ptr)
void SCIPsortIntIntReal(int *intarray1, int *intarray2, SCIP_Real *realarray, int len)
static SCIP_RETCODE findFixings(SCIP *scip, SCIP_MATRIX *matrix, SCIP_VAR *dominatingvar, int dominatingidx, SCIP_Real dominatingub, SCIP_Real dominatingwclb, SCIP_Real dominatinglb, SCIP_Real dominatingwcub, SCIP_VAR *dominatedvar, int dominatedidx, FIXINGDIRECTION *varstofix, SCIP_Bool onlybinvars, SCIP_Bool onlyoneone, int *nfixings)
SCIP_RETCODE SCIPchgVarLb(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound)
SCIP_Bool SCIPisEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
#define SCIPfreeBufferArray(scip, ptr)
SCIP_Real SCIPmatrixGetRowMaxActivity(SCIP_MATRIX *matrix, int row)
#define DEFAULT_NUMMINPAIRS
#define SCIPallocBlockMemory(scip, ptr)
#define SCIPdebugMsgPrint
SCIP_RETCODE SCIPmatrixCreate(SCIP *scip, SCIP_MATRIX **matrixptr, SCIP_Bool *initialized, SCIP_Bool *complete)
SCIP_RETCODE SCIPaddIntParam(SCIP *scip, const char *name, const char *desc, int *valueptr, SCIP_Bool isadvanced, int defaultvalue, int minvalue, int maxvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
int SCIPmatrixGetRowNNonzs(SCIP_MATRIX *matrix, int row)
SCIP_Real SCIPvarGetUbGlobal(SCIP_VAR *var)
SCIP_Real SCIPmatrixGetRowLhs(SCIP_MATRIX *matrix, int row)
enum Fixingdirection FIXINGDIRECTION
SCIP_Real * SCIPmatrixGetColValPtr(SCIP_MATRIX *matrix, int col)
static void getActivityResidualsLowerBound(SCIP *scip, SCIP_MATRIX *matrix, int row, int col, SCIP_Real coef, int lowerboundcol, SCIP_Real lowerboundcoef, SCIP_Real *minresactivity, SCIP_Real *maxresactivity, SCIP_Bool *success)
void SCIPsortIntInt(int *intarray1, int *intarray2, int len)
SCIP_Bool SCIPisLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
void SCIPpresolSetData(SCIP_PRESOL *presol, SCIP_PRESOLDATA *presoldata)
int SCIPmatrixGetRowNMaxActPosInf(SCIP_MATRIX *matrix, int row)
SCIP_RETCODE SCIPchgVarUb(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound)
int * SCIPmatrixGetRowIdxPtr(SCIP_MATRIX *matrix, int row)
const char * SCIPvarGetName(SCIP_VAR *var)
SCIP_Bool SCIPisNLPEnabled(SCIP *scip)
int SCIPmatrixGetRowNMaxActNegInf(SCIP_MATRIX *matrix, int row)
SCIP_Bool SCIPisFeasLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Real * SCIPmatrixGetRowValPtr(SCIP_MATRIX *matrix, int row)
static SCIP_RETCODE predBndStr(SCIP *scip, SCIP_VAR *dominatingvar, int dominatingidx, SCIP_Real dominatingub, SCIP_Real dominatinglb, SCIP_Real dominatingwcub, SCIP_VAR *dominatedvar, int dominatedidx, SCIP_Real dominatedub, SCIP_Real dominatedwclb, SCIP_Real dominatedlb, FIXINGDIRECTION *varstofix, int *nchgbds)
static SCIP_RETCODE findDominancePairs(SCIP *scip, SCIP_MATRIX *matrix, SCIP_PRESOLDATA *presoldata, int *searchcols, int searchsize, SCIP_Bool onlybinvars, FIXINGDIRECTION *varstofix, int *nfixings, SCIP_Longint *ndomrelations, int *nchgbds)
#define SCIPallocBufferArray(scip, ptr, num)
static SCIP_DECL_PRESOLFREE(presolFreeDomcol)
int SCIPvarGetNLocksUp(SCIP_VAR *var)
int * SCIPmatrixGetColIdxPtr(SCIP_MATRIX *matrix, int col)
const char * SCIPpresolGetName(SCIP_PRESOL *presol)
SCIP_Real SCIPvarGetObj(SCIP_VAR *var)
SCIP_RETCODE SCIPfixVar(SCIP *scip, SCIP_VAR *var, SCIP_Real fixedval, SCIP_Bool *infeasible, SCIP_Bool *fixed)
static SCIP_RETCODE calcVarBoundsDominated(SCIP *scip, SCIP_MATRIX *matrix, int row, int coldominating, SCIP_Real valdominating, int coldominated, SCIP_Real valdominated, SCIP_Bool *ubcalculated, SCIP_Real *calculatedub, SCIP_Bool *wclbcalculated, SCIP_Real *calculatedwclb, SCIP_Bool *lbcalculated, SCIP_Real *calculatedlb, SCIP_Bool *wcubcalculated, SCIP_Real *calculatedwcub)
int SCIPmatrixGetRowNMinActNegInf(SCIP_MATRIX *matrix, int row)
SCIP_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)
static SCIP_DECL_PRESOLEXEC(presolExecDomcol)
public methods for matrix
int SCIPgetNBinVars(SCIP *scip)
SCIP_Bool SCIPinProbing(SCIP *scip)
int SCIPgetNVars(SCIP *scip)
static void getActivityResidualsUpperBound(SCIP *scip, SCIP_MATRIX *matrix, int row, int col, SCIP_Real coef, int upperboundcol, SCIP_Real upperboundcoef, SCIP_Real *minresactivity, SCIP_Real *maxresactivity, SCIP_Bool *success)
int SCIPvarGetNLocksDown(SCIP_VAR *var)
SCIP_Real SCIPmatrixGetRowRhs(SCIP_MATRIX *matrix, int row)
SCIP_Bool SCIPmatrixIsRowRhsInfinity(SCIP_MATRIX *matrix, int row)
SCIP_RETCODE SCIPsetPresolCopy(SCIP *scip, SCIP_PRESOL *presol, SCIP_DECL_PRESOLCOPY((*presolcopy)))
SCIP_Bool SCIPallowDualReds(SCIP *scip)
SCIP_VARSTATUS SCIPvarGetStatus(SCIP_VAR *var)
#define DEFAULT_NUMMAXPAIRS
SCIP_Bool SCIPisStopped(SCIP *scip)
static SCIP_RETCODE detectParallelCols(SCIP *scip, SCIP_MATRIX *matrix, int *pclass, SCIP_Bool *varineq)
SCIP_Real SCIPmatrixGetRowMinActivity(SCIP_MATRIX *matrix, int row)
int SCIPmatrixGetColNDownlocks(SCIP_MATRIX *matrix, int col)
SCIP_VARTYPE SCIPvarGetType(SCIP_VAR *var)
SCIP_Bool SCIPisZero(SCIP *scip, SCIP_Real val)
int SCIPmatrixGetRowNMinActPosInf(SCIP_MATRIX *matrix, int row)
SCIP_Bool SCIPisLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisFeasIntegral(SCIP *scip, SCIP_Real val)
int SCIPmatrixGetColNUplocks(SCIP_MATRIX *matrix, int col)
#define BMSclearMemoryArray(ptr, num)
SCIP_Real SCIPceil(SCIP *scip, SCIP_Real val)
static SCIP_DECL_PRESOLCOPY(presolCopyDomcol)
static SCIP_RETCODE printRow(SCIP *scip, FZNOUTPUT *fznoutput, const char *type, SCIP_VAR **vars, SCIP_Real *vals, int nvars, SCIP_Real rhs, SCIP_Bool hasfloats)
int SCIPmatrixGetNColumns(SCIP_MATRIX *matrix)
#define DEFAULT_CONTINUOUS_RED
SCIP_Real SCIPfloor(SCIP *scip, SCIP_Real val)
SCIP_RETCODE SCIPaddBoolParam(SCIP *scip, const char *name, const char *desc, SCIP_Bool *valueptr, SCIP_Bool isadvanced, SCIP_Bool defaultvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
int SCIPmatrixGetColNNonzs(SCIP_MATRIX *matrix, int col)