70#define PRESOL_NAME "domcol"
71#define PRESOL_DESC "dominated column presolver"
72#define PRESOL_PRIORITY -1000
73#define PRESOL_MAXROUNDS -1
74#define PRESOL_TIMING SCIP_PRESOLTIMING_EXHAUSTIVE
76#define DEFAULT_NUMMINPAIRS 1024
77#define DEFAULT_NUMMAXPAIRS 1048576
79#define DEFAULT_PREDBNDSTR FALSE
80#define DEFAULT_CONTINUOUS_RED TRUE
151 for(; (rowpnt < rowend); rowpnt++, valpnt++)
184 for(
i = 0; (colpnt < colend); colpnt++,
i++ )
191 for(
i = 0;
i < numrows;
i++ )
236 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",
315 if( upperboundcoef > 0.0 )
321 tmpminact += (upperboundcoef * ubupperboundvar);
325 tmpminact = tmpminact - (upperboundcoef * lbupperboundvar) + (upperboundcoef * ubupperboundvar);
335 tmpmaxact += (upperboundcoef * ubupperboundvar);
339 tmpmaxact = tmpmaxact - (upperboundcoef * lbupperboundvar) + (upperboundcoef * ubupperboundvar);
354 *maxresactivity = tmpmaxact;
364 *maxresactivity = tmpmaxact - coef * ub;
372 *minresactivity = tmpminact;
382 *minresactivity = tmpminact - coef * lb;
393 *maxresactivity = tmpmaxact;
403 *maxresactivity = tmpmaxact - coef * lb;
411 *minresactivity = tmpminact;
421 *minresactivity = tmpminact - coef * ub;
492 if( lowerboundcoef > 0.0 )
498 tmpmaxact += (lowerboundcoef * lblowerboundvar);
502 tmpmaxact = tmpmaxact - (lowerboundcoef * ublowerboundvar) + (lowerboundcoef * lblowerboundvar);
512 tmpminact += (lowerboundcoef * lblowerboundvar);
516 tmpminact = tmpminact - (lowerboundcoef * ublowerboundvar) + (lowerboundcoef * lblowerboundvar);
531 *maxresactivity = tmpmaxact;
541 *maxresactivity = tmpmaxact - coef * ub;
549 *minresactivity = tmpminact;
559 *minresactivity = tmpminact - coef * lb;
570 *maxresactivity = tmpmaxact;
580 *maxresactivity = tmpmaxact - coef * lb;
588 *minresactivity = tmpminact;
598 *minresactivity = tmpminact - coef * ub;
649 *ubcalculated =
FALSE;
650 *wclbcalculated =
FALSE;
651 *lbcalculated =
FALSE;
652 *wcubcalculated =
FALSE;
667 &minresactivity, &maxresactivity, &success);
682 if( valdominated > 0.0 )
687 *calculatedlb = (lhs - maxresactivity)/valdominated;
688 *lbcalculated =
TRUE;
694 *calculatedwclb = (lhs - minresactivity)/valdominated;
695 *wclbcalculated =
TRUE;
701 *wclbcalculated =
TRUE;
710 *calculatedub = (rhs - minresactivity)/valdominated;
711 *ubcalculated =
TRUE;
717 *calculatedwcub = (rhs - maxresactivity)/valdominated;
718 *wcubcalculated =
TRUE;
724 *wcubcalculated =
TRUE;
733 *calculatedub = (lhs - maxresactivity)/valdominated;
734 *ubcalculated =
TRUE;
740 *calculatedwcub = (lhs - minresactivity)/valdominated;
741 *wcubcalculated =
TRUE;
747 *wcubcalculated =
TRUE;
756 *calculatedlb = (rhs - minresactivity)/valdominated;
757 *lbcalculated =
TRUE;
763 *calculatedwclb = (rhs - maxresactivity)/valdominated;
764 *wclbcalculated =
TRUE;
770 *wclbcalculated =
TRUE;
824 *ubcalculated =
FALSE;
825 *wclbcalculated =
FALSE;
826 *lbcalculated =
FALSE;
827 *wcubcalculated =
FALSE;
842 &minresactivity, &maxresactivity, &success);
857 if( valdominating > 0.0 )
862 *calculatedlb = (lhs - maxresactivity)/valdominating;
863 *lbcalculated =
TRUE;
869 *calculatedwclb = (lhs - minresactivity)/valdominating;
870 *wclbcalculated =
TRUE;
876 *wclbcalculated =
TRUE;
885 *calculatedub = (rhs - minresactivity)/valdominating;
886 *ubcalculated =
TRUE;
892 *calculatedwcub = (rhs - maxresactivity)/valdominating;
893 *wcubcalculated =
TRUE;
899 *wcubcalculated =
TRUE;
908 *calculatedub = (lhs - maxresactivity)/valdominating;
909 *ubcalculated =
TRUE;
915 *calculatedwcub = (lhs - minresactivity)/valdominating;
916 *wcubcalculated =
TRUE;
922 *wcubcalculated =
TRUE;
931 *calculatedlb = (rhs - minresactivity)/valdominating;
932 *lbcalculated =
TRUE;
938 *calculatedwclb = (rhs - maxresactivity)/valdominating;
939 *wclbcalculated =
TRUE;
945 *wclbcalculated =
TRUE;
991 if( predictdominating )
995 &ubcalculated, &newub, &wclbcalculated, &newwclb,
996 &lbcalculated, &newlb, &wcubcalculated, &newwcub) );
1002 &ubcalculated, &newub, &wclbcalculated, &newwclb,
1003 &lbcalculated, &newlb, &wcubcalculated, &newwcub) );
1009 if( newub < *upperbound )
1010 *upperbound = newub;
1012 if( wclbcalculated )
1014 if( newwclb > *wclowerbound )
1015 *wclowerbound = newwclb;
1019 if( newlb > *lowerbound )
1020 *lowerbound = newlb;
1022 if( wcubcalculated )
1024 if( newwcub < *wcupperbound )
1025 *wcupperbound = newwcub;
1087 classsizes[0] = ncols;
1089 for( t = 1; t < ncols; ++t )
1090 pcset[pcsetfill++] = t;
1093 for(
r = 0;
r < nrows; ++
r )
1103 for( ; (rowpnt < rowend); rowpnt++, valpnt++ )
1109 varineq[colidx] =
TRUE;
1111 if( scale[colidx] == 0.0 )
1112 scale[colidx] = aij;
1113 assert(scale[colidx] != 0.0);
1115 colindices[
i] = colidx;
1116 values[
i] = aij / scale[colidx];
1117 pc = pclass[colidx];
1121 assert(classsizes[pc] > 0);
1123 if( classsizes[pc] == 0 )
1125 assert(pcsetfill < ncols);
1126 pcset[pcsetfill++] = pc;
1149 while( k <
i && pcs[k] == startpc )
1153 if( k - startk > 1 )
1154 SCIPsortRealInt(&(values[startk]), &(colindices[startk]), k - startk);
1160 startval = values[startk + t];
1164 while( t < k - startk &&
SCIPisEQ(
scip, startval, values[startk + t]) )
1168 newpclass = pcset[0];
1170 pcset[0] = pcset[--pcsetfill];
1173 for( m = startk + startt; m < startk + t; m++ )
1176 assert(colindices[m] < ncols);
1177 assert(newpclass < ncols);
1179 pclass[colindices[m]] = newpclass;
1180 classsizes[newpclass]++;
1183 if( t == k - startk )
1228 if( !dominatingimplied && !dominatedimplied )
1232 else if( dominatingimplied )
1247 if( varstofix[dominatingidx] ==
NOFIX )
1261 newub = dominatingub;
1270 SCIPdebugMsg(
scip,
"[ub]\tupper bound for dominating variable <%s> changed: [%.17f,%.17f] -> [%.17f,%.17f]\n",
1289 newlb = dominatinglb;
1298 SCIPdebugMsg(
scip,
"[lb]\tlower bound of dominating variable <%s> changed: [%.17f,%.17f] -> [%.17f,%.17f]\n",
1318 newlb = dominatingwcub;
1327 SCIPdebugMsg(
scip,
"[wcub]\tlower bound of dominating variable <%s> changed: [%.17f,%.17f] -> [%.17f,%.17f]\n",
1335 if( varstofix[dominatedidx] ==
NOFIX )
1348 newub = dominatedub;
1354 SCIPdebugMsg(
scip,
"[ub]\tupper bound of dominated variable <%s> changed: [%.17f,%.17f] -> [%.17f,%.17f]\n",
1374 newub = dominatedwclb;
1383 SCIPdebugMsg(
scip,
"[wclb]\tupper bound of dominated variable <%s> changed: [%.17f,%.17f] -> [%.17f,%.17f]\n",
1401 newlb = dominatedlb;
1407 SCIPdebugMsg(
scip,
"[lb]\tlower bound of dominated variable <%s> changed: [%.17f,%.17f] -> [%.17f,%.17f]\n",
1443 if( !dominatingimplied && !dominatedimplied )
1447 else if( dominatingimplied )
1476 varstofix[dominatedidx] =
FIXATLB;
1495 varstofix[dominatedidx] =
FIXATLB;
1513 varstofix[dominatedidx] =
FIXATLB;
1526 varstofix[dominatingidx] =
FIXATUB;
1538 varstofix[dominatingidx] =
FIXATUB;
1551 varstofix[dominatedidx] =
FIXATLB;
1562 varstofix[dominatingidx] =
FIXATUB;
1591 SCIP_Real tmpwclowerbounddominatingcol1;
1592 SCIP_Real tmpwclowerbounddominatingcol2;
1595 SCIP_Real tmpwcupperbounddominatingcol1;
1596 SCIP_Real tmpwcupperbounddominatingcol2;
1632 oldnfixings = *nfixings;
1635 for( cnt1 = 0; cnt1 < searchsize; cnt1++ )
1641 col1 = searchcols[cnt1];
1643 if( varstofix[col1] ==
FIXATLB )
1649 for( cnt2 = cnt1+1; cnt2 < searchsize; cnt2++ )
1652 col2 = searchcols[cnt2];
1665 col1domcol2 = col1domcol2 && (varstofix[col2] ==
NOFIX);
1666 col2domcol1 = col2domcol1 && (varstofix[col1] ==
NOFIX);
1674 col1domcol2 =
FALSE;
1675 col2domcol1 =
FALSE;
1680 if( paircnt == presoldata->numcurrentpairs )
1682 assert(*nfixings >= oldnfixings);
1683 if( *nfixings == oldnfixings )
1686 presoldata->numcurrentpairs >>= 1;
1687 if( presoldata->numcurrentpairs < presoldata->numminpairs )
1688 presoldata->numcurrentpairs = presoldata->numminpairs;
1693 oldnfixings = *nfixings;
1697 presoldata->numcurrentpairs <<= 1;
1698 if( presoldata->numcurrentpairs > presoldata->nummaxpairs )
1699 presoldata->numcurrentpairs = presoldata->nummaxpairs;
1703 if( !col1domcol2 && !col2domcol1 )
1717 if( nrows1 == 0 || nrows2 == 0 )
1722 tmpupperbounddominatingcol2 = tmpupperbounddominatingcol1;
1724 tmpwclowerbounddominatingcol2 = tmpwclowerbounddominatingcol1;
1726 tmplowerbounddominatingcol2 = tmplowerbounddominatingcol1;
1728 tmpwcupperbounddominatingcol2 = tmpwcupperbounddominatingcol1;
1732 tmpupperbounddominatedcol2 = tmpupperbounddominatedcol1;
1734 tmpwclowerbounddominatedcol2 = tmpwclowerbounddominatedcol1;
1736 tmplowerbounddominatedcol2 = tmplowerbounddominatedcol1;
1738 tmpwcupperbounddominatedcol2 = tmpwcupperbounddominatedcol1;
1741 while( (col1domcol2 || col2domcol1) && (r1 < nrows1 || r2 < nrows2) )
1743 assert((r1 >= nrows1-1) || (rows1[r1] < rows1[r1+1]));
1744 assert((r2 >= nrows2-1) || (rows2[r2] < rows2[r2+1]));
1747 if( r1 < nrows1 && (r2 == nrows2 || rows1[r1] < rows2[r2]) )
1753 col2domcol1 =
FALSE;
1754 col1domcol2 =
FALSE;
1759 if( vals1[r1] > 0.0 )
1760 col2domcol1 =
FALSE;
1762 col1domcol2 =
FALSE;
1768 else if( r2 < nrows2 && (r1 == nrows1 || rows1[r1] > rows2[r2]) )
1774 col2domcol1 =
FALSE;
1775 col1domcol2 =
FALSE;
1780 if( vals2[r2] < 0.0 )
1781 col2domcol1 =
FALSE;
1783 col1domcol2 =
FALSE;
1791 assert(r1 < nrows1 && r2 < nrows2);
1792 assert(rows1[r1] == rows2[r2]);
1797 if( onlybinvars && !onlyoneone )
1799 if( vals1[r1] < 0 && vals2[r2] < 0 )
1811 if ( vals1[r1] > 0 && vals2[r2] > 0 )
1826 tmpupperbounddominatingcol2 = tmpupperbounddominatingcol1;
1828 tmpwclowerbounddominatingcol2 = tmpwclowerbounddominatingcol1;
1830 tmplowerbounddominatingcol2 = tmplowerbounddominatingcol1;
1832 tmpwcupperbounddominatingcol2 = tmpwcupperbounddominatingcol1;
1835 tmpupperbounddominatedcol2 = tmpupperbounddominatedcol1;
1837 tmpwclowerbounddominatedcol2 = tmpwclowerbounddominatedcol1;
1839 tmplowerbounddominatedcol2 = tmplowerbounddominatedcol1;
1841 tmpwcupperbounddominatedcol2 = tmpwcupperbounddominatedcol1;
1851 col2domcol1 =
FALSE;
1852 col1domcol2 =
FALSE;
1858 if( vals1[r1] > vals2[r2] )
1859 col2domcol1 =
FALSE;
1860 else if( vals1[r1] < vals2[r2] )
1861 col1domcol2 =
FALSE;
1869 ((vals1[r1] < 0 && vals2[r2] < 0) || (vals1[r1] > 0 && vals2[r2] > 0)) )
1875 col1, vals1[r1], col2, vals2[r2],
TRUE,
1876 &tmpupperbounddominatingcol1, &tmpwclowerbounddominatingcol1,
1877 &tmplowerbounddominatingcol1, &tmpwcupperbounddominatingcol1) );
1881 col1, vals1[r1], col2, vals2[r2],
FALSE,
1882 &tmpupperbounddominatedcol1, &tmpwclowerbounddominatedcol1,
1883 &tmplowerbounddominatedcol1, &tmpwcupperbounddominatedcol1) );
1890 col2, vals2[r2], col1, vals1[r1],
TRUE,
1891 &tmpupperbounddominatingcol2, &tmpwclowerbounddominatingcol2,
1892 &tmplowerbounddominatingcol2, &tmpwcupperbounddominatingcol2) );
1896 col2, vals2[r2], col1, vals1[r1],
FALSE,
1897 &tmpupperbounddominatedcol2, &tmpwclowerbounddominatedcol2,
1898 &tmplowerbounddominatedcol2, &tmpwcupperbounddominatedcol2) );
1908 col1domcol2 = col1domcol2 && r2 == nrows2;
1909 col2domcol1 = col2domcol1 && r1 == nrows1;
1911 if( !col1domcol2 && !col2domcol1 )
1915 while( r1 < nrows1 )
1919 col2domcol1 =
FALSE;
1920 col1domcol2 =
FALSE;
1925 if( !col1domcol2 && !col2domcol1 )
1927 while( r2 < nrows2 )
1931 col2domcol1 =
FALSE;
1932 col1domcol2 =
FALSE;
1938 if( col1domcol2 || col2domcol1 )
1941 if( col1domcol2 && col2domcol1 )
1945 col2domcol1 =
FALSE;
1947 col1domcol2 =
FALSE;
1957 tmpupperbounddominatingcol1, tmpwclowerbounddominatingcol1,
1958 tmplowerbounddominatingcol1, tmpwcupperbounddominatingcol1,
1960 varstofix, onlybinvars, onlyoneone, nfixings) );
1962 if( presoldata->predbndstr )
1965 tmpupperbounddominatingcol1,
1966 tmplowerbounddominatingcol1, tmpwcupperbounddominatingcol1,
1968 tmpupperbounddominatedcol1, tmpwclowerbounddominatedcol1,
1969 tmplowerbounddominatedcol1,
1970 varstofix, nchgbds) );
1973 else if( col2domcol1 )
1976 tmpupperbounddominatingcol2, tmpwclowerbounddominatingcol2,
1977 tmplowerbounddominatingcol2, tmpwcupperbounddominatingcol2,
1979 varstofix, onlybinvars, onlyoneone, nfixings) );
1981 if( presoldata->predbndstr )
1984 tmpupperbounddominatingcol2,
1985 tmplowerbounddominatingcol2, tmpwcupperbounddominatingcol2,
1987 tmpupperbounddominatedcol2, tmpwclowerbounddominatedcol2,
1988 tmplowerbounddominatedcol2,
1989 varstofix, nchgbds) );
1992 if( varstofix[col1] ==
FIXATLB )
2063 int nconvarsfixed = 0;
2064 int nintvarsfixed = 0;
2065 int nbinvarsfixed = 0;
2090 naddconss, ndelconss, nchgcoefs, nchgbds, nfixedvars) );
2117 for( v = 0; v < ncols; ++v )
2126 for(
r = 0;
r < nrows; ++
r )
2128 rowidxsorted[
r] =
r;
2135 for( v = 0; v < ncols; v++ )
2142 presoldata->numcurrentpairs = presoldata->nummaxpairs;
2164 pclassstart = pclass[pc];
2165 while( pc < ncols && pclassstart == pclass[pc] )
2180 consearchcols[nconfill++] =
varidx;
2184 binsearchcols[nbinfill++] =
varidx;
2189 intsearchcols[nintfill++] =
varidx;
2196 if( nconfill > 1 && presoldata->continuousred )
2199 varstofix, &nfixings, &ndomrelations, nchgbds) );
2201 for( v = 0; v < nconfill; ++v )
2202 varsprocessed[consearchcols[v]] =
TRUE;
2204 varcount += nconfill;
2206 else if( nconfill == 1 )
2209 varsprocessed[consearchcols[0]] =
TRUE;
2216 varstofix, &nfixings, &ndomrelations, nchgbds) );
2218 for( v = 0; v < nintfill; ++v )
2219 varsprocessed[intsearchcols[v]] =
TRUE;
2221 varcount += nintfill;
2223 else if( nintfill == 1 )
2226 varsprocessed[intsearchcols[0]] =
TRUE;
2233 varstofix, &nfixings, &ndomrelations, nchgbds) );
2235 for( v = 0; v < nbinfill; ++v )
2236 varsprocessed[binsearchcols[v]] =
TRUE;
2238 varcount += nbinfill;
2240 else if( nbinfill == 1 )
2243 varsprocessed[binsearchcols[0]] =
TRUE;
2246 if( varcount >= ncols )
2255 for(
r = 0;
r < nrows; ++
r )
2267 rowidx = rowidxsorted[
r];
2278 for( ; rowpnt < rowend; rowpnt++ )
2280 if( !(varsprocessed[*rowpnt]) )
2291 consearchcols[nconfill++] =
varidx;
2295 binsearchcols[nbinfill++] =
varidx;
2300 intsearchcols[nintfill++] =
varidx;
2306 if( nconfill > 1 && presoldata->continuousred )
2309 varstofix, &nfixings, &ndomrelations, nchgbds) );
2311 for( v = 0; v < nconfill; ++v )
2312 varsprocessed[consearchcols[v]] =
TRUE;
2314 varcount += nconfill;
2321 varstofix, &nfixings, &ndomrelations, nchgbds) );
2323 for( v = 0; v < nintfill; ++v )
2324 varsprocessed[intsearchcols[v]] =
TRUE;
2326 varcount += nintfill;
2333 varstofix, &nfixings, &ndomrelations, nchgbds) );
2335 for( v = 0; v < nbinfill; ++v )
2336 varsprocessed[binsearchcols[v]] =
TRUE;
2338 varcount += nbinfill;
2341 if( varcount >= ncols )
2350 oldnfixedvars = *nfixedvars;
2352 for( v = ncols - 1; v >= 0; --v )
2392 else if( varstofix[v] ==
FIXATUB )
2438 if( (nconvarsfixed + nintvarsfixed + nbinvarsfixed) > 0 )
2441 ncols, ndomrelations, nconvarsfixed, nintvarsfixed, nbinvarsfixed, (*
result !=
SCIP_CUTOFF) ?
"no " :
"");
2472 "presolving/domcol/numminpairs",
2473 "minimal number of pair comparisons",
2477 "presolving/domcol/nummaxpairs",
2478 "maximal number of pair comparisons",
2482 "presolving/domcol/predbndstr",
2483 "should predictive bound strengthening be applied?",
2487 "presolving/domcol/continuousred",
2488 "should reductions for continuous variables be performed?",
#define SCIP_LONGINT_FORMAT
SCIP_Bool SCIPisStopped(SCIP *scip)
int SCIPgetNIntVars(SCIP *scip)
int SCIPgetNVars(SCIP *scip)
int SCIPgetNBinVars(SCIP *scip)
#define SCIPdebugMsgPrint
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)
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)
SCIP_RETCODE SCIPincludePresolDomcol(SCIP *scip)
#define SCIPallocBufferArray(scip, ptr, num)
#define SCIPfreeBufferArray(scip, ptr)
#define SCIPfreeBlockMemory(scip, ptr)
#define SCIPallocBlockMemory(scip, ptr)
SCIP_RETCODE SCIPsetPresolFree(SCIP *scip, SCIP_PRESOL *presol,)
void SCIPpresolSetData(SCIP_PRESOL *presol, SCIP_PRESOLDATA *presoldata)
SCIP_PRESOLDATA * SCIPpresolGetData(SCIP_PRESOL *presol)
SCIP_RETCODE SCIPsetPresolCopy(SCIP *scip, SCIP_PRESOL *presol,)
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)
const char * SCIPpresolGetName(SCIP_PRESOL *presol)
SCIP_Bool SCIPisFeasGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Real SCIPinfinity(SCIP *scip)
SCIP_Bool SCIPisGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisPositive(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Real SCIPfloor(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisFeasLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisFeasIntegral(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisNegative(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPceil(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisZero(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPvarIsBinary(SCIP_VAR *var)
SCIP_RETCODE SCIPchgVarLb(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound)
SCIP_VARSTATUS SCIPvarGetStatus(SCIP_VAR *var)
SCIP_Bool SCIPvarIsImpliedIntegral(SCIP_VAR *var)
SCIP_RETCODE SCIPchgVarUb(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound)
SCIP_Real SCIPvarGetObj(SCIP_VAR *var)
SCIP_VARTYPE SCIPvarGetType(SCIP_VAR *var)
SCIP_Real SCIPvarGetUbGlobal(SCIP_VAR *var)
const char * SCIPvarGetName(SCIP_VAR *var)
SCIP_Bool SCIPvarIsIntegral(SCIP_VAR *var)
SCIP_Real SCIPvarGetLbGlobal(SCIP_VAR *var)
SCIP_RETCODE SCIPfixVar(SCIP *scip, SCIP_VAR *var, SCIP_Real fixedval, SCIP_Bool *infeasible, SCIP_Bool *fixed)
SCIP_Bool SCIPvarsHaveCommonClique(SCIP_VAR *var1, SCIP_Bool value1, SCIP_VAR *var2, SCIP_Bool value2, SCIP_Bool regardimplics)
SCIP_Bool SCIPallowStrongDualReds(SCIP *scip)
void SCIPsortIntInt(int *intarray1, int *intarray2, int len)
void SCIPsortRealInt(SCIP_Real *realarray, int *intarray, int len)
void SCIPsortIntIntReal(int *intarray1, int *intarray2, SCIP_Real *realarray, int len)
assert(minobj< SCIPgetCutoffbound(scip))
SCIP_Bool SCIPmatrixUplockConflict(SCIP_MATRIX *matrix, int col)
int SCIPmatrixGetRowNMinActNegInf(SCIP_MATRIX *matrix, int row)
int * SCIPmatrixGetColIdxPtr(SCIP_MATRIX *matrix, int col)
int SCIPmatrixGetRowNNonzs(SCIP_MATRIX *matrix, int row)
int SCIPmatrixGetColNNonzs(SCIP_MATRIX *matrix, int col)
SCIP_Bool SCIPmatrixIsRowRhsInfinity(SCIP_MATRIX *matrix, int row)
SCIP_Real SCIPmatrixGetRowMaxActivity(SCIP_MATRIX *matrix, int row)
SCIP_Real SCIPmatrixGetRowLhs(SCIP_MATRIX *matrix, int row)
SCIP_Real * SCIPmatrixGetRowValPtr(SCIP_MATRIX *matrix, int row)
SCIP_Bool SCIPmatrixDownlockConflict(SCIP_MATRIX *matrix, int col)
SCIP_Real SCIPmatrixGetRowRhs(SCIP_MATRIX *matrix, int row)
SCIP_Real * SCIPmatrixGetColValPtr(SCIP_MATRIX *matrix, int col)
int SCIPmatrixGetRowNMinActPosInf(SCIP_MATRIX *matrix, int row)
SCIP_RETCODE SCIPmatrixCreate(SCIP *scip, SCIP_MATRIX **matrixptr, SCIP_Bool onlyifcomplete, SCIP_Bool *initialized, SCIP_Bool *complete, SCIP_Bool *infeasible, int *naddconss, int *ndelconss, int *nchgcoefs, int *nchgbds, int *nfixedvars)
int SCIPmatrixGetNColumns(SCIP_MATRIX *matrix)
SCIP_Real SCIPmatrixGetRowMinActivity(SCIP_MATRIX *matrix, int row)
void SCIPmatrixFree(SCIP *scip, SCIP_MATRIX **matrix)
int SCIPmatrixGetRowNMaxActPosInf(SCIP_MATRIX *matrix, int row)
int SCIPmatrixGetRowNMaxActNegInf(SCIP_MATRIX *matrix, int row)
SCIP_VAR * SCIPmatrixGetVar(SCIP_MATRIX *matrix, int col)
int * SCIPmatrixGetRowIdxPtr(SCIP_MATRIX *matrix, int row)
int SCIPmatrixGetNRows(SCIP_MATRIX *matrix)
memory allocation routines
#define BMSclearMemoryArray(ptr, num)
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)
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)
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)
enum Fixingdirection FIXINGDIRECTION
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)
#define DEFAULT_CONTINUOUS_RED
#define DEFAULT_NUMMINPAIRS
#define DEFAULT_NUMMAXPAIRS
static SCIP_RETCODE detectParallelCols(SCIP *scip, SCIP_MATRIX *matrix, int *pclass, SCIP_Bool *varineq)
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)
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)
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)
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)
#define DEFAULT_PREDBNDSTR
dominated column presolver
public methods for matrix
public methods for message output
methods for sorting joint arrays of various types
public methods for presolvers
public methods for problem variables
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)
public methods for memory management
public methods for message handling
public methods for nonlinear relaxation
public methods for numerical tolerances
public methods for SCIP parameter handling
public methods for presolving plugins
public methods for variable pricer plugins
public methods for global and local (sub)problems
public methods for the probing mode
public methods for SCIP variables
struct SCIP_Matrix SCIP_MATRIX
#define SCIP_DECL_PRESOLCOPY(x)
struct SCIP_PresolData SCIP_PRESOLDATA
#define SCIP_DECL_PRESOLFREE(x)
struct SCIP_Presol SCIP_PRESOL
#define SCIP_DECL_PRESOLEXEC(x)
enum SCIP_Retcode SCIP_RETCODE
#define SCIP_PRESOLTIMING_EXHAUSTIVE
@ SCIP_VARTYPE_CONTINUOUS
@ SCIP_VARSTATUS_MULTAGGR