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++ )
237 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",
316 if( upperboundcoef > 0.0 )
322 tmpminact += (upperboundcoef * ubupperboundvar);
326 tmpminact = tmpminact - (upperboundcoef * lbupperboundvar) + (upperboundcoef * ubupperboundvar);
336 tmpmaxact += (upperboundcoef * ubupperboundvar);
340 tmpmaxact = tmpmaxact - (upperboundcoef * lbupperboundvar) + (upperboundcoef * ubupperboundvar);
355 *maxresactivity = tmpmaxact;
365 *maxresactivity = tmpmaxact - coef * ub;
373 *minresactivity = tmpminact;
383 *minresactivity = tmpminact - coef * lb;
394 *maxresactivity = tmpmaxact;
404 *maxresactivity = tmpmaxact - coef * lb;
412 *minresactivity = tmpminact;
422 *minresactivity = tmpminact - coef * ub;
493 if( lowerboundcoef > 0.0 )
499 tmpmaxact += (lowerboundcoef * lblowerboundvar);
503 tmpmaxact = tmpmaxact - (lowerboundcoef * ublowerboundvar) + (lowerboundcoef * lblowerboundvar);
513 tmpminact += (lowerboundcoef * lblowerboundvar);
517 tmpminact = tmpminact - (lowerboundcoef * ublowerboundvar) + (lowerboundcoef * lblowerboundvar);
532 *maxresactivity = tmpmaxact;
542 *maxresactivity = tmpmaxact - coef * ub;
550 *minresactivity = tmpminact;
560 *minresactivity = tmpminact - coef * lb;
571 *maxresactivity = tmpmaxact;
581 *maxresactivity = tmpmaxact - coef * lb;
589 *minresactivity = tmpminact;
599 *minresactivity = tmpminact - coef * ub;
650 *ubcalculated =
FALSE;
651 *wclbcalculated =
FALSE;
652 *lbcalculated =
FALSE;
653 *wcubcalculated =
FALSE;
668 &minresactivity, &maxresactivity, &success);
683 if( valdominated > 0.0 )
688 *calculatedlb = (lhs - maxresactivity)/valdominated;
689 *lbcalculated =
TRUE;
695 *calculatedwclb = (lhs - minresactivity)/valdominated;
696 *wclbcalculated =
TRUE;
702 *wclbcalculated =
TRUE;
711 *calculatedub = (rhs - minresactivity)/valdominated;
712 *ubcalculated =
TRUE;
718 *calculatedwcub = (rhs - maxresactivity)/valdominated;
719 *wcubcalculated =
TRUE;
725 *wcubcalculated =
TRUE;
734 *calculatedub = (lhs - maxresactivity)/valdominated;
735 *ubcalculated =
TRUE;
741 *calculatedwcub = (lhs - minresactivity)/valdominated;
742 *wcubcalculated =
TRUE;
748 *wcubcalculated =
TRUE;
757 *calculatedlb = (rhs - minresactivity)/valdominated;
758 *lbcalculated =
TRUE;
764 *calculatedwclb = (rhs - maxresactivity)/valdominated;
765 *wclbcalculated =
TRUE;
771 *wclbcalculated =
TRUE;
825 *ubcalculated =
FALSE;
826 *wclbcalculated =
FALSE;
827 *lbcalculated =
FALSE;
828 *wcubcalculated =
FALSE;
843 &minresactivity, &maxresactivity, &success);
858 if( valdominating > 0.0 )
863 *calculatedlb = (lhs - maxresactivity)/valdominating;
864 *lbcalculated =
TRUE;
870 *calculatedwclb = (lhs - minresactivity)/valdominating;
871 *wclbcalculated =
TRUE;
877 *wclbcalculated =
TRUE;
886 *calculatedub = (rhs - minresactivity)/valdominating;
887 *ubcalculated =
TRUE;
893 *calculatedwcub = (rhs - maxresactivity)/valdominating;
894 *wcubcalculated =
TRUE;
900 *wcubcalculated =
TRUE;
909 *calculatedub = (lhs - maxresactivity)/valdominating;
910 *ubcalculated =
TRUE;
916 *calculatedwcub = (lhs - minresactivity)/valdominating;
917 *wcubcalculated =
TRUE;
923 *wcubcalculated =
TRUE;
932 *calculatedlb = (rhs - minresactivity)/valdominating;
933 *lbcalculated =
TRUE;
939 *calculatedwclb = (rhs - maxresactivity)/valdominating;
940 *wclbcalculated =
TRUE;
946 *wclbcalculated =
TRUE;
992 if( predictdominating )
996 &ubcalculated, &newub, &wclbcalculated, &newwclb,
997 &lbcalculated, &newlb, &wcubcalculated, &newwcub) );
1003 &ubcalculated, &newub, &wclbcalculated, &newwclb,
1004 &lbcalculated, &newlb, &wcubcalculated, &newwcub) );
1010 if( newub < *upperbound )
1011 *upperbound = newub;
1013 if( wclbcalculated )
1015 if( newwclb > *wclowerbound )
1016 *wclowerbound = newwclb;
1020 if( newlb > *lowerbound )
1021 *lowerbound = newlb;
1023 if( wcubcalculated )
1025 if( newwcub < *wcupperbound )
1026 *wcupperbound = newwcub;
1088 classsizes[0] = ncols;
1090 for( t = 1; t < ncols; ++t )
1091 pcset[pcsetfill++] = t;
1094 for(
r = 0;
r < nrows; ++
r )
1104 for( ; (rowpnt < rowend); rowpnt++, valpnt++ )
1110 varineq[colidx] =
TRUE;
1112 if( scale[colidx] == 0.0 )
1113 scale[colidx] = aij;
1114 assert(scale[colidx] != 0.0);
1116 colindices[
i] = colidx;
1117 values[
i] = aij / scale[colidx];
1118 pc = pclass[colidx];
1122 assert(classsizes[pc] > 0);
1124 if( classsizes[pc] == 0 )
1126 assert(pcsetfill < ncols);
1127 pcset[pcsetfill++] = pc;
1150 while( k <
i && pcs[k] == startpc )
1154 if( k - startk > 1 )
1155 SCIPsortRealInt(&(values[startk]), &(colindices[startk]), k - startk);
1161 startval = values[startk + t];
1165 while( t < k - startk &&
SCIPisEQ(
scip, startval, values[startk + t]) )
1169 newpclass = pcset[0];
1171 pcset[0] = pcset[--pcsetfill];
1174 for( m = startk + startt; m < startk + t; m++ )
1177 assert(colindices[m] < ncols);
1178 assert(newpclass < ncols);
1180 pclass[colindices[m]] = newpclass;
1181 classsizes[newpclass]++;
1184 if( t == k - startk )
1232 if( varstofix[dominatingidx] ==
NOFIX )
1246 newub = dominatingub;
1255 SCIPdebugMsg(
scip,
"[ub]\tupper bound for dominating variable <%s> changed: [%.17f,%.17f] -> [%.17f,%.17f]\n",
1274 newlb = dominatinglb;
1283 SCIPdebugMsg(
scip,
"[lb]\tlower bound of dominating variable <%s> changed: [%.17f,%.17f] -> [%.17f,%.17f]\n",
1303 newlb = dominatingwcub;
1312 SCIPdebugMsg(
scip,
"[wcub]\tlower bound of dominating variable <%s> changed: [%.17f,%.17f] -> [%.17f,%.17f]\n",
1320 if( varstofix[dominatedidx] ==
NOFIX )
1333 newub = dominatedub;
1339 SCIPdebugMsg(
scip,
"[ub]\tupper bound of dominated variable <%s> changed: [%.17f,%.17f] -> [%.17f,%.17f]\n",
1359 newub = dominatedwclb;
1368 SCIPdebugMsg(
scip,
"[wclb]\tupper bound of dominated variable <%s> changed: [%.17f,%.17f] -> [%.17f,%.17f]\n",
1386 newlb = dominatedlb;
1392 SCIPdebugMsg(
scip,
"[lb]\tlower bound of dominated variable <%s> changed: [%.17f,%.17f] -> [%.17f,%.17f]\n",
1445 varstofix[dominatedidx] =
FIXATLB;
1464 varstofix[dominatedidx] =
FIXATLB;
1482 varstofix[dominatedidx] =
FIXATLB;
1495 varstofix[dominatingidx] =
FIXATUB;
1507 varstofix[dominatingidx] =
FIXATUB;
1520 varstofix[dominatedidx] =
FIXATLB;
1531 varstofix[dominatingidx] =
FIXATUB;
1560 SCIP_Real tmpwclowerbounddominatingcol1;
1561 SCIP_Real tmpwclowerbounddominatingcol2;
1564 SCIP_Real tmpwcupperbounddominatingcol1;
1565 SCIP_Real tmpwcupperbounddominatingcol2;
1601 oldnfixings = *nfixings;
1604 for( cnt1 = 0; cnt1 < searchsize; cnt1++ )
1610 col1 = searchcols[cnt1];
1612 if( varstofix[col1] ==
FIXATLB )
1618 for( cnt2 = cnt1+1; cnt2 < searchsize; cnt2++ )
1621 col2 = searchcols[cnt2];
1634 col1domcol2 = col1domcol2 && (varstofix[col2] ==
NOFIX);
1635 col2domcol1 = col2domcol1 && (varstofix[col1] ==
NOFIX);
1643 col1domcol2 =
FALSE;
1644 col2domcol1 =
FALSE;
1649 if( paircnt == presoldata->numcurrentpairs )
1651 assert(*nfixings >= oldnfixings);
1652 if( *nfixings == oldnfixings )
1655 presoldata->numcurrentpairs >>= 1;
1656 if( presoldata->numcurrentpairs < presoldata->numminpairs )
1657 presoldata->numcurrentpairs = presoldata->numminpairs;
1662 oldnfixings = *nfixings;
1666 presoldata->numcurrentpairs <<= 1;
1667 if( presoldata->numcurrentpairs > presoldata->nummaxpairs )
1668 presoldata->numcurrentpairs = presoldata->nummaxpairs;
1672 if( !col1domcol2 && !col2domcol1 )
1686 if( nrows1 == 0 || nrows2 == 0 )
1691 tmpupperbounddominatingcol2 = tmpupperbounddominatingcol1;
1693 tmpwclowerbounddominatingcol2 = tmpwclowerbounddominatingcol1;
1695 tmplowerbounddominatingcol2 = tmplowerbounddominatingcol1;
1697 tmpwcupperbounddominatingcol2 = tmpwcupperbounddominatingcol1;
1701 tmpupperbounddominatedcol2 = tmpupperbounddominatedcol1;
1703 tmpwclowerbounddominatedcol2 = tmpwclowerbounddominatedcol1;
1705 tmplowerbounddominatedcol2 = tmplowerbounddominatedcol1;
1707 tmpwcupperbounddominatedcol2 = tmpwcupperbounddominatedcol1;
1710 while( (col1domcol2 || col2domcol1) && (r1 < nrows1 || r2 < nrows2) )
1712 assert((r1 >= nrows1-1) || (rows1[r1] < rows1[r1+1]));
1713 assert((r2 >= nrows2-1) || (rows2[r2] < rows2[r2+1]));
1716 if( r1 < nrows1 && (r2 == nrows2 || rows1[r1] < rows2[r2]) )
1722 col2domcol1 =
FALSE;
1723 col1domcol2 =
FALSE;
1728 if( vals1[r1] > 0.0 )
1729 col2domcol1 =
FALSE;
1731 col1domcol2 =
FALSE;
1737 else if( r2 < nrows2 && (r1 == nrows1 || rows1[r1] > rows2[r2]) )
1743 col2domcol1 =
FALSE;
1744 col1domcol2 =
FALSE;
1749 if( vals2[r2] < 0.0 )
1750 col2domcol1 =
FALSE;
1752 col1domcol2 =
FALSE;
1760 assert(r1 < nrows1 && r2 < nrows2);
1761 assert(rows1[r1] == rows2[r2]);
1766 if( onlybinvars && !onlyoneone )
1768 if( vals1[r1] < 0 && vals2[r2] < 0 )
1780 if ( vals1[r1] > 0 && vals2[r2] > 0 )
1795 tmpupperbounddominatingcol2 = tmpupperbounddominatingcol1;
1797 tmpwclowerbounddominatingcol2 = tmpwclowerbounddominatingcol1;
1799 tmplowerbounddominatingcol2 = tmplowerbounddominatingcol1;
1801 tmpwcupperbounddominatingcol2 = tmpwcupperbounddominatingcol1;
1804 tmpupperbounddominatedcol2 = tmpupperbounddominatedcol1;
1806 tmpwclowerbounddominatedcol2 = tmpwclowerbounddominatedcol1;
1808 tmplowerbounddominatedcol2 = tmplowerbounddominatedcol1;
1810 tmpwcupperbounddominatedcol2 = tmpwcupperbounddominatedcol1;
1820 col2domcol1 =
FALSE;
1821 col1domcol2 =
FALSE;
1827 if( vals1[r1] > vals2[r2] )
1828 col2domcol1 =
FALSE;
1829 else if( vals1[r1] < vals2[r2] )
1830 col1domcol2 =
FALSE;
1838 ((vals1[r1] < 0 && vals2[r2] < 0) || (vals1[r1] > 0 && vals2[r2] > 0)) )
1844 col1, vals1[r1], col2, vals2[r2],
TRUE,
1845 &tmpupperbounddominatingcol1, &tmpwclowerbounddominatingcol1,
1846 &tmplowerbounddominatingcol1, &tmpwcupperbounddominatingcol1) );
1850 col1, vals1[r1], col2, vals2[r2],
FALSE,
1851 &tmpupperbounddominatedcol1, &tmpwclowerbounddominatedcol1,
1852 &tmplowerbounddominatedcol1, &tmpwcupperbounddominatedcol1) );
1859 col2, vals2[r2], col1, vals1[r1],
TRUE,
1860 &tmpupperbounddominatingcol2, &tmpwclowerbounddominatingcol2,
1861 &tmplowerbounddominatingcol2, &tmpwcupperbounddominatingcol2) );
1865 col2, vals2[r2], col1, vals1[r1],
FALSE,
1866 &tmpupperbounddominatedcol2, &tmpwclowerbounddominatedcol2,
1867 &tmplowerbounddominatedcol2, &tmpwcupperbounddominatedcol2) );
1877 col1domcol2 = col1domcol2 && r2 == nrows2;
1878 col2domcol1 = col2domcol1 && r1 == nrows1;
1880 if( !col1domcol2 && !col2domcol1 )
1884 while( r1 < nrows1 )
1888 col2domcol1 =
FALSE;
1889 col1domcol2 =
FALSE;
1894 if( !col1domcol2 && !col2domcol1 )
1896 while( r2 < nrows2 )
1900 col2domcol1 =
FALSE;
1901 col1domcol2 =
FALSE;
1907 if( col1domcol2 || col2domcol1 )
1910 if( col1domcol2 && col2domcol1 )
1914 col2domcol1 =
FALSE;
1916 col1domcol2 =
FALSE;
1926 tmpupperbounddominatingcol1, tmpwclowerbounddominatingcol1,
1927 tmplowerbounddominatingcol1, tmpwcupperbounddominatingcol1,
1929 varstofix, onlybinvars, onlyoneone, nfixings) );
1931 if( presoldata->predbndstr )
1934 tmpupperbounddominatingcol1,
1935 tmplowerbounddominatingcol1, tmpwcupperbounddominatingcol1,
1937 tmpupperbounddominatedcol1, tmpwclowerbounddominatedcol1,
1938 tmplowerbounddominatedcol1,
1939 varstofix, nchgbds) );
1942 else if( col2domcol1 )
1945 tmpupperbounddominatingcol2, tmpwclowerbounddominatingcol2,
1946 tmplowerbounddominatingcol2, tmpwcupperbounddominatingcol2,
1948 varstofix, onlybinvars, onlyoneone, nfixings) );
1950 if( presoldata->predbndstr )
1953 tmpupperbounddominatingcol2,
1954 tmplowerbounddominatingcol2, tmpwcupperbounddominatingcol2,
1956 tmpupperbounddominatedcol2, tmpwclowerbounddominatedcol2,
1957 tmplowerbounddominatedcol2,
1958 varstofix, nchgbds) );
1961 if( varstofix[col1] ==
FIXATLB )
2032 int nconvarsfixed = 0;
2033 int nintvarsfixed = 0;
2034 int nbinvarsfixed = 0;
2059 naddconss, ndelconss, nchgcoefs, nchgbds, nfixedvars) );
2086 for( v = 0; v < ncols; ++v )
2095 for(
r = 0;
r < nrows; ++
r )
2097 rowidxsorted[
r] =
r;
2104 for( v = 0; v < ncols; v++ )
2111 presoldata->numcurrentpairs = presoldata->nummaxpairs;
2133 pclassstart = pclass[pc];
2134 while( pc < ncols && pclassstart == pclass[pc] )
2149 consearchcols[nconfill++] =
varidx;
2153 binsearchcols[nbinfill++] =
varidx;
2158 intsearchcols[nintfill++] =
varidx;
2165 if( nconfill > 1 && presoldata->continuousred )
2168 varstofix, &nfixings, &ndomrelations, nchgbds) );
2170 for( v = 0; v < nconfill; ++v )
2171 varsprocessed[consearchcols[v]] =
TRUE;
2173 varcount += nconfill;
2175 else if( nconfill == 1 )
2178 varsprocessed[consearchcols[0]] =
TRUE;
2185 varstofix, &nfixings, &ndomrelations, nchgbds) );
2187 for( v = 0; v < nintfill; ++v )
2188 varsprocessed[intsearchcols[v]] =
TRUE;
2190 varcount += nintfill;
2192 else if( nintfill == 1 )
2195 varsprocessed[intsearchcols[0]] =
TRUE;
2202 varstofix, &nfixings, &ndomrelations, nchgbds) );
2204 for( v = 0; v < nbinfill; ++v )
2205 varsprocessed[binsearchcols[v]] =
TRUE;
2207 varcount += nbinfill;
2209 else if( nbinfill == 1 )
2212 varsprocessed[binsearchcols[0]] =
TRUE;
2215 if( varcount >= ncols )
2224 for(
r = 0;
r < nrows; ++
r )
2236 rowidx = rowidxsorted[
r];
2247 for( ; rowpnt < rowend; rowpnt++ )
2249 if( !(varsprocessed[*rowpnt]) )
2260 consearchcols[nconfill++] =
varidx;
2264 binsearchcols[nbinfill++] =
varidx;
2269 intsearchcols[nintfill++] =
varidx;
2275 if( nconfill > 1 && presoldata->continuousred )
2278 varstofix, &nfixings, &ndomrelations, nchgbds) );
2280 for( v = 0; v < nconfill; ++v )
2281 varsprocessed[consearchcols[v]] =
TRUE;
2283 varcount += nconfill;
2290 varstofix, &nfixings, &ndomrelations, nchgbds) );
2292 for( v = 0; v < nintfill; ++v )
2293 varsprocessed[intsearchcols[v]] =
TRUE;
2295 varcount += nintfill;
2302 varstofix, &nfixings, &ndomrelations, nchgbds) );
2304 for( v = 0; v < nbinfill; ++v )
2305 varsprocessed[binsearchcols[v]] =
TRUE;
2307 varcount += nbinfill;
2310 if( varcount >= ncols )
2319 oldnfixedvars = *nfixedvars;
2321 for( v = ncols - 1; v >= 0; --v )
2361 else if( varstofix[v] ==
FIXATUB )
2407 if( (nconvarsfixed + nintvarsfixed + nbinvarsfixed) > 0 )
2410 ncols, ndomrelations, nconvarsfixed, nintvarsfixed, nbinvarsfixed, (*
result !=
SCIP_CUTOFF) ?
"no " :
"");
2441 "presolving/domcol/numminpairs",
2442 "minimal number of pair comparisons",
2446 "presolving/domcol/nummaxpairs",
2447 "maximal number of pair comparisons",
2451 "presolving/domcol/predbndstr",
2452 "should predictive bound strengthening be applied?",
2456 "presolving/domcol/continuousred",
2457 "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_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_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