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
152 for(; (rowpnt < rowend); rowpnt++, valpnt++)
185 for(
i = 0; (colpnt < colend); colpnt++,
i++ )
192 for(
i = 0;
i < numrows;
i++ )
238 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",
317 if( upperboundcoef > 0.0 )
323 tmpminact += (upperboundcoef * ubupperboundvar);
327 tmpminact = tmpminact - (upperboundcoef * lbupperboundvar) + (upperboundcoef * ubupperboundvar);
337 tmpmaxact += (upperboundcoef * ubupperboundvar);
341 tmpmaxact = tmpmaxact - (upperboundcoef * lbupperboundvar) + (upperboundcoef * ubupperboundvar);
356 *maxresactivity = tmpmaxact;
366 *maxresactivity = tmpmaxact - coef * ub;
374 *minresactivity = tmpminact;
384 *minresactivity = tmpminact - coef * lb;
395 *maxresactivity = tmpmaxact;
405 *maxresactivity = tmpmaxact - coef * lb;
413 *minresactivity = tmpminact;
423 *minresactivity = tmpminact - coef * ub;
494 if( lowerboundcoef > 0.0 )
500 tmpmaxact += (lowerboundcoef * lblowerboundvar);
504 tmpmaxact = tmpmaxact - (lowerboundcoef * ublowerboundvar) + (lowerboundcoef * lblowerboundvar);
514 tmpminact += (lowerboundcoef * lblowerboundvar);
518 tmpminact = tmpminact - (lowerboundcoef * ublowerboundvar) + (lowerboundcoef * lblowerboundvar);
533 *maxresactivity = tmpmaxact;
543 *maxresactivity = tmpmaxact - coef * ub;
551 *minresactivity = tmpminact;
561 *minresactivity = tmpminact - coef * lb;
572 *maxresactivity = tmpmaxact;
582 *maxresactivity = tmpmaxact - coef * lb;
590 *minresactivity = tmpminact;
600 *minresactivity = tmpminact - coef * ub;
651 *ubcalculated =
FALSE;
652 *wclbcalculated =
FALSE;
653 *lbcalculated =
FALSE;
654 *wcubcalculated =
FALSE;
669 &minresactivity, &maxresactivity, &success);
684 if( valdominated > 0.0 )
689 *calculatedlb = (lhs - maxresactivity)/valdominated;
690 *lbcalculated =
TRUE;
696 *calculatedwclb = (lhs - minresactivity)/valdominated;
697 *wclbcalculated =
TRUE;
703 *wclbcalculated =
TRUE;
712 *calculatedub = (rhs - minresactivity)/valdominated;
713 *ubcalculated =
TRUE;
719 *calculatedwcub = (rhs - maxresactivity)/valdominated;
720 *wcubcalculated =
TRUE;
726 *wcubcalculated =
TRUE;
735 *calculatedub = (lhs - maxresactivity)/valdominated;
736 *ubcalculated =
TRUE;
742 *calculatedwcub = (lhs - minresactivity)/valdominated;
743 *wcubcalculated =
TRUE;
749 *wcubcalculated =
TRUE;
758 *calculatedlb = (rhs - minresactivity)/valdominated;
759 *lbcalculated =
TRUE;
765 *calculatedwclb = (rhs - maxresactivity)/valdominated;
766 *wclbcalculated =
TRUE;
772 *wclbcalculated =
TRUE;
826 *ubcalculated =
FALSE;
827 *wclbcalculated =
FALSE;
828 *lbcalculated =
FALSE;
829 *wcubcalculated =
FALSE;
844 &minresactivity, &maxresactivity, &success);
859 if( valdominating > 0.0 )
864 *calculatedlb = (lhs - maxresactivity)/valdominating;
865 *lbcalculated =
TRUE;
871 *calculatedwclb = (lhs - minresactivity)/valdominating;
872 *wclbcalculated =
TRUE;
878 *wclbcalculated =
TRUE;
887 *calculatedub = (rhs - minresactivity)/valdominating;
888 *ubcalculated =
TRUE;
894 *calculatedwcub = (rhs - maxresactivity)/valdominating;
895 *wcubcalculated =
TRUE;
901 *wcubcalculated =
TRUE;
910 *calculatedub = (lhs - maxresactivity)/valdominating;
911 *ubcalculated =
TRUE;
917 *calculatedwcub = (lhs - minresactivity)/valdominating;
918 *wcubcalculated =
TRUE;
924 *wcubcalculated =
TRUE;
933 *calculatedlb = (rhs - minresactivity)/valdominating;
934 *lbcalculated =
TRUE;
940 *calculatedwclb = (rhs - maxresactivity)/valdominating;
941 *wclbcalculated =
TRUE;
947 *wclbcalculated =
TRUE;
993 if( predictdominating )
997 &ubcalculated, &newub, &wclbcalculated, &newwclb,
998 &lbcalculated, &newlb, &wcubcalculated, &newwcub) );
1004 &ubcalculated, &newub, &wclbcalculated, &newwclb,
1005 &lbcalculated, &newlb, &wcubcalculated, &newwcub) );
1011 if( newub < *upperbound )
1012 *upperbound = newub;
1014 if( wclbcalculated )
1016 if( newwclb > *wclowerbound )
1017 *wclowerbound = newwclb;
1021 if( newlb > *lowerbound )
1022 *lowerbound = newlb;
1024 if( wcubcalculated )
1026 if( newwcub < *wcupperbound )
1027 *wcupperbound = newwcub;
1089 classsizes[0] = ncols;
1091 for( t = 1; t < ncols; ++t )
1092 pcset[pcsetfill++] = t;
1095 for(
r = 0;
r < nrows; ++
r )
1105 for( ; (rowpnt < rowend); rowpnt++, valpnt++ )
1111 varineq[colidx] =
TRUE;
1113 if( scale[colidx] == 0.0 )
1114 scale[colidx] = aij;
1115 assert(scale[colidx] != 0.0);
1117 colindices[
i] = colidx;
1118 values[
i] = aij / scale[colidx];
1119 pc = pclass[colidx];
1123 assert(classsizes[pc] > 0);
1125 if( classsizes[pc] == 0 )
1127 assert(pcsetfill < ncols);
1128 pcset[pcsetfill++] = pc;
1151 while( k <
i && pcs[k] == startpc )
1155 if( k - startk > 1 )
1156 SCIPsortRealInt(&(values[startk]), &(colindices[startk]), k - startk);
1162 startval = values[startk + t];
1166 while( t < k - startk &&
SCIPisEQ(
scip, startval, values[startk + t]) )
1170 newpclass = pcset[0];
1172 pcset[0] = pcset[--pcsetfill];
1175 for( m = startk + startt; m < startk + t; m++ )
1178 assert(colindices[m] < ncols);
1179 assert(newpclass < ncols);
1181 pclass[colindices[m]] = newpclass;
1182 classsizes[newpclass]++;
1185 if( t == k - startk )
1233 if( varstofix[dominatingidx] ==
NOFIX )
1247 newub = dominatingub;
1256 SCIPdebugMsg(
scip,
"[ub]\tupper bound for dominating variable <%s> changed: [%.17f,%.17f] -> [%.17f,%.17f]\n",
1275 newlb = dominatinglb;
1284 SCIPdebugMsg(
scip,
"[lb]\tlower bound of dominating variable <%s> changed: [%.17f,%.17f] -> [%.17f,%.17f]\n",
1304 newlb = dominatingwcub;
1313 SCIPdebugMsg(
scip,
"[wcub]\tlower bound of dominating variable <%s> changed: [%.17f,%.17f] -> [%.17f,%.17f]\n",
1321 if( varstofix[dominatedidx] ==
NOFIX )
1334 newub = dominatedub;
1340 SCIPdebugMsg(
scip,
"[ub]\tupper bound of dominated variable <%s> changed: [%.17f,%.17f] -> [%.17f,%.17f]\n",
1360 newub = dominatedwclb;
1369 SCIPdebugMsg(
scip,
"[wclb]\tupper bound of dominated variable <%s> changed: [%.17f,%.17f] -> [%.17f,%.17f]\n",
1387 newlb = dominatedlb;
1393 SCIPdebugMsg(
scip,
"[lb]\tlower bound of dominated variable <%s> changed: [%.17f,%.17f] -> [%.17f,%.17f]\n",
1446 varstofix[dominatedidx] =
FIXATLB;
1465 varstofix[dominatedidx] =
FIXATLB;
1483 varstofix[dominatedidx] =
FIXATLB;
1496 varstofix[dominatingidx] =
FIXATUB;
1508 varstofix[dominatingidx] =
FIXATUB;
1521 varstofix[dominatedidx] =
FIXATLB;
1532 varstofix[dominatingidx] =
FIXATUB;
1561 SCIP_Real tmpwclowerbounddominatingcol1;
1562 SCIP_Real tmpwclowerbounddominatingcol2;
1565 SCIP_Real tmpwcupperbounddominatingcol1;
1566 SCIP_Real tmpwcupperbounddominatingcol2;
1602 oldnfixings = *nfixings;
1605 for( cnt1 = 0; cnt1 < searchsize; cnt1++ )
1611 col1 = searchcols[cnt1];
1613 if( varstofix[col1] ==
FIXATLB )
1619 for( cnt2 = cnt1+1; cnt2 < searchsize; cnt2++ )
1622 col2 = searchcols[cnt2];
1635 col1domcol2 = col1domcol2 && (varstofix[col2] ==
NOFIX);
1636 col2domcol1 = col2domcol1 && (varstofix[col1] ==
NOFIX);
1644 col1domcol2 =
FALSE;
1645 col2domcol1 =
FALSE;
1650 if( paircnt == presoldata->numcurrentpairs )
1652 assert(*nfixings >= oldnfixings);
1653 if( *nfixings == oldnfixings )
1656 presoldata->numcurrentpairs >>= 1;
1657 if( presoldata->numcurrentpairs < presoldata->numminpairs )
1658 presoldata->numcurrentpairs = presoldata->numminpairs;
1663 oldnfixings = *nfixings;
1667 presoldata->numcurrentpairs <<= 1;
1668 if( presoldata->numcurrentpairs > presoldata->nummaxpairs )
1669 presoldata->numcurrentpairs = presoldata->nummaxpairs;
1673 if( !col1domcol2 && !col2domcol1 )
1687 if( nrows1 == 0 || nrows2 == 0 )
1692 tmpupperbounddominatingcol2 = tmpupperbounddominatingcol1;
1694 tmpwclowerbounddominatingcol2 = tmpwclowerbounddominatingcol1;
1696 tmplowerbounddominatingcol2 = tmplowerbounddominatingcol1;
1698 tmpwcupperbounddominatingcol2 = tmpwcupperbounddominatingcol1;
1702 tmpupperbounddominatedcol2 = tmpupperbounddominatedcol1;
1704 tmpwclowerbounddominatedcol2 = tmpwclowerbounddominatedcol1;
1706 tmplowerbounddominatedcol2 = tmplowerbounddominatedcol1;
1708 tmpwcupperbounddominatedcol2 = tmpwcupperbounddominatedcol1;
1711 while( (col1domcol2 || col2domcol1) && (r1 < nrows1 || r2 < nrows2) )
1713 assert((r1 >= nrows1-1) || (rows1[r1] < rows1[r1+1]));
1714 assert((r2 >= nrows2-1) || (rows2[r2] < rows2[r2+1]));
1717 if( r1 < nrows1 && (r2 == nrows2 || rows1[r1] < rows2[r2]) )
1723 col2domcol1 =
FALSE;
1724 col1domcol2 =
FALSE;
1729 if( vals1[r1] > 0.0 )
1730 col2domcol1 =
FALSE;
1732 col1domcol2 =
FALSE;
1738 else if( r2 < nrows2 && (r1 == nrows1 || rows1[r1] > rows2[r2]) )
1744 col2domcol1 =
FALSE;
1745 col1domcol2 =
FALSE;
1750 if( vals2[r2] < 0.0 )
1751 col2domcol1 =
FALSE;
1753 col1domcol2 =
FALSE;
1761 assert(r1 < nrows1 && r2 < nrows2);
1762 assert(rows1[r1] == rows2[r2]);
1767 if( onlybinvars && !onlyoneone )
1769 if( vals1[r1] < 0 && vals2[r2] < 0 )
1781 if ( vals1[r1] > 0 && vals2[r2] > 0 )
1796 tmpupperbounddominatingcol2 = tmpupperbounddominatingcol1;
1798 tmpwclowerbounddominatingcol2 = tmpwclowerbounddominatingcol1;
1800 tmplowerbounddominatingcol2 = tmplowerbounddominatingcol1;
1802 tmpwcupperbounddominatingcol2 = tmpwcupperbounddominatingcol1;
1805 tmpupperbounddominatedcol2 = tmpupperbounddominatedcol1;
1807 tmpwclowerbounddominatedcol2 = tmpwclowerbounddominatedcol1;
1809 tmplowerbounddominatedcol2 = tmplowerbounddominatedcol1;
1811 tmpwcupperbounddominatedcol2 = tmpwcupperbounddominatedcol1;
1821 col2domcol1 =
FALSE;
1822 col1domcol2 =
FALSE;
1828 if( vals1[r1] > vals2[r2] )
1829 col2domcol1 =
FALSE;
1830 else if( vals1[r1] < vals2[r2] )
1831 col1domcol2 =
FALSE;
1839 ((vals1[r1] < 0 && vals2[r2] < 0) || (vals1[r1] > 0 && vals2[r2] > 0)) )
1845 col1, vals1[r1], col2, vals2[r2],
TRUE,
1846 &tmpupperbounddominatingcol1, &tmpwclowerbounddominatingcol1,
1847 &tmplowerbounddominatingcol1, &tmpwcupperbounddominatingcol1) );
1851 col1, vals1[r1], col2, vals2[r2],
FALSE,
1852 &tmpupperbounddominatedcol1, &tmpwclowerbounddominatedcol1,
1853 &tmplowerbounddominatedcol1, &tmpwcupperbounddominatedcol1) );
1860 col2, vals2[r2], col1, vals1[r1],
TRUE,
1861 &tmpupperbounddominatingcol2, &tmpwclowerbounddominatingcol2,
1862 &tmplowerbounddominatingcol2, &tmpwcupperbounddominatingcol2) );
1866 col2, vals2[r2], col1, vals1[r1],
FALSE,
1867 &tmpupperbounddominatedcol2, &tmpwclowerbounddominatedcol2,
1868 &tmplowerbounddominatedcol2, &tmpwcupperbounddominatedcol2) );
1878 col1domcol2 = col1domcol2 && r2 == nrows2;
1879 col2domcol1 = col2domcol1 && r1 == nrows1;
1881 if( !col1domcol2 && !col2domcol1 )
1885 while( r1 < nrows1 )
1889 col2domcol1 =
FALSE;
1890 col1domcol2 =
FALSE;
1895 if( !col1domcol2 && !col2domcol1 )
1897 while( r2 < nrows2 )
1901 col2domcol1 =
FALSE;
1902 col1domcol2 =
FALSE;
1908 if( col1domcol2 || col2domcol1 )
1911 if( col1domcol2 && col2domcol1 )
1915 col2domcol1 =
FALSE;
1917 col1domcol2 =
FALSE;
1927 tmpupperbounddominatingcol1, tmpwclowerbounddominatingcol1,
1928 tmplowerbounddominatingcol1, tmpwcupperbounddominatingcol1,
1930 varstofix, onlybinvars, onlyoneone, nfixings) );
1932 if( presoldata->predbndstr )
1935 tmpupperbounddominatingcol1,
1936 tmplowerbounddominatingcol1, tmpwcupperbounddominatingcol1,
1938 tmpupperbounddominatedcol1, tmpwclowerbounddominatedcol1,
1939 tmplowerbounddominatedcol1,
1940 varstofix, nchgbds) );
1943 else if( col2domcol1 )
1946 tmpupperbounddominatingcol2, tmpwclowerbounddominatingcol2,
1947 tmplowerbounddominatingcol2, tmpwcupperbounddominatingcol2,
1949 varstofix, onlybinvars, onlyoneone, nfixings) );
1951 if( presoldata->predbndstr )
1954 tmpupperbounddominatingcol2,
1955 tmplowerbounddominatingcol2, tmpwcupperbounddominatingcol2,
1957 tmpupperbounddominatedcol2, tmpwclowerbounddominatedcol2,
1958 tmplowerbounddominatedcol2,
1959 varstofix, nchgbds) );
1962 if( varstofix[col1] ==
FIXATLB )
2033 int nconvarsfixed = 0;
2034 int nintvarsfixed = 0;
2035 int nbinvarsfixed = 0;
2060 naddconss, ndelconss, nchgcoefs, nchgbds, nfixedvars) );
2087 for( v = 0; v < ncols; ++v )
2096 for(
r = 0;
r < nrows; ++
r )
2098 rowidxsorted[
r] =
r;
2105 for( v = 0; v < ncols; v++ )
2112 presoldata->numcurrentpairs = presoldata->nummaxpairs;
2134 pclassstart = pclass[pc];
2135 while( pc < ncols && pclassstart == pclass[pc] )
2150 consearchcols[nconfill++] =
varidx;
2154 binsearchcols[nbinfill++] =
varidx;
2159 intsearchcols[nintfill++] =
varidx;
2166 if( nconfill > 1 && presoldata->continuousred )
2169 varstofix, &nfixings, &ndomrelations, nchgbds) );
2171 for( v = 0; v < nconfill; ++v )
2172 varsprocessed[consearchcols[v]] =
TRUE;
2174 varcount += nconfill;
2176 else if( nconfill == 1 )
2179 varsprocessed[consearchcols[0]] =
TRUE;
2186 varstofix, &nfixings, &ndomrelations, nchgbds) );
2188 for( v = 0; v < nintfill; ++v )
2189 varsprocessed[intsearchcols[v]] =
TRUE;
2191 varcount += nintfill;
2193 else if( nintfill == 1 )
2196 varsprocessed[intsearchcols[0]] =
TRUE;
2203 varstofix, &nfixings, &ndomrelations, nchgbds) );
2205 for( v = 0; v < nbinfill; ++v )
2206 varsprocessed[binsearchcols[v]] =
TRUE;
2208 varcount += nbinfill;
2210 else if( nbinfill == 1 )
2213 varsprocessed[binsearchcols[0]] =
TRUE;
2216 if( varcount >= ncols )
2228 for(
r = 0;
r < nrows; ++
r )
2240 rowidx = rowidxsorted[
r];
2251 for( ; rowpnt < rowend; rowpnt++ )
2253 if( !(varsprocessed[*rowpnt]) )
2264 consearchcols[nconfill++] =
varidx;
2268 binsearchcols[nbinfill++] =
varidx;
2273 intsearchcols[nintfill++] =
varidx;
2279 if( nconfill > 1 && presoldata->continuousred )
2282 varstofix, &nfixings, &ndomrelations, nchgbds) );
2284 for( v = 0; v < nconfill; ++v )
2285 varsprocessed[consearchcols[v]] =
TRUE;
2287 varcount += nconfill;
2294 varstofix, &nfixings, &ndomrelations, nchgbds) );
2296 for( v = 0; v < nintfill; ++v )
2297 varsprocessed[intsearchcols[v]] =
TRUE;
2299 varcount += nintfill;
2306 varstofix, &nfixings, &ndomrelations, nchgbds) );
2308 for( v = 0; v < nbinfill; ++v )
2309 varsprocessed[binsearchcols[v]] =
TRUE;
2311 varcount += nbinfill;
2314 if( varcount >= ncols )
2323 oldnfixedvars = *nfixedvars;
2325 for( v = ncols - 1; v >= 0; --v )
2365 else if( varstofix[v] ==
FIXATUB )
2411 if( (nconvarsfixed + nintvarsfixed + nbinvarsfixed) > 0 )
2414 ncols, ndomrelations, nconvarsfixed, nintvarsfixed, nbinvarsfixed, (*
result !=
SCIP_CUTOFF) ?
"no " :
"");
2445 "presolving/domcol/numminpairs",
2446 "minimal number of pair comparisons",
2450 "presolving/domcol/nummaxpairs",
2451 "maximal number of pair comparisons",
2455 "presolving/domcol/predbndstr",
2456 "should predictive bound strengthening be applied?",
2460 "presolving/domcol/continuousred",
2461 "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