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;
1125 while( k < i && pcs[k] == startpc )
1129 if( k - startk > 1 )
1130 SCIPsortRealInt(&(values[startk]), &(colindices[startk]), k - startk);
1135 assert(startk + t < i);
1136 startval = values[startk + t];
1140 while( t < k - startk &&
SCIPisEQ(scip, startval, values[startk + t]) )
1144 newpclass = pcset[0];
1145 assert(pcsetfill > 0);
1146 pcset[0] = pcset[--pcsetfill];
1149 for( m = startk + startt; m < startk + t; m++ )
1152 assert(colindices[m] < ncols);
1153 assert(newpclass < ncols);
1155 pclass[colindices[m]] = newpclass;
1156 classsizes[newpclass]++;
1159 if( t == k - startk )
1207 if( varstofix[dominatingidx] ==
NOFIX )
1221 newub = dominatingub;
1230 SCIPdebugMsg(scip,
"[ub]\tupper bound for dominating variable <%s> changed: [%.17f,%.17f] -> [%.17f,%.17f]\n",
1249 newlb = dominatinglb;
1258 SCIPdebugMsg(scip,
"[lb]\tlower bound of dominating variable <%s> changed: [%.17f,%.17f] -> [%.17f,%.17f]\n",
1278 newlb = dominatingwcub;
1287 SCIPdebugMsg(scip,
"[wcub]\tlower bound of dominating variable <%s> changed: [%.17f,%.17f] -> [%.17f,%.17f]\n",
1295 if( varstofix[dominatedidx] ==
NOFIX )
1308 newub = dominatedub;
1314 SCIPdebugMsg(scip,
"[ub]\tupper bound of dominated variable <%s> changed: [%.17f,%.17f] -> [%.17f,%.17f]\n",
1334 newub = dominatedwclb;
1343 SCIPdebugMsg(scip,
"[wclb]\tupper bound of dominated variable <%s> changed: [%.17f,%.17f] -> [%.17f,%.17f]\n",
1361 newlb = dominatedlb;
1367 SCIPdebugMsg(scip,
"[lb]\tlower bound of dominated variable <%s> changed: [%.17f,%.17f] -> [%.17f,%.17f]\n",
1420 varstofix[dominatedidx] =
FIXATLB;
1439 varstofix[dominatedidx] =
FIXATLB;
1457 varstofix[dominatedidx] =
FIXATLB;
1470 varstofix[dominatingidx] =
FIXATUB;
1482 varstofix[dominatingidx] =
FIXATUB;
1495 varstofix[dominatedidx] =
FIXATLB;
1506 varstofix[dominatingidx] =
FIXATUB;
1511 assert(!onlyoneone);
1535 SCIP_Real tmpwclowerbounddominatingcol1;
1536 SCIP_Real tmpwclowerbounddominatingcol2;
1539 SCIP_Real tmpwcupperbounddominatingcol1;
1540 SCIP_Real tmpwcupperbounddominatingcol2;
1566 assert(scip !=
NULL);
1567 assert(matrix !=
NULL);
1568 assert(presoldata !=
NULL);
1569 assert(searchcols !=
NULL);
1570 assert(varstofix !=
NULL);
1571 assert(nfixings !=
NULL);
1572 assert(ndomrelations !=
NULL);
1573 assert(nchgbds !=
NULL);
1576 oldnfixings = *nfixings;
1579 for( cnt1 = 0; cnt1 < searchsize; cnt1++ )
1585 col1 = searchcols[cnt1];
1587 if( varstofix[col1] ==
FIXATLB )
1593 for( cnt2 = cnt1+1; cnt2 < searchsize; cnt2++ )
1596 col2 = searchcols[cnt2];
1609 col1domcol2 = col1domcol2 && (varstofix[col2] ==
NOFIX);
1610 col2domcol1 = col2domcol1 && (varstofix[col1] ==
NOFIX);
1618 col1domcol2 =
FALSE;
1619 col2domcol1 =
FALSE;
1624 if( paircnt == presoldata->numcurrentpairs )
1626 assert(*nfixings >= oldnfixings);
1627 if( *nfixings == oldnfixings )
1630 presoldata->numcurrentpairs >>= 1;
1631 if( presoldata->numcurrentpairs < presoldata->numminpairs )
1632 presoldata->numcurrentpairs = presoldata->numminpairs;
1637 oldnfixings = *nfixings;
1641 presoldata->numcurrentpairs <<= 1;
1642 if( presoldata->numcurrentpairs > presoldata->nummaxpairs )
1643 presoldata->numcurrentpairs = presoldata->nummaxpairs;
1647 if( !col1domcol2 && !col2domcol1 )
1661 if( nrows1 == 0 || nrows2 == 0 )
1666 tmpupperbounddominatingcol2 = tmpupperbounddominatingcol1;
1668 tmpwclowerbounddominatingcol2 = tmpwclowerbounddominatingcol1;
1670 tmplowerbounddominatingcol2 = tmplowerbounddominatingcol1;
1672 tmpwcupperbounddominatingcol2 = tmpwcupperbounddominatingcol1;
1676 tmpupperbounddominatedcol2 = tmpupperbounddominatedcol1;
1678 tmpwclowerbounddominatedcol2 = tmpwclowerbounddominatedcol1;
1680 tmplowerbounddominatedcol2 = tmplowerbounddominatedcol1;
1682 tmpwcupperbounddominatedcol2 = tmpwcupperbounddominatedcol1;
1685 while( (col1domcol2 || col2domcol1) && (r1 < nrows1 || r2 < nrows2) )
1687 assert((r1 >= nrows1-1) || (rows1[r1] < rows1[r1+1]));
1688 assert((r2 >= nrows2-1) || (rows2[r2] < rows2[r2+1]));
1691 if( r1 < nrows1 && (r2 == nrows2 || rows1[r1] < rows2[r2]) )
1697 col2domcol1 =
FALSE;
1698 col1domcol2 =
FALSE;
1703 if( vals1[r1] > 0.0 )
1704 col2domcol1 =
FALSE;
1706 col1domcol2 =
FALSE;
1712 else if( r2 < nrows2 && (r1 == nrows1 || rows1[r1] > rows2[r2]) )
1718 col2domcol1 =
FALSE;
1719 col1domcol2 =
FALSE;
1724 if( vals2[r2] < 0.0 )
1725 col2domcol1 =
FALSE;
1727 col1domcol2 =
FALSE;
1735 assert(r1 < nrows1 && r2 < nrows2);
1736 assert(rows1[r1] == rows2[r2]);
1741 if( onlybinvars && !onlyoneone )
1743 if( vals1[r1] < 0 && vals2[r2] < 0 )
1755 if ( vals1[r1] > 0 && vals2[r2] > 0 )
1770 tmpupperbounddominatingcol2 = tmpupperbounddominatingcol1;
1772 tmpwclowerbounddominatingcol2 = tmpwclowerbounddominatingcol1;
1774 tmplowerbounddominatingcol2 = tmplowerbounddominatingcol1;
1776 tmpwcupperbounddominatingcol2 = tmpwcupperbounddominatingcol1;
1779 tmpupperbounddominatedcol2 = tmpupperbounddominatedcol1;
1781 tmpwclowerbounddominatedcol2 = tmpwclowerbounddominatedcol1;
1783 tmplowerbounddominatedcol2 = tmplowerbounddominatedcol1;
1785 tmpwcupperbounddominatedcol2 = tmpwcupperbounddominatedcol1;
1793 if( !
SCIPisEQ(scip, vals1[r1], vals2[r2]) )
1795 col2domcol1 =
FALSE;
1796 col1domcol2 =
FALSE;
1802 if( vals1[r1] > vals2[r2] )
1803 col2domcol1 =
FALSE;
1804 else if( vals1[r1] < vals2[r2] )
1805 col1domcol2 =
FALSE;
1813 ((vals1[r1] < 0 && vals2[r2] < 0) || (vals1[r1] > 0 && vals2[r2] > 0)) )
1819 col1, vals1[r1], col2, vals2[r2],
TRUE,
1820 &tmpupperbounddominatingcol1, &tmpwclowerbounddominatingcol1,
1821 &tmplowerbounddominatingcol1, &tmpwcupperbounddominatingcol1) );
1825 col1, vals1[r1], col2, vals2[r2],
FALSE,
1826 &tmpupperbounddominatedcol1, &tmpwclowerbounddominatedcol1,
1827 &tmplowerbounddominatedcol1, &tmpwcupperbounddominatedcol1) );
1834 col2, vals2[r2], col1, vals1[r1],
TRUE,
1835 &tmpupperbounddominatingcol2, &tmpwclowerbounddominatingcol2,
1836 &tmplowerbounddominatingcol2, &tmpwcupperbounddominatingcol2) );
1840 col2, vals2[r2], col1, vals1[r1],
FALSE,
1841 &tmpupperbounddominatedcol2, &tmpwclowerbounddominatedcol2,
1842 &tmplowerbounddominatedcol2, &tmpwcupperbounddominatedcol2) );
1852 col1domcol2 = col1domcol2 && r2 == nrows2;
1853 col2domcol1 = col2domcol1 && r1 == nrows1;
1855 if( !col1domcol2 && !col2domcol1 )
1859 while( r1 < nrows1 )
1863 col2domcol1 =
FALSE;
1864 col1domcol2 =
FALSE;
1869 if( !col1domcol2 && !col2domcol1 )
1871 while( r2 < nrows2 )
1875 col2domcol1 =
FALSE;
1876 col1domcol2 =
FALSE;
1882 if( col1domcol2 || col2domcol1 )
1885 if( col1domcol2 && col2domcol1 )
1889 col2domcol1 =
FALSE;
1891 col1domcol2 =
FALSE;
1901 tmpupperbounddominatingcol1, tmpwclowerbounddominatingcol1,
1902 tmplowerbounddominatingcol1, tmpwcupperbounddominatingcol1,
1904 varstofix, onlybinvars, onlyoneone, nfixings) );
1906 if( presoldata->predbndstr )
1909 tmpupperbounddominatingcol1,
1910 tmplowerbounddominatingcol1, tmpwcupperbounddominatingcol1,
1912 tmpupperbounddominatedcol1, tmpwclowerbounddominatedcol1,
1913 tmplowerbounddominatedcol1,
1914 varstofix, nchgbds) );
1917 else if( col2domcol1 )
1920 tmpupperbounddominatingcol2, tmpwclowerbounddominatingcol2,
1921 tmplowerbounddominatingcol2, tmpwcupperbounddominatingcol2,
1923 varstofix, onlybinvars, onlyoneone, nfixings) );
1925 if( presoldata->predbndstr )
1928 tmpupperbounddominatingcol2,
1929 tmplowerbounddominatingcol2, tmpwcupperbounddominatingcol2,
1931 tmpupperbounddominatedcol2, tmpwclowerbounddominatedcol2,
1932 tmplowerbounddominatedcol2,
1933 varstofix, nchgbds) );
1936 if( varstofix[col1] ==
FIXATLB )
1954 assert(scip !=
NULL);
1955 assert(presol !=
NULL);
1972 assert(presoldata !=
NULL);
1989 assert(result !=
NULL);
2002 assert(presoldata !=
NULL);
2013 if( initialized && complete )
2033 int nconvarsfixed = 0;
2034 int nintvarsfixed = 0;
2035 int nbinvarsfixed = 0;
2061 for( r = 0; r < nrows; ++r )
2063 rowidxsorted[r] = r;
2070 for( v = 0; v < ncols; v++ )
2077 presoldata->numcurrentpairs = presoldata->nummaxpairs;
2099 pclassstart = pclass[pc];
2100 while( pc < ncols && pclassstart == pclass[pc] )
2104 varidx = colidx[pc];
2110 if( !varsprocessed[varidx] && varineq[varidx] )
2115 consearchcols[nconfill++] = varidx;
2119 binsearchcols[nbinfill++] = varidx;
2124 intsearchcols[nintfill++] = varidx;
2131 if( nconfill > 1 && presoldata->continuousred )
2134 varstofix, &nfixings, &ndomrelations, nchgbds) );
2136 for( v = 0; v < nconfill; ++v )
2137 varsprocessed[consearchcols[v]] =
TRUE;
2139 varcount += nconfill;
2141 else if( nconfill == 1 )
2143 if( varineq[varidx] )
2144 varsprocessed[consearchcols[0]] =
TRUE;
2151 varstofix, &nfixings, &ndomrelations, nchgbds) );
2153 for( v = 0; v < nintfill; ++v )
2154 varsprocessed[intsearchcols[v]] =
TRUE;
2156 varcount += nintfill;
2158 else if( nintfill == 1 )
2160 if( varineq[varidx] )
2161 varsprocessed[intsearchcols[0]] =
TRUE;
2168 varstofix, &nfixings, &ndomrelations, nchgbds) );
2170 for( v = 0; v < nbinfill; ++v )
2171 varsprocessed[binsearchcols[v]] =
TRUE;
2173 varcount += nbinfill;
2175 else if( nbinfill == 1 )
2177 if( varineq[varidx] )
2178 varsprocessed[binsearchcols[0]] =
TRUE;
2181 if( varcount >= ncols )
2189 if( (presoltiming & SCIP_PRESOLTIMING_EXHAUSTIVE) != 0 )
2193 for( r = 0; r < nrows; ++r )
2205 rowidx = rowidxsorted[r];
2216 for( ; rowpnt < rowend; rowpnt++ )
2218 if( !(varsprocessed[*rowpnt]) )
2229 consearchcols[nconfill++] = varidx;
2233 binsearchcols[nbinfill++] = varidx;
2238 intsearchcols[nintfill++] = varidx;
2244 if( nconfill > 1 && presoldata->continuousred )
2247 varstofix, &nfixings, &ndomrelations, nchgbds) );
2249 for( v = 0; v < nconfill; ++v )
2250 varsprocessed[consearchcols[v]] =
TRUE;
2252 varcount += nconfill;
2259 varstofix, &nfixings, &ndomrelations, nchgbds) );
2261 for( v = 0; v < nintfill; ++v )
2262 varsprocessed[intsearchcols[v]] =
TRUE;
2264 varcount += nintfill;
2271 varstofix, &nfixings, &ndomrelations, nchgbds) );
2273 for( v = 0; v < nbinfill; ++v )
2274 varsprocessed[binsearchcols[v]] =
TRUE;
2276 varcount += nbinfill;
2279 if( varcount >= ncols )
2288 oldnfixedvars = *nfixedvars;
2290 for( v = ncols - 1; v >= 0; --v )
2333 else if( varstofix[v] ==
FIXATUB )
2363 if( *result !=
SCIP_CUTOFF && *nfixedvars > oldnfixedvars )
2379 if( (nconvarsfixed + nintvarsfixed + nbinvarsfixed) > 0 )
2381 SCIPdebugMsg(scip,
"### %d vars [%" SCIP_LONGINT_FORMAT
" dom] => fixed [cont: %d, int: %d, bin: %d], %scutoff detected\n",
2382 ncols, ndomrelations, nconvarsfixed, nintvarsfixed, nbinvarsfixed, (*result !=
SCIP_CUTOFF) ?
"no " :
"");
2414 "presolving/domcol/numminpairs",
2415 "minimal number of pair comparisons",
2419 "presolving/domcol/nummaxpairs",
2420 "maximal number of pair comparisons",
2424 "presolving/domcol/predbndstr",
2425 "should predictive bound strengthening be applied?",
2429 "presolving/domcol/continuousred",
2430 "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)