45#ifdef INTERCUTS_VERBOSE
50#define INTERLOG(x) if( SCIPgetSubscipDepth(scip) == 0 && SCIPgetVerbLevel(scip) >= SCIP_VERBLEVEL_NORMAL ) { x }
65#define NLHDLR_NAME "quadratic"
66#define NLHDLR_DESC "handler for quadratic expressions"
67#define NLHDLR_DETECTPRIORITY 1
68#define NLHDLR_ENFOPRIORITY 100
71#define TABLE_NAME_QUADRATIC "nlhdlr_quadratic"
72#define TABLE_DESC_QUADRATIC "quadratic nlhdlr statistics table"
73#define TABLE_POSITION_QUADRATIC 14700
74#define TABLE_EARLIEST_STAGE_QUADRATIC SCIP_STAGE_TRANSFORMED
77#define INTERCUTS_MINVIOL 1e-4
78#define DEFAULT_USEINTERCUTS FALSE
79#define DEFAULT_USESTRENGTH FALSE
80#define DEFAULT_USEMONOIDAL TRUE
81#define DEFAULT_USEMINREP TRUE
82#define DEFAULT_USEBOUNDS FALSE
83#define BINSEARCH_MAXITERS 120
84#define DEFAULT_NCUTSROOT 20
85#define DEFAULT_NCUTS 2
92struct SCIP_NlhdlrExprData
105 int nneginfinityquadact;
106 int nposinfinityquadact;
119struct SCIP_NlhdlrData
146 int ncouldimprovedcoef;
147 int nbadrayrestriction;
198 SCIPinfoMessage(
scip, file,
"Quadratic Nlhdlr : %10s %10s %10s %10s %10s %10s %10s %10s %10s %10s %20s %10s %10s %10s \n",
"GenCuts",
"AddCuts",
"CouldImpr",
"NLargeRE",
199 "AbrtBadRay",
"AbrtPosPhi",
"AbrtNonBas",
"NStrength",
"NMonoidal",
"AveCutcoef",
"AveMonoidalImprov",
"AveDensity",
"AveEfficacy",
"AveBCutsFrac");
210 SCIPinfoMessage(
scip, file,
" %10g", nlhdlrdata->ncutsgenerated > 0 ? nlhdlrdata->cutcoefsum / nlhdlrdata->ncutsgenerated : 0.0);
211 SCIPinfoMessage(
scip, file,
" %20g", (nlhdlrdata->nmonoidal > 0 && nlhdlrdata->trackmore) ? nlhdlrdata->monoidalimprovementsum / nlhdlrdata->nmonoidal : -1.0);
212 SCIPinfoMessage(
scip, file,
" %10g", nlhdlrdata->ncutsgenerated > 0 ? nlhdlrdata->densitysum / nlhdlrdata->ncutsgenerated : 0.0);
213 SCIPinfoMessage(
scip, file,
" %10g", nlhdlrdata->ncutsgenerated > 0 ? nlhdlrdata->efficacysum / nlhdlrdata->ncutsgenerated : 0.0);
214 SCIPinfoMessage(
scip, file,
" %10g", nlhdlrdata->ncalls > 0 ? nlhdlrdata->nboundcuts / nlhdlrdata->ncalls : 0.0);
256 nlhdlrdata->ncutsgenerated > 0 ? nlhdlrdata->cutcoefsum / nlhdlrdata->ncutsgenerated : 0.0) );
259 (nlhdlrdata->nmonoidal > 0 && nlhdlrdata->trackmore) ? nlhdlrdata->monoidalimprovementsum / nlhdlrdata->nmonoidal : -1.0) );
262 nlhdlrdata->ncutsgenerated > 0 ? nlhdlrdata->densitysum / nlhdlrdata->ncutsgenerated : 0.0) );
265 nlhdlrdata->ncutsgenerated > 0 ? nlhdlrdata->efficacysum / nlhdlrdata->ncutsgenerated : 0.0) );
268 nlhdlrdata->ncalls > 0 ? nlhdlrdata->nboundcuts / nlhdlrdata->ncalls : 0.0) );
290#ifdef DEBUG_INTERCUTS_NUMERICS
334#ifdef DEBUG_INTERCUTS_NUMERICS
364 for(
i = 0;
i < nnonz;
i++ )
389 for(
i = 0;
i < nrows; ++
i )
391 if( basisind[
i] >= 0 )
392 map[basisind[
i]] =
i;
418 qexpr = nlhdlrexprdata->qexpr;
422 for(
i = 0;
i < nquadexprs; ++
i )
439 for(
i = 0;
i < nlinexprs; ++
i )
484 int* basicvarpos2tableaurow,
500 assert(nbasiccol < raylength);
513 assert(basicvarpos2tableaurow[lppos] >= 0);
519 for(
i = 0;
i < ncols; ++
i )
522 tableaurows[nbasiccol + nray * raylength] = binvarow[
i];
525 for( ;
i < ncols + nrows; ++
i )
528 tableaurows[nbasiccol + nray * raylength] = binvrow[
i - ncols];
554 int* rayentry2conspos
562 int* basicvarpos2tableaurow;
577 for(
i = 0;
i < ncols; ++
i )
578 basicvarpos2tableaurow[
i] = -1;
581 qexpr = nlhdlrexprdata->qexpr;
586 for(
i = 0;
i < nquadexprs; ++
i )
597 rayentry2conspos[nrayentries] =
i;
602 for(
i = 0;
i < nlinexprs; ++
i )
610 rayentry2conspos[nrayentries] = nquadexprs +
i;
623 rayentry2conspos[nrayentries] = nquadexprs + nlinexprs;
627 assert(nrayentries == raylength);
629#ifdef DEBUG_INTERSECTIONCUT
630 for(
i = 0;
i < ncols; ++
i )
633 for(
int j = 0; j < raylength; ++j )
662 (*rays)->raysbegin[0] = 0;
686 (*rays)->raysbegin[0] = 0;
688 (*rays)->rayssize = size;
722 if(
rays->rayssize <= coefpos + 1 )
729 rays->rayssize = newsize;
733 rays->rays[coefpos] = coef;
734 rays->raysidx[coefpos] = coefidx;
758 qexpr = nlhdlrexprdata->qexpr;
762 for(
i = 0;
i < nquadexprs; ++
i )
771 for(
i = 0;
i < nlinexprs; ++
i )
774 map[lppos] = nquadexprs +
i;
780 map[lppos] = nquadexprs + nlinexprs;
792 int* rayentry2conspos,
805 for(
i = 0;
i < raylength; ++
i )
810 if( factor == 0.0 && !
SCIPisZero(
scip, densetableaucols[nray * raylength +
i]) )
816 coef = factor * densetableaucols[nray * raylength +
i];
828 if( conspos > -1 && conspos < rayentry2conspos[
i] )
833#ifdef DEBUG_INTERSECTIONCUT
854#ifdef DEBUG_INTERSECTIONCUT
863 rays->raysbegin[
rays->nrays + 1] = *nnonz;
865#ifdef DEBUG_INTERSECTIONCUT
867 for(
i =
rays->raysbegin[
rays->nrays];
i < *nnonz; ++
i )
924 int* rayentry2conspos;
941 SCIPdebugMsg(
scip,
"failed to store sparse rays: there is a var with base status zero\n");
950 densetableaucols, rayentry2conspos) );
954 for(
i = 0;
i < ncols; ++
i )
955 lppos2conspos[
i] = -1;
968 for(
i = 0;
i < ncols; ++
i )
970 int oldnnonz = nnonz;
989#ifdef DEBUG_INTERSECTIONCUT
990 SCIPinfoMessage(
scip,
NULL,
"looked at ray of var %s with basestat %d, it has %d nonzeros\n-----------------\n",
995#ifdef DEBUG_INTERSECTIONCUT
996 SCIPdebugMsg(
scip,
"nonzero ray associated with variable <%s> has base status zero -> abort storing rays\n",
1003 assert(oldnnonz <= nnonz);
1004 if( oldnnonz < nnonz )
1014 for(
i = 0;
i < nrows; ++
i )
1016 int oldnnonz = nnonz;
1036#ifdef DEBUG_INTERSECTIONCUT
1037 SCIPinfoMessage(
scip,
NULL,
"looked at ray of row %d, it has %d nonzeros\n-----------------\n",
i, nnonz - oldnnonz);
1039 assert(oldnnonz <= nnonz);
1040 if( oldnnonz < nnonz )
1135 assert(sidefactor == 1.0 || sidefactor == -1.0);
1138 qexpr = nlhdlrexprdata->qexpr;
1145 if( nlhdlrexprdata->cons !=
NULL )
1149 constant = (sidefactor * constant);
1155 for(
i = 0;
i < nquadexprs; ++
i )
1161 offset =
i * nquadexprs;
1166 for( j = 0; j < nquadexprs; ++j )
1173 vdotb += (sidefactor * lincoef) * eigenvectors[offset + j];
1175#ifdef INTERCUT_MOREDEBUG
1176 printf(
"vdotb: offset %d, eigenvector %d = %g, lincoef quad %g\n", offset, j,
1177 eigenvectors[offset + j], lincoef);
1187 *kappa +=
SQR(vdotb) / (sidefactor * eigenvalues[
i]);
1192 for( j = 0; j < nquadexprs; ++j )
1193 wcoefs[j] += vdotb * eigenvectors[offset + j];
1195 *wzlp += vdotb * vdotzlp;
1207 for(
i = 0;
i < nlinexprs; ++
i )
1211 if( auxvar !=
NULL )
1216#ifdef DEBUG_INTERSECTIONCUT
1219 for(
i = 0;
i < nquadexprs; ++
i )
1242 for(
i = 0;
i < raynnonz; ++
i )
1245 if( rayidx[
i] >= nquadvars )
1248 retval += eigenvec[rayidx[
i]] * raycoefs[
i];
1276#ifdef INTERCUT_MOREDEBUG
1277 printf(
"Computing w(ray) \n");
1280 start = raynnonz - 1;
1282 qexpr = nlhdlrexprdata->qexpr;
1286 if( rayidx[raynnonz - 1] == nquadexprs + nlinexprs )
1288#ifdef INTERCUT_MOREDEBUG
1289 printf(
"wray auxvar term %g \n", (sidefactor * -1.0) * raycoefs[raynnonz - 1]);
1291 retval += (sidefactor * -1.0) * raycoefs[raynnonz - 1];
1296 for(
i = start;
i >= 0; --
i )
1299 if( rayidx[
i] < nquadexprs )
1302#ifdef INTERCUT_MOREDEBUG
1303 printf(
"wray var in pos %d term %g:: lincoef %g raycoef %g\n", rayidx[
i], (sidefactor *
1304 lincoefs[rayidx[
i] - nquadexprs]) * raycoefs[
i], lincoefs[rayidx[
i] - nquadexprs] ,raycoefs[
i]);
1306 retval += (sidefactor * lincoefs[rayidx[
i] - nquadexprs]) * raycoefs[
i] ;
1332 qexpr = nlhdlrexprdata->qexpr;
1335 for(
i = 0;
i < nquadexprs; ++
i )
1343 offset =
i * nquadexprs;
1349 for( j = 0; j < nquadexprs; ++j )
1354 if( k < raynnonz && j == rayidx[k] )
1356 rayentry = raycoefs[k];
1362 vdotray += rayentry * eigenvectors[offset + j];
1363 vdotapex += apex[j] * eigenvectors[offset + j];
1367 vapex[
i] = vdotapex;
1415 qexpr = nlhdlrexprdata->qexpr;
1418#ifdef DEBUG_INTERSECTIONCUT
1440 for(
i = 0;
i < nquadexprs; ++
i )
1445 eigval = sidefactor * eigenvalues[
i];
1450 dot = vzlp[
i] + vb[
i] / (2.0 * eigval);
1454 *d += eigval * dot * (vzlp[
i] - vapex[
i]);
1455 *e += eigval * dot * (vray[
i] + vapex[
i] + vb[
i] / (2.0 * eigval));
1456 norm += eigval *
SQR(dot);
1460 *
a -= eigval *
SQR(vzlp[
i] - vapex[
i]);
1461 *
b -= eigval * (vzlp[
i] - vapex[
i]) * (vray[
i] + vapex[
i] + vb[
i] / (2.0 * eigval));
1462 *
c -= eigval *
SQR(vray[
i] + vapex[
i] + vb[
i] / (2.0 * eigval));
1466 norm = sqrt(norm / kappa + 1.0);
1470 *d /= (kappa * norm);
1471 *e /= (kappa * norm);
1477 if( sqrt(*
c) - *e >= 0 )
1480 assert(sqrt(*
c) > 10e+15 || *e > 10e+15 || sqrt(*
c) - *e < 10e+9);
1482 INTERLOG(printf(
"Bad numerics: phi(0) >= 0\n"); )
1487#ifdef DEBUG_INTERSECTIONCUT
1488 SCIPinfoMessage(
scip,
NULL,
"Restriction yields case 2: a,b,c,d,e %g %g %g %g %g\n", coefs1234a[0], coefs1234a[1], coefs1234a[2],
1489 coefs1234a[3], coefs1234a[4]);
1550 qexpr = nlhdlrexprdata->qexpr;
1553#ifdef DEBUG_INTERSECTIONCUT
1556 for(
i = 0;
i < raynnonz; ++
i )
1584 for(
i = 0;
i < nquadexprs; ++
i )
1591 if( wcoefs ==
NULL )
1596 dot = vzlp[
i] + vb[
i] / (2.0 * (sidefactor * eigenvalues[
i]));
1604 wray += vb[
i] * vdotray;
1605#ifdef INTERCUT_MOREDEBUG
1606 printf(
" wray += %g, vb[i] %g and vdotray %g\n", vb[
i] * vdotray,vb[
i],vdotray);
1609 else if( sidefactor * eigenvalues[
i] > 0 )
1612 *d += (sidefactor * eigenvalues[
i]) * dot * vdotray;
1613 *e += (sidefactor * eigenvalues[
i]) *
SQR( dot );
1615#ifdef INTERCUT_MOREDEBUG
1616 printf(
"Positive eigenvalue: computing D: v^T ray %g, v^T( zlp + b/theta ) %g and theta %g \n", vdotray, dot, (sidefactor * eigenvalues[
i]));
1622 *
a -= (sidefactor * eigenvalues[
i]) *
SQR( vdotray );
1623 *
b -= 2.0 * (sidefactor * eigenvalues[
i]) * dot * vdotray;
1624 *
c -= (sidefactor * eigenvalues[
i]) *
SQR( dot );
1626#ifdef INTERCUT_MOREDEBUG
1627 printf(
"Negative eigenvalue: computing A: v^T ray %g, and theta %g \n", vdotray, (sidefactor * eigenvalues[
i]));
1635 *e +=
MAX(kappa, 0.0);
1636 *
c -=
MIN(kappa, 0.0);
1649 if( sqrt(*
c) - *e >= 0 )
1652 assert(sqrt(*
c) > 10e+15 || *e > 10e+15 || sqrt(*
c) - *e < 10e+9);
1654 INTERLOG(printf(
"Bad numerics: phi(0) >= 0\n"); )
1665 norm = sqrt(1.0 +
SQR( kappa ));
1666 xextra = wzlp + kappa + norm;
1667 yextra = wzlp + kappa - norm;
1670 wray +=
computeWRayLinear(nlhdlrexprdata, sidefactor, raycoefs, rayidx, raynnonz);
1676 coefs4b[0] = (*a) * (*e);
1677 coefs4b[1] = (*b) * (*e);
1678 coefs4b[2] = (*c) * (*e);
1682 coefs4b[4] = (*e) + xextra / 2.0;
1692 coefs4b[3] = *d / sqrt(*e);
1693 coefs4b[4] = sqrt(*e) + (xextra / (2.0 * sqrt(*e)));
1700 *
a +=
SQR( wray ) / (4.0 * norm);
1701 *
b += 2.0 * yextra * (wray) / (4.0 * norm);
1702 *
c +=
SQR( yextra ) / (4.0 * norm);
1705 *e +=
SQR( xextra ) / (4.0 * norm);
1708 *d += xextra * (wray) / (4.0 * norm);
1716 coefscondition[0] = - xextra / (*e);
1717 coefscondition[1] = wray;
1718 coefscondition[2] = yextra;
1721#ifdef DEBUG_INTERSECTIONCUT
1724 SCIPinfoMessage(
scip,
NULL,
"Restriction yields case 1,2 or 3: a,b,c,d,e %g %g %g %g %g\n", coefs1234a[0], coefs1234a[1], coefs1234a[2],
1725 coefs1234a[3], coefs1234a[4]);
1730 coefs1234a[1], coefs1234a[2], coefs1234a[3], coefs1234a[4]);
1731 SCIPinfoMessage(
scip,
NULL,
" Case 4b: a,b,c,d,e %g %g %g %g %g\n", coefs4b[0], coefs4b[1], coefs4b[2],
1732 coefs4b[3], coefs4b[4]);
1734 coefscondition[1], coefscondition[2]);
1763#ifdef INTERCUTS_DBLDBL
1804 return sqrt(
a * t * t +
b * t +
c) - ( d * t + e );
1825 return (coefscondition[0] * sqrt(coefs4a[0] *
SQR( tsol ) + coefs4a[1] * tsol + coefs4a[2]) + coefscondition[1] *
1826 tsol + coefscondition[2]) <= 0.0;
1850 curr = (lb + ub) / 2.0;
1852#ifdef INTERCUT_MOREDEBUG
1853 printf(
"%d: lb,ub %.10f, %.10f. curr = %g -> phi at curr %g -> phi at lb %g \n",
i, lb, ub, curr, phival,
evalPhiAtRay(lb,
a,
b,
c, d, e));
1906 e, -(
c - e * e), bounds);
1911#ifdef INTERCUT_MOREDEBUG
1916 printf(
"got root %g: with binsearch get %g\n",
sol, binsol);
1927#ifdef INTERCUT_MOREDEBUG
1928 printf(
"interval solution returned %g -> phival = %g, believe it\n",
sol,
evalPhiAtRay(
sol,
a,
b,
c, d, e));
1929 printf(
"don't do bin search\n");
1936#ifdef INTERCUT_MOREDEBUG
1990#ifdef DEBUG_INTERSECTIONCUT
2000#ifdef DEBUG_INTERSECTIONCUT
2017 if(
isCase4a(sol1234a, coefs1234a, coefscondition) )
2020#ifdef DEBUG_INTERSECTIONCUT
2034 if( sol4b < sol1234a &&
evalPhiAtRay(1.1 * sol1234a, coefs4b[0], coefs4b[1], coefs4b[2], coefs4b[3], coefs4b[4]) <=
2036 nlhdlrdata->ncouldimprovedcoef++;
2038 return MAX(sol1234a, sol4b);
2058 if( sqrt(coefs1234a[2]) - coefs1234a[4] >= 0.0 )
2060 INTERLOG(printf(
"Bad numerics: phi(0) >= 0\n"); )
2061 nlhdlrdata->nphinonneg++;
2066 if( nlhdlrdata->ignorebadrayrestriction )
2070 for( j = 0; j < 3; ++j )
2074 absval =
REALABS(coefs1234a[j]);
2077 if( absval != 0.0 && absval < min )
2083 INTERLOG(printf(
"Bad numerics 1 2 3 or 4a: max(A,B,C)/min(A,B,C) is too large (%g)\n", max / min); )
2084 nlhdlrdata->nbadrayrestriction++;
2093 for( j = 0; j < 3; ++j )
2097 absval =
ABS(coefs4b[j]);
2100 if( absval != 0.0 && absval < min )
2106 INTERLOG(printf(
"Bad numeric 4b: max(A,B,C)/min(A,B,C) is too large (%g)\n", max / min); )
2107 nlhdlrdata->nbadrayrestriction++;
2144 qexpr = nlhdlrexprdata->qexpr;
2150 for(
i = 0;
i < nquadexprs; ++
i )
2157 dot = vray[
i] + vapex[
i] + vb[
i] / (2.0 * sidefactor * eigenvalues[
i]);
2159 *
a += sidefactor * eigenvalues[
i] *
SQR(vzlp[
i] - vapex[
i]);
2160 *
b += sidefactor * eigenvalues[
i] * (vzlp[
i] - vapex[
i]) * dot;
2161 *
c += sidefactor * eigenvalues[
i] *
SQR(dot);
2193 qexpr = nlhdlrexprdata->qexpr;
2198 for(
i = 0;
i < nquadexprs; ++
i )
2202 if( sidefactor * eigenvalues[
i] <= 0.0 )
2205 dot = vzlp[
i] + vb[
i] / (2.0 * sidefactor * eigenvalues[
i]);
2207 num += sidefactor * eigenvalues[
i] * dot * (cutcoef * (vzlp[
i] - vapex[
i]) + vray[
i] + vapex[
i]);
2208 denom += sidefactor * eigenvalues[
i] *
SQR(dot);
2218 return num / denom < 1;
2272 lb = -
b / (2.0 *
a);
2280 sol = (ub + lb) / 2.0;
2289 if( val > 0.0 && val < 1e-6 )
2292 if( val > 0.0 && lastposval > val )
2330 qexpr = nlhdlrexprdata->qexpr;
2335 for(
i = 0;
i < nquadexprs; ++
i )
2345 for( j = 0; j < nquadexprs; ++j )
2347 if( sidefactor * eigenvalues[j] == 0.0 )
2350 entry -= eigenvectors[j * nquadexprs +
i] * vb[j] / (2.0 * sidefactor * eigenvalues[j]);
2352 if( sidefactor * eigenvalues[j] > 0.0 )
2356 dot = vzlp[j] + vb[j] / (2.0 * sidefactor * eigenvalues[j]);
2358 num += eigenvectors[j * nquadexprs +
i] * dot;
2359 denom += sidefactor * eigenvalues[j] *
SQR(dot);
2372 entry += num / denom;
2428 sidefactor, &
a, &
b, &
c) );
2431 if(
SQR(
b) - (4 *
a *
c) >= 0.0 )
2437 *cutcoef =
MAX(*cutcoef, 0.0);
2440 if( !
isRayInStrip(nlhdlrexprdata, vb, vzlp, vapex, vray, kappa, sidefactor, *cutcoef) )
2532 int monoidalcounter;
2542 case2 = wcoefs ==
NULL && kappa > 0.0;
2543 monoidalwasused =
FALSE;
2546 monoidalcounter = 0;
2547 avecutcoefsum = 0.0;
2548 avemonoidalimprovsum = 0.0;
2560 computeApex(nlhdlrexprdata, vb, vzlp, kappa, sidefactor, apex, success);
2571 usemonoidal = nlhdlrdata->usemonoidal && case2;
2574 for(
i = 0;
i <
rays->nrays; ++
i )
2584 monoidalsuccess =
FALSE;
2591 &
rays->raysidx[
rays->raysbegin[
i]],
rays->raysbegin[
i + 1] -
rays->raysbegin[
i], vb, vzlp, wcoefs, kappa,
2592 apex, sidefactor, &cutcoef, &monoidalsuccess) );
2596 if( usemonoidal && ! monoidalwasused && monoidalsuccess )
2597 monoidalwasused =
TRUE;
2600 if( ! usemonoidal || ! monoidalsuccess || nlhdlrdata->trackmore )
2605 rays->raysbegin[
i], vb, vzlp, wcoefs, wzlp, kappa, coefs1234a, coefs4b, coefscondition, success) );
2619#ifdef DEBUG_INTERSECTIONCUT
2624 if( interpoints !=
NULL )
2625 interpoints[
i] = interpoint;
2629 if( nlhdlrdata->trackmore && monoidalsuccess )
2636 avemonoidalimprovsum += cutcoef / normalcutcoef;
2645 if( cutcoef == 0.0 && case2 && nlhdlrdata->useminrep )
2650 rays->raysbegin[
i], vb, vzlp, kappa, apex, coefs1234a, success) );
2661 coefs1234a[1] *= -1.0;
2662 coefs1234a[3] *= -1.0;
2673 avecutcoefsum += cutcoef;
2677 lppos =
rays->lpposray[
i];
2692 INTERLOG(printf(
"Bad numeric: now not nonbasic enough\n");)
2693 nlhdlrdata->nbadnonbasic++;
2699 if( ! nlhdlrdata->useboundsasrays )
2712 cutcoef =
rays->rays[
i] == -1 ? -cutcoef : cutcoef;
2721 nlhdlrdata->currentavecutcoef = avecutcoefsum / counter;
2722 if( monoidalwasused )
2723 nlhdlrdata->nmonoidal += 1;
2724 if( monoidalcounter > 0 )
2725 nlhdlrdata->currentavemonoidalimprovement = avemonoidalimprovsum / monoidalcounter;
2756 while( idx1 < raynnonz1 || idx2 < raynnonz2 )
2761 if( idx1 >= raynnonz1 || (idx2 < raynnonz2 && rayidx1[idx1] > rayidx2[idx2]) )
2764 newraycoefs[*newraynnonz] = - coef2 * raycoefs2[idx2];
2765 newrayidx[*newraynnonz] = rayidx2[idx2];
2769 else if( idx2 >= raynnonz2 || rayidx1[idx1] < rayidx2[idx2] )
2772 newraycoefs[*newraynnonz] = coef1 * raycoefs1[idx1];
2773 newrayidx[*newraynnonz] = rayidx1[idx1];
2778 else if( rayidx1[idx1] == rayidx2[idx2] )
2781 newraycoefs[*newraynnonz] = coef1 * raycoefs1[idx1] - coef2 * raycoefs2[idx2];
2782 newrayidx[*newraynnonz] = rayidx1[idx1];
2807 if( raynnonz1 != raynnonz2 )
2812 for(
i = 0;
i < raynnonz1; ++
i )
2815 if( rayidx1[
i] != rayidx2[
i] ||
2831 *coef = raycoefs1[
i] / raycoefs2[
i];
2871 newraynnonz = (
rays->raysbegin[
i + 1] -
rays->raysbegin[
i]) + (
rays->raysbegin[j + 1] -
rays->raysbegin[j]);
2878 rays->raysbegin[j + 1] -
rays->raysbegin[j], newraycoefs, newrayidx, &newraynnonz,
alpha,
2883 newraynnonz, vb, vzlp, wcoefs, wzlp, kappa, coefs1234a, coefs4b, coefscondition, success) );
2934 for(
i = 0;
i <
rays->nrays; ++
i )
2952 &
rays->raysidx[
rays->raysbegin[idx]],
rays->raysbegin[idx + 1] -
rays->raysbegin[idx], &coef) )
2954 currentrho = coef * interpoints[
i];
2975 alpha = (lb + ub) / 2.0;
2984 vzlp, wcoefs, wzlp, kappa,
alpha, &inreccone, success) );
3008 currentrho = (
alpha - 1) * interpoints[
i] /
alpha;
3011 if( currentrho < *rho )
3014 if( *rho < -10e+06 )
3055 *strengthsuccess =
FALSE;
3064 SCIP_CALL(
computeIntercut(
scip, nlhdlrdata, nlhdlrexprdata,
rays, sidefactor, iscase4, vb, vzlp, wcoefs, wzlp, kappa,
3065 rowprep, interpoints,
sol, success) );
3076 for(
i = 0;
i <
rays->nrays; ++
i )
3086 if( counter >= nlhdlrdata->nstrengthlimit )
3090 SCIP_CALL(
findRho(
scip, nlhdlrdata, nlhdlrexprdata,
rays,
i, sidefactor, iscase4, vb, vzlp, wcoefs, wzlp, kappa,
3091 interpoints, &rho, success));
3097 cutcoef = 1.0 / rho;
3101 avecutcoef += cutcoef;
3104 *strengthsuccess =
TRUE;
3107 lppos =
rays->lpposray[
i];
3116 -cutcoef, rows[lppos], success) );
3120 INTERLOG(printf(
"Bad numeric: row not nonbasic enough\n");)
3121 nlhdlrdata->nbadnonbasic++;
3130 cutcoef, cols[lppos]) );
3135 nlhdlrdata->cutcoefsum += avecutcoef / counter;
3210 qexpr = nlhdlrexprdata->qexpr;
3213 raylength = (auxvar ==
NULL) ? nquadexprs + nlinexprs : nquadexprs + nlinexprs + 1;
3219 rays->rayssize = raylength;
3220 rays->nrays = raylength;
3223 for(
i = 0;
i < nquadexprs; ++
i )
3233 &
rays->rays[
i], success) );
3240 for(
i = 0;
i < nlinexprs; ++
i )
3242 rays->raysbegin[
i + nquadexprs] =
i + nquadexprs;
3243 rays->raysidx[
i + nquadexprs] =
i + nquadexprs;
3247 &
rays->rays[
i + nquadexprs], success) );
3254 if( auxvar !=
NULL )
3256 rays->raysbegin[nquadexprs + nlinexprs] = nquadexprs + nlinexprs;
3257 rays->raysidx[nquadexprs + nlinexprs] = nquadexprs + nlinexprs;
3266 rays->raysbegin[raylength] = raylength;
3291 qexpr = nlhdlrexprdata->qexpr;
3298 for(
i = 0;
i < nquadexprs;
i++ )
3310 val += sqrcoef *
SQR(solval);
3313 val += quadlincoef * solval;
3317 for(
i = 0;
i < nbilinexprs;
i++ )
3330 for(
i = 0;
i < nlinexprs;
i++ )
3336 if( auxvar !=
NULL )
3344 constant = (sidefactor * constant);
3346 val = (sidefactor * val);
3349 if( val <= constant )
3386 (nlhdlrdata->ncalls++);
3388 qexpr = nlhdlrexprdata->qexpr;
3391#ifdef DEBUG_INTERSECTIONCUT
3407 sidefactor = overestimate ? -1.0 : 1.0;
3412 if( ! nlhdlrdata->useboundsasrays )
3418 INTERLOG(printf(
"Failed to get rays: there is a var with base status ZERO!\n"); )
3422 soltoseparate =
sol;
3428 if( auxvar !=
NULL )
3442 INTERLOG(printf(
"Failed to use bounds as rays: variable is unbounded!\n"); )
3453 INTERLOG(printf(
"Failed to use bounds as rays: nearest vertex is not violated!\n"); )
3460 soltoseparate = vertex;
3468 vb, vzlp, wcoefs, &wzlp, &kappa) );
3471 if( nlinexprs == 0 && auxvar ==
NULL )
3473 for(
i = 0;
i < nquadexprs; ++
i )
3474 if( wcoefs[
i] != 0.0 )
3477 if(
i == nquadexprs )
3486 if( nlhdlrdata->usestrengthening )
3491 wzlp, kappa, rowprep, soltoseparate, success, &strengthsuccess) );
3493 if( *success && strengthsuccess )
3494 nlhdlrdata->nstrengthenings++;
3498 SCIP_CALL(
computeIntercut(
scip, nlhdlrdata, nlhdlrexprdata,
rays, sidefactor, iscase4, vb, vzlp, wcoefs, wzlp, kappa,
3499 rowprep,
NULL, soltoseparate, success) );
3507 if( nlhdlrdata->useboundsasrays )
3533 for(
i = 0;
i < nquadexprs; ++
i )
3541 if( (lincoef != 0.0) + (sqrcoef != 0.0) + nadjbilin >= 2 )
3568 return (lincoef != 0.0) + (sqrcoef != 0.0) + nadjbilin >= 2;
3681 cand1 =
a/x1 + cneg*x1;
3682 cand2 =
a/x2 + cneg*x2;
3685 return MAX(cand1, cand2);
3710 if(
a >= 0.0 ||
c <= 0.0 )
3735 return -negunresmax;
3742 return MAX(boundarymax, -negunresmax);
3767 if( exprdom.
inf <= 0.0 && 0.0 <= exprdom.
sup )
3774 if( exprdom.
sup < 0 )
3807 if( nlinexprs == 0 )
3813 for(
i = 0;
i < nlinexprs; ++
i )
3817 oldboundslin, lincoefs, constant, rhs, newboundslin, infeasible);
3819 if( *nreductions > 0 && !*infeasible )
3823 for(
i = 0;
i < nlinexprs && ! (*infeasible); ++
i )
3847 if( (*nlhdlrexprdata)->quadactivities !=
NULL )
3936 nlhdlrdata->useintersectioncuts =
FALSE;
3951 SCIPdebugMsg(
scip,
"expr %p is not quadratic -> abort detect\n", (
void*)expr);
3960 SCIPdebugMsg(
scip,
"expr %p is not propagable and in presolving -> abort detect\n", (
void*)expr);
3967 if( !propagable && !nlhdlrdata->useintersectioncuts )
3969 SCIPdebugMsg(
scip,
"expr %p is not propagable -> abort detect\n", (
void*)expr);
3975 nlexprdata = *nlhdlrexprdata;
3976 nlexprdata->qexpr = expr;
3977 nlexprdata->cons = cons;
4000 for(
i = 0;
i < nlinexprs; ++
i )
4003 for(
i = 0;
i < nquadexprs; ++
i )
4027 if( sqrexpr !=
NULL )
4051 if( expr1 == argexpr )
4067 for( j = 0; j < nquadexprs; ++j )
4071 if( expr1 == exprj )
4098 SCIP_CALL( nlhdlrFreeexprdataQuadratic(
scip, nlhdlr, expr, nlhdlrexprdata) );
4102 SCIPdebugMsg(
scip,
"expr %p is quadratic and propagable -> propagate\n", (
void*)expr);
4134 SCIP_CALL( nlhdlrFreeexprdataQuadratic(
scip, nlhdlr, expr, nlhdlrexprdata) );
4148 for(
i = 0;
i < nlinexprs; ++
i )
4152 for(
i = 0;
i < nquadexprs; ++
i )
4159 SCIPdebugMsg(
scip,
"expr %p is quadratic and propagable -> propagate and separate\n", (
void*)expr);
4161 nlexprdata->separating =
TRUE;
4165 SCIPdebugMsg(
scip,
"expr %p is quadratic and propagable -> propagate only\n", (
void*)expr);
4172 nlexprdata->origvars =
TRUE;
4193 assert(nlhdlrexprdata->separating);
4194 assert(nlhdlrexprdata->qexpr == expr);
4197 if( nlhdlrexprdata->origvars )
4210 *auxvalue = constant;
4212 for(
i = 0;
i < nlinexprs; ++
i )
4215 for(
i = 0;
i < nquadexprs; ++
i )
4225 *auxvalue += (lincoef + sqrcoef * solval) * solval;
4228 for(
i = 0;
i < nbilinexprs; ++
i )
4257 assert(nlhdlrexprdata->qexpr == expr);
4259 INTERLOG(printf(
"Starting interesection cuts!\n");)
4267 if( branchcandonly )
4274 INTERLOG(printf(
"Convex or concave, no need of interesection cuts!\n");)
4279 if( ! nlhdlrdata->useintersectioncuts )
4281 INTERLOG(printf(
"We don't use intersection cuts!\n");)
4290 INTERLOG(printf(
"LP solutoin not good!\n");)
4297 if( (nlhdlrdata->atwhichnodes == -1 &&
depth != 0) || (nlhdlrdata->atwhichnodes != -1 &&
depth % nlhdlrdata->atwhichnodes != 0) )
4299 INTERLOG(printf(
"Don't separate at this node\n");)
4305 if( nlhdlrdata->lastnodenumber != nodenumber )
4307 nlhdlrdata->lastnodenumber = nodenumber;
4308 nlhdlrdata->lastncuts = nlhdlrdata->ncutsadded;
4313 if( (
depth > 0 && nlhdlrexprdata->ncutsadded >= nlhdlrdata->ncutslimit) || (
depth == 0 &&
4314 nlhdlrexprdata->ncutsadded >= nlhdlrdata->ncutslimitroot) )
4316 INTERLOG(printf(
"Too many cuts added already\n");)
4322 if( eigenvalues ==
NULL )
4324 INTERLOG(printf(
"No known eigenvalues!\n");)
4329 if( cons != nlhdlrexprdata->cons )
4333 violation =
ABS( violation );
4340 if( violation < nlhdlrdata->minviolation )
4342 INTERLOG(printf(
"Violation %g is just too small\n", violation); )
4348 if( nlhdlrexprdata->cons !=
NULL && cons != nlhdlrexprdata->cons )
4350 INTERLOG(printf(
"WARNING!! expr is root of one constraint and subexpr of another!\n"); )
4360 INTERLOG(printf(
"We are actually feasible for the sides of the constraint\n"); )
4364#ifdef DEBUG_INTERSECTIONCUT
4366 if( cons == nlhdlrexprdata->cons )
4384 INTERLOG(printf(
"Generating inter cut\n"); )
4387 INTERLOG(
if( !success) printf(
"Generation failed\n"); )
4393 nlhdlrdata->ncutsgenerated += 1;
4394 nlhdlrexprdata->ncutsadded += 1;
4400 if( nlhdlrdata->sparsifycuts )
4404 INTERLOG(
if( !success) printf(
"Clean up failed\n"); )
4414 if( nlhdlrdata->useboundsasrays )
4415 nlhdlrdata->nboundcuts += 1;
4418 overestimate ?
"over" :
"under",
4453 nlhdlrdata->cutcoefsum += nlhdlrdata->currentavecutcoef;
4454 nlhdlrdata->monoidalimprovementsum += nlhdlrdata->currentavemonoidalimprovement;
4455 nlhdlrdata->ncutsadded += 1;
4462 nlhdlrdata->nhighre++;
4513 assert(nlhdlrexprdata->quadactivities !=
NULL);
4514 assert(nlhdlrexprdata->qexpr == expr);
4529 for(
i = 0;
i < nlinexprs; ++
i )
4544 SCIPdebugMsg(
scip,
"Activity of linear part is [%g, %g]\n", nlhdlrexprdata->linactivity.inf,
4545 nlhdlrexprdata->linactivity.sup);
4556 nlhdlrexprdata->nneginfinityquadact = 0;
4557 nlhdlrexprdata->nposinfinityquadact = 0;
4558 nlhdlrexprdata->minquadfiniteact = 0.0;
4559 nlhdlrexprdata->maxquadfiniteact = 0.0;
4562 for(
i = 0;
i < nquadexprs; ++
i )
4585 if( sqrcoef != 0.0 )
4615 if( expr1 == qexpr )
4662 for( j = 0; j < nadjbilin; ++j )
4671 if( expr1 != qexpr )
4706 SCIPinfoMessage(
scip,
NULL,
"Computing activity for quadratic term %g <expr>^2 + [%g,%g] <expr>, where <expr> is: ", sqrcoef,
b.inf,
b.sup);
4719 nlhdlrexprdata->nneginfinityquadact++;
4727 nlhdlrexprdata->minquadfiniteact += quadlb;
4732 nlhdlrexprdata->nposinfinityquadact++;
4740 nlhdlrexprdata->maxquadfiniteact += quadub;
4746 SCIPdebugMsg(
scip,
"Activity of quadratic part is [%g, %g]\n", nlhdlrexprdata->quadactivity.inf, nlhdlrexprdata->quadactivity.sup);
4777 SCIPdebugMsg(
scip,
"Reverse propagation of quadratic expr given bounds = [%g,%g]\n", bounds.inf, bounds.sup);
4784 assert(nlhdlrexprdata->quadactivities !=
NULL);
4785 assert(nlhdlrexprdata->qexpr == expr);
4868 for(
i = 0;
i < nquadexprs; ++
i )
4893 nlhdlrexprdata->nposinfinityquadact == 0 )
4904 nlhdlrexprdata->nposinfinityquadact == 1 )
4905 rest_i.
sup = nlhdlrexprdata->maxquadfiniteact;
4911 nlhdlrexprdata->nneginfinityquadact == 0 )
4922 nlhdlrexprdata->nneginfinityquadact == 1 )
4923 rest_i.
inf = nlhdlrexprdata->minquadfiniteact;
4927#ifdef SCIP_DISABLED_CODE
4955 if( sqrcoef != 0.0 )
4979 if( expr1 == qexpr )
5000 for( j = 0; j < nadjbilin; ++j )
5007 if( expr1 != qexpr )
5022 bilinexprs[nbilin] = expr2;
5023 bilincoefs[nbilin] = bilincoef;
5033 if( nbilin > 0 && !*infeasible )
5055 infeasible, &nreds) );
5058 *nreductions += nreds;
5124 "whether to use intersection cuts for quadratic constraints to separate",
5128 "whether the strengthening should be used",
5132 "whether monoidal strengthening should be used",
5136 "whether the minimal representation of the S-free set should be used (instead of the gauge)",
5140 "use bounds of variables in quadratic as rays for intersection cuts",
5144 "limit for number of cuts generated consecutively",
5148 "limit for number of cuts generated at root node",
5152 "maximal rank a slackvar can have",
5153 &nlhdlrdata->maxrank,
FALSE, INT_MAX, 0, INT_MAX,
NULL,
NULL) );
5156 "minimal cut violation the generated cuts must fulfill to be added to the LP",
5160 "minimal violation the constraint must fulfill such that a cut is generated",
5164 "determines at which nodes cut is used (if it's -1, it's used only at the root node, if it's n >= 0, it's used at every multiple of n",
5165 &nlhdlrdata->atwhichnodes,
FALSE, 1, -1, INT_MAX,
NULL,
NULL) );
5168 "limit for number of rays we do the strengthening for",
5169 &nlhdlrdata->nstrengthlimit,
FALSE, INT_MAX, 0, INT_MAX,
NULL,
NULL) );
5172 "should we try to sparisfy the intersection cut?",
5176 "should cut be generated even with bad numerics when restricting to ray?",
5180 "should cut be added even when range / efficacy is large?",
5184 "for monoidal strengthening, should we track more statistics (more expensive)?",
constraint handler for nonlinear constraints specified by algebraic expressions
#define SCIPquadprecSqrtQ(r, a)
#define SCIPquadprecProdDD(r, a, b)
#define SCIPquadprecProdQD(r, a, b)
#define SCIPquadprecSumQD(r, a, b)
#define QUAD_ASSIGN(a, constant)
#define SCIPquadprecSquareD(r, a)
#define SCIPquadprecSumQQ(r, a, b)
#define SCIP_INTERVAL_INFINITY
#define SCIP_LONGINT_FORMAT
power and signed power expression handlers
product expression handler
variable expression handler
SCIP_Longint SCIPgetCurBoundsTagNonlinear(SCIP_CONSHDLR *conshdlr)
SCIP_VAR * SCIPgetExprAuxVarNonlinear(SCIP_EXPR *expr)
SCIP_Real SCIPgetRhsNonlinear(SCIP_CONS *cons)
SCIP_RETCODE SCIPtightenExprIntervalNonlinear(SCIP *scip, SCIP_EXPR *expr, SCIP_INTERVAL newbounds, SCIP_Bool *cutoff, int *ntightenings)
SCIP_RETCODE SCIPregisterExprUsageNonlinear(SCIP *scip, SCIP_EXPR *expr, SCIP_Bool useauxvar, SCIP_Bool useactivityforprop, SCIP_Bool useactivityforsepabelow, SCIP_Bool useactivityforsepaabove)
SCIP_INTERVAL SCIPgetExprBoundsNonlinear(SCIP *scip, SCIP_EXPR *expr)
SCIP_Real SCIPgetLhsNonlinear(SCIP_CONS *cons)
int SCIPgetSubscipDepth(SCIP *scip)
SCIP_STAGE SCIPgetStage(SCIP *scip)
int SCIPgetNVars(SCIP *scip)
void SCIPinfoMessage(SCIP *scip, FILE *file, const char *formatstr,...)
SCIP_RETCODE SCIPincludeNlhdlrQuadratic(SCIP *scip)
SCIP_Real SCIPnextafter(SCIP_Real from, SCIP_Real to)
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 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)
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)
void SCIPswapReals(SCIP_Real *value1, SCIP_Real *value2)
int SCIPcolGetLPPos(SCIP_COL *col)
SCIP_VAR * SCIPcolGetVar(SCIP_COL *col)
SCIP_Real SCIPcolGetPrimsol(SCIP_COL *col)
SCIP_BASESTAT SCIPcolGetBasisStatus(SCIP_COL *col)
SCIP_CONSHDLR * SCIPfindConshdlr(SCIP *scip, const char *name)
SCIP_RETCODE SCIPprintCons(SCIP *scip, SCIP_CONS *cons, FILE *file)
SCIP_Real SCIPgetCutEfficacy(SCIP *scip, SCIP_SOL *sol, SCIP_ROW *cut)
SCIP_RETCODE SCIPaddRow(SCIP *scip, SCIP_ROW *row, SCIP_Bool forcecut, SCIP_Bool *infeasible)
SCIP_RETCODE SCIPinsertDatatreeInt(SCIP *scip, SCIP_DATATREE *datatree, const char *name, int value)
SCIP_RETCODE SCIPinsertDatatreeReal(SCIP *scip, SCIP_DATATREE *datatree, const char *name, SCIP_Real value)
int SCIPexprGetNChildren(SCIP_EXPR *expr)
SCIP_RETCODE SCIPprintExprQuadratic(SCIP *scip, SCIP_EXPR *expr)
void SCIPexprGetQuadraticBilinTerm(SCIP_EXPR *expr, int termidx, SCIP_EXPR **expr1, SCIP_EXPR **expr2, SCIP_Real *coef, int *pos2, SCIP_EXPR **prodexpr)
void SCIPexprSetCurvature(SCIP_EXPR *expr, SCIP_EXPRCURV curvature)
SCIP_Bool SCIPisExprSum(SCIP *scip, SCIP_EXPR *expr)
SCIP_Bool SCIPexprAreQuadraticExprsVariables(SCIP_EXPR *expr)
void SCIPexprGetQuadraticData(SCIP_EXPR *expr, SCIP_Real *constant, int *nlinexprs, SCIP_EXPR ***linexprs, SCIP_Real **lincoefs, int *nquadexprs, int *nbilinexprs, SCIP_Real **eigenvalues, SCIP_Real **eigenvectors)
SCIP_RETCODE SCIPcomputeExprQuadraticCurvature(SCIP *scip, SCIP_EXPR *expr, SCIP_EXPRCURV *curv, SCIP_HASHMAP *assumevarfixed, SCIP_Bool storeeigeninfo)
SCIP_RETCODE SCIPprintExpr(SCIP *scip, SCIP_EXPR *expr, FILE *file)
SCIP_Real SCIPexprGetEvalValue(SCIP_EXPR *expr)
SCIP_Longint SCIPexprGetActivityTag(SCIP_EXPR *expr)
SCIP_RETCODE SCIPcheckExprQuadratic(SCIP *scip, SCIP_EXPR *expr, SCIP_Bool *isquadratic)
SCIP_INTERVAL SCIPexprGetActivity(SCIP_EXPR *expr)
void SCIPexprGetQuadraticQuadTerm(SCIP_EXPR *quadexpr, int termidx, SCIP_EXPR **expr, SCIP_Real *lincoef, SCIP_Real *sqrcoef, int *nadjbilin, int **adjbilin, SCIP_EXPR **sqrexpr)
void SCIPintervalSetRoundingModeUpwards(void)
void SCIPintervalSetRoundingModeDownwards(void)
SCIP_Real SCIPintervalGetInf(SCIP_INTERVAL interval)
SCIP_Real SCIPintervalQuadUpperBound(SCIP_Real infinity, SCIP_Real a, SCIP_INTERVAL b_, SCIP_INTERVAL x)
SCIP_Bool SCIPintervalIsEntire(SCIP_Real infinity, SCIP_INTERVAL operand)
void SCIPintervalSub(SCIP_Real infinity, SCIP_INTERVAL *resultant, SCIP_INTERVAL operand1, SCIP_INTERVAL operand2)
void SCIPintervalSetEntire(SCIP_Real infinity, SCIP_INTERVAL *resultant)
void SCIPintervalSquareRoot(SCIP_Real infinity, SCIP_INTERVAL *resultant, SCIP_INTERVAL operand)
SCIP_ROUNDMODE SCIPintervalGetRoundingMode(void)
void SCIPintervalSolveUnivariateQuadExpression(SCIP_Real infinity, SCIP_INTERVAL *resultant, SCIP_INTERVAL sqrcoeff, SCIP_INTERVAL lincoeff, SCIP_INTERVAL rhs, SCIP_INTERVAL xbnds)
void SCIPintervalSetRoundingMode(SCIP_ROUNDMODE roundmode)
void SCIPintervalSet(SCIP_INTERVAL *resultant, SCIP_Real value)
SCIP_Bool SCIPintervalIsEmpty(SCIP_Real infinity, SCIP_INTERVAL operand)
void SCIPintervalSetBounds(SCIP_INTERVAL *resultant, SCIP_Real inf, SCIP_Real sup)
struct SCIP_Interval SCIP_INTERVAL
void SCIPintervalMulScalar(SCIP_Real infinity, SCIP_INTERVAL *resultant, SCIP_INTERVAL operand1, SCIP_Real operand2)
void SCIPintervalDivScalar(SCIP_Real infinity, SCIP_INTERVAL *resultant, SCIP_INTERVAL operand1, SCIP_Real operand2)
SCIP_Real SCIPintervalGetSup(SCIP_INTERVAL interval)
void SCIPintervalSolveUnivariateQuadExpressionPositiveAllScalar(SCIP_Real infinity, SCIP_INTERVAL *resultant, SCIP_Real sqrcoeff, SCIP_Real lincoeff, SCIP_Real rhs, SCIP_INTERVAL xbnds)
SCIP_Real SCIPintervalNegateReal(SCIP_Real x)
int SCIPintervalPropagateWeightedSum(SCIP_Real infinity, int noperands, SCIP_INTERVAL *operands, SCIP_Real *weights, SCIP_Real constant, SCIP_INTERVAL rhs, SCIP_INTERVAL *resultants, SCIP_Bool *infeasible)
void SCIPintervalAdd(SCIP_Real infinity, SCIP_INTERVAL *resultant, SCIP_INTERVAL operand1, SCIP_INTERVAL operand2)
void SCIPintervalSetEmpty(SCIP_INTERVAL *resultant)
SCIP_RETCODE SCIPgetLPBasisInd(SCIP *scip, int *basisind)
SCIP_RETCODE SCIPgetLPColsData(SCIP *scip, SCIP_COL ***cols, int *ncols)
SCIP_RETCODE SCIPgetLPRowsData(SCIP *scip, SCIP_ROW ***rows, int *nrows)
SCIP_ROW ** SCIPgetLPRows(SCIP *scip)
int SCIPgetNLPRows(SCIP *scip)
SCIP_RETCODE SCIPgetLPBInvARow(SCIP *scip, int r, SCIP_Real *binvrow, SCIP_Real *coefs, int *inds, int *ninds)
SCIP_LPSOLSTAT SCIPgetLPSolstat(SCIP *scip)
SCIP_COL ** SCIPgetLPCols(SCIP *scip)
int SCIPgetNLPCols(SCIP *scip)
SCIP_Bool SCIPisLPSolBasic(SCIP *scip)
SCIP_RETCODE SCIPgetLPBInvRow(SCIP *scip, int r, SCIP_Real *coefs, int *inds, int *ninds)
#define SCIPfreeBuffer(scip, ptr)
#define SCIPfreeBlockMemoryArray(scip, ptr, num)
#define SCIPallocClearBlockMemory(scip, ptr)
int SCIPcalcMemGrowSize(SCIP *scip, int num)
#define SCIPallocBufferArray(scip, ptr, num)
#define SCIPreallocBufferArray(scip, ptr, num)
#define SCIPfreeBufferArray(scip, ptr)
#define SCIPallocBlockMemoryArray(scip, ptr, num)
#define SCIPallocBuffer(scip, ptr)
#define SCIPfreeBlockMemory(scip, ptr)
#define SCIPfreeBufferArrayNull(scip, ptr)
#define SCIPallocBlockMemory(scip, ptr)
SCIP_NLHDLRDATA * SCIPnlhdlrGetData(SCIP_NLHDLR *nlhdlr)
void SCIPnlhdlrSetFreeExprData(SCIP_NLHDLR *nlhdlr,)
const char * SCIPnlhdlrGetName(SCIP_NLHDLR *nlhdlr)
SCIP_NLHDLR * SCIPfindNlhdlrNonlinear(SCIP_CONSHDLR *conshdlr, const char *name)
void SCIPnlhdlrSetSepa(SCIP_NLHDLR *nlhdlr, SCIP_DECL_NLHDLRINITSEPA((*initsepa)), SCIP_DECL_NLHDLRENFO((*enfo)), SCIP_DECL_NLHDLRESTIMATE((*estimate)),)
void SCIPnlhdlrSetFreeHdlrData(SCIP_NLHDLR *nlhdlr,)
void SCIPnlhdlrSetCopyHdlr(SCIP_NLHDLR *nlhdlr,)
SCIP_RETCODE SCIPincludeNlhdlrNonlinear(SCIP *scip, SCIP_NLHDLR **nlhdlr, const char *name, const char *desc, int detectpriority, int enfopriority, SCIP_DECL_NLHDLRDETECT((*detect)), SCIP_DECL_NLHDLREVALAUX((*evalaux)), SCIP_NLHDLRDATA *nlhdlrdata)
void SCIPnlhdlrSetProp(SCIP_NLHDLR *nlhdlr, SCIP_DECL_NLHDLRINTEVAL((*inteval)),)
SCIP_Longint SCIPnodeGetNumber(SCIP_NODE *node)
int SCIPnodeGetDepth(SCIP_NODE *node)
SCIP_Bool SCIProwIsIntegral(SCIP_ROW *row)
SCIP_Real SCIPgetRowMaxCoef(SCIP *scip, SCIP_ROW *row)
SCIP_Real SCIProwGetLhs(SCIP_ROW *row)
SCIP_Real SCIPgetRowMinCoef(SCIP *scip, SCIP_ROW *row)
SCIP_COL ** SCIProwGetCols(SCIP_ROW *row)
SCIP_Real SCIProwGetRhs(SCIP_ROW *row)
int SCIProwGetNLPNonz(SCIP_ROW *row)
int SCIProwGetLPPos(SCIP_ROW *row)
SCIP_RETCODE SCIPprintRow(SCIP *scip, SCIP_ROW *row, FILE *file)
SCIP_Real SCIPgetRowActivity(SCIP *scip, SCIP_ROW *row)
SCIP_RETCODE SCIPreleaseRow(SCIP *scip, SCIP_ROW **row)
SCIP_Real SCIProwGetConstant(SCIP_ROW *row)
SCIP_Real * SCIProwGetVals(SCIP_ROW *row)
SCIP_BASESTAT SCIProwGetBasisStatus(SCIP_ROW *row)
SCIP_RETCODE SCIPprintTransSol(SCIP *scip, SCIP_SOL *sol, FILE *file, SCIP_Bool printzeros)
SCIP_RETCODE SCIPsetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var, SCIP_Real val)
SCIP_Real SCIPgetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var)
SCIP_Longint SCIPgetNLPs(SCIP *scip)
SCIP_TABLE * SCIPfindTable(SCIP *scip, const char *name)
SCIP_RETCODE SCIPincludeTable(SCIP *scip, const char *name, const char *desc, SCIP_Bool active, SCIP_DECL_TABLECOPY((*tablecopy)), SCIP_DECL_TABLEFREE((*tablefree)), SCIP_DECL_TABLEINIT((*tableinit)), SCIP_DECL_TABLEEXIT((*tableexit)), SCIP_DECL_TABLEINITSOL((*tableinitsol)), SCIP_DECL_TABLEEXITSOL((*tableexitsol)), SCIP_DECL_TABLEOUTPUT((*tableoutput)), SCIP_DECL_TABLECOLLECT((*tablecollect)), SCIP_TABLEDATA *tabledata, int position, SCIP_STAGE earlieststage)
SCIP_Real SCIPinfinity(SCIP *scip)
SCIP_Bool SCIPisSumRelEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisFeasEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisFeasZero(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisHugeValue(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPfeastol(SCIP *scip)
SCIP_Bool SCIPisEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisZero(SCIP *scip, SCIP_Real val)
SCIP_NODE * SCIPgetCurrentNode(SCIP *scip)
SCIP_COL * SCIPvarGetCol(SCIP_VAR *var)
SCIP_Real SCIPvarGetUbLocal(SCIP_VAR *var)
const char * SCIPvarGetName(SCIP_VAR *var)
SCIP_Bool SCIPvarIsIntegral(SCIP_VAR *var)
SCIP_Real SCIPvarGetLbLocal(SCIP_VAR *var)
SCIP_VAR ** SCIProwprepGetVars(SCIP_ROWPREP *rowprep)
SCIP_Real SCIProwprepGetSide(SCIP_ROWPREP *rowprep)
void SCIPmergeRowprepTerms(SCIP *scip, SCIP_ROWPREP *rowprep)
void SCIProwprepSetCoef(SCIP_ROWPREP *rowprep, int idx, SCIP_Real newcoef)
SCIP_Real * SCIProwprepGetCoefs(SCIP_ROWPREP *rowprep)
char * SCIProwprepGetName(SCIP_ROWPREP *rowprep)
void SCIProwprepSetSidetype(SCIP_ROWPREP *rowprep, SCIP_SIDETYPE sidetype)
void SCIProwprepAddConstant(SCIP_ROWPREP *rowprep, SCIP_Real constant)
SCIP_RETCODE SCIPaddRowprepTerm(SCIP *scip, SCIP_ROWPREP *rowprep, SCIP_VAR *var, SCIP_Real coef)
SCIP_RETCODE SCIPgetRowprepRowCons(SCIP *scip, SCIP_ROW **row, SCIP_ROWPREP *rowprep, SCIP_CONS *cons)
SCIP_RETCODE SCIPcreateRowprep(SCIP *scip, SCIP_ROWPREP **rowprep, SCIP_SIDETYPE sidetype, SCIP_Bool local)
int SCIProwprepGetNVars(SCIP_ROWPREP *rowprep)
void SCIProwprepAddSide(SCIP_ROWPREP *rowprep, SCIP_Real side)
SCIP_RETCODE SCIPcleanupRowprep(SCIP *scip, SCIP_ROWPREP *rowprep, SCIP_SOL *sol, SCIP_Real minviol, SCIP_Real *viol, SCIP_Bool *success)
void SCIPfreeRowprep(SCIP *scip, SCIP_ROWPREP **rowprep)
int SCIPsnprintf(char *t, int len, const char *s,...)
SCIPfreeSol(scip, &heurdata->sol))
SCIPcreateSol(scip, &heurdata->sol, heur))
assert(minobj< SCIPgetCutoffbound(scip))
#define BMSclearMemory(ptr)
#define BMSclearMemoryArray(ptr, num)
#define NLHDLR_DETECTPRIORITY
#define NLHDLR_ENFOPRIORITY
static SCIP_Bool raysAreDependent(SCIP *scip, SCIP_Real *raycoefs1, int *rayidx1, int raynnonz1, SCIP_Real *raycoefs2, int *rayidx2, int raynnonz2, SCIP_Real *coef)
static SCIP_RETCODE computeRestrictionToLine(SCIP *scip, SCIP_NLHDLREXPRDATA *nlhdlrexprdata, SCIP_Real sidefactor, SCIP_Real *raycoefs, int *rayidx, int raynnonz, SCIP_Real *vb, SCIP_Real *vzlp, SCIP_Real kappa, SCIP_Real *apex, SCIP_Real *coefs2, SCIP_Bool *success)
#define DEFAULT_USEBOUNDS
#define DEFAULT_USESTRENGTH
static SCIP_Real computeMaxBoundaryForBilinearProp(SCIP_Real a, SCIP_Real c, SCIP_Real x1, SCIP_Real x2)
static SCIP_RETCODE setVarToNearestBound(SCIP *scip, SCIP_SOL *sol, SCIP_SOL *vertex, SCIP_VAR *var, SCIP_Real *factor, SCIP_Bool *success)
static void computeVApexAndVRay(SCIP_NLHDLREXPRDATA *nlhdlrexprdata, SCIP_Real *apex, SCIP_Real *raycoefs, int *rayidx, int raynnonz, SCIP_Real *vapex, SCIP_Real *vray)
static void computeRangeForBilinearProp(SCIP_INTERVAL exprdom, SCIP_Real coef, SCIP_INTERVAL rhs, SCIP_INTERVAL *range)
static SCIP_RETCODE computeIntercut(SCIP *scip, SCIP_NLHDLRDATA *nlhdlrdata, SCIP_NLHDLREXPRDATA *nlhdlrexprdata, RAYS *rays, SCIP_Real sidefactor, SCIP_Bool iscase4, SCIP_Real *vb, SCIP_Real *vzlp, SCIP_Real *wcoefs, SCIP_Real wzlp, SCIP_Real kappa, SCIP_ROWPREP *rowprep, SCIP_Real *interpoints, SCIP_SOL *sol, SCIP_Bool *success)
static SCIP_RETCODE computeRestrictionToRay(SCIP *scip, SCIP_NLHDLREXPRDATA *nlhdlrexprdata, SCIP_Real sidefactor, SCIP_Bool iscase4, SCIP_Real *raycoefs, int *rayidx, int raynnonz, SCIP_Real *vb, SCIP_Real *vzlp, SCIP_Real *wcoefs, SCIP_Real wzlp, SCIP_Real kappa, SCIP_Real *coefs1234a, SCIP_Real *coefs4b, SCIP_Real *coefscondition, SCIP_Bool *success)
static SCIP_RETCODE findRho(SCIP *scip, SCIP_NLHDLRDATA *nlhdlrdata, SCIP_NLHDLREXPRDATA *nlhdlrexprdata, RAYS *rays, int idx, SCIP_Real sidefactor, SCIP_Bool iscase4, SCIP_Real *vb, SCIP_Real *vzlp, SCIP_Real *wcoefs, SCIP_Real wzlp, SCIP_Real kappa, SCIP_Real *interpoints, SCIP_Real *rho, SCIP_Bool *success)
static SCIP_RETCODE createAndStoreSparseRays(SCIP *scip, SCIP_NLHDLREXPRDATA *nlhdlrexprdata, SCIP_VAR *auxvar, RAYS **raysptr, SCIP_Bool *success)
static SCIP_RETCODE insertRayEntry(SCIP *scip, RAYS *rays, SCIP_Real coef, int coefidx, int coefpos)
static void sparsifyIntercut(SCIP *scip, SCIP_ROWPREP *rowprep)
static SCIP_RETCODE computeMonoidalStrengthCoef(SCIP *scip, SCIP_NLHDLREXPRDATA *nlhdlrexprdata, int lppos, SCIP_Real *raycoefs, int *rayidx, int raynnonz, SCIP_Real *vb, SCIP_Real *vzlp, SCIP_Real *wcoefs, SCIP_Real kappa, SCIP_Real *apex, SCIP_Real sidefactor, SCIP_Real *cutcoef, SCIP_Bool *success)
static SCIP_Real findMonoidalQuadRoot(SCIP *scip, SCIP_Real a, SCIP_Real b, SCIP_Real c)
static SCIP_RETCODE propagateBoundsQuadExpr(SCIP *scip, SCIP_EXPR *expr, SCIP_Real sqrcoef, SCIP_INTERVAL b, SCIP_INTERVAL rhs, SCIP_Bool *infeasible, int *nreductions)
static SCIP_RETCODE createBoundRays(SCIP *scip, RAYS **rays, int size)
#define TABLE_DESC_QUADRATIC
static void freeRays(SCIP *scip, RAYS **rays)
static void combineRays(SCIP_Real *raycoefs1, int *rayidx1, int raynnonz1, SCIP_Real *raycoefs2, int *rayidx2, int raynnonz2, SCIP_Real *newraycoefs, int *newrayidx, int *newraynnonz, SCIP_Real coef1, SCIP_Real coef2)
static SCIP_Real computeEigenvecDotRay(SCIP_Real *eigenvec, int nquadvars, SCIP_Real *raycoefs, int *rayidx, int raynnonz)
static SCIP_Bool isPropagableTerm(SCIP_EXPR *qexpr, int idx)
static SCIP_Real computeWRayLinear(SCIP_NLHDLREXPRDATA *nlhdlrexprdata, SCIP_Real sidefactor, SCIP_Real *raycoefs, int *rayidx, int raynnonz)
#define DEFAULT_NCUTSROOT
#define DEFAULT_USEMONOIDAL
static SCIP_RETCODE storeDenseTableauRow(SCIP *scip, SCIP_COL *col, int *basicvarpos2tableaurow, int nbasiccol, int raylength, SCIP_Real *binvrow, SCIP_Real *binvarow, SCIP_Real *tableaurows)
static SCIP_RETCODE addRowToCut(SCIP *scip, SCIP_ROWPREP *rowprep, SCIP_Real cutcoef, SCIP_ROW *row, SCIP_Bool *success)
static SCIP_Real computeIntersectionPoint(SCIP *scip, SCIP_NLHDLRDATA *nlhdlrdata, SCIP_Bool iscase4, SCIP_Real *coefs1234a, SCIP_Real *coefs4b, SCIP_Real *coefscondition)
static SCIP_Real isCase4a(SCIP_Real tsol, SCIP_Real *coefs4a, SCIP_Real *coefscondition)
#define DEFAULT_USEMINREP
static SCIP_Real computeMaxForBilinearProp(SCIP_Real a, SCIP_Real c, SCIP_INTERVAL dom)
#define DEFAULT_USEINTERCUTS
static void constructLPPos2ConsPosMap(SCIP_NLHDLREXPRDATA *nlhdlrexprdata, SCIP_VAR *auxvar, int *map)
static SCIP_Real computeRoot(SCIP *scip, SCIP_Real *coefs)
static SCIP_Bool isQuadConsViolated(SCIP *scip, SCIP_NLHDLREXPRDATA *nlhdlrexprdata, SCIP_VAR *auxvar, SCIP_SOL *sol, SCIP_Real sidefactor)
static SCIP_Bool areCoefsNumericsGood(SCIP *scip, SCIP_NLHDLRDATA *nlhdlrdata, SCIP_Real *coefs1234a, SCIP_Real *coefs4b, SCIP_Bool iscase4)
static SCIP_RETCODE intercutsComputeCommonQuantities(SCIP *scip, SCIP_NLHDLREXPRDATA *nlhdlrexprdata, SCIP_VAR *auxvar, SCIP_Real sidefactor, SCIP_SOL *sol, SCIP_Real *vb, SCIP_Real *vzlp, SCIP_Real *wcoefs, SCIP_Real *wzlp, SCIP_Real *kappa)
static SCIP_Real evalPhiAtRay(SCIP_Real t, SCIP_Real a, SCIP_Real b, SCIP_Real c, SCIP_Real d, SCIP_Real e)
#define TABLE_POSITION_QUADRATIC
static SCIP_RETCODE insertRayEntries(SCIP *scip, RAYS *rays, SCIP_Real *densetableaucols, int *rayentry2conspos, int raylength, int nray, int conspos, SCIP_Real factor, int *nnonz, SCIP_Bool *success)
static SCIP_RETCODE computeStrengthenedIntercut(SCIP *scip, SCIP_NLHDLRDATA *nlhdlrdata, SCIP_NLHDLREXPRDATA *nlhdlrexprdata, RAYS *rays, SCIP_Real sidefactor, SCIP_Bool iscase4, SCIP_Real *vb, SCIP_Real *vzlp, SCIP_Real *wcoefs, SCIP_Real wzlp, SCIP_Real kappa, SCIP_ROWPREP *rowprep, SCIP_SOL *sol, SCIP_Bool *success, SCIP_Bool *strengthsuccess)
#define TABLE_NAME_QUADRATIC
#define INTERCUTS_MINVIOL
static void computeApex(SCIP_NLHDLREXPRDATA *nlhdlrexprdata, SCIP_Real *vb, SCIP_Real *vzlp, SCIP_Real kappa, SCIP_Real sidefactor, SCIP_Real *apex, SCIP_Bool *success)
static SCIP_RETCODE propagateBoundsLinExpr(SCIP *scip, SCIP_EXPR *expr, SCIP_Real b, SCIP_INTERVAL rhs, SCIP_Bool *infeasible, int *nreductions)
static SCIP_RETCODE createRays(SCIP *scip, RAYS **rays)
#define BINSEARCH_MAXITERS
static int countBasicVars(SCIP_NLHDLREXPRDATA *nlhdlrexprdata, SCIP_VAR *auxvar, SCIP_Bool *nozerostat)
static SCIP_RETCODE findVertexAndGetRays(SCIP *scip, SCIP_NLHDLREXPRDATA *nlhdlrexprdata, SCIP_SOL *sol, SCIP_SOL *vertex, SCIP_VAR *auxvar, RAYS **raysptr, SCIP_Bool *success)
static SCIP_RETCODE reversePropagateLinearExpr(SCIP *scip, SCIP_EXPR **linexprs, int nlinexprs, SCIP_Real *lincoefs, SCIP_Real constant, SCIP_INTERVAL rhs, SCIP_Bool *infeasible, int *nreductions)
static SCIP_Bool isPropagable(SCIP_EXPR *qexpr)
static SCIP_Bool isRayInStrip(SCIP_NLHDLREXPRDATA *nlhdlrexprdata, SCIP_Real *vb, SCIP_Real *vzlp, SCIP_Real *vapex, SCIP_Real *vray, SCIP_Real kappa, SCIP_Real sidefactor, SCIP_Real cutcoef)
static void doBinarySearch(SCIP *scip, SCIP_Real a, SCIP_Real b, SCIP_Real c, SCIP_Real d, SCIP_Real e, SCIP_Real *sol)
static SCIP_RETCODE storeDenseTableauRowsByColumns(SCIP *scip, SCIP_NLHDLREXPRDATA *nlhdlrexprdata, int raylength, SCIP_VAR *auxvar, SCIP_Real *tableaurows, int *rayentry2conspos)
static SCIP_RETCODE computeMonoidalQuadCoefs(SCIP *scip, SCIP_NLHDLREXPRDATA *nlhdlrexprdata, SCIP_Real *vb, SCIP_Real *vzlp, SCIP_Real *vapex, SCIP_Real *vray, SCIP_Real kappa, SCIP_Real sidefactor, SCIP_Real *a, SCIP_Real *b, SCIP_Real *c)
#define TABLE_EARLIEST_STAGE_QUADRATIC
static SCIP_RETCODE constructBasicVars2TableauRowMap(SCIP *scip, int *map)
static SCIP_RETCODE rayInRecessionCone(SCIP *scip, SCIP_NLHDLRDATA *nlhdlrdata, SCIP_NLHDLREXPRDATA *nlhdlrexprdata, RAYS *rays, int j, int i, SCIP_Real sidefactor, SCIP_Bool iscase4, SCIP_Real *vb, SCIP_Real *vzlp, SCIP_Real *wcoefs, SCIP_Real wzlp, SCIP_Real kappa, SCIP_Real alpha, SCIP_Bool *inreccone, SCIP_Bool *success)
static SCIP_RETCODE generateIntercut(SCIP *scip, SCIP_EXPR *expr, SCIP_NLHDLRDATA *nlhdlrdata, SCIP_NLHDLREXPRDATA *nlhdlrexprdata, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_ROWPREP *rowprep, SCIP_Bool overestimate, SCIP_Bool *success)
static SCIP_RETCODE addColToCut(SCIP *scip, SCIP_ROWPREP *rowprep, SCIP_SOL *sol, SCIP_Real cutcoef, SCIP_COL *col)
nonlinear handler to handle quadratic expressions
preparation of a linear inequality to become a SCIP_ROW
public functions of nonlinear handlers of nonlinear constraints
struct SCIP_Cons SCIP_CONS
struct SCIP_Conshdlr SCIP_CONSHDLR
struct SCIP_Expr SCIP_EXPR
struct SCIP_RowPrep SCIP_ROWPREP
#define SCIP_NLHDLR_METHOD_SEPAABOVE
#define SCIP_DECL_NLHDLREVALAUX(x)
struct SCIP_NlhdlrData SCIP_NLHDLRDATA
#define SCIP_NLHDLR_METHOD_SEPABOTH
#define SCIP_DECL_NLHDLRCOPYHDLR(x)
#define SCIP_NLHDLR_METHOD_ACTIVITY
#define SCIP_DECL_NLHDLRFREEEXPRDATA(x)
#define SCIP_DECL_NLHDLRDETECT(x)
#define SCIP_NLHDLR_METHOD_NONE
struct SCIP_Nlhdlr SCIP_NLHDLR
#define SCIP_DECL_NLHDLRFREEHDLRDATA(x)
struct SCIP_NlhdlrExprData SCIP_NLHDLREXPRDATA
#define SCIP_DECL_NLHDLRREVERSEPROP(x)
#define SCIP_NLHDLR_METHOD_ALL
#define SCIP_DECL_NLHDLRENFO(x)
#define SCIP_DECL_NLHDLRINTEVAL(x)
#define SCIP_NLHDLR_METHOD_SEPABELOW
enum SCIP_Retcode SCIP_RETCODE
#define SCIP_DECL_TABLEOUTPUT(x)
#define SCIP_DECL_TABLECOLLECT(x)
struct SCIP_Node SCIP_NODE