35 #define SEPA_NAME "eccuts" 36 #define SEPA_DESC "separator for edge-concave functions" 37 #define SEPA_PRIORITY -13000 39 #define SEPA_MAXBOUNDDIST 1.0 40 #define SEPA_USESSUBSCIP FALSE 41 #define SEPA_DELAY FALSE 43 #define CLIQUE_MAXFIRSTNODEWEIGHT 1000 45 #define CLIQUE_MINWEIGHT 0 46 #define CLIQUE_MAXNTREENODES 10000 47 #define CLIQUE_BACKTRACKFREQ 10000 49 #define DEFAULT_DYNAMICCUTS TRUE 50 #define DEFAULT_MAXROUNDS 10 51 #define DEFAULT_MAXROUNDSROOT 250 52 #define DEFAULT_MAXDEPTH -1 53 #define DEFAULT_MAXSEPACUTS 10 54 #define DEFAULT_MAXSEPACUTSROOT 50 55 #define DEFAULT_CUTMAXRANGE 1e+7 57 #define DEFAULT_MINVIOLATION 0.3 58 #define DEFAULT_MINAGGRSIZE 3 59 #define DEFAULT_MAXAGGRSIZE 4 60 #define DEFAULT_MAXBILINTERMS 500 61 #define DEFAULT_MAXSTALLROUNDS 5 63 #define SUBSCIP_NODELIMIT 100LL 65 #define ADJUSTFACETTOL 1e-6 66 #define USEDUALSIMPLEX TRUE 69 static const int poweroftwo[] = { 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192 };
149 #ifdef SCIP_STATISTIC 170 assert(scip !=
NULL);
171 assert(ecaggr !=
NULL);
172 assert(nquadvars > 0);
173 assert(nquadterms >= nquadvars);
177 (*ecaggr)->nvars = 0;
178 (*ecaggr)->nterms = 0;
179 (*ecaggr)->varsize = nquadvars;
180 (*ecaggr)->termsize = nquadterms;
198 assert(scip !=
NULL);
199 assert(ecaggr !=
NULL);
246 for( i = 0; i < ecaggr->
nvars && (idx1 == -1 || idx2 == -1); ++i )
248 if( ecaggr->
vars[i] == x )
250 if( ecaggr->
vars[i] == y )
254 assert(idx1 != -1 && idx2 != -1);
274 assert(scip !=
NULL);
275 assert(ecaggr !=
NULL);
279 for( i = 0; i < ecaggr->
nvars; ++i )
284 for( i = 0; i < ecaggr->
nterms; ++i )
307 assert(scip !=
NULL);
308 assert(nlrowaggr !=
NULL);
309 assert(linvars !=
NULL || nlinvars == 0);
310 assert(lincoefs !=
NULL || nlinvars == 0);
311 assert(nlinvars >= 0);
330 for( i = 0; i < nlrowaggr->
nlinvars; ++i )
346 assert(scip !=
NULL);
347 assert(nlrowaggr !=
NULL);
348 assert(quadvars !=
NULL);
349 assert(nquadvars > 0);
368 assert(nlrowaggr !=
NULL);
402 assert(scip !=
NULL);
403 assert(nlrow !=
NULL);
404 assert(nlrowaggr !=
NULL);
405 assert(quadvar2aggr !=
NULL);
417 (*nlrowaggr)->nlrow = nlrow;
418 (*nlrowaggr)->rhsaggr = rhsaggr;
423 (*nlrowaggr)->quadvars =
NULL;
424 (*nlrowaggr)->quadvar2aggr =
NULL;
425 (*nlrowaggr)->remtermcoefs =
NULL;
426 (*nlrowaggr)->remtermvars1 =
NULL;
427 (*nlrowaggr)->remtermvars2 =
NULL;
428 (*nlrowaggr)->nquadvars = 0;
429 (*nlrowaggr)->nremterms = 0;
441 assert((*nlrowaggr)->nquadvars == nquadvars);
443 for( i = 0; i < nfound; ++i )
450 for( i = 0; i < nquadvars; ++i )
452 if( quadvar2aggr[i] >= 0)
453 ++aggrnvars[ quadvar2aggr[i] ];
457 for( i = 0; i < nquadelems; ++i )
465 idx1 = quadvar2aggr[quadelem->
idx1];
466 idx2 = quadvar2aggr[quadelem->
idx2];
467 coef = rhsaggr ? quadelem->
coef : -quadelem->
coef;
470 if( idx1 >= 0 && idx2 >= 0 && idx1 == idx2 && (quadelem->
idx1 != quadelem->
idx2 ||
SCIPisNegative(scip, coef) ) )
483 (*nlrowaggr)->remtermsize = nremterms;
485 (*nlrowaggr)->necaggr = nfound;
487 for( i = 0; i < nfound; ++i )
493 for( i = 0; i < nquadvars; ++i )
497 idx = quadvar2aggr[i];
501 SCIPdebugMsg(scip,
"add quadvar %d to aggr. %d\n", i, idx);
507 for( i = 0; i < nquadelems; ++i )
519 idx1 = quadvar2aggr[quadelem->
idx1];
520 idx2 = quadvar2aggr[quadelem->
idx2];
521 coef = rhsaggr ? quadelem->
coef : -quadelem->
coef;
523 if( idx1 >= 0 && idx2 >= 0 && idx1 == idx2 && (quadelem->
idx1 != quadelem->
idx2 ||
SCIPisNegative(scip, coef) ) )
526 SCIPdebugMsg(scip,
"add term %e *%d*%d to aggr. %d\n", coef, quadelem->
idx1, quadelem->
idx2, idx1);
531 SCIPdebugMsg(scip,
"add term %e *%d*%d to the remaining part\n", coef, quadelem->
idx1, quadelem->
idx2);
551 assert(scip !=
NULL);
552 assert(nlrowaggr !=
NULL);
553 assert(*nlrowaggr !=
NULL);
554 (*nlrowaggr)->nlrow =
NULL;
555 assert((*nlrowaggr)->quadvars !=
NULL);
556 assert((*nlrowaggr)->nquadvars > 0);
557 assert((*nlrowaggr)->nremterms >= 0);
567 (*nlrowaggr)->quadvars =
NULL;
568 (*nlrowaggr)->quadvar2aggr =
NULL;
569 (*nlrowaggr)->nquadvars = 0;
572 if( (*nlrowaggr)->nlinvars > 0 )
576 (*nlrowaggr)->linvars = 0;
577 (*nlrowaggr)->linvars =
NULL;
578 (*nlrowaggr)->lincoefs =
NULL;
582 for( i = 0; i < (*nlrowaggr)->necaggr; ++i )
608 for( i = 0; i < nlrowaggr->
nremterms; ++i )
611 for( i = 0; i < nlrowaggr->
nlinvars; ++i )
615 for( i = 0; i < nlrowaggr->
necaggr; ++i )
618 ecaggrPrint(scip, nlrowaggr->
ecaggr[i]);
631 assert(scip !=
NULL);
632 assert(sepadata !=
NULL);
647 assert(scip !=
NULL);
648 assert(sepadata !=
NULL);
651 if( sepadata->nlrowaggrs !=
NULL )
655 for( i = sepadata->nnlrowaggrs - 1; i >= 0; --i )
662 sepadata->nlrowaggrs =
NULL;
663 sepadata->nnlrowaggrs = 0;
664 sepadata->nlrowaggrssize = 0;
677 assert(scip !=
NULL);
678 assert(sepadata !=
NULL);
679 assert(*sepadata !=
NULL);
685 if( (*sepadata)->lpi !=
NULL )
688 (*sepadata)->lpisize = 0;
706 assert(scip !=
NULL);
707 assert(sepadata !=
NULL);
708 assert(nlrowaggr !=
NULL);
710 if( sepadata->nlrowaggrssize == 0 )
713 sepadata->nlrowaggrssize = 2;
715 else if( sepadata->nlrowaggrssize < sepadata->nnlrowaggrs + 1 )
718 sepadata->nlrowaggrssize *= 2;
719 assert(sepadata->nlrowaggrssize >= sepadata->nnlrowaggrs + 1);
722 sepadata->nlrowaggrs[ sepadata->nnlrowaggrs ] = nlrowaggr;
723 ++(sepadata->nnlrowaggrs);
726 for( i = 0; i < nlrowaggr->
necaggr; ++i )
727 sepadata->maxecsize =
MAX(sepadata->maxecsize, nlrowaggr->
ecaggr[i]->
nvars);
729 #ifdef SCIP_STATISTIC 732 ++(sepadata->nrhsnlrowaggrs);
734 ++(sepadata->nlhsnlrowaggrs);
756 return MIN(ub - val, val - lb) / (ub - lb);
788 assert(subscip !=
NULL);
789 assert(forwardarcs !=
NULL);
790 assert(backwardarcs !=
NULL);
791 assert(nedges !=
NULL);
792 assert(sepadata->minaggrsize <= sepadata->maxaggrsize);
810 for( i = 0; i <
narcs; ++i )
819 edgeweight = (quadelem->
idx1 == quadelem->
idx2) ? 0.0 : nodeweights[quadelem->
idx1] + nodeweights[quadelem->
idx2];
820 SCIPdebugMsg(scip,
"edge {%d,%d} = {%s,%s} coeff=%e edgeweight=%e\n", quadelem->
idx1, quadelem->
idx2,
824 ub = (quadelem->
idx1 == quadelem->
idx2) ? 0.0 : 1.0;
835 if( quadelem->
idx1 == quadelem->
idx2 )
843 oddcyclearcs[noddcyclearcs++] = forwardarcs[i];
844 oddcyclearcs[noddcyclearcs++] = backwardarcs[i];
849 oddcyclearcs[noddcyclearcs++] = forwardarcs[i];
850 oddcyclearcs[noddcyclearcs++] = backwardarcs[i];
874 for( i = 0; i <
narcs; ++i )
886 for( i = 0; i <
nnodes; ++i )
892 for( i = 0; i <
narcs; ++i )
909 for( i = 0; i <
nnodes; ++i )
933 assert(subscip !=
NULL);
934 assert(nlrow !=
NULL);
935 assert(forwardarcs !=
NULL);
936 assert(backwardarcs !=
NULL);
937 assert(quadvar2aggr !=
NULL);
938 assert(nedges !=
NULL);
952 if( quadvar2aggr[quadelem->
idx1] != -1 || quadvar2aggr[quadelem->
idx2] != -1 )
958 *nedges += (quadelem->
idx1 != quadelem->
idx2) ? 1 : 0;
978 assert(subscip !=
NULL);
979 assert(nlrow !=
NULL);
980 assert(forwardarcs !=
NULL);
981 assert(backwardarcs !=
NULL);
982 assert(quadvar2aggr !=
NULL);
983 assert(nfoundsofar >= 0);
999 assert(quadvar2aggr[quadelem->
idx1] == -1 || quadvar2aggr[quadelem->
idx1] == nfoundsofar);
1000 assert(quadvar2aggr[quadelem->
idx2] == -1 || quadvar2aggr[quadelem->
idx2] == nfoundsofar);
1002 quadvar2aggr[quadelem->
idx1] = nfoundsofar;
1003 quadvar2aggr[quadelem->
idx2] = nfoundsofar;
1020 assert(subscip !=
NULL);
1021 assert(aggrleft !=
NULL);
1022 assert(found !=
NULL);
1023 assert(nedges >= 0);
1028 if(
SCIPisLE(subscip, timelimit, 0.0) )
1087 assert(graph !=
NULL);
1088 assert(nlrow !=
NULL);
1103 nodeweight = 100 + (int)(100 * nodeweights[i]);
1121 assert(quadelem !=
NULL);
1126 assert(bilinvar1 !=
NULL);
1127 assert(bilinvar2 !=
NULL);
1130 if( bilinvar1 == bilinvar2 )
1133 assert(quadelem->
idx1 != quadelem->
idx2);
1135 #ifdef SCIP_DEBUG_DETAILED 1136 SCIPdebugMsg(scip,
" add edge (%d, %d) = (%s,%s) to tclique graph\n",
1178 int* maxcliquenodes;
1180 int nmaxcliquenodes;
1181 int maxcliqueweight;
1187 assert(graph !=
NULL);
1188 assert(nfoundsofar >= 0);
1189 assert(foundaggr !=
NULL);
1190 assert(foundclique !=
NULL);
1195 *foundclique =
FALSE;
1200 if( quadvar2aggr[i] != -1 )
1202 SCIPdebugMsg(scip,
"exclude node %d from clique graph\n", i);
1214 if( status !=
TCLIQUE_OPTIMAL || nmaxcliquenodes < sepadata->minaggrsize )
1217 *foundclique =
TRUE;
1218 aggrsize =
MIN(sepadata->maxaggrsize, nmaxcliquenodes);
1221 for( i = 0; i < aggrsize; ++i )
1247 ++degrees[quadelem->
idx1];
1248 ++degrees[quadelem->
idx2];
1253 for( i = 0; i < aggrsize; ++i )
1254 if( degrees[i] == 2 )
1258 if( noddcycleedges == 0 || (aggrsize == 3 && noddcycleedges == 2) || (aggrsize == 4 && ntwodegrees == 4) )
1264 for( i = 0; i < aggrsize; ++i )
1266 quadvar2aggr[ maxcliquenodes[i] ] = *foundaggr ? nfoundsofar : -2;
1267 SCIPdebugMsg(scip,
"%s %d\n", *foundaggr ?
"aggregate node: " :
"exclude node: ", maxcliquenodes[i]);
1273 if( cliquemap !=
NULL )
1318 assert(quadvar2aggr !=
NULL);
1319 assert(nfound !=
NULL);
1336 quadvar2aggr[i] = -1;
1351 SCIP_CALL(
createMIP(scip, subscip, sepadata, nlrow, rhsaggr, forwardarcs, backwardarcs, nodeweights, &nedges) );
1352 assert(nedges >= 0);
1353 SCIPdebugMsg(scip,
"nedges (without loops) = %d\n", nedges);
1366 if( nedges < sepadata->minaggrsize )
1373 if( timelimit <= 0.0 )
1375 SCIPdebugMsg(scip,
"skip aggregation search since no time left\n");
1408 assert(graph !=
NULL);
1413 &foundaggr, &foundclique) );
1417 assert(foundclique);
1428 SCIPdebugMsg(scip,
"did not find a clique to exclude -> leave aggregation search\n");
1434 if( nunsucces >= sepadata->maxstallrounds && *nfound == 0 )
1436 SCIPdebugMsg(scip,
"did not find an e.c. aggregation for %d iterations\n", nunsucces);
1441 SCIP_CALL(
updateMIP(subscip, nlrow, forwardarcs, backwardarcs, quadvar2aggr, &nedges) );
1448 for( i = 0; i < nquadvars; ++i )
1459 for( i = 0; i < nquadelems; ++i )
1490 int ninterestingnodes;
1495 assert(rhscandidate !=
NULL);
1496 assert(lhscandidate !=
NULL);
1498 *rhscandidate =
TRUE;
1499 *lhscandidate =
TRUE;
1505 *rhscandidate =
FALSE;
1506 *lhscandidate =
FALSE;
1512 *rhscandidate =
FALSE;
1514 *lhscandidate =
FALSE;
1519 ninterestingnodes = 0;
1534 if( quadelem->
idx1 != quadelem->
idx2 1538 ++degrees[quadelem->
idx1];
1539 ++degrees[quadelem->
idx2];
1542 if( degrees[quadelem->
idx1] == 2 )
1543 ++ninterestingnodes;
1544 if( degrees[quadelem->
idx2] == 2 )
1545 ++ninterestingnodes;
1554 SCIPdebugMsg(scip,
"nlrow contains: %d edges\n", nposedges + nnegedges);
1557 if( nposedges + nnegedges > sepadata->maxbilinterms || nposedges + nnegedges < sepadata->minaggrsize
1558 || ninterestingnodes < sepadata->minaggrsize )
1560 *rhscandidate =
FALSE;
1561 *lhscandidate =
FALSE;
1566 if( nposedges == 0 || (nposedges + nnegedges == 3 && (nposedges % 2) == 0) )
1567 *rhscandidate =
FALSE;
1568 if( nnegedges == 0 || (nposedges + nnegedges == 3 && (nnegedges % 2) == 0) )
1569 *lhscandidate =
FALSE;
1587 assert(scip !=
NULL);
1588 assert(nlrow !=
NULL);
1589 assert(sepadata !=
NULL);
1594 SCIPdebugMsg(scip,
"search for edge-concave aggregation for the nonlinear row: \n");
1600 SCIPdebugMsg(scip,
"rhs candidate = %u lhs candidate = %u\n", rhscandidate, lhscandidate);
1616 assert(nlrow !=
NULL);
1617 SCIPdebug(nlrowaggrPrint(scip, nlrowaggr));
1636 assert(nlrow !=
NULL);
1637 SCIPdebug(nlrowaggrPrint(scip, nlrowaggr));
1663 SCIPdebugMsg(scip,
"print facet (val=%e): ", facetval);
1664 for( i = 0; i <
nvars; ++i )
1685 unsigned int ncorner;
1688 assert(scip !=
NULL);
1689 assert(ecaggr !=
NULL);
1690 assert(fvals !=
NULL);
1691 assert(facet !=
NULL);
1697 val = facet[ecaggr->
nvars];
1698 for( i = 0; i < (
unsigned int) ecaggr->
nvars; ++i )
1702 maxviolation =
MAX(val - fvals[0], maxviolation);
1706 for( i = 1; i < ncorner; ++i )
1712 gray = i ^ (i >> 1);
1717 while( (diff >>= 1) != 0 )
1727 maxviolation =
MAX(val - fvals[gray], maxviolation);
1733 SCIPdebugMsg(scip,
"maximum violation of facet: %2.8e\n", maxviolation);
1740 facet[ecaggr->
nvars] -= maxviolation;
1764 assert(scip !=
NULL);
1765 assert(sepadata !=
NULL);
1766 assert(sepadata->nnlrowaggrs > 0);
1769 if( sepadata->lpi !=
NULL && sepadata->lpisize >= sepadata->maxecsize )
1773 if( sepadata->lpi !=
NULL )
1776 sepadata->lpi =
NULL;
1779 assert(sepadata->lpi ==
NULL);
1781 sepadata->lpisize = sepadata->maxecsize;
1783 nrows = sepadata->maxecsize + 1;
1785 nnonz = (ncols * (nrows + 1)) / 2;
1797 for( i = 0; i < ncols; ++i )
1806 SCIPdebugMsg(scip,
"col %i starts at position %d\n", i, k);
1819 SCIPdebugMsg(scip,
" val[%d][%d] = 1 (position %d)\n", row, i, k);
1833 SCIPdebugMsg(scip,
" val[%d][%d] = 1 (position %d)\n", nrows - 1, i, k);
1842 assert(nrows <= ncols);
1867 assert(ecaggr !=
NULL);
1872 for( i = 0; i < ecaggr->
nterms; ++i )
1883 assert(idx1 >= 0 && idx1 < ecaggr->
nvars);
1884 assert(idx2 >= 0 && idx2 < ecaggr->nvars);
1889 val += coef * bound1 * bound2;
1904 assert(scip !=
NULL);
1914 val = (val - lb) / (ub - lb);
1915 assert(val >= 0.0 && val <= 1.0);
1963 assert(scip !=
NULL);
1964 assert(sepadata !=
NULL);
1965 assert(ecaggr !=
NULL);
1966 assert(facet !=
NULL);
1967 assert(facetval !=
NULL);
1968 assert(success !=
NULL);
1969 assert(ecaggr->
nvars <= sepadata->maxecsize);
1977 assert(sepadata->lpi !=
NULL);
1978 assert(sepadata->lpisize >= ecaggr->
nvars);
1984 assert(ncorner <= ncols);
1985 assert(ecaggr->
nvars + 1 <= nrows);
1986 assert(nrows <= ncols);
1999 for( i = 0; i < ncols; ++i )
2001 fvals[i] = i < ncorner ?
evalCorner(ecaggr, i) : 0.0;
2006 ub[i] = i < ncorner ? 1.0 : 0.0;
2007 SCIPdebugMsg(scip,
"bounds of LP col %d = [%e, %e]; obj = %e\n", i, lb[i], ub[i], fvals[i]);
2011 perturbation = 0.001;
2012 for( i = 0; i < nrows; ++i )
2015 if( i < ecaggr->
nvars )
2019 x = ecaggr->
vars[i];
2025 side[i] += side[i] > perturbation ? -perturbation : perturbation;
2026 perturbation /= 1.2;
2030 side[i] = (i == nrows - 1) ? 1.0 : 0.0;
2033 SCIPdebugMsg(scip,
"LP row %d in [%e, %e]\n", i, side[i], side[i]);
2062 if( ecaggr->
nvars + 1 == ncols )
2075 for( i = 0; i < ecaggr->
nvars; ++i )
2076 facet[i] = dualsol[i];
2079 facet[ecaggr->
nvars] = dualsol[nrows - 1];
2085 SCIPdebugMsg(scip,
"facet for the transformed problem: ");
2086 for( i = 0; i < ecaggr->
nvars; ++i )
2105 for( i = 0; i < ecaggr->
nvars; ++i )
2112 assert(!
SCIPisEQ(scip, varlb, varub));
2115 facet[ecaggr->
nvars] -= (facet[i] * varlb) / (varub - varlb);
2118 facet[i] = facet[i] / (varub - varlb);
2125 *facetval += facet[ecaggr->
nvars];
2134 SCIPdebugMsg(scip,
"facet pass the check of Rikun et al.\n");
2164 assert(cut !=
NULL);
2165 assert(facet !=
NULL);
2166 assert(vars !=
NULL);
2168 assert(cutconstant !=
NULL);
2169 assert(cutactivity !=
NULL);
2170 assert(success !=
NULL);
2174 for( i = 0; i <
nvars; ++i )
2188 *cutconstant += facet[i] *
SCIPgetSolVal(scip, sol, vars[i]);
2189 *cutactivity += facet[i] *
SCIPgetSolVal(scip, sol, vars[i]);
2193 *cutactivity += facet[i] *
SCIPgetSolVal(scip, sol, vars[i]);
2200 *cutconstant += facet[
nvars];
2201 *cutactivity += facet[
nvars];
2221 assert(cut !=
NULL);
2225 assert(cutconstant !=
NULL);
2226 assert(cutactivity !=
NULL);
2227 assert(success !=
NULL);
2243 *cutconstant += activity;
2252 *cutactivity += activity;
2273 assert(cut !=
NULL);
2277 assert(cutconstant !=
NULL);
2278 assert(cutactivity !=
NULL);
2279 assert(success !=
NULL);
2318 *cutactivity += lincoef * refpoint + linconst;
2319 *cutconstant += linconst;
2352 *cutactivity += lincoefx * refpointx + lincoefy * refpointy + linconst;
2353 *cutconstant += linconst;
2392 assert(separated !=
NULL);
2393 assert(cutoff !=
NULL);
2394 assert(nlrowaggr->
necaggr > 0);
2405 sepadata->dynamiccuts) );
2413 bestfacetsize = sepadata->maxaggrsize + 1;
2429 for( i = 0; i < nlrowaggr->
necaggr; ++i )
2434 ecaggr = nlrowaggr->
ecaggr[i];
2435 assert(ecaggr !=
NULL);
2440 SCIPdebugMsg(scip,
"found facet for edge-concave aggregation %d/%d ? %s\n", i, nlrowaggr->
necaggr,
2441 found ?
"yes" :
"no");
2445 printFacet(scip, ecaggr->
vars, ecaggr->
nvars, bestfacet, bestfacetval);
2461 for( i = 0; i < nlrowaggr->
nremterms; ++i )
2480 for( i = 0; i < nlrowaggr->
nlinvars; ++i )
2497 SCIPdebugMsg(scip,
"cut activity = %e rhs(nlrow) = %e\n", cutactivity, nlrowaggr->
rhs);
2510 SCIPdebugMsg(scip,
"EC cut <%s>: act=%f eff=%f rank=%d range=%e\n",
2519 if(
SCIPisGE(scip, cutactivity - nlrowaggr->
rhs, sepadata->minviolation) )
2526 if( !(*cutoff) && !islocalcut )
2553 assert(scip !=
NULL);
2554 assert(nlrowaggr !=
NULL);
2562 for( i = 0; i < nlrowaggr->
nquadvars; ++i )
2565 assert(var !=
NULL);
2571 SCIPdebugMsg(scip,
"nlrow aggregation contains unbounded variables\n");
2578 SCIPdebugMsg(scip,
"nlrow aggregation contains fixed variables in an e.c. aggregation\n");
2605 if( sepadata->nnlrowaggrs == 0 )
2607 SCIPdebugMsg(scip,
"no aggregations exists -> skip call\n");
2612 nmaxcuts =
SCIPgetDepth(scip) == 0 ? sepadata->maxsepacutsroot : sepadata->maxsepacuts;
2616 for( i = 0; i < sepadata->nnlrowaggrs && ncuts < nmaxcuts && !
SCIPisStopped(scip); ++i )
2622 nlrowaggr = sepadata->nlrowaggrs[i];
2623 assert(nlrowaggr !=
NULL);
2631 SCIPdebugMsg(scip,
"try to compute a cut for nonlinear row aggregation %d\n", i);
2635 SCIPdebugMsg(scip,
"found a cut: %s cutoff: %s\n", separated ?
"yes" :
"no", cutoff ?
"yes" :
"no");
2666 assert(sepa !=
NULL);
2682 assert(sepadata !=
NULL);
2697 assert(sepadata !=
NULL);
2700 #ifdef SCIP_STATISTIC 2710 sepadata->searchedforaggr =
FALSE;
2726 assert(sepadata !=
NULL);
2731 if( sepadata->maxaggrsize < sepadata->minaggrsize )
2741 SCIPdebugMsg(scip,
"Skip since NLP is not constructed yet.\n");
2748 if ( sepadata->maxdepth >= 0 && depth > sepadata->maxdepth )
2753 if ( (depth == 0 && sepadata->maxroundsroot >= 0 && ncalls >= sepadata->maxroundsroot)
2754 || (depth > 0 && sepadata->maxrounds >= 0 && ncalls >= sepadata->maxrounds) )
2758 if( !sepadata->searchedforaggr )
2764 SCIPdebugMsg(scip,
"search for nonlinear row aggregations\n");
2770 sepadata->searchedforaggr =
TRUE;
2800 assert(sepa !=
NULL);
2810 "should generated cuts be removed from the LP if they are no longer tight?",
2815 "maximal number of eccuts separation rounds per node (-1: unlimited)",
2819 "separating/" SEPA_NAME "/maxroundsroot",
2820 "maximal number of eccuts separation rounds in the root node (-1: unlimited)",
2825 "maximal depth at which the separator is applied (-1: unlimited)",
2830 "maximal number of edge-concave cuts separated per separation round",
2834 "separating/" SEPA_NAME "/maxsepacutsroot",
2835 "maximal number of edge-concave cuts separated per separation round in the root node",
2839 "maximal coef. range of a cut (max coef. divided by min coef.) in order to be added to LP relaxation",
2843 "minimal violation of an edge-concave cut to be separated",
2848 "search for edge-concave aggregations of at least this size",
2853 "search for edge-concave aggregations of at most this size",
2857 "separating/" SEPA_NAME "/maxbilinterms",
2858 "maximum number of bilinear terms allowed to be in a quadratic constraint",
2862 "separating/" SEPA_NAME "/maxstallrounds",
2863 "maximum number of unsuccessful rounds in the edge-concave aggregation search",
enum SCIP_Result SCIP_RESULT
#define SCIPfreeBlockMemoryArray(scip, ptr, num)
static SCIP_RETCODE separateCuts(SCIP *scip, SCIP_SEPA *sepa, SCIP_SEPADATA *sepadata, SCIP_SOL *sol, SCIP_RESULT *result)
#define SCIPreallocBlockMemoryArray(scip, ptr, oldnum, newnum)
int SCIPgetNNLPNlRows(SCIP *scip)
SCIP_Real SCIPgetSolvingTime(SCIP *scip)
enum TCLIQUE_Status TCLIQUE_STATUS
SCIP_RETCODE SCIPnlrowPrint(SCIP_NLROW *nlrow, SCIP_MESSAGEHDLR *messagehdlr, FILE *file)
#define SCIPallocBlockMemoryArray(scip, ptr, num)
SCIP_Bool SCIPisNLPConstructed(SCIP *scip)
void tcliqueFree(TCLIQUE_GRAPH **tcliquegraph)
SCIP_RETCODE SCIPcacheRowExtensions(SCIP *scip, SCIP_ROW *row)
static SCIP_RETCODE createMIP(SCIP *scip, SCIP *subscip, SCIP_SEPADATA *sepadata, SCIP_NLROW *nlrow, SCIP_Bool rhsaggr, SCIP_VAR **forwardarcs, SCIP_VAR **backwardarcs, SCIP_Real *nodeweights, int *nedges)
SCIP_RETCODE SCIPlpiSolveDual(SCIP_LPI *lpi)
static SCIP_RETCODE addFacetToCut(SCIP *scip, SCIP_SOL *sol, SCIP_ROW *cut, SCIP_Real *facet, SCIP_VAR **vars, int nvars, SCIP_Real *cutconstant, SCIP_Real *cutactivity, SCIP_Bool *success)
SCIP_Bool SCIPisFeasEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_RETCODE SCIPcreateConsBasicLinear(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Real *vals, SCIP_Real lhs, SCIP_Real rhs)
TCLIQUE_Bool tcliqueCreate(TCLIQUE_GRAPH **tcliquegraph)
struct TCLIQUE_Graph TCLIQUE_GRAPH
SCIP_RETCODE SCIPflushRowExtensions(SCIP *scip, SCIP_ROW *row)
TCLIQUE_Bool tcliqueAddNode(TCLIQUE_GRAPH *tcliquegraph, int node, TCLIQUE_WEIGHT weight)
SCIP_Real SCIPvarGetLbGlobal(SCIP_VAR *var)
SCIP_RETCODE SCIPgetRealParam(SCIP *scip, const char *name, SCIP_Real *value)
static SCIP_DECL_SEPACOPY(sepaCopyEccuts)
SCIP_RETCODE SCIPaddVarToRow(SCIP *scip, SCIP_ROW *row, SCIP_VAR *var, SCIP_Real val)
SCIP_Bool SCIPisPositive(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPvarGetLbLocal(SCIP_VAR *var)
static SCIP_DECL_SEPAEXITSOL(sepaExitsolEccuts)
SCIP_Bool SCIPisGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
static SCIP_RETCODE sepadataFreeNlrows(SCIP *scip, SCIP_SEPADATA *sepadata)
#define CLIQUE_MAXNTREENODES
const char * SCIProwGetName(SCIP_ROW *row)
static SCIP_RETCODE searchEcAggrWithCliques(SCIP *scip, TCLIQUE_GRAPH *graph, SCIP_SEPADATA *sepadata, SCIP_NLROW *nlrow, int *quadvar2aggr, int nfoundsofar, SCIP_Bool rhsaggr, SCIP_Bool *foundaggr, SCIP_Bool *foundclique)
SCIP_RETCODE SCIPreleaseVar(SCIP *scip, SCIP_VAR **var)
SCIP_RETCODE SCIPlpiAddCols(SCIP_LPI *lpi, int ncols, const SCIP_Real *obj, const SCIP_Real *lb, const SCIP_Real *ub, char **colnames, int nnonz, const int *beg, const int *ind, const SCIP_Real *val)
static SCIP_RETCODE SCIPcomputeConvexEnvelopeFacet(SCIP *scip, SCIP_SEPADATA *sepadata, SCIP_SOL *sol, SCIP_ECAGGR *ecaggr, SCIP_Real *facet, SCIP_Real *facetval, SCIP_Bool *success)
static SCIP_RETCODE searchEcAggrWithMIP(SCIP *subscip, SCIP_Real timelimit, int nedges, SCIP_Bool *aggrleft, SCIP_Bool *found)
SCIP_RETCODE SCIPsetHeuristics(SCIP *scip, SCIP_PARAMSETTING paramsetting, SCIP_Bool quiet)
SCIP_RETCODE SCIPhashmapCreate(SCIP_HASHMAP **hashmap, BMS_BLKMEM *blkmem, int mapsize)
#define CLIQUE_MAXFIRSTNODEWEIGHT
SCIP_Real SCIPinfinity(SCIP *scip)
int SCIPsnprintf(char *t, int len, const char *s,...)
SCIP_Bool SCIPisNegative(SCIP *scip, SCIP_Real val)
const char * SCIPsepaGetName(SCIP_SEPA *sepa)
enum SCIP_Retcode SCIP_RETCODE
SCIP_RETCODE SCIPlpiFree(SCIP_LPI **lpi)
SCIP_RETCODE SCIPlpiChgObj(SCIP_LPI *lpi, int ncols, const int *ind, const SCIP_Real *obj)
#define SCIPstatisticMessage
int SCIPnlrowGetNQuadVars(SCIP_NLROW *nlrow)
SCIP_Real SCIPnlrowGetRhs(SCIP_NLROW *nlrow)
SCIP_RETCODE SCIPcreateVarBasic(SCIP *scip, SCIP_VAR **var, const char *name, SCIP_Real lb, SCIP_Real ub, SCIP_Real obj, SCIP_VARTYPE vartype)
static SCIP_RETCODE sepadataFree(SCIP *scip, SCIP_SEPADATA **sepadata)
static SCIP_RETCODE createTcliqueGraph(SCIP *scip, SCIP_NLROW *nlrow, TCLIQUE_GRAPH **graph, SCIP_Real *nodeweights)
int SCIPnlrowGetNLinearVars(SCIP_NLROW *nlrow)
edge concave cut separator
#define SCIPfreeBlockMemory(scip, ptr)
SCIP_MESSAGEHDLR * SCIPgetMessagehdlr(SCIP *scip)
SCIP_Bool SCIPisEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
#define SCIPfreeBufferArray(scip, ptr)
SCIP_RETCODE SCIPcreate(SCIP **scip)
#define SCIPallocBlockMemory(scip, ptr)
SCIP_RETCODE SCIPsetSepaCopy(SCIP *scip, SCIP_SEPA *sepa, SCIP_DECL_SEPACOPY((*sepacopy)))
SCIP_RETCODE SCIPsetRealParam(SCIP *scip, const char *name, SCIP_Real value)
SCIP_RETCODE SCIPlpiGetNCols(SCIP_LPI *lpi, int *ncols)
#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 SCIPaddCoefLinear(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real val)
SCIP_RETCODE SCIPcreateProbBasic(SCIP *scip, const char *name)
SCIP_NLROW ** SCIPgetNLPNlRows(SCIP *scip)
SCIP_Real SCIPgetRowMaxCoef(SCIP *scip, SCIP_ROW *row)
SCIP_SEPADATA * SCIPsepaGetData(SCIP_SEPA *sepa)
int SCIPnlrowGetNQuadElems(SCIP_NLROW *nlrow)
static SCIP_RETCODE ecaggrCreateEmpty(SCIP *scip, SCIP_ECAGGR **ecaggr, int nquadvars, int nquadterms)
#define DEFAULT_MAXSTALLROUNDS
SCIP_Bool SCIPhashmapExists(SCIP_HASHMAP *hashmap, void *origin)
static SCIP_RETCODE ecaggrFree(SCIP *scip, SCIP_ECAGGR **ecaggr)
SCIP_Real SCIPvarGetUbGlobal(SCIP_VAR *var)
static SCIP_Bool isPossibleToComputeCut(SCIP *scip, SCIP_SOL *sol, SCIP_NLROWAGGR *nlrowaggr)
SCIP_RETCODE SCIPcreateConsBasicXor(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_Bool rhs, int nvars, SCIP_VAR **vars)
SCIP_Bool SCIPisCutEfficacious(SCIP *scip, SCIP_SOL *sol, SCIP_ROW *cut)
SCIP_RETCODE SCIPsetObjsense(SCIP *scip, SCIP_OBJSENSE objsense)
SCIP_RETCODE SCIPlpiGetNRows(SCIP_LPI *lpi, int *nrows)
SCIP_Bool SCIPnlrowIsInNLP(SCIP_NLROW *nlrow)
SCIP_VAR ** SCIPnlrowGetQuadVars(SCIP_NLROW *nlrow)
SCIP_RETCODE SCIPsolve(SCIP *scip)
void SCIPaddBilinMcCormick(SCIP *scip, SCIP_Real bilincoef, SCIP_Real lbx, SCIP_Real ubx, SCIP_Real refpointx, SCIP_Real lby, SCIP_Real uby, SCIP_Real refpointy, SCIP_Bool overestimate, SCIP_Real *lincoefx, SCIP_Real *lincoefy, SCIP_Real *linconstant, SCIP_Bool *success)
TCLIQUE_Bool tcliqueAddEdge(TCLIQUE_GRAPH *tcliquegraph, int node1, int node2)
SCIP_Real SCIPgetRowMinCoef(SCIP *scip, SCIP_ROW *row)
SCIP_RETCODE SCIPaddCons(SCIP *scip, SCIP_CONS *cons)
SCIP_Bool SCIPisLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
void tcliqueChangeWeight(TCLIQUE_GRAPH *tcliquegraph, int node, TCLIQUE_WEIGHT weight)
int SCIPsepaGetNCallsAtNode(SCIP_SEPA *sepa)
SCIP_STATUS SCIPgetStatus(SCIP *scip)
BMS_BLKMEM * SCIPblkmem(SCIP *scip)
SCIP_RETCODE SCIPchgVarUb(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound)
static SCIP_Real phi(SCIP *scip, SCIP_Real val, SCIP_Real lb, SCIP_Real ub)
const char * SCIPvarGetName(SCIP_VAR *var)
static SCIP_RETCODE sepadataAddNlrowaggr(SCIP *scip, SCIP_SEPADATA *sepadata, SCIP_NLROWAGGR *nlrowaggr)
static SCIP_RETCODE storeAggrFromMIP(SCIP *subscip, SCIP_NLROW *nlrow, SCIP_VAR **forwardarcs, SCIP_VAR **backwardarcs, int *quadvar2aggr, int nfoundsofar)
internal methods for NLP management
void SCIPhashmapFree(SCIP_HASHMAP **hashmap)
void SCIPsepaSetData(SCIP_SEPA *sepa, SCIP_SEPADATA *sepadata)
SCIP_RETCODE SCIPlpiChgSides(SCIP_LPI *lpi, int nrows, const int *ind, const SCIP_Real *lhs, const SCIP_Real *rhs)
static SCIP_RETCODE addBilinearTermToCut(SCIP *scip, SCIP_SOL *sol, SCIP_ROW *cut, SCIP_VAR *x, SCIP_VAR *y, SCIP_Real coeff, SCIP_Real *cutconstant, SCIP_Real *cutactivity, SCIP_Bool *success)
void tcliqueMaxClique(TCLIQUE_GETNNODES((*getnnodes)), TCLIQUE_GETWEIGHTS((*getweights)), TCLIQUE_ISEDGE((*isedge)), TCLIQUE_SELECTADJNODES((*selectadjnodes)), TCLIQUE_GRAPH *tcliquegraph, TCLIQUE_NEWSOL((*newsol)), TCLIQUE_DATA *tcliquedata, int *maxcliquenodes, int *nmaxcliquenodes, TCLIQUE_WEIGHT *maxcliqueweight, TCLIQUE_WEIGHT maxfirstnodeweight, TCLIQUE_WEIGHT minweight, int maxntreenodes, int backtrackfreq, int maxnzeroextensions, int fixednode, int *ntreenodes, TCLIQUE_STATUS *status)
SCIP_QUADELEM * SCIPnlrowGetQuadElems(SCIP_NLROW *nlrow)
#define DEFAULT_MAXAGGRSIZE
#define DEFAULT_CUTMAXRANGE
SCIP_RETCODE SCIPaddCut(SCIP *scip, SCIP_SOL *sol, SCIP_ROW *cut, SCIP_Bool forcecut, SCIP_Bool *infeasible)
void SCIPaddSquareSecant(SCIP *scip, SCIP_Real sqrcoef, SCIP_Real lb, SCIP_Real ub, SCIP_Real refpoint, SCIP_Real *lincoef, SCIP_Real *linconstant, SCIP_Bool *success)
SCIP_RETCODE SCIPlpiGetSol(SCIP_LPI *lpi, SCIP_Real *objval, SCIP_Real *primsol, SCIP_Real *dualsol, SCIP_Real *activity, SCIP_Real *redcost)
#define DEFAULT_MINVIOLATION
SCIP_RETCODE SCIPincludeSepaBasic(SCIP *scip, SCIP_SEPA **sepa, const char *name, const char *desc, int priority, int freq, SCIP_Real maxbounddist, SCIP_Bool usessubscip, SCIP_Bool delay, SCIP_DECL_SEPAEXECLP((*sepaexeclp)), SCIP_DECL_SEPAEXECSOL((*sepaexecsol)), SCIP_SEPADATA *sepadata)
#define DEFAULT_MAXSEPACUTS
#define SCIPallocBufferArray(scip, ptr, num)
SCIP_RETCODE SCIPfreeTransform(SCIP *scip)
SCIP_RETCODE SCIPsetSepaExitsol(SCIP *scip, SCIP_SEPA *sepa, SCIP_DECL_SEPAEXITSOL((*sepaexitsol)))
static SCIP_RETCODE nlrowaggrAddRemBilinTerm(SCIP *scip, SCIP_NLROWAGGR *nlrowaggr, SCIP_VAR *x, SCIP_VAR *y, SCIP_Real coef)
#define DEFAULT_MAXSEPACUTSROOT
SCIP_RETCODE SCIPincludeDefaultPlugins(SCIP *scip)
SCIP_RETCODE SCIPchgRowRhs(SCIP *scip, SCIP_ROW *row, SCIP_Real rhs)
static SCIP_RETCODE nlrowaggrStoreQuadraticVars(SCIP *scip, SCIP_NLROWAGGR *nlrowaggr, SCIP_VAR **quadvars, int nquadvars)
SCIP_RETCODE SCIPincludeSepaEccuts(SCIP *scip)
int SCIPgetDepth(SCIP *scip)
static SCIP_RETCODE searchEcAggr(SCIP *scip, SCIP_SEPADATA *sepadata, SCIP_NLROW *nlrow, SCIP_SOL *sol, SCIP_Bool rhsaggr, int *quadvar2aggr, int *nfound)
static SCIP_Real transformValue(SCIP *scip, SCIP_Real lb, SCIP_Real ub, SCIP_Real val)
SCIP_RETCODE SCIPaddPoolCut(SCIP *scip, SCIP_ROW *row)
SCIP_RETCODE SCIPsetIntParam(SCIP *scip, const char *name, int value)
#define SUBSCIP_NODELIMIT
SCIP_RETCODE SCIPcreateEmptyRowSepa(SCIP *scip, SCIP_ROW **row, SCIP_SEPA *sepa, const char *name, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool removable)
#define DEFAULT_MAXBILINTERMS
SCIP_Real SCIPgetCutEfficacy(SCIP *scip, SCIP_SOL *sol, SCIP_ROW *cut)
int SCIPgetNSols(SCIP *scip)
SCIP_RETCODE SCIPlpiSolvePrimal(SCIP_LPI *lpi)
#define BMScopyMemoryArray(ptr, source, num)
static SCIP_RETCODE nlrowaggrCreate(SCIP *scip, SCIP_NLROW *nlrow, SCIP_NLROWAGGR **nlrowaggr, int *quadvar2aggr, int nfound, SCIP_Bool rhsaggr)
static SCIP_RETCODE isCandidate(SCIP *scip, SCIP_SEPADATA *sepadata, SCIP_NLROW *nlrow, SCIP_Bool *rhscandidate, SCIP_Bool *lhscandidate)
SCIP_RETCODE SCIPlpiAddRows(SCIP_LPI *lpi, int nrows, const SCIP_Real *lhs, const SCIP_Real *rhs, char **rownames, int nnonz, const int *beg, const int *ind, const SCIP_Real *val)
SCIP_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPgetRowSolActivity(SCIP *scip, SCIP_ROW *row, SCIP_SOL *sol)
static SCIP_RETCODE nlrowaggrStoreLinearTerms(SCIP *scip, SCIP_NLROWAGGR *nlrowaggr, SCIP_VAR **linvars, SCIP_Real *lincoefs, int nlinvars)
#define BMSclearMemory(ptr)
int SCIProwGetRank(SCIP_ROW *row)
int SCIPgetNVars(SCIP *scip)
SCIP_EXPRTREE * SCIPnlrowGetExprtree(SCIP_NLROW *nlrow)
static SCIP_RETCODE nlrowaggrFree(SCIP *scip, SCIP_NLROWAGGR **nlrowaggr)
SCIP_RETCODE SCIPlpiChgBounds(SCIP_LPI *lpi, int ncols, const int *ind, const SCIP_Real *lb, const SCIP_Real *ub)
Constraint handler for XOR constraints, .
SCIP_RETCODE SCIPreleaseRow(SCIP *scip, SCIP_ROW **row)
#define CLIQUE_BACKTRACKFREQ
static SCIP_RETCODE addLinearTermToCut(SCIP *scip, SCIP_SOL *sol, SCIP_ROW *cut, SCIP_VAR *x, SCIP_Real coeff, SCIP_Real *cutconstant, SCIP_Real *cutactivity, SCIP_Bool *success)
SCIP_RETCODE SCIPsetSepaFree(SCIP *scip, SCIP_SEPA *sepa, SCIP_DECL_SEPAFREE((*sepafree)))
SCIP_SOL * SCIPgetBestSol(SCIP *scip)
SCIP_Bool SCIPisGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
static SCIP_RETCODE createLP(SCIP *scip, SCIP_SEPADATA *sepadata)
SCIP_RETCODE SCIPaddVar(SCIP *scip, SCIP_VAR *var)
static SCIP_RETCODE findAndStoreEcAggregations(SCIP *scip, SCIP_SEPADATA *sepadata, SCIP_NLROW *nlrow, SCIP_SOL *sol)
#define DEFAULT_MAXROUNDSROOT
SCIP_RETCODE SCIPlpiCreate(SCIP_LPI **lpi, SCIP_MESSAGEHDLR *messagehdlr, const char *name, SCIP_OBJSEN objsen)
SCIP_RETCODE SCIPreleaseCons(SCIP *scip, SCIP_CONS **cons)
SCIP_VAR ** SCIPgetVars(SCIP *scip)
#define DEFAULT_DYNAMICCUTS
SCIP_Bool SCIPisStopped(SCIP *scip)
static SCIP_DECL_SEPAEXECLP(sepaExeclpEccuts)
static SCIP_DECL_SEPAFREE(sepaFreeEccuts)
SCIP_RETCODE SCIPprintRow(SCIP *scip, SCIP_ROW *row, FILE *file)
int SCIPvarGetIndex(SCIP_VAR *var)
SCIP_Real SCIPgetTotalTime(SCIP *scip)
static SCIP_RETCODE sepadataCreate(SCIP *scip, SCIP_SEPADATA **sepadata)
static SCIP_Real evalCorner(SCIP_ECAGGR *ecaggr, int k)
SCIP_Bool SCIPisZero(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Real * SCIPnlrowGetLinearCoefs(SCIP_NLROW *nlrow)
TCLIQUE_Bool tcliqueFlush(TCLIQUE_GRAPH *tcliquegraph)
static SCIP_RETCODE computeCut(SCIP *scip, SCIP_SEPA *sepa, SCIP_SEPADATA *sepadata, SCIP_NLROWAGGR *nlrowaggr, SCIP_SOL *sol, SCIP_Bool *separated, SCIP_Bool *cutoff)
SCIP_Real SCIPvarGetUbLocal(SCIP_VAR *var)
#define SCIPfreeBlockMemoryArrayNull(scip, ptr, num)
#define DEFAULT_MINAGGRSIZE
SCIP_VAR ** SCIPnlrowGetLinearVars(SCIP_NLROW *nlrow)
SCIP_RETCODE SCIPhashmapInsert(SCIP_HASHMAP *hashmap, void *origin, void *image)
#define BMSclearMemoryArray(ptr, num)
SCIP_Real SCIPnlrowGetConstant(SCIP_NLROW *nlrow)
static SCIP_RETCODE ecaggrAddBilinTerm(SCIP *scip, SCIP_ECAGGR *ecaggr, SCIP_VAR *x, SCIP_VAR *y, SCIP_Real coef)
SCIP_Real SCIPnlrowGetLhs(SCIP_NLROW *nlrow)
static const int poweroftwo[]
SCIP_Bool SCIPvarIsIntegral(SCIP_VAR *var)
#define DEFAULT_MAXROUNDS
#define SEPA_MAXBOUNDDIST
SCIP_Real SCIPgetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var)
SCIP_RETCODE SCIPaddRealParam(SCIP *scip, const char *name, const char *desc, SCIP_Real *valueptr, SCIP_Bool isadvanced, SCIP_Real defaultvalue, SCIP_Real minvalue, SCIP_Real maxvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
static SCIP_RETCODE ecaggrAddQuadvar(SCIP_ECAGGR *ecaggr, SCIP_VAR *x)
static SCIP_RETCODE updateMIP(SCIP *subscip, SCIP_NLROW *nlrow, SCIP_VAR **forwardarcs, SCIP_VAR **backwardarcs, int *quadvar2aggr, int *nedges)
SCIP_RETCODE SCIPsetLongintParam(SCIP *scip, const char *name, SCIP_Longint value)
struct SCIP_SepaData SCIP_SEPADATA
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 SCIPfree(SCIP **scip)
void SCIPaddSquareLinearization(SCIP *scip, SCIP_Real sqrcoef, SCIP_Real refpoint, SCIP_Bool isint, SCIP_Real *lincoef, SCIP_Real *linconstant, SCIP_Bool *success)
static SCIP_Bool checkRikun(SCIP *scip, SCIP_ECAGGR *ecaggr, SCIP_Real *fvals, SCIP_Real *facet)
SCIP_RETCODE SCIPprintSol(SCIP *scip, SCIP_SOL *sol, FILE *file, SCIP_Bool printzeros)