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);
1210 tcliqueMaxClique(tcliqueGetNNodes, tcliqueGetWeights, tcliqueIsEdge, tcliqueSelectAdjnodes, graph, NULL, NULL,
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 )
1307 assert(subscip != NULL);
1308 assert(quadvar2aggr != NULL);
1309 assert(nfound != NULL);
1330 quadvar2aggr[i] = -1;
1336 SCIP_CALL(
createMIP(scip, subscip, sepadata, nlrow, rhsaggr, forwardarcs, backwardarcs, nodeweights, &nedges) );
1337 assert(nedges >= 0);
1338 SCIPdebugMsg(scip,
"nedges (without loops) = %d\n", nedges);
1351 if( nedges < sepadata->minaggrsize )
1358 if( timelimit <= 0.0 )
1360 SCIPdebugMsg(scip,
"skip aggregation search since no time left\n");
1393 assert(graph != NULL);
1402 assert(foundclique);
1413 SCIPdebugMsg(scip,
"did not find a clique to exclude -> leave aggregation search\n");
1419 if( nunsucces >= sepadata->maxstallrounds && *nfound == 0 )
1421 SCIPdebugMsg(scip,
"did not find an e.c. aggregation for %d iterations\n", nunsucces);
1433 for( i = 0; i < nquadvars; ++i )
1444 for( i = 0; i < nquadelems; ++i )
1488 retcode =
doSeachEcAggr(scip, subscip, sepadata, nlrow, sol, rhsaggr, quadvar2aggr, nfound);
1512 int ninterestingnodes;
1517 assert(rhscandidate != NULL);
1518 assert(lhscandidate != NULL);
1520 *rhscandidate =
TRUE;
1521 *lhscandidate =
TRUE;
1527 *rhscandidate =
FALSE;
1528 *lhscandidate =
FALSE;
1534 *rhscandidate =
FALSE;
1536 *lhscandidate =
FALSE;
1541 ninterestingnodes = 0;
1556 if( quadelem->
idx1 != quadelem->
idx2 1560 ++degrees[quadelem->
idx1];
1561 ++degrees[quadelem->
idx2];
1564 if( degrees[quadelem->
idx1] == 2 )
1565 ++ninterestingnodes;
1566 if( degrees[quadelem->
idx2] == 2 )
1567 ++ninterestingnodes;
1576 SCIPdebugMsg(scip,
"nlrow contains: %d edges\n", nposedges + nnegedges);
1579 if( nposedges + nnegedges > sepadata->maxbilinterms || nposedges + nnegedges < sepadata->minaggrsize
1580 || ninterestingnodes < sepadata->minaggrsize )
1582 *rhscandidate =
FALSE;
1583 *lhscandidate =
FALSE;
1588 if( nposedges == 0 || (nposedges + nnegedges == 3 && (nposedges % 2) == 0) )
1589 *rhscandidate =
FALSE;
1590 if( nnegedges == 0 || (nposedges + nnegedges == 3 && (nnegedges % 2) == 0) )
1591 *lhscandidate =
FALSE;
1609 assert(scip != NULL);
1610 assert(nlrow != NULL);
1611 assert(sepadata != NULL);
1616 SCIPdebugMsg(scip,
"search for edge-concave aggregation for the nonlinear row: \n");
1622 SCIPdebugMsg(scip,
"rhs candidate = %u lhs candidate = %u\n", rhscandidate, lhscandidate);
1638 assert(nlrow != NULL);
1639 SCIPdebug(nlrowaggrPrint(scip, nlrowaggr));
1658 assert(nlrow != NULL);
1659 SCIPdebug(nlrowaggrPrint(scip, nlrowaggr));
1685 SCIPdebugMsg(scip,
"print facet (val=%e): ", facetval);
1686 for( i = 0; i <
nvars; ++i )
1707 unsigned int ncorner;
1710 assert(scip != NULL);
1711 assert(ecaggr != NULL);
1712 assert(fvals != NULL);
1713 assert(facet != NULL);
1719 val = facet[ecaggr->
nvars];
1720 for( i = 0; i < (
unsigned int) ecaggr->
nvars; ++i )
1724 maxviolation =
MAX(val - fvals[0], maxviolation);
1728 for( i = 1; i < ncorner; ++i )
1734 gray = i ^ (i >> 1);
1739 while( (diff >>= 1) != 0 )
1749 maxviolation =
MAX(val - fvals[gray], maxviolation);
1755 SCIPdebugMsg(scip,
"maximum violation of facet: %2.8e\n", maxviolation);
1762 facet[ecaggr->
nvars] -= maxviolation;
1786 assert(scip != NULL);
1787 assert(sepadata != NULL);
1788 assert(sepadata->nnlrowaggrs > 0);
1791 if( sepadata->lpi != NULL && sepadata->lpisize >= sepadata->maxecsize )
1795 if( sepadata->lpi != NULL )
1798 sepadata->lpi = NULL;
1801 assert(sepadata->lpi == NULL);
1803 sepadata->lpisize = sepadata->maxecsize;
1805 nrows = sepadata->maxecsize + 1;
1807 nnonz = (ncols * (nrows + 1)) / 2;
1819 for( i = 0; i < ncols; ++i )
1828 SCIPdebugMsg(scip,
"col %i starts at position %d\n", i, k);
1841 SCIPdebugMsg(scip,
" val[%d][%d] = 1 (position %d)\n", row, i, k);
1855 SCIPdebugMsg(scip,
" val[%d][%d] = 1 (position %d)\n", nrows - 1, i, k);
1864 assert(nrows <= ncols);
1889 assert(ecaggr != NULL);
1894 for( i = 0; i < ecaggr->
nterms; ++i )
1905 assert(idx1 >= 0 && idx1 < ecaggr->
nvars);
1906 assert(idx2 >= 0 && idx2 < ecaggr->nvars);
1911 val += coef * bound1 * bound2;
1926 assert(scip != NULL);
1936 val = (val - lb) / (ub - lb);
1937 assert(val >= 0.0 && val <= 1.0);
1985 assert(scip != NULL);
1986 assert(sepadata != NULL);
1987 assert(ecaggr != NULL);
1988 assert(facet != NULL);
1989 assert(facetval != NULL);
1990 assert(success != NULL);
1991 assert(ecaggr->
nvars <= sepadata->maxecsize);
1999 assert(sepadata->lpi != NULL);
2000 assert(sepadata->lpisize >= ecaggr->
nvars);
2006 assert(ncorner <= ncols);
2007 assert(ecaggr->
nvars + 1 <= nrows);
2008 assert(nrows <= ncols);
2021 for( i = 0; i < ncols; ++i )
2023 fvals[i] = i < ncorner ?
evalCorner(ecaggr, i) : 0.0;
2028 ub[i] = i < ncorner ? 1.0 : 0.0;
2029 SCIPdebugMsg(scip,
"bounds of LP col %d = [%e, %e]; obj = %e\n", i, lb[i], ub[i], fvals[i]);
2033 perturbation = 0.001;
2034 for( i = 0; i < nrows; ++i )
2037 if( i < ecaggr->
nvars )
2041 x = ecaggr->
vars[i];
2047 side[i] += side[i] > perturbation ? -perturbation : perturbation;
2048 perturbation /= 1.2;
2052 side[i] = (i == nrows - 1) ? 1.0 : 0.0;
2055 SCIPdebugMsg(scip,
"LP row %d in [%e, %e]\n", i, side[i], side[i]);
2084 if( ecaggr->
nvars + 1 == ncols )
2097 for( i = 0; i < ecaggr->
nvars; ++i )
2098 facet[i] = dualsol[i];
2101 facet[ecaggr->
nvars] = dualsol[nrows - 1];
2107 SCIPdebugMsg(scip,
"facet for the transformed problem: ");
2108 for( i = 0; i < ecaggr->
nvars; ++i )
2127 for( i = 0; i < ecaggr->
nvars; ++i )
2134 assert(!
SCIPisEQ(scip, varlb, varub));
2137 facet[ecaggr->
nvars] -= (facet[i] * varlb) / (varub - varlb);
2140 facet[i] = facet[i] / (varub - varlb);
2147 *facetval += facet[ecaggr->
nvars];
2156 SCIPdebugMsg(scip,
"facet pass the check of Rikun et al.\n");
2186 assert(cut != NULL);
2187 assert(facet != NULL);
2188 assert(vars != NULL);
2190 assert(cutconstant != NULL);
2191 assert(cutactivity != NULL);
2192 assert(success != NULL);
2196 for( i = 0; i <
nvars; ++i )
2210 *cutconstant += facet[i] *
SCIPgetSolVal(scip, sol, vars[i]);
2211 *cutactivity += facet[i] *
SCIPgetSolVal(scip, sol, vars[i]);
2215 *cutactivity += facet[i] *
SCIPgetSolVal(scip, sol, vars[i]);
2222 *cutconstant += facet[
nvars];
2223 *cutactivity += facet[
nvars];
2243 assert(cut != NULL);
2247 assert(cutconstant != NULL);
2248 assert(cutactivity != NULL);
2249 assert(success != NULL);
2265 *cutconstant += activity;
2274 *cutactivity += activity;
2295 assert(cut != NULL);
2299 assert(cutconstant != NULL);
2300 assert(cutactivity != NULL);
2301 assert(success != NULL);
2340 *cutactivity += lincoef * refpoint + linconst;
2341 *cutconstant += linconst;
2374 *cutactivity += lincoefx * refpointx + lincoefy * refpointy + linconst;
2375 *cutconstant += linconst;
2414 assert(separated != NULL);
2415 assert(cutoff != NULL);
2416 assert(nlrowaggr->
necaggr > 0);
2417 assert(nlrowaggr->
nlrow != NULL);
2427 sepadata->dynamiccuts) );
2435 bestfacetsize = sepadata->maxaggrsize + 1;
2451 for( i = 0; i < nlrowaggr->
necaggr; ++i )
2456 ecaggr = nlrowaggr->
ecaggr[i];
2457 assert(ecaggr != NULL);
2462 SCIPdebugMsg(scip,
"found facet for edge-concave aggregation %d/%d ? %s\n", i, nlrowaggr->
necaggr,
2463 found ?
"yes" :
"no");
2467 printFacet(scip, ecaggr->
vars, ecaggr->
nvars, bestfacet, bestfacetval);
2483 for( i = 0; i < nlrowaggr->
nremterms; ++i )
2502 for( i = 0; i < nlrowaggr->
nlinvars; ++i )
2519 SCIPdebugMsg(scip,
"cut activity = %e rhs(nlrow) = %e\n", cutactivity, nlrowaggr->
rhs);
2532 SCIPdebugMsg(scip,
"EC cut <%s>: act=%f eff=%f rank=%d range=%e\n",
2541 if(
SCIPisGE(scip, cutactivity - nlrowaggr->
rhs, sepadata->minviolation) )
2548 if( !(*cutoff) && !islocalcut )
2575 assert(scip != NULL);
2576 assert(nlrowaggr != NULL);
2584 for( i = 0; i < nlrowaggr->
nquadvars; ++i )
2587 assert(var != NULL);
2593 SCIPdebugMsg(scip,
"nlrow aggregation contains unbounded variables\n");
2600 SCIPdebugMsg(scip,
"nlrow aggregation contains fixed variables in an e.c. aggregation\n");
2627 if( sepadata->nnlrowaggrs == 0 )
2629 SCIPdebugMsg(scip,
"no aggregations exists -> skip call\n");
2634 nmaxcuts =
SCIPgetDepth(scip) == 0 ? sepadata->maxsepacutsroot : sepadata->maxsepacuts;
2638 for( i = 0; i < sepadata->nnlrowaggrs && ncuts < nmaxcuts && !
SCIPisStopped(scip); ++i )
2644 nlrowaggr = sepadata->nlrowaggrs[i];
2645 assert(nlrowaggr != NULL);
2653 SCIPdebugMsg(scip,
"try to compute a cut for nonlinear row aggregation %d\n", i);
2657 SCIPdebugMsg(scip,
"found a cut: %s cutoff: %s\n", separated ?
"yes" :
"no", cutoff ?
"yes" :
"no");
2687 assert(scip != NULL);
2688 assert(sepa != NULL);
2704 assert(sepadata != NULL);
2719 assert(sepadata != NULL);
2722 #ifdef SCIP_STATISTIC 2732 sepadata->searchedforaggr =
FALSE;
2748 assert(sepadata != NULL);
2756 if( sepadata->maxaggrsize < sepadata->minaggrsize )
2766 SCIPdebugMsg(scip,
"Skip since NLP is not constructed yet.\n");
2773 if ( sepadata->maxdepth >= 0 && depth > sepadata->maxdepth )
2778 if ( (depth == 0 && sepadata->maxroundsroot >= 0 && ncalls >= sepadata->maxroundsroot)
2779 || (depth > 0 && sepadata->maxrounds >= 0 && ncalls >= sepadata->maxrounds) )
2783 if( !sepadata->searchedforaggr )
2789 SCIPdebugMsg(scip,
"search for nonlinear row aggregations\n");
2795 sepadata->searchedforaggr =
TRUE;
2825 assert(sepa != NULL);
2835 "should generated cuts be removed from the LP if they are no longer tight?",
2840 "maximal number of eccuts separation rounds per node (-1: unlimited)",
2844 "separating/" SEPA_NAME "/maxroundsroot",
2845 "maximal number of eccuts separation rounds in the root node (-1: unlimited)",
2850 "maximal depth at which the separator is applied (-1: unlimited)",
2855 "maximal number of edge-concave cuts separated per separation round",
2859 "separating/" SEPA_NAME "/maxsepacutsroot",
2860 "maximal number of edge-concave cuts separated per separation round in the root node",
2864 "maximal coef. range of a cut (max coef. divided by min coef.) in order to be added to LP relaxation",
2868 "minimal violation of an edge-concave cut to be separated",
2873 "search for edge-concave aggregations of at least this size",
2878 "search for edge-concave aggregations of at most this size",
2882 "separating/" SEPA_NAME "/maxbilinterms",
2883 "maximum number of bilinear terms allowed to be in a quadratic constraint",
2887 "separating/" SEPA_NAME "/maxstallrounds",
2888 "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)
SCIP_RETCODE SCIPlpiGetNRows(SCIP_LPI *lpi, int *nrows)
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)
SCIP_RETCODE SCIPlpiFree(SCIP_LPI **lpi)
#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)
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)
SCIP_RETCODE SCIPlpiGetSol(SCIP_LPI *lpi, SCIP_Real *objval, SCIP_Real *primsol, SCIP_Real *dualsol, SCIP_Real *activity, SCIP_Real *redcost)
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)
SCIP_RETCODE SCIPlpiSolvePrimal(SCIP_LPI *lpi)
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)
#define SCIP_CALL_FINALLY(x, y)
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)
SCIP_RETCODE SCIPlpiChgSides(SCIP_LPI *lpi, int nrows, const int *ind, const SCIP_Real *lhs, const SCIP_Real *rhs)
#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)
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
#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)
SCIP_RETCODE SCIPlpiGetNCols(SCIP_LPI *lpi, int *ncols)
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)
#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 SCIPlpiCreate(SCIP_LPI **lpi, SCIP_MESSAGEHDLR *messagehdlr, const char *name, SCIP_OBJSEN objsen)
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_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)
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)
SCIP_RETCODE SCIPlpiSolveDual(SCIP_LPI *lpi)
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 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 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)
static SCIP_RETCODE doSeachEcAggr(SCIP *scip, SCIP *subscip, SCIP_SEPADATA *sepadata, SCIP_NLROW *nlrow, SCIP_SOL *sol, SCIP_Bool rhsaggr, int *quadvar2aggr, int *nfound)
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)
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 SCIPaddRow(SCIP *scip, SCIP_ROW *row, 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)
#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)
#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_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)
SCIP_RETCODE SCIPlpiChgBounds(SCIP_LPI *lpi, int ncols, const int *ind, const SCIP_Real *lb, const SCIP_Real *ub)
int SCIPgetNVars(SCIP *scip)
SCIP_EXPRTREE * SCIPnlrowGetExprtree(SCIP_NLROW *nlrow)
static SCIP_RETCODE nlrowaggrFree(SCIP *scip, SCIP_NLROWAGGR **nlrowaggr)
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 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_RETCODE SCIPlpiChgObj(SCIP_LPI *lpi, int ncols, const int *ind, const SCIP_Real *obj)
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)