39 #define CONSHDLR_NAME "bivariate" 40 #define CONSHDLR_DESC "constraint handler for constraints of the form lhs <= f(x,y) + c*z <= rhs where f(x,y) is a bivariate function" 41 #define CONSHDLR_SEPAPRIORITY 5 42 #define CONSHDLR_ENFOPRIORITY -55 43 #define CONSHDLR_CHECKPRIORITY -3600000 44 #define CONSHDLR_SEPAFREQ 1 45 #define CONSHDLR_PROPFREQ 1 46 #define CONSHDLR_EAGERFREQ 100 48 #define CONSHDLR_MAXPREROUNDS -1 49 #define CONSHDLR_DELAYSEPA FALSE 50 #define CONSHDLR_DELAYPROP FALSE 51 #define CONSHDLR_NEEDSCONS TRUE 53 #define CONSHDLR_PRESOLTIMING SCIP_PRESOLTIMING_FAST 54 #define CONSHDLR_PROP_TIMING SCIP_PROPTIMING_BEFORELP 56 #define INTERVALINFTY 1E+43 57 #define NEWTONMAXITER 1000 58 #define INITLPMAXVARVAL 1000.0 60 #define QUADCONSUPGD_PRIORITY 5000 61 #define NONLINCONSUPGD_PRIORITY 10000 71 struct SepaData_ConvexConcave
82 typedef struct SepaData_ConvexConcave SEPADATA_CONVEXCONCAVE;
98 unsigned int mayincreasez:1;
99 unsigned int maydecreasez:1;
104 SEPADATA_CONVEXCONCAVE sepaconvexconcave;
108 struct SCIP_ConshdlrData
115 int ninitlprefpoints;
122 int newsoleventfilterpos;
142 #define infty2infty(infty1, infty2, val) ((val) >= (infty1) ? (infty2) : (val)) 150 assert(
scip != NULL);
151 assert(event != NULL);
152 assert(eventdata != NULL);
153 assert(eventhdlr != NULL);
157 assert(cons != NULL);
175 assert(scip != NULL);
176 assert(cons != NULL);
182 assert(conshdlrdata != NULL);
183 assert(conshdlrdata->linvareventhdlr != NULL);
186 assert(consdata != NULL);
188 if( consdata->z == NULL )
190 assert(consdata->eventfilterpos == -1);
196 if( consdata->zcoef > 0.0 )
204 if( consdata->zcoef > 0.0 )
228 assert(scip != NULL);
229 assert(cons != NULL);
234 assert(conshdlrdata != NULL);
235 assert(conshdlrdata->linvareventhdlr != NULL);
238 assert(consdata != NULL);
240 if( consdata->z == NULL )
242 assert(consdata->eventfilterpos >= 0);
248 if( consdata->zcoef > 0.0 )
256 if( consdata->zcoef > 0.0 )
263 consdata->eventfilterpos = -1;
276 assert(scip != NULL);
277 assert(event != NULL);
278 assert(eventdata != NULL);
279 assert(eventhdlr != NULL);
282 assert(conshdlrdata != NULL);
283 assert(conshdlrdata->exprgraph != NULL);
290 SCIPdebugMsg(scip,
"changed %s bound on expression graph variable <%s> from %g to %g\n",
295 conshdlrdata->ispropagated =
FALSE;
300 if( eventtype & SCIP_EVENTTYPE_LBCHANGED )
310 conshdlrdata->isremovedfixings =
FALSE;
324 assert(exprgraph != NULL);
326 assert(varnode != NULL);
331 assert(conshdlrdata != NULL);
332 assert(conshdlrdata->exprgraph == exprgraph);
349 conshdlrdata->ispropagated =
FALSE;
361 assert(exprgraph != NULL);
363 assert(varnode != NULL);
368 assert(conshdlrdata != NULL);
369 assert(conshdlrdata->exprgraph == exprgraph);
391 assert(scip != NULL);
392 assert(cons != NULL);
397 assert(consdata != NULL);
422 assert(scip != NULL);
423 assert(cons != NULL);
428 assert(consdata != NULL);
463 assert(conshdlr != NULL);
464 assert(scip != NULL);
465 assert(cons != NULL);
466 assert(ischanged != NULL);
467 assert(isupgraded != NULL);
471 assert(conshdlrdata != NULL);
475 assert(consdata != NULL);
476 assert(consdata->f != NULL);
492 if( consdata->zcoef == 0.0 )
495 consdata->lhs -= constant;
497 consdata->rhs -= constant;
499 if( consdata->z != NULL )
517 if( vars[0] == NULL || vars[1] == NULL )
536 for( i = 0; i < 2; ++i )
554 else if( coef == 1.0 && constant == 0.0 )
571 assert(substexpr[0] != NULL || substexpr[1] != NULL);
574 if( substexpr[0] != NULL )
576 if( substexpr[1] != NULL )
580 if( (vars[0] == NULL || vars[0] == vars[1]) && vars[1] != NULL )
592 assert(vars[1] == NULL || vars[0] != NULL);
596 consdata->z != NULL ? 1 : 0, consdata->z != NULL ? &consdata->z : NULL, &consdata->zcoef,
597 1, &tree, NULL, consdata->lhs, consdata->rhs,
613 for( i = 0; i < 2; ++i )
626 if( coef == 1.0 && constant == 0.0 )
659 if( substexpr[0] != NULL || substexpr[1] != NULL )
662 if( substexpr[0] != NULL )
664 if( substexpr[1] != NULL )
690 assert(conshdlrdata != NULL);
691 assert(conshdlrdata->exprgraph != NULL);
693 if( conshdlrdata->isremovedfixings )
716 if( requsize > varssize )
722 assert(requsize <= varssize);
727 for( j = 0; j < nvars; ++j )
742 conshdlrdata->isremovedfixings =
TRUE;
769 assert(scip != NULL);
770 assert(conshdlr != NULL);
771 assert(cons != NULL);
774 assert(conshdlrdata != NULL);
775 assert(conshdlrdata->exprinterpreter != NULL);
778 assert(consdata != NULL);
790 if( consdata->z != NULL )
798 consdata->lhsviol = consdata->rhsviol =
SCIPinfinity(scip);
804 consdata->lhsviol = consdata->rhsviol =
SCIPinfinity(scip);
818 xyvals[0] =
MAX(xlb, MIN(xub, xyvals[0]));
822 xyvals[1] =
MAX(ylb, MIN(yub, xyvals[1]));
824 if( consdata->z != NULL )
834 xyvals[0] =
MAX(xlb, MIN(xub, xyvals[0]));
836 xyvals[1] =
MAX(ylb, MIN(yub, xyvals[1]));
845 consdata->lhsviol = consdata->rhsviol =
SCIPinfinity(scip);
849 if( consdata->z != NULL )
850 consdata->activity += consdata->zcoef * zval;
855 if( consdata->activity < consdata->lhs && !
SCIPisInfinity(scip, -consdata->lhs) )
857 consdata->lhsviol = consdata->lhs - consdata->activity;
858 absviol = consdata->lhsviol;
859 relviol =
SCIPrelDiff(consdata->lhs, consdata->activity);
862 consdata->lhsviol = 0.0;
864 if( consdata->activity > consdata->rhs && !
SCIPisInfinity(scip, consdata->rhs) )
866 consdata->rhsviol = consdata->activity - consdata->rhs;
867 absviol = consdata->rhsviol;
868 relviol =
SCIPrelDiff(consdata->activity, consdata->rhs);
871 consdata->rhsviol = 0.0;
895 assert(scip != NULL);
896 assert(conshdlr != NULL);
897 assert(conss != NULL || nconss == 0);
898 assert(maxviolcon != NULL);
904 for( c = 0; c < nconss; ++c )
906 assert(conss != NULL);
907 assert(conss[c] != NULL);
912 assert(consdata != NULL);
914 viol =
MAX(consdata->lhsviol, consdata->rhsviol);
918 *maxviolcon = conss[c];
947 assert(scip != NULL);
948 assert(vred != NULL);
1037 assert(scip != NULL);
1038 assert(exprinterpreter != NULL);
1039 assert(cons != NULL);
1042 assert(consdata != NULL);
1043 assert(consdata->f != NULL);
1045 switch( consdata->convextype )
1067 consdata->sepaconvexconcave.linearinx = !sparsity[0];
1068 consdata->sepaconvexconcave.lineariny = !sparsity[3];
1070 if( !consdata->sepaconvexconcave.linearinx && !
SCIPisInfinity(scip, consdata->rhs) )
1105 consdata->sepaconvexconcave.f_yfixed = NULL;
1106 consdata->sepaconvexconcave.vred = NULL;
1109 if( !consdata->sepaconvexconcave.lineariny && !
SCIPisInfinity(scip, -consdata->lhs) )
1169 consdata->sepaconvexconcave.f_neg_swapped = NULL;
1170 consdata->sepaconvexconcave.f_neg_swapped_yfixed = NULL;
1171 consdata->sepaconvexconcave.vred_neg_swapped = NULL;
1192 assert(scip != NULL);
1193 assert(cons != NULL);
1196 assert(consdata != NULL);
1197 assert(consdata->f != NULL);
1199 switch( consdata->convextype )
1203 if( consdata->sepaconvexconcave.f_yfixed != NULL )
1207 if( consdata->sepaconvexconcave.f_neg_swapped != NULL )
1211 if( consdata->sepaconvexconcave.f_neg_swapped_yfixed != NULL )
1215 if( consdata->sepaconvexconcave.vred != NULL )
1219 if( consdata->sepaconvexconcave.vred_neg_swapped != NULL )
1244 assert(val != NULL);
1247 mid = 0.5 * (lb + ub);
1250 *val += MIN(1.0, amount * range);
1252 *val -= MIN(1.0, amount * range);
1278 assert(scip != NULL);
1279 assert(exprinterpreter != NULL);
1283 assert(val != NULL);
1284 assert(success != NULL);
1300 s = MIN(
MAX(0.0, lb), ub);
1319 amount = iter <= 65 ? 0.1 / (1u<<iter) : 1e-20;
1324 }
while( s == sold );
1360 if(
SCIPisEQ(scip, s, lb) && (grad - targetvalue) * hess >= 0 )
1370 if(
SCIPisEQ(scip, s, ub) && (grad - targetvalue) * hess <= 0 )
1393 step = (grad - targetvalue) / hess;
1394 assert(step != 0.0);
1436 assert(scip != NULL);
1437 assert(cons != NULL);
1438 assert(row != NULL);
1441 assert(consdata != NULL);
1470 SCIPdebugMsg(scip,
"could not evaluate f at given reference point and perturbed one");
1476 rhs = consdata->rhs - fval + fgrad[0] * x0y0[0] + fgrad[1] * x0y0[1];
1485 if( consdata->z != NULL )
1530 assert(scip != NULL);
1531 assert(exprinterpreter != NULL);
1533 assert(x0y0 != NULL);
1534 assert(coefx != NULL);
1535 assert(coefy != NULL);
1536 assert(constant != NULL);
1537 assert(success != NULL);
1550 assert(
SCIPisLE(scip, xlb, x0y0[0]));
1551 assert(
SCIPisGE(scip, xub, x0y0[0]));
1552 assert(
SCIPisLE(scip, ylb, x0y0[1]));
1553 assert(
SCIPisGE(scip, yub, x0y0[1]));
1593 SCIPdebugMsg(scip,
"skip hyperplane since function cannot be evaluated\n");
1598 *coefy = (p4val - p1val) / (yub - ylb);
1599 *constant = p1val - *coefy * ylb;
1616 SCIPdebugMsg(scip,
"skip hyperplane since function cannot be evaluated\n");
1620 *coefx = (p2val - p1val) / (xub - xlb);
1622 *constant = p1val - *coefx * xlb;
1643 SCIPdebugMsg(scip,
"p1 = (%g, %g), f(p1) = %g\n", p1[0], p1[1], p1val);
1644 SCIPdebugMsg(scip,
"p2 = (%g, %g), f(p2) = %g\n", p2[0], p2[1], p2val);
1645 SCIPdebugMsg(scip,
"p3 = (%g, %g), f(p3) = %g\n", p3[0], p3[1], p3val);
1646 SCIPdebugMsg(scip,
"p4 = (%g, %g), f(p4) = %g\n", p4[0], p4[1], p4val);
1651 SCIPdebugMsg(scip,
"skip hyperplane since function cannot be evaluated\n");
1666 if( x0y0[1] <= ylb + (yub - ylb)/(xub - xlb) * (x0y0[0] - xlb) )
1668 SCIP_CALL(
SCIPcomputeHyperplaneThreePoints(scip, p1[0], p1[1], p1val, p2[0], p2[1], p2val, p3[0], p3[1], p3val, &alpha,
1669 &beta, &gamma_, &delta) );
1676 if(
SCIPisInfinity(scip, delta) || alpha * p4[0] + beta * p4[1] + gamma_ * p4val > delta )
1681 SCIP_CALL(
SCIPcomputeHyperplaneThreePoints(scip, p1[0], p1[1], p1val, p3[0], p3[1], p3val, p4[0], p4[1], p4val, &alpha,
1682 &beta, &gamma_, &delta) );
1689 if(
SCIPisInfinity(scip, delta) || alpha * p2[0] + beta * p2[1] + gamma_ * p2val > delta )
1695 if( x0y0[1] <= yub + (ylb - yub)/(xub - xlb) * (x0y0[0] - xlb) )
1697 SCIP_CALL(
SCIPcomputeHyperplaneThreePoints(scip, p1[0], p1[1], p1val, p2[0], p2[1], p2val, p4[0], p4[1], p4val,
1698 &alpha, &beta, &gamma_, &delta) );
1708 SCIP_CALL(
SCIPcomputeHyperplaneThreePoints(scip, p2[0], p2[1], p2val, p3[0], p3[1], p3val, p4[0], p4[1], p4val,
1709 &alpha, &beta, &gamma_, &delta) );
1719 SCIPdebugMsg(scip,
"alpha = %g, beta = %g, gamma = %g, delta = %g\n", alpha, beta, gamma_, delta);
1730 *coefx = -alpha / gamma_;
1731 *coefy = -beta / gamma_;
1732 *constant = delta / gamma_;
1754 assert(scip != NULL);
1755 assert(cons != NULL);
1756 assert(row != NULL);
1761 assert(consdata != NULL);
1772 SCIP_CALL(
SCIPcreateRowCons(scip, row,
SCIPconsGetHdlr(cons),
"bivaroveresthyperplanecut", 0, NULL, NULL, consdata->lhs - constant,
SCIPinfinity(scip),
TRUE,
FALSE,
TRUE) );
1775 if( consdata->z != NULL )
1831 assert(scip != NULL);
1832 assert(exprinterpreter != NULL);
1834 assert(xyref != NULL);
1835 assert(success != NULL);
1867 t = (yub - yval) / (yub - ylb);
1917 slb = (yval - yub) / (ylb - yval) * (xval / t - xub);
1918 sub = (yval - yub) / (ylb - yval) * (xval / t - xlb);
1929 if( *success ==
FALSE )
1936 rval = 1.0 / t * xval + (1.0 - 1.0 / t) * sval;
1939 rval =
MAX(xlb, MIN(rval, xub));
1990 *convenvvalue = t * frval + (1.0 - t) * fsval;
1992 SCIPdebugMsg(scip,
"Parallel: Cut of (xval,yval)=(%g,%g)\n",xval,yval);
1993 SCIPdebugMsg(scip,
"Parallel: r=%g in [%g,%g], s=%g in [%g,%g], f(r,ylb)=%g, f(xlb,s)=%g\n",rval,xlb,xub,sval,ylb,yub,frval,fsval);
1994 SCIPdebugMsg(scip,
"(r,ylb)=(%g,%g), (s,yub)=(%g,%g), vredval=%g\n",rval,ylb,sval,yub,*convenvvalue);
1998 SCIPdebugMsg(scip,
"f not differentiable in (x0,y0) w.r.t. x\n");
2003 cutcoeff[0] = (yub - ylb) * grad[0];
2004 cutcoeff[1] = fsval - frval - (sval - rval) * grad[0];
2005 cutcoeff[2] = yub - ylb;
2006 cutcoeff[3] = cutcoeff[0] * xval + cutcoeff[1] * yval - cutcoeff[2] * *convenvvalue;
2008 SCIPdebugMsg(scip,
"Parallel: cutcoeff[0]=%g, cutcoeff[1]=%g, cutcoeff[2]=1.0, cutcoeff[3]=%g\n",cutcoeff[0]/cutcoeff[2],cutcoeff[1]/cutcoeff[2],cutcoeff[3]/cutcoeff[2]);
2063 assert(scip != NULL);
2064 assert(exprinterpreter != NULL);
2066 assert(convenvvalue != NULL);
2067 assert(success != NULL);
2098 SCIPdebugMsg(scip,
"%s[%g,%g] = %g %s[%g,%g] = %g\n",
SCIPvarGetName(x), xlb, xub, xval,
SCIPvarGetName(y), ylb, yub, yval);
2101 if( yval <= (ylb-yub) / (xub-xlb) * (xval-xlb) + yub )
2165 tlb = (yval-ylb)/(yub-ylb);
2166 tub = (xub-xval)/(xub-xlb);
2172 if( *success ==
FALSE )
2180 rval = (yval-(1-tval)*ylb)/tval;
2181 rval =
MAX(ylb, MIN(yub, rval));
2182 sval = (xval-xlb*tval)/(1-tval);
2183 sval =
MAX(xlb, MIN(xub, sval));
2185 SCIPdebugMsg(scip,
"LowerLeft: t[%g,%g] = %g -> r = %g, s = %g\n",tlb,tub,tval,rval,sval);
2214 cutcoeff[0] = (rval-ylb) * grad_sval[0];
2215 cutcoeff[1] = (sval-xlb) * grad_sval[0] + frval - fsval;
2216 cutcoeff[2] = rval-ylb;
2217 cutcoeff[3] = cutcoeff[0]*xlb+cutcoeff[1]*rval-cutcoeff[2]*frval;
2219 else if( !
SCIPisEQ(scip,rval,yub) )
2227 cutcoeff[0] = (rval-ylb)*grad_rval[1]+fsval-frval;
2228 cutcoeff[1] = (sval-xlb)*grad_rval[1];
2229 cutcoeff[2] = sval-xlb;
2230 cutcoeff[3] = cutcoeff[0]*xlb+cutcoeff[1]*rval-cutcoeff[2]*frval;
2241 cutcoeff[0] = (rval-ylb)* MIN(grad_sval[0],grad_rval[0]);
2242 cutcoeff[1] = (sval-xlb)* MIN(grad_sval[0],grad_rval[0])+frval-fsval;
2243 cutcoeff[2] = (rval-ylb);
2244 cutcoeff[3] = cutcoeff[0]*xlb+cutcoeff[1]*rval-cutcoeff[2]*frval;
2247 SCIPdebugMsg(scip,
"LowerLeft: Cut of (xval,yval)=(%g,%g)\n",xval,yval);
2248 SCIPdebugMsg(scip,
"LowerLeft: r=%g in [%g,%g], s=%g in [%g,%g], f(s,ylb)=%g, f(xlb,r)=%g\n",rval,xlb,xub,sval,ylb,yub,fsval,frval);
2249 SCIPdebugMsg(scip,
"(s,ylb)=(%g,%g) (xlb,r)=(%g,%g) t=%g, vredval=%g\n",sval,ylb,xlb,rval,tval,*convenvvalue);
2250 SCIPdebugMsg(scip,
"LowerLeft: cutcoeff[0]=%g, cutcoeff[1]=%g,cutcoeff[2]=%g,cutcoeff[3]=%g\n",cutcoeff[0],cutcoeff[1],cutcoeff[2],cutcoeff[3]);
2315 tlb = (yub-yval)/(yub-ylb);
2316 tub = (xval-xlb)/(xub-xlb);
2323 if( *success ==
FALSE )
2332 rval = (yval-(1.0-tval)*yub)/tval;
2335 rval =
MAX(ylb, MIN(yub, rval));
2337 sval = (xval-xub*tval)/(1.0-tval);
2340 sval =
MAX(xlb, MIN(xub, sval));
2353 *convenvvalue = tval * frval + (1.0-tval) * fsval;
2367 cutcoeff[0] = (yub-rval)*grad_sval[0];
2368 cutcoeff[1] = (xub-sval)*grad_sval[0]+fsval-frval;
2369 cutcoeff[2] = yub-rval;
2370 cutcoeff[3] = cutcoeff[0]*sval+cutcoeff[1]*yub-cutcoeff[2]*fsval;
2372 else if( !
SCIPisEQ(scip,rval,ylb) )
2380 cutcoeff[0] = (yub-rval)*grad_rval[1]+frval-fsval;
2381 cutcoeff[1] = (xub-sval)*grad_rval[1];
2382 cutcoeff[2] = xub-sval;
2383 cutcoeff[3] = cutcoeff[0]*sval+cutcoeff[1]*yub-cutcoeff[2]*fsval;
2390 assert(
SCIPisFeasLE(scip, yval, (ylb-yub) / (xub-xlb) * (xval-xlb) + yub));
2398 cutcoeff[0] = (yub-rval)*MIN(grad_sval[0],grad_rval[0]);
2399 cutcoeff[1] = (xub-sval)*MIN(grad_sval[0],grad_rval[0])+fsval-frval;
2400 cutcoeff[2] = xub-sval;
2401 cutcoeff[3] = cutcoeff[0]*sval+cutcoeff[1]*yub-cutcoeff[2]*fsval;
2404 SCIPdebugMsg(scip,
"UpperRight: Cut of (xval,yval)=(%g,%g)\n",xval,yval);
2405 SCIPdebugMsg(scip,
"UpperRight: r=%g in [%g,%g], s=%g in [%g,%g], f(r,yub)=%g, f(xub,s)=%g\n",rval,xlb,xub,sval,ylb,yub,frval,fsval);
2406 SCIPdebugMsg(scip,
"(s,yub)=(%g,%g) (xub,r)=(%g,%g) t=%g, vredval=%g\n",sval,yub,xub,rval,tval,*convenvvalue);
2407 SCIPdebugMsg(scip,
"UpperRight: cutcoeff[0]=%g, cutcoeff[1]=%g, cutcoeff[2]=%g, cutcoeff[3]=%g\n",cutcoeff[0],cutcoeff[1],cutcoeff[2],cutcoeff[3]);
2459 assert(scip != NULL);
2460 assert(exprinterpreter != NULL);
2462 assert(convenvvalue != NULL);
2463 assert(success != NULL);
2496 if( yval <= (yub-ylb)/(xub-xlb)*(xval-xlb)+ylb )
2563 tlb = (xub-xval)/(xub-xlb);
2564 tub = (yub-yval)/(yub-ylb);
2569 if( *success ==
FALSE )
2579 rval = xub+(xval-xub)/tval;
2580 rval =
MAX(xlb, MIN(xub, rval));
2581 sval = (yval-tval*ylb)/(1-tval);
2582 sval =
MAX(ylb, MIN(yub, sval));
2609 cutcoeff[0] = (sval-ylb)*grad_rval[0];
2610 cutcoeff[1] = (rval-xub)*grad_rval[0]-frval+fsval;
2611 cutcoeff[2] = sval-ylb;
2612 cutcoeff[3] = cutcoeff[0]*xub+cutcoeff[1]*sval-cutcoeff[2]*fsval;
2614 else if( !(
SCIPisEQ(scip,sval,yub)) )
2622 cutcoeff[0] = (ylb-sval)*grad_sval[1]-frval+fsval;
2623 cutcoeff[1] = (xub-rval)*grad_sval[1];
2624 cutcoeff[2] = xub-rval;
2625 cutcoeff[3] = cutcoeff[0]*xub+cutcoeff[1]*sval-cutcoeff[2]*fsval;
2636 cutcoeff[0] = (sval-ylb)*MIN(grad_sval[0],grad_rval[0]);
2637 cutcoeff[1] = (rval-xub)*MIN(grad_sval[0],grad_rval[0])+fsval-frval;
2638 cutcoeff[2] = sval-ylb;
2639 cutcoeff[3] = cutcoeff[0]*xub+cutcoeff[1]*sval-cutcoeff[2]*fsval;
2643 SCIPdebugMsg(scip,
"LowerRight: Cut of (xval,yval)=(%g,%g)\n",xval,yval);
2644 SCIPdebugMsg(scip,
"LowerRight: t=%g in [%g,%g], r=%g in [%g,%g], s=%g in [%g,%g]\n",tval,tlb,tub,rval,xlb,xub,sval,ylb,yub);
2645 SCIPdebugMsg(scip,
"LowerRight: (r,ylb)=(%g,%g) (xub,sval)=(%g,%g) vredval=%g\n",rval,ylb,xub,sval,*convenvvalue);
2646 SCIPdebugMsg(scip,
"LowerRight: cutcoeff[0]=%g, cutcoeff[1]=%g,cutcoeff[2]=1.0,cutcoeff[3]=%g\n",cutcoeff[0]/cutcoeff[2],cutcoeff[1]/cutcoeff[2],cutcoeff[3]/cutcoeff[2]);
2715 tlb = (xval-xlb)/(xub-xlb);
2716 tub = (yval-ylb)/(yub-ylb);
2721 if( *success ==
FALSE )
2731 rval = xlb+(xval-xlb)/tval;
2732 rval =
MAX(xlb, MIN(xub, rval));
2733 sval = (yval-tval*yub)/(1-tval);
2734 sval =
MAX(ylb, MIN(yub, sval));
2761 cutcoeff[0] = (yub-sval)*grad_rval[0];
2762 cutcoeff[1] = (xlb-rval)*grad_rval[0]-fsval+frval;
2763 cutcoeff[2] = yub-sval;
2764 cutcoeff[3] = cutcoeff[0]*xlb+cutcoeff[1]*sval-cutcoeff[2]*fsval;
2766 else if( !
SCIPisEQ(scip,sval,ylb) )
2774 cutcoeff[0] = (sval-yub)*grad_sval[1]-fsval+frval;
2775 cutcoeff[1] = (rval-xlb)*grad_sval[1];
2776 cutcoeff[2] = rval-xlb;
2777 cutcoeff[3] = cutcoeff[0]*xlb+cutcoeff[1]*sval-cutcoeff[2]*fsval;
2788 cutcoeff[0] = (yub-sval)*MIN(grad_rval[0],grad_sval[0]);
2789 cutcoeff[1] = (xlb-rval)*MIN(grad_rval[0],grad_sval[0])-fsval+frval;
2790 cutcoeff[2] = yub-sval;
2791 cutcoeff[3] = cutcoeff[0]*xlb+cutcoeff[1]*sval-cutcoeff[2]*fsval;
2794 SCIPdebugMsg(scip,
"UpperLeft: Cut of (xval,yval)=(%g,%g)\n",xval,yval);
2795 SCIPdebugMsg(scip,
"UpperLeft: r=%g in [%g,%g], s=%g in [%g,%g], f(r,yub)=%g, f(xlb,s)=%g\n",rval,xlb,xub,sval,ylb,yub,frval,fsval);
2796 SCIPdebugMsg(scip,
"t=%g in [%g,%g], (r,yub)=(%g,%g) (xlb,sval)=(%g,%g) vredval=%g\n",tval,tlb,tub,rval,yub,xlb,sval,*convenvvalue);
2797 SCIPdebugMsg(scip,
"UpperLeft: cutcoeff[0]=%g, cutcoeff[1]=%g,cutcoeff[2]=1.0,cutcoeff[3]=%g\n",cutcoeff[0]/cutcoeff[2],cutcoeff[1]/cutcoeff[2],cutcoeff[3]/cutcoeff[2]);
2829 assert(scip != NULL);
2830 assert(exprinterpreter != NULL);
2832 assert(success != NULL);
2833 assert(xyref != NULL);
2857 SCIPdebugMsg(scip,
"skip convex-concave underestimator, since y is unbounded\n");
2875 SCIPdebugMsg(scip,
"skip convex-concave underestimator, since both x and y are fixed\n");
2886 SCIPdebugMsg(scip,
"cannot evaluate function at (xlb, ylb)\n");
2896 SCIPdebugMsg(scip,
"cannot evaluate function at (xlb, yub)\n");
2900 slope = (f_yub - f_ylb) / (yub - ylb);
2905 cutcoeff[1] = slope;
2907 cutcoeff[3] = -(f_ylb - slope * ylb);
2908 *convenvvalue = f_ylb+slope*(yval-ylb);
2927 perturb(&xval, xlb, xub, 0.001);
2934 SCIPdebugMsg(scip,
"cannot evaluate function or derivative in (xval,ylb), also after perturbation\n");
2941 cutcoeff[0] = grad[0];
2944 cutcoeff[3] = -(fval - grad[0] * xval);
2945 *convenvvalue = fval;
2976 perturb(&xval, xlb, xub, 0.001);
2982 cutcoeff[0] = (yub - ylb) * MIN(gradylb[0], gradyub[0]);
2984 cutcoeff[0] = (yub - ylb) *
MAX(gradylb[0], gradyub[0]);
2985 cutcoeff[1] = fvalyub - fvalylb;
2986 cutcoeff[2] = yub - ylb;
2987 cutcoeff[3] = cutcoeff[0] * xval + cutcoeff[1] * ylb - cutcoeff[2] * fvalylb;
2988 *convenvvalue = fvalylb;
2990 SCIPdebugMsg(scip,
"alpha: %g, beta: %g, gamma: 1.0, delta: %g\n",
2991 cutcoeff[0]/cutcoeff[2], cutcoeff[1]/cutcoeff[2], cutcoeff[3]/cutcoeff[2]);
3007 assert(!
SCIPisEQ(scip, xlb, xval));
3008 assert(!
SCIPisEQ(scip, xub, xval));
3010 assert(f_yfixed != NULL);
3020 perturb(&yval, ylb, yub, 0.001);
3048 SCIPdebugMsg(scip,
"couldn't solve deriv equ, compare f(%g,%g) - %g*%g = %g and f(%g,%g) - %g*%g = %g\n",
3049 xlb, ylb, grad[0], xlb, fxlb - grad[0] * xlb,
3050 xub, ylb, grad[0], xub, fxub - grad[0] * xub);
3054 if( fxlb - grad[0] * xlb > fxub - grad[0] * xub )
3063 perturb(&yval, ylb, yub, 0.001);
3072 SCIPdebugMsg(scip,
"xtilde = %g, f(%g,%g) = %g\n", xtilde, xtilde, yub, ftilde);
3075 cutcoeff[0] = (yub - ylb) * grad[0];
3076 cutcoeff[1] = ftilde - fval - grad[0] * (xtilde - xval);
3077 cutcoeff[2] = yub - ylb;
3078 cutcoeff[3] = cutcoeff[0] * xval + cutcoeff[1] * ylb - cutcoeff[2] * fval;
3079 *convenvvalue = fval;
3081 SCIPdebugMsg(scip,
"alpha: %g, beta: %g, gamma: %g, delta: %g\n", cutcoeff[0], cutcoeff[1], cutcoeff[2], cutcoeff[3]);
3097 assert(f_yfixed != NULL);
3107 perturb(&yval, ylb, yub, 0.001);
3131 SCIPdebugMsg(scip,
"couldn't solve deriv equ, compare f(%g,%g) - %g*%g = %g and f(%g,%g) - %g*%g = %g\n",
3132 xlb, yub, grad[0], xlb, fxlb - grad[0] * xlb,
3133 xub, yub, grad[0], xub, fxub - grad[0] * xub);
3137 if( fxlb - grad[0] * xlb < fxub - grad[0] * xub )
3146 perturb(&yval, ylb, yub, 0.001);
3155 SCIPdebugMsg(scip,
"xtilde = %g, f(%g,%g) = %g\n", xtilde, xtilde, ylb, ftilde);
3158 cutcoeff[0] = (yub - ylb) * grad[0];
3159 cutcoeff[1] = grad[0] * (xtilde - xval) - ftilde + fval;
3160 cutcoeff[2] = yub - ylb;
3161 cutcoeff[3] = cutcoeff[0] * xval + cutcoeff[1] * yub - cutcoeff[2] * fval;
3162 *convenvvalue = fval;
3164 SCIPdebugMsg(scip,
"alpha: %g, beta: %g, gamma: %g, delta: %g\n", cutcoeff[0], cutcoeff[1], cutcoeff[2], cutcoeff[3]);
3177 const char* paramnames[4] = {
"x0",
"y0",
"ylb",
"yub"};
3189 assert(vred != NULL);
3199 paramvals[0] = xval;
3200 paramvals[1] = yval;
3211 t = (yub - yval) / (yub - ylb);
3213 slb = (yval - yub) / (ylb - yval) * (xval / t - xub);
3217 sub = (yval - yub) / (ylb - yval) * (xval / t - xlb);
3232 rval = xval / t + (1.0 - 1.0 / t) * sval;
3235 rval =
MAX(xlb, MIN(rval, xub));
3286 *convenvvalue = t * frval + (1.0 - t) * fsval;
3288 SCIPdebugMsg(scip,
"Parallel: Cut of (xval,yval)=(%g,%g)\n",xval,yval);
3289 SCIPdebugMsg(scip,
"Parallel: r=%g s=%g in [%g,%g], y in [%g,%g], f(r,ylb)=%g, f(xlb,s)=%g\n",rval,sval,xlb,xub,ylb,yub,frval,fsval);
3290 SCIPdebugMsg(scip,
"(r,ylb)=(%g,%g), (s,yub)=(%g,%g), vredval=%g\n",rval,ylb,sval,yub,*convenvvalue);
3294 SCIPdebugMsg(scip,
"f not differentiable at (x0,y0) w.r.t. x\n");
3300 cutcoeff[0] = (yub - ylb) * grad[0];
3301 cutcoeff[1] = fsval - frval - (sval - rval) * grad[0];
3302 cutcoeff[2] = yub - ylb;
3303 cutcoeff[3] = cutcoeff[0] * xval + cutcoeff[1] * yval - cutcoeff[2] * *convenvvalue;
3305 SCIPdebugMsg(scip,
"Parallel: cutcoeff[0]=%g, cutcoeff[1]=%g,cutcoeff[2]=1.0,cutcoeff[3]=%g\n",cutcoeff[0]/cutcoeff[2],cutcoeff[1]/cutcoeff[2],cutcoeff[3]/cutcoeff[2]);
3331 assert(scip != NULL);
3333 assert(cons != NULL);
3334 assert(row != NULL);
3337 assert(consdata != NULL);
3338 assert(consdata->f != NULL);
3343 SCIPdebugMsg(scip,
"generate %sestimator for convex-concave constraint <%s>\n",
3352 if( consdata->sepaconvexconcave.lineariny )
3366 SCIP_CALL(
SCIPcreateRowCons(scip, row,
SCIPconsGetHdlr(cons), cutname, 0, NULL, NULL, consdata->lhs - constant,
SCIPinfinity(scip),
TRUE,
FALSE,
TRUE) );
3369 if( consdata->z != NULL )
3380 assert(consdata->sepaconvexconcave.f_neg_swapped != NULL);
3382 xyref_[0] = xyref[1];
3383 xyref_[1] = xyref[0];
3384 SCIP_CALL(
generateConvexConcaveUnderestimator(scip, exprinterpreter, consdata->sepaconvexconcave.f_neg_swapped, consdata->sepaconvexconcave.f_neg_swapped_yfixed, consdata->sepaconvexconcave.vred_neg_swapped, xyref_, cutcoeff, &dummy, &success) );
3399 coefs[0] = -cutcoeff[1] / cutcoeff[2];
3400 coefs[1] = -cutcoeff[0] / cutcoeff[2];
3405 if( consdata->z != NULL )
3418 if( consdata->sepaconvexconcave.linearinx )
3432 SCIP_CALL(
SCIPcreateRowCons(scip, row,
SCIPconsGetHdlr(cons), cutname, 0, NULL, NULL, -
SCIPinfinity(scip), consdata->rhs - constant,
TRUE,
FALSE,
TRUE) );
3435 if( consdata->z != NULL )
3444 assert(!consdata->sepaconvexconcave.linearinx);
3462 coefs[0] = cutcoeff[0] / cutcoeff[2];
3463 coefs[1] = cutcoeff[1] / cutcoeff[2];
3468 if( consdata->z != NULL )
3511 assert(success != NULL);
3514 idx =
SCIPisEQ(scip, xlb, xub) ? 0 : 1;
3535 if( min_max * (grad_lb[idx] - grad_ub[idx]) >= 0 )
3550 cutcoeff[1] = grad[1];
3557 cutcoeff[0] = grad[0];
3561 cutcoeff[3] = -(fval-cutcoeff[0]*xval-cutcoeff[1]*yval);
3562 *convenvvalue = fval;
3591 assert(scip != NULL);
3592 assert(exprinterpreter != NULL);
3594 assert(convenvvalue != NULL);
3595 assert(success != NULL);
3615 SCIPdebugMsg(scip,
"xval=%g in [%g,%g], yval=%g in [%g,%g]\n",xval,xlb,xub,yval,ylb,yub);
3632 cutcoeff[0] = grad[0];
3635 cutcoeff[3] = -(fval - grad[0] * xval);
3657 cutcoeff[1] = grad[1];
3659 cutcoeff[3] = -(fval - grad[1] * yval);
3677 SCIP_CALL(
lifting(scip,exprinterpreter,f,xval,yval,xlb,xlb,ylb,yub,-1,cutcoeff,convenvvalue,success) );
3682 SCIPdebugMsg(scip,
"Boundary x=lb: Cut of (xval,yval)=(%g,%g)\n",xval,yval);
3683 SCIPdebugMsg(scip,
"convenvvalue = %g\n",*convenvvalue);
3684 SCIPdebugMsg(scip,
"cutcoeff[0]=%g, cutcoeff[1]=%g,cutcoeff[2]=%g,cutcoeff[3]=%g\n",
3685 cutcoeff[0],cutcoeff[1],cutcoeff[2],cutcoeff[3]);
3694 SCIP_CALL(
lifting(scip,exprinterpreter,f,xval,yval,xlb,xub,ylb,ylb,-1,cutcoeff,convenvvalue,success) );
3699 SCIPdebugMsg(scip,
"Boundary y=lb: Cut of (xval,yval)=(%g,%g)\n",xval,yval);
3700 SCIPdebugMsg(scip,
"convenvvalue = %g\n",*convenvvalue);
3701 SCIPdebugMsg(scip,
"cutcoeff[0]=%g, cutcoeff[1]=%g,cutcoeff[2]=%g,cutcoeff[3]=%g\n",
3702 cutcoeff[0],cutcoeff[1],cutcoeff[2],cutcoeff[3]);
3719 SCIP_CALL(
lifting(scip,exprinterpreter,f,xval,yval,xub,xub,ylb,yub,1,cutcoeff,convenvvalue,success) );
3724 SCIPdebugMsg(scip,
"Boundary x=ub: Cut of (xval,yval)=(%g,%g)\n",xval,yval);
3725 SCIPdebugMsg(scip,
"convenvvalue = %g\n",*convenvvalue);
3726 SCIPdebugMsg(scip,
"cutcoeff[0]=%g, cutcoeff[1]=%g,cutcoeff[2]=%g,cutcoeff[3]=%g\n",
3727 cutcoeff[0],cutcoeff[1],cutcoeff[2],cutcoeff[3]);
3736 SCIP_CALL(
lifting(scip,exprinterpreter,f,xval,yval,xlb,xub,yub,yub,1,cutcoeff,convenvvalue,success) );
3741 SCIPdebugMsg(scip,
"Boundary y=ub: Cut of (xval,yval)=(%g,%g)\n",xval,yval);
3742 SCIPdebugMsg(scip,
"convenvvalue = %g\n",*convenvvalue);
3743 SCIPdebugMsg(scip,
"cutcoeff[0]=%g, cutcoeff[1]=%g,cutcoeff[2]=%g,cutcoeff[3]=%g\n",
3744 cutcoeff[0],cutcoeff[1],cutcoeff[2],cutcoeff[3]);
3750 SCIPerrorMessage(
"Tries to compute underestimator for a point at the boundary. But point is not on the boundary!\n");
3803 assert(scip != NULL);
3804 assert(exprinterpreter != NULL);
3806 assert(convenvvalue != NULL);
3807 assert(success != NULL);
3830 SCIPdebugMsg(scip,
"skip 1-convex underestimator since function cannot be evaluated\n");
3836 SCIPdebugMsg(scip,
"skip 1-convex underestimator since function cannot be differentiated\n");
3844 SCIPdebugMsg(scip,
"xval=%g in [%g,%g], yval=%g in [%g,%g]\n", xyref[0], xlb, xub, xyref[1], ylb, yub);
3848 if( fval_xub_ylb-fval_xlb_yub <= (xub-xlb)*grad_xub_ylb[0]-(yub-ylb)*grad_xlb_yub[1] )
3883 assert(swapped == 1);
3885 xyref_[0] = xyref[1];
3886 xyref_[1] = xyref[0];
3894 swap_buffer = all_cutcoeff[0][0];
3895 all_cutcoeff[0][0] = all_cutcoeff[0][1];
3896 all_cutcoeff[0][1] = swap_buffer;
3898 swap_buffer = all_cutcoeff[1][0];
3899 all_cutcoeff[1][0] = all_cutcoeff[1][1];
3900 all_cutcoeff[1][1] = swap_buffer;
3907 SCIPdebugMsg(scip,
"Triangulation: convenvvalue=%g\n", all_convenvvalue[0]);
3908 SCIPdebugMsg(scip,
"Parallel Y: convenvvalue=%g\n", all_convenvvalue[1]);
3913 if( all_success[0] && all_success[1] )
3916 for( i = 0; i < 2; ++i )
3923 if( all_convenvvalue[i] < lowest )
3926 lowest = all_convenvvalue[i];
3930 assert(lowestidx >= 0);
3932 *convenvvalue = all_convenvvalue[lowestidx];
3933 cutcoeff[0] = all_cutcoeff[lowestidx][0];
3934 cutcoeff[1] = all_cutcoeff[lowestidx][1];
3935 cutcoeff[2] = all_cutcoeff[lowestidx][2];
3936 cutcoeff[3] = all_cutcoeff[lowestidx][3];
3998 assert(scip != NULL);
3999 assert(exprinterpreter != NULL);
4001 assert(convenvvalue != NULL);
4002 assert(success != NULL);
4029 SCIPdebugMsg(scip,
"skip 1-convex underestimator since function cannot be evaluated\n");
4035 SCIPdebugMsg(scip,
"skip 1-convex underestimator since function cannot be differentiated\n");
4039 SCIPdebugMsg(scip,
"xval=%g in [%g,%g], yval=%g in [%g,%g]\n",xyref[0],xlb,xub,xyref[1],ylb,yub);
4042 if(
SCIPisGE( scip, fval_xlb_ylb+(yub-ylb)*grad_xlb_ylb[1], fval_xub_yub+(xlb-xub)*grad_xub_yub[0] ) )
4077 assert(swapped == 1);
4079 xyref_[0] = xyref[1];
4080 xyref_[1] = xyref[0];
4087 swap_buffer = all_cutcoeff[0][0];
4088 all_cutcoeff[0][0] = all_cutcoeff[0][1];
4089 all_cutcoeff[0][1] = swap_buffer;
4091 swap_buffer = all_cutcoeff[1][0];
4092 all_cutcoeff[1][0] = all_cutcoeff[1][1];
4093 all_cutcoeff[1][1] = swap_buffer;
4100 SCIPdebugMsg(scip,
"Triangulation: convenvvalue=%g\n", all_convenvvalue[0]);
4101 SCIPdebugMsg(scip,
"Parallel Y: convenvvalue=%g\n", all_convenvvalue[1]);
4106 if( all_success[0] && all_success[1] )
4109 for( i = 0; i < 2; ++i )
4117 if( all_convenvvalue[i] < lowest )
4119 lowest = all_convenvvalue[i];
4123 assert(lowestidx >= 0);
4125 *convenvvalue = all_convenvvalue[lowestidx];
4126 cutcoeff[0] = all_cutcoeff[lowestidx][0];
4127 cutcoeff[1] = all_cutcoeff[lowestidx][1];
4128 cutcoeff[2] = all_cutcoeff[lowestidx][2];
4129 cutcoeff[3] = all_cutcoeff[lowestidx][3];
4173 assert(scip != NULL);
4174 assert(cons != NULL);
4175 assert(row != NULL);
4178 assert(consdata != NULL);
4195 xy_mid[0] = 0.5 * (xlb+xub);
4196 xy_mid[1] = 0.5 * (ylb+yub);
4221 perturb(&xyref[0], xlb, xub, 0.001);
4222 perturb(&xyref[1], ylb, yub, 0.001);
4279 rhs = consdata->rhs + cutcoeff[3]/cutcoeff[2];
4284 if( consdata->z != NULL )
4309 assert(scip != NULL);
4310 assert(cons != NULL);
4311 assert(row != NULL);
4314 assert(consdata != NULL);
4335 SCIPdebugMsg(scip,
"convextype = %d\n",consdata->convextype);
4336 SCIPdebugMsg(scip,
"%s = %g with bounds [%g, %g], %s = %g with bounds [%g, %g]",
4339 if( consdata->z != NULL )
4345 switch( consdata->convextype )
4385 SCIPdebugMsg(scip,
"cut generation for convexity type not implemented\n");
4402 while( maxcoef / mincoef > cutmaxrange )
4410 SCIPdebugMsg(scip,
"cut coefficients for constraint <%s> have very large range: mincoef = %g maxcoef = %g\n",
SCIPconsGetName(cons), mincoef, maxcoef);
4413 if( mincoef == consdata->zcoef )
4415 SCIPdebugMsg(scip,
"could not eliminate small coefficient, since it comes from linear part\n");
4427 assert(var != NULL);
4453 SCIPdebugMsg(scip,
"could not eliminate small coefficient\n");
4473 if( maxcoef / mincoef > cutmaxrange )
4475 SCIPdebugMsg(scip,
"drop row for constraint <%s> because range of coefficients is too large: mincoef = %g, maxcoef = %g -> range = %g\n",
4506 assert(consdata != NULL);
4507 assert(consdata->f != NULL);
4509 switch( consdata->convextype )
4547 void printEstimator(
4556 const char* varnames[2] = {
"x",
"y"};
4561 assert(scip != NULL);
4562 assert(cons != NULL);
4563 assert(row != NULL);
4566 assert(consdata != NULL);
4580 if( var != x && var != y )
4586 SCIPinfoMessage(scip, NULL,
", \"< echo '%g %g %g'\" with circles",
SCIPgetSolVal(scip, sol, x),
SCIPgetSolVal(scip, sol, y), consdata->activity);
4618 assert(scip != NULL);
4619 assert(conshdlr != NULL);
4620 assert(conss != NULL || nconss == 0);
4621 assert(nusefulconss <= nconss);
4622 assert(result != NULL);
4626 if( bestefficacy != NULL )
4627 *bestefficacy = 0.0;
4630 assert(conshdlrdata != NULL);
4632 for( c = 0; c < nconss; ++c )
4634 assert(conss != NULL);
4636 assert(consdata != NULL);
4647 SCIP_CALL(
generateCut(scip, conshdlrdata->exprinterpreter, conss[c], sol, violside, conshdlrdata->cutmaxrange, &row) );
4655 efficacy = -feasibility;
4657 SCIPdebug( printEstimator(scip, sol, conss[c], violside, row) );
4660 if( (
SCIPisGT(scip, efficacy, minefficacy) ||
4675 SCIPdebugMsg(scip,
"added cut with efficacy %g for constraint <%s> violated by %g\n", efficacy,
SCIPconsGetName(conss[c]),
MAX(consdata->lhsviol, consdata->rhsviol));
4678 if( bestefficacy != NULL && efficacy > *bestefficacy )
4679 *bestefficacy = efficacy;
4682 if( inenforcement && !conshdlrdata->enfocutsremovable )
4687 SCIPdebugMsg(scip,
"abandon cut since efficacy %g is too small or not applicable\n", efficacy);
4720 assert(scip != NULL);
4721 assert(event != NULL);
4722 assert(eventdata != NULL);
4723 assert(eventhdlr != NULL);
4735 assert(conshdlrdata != NULL);
4738 assert(sol != NULL);
4748 assert(conss != NULL);
4754 for( c = 0; c < nconss; ++c )
4760 assert(consdata != NULL);
4799 assert(scip != NULL);
4800 assert(conss != NULL || nconss == 0);
4804 for( c = 0; c < nconss; ++c )
4806 assert(conss != NULL);
4808 assert(consdata != NULL);
4816 switch( consdata->convextype )
4914 assert(scip != NULL);
4915 assert(conss != NULL || nconss == 0);
4920 for( c = 0; c < nconss; ++c )
4922 assert(conss != NULL);
4924 assert(consdata != NULL);
4925 assert(consdata->f != NULL);
4930 for( i = 0; i < 2; ++i )
4945 if( *brvar != NULL )
4971 assert(scip != NULL);
4972 assert(conss != NULL || nconss == 0);
4973 assert(reduceddom != NULL);
4974 assert(infeasible != NULL);
4976 *reduceddom =
FALSE;
4977 *infeasible =
FALSE;
4979 for( c = 0; c < nconss; ++c )
4981 assert(conss != NULL);
4983 assert(consdata != NULL);
5006 if( consdata->z != NULL )
5011 coef = consdata->zcoef;
5014 SCIPdebugMsg(scip,
"Linear constraint with one variable: %g <= %g <%s> <= %g\n", lhs, coef,
SCIPvarGetName(consdata->z), rhs);
5045 SCIPdebugMsg(scip,
"Lower bound leads to infeasibility.\n");
5061 SCIPdebugMsg(scip,
"Upper bound leads to infeasibility.\n");
5097 assert(scip != NULL);
5098 assert(var != NULL);
5099 assert(result != NULL);
5101 assert(nchgbds != NULL);
5174 assert(scip != NULL);
5175 assert(cons != NULL);
5176 assert(result != NULL);
5177 assert(nchgbds != NULL);
5180 assert(conshdlrdata != NULL);
5181 assert(conshdlrdata->exprgraph != NULL);
5184 assert(consdata != NULL);
5185 assert(consdata->exprgraphnode != NULL);
5200 if( consdata->z != NULL )
5218 SCIPdebugMsg(scip,
"found constraint <%s> to be redundant: sides: [%g, %g], activity: [%g, %g]\n",
5227 SCIPdebugMsg(scip,
"found constraint <%s> to be infeasible; sides: [%g, %g], activity: [%g, %g], infeas: %g\n",
5235 if( consdata->z != NULL )
5295 assert(scip != NULL);
5296 assert(conshdlr != NULL);
5297 assert(conss != NULL || nconss == 0);
5298 assert(result != NULL);
5299 assert(nchgbds != NULL);
5300 assert(ndelconss != NULL);
5303 assert(conshdlrdata != NULL);
5304 assert(conshdlrdata->exprgraph != NULL);
5311 if( conshdlrdata->ispropagated )
5316 for( c = 0; c < nconss; ++c )
5318 assert(conss[c] != NULL);
5334 SCIPdebugMsg(scip,
"starting domain propagation round %d for %d constraints\n", roundnr, nconss);
5336 conshdlrdata->ispropagated =
TRUE;
5346 SCIPdebugMsg(scip,
"current bounds out of domain for some expression, do cutoff\n");
5354 for( c = 0; c < nconss && *result !=
SCIP_CUTOFF; ++c )
5356 assert(conss != NULL);
5363 *result = propresult;
5379 SCIPdebugMsg(scip,
"start backward propagation in expression graph\n");
5396 for( i = 0; i < nvars && propresult !=
SCIP_CUTOFF; ++i )
5402 *result = propresult;
5406 while( success && *result !=
SCIP_CUTOFF && ++roundnr < conshdlrdata->maxproprounds );
5435 assert(scip != NULL);
5436 assert(conshdlr != NULL);
5437 assert(conss != NULL || nconss == 0);
5438 assert(success != NULL);
5441 assert(conshdlrdata != NULL);
5442 assert(conshdlrdata->trysolheur != NULL);
5460 for( c = 0; c < nconss; ++c )
5463 assert(consdata != NULL);
5470 viol = consdata->lhs - consdata->activity;
5475 viol = consdata->rhs - consdata->activity;
5480 assert(viol != 0.0);
5481 if( consdata->mayincreasez &&
5482 ((viol > 0.0 && consdata->zcoef > 0.0) || (viol < 0.0 && consdata->zcoef < 0.0)) )
5487 delta = viol / consdata->zcoef;
5488 assert(delta > 0.0);
5493 delta = MIN(
MAX(0.0, gap), delta);
5505 viol -= consdata->zcoef * delta;
5511 assert(viol != 0.0);
5512 if( consdata->maydecreasez &&
5513 ((viol > 0.0 && consdata->zcoef < 0.0) || (viol < 0.0 && consdata->zcoef > 0.0)) )
5518 delta = viol / consdata->zcoef;
5519 assert(delta < 0.0);
5524 delta =
MAX(MIN(0.0, gap), delta);
5535 viol -= consdata->zcoef * delta;
5601 assert(scip != NULL);
5602 assert(srccons != NULL);
5603 assert(cons != NULL);
5604 assert(name != NULL);
5610 if( coefxx >= 0 && coefyy >= 0 && 4 * coefxx * coefyy >= coefxy * coefxy )
5616 else if( coefxx <= 0 && coefyy <= 0 && 4 * coefxx * coefyy >= coefxy * coefxy )
5622 else if( coefxx > 0 && coefyy > 0 )
5625 assert(4 * coefxx * coefyy < coefxy * coefxy);
5629 else if( coefxx < 0 && coefyy < 0 )
5632 assert(4 * coefxx * coefyy < coefxy * coefxy);
5639 assert(coefxx * coefyy <= 0);
5651 else if( coefyy != 0.0 )
5665 assert(coefxy != 0.0);
5673 lincoefs[0] = coefx * mult;
5674 lincoefs[1] = coefy * mult;
5679 quadelems[nquadelems].
idx1 = 0;
5680 quadelems[nquadelems].
idx2 = 0;
5681 quadelems[nquadelems].
coef = coefxx * mult;
5686 quadelems[nquadelems].
idx1 = 1;
5687 quadelems[nquadelems].
idx2 = 1;
5688 quadelems[nquadelems].
coef = coefyy * mult;
5693 quadelems[nquadelems].
idx1 = 0;
5694 quadelems[nquadelems].
idx2 = 1;
5695 quadelems[nquadelems].
coef = coefxy * mult;
5718 assert(mult == 1.0);
5721 SCIPdebugMsg(scip,
"upgrading constraint <%s> to bivariate constraint <%s> with convexity type %d\n",
SCIPconsGetName(srccons), name, convextype);
5724 exprtree, convextype, z, coefz, lhs, rhs,
5758 assert(scip != NULL);
5764 assert(exprtree != NULL);
5765 assert(mult != NULL);
5766 assert(convextype != NULL);
5769 *mult = coef < 0.0 ? -1.0 : 1.0;
5772 if( (p + q >= 1.0 && ((p > 1.0 && q < 0.0) || (p < 0.0 && q > 1.0))) ||
5773 (p < 0.0 && q < 0.0) )
5777 else if( (p > 1.0 && q > 1.0) || (p + q < 1.0 && ((p > 1.0 && q < 0.0) || (p < 0.0 && q > 1.0))) )
5781 else if( (p < 0.0 || p > 1.0) && q > 0.0 && q < 1.0 )
5785 else if( (p < 0.0 || p > 1.0) && q == 1.0 )
5791 else if( (q < 0.0 || q > 1.0) && p > 0.0 && p <= 1.0 )
5796 else if( p > 0.0 && p < 1.0 && q > 0.0 && q < 1.0 && p + q > 1.0 )
5801 else if( p == 1.0 && q > 0.0 && q < 1.0 )
5805 else if( q == 1.0 && p > 0.0 && p < 1.0 )
5810 else if( p == 1.0 && q == 1.0 )
5814 else if( p > 0.0 && p < 1.0 && q > 0.0 && q < 1.0 && p + q <= 1.0 )
5843 assert( e != NULL );
5875 assert(scip != NULL);
5876 assert(cons != NULL);
5877 assert(name != NULL);
5898 assert(mult == 1.0);
5901 SCIPdebugMsg(scip,
"upgrading monomial %g<%s>^%g<%s>^%g from constraint <%s> to bivariate constraint with convexity type %d\n",
5904 if( srccons != NULL )
5907 exprtree, convextype, z, zcoef, lhs, rhs,
5916 exprtree, convextype, z, zcoef, lhs, rhs,
5951 assert(scip != NULL);
5952 assert(conshdlr != NULL);
5953 assert(conss != NULL || nconss == 0);
5954 assert(result != NULL);
5957 assert(conshdlrdata != NULL);
5960 if( maxviolcons == NULL )
5977 if( conshdlrdata->nenforounds > 100 )
5990 ++conshdlrdata->nenforounds;
5995 conshdlrdata->nenforounds = 0;
5999 assert(consdata != NULL);
6000 maxviol = consdata->lhsviol + consdata->rhsviol;
6004 sol == NULL ?
"LP" :
"relaxation");
6011 *result = propresult;
6026 SCIPdebugMessage(
"separation succeeded (bestefficacy = %g, minefficacy = %g, cutoff = %d)\n", sepaefficacy,
6028 *result = separateresult;
6036 SCIPdebugMsg(scip,
"separation failed (bestefficacy = %g < %g = minefficacy ); max viol: %g\n", sepaefficacy,
6037 minefficacy, maxviol);
6043 if( nnotify == 0 && !solinfeasible && minefficacy > leastpossibleefficacy )
6047 &separateresult, &sepaefficacy) );
6050 *result = separateresult;
6055 if( nnotify == 0 && !solinfeasible )
6077 else if ( reduceddom )
6082 SCIPwarningMessage(scip,
"could not enforce feasibility by separating or branching; declaring solution with viol %g as feasible\n", maxviol);
6088 SCIPdebugMsg(scip,
"Could not find any usual branching variable candidate. Proposed variable <%s> with LP value %g for branching.\n",
6106 assert(scip != NULL);
6107 assert(conshdlr != NULL);
6124 assert(scip != NULL);
6125 assert(conshdlr != NULL);
6128 assert(conshdlrdata != NULL);
6129 assert(conshdlrdata->exprinterpreter != NULL);
6130 assert(conshdlrdata->exprgraph != NULL);
6136 if( conshdlrdata->exprinterpreter != NULL )
6152 assert(scip != NULL);
6153 assert(conshdlr != NULL);
6156 assert(conshdlrdata != NULL);
6158 conshdlrdata->subnlpheur =
SCIPfindHeur(scip,
"subnlp");
6159 conshdlrdata->trysolheur =
SCIPfindHeur(scip,
"trysol");
6170 assert(scip != NULL);
6171 assert(conshdlr != NULL);
6174 assert(conshdlrdata != NULL);
6176 conshdlrdata->subnlpheur = NULL;
6177 conshdlrdata->trysolheur = NULL;
6189 assert(scip != NULL);
6190 assert(conss != NULL || nconss == 0);
6192 for( c = 0; c < nconss; ++c )
6195 assert(consdata != NULL);
6198 consdata->mayincreasez =
FALSE;
6199 consdata->maydecreasez =
FALSE;
6220 assert(scip != NULL);
6221 assert(conss != NULL || nconss == 0);
6224 assert(conshdlrdata != NULL);
6226 if( !conshdlrdata->isremovedfixings )
6229 assert(conshdlrdata->isremovedfixings);
6233 for( c = 0; c < nconss; ++c )
6235 assert(conss != NULL);
6236 assert(conss[c] != NULL);
6244 assert(consdata != NULL);
6246 assert(consdata->f != NULL);
6266 #ifdef TYPESTATISTICS 6271 assert(scip != NULL);
6272 assert(conss != NULL || nconss == 0);
6275 assert(conshdlrdata != NULL);
6277 #ifdef TYPESTATISTICS 6282 for( c = 0; c < nconss; ++c )
6284 assert(conss[c] != NULL);
6287 assert(consdata != NULL);
6290 if( consdata->z != NULL )
6295 if( consdata->zcoef > 0.0 )
6309 consdata->maydecreasez =
TRUE;
6316 consdata->mayincreasez =
TRUE;
6327 consdata->z != NULL ? 1 : 0, consdata->z != NULL ? &consdata->z : NULL, &consdata->zcoef,
6329 consdata->f, consdata->lhs, consdata->rhs,
6339 #ifdef TYPESTATISTICS 6341 ++nconvextypeslhs[consdata->convextype];
6343 ++nconvextypesrhs[consdata->convextype];
6347 conshdlrdata->newsoleventfilterpos = -1;
6353 assert(eventhdlr != NULL);
6357 #ifdef TYPESTATISTICS 6360 const char*
typename;
6364 typename =
"allconvex";
6367 typename =
"1-convex";
6370 typename =
"convex-concave";
6374 typename =
"unknown";
6383 conshdlrdata->lastenfonode = NULL;
6384 conshdlrdata->nenforounds = 0;
6396 assert(scip != NULL);
6397 assert(conss != NULL || nconss == 0);
6400 assert(conshdlrdata != NULL);
6402 if( conshdlrdata->newsoleventfilterpos >= 0 )
6407 assert(eventhdlr != NULL);
6410 conshdlrdata->newsoleventfilterpos = -1;
6413 for( c = 0; c < nconss; ++c )
6416 assert(conss[c] != NULL);
6432 assert(scip != NULL);
6433 assert(cons != NULL);
6434 assert(consdata != NULL);
6438 assert(conshdlrdata != NULL);
6442 assert((*consdata)->exprgraphnode == NULL);
6444 if( (*consdata)->f != NULL )
6465 assert(sourcedata != NULL);
6468 assert(targetdata->eventfilterpos == -1);
6470 assert(sourcedata->f != NULL);
6475 if( sourcedata->z != NULL )
6507 assert(scip != NULL);
6508 assert(conshdlr != NULL);
6509 assert(conss != NULL || nconss == 0);
6512 assert(conshdlrdata != NULL);
6514 *infeasible =
FALSE;
6516 nref = conshdlrdata->ninitlprefpoints;
6520 SCIPdebugMsg(scip,
"skip LP initialization since ninitlprefpoints is 0\n");
6527 for( c = 0; c < nconss; ++c )
6529 assert(conss[c] != NULL);
6532 assert(consdata != NULL);
6533 assert(consdata->f != NULL);
6544 for( i = 0; i < 2; ++i )
6549 unbounded[i] =
FALSE;
6552 unbounded[i] =
TRUE;
6559 lb[i] = 2.0 * ub[i];
6563 unbounded[i] =
TRUE;
6571 ub[i] = 2.0 * lb[i];
6575 for( ix = 0; ix < nref; ++ix )
6578 xy[0] = lb[0] + ix * (ub[0] - lb[0]) / (nref - 1.0);
6580 xy[0] = (lb[0] + ub[0]) / 2.0;
6582 for( iy = 0; iy < nref; ++iy )
6585 xy[1] = lb[1] + iy * (ub[1] - lb[1]) / (nref - 1.0);
6587 xy[1] = (lb[1] + ub[1]) / 2.0;
6589 SCIPdebugMsg(scip,
"cons <%s>: generate cuts for <%s> = %g [%g,%g], <%s> = %g [%g,%g]\n",
6598 switch( consdata->convextype )
6602 if( !
SCIPisInfinity(scip, -consdata->lhs) && !unbounded[0] && !unbounded[1] && (ix == 0 || ix == nref-1) && (iy == 0 || iy == nref-1) )
6635 if( !
SCIPisInfinity(scip, -consdata->lhs) && !unbounded[0] && !unbounded[1] && (ix == 0 || ix == nref-1) && (iy == 0 || iy == nref-1) )
6643 if( !
SCIPisInfinity(scip, consdata->rhs) && !unbounded[0] && !unbounded[1] )
6652 SCIPwarningMessage(scip,
"initlp for convexity type %d not implemented\n", consdata->convextype);
6661 SCIPdebugMsg(scip,
"drop row1 for constraint <%s> because range of coefficients is too large: mincoef = %g, maxcoef = %g -> range = %g\n",
6683 SCIPdebugMsg(scip,
"drop row2 for constraint <%s> because range of coefficients is too large: mincoef = %g, maxcoef = %g -> range = %g\n",
6693 else if( !(*infeasible) )
6716 assert(scip != NULL);
6717 assert(conshdlr != NULL);
6718 assert(conss != NULL || nconss == 0);
6719 assert(result != NULL);
6724 if( maxviolcon == NULL )
6740 assert(scip != NULL);
6741 assert(conshdlr != NULL);
6742 assert(conss != NULL || nconss == 0);
6743 assert(sol != NULL);
6744 assert(result != NULL);
6749 if( maxviolcon == NULL )
6789 assert(scip != NULL);
6790 assert(conss != NULL || nconss == 0);
6793 if( maxviolcons == NULL )
6808 *result = propresult;
6817 for( c = 0; c < nconss; ++c )
6819 assert(conss != NULL);
6821 assert(consdata != NULL);
6822 assert(consdata->f != NULL);
6836 for( i = 0; i < 2; ++i )
6849 SCIPdebugMsg(scip,
"All variables in violated constraints fixed (up to epsilon). Cannot find branching candidate. Forcing solution of LP.\n");
6867 assert(scip != NULL);
6868 assert(conss != NULL || nconss == 0);
6869 assert(sol != NULL);
6870 assert(result != NULL);
6873 assert(conshdlrdata != NULL);
6878 maypropfeasible = conshdlrdata->linfeasshift && (conshdlrdata->trysolheur != NULL);
6879 for( c = 0; c < nconss; ++c )
6881 assert(conss != NULL);
6885 assert(consdata != NULL);
6895 SCIPinfoMessage(scip, NULL,
"violation: left hand side is violated by %.15g (scaled: %.15g)\n", consdata->lhs - consdata->activity, consdata->lhsviol);
6899 SCIPinfoMessage(scip, NULL,
"violation: right hand side is violated by %.15g (scaled: %.15g)\n", consdata->activity - consdata->rhs, consdata->rhsviol);
6903 if( (conshdlrdata->subnlpheur == NULL || sol == NULL) && !maypropfeasible && !completely )
6906 if( consdata->lhsviol > maxviol || consdata->rhsviol > maxviol )
6907 maxviol = consdata->lhsviol + consdata->rhsviol;
6911 maypropfeasible =
FALSE;
6913 if( maypropfeasible )
6919 if( !(consdata->mayincreasez && consdata->zcoef > 0.0) && !(consdata->maydecreasez && consdata->zcoef < 0.0) )
6920 maypropfeasible =
FALSE;
6927 if( !(consdata->mayincreasez && consdata->zcoef < 0.0) && !(consdata->maydecreasez && consdata->zcoef > 0.0) )
6928 maypropfeasible =
FALSE;
6959 assert(scip != NULL);
6960 assert(conshdlr != NULL);
6961 assert(conss != NULL || nconss == 0);
6962 assert(result != NULL);
6983 assert(scip != NULL);
6984 assert(conshdlr != NULL);
6985 assert(conss != NULL || nconss == 0);
6986 assert(result != NULL);
6991 assert(conshdlrdata != NULL);
6992 assert(conshdlrdata->exprgraph != NULL);
6994 if( !conshdlrdata->isremovedfixings )
6997 assert(conshdlrdata->isremovedfixings);
7001 for( c = 0; c < nconss; ++c )
7003 assert(conss != NULL);
7007 assert(consdata != NULL);
7031 switch( propresult )
7037 SCIPdebugMsg(scip,
"propagation says problem is infeasible in presolve\n");
7053 assert(scip != NULL);
7054 assert(cons != NULL);
7057 assert(consdata != NULL);
7059 if( consdata->z != NULL )
7061 if( consdata->zcoef > 0 )
7097 assert(scip != NULL);
7098 assert(conshdlr != NULL);
7099 assert(cons != NULL);
7103 assert(conshdlrdata != NULL);
7104 assert(conshdlrdata->exprgraph != NULL);
7107 assert(consdata != NULL);
7108 assert(consdata->exprgraphnode == NULL);
7114 assert(consdata->exprgraphnode != NULL);
7140 assert(scip != NULL);
7141 assert(conshdlr != NULL);
7142 assert(cons != NULL);
7146 assert(conshdlrdata != NULL);
7147 assert(conshdlrdata->exprgraph != NULL);
7150 assert(consdata != NULL);
7151 assert(consdata->exprgraphnode != NULL);
7167 assert(scip != NULL);
7168 assert(conshdlr != NULL);
7169 assert(cons != NULL);
7174 assert(conshdlrdata != NULL);
7175 assert(conshdlrdata->exprgraph != NULL);
7178 assert(consdata != NULL);
7179 assert(consdata->exprgraphnode != NULL);
7199 assert(scip != NULL);
7200 assert(conshdlr != NULL);
7201 assert(cons != NULL);
7205 assert(conshdlrdata != NULL);
7206 assert(conshdlrdata->exprgraph != NULL);
7209 assert(consdata != NULL);
7210 assert(consdata->exprgraphnode != NULL);
7228 assert(scip != NULL);
7229 assert(cons != NULL);
7232 assert(consdata != NULL);
7237 && !
SCIPisEQ(scip, consdata->lhs, consdata->rhs) )
7243 if( consdata->z != NULL )
7250 if(
SCIPisEQ(scip, consdata->lhs, consdata->rhs) )
7268 switch( consdata->convextype )
7294 assert(scip != NULL);
7295 assert(cons != NULL);
7296 assert(sourcescip != NULL);
7297 assert(sourceconshdlr != NULL);
7298 assert(sourcecons != NULL);
7299 assert(varmap != NULL);
7300 assert(valid != NULL);
7303 assert(consdata != NULL);
7304 assert(consdata->f != NULL);
7308 if( consdata->z != NULL )
7311 assert(!*valid || z != NULL);
7319 assert(!*valid || xy[0] != NULL);
7325 assert(!*valid || xy[1] != NULL);
7339 f, consdata->convextype, z, consdata->zcoef, consdata->lhs, consdata->rhs,
7340 initial, separate, enforce, check, propagate, local, modifiable, dynamic, removable, stickingatnode) );
7362 assert(cons != NULL);
7363 assert(vars != NULL);
7366 assert(consdata != NULL);
7370 vars[2] = consdata->z;
7413 assert(nupgdconss != NULL);
7414 assert(upgdconss != NULL);
7419 if( nbinquad + nintquad + ncontquad < 2 )
7432 x = quadvarterms[0].
var;
7433 y = quadvarterms[1].
var;
7435 coefxx = quadvarterms[0].
sqrcoef;
7436 coefyy = quadvarterms[1].
sqrcoef;
7439 if( coefxx == 0.0 && coefyy == 0.0 )
7443 if( nbilinterms == 0 )
7445 assert(nbilinterms == 1);
7447 assert(bilinterms[0].var1 == x || bilinterms[0].var1 == y);
7448 assert(bilinterms[0].var2 == x || bilinterms[0].var2 == y);
7450 coefxy = bilinterms[0].
coef;
7452 coefx = quadvarterms[0].
lincoef;
7453 coefy = quadvarterms[1].
lincoef;
7467 if( upgdconsssize < 1 )
7474 x, y, z, coefxx, coefx, coefyy, coefy, coefxy, zcoef,
SCIPgetLhsQuadratic(scip, cons),
SCIPgetRhsQuadratic(scip, cons)) );
7499 for( i = 0; i < nquadvarterms; ++i )
7500 if( quadvarterms[i].sqrcoef != 0.0 && quadvarterms[i].nadjbilin > 0 )
7504 if( i == nquadvarterms )
7529 if( !upgdlhs && !upgdrhs )
7533 if( upgdconsssize < nbilinterms + 1 + (keeporig ? 1 : 0) )
7535 *nupgdconss = -(nbilinterms + 1 + (keeporig ? 1 : 0));
7542 0, NULL, NULL, NULL,
7556 for( i = 0; i < nbilinterms; ++i )
7558 assert(bilinterms[i].coef != 0.0);
7560 x = bilinterms[i].
var1;
7561 y = bilinterms[i].
var2;
7565 assert(xpos < nquadvarterms);
7566 assert(quadvarterms[xpos].var == x);
7570 assert(ypos < nquadvarterms);
7571 assert(quadvarterms[ypos].var == y);
7573 coefxx = marked[xpos] ? 0.0 : quadvarterms[xpos].
sqrcoef;
7574 coefyy = marked[ypos] ? 0.0 : quadvarterms[ypos].
sqrcoef;
7579 if( coefxx == 0.0 && coefyy == 0.0 )
7598 coefx = marked[xpos] ? 0.0 : quadvarterms[xpos].
lincoef;
7599 coefy = marked[ypos] ? 0.0 : quadvarterms[ypos].
lincoef;
7600 coefxy = bilinterms[i].
coef;
7612 assert(*nupgdconss < upgdconsssize);
7615 x, y, auxvar, coefxx, coefx, coefyy, coefy, coefxy, -1.0,
7624 #ifdef WITH_DEBUG_SOLUTION 7625 if( SCIPdebugIsMainscip(scip) )
7631 SCIP_CALL(
SCIPdebugAddSolVal(scip, auxvar, coefxx * xval * xval + coefyy * yval * yval + coefxy * xval * yval + coefx * xval + coefy * yval) );
7637 marked[xpos] =
TRUE;
7638 marked[ypos] =
TRUE;
7641 if( *nupgdconss == 0 )
7649 for( i = 0; i < nquadvarterms; ++i )
7654 x = quadvarterms[i].
var;
7660 if( quadvarterms[i].nadjbilin > 0 )
7666 if( quadvarterms[i].sqrcoef != 0.0 )
7678 else if( quadvarterms[i].lincoef != 0.0 )
7686 assert(*nupgdconss < upgdconsssize);
7687 upgdconss[*nupgdconss] = quadcons;
7694 assert(*nupgdconss < upgdconsssize);
7733 assert(scip != NULL);
7734 assert(exprgraph != NULL);
7735 assert(node != NULL);
7736 assert(naddcons != NULL);
7737 assert(reformnode != NULL);
7755 assert(monomial != NULL);
7782 SCIPdebugMsg(scip,
"reformulate bivariate monomial in node %p\n", (
void*)node);
7802 #ifdef WITH_DEBUG_SOLUTION 7803 if( SCIPdebugIsMainscip(scip) )
7834 consEnfolpBivariate, consEnfopsBivariate, consCheckBivariate, consLockBivariate,
7837 assert(conshdlr != NULL);
7873 "maximal coef range of a cut (maximal coefficient divided by minimal coefficient) in order to be added to LP relaxation",
7874 &conshdlrdata->cutmaxrange,
TRUE, 1e+7, 0.0,
SCIPinfinity(scip), NULL, NULL) );
7877 "whether to try to make solutions in check function feasible by shifting a linear variable (esp. useful if constraint was actually objective function)",
7878 &conshdlrdata->linfeasshift,
FALSE,
TRUE, NULL, NULL) );
7881 "limit on number of propagation rounds for a single constraint within one round of SCIP propagation",
7882 &conshdlrdata->maxproprounds,
FALSE, 1, 0, INT_MAX, NULL, NULL) );
7885 "number of reference points in each direction where to compute linear support for envelope in LP initialization",
7886 &conshdlrdata->ninitlprefpoints,
FALSE, 3, 0, INT_MAX, NULL, NULL) );
7889 "are cuts added during enforcement removable from the LP in the same node?",
7890 &conshdlrdata->enfocutsremovable,
TRUE,
FALSE, NULL, NULL) );
7892 conshdlrdata->linvareventhdlr = NULL;
7894 processLinearVarEvent, NULL) );
7895 assert(conshdlrdata->linvareventhdlr != NULL);
7897 conshdlrdata->nonlinvareventhdlr = NULL;
7900 assert(conshdlrdata->nonlinvareventhdlr != NULL);
7903 processNewSolutionEvent, NULL) );
7910 exprgraphVarAdded, exprgraphVarRemove, NULL, (
void*)conshdlrdata) );
7911 conshdlrdata->isremovedfixings =
TRUE;
7912 conshdlrdata->ispropagated =
TRUE;
7914 conshdlrdata->scip = scip;
7963 assert(modifiable ==
FALSE);
7967 if( conshdlr == NULL )
7978 consdata->convextype = convextype;
7980 consdata->zcoef = zcoef;
7981 consdata->lhs = lhs;
7982 consdata->rhs = rhs;
7990 consdata->eventfilterpos = -1;
7993 SCIP_CALL(
SCIPcreateCons(scip, cons, name, conshdlr, consdata, initial, separate, enforce, check, propagate,
7994 local, modifiable, dynamic, removable, stickingatnode) );
8019 assert(scip != NULL);
8033 assert(cons != NULL);
8045 assert(cons != NULL);
8057 assert(cons != NULL);
8069 assert(cons != NULL);
8081 assert(cons != NULL);
enum SCIP_Result SCIP_RESULT
static SCIP_DECL_CONSENFOLP(consEnfolpBivariate)
SCIP_VAR ** SCIPgetLinearVarsQuadratic(SCIP *scip, SCIP_CONS *cons)
SCIP_Real SCIPgetLinearCoefBivariate(SCIP *scip, SCIP_CONS *cons)
void SCIPintervalDivScalar(SCIP_Real infinity, SCIP_INTERVAL *resultant, SCIP_INTERVAL operand1, SCIP_Real operand2)
SCIP_Real SCIPexprgraphGetNodeVal(SCIP_EXPRGRAPHNODE *node)
static SCIP_RETCODE createExprtreeFromMonomial(SCIP *scip, SCIP_VAR *x, SCIP_VAR *y, SCIP_Real coef, SCIP_Real p, SCIP_Real q, SCIP_EXPRTREE **exprtree, SCIP_Real *mult, SCIP_BIVAR_CONVEXITY *convextype)
SCIP_Bool SCIPisFeasZero(SCIP *scip, SCIP_Real val)
SCIP_RETCODE SCIPexprgraphPropagateVarBounds(SCIP_EXPRGRAPH *exprgraph, SCIP_Real infinity, SCIP_Bool clearreverseprop, SCIP_Bool *domainerror)
void SCIPexprFreeDeep(BMS_BLKMEM *blkmem, SCIP_EXPR **expr)
SCIP_RETCODE SCIPsetConshdlrDelete(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSDELETE((*consdelete)))
SCIP_RETCODE SCIPexprgraphReplaceVarByLinearSum(SCIP_EXPRGRAPH *exprgraph, void *var, int ncoefs, SCIP_Real *coefs, void **vars, SCIP_Real constant)
static SCIP_RETCODE catchLinearVarEvents(SCIP *scip, SCIP_CONS *cons)
static SCIP_RETCODE computeViolation(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS *cons, SCIP_SOL *sol)
SCIP_RETCODE SCIPincludeNonlinconsUpgrade(SCIP *scip, SCIP_DECL_NONLINCONSUPGD((*nonlinconsupgd)), SCIP_DECL_EXPRGRAPHNODEREFORM((*nodereform)), int priority, SCIP_Bool active, const char *conshdlrname)
static SCIP_RETCODE generateConvexConcaveEstimator(SCIP *scip, SCIP_EXPRINT *exprinterpreter, SCIP_CONS *cons, SCIP_Real xyref[2], SCIP_SIDETYPE violside, SCIP_ROW **row)
SCIP_Real SCIPfeastol(SCIP *scip)
void SCIPexprgraphSetVarNodeValue(SCIP_EXPRGRAPHNODE *varnode, SCIP_Real value)
SCIP_Bool SCIPconsIsEnabled(SCIP_CONS *cons)
SCIP_RETCODE SCIPexprSubstituteVars(BMS_BLKMEM *blkmem, SCIP_EXPR *expr, SCIP_EXPR **substexprs)
SCIP_Bool SCIPintervalIsEmpty(SCIP_Real infinity, SCIP_INTERVAL operand)
primal heuristic that tries a given solution
SCIP_Bool SCIPisNLPConstructed(SCIP *scip)
SCIP_RETCODE SCIPaddQuadVarQuadratic(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real lincoef, SCIP_Real sqrcoef)
SCIP_RETCODE SCIPtightenVarLb(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
static SCIP_DECL_CONSPRESOL(consPresolBivariate)
SCIP_Bool SCIPisFeasEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
static SCIP_DECL_QUADCONSUPGD(quadconsUpgdBivariate)
static SCIP_RETCODE initSepaData(SCIP *scip, SCIP_EXPRINT *exprinterpreter, SCIP_CONS *cons)
SCIP_RETCODE SCIPexprgraphAddVars(SCIP_EXPRGRAPH *exprgraph, int nvars, void **vars, SCIP_EXPRGRAPHNODE **varnodes)
SCIP_NODE * SCIPgetCurrentNode(SCIP *scip)
SCIP_STAGE SCIPgetStage(SCIP *scip)
methods to interpret (evaluate) an expression tree "fast"
static SCIP_RETCODE registerLargeRelaxValueVariableForBranching(SCIP *scip, SCIP_CONS **conss, int nconss, SCIP_SOL *sol, SCIP_VAR **brvar)
#define SCIP_EVENTTYPE_VARFIXED
SCIP_Bool SCIPconsIsDynamic(SCIP_CONS *cons)
void SCIPexprtreePrint(SCIP_EXPRTREE *tree, SCIP_MESSAGEHDLR *messagehdlr, FILE *file, const char **varnames, const char **paramnames)
SCIP_RETCODE SCIPincSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var, SCIP_Real incval)
SCIP_RETCODE SCIPsetConshdlrTrans(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSTRANS((*constrans)))
SCIP_RETCODE SCIPcreateConsBivariate(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_EXPRTREE *f, SCIP_BIVAR_CONVEXITY convextype, SCIP_VAR *z, SCIP_Real zcoef, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)
SCIP_Bool SCIPisFeasLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisRelEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
static SCIP_DECL_EXPRGRAPHNODEREFORM(exprgraphnodeReformBivariate)
SCIP_RETCODE SCIPaddSquareCoefQuadratic(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real coef)
static SCIP_RETCODE generateOverestimatingHyperplaneCut(SCIP *scip, SCIP_EXPRINT *exprinterpreter, SCIP_CONS *cons, SCIP_Real *x0y0, SCIP_ROW **row)
#define CONSHDLR_NEEDSCONS
SCIP_Real SCIPgetRhsBivariate(SCIP *scip, SCIP_CONS *cons)
static SCIP_RETCODE propagateBoundsCons(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS *cons, SCIP_RESULT *result, int *nchgbds, SCIP_Bool *redundant)
SCIP_RETCODE SCIPcatchVarEvent(SCIP *scip, SCIP_VAR *var, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int *filterpos)
SCIP_CONSHDLR * SCIPfindConshdlr(SCIP *scip, const char *name)
int SCIPexprgraphGetNodeNChildren(SCIP_EXPRGRAPHNODE *node)
SCIP_EXPROP SCIPexprGetOperator(SCIP_EXPR *expr)
SCIP_Real SCIPvarGetLbGlobal(SCIP_VAR *var)
int SCIPexprgraphGetNVars(SCIP_EXPRGRAPH *exprgraph)
SCIP_RETCODE SCIPincludeQuadconsUpgrade(SCIP *scip, SCIP_DECL_QUADCONSUPGD((*quadconsupgd)), int priority, SCIP_Bool active, const char *conshdlrname)
static SCIP_RETCODE dropLinearVarEvents(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPsetConshdlrGetVars(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSGETVARS((*consgetvars)))
static SCIP_RETCODE removeFixedNonlinearVariables(SCIP *scip, SCIP_CONSHDLR *conshdlr)
SCIP_RETCODE SCIPsetConshdlrEnforelax(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSENFORELAX((*consenforelax)))
SCIP_RETCODE SCIPdelCons(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPaddVarToRow(SCIP *scip, SCIP_ROW *row, SCIP_VAR *var, SCIP_Real val)
int SCIProwGetNNonz(SCIP_ROW *row)
SCIP_Bool SCIPisPositive(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPvarGetLbLocal(SCIP_VAR *var)
SCIP_Bool SCIPisGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
internal methods for NLPI solver interfaces
SCIP_RETCODE SCIPsetConshdlrDeactive(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSDEACTIVE((*consdeactive)))
SCIP_Bool SCIPconsIsAdded(SCIP_CONS *cons)
SCIP_RETCODE SCIPincludeEventhdlrBasic(SCIP *scip, SCIP_EVENTHDLR **eventhdlrptr, const char *name, const char *desc, SCIP_DECL_EVENTEXEC((*eventexec)), SCIP_EVENTHDLRDATA *eventhdlrdata)
static SCIP_RETCODE computeViolations(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss, SCIP_SOL *sol, SCIP_CONS **maxviolcon)
SCIP_RETCODE SCIPexprCreateMonomial(BMS_BLKMEM *blkmem, SCIP_EXPRDATA_MONOMIAL **monomial, SCIP_Real coef, int nfactors, int *childidxs, SCIP_Real *exponents)
void SCIPexprgraphSetVarNodeBounds(SCIP_EXPRGRAPH *exprgraph, SCIP_EXPRGRAPHNODE *varnode, SCIP_INTERVAL varbounds)
static SCIP_RETCODE separatePoint(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss, int nusefulconss, SCIP_SOL *sol, SCIP_Real minefficacy, SCIP_Bool inenforcement, SCIP_RESULT *result, SCIP_Real *bestefficacy)
SCIP_RETCODE SCIPgetTransformedVar(SCIP *scip, SCIP_VAR *var, SCIP_VAR **transvar)
SCIP_RETCODE SCIPreleaseVar(SCIP *scip, SCIP_VAR **var)
struct SCIP_EventhdlrData SCIP_EVENTHDLRDATA
static SCIP_DECL_CONSHDLRCOPY(conshdlrCopyBivariate)
SCIP_RETCODE SCIPsetConshdlrInitpre(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSINITPRE((*consinitpre)))
#define CONSHDLR_PROP_TIMING
SCIP_Bool SCIPisFeasGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_CONS ** SCIPconshdlrGetConss(SCIP_CONSHDLR *conshdlr)
void SCIPexprgraphPropagateNodeBounds(SCIP_EXPRGRAPH *exprgraph, SCIP_Real infinity, SCIP_Real minstrength, SCIP_Bool *cutoff)
SCIP_Real SCIProwGetLhs(SCIP_ROW *row)
SCIP_RETCODE SCIPcreateConsBasicBivariate(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_EXPRTREE *f, SCIP_BIVAR_CONVEXITY convextype, SCIP_VAR *z, SCIP_Real zcoef, SCIP_Real lhs, SCIP_Real rhs)
#define CONSHDLR_SEPAPRIORITY
SCIP_EXPRGRAPHNODE ** SCIPexprgraphGetVarNodes(SCIP_EXPRGRAPH *exprgraph)
SCIP_Real SCIPrelDiff(SCIP_Real val1, SCIP_Real val2)
SCIP_RETCODE SCIPincludeConshdlrBasic(SCIP *scip, SCIP_CONSHDLR **conshdlrptr, const char *name, const char *desc, int enfopriority, int chckpriority, int eagerfreq, SCIP_Bool needscons, SCIP_DECL_CONSENFOLP((*consenfolp)), SCIP_DECL_CONSENFOPS((*consenfops)), SCIP_DECL_CONSCHECK((*conscheck)), SCIP_DECL_CONSLOCK((*conslock)), SCIP_CONSHDLRDATA *conshdlrdata)
SCIP_Real SCIPinfinity(SCIP *scip)
int SCIPsnprintf(char *t, int len, const char *s,...)
SCIP_Bool SCIPisNegative(SCIP *scip, SCIP_Real val)
SCIP_RETCODE SCIPunmarkConsPropagate(SCIP *scip, SCIP_CONS *cons)
enum SCIP_Retcode SCIP_RETCODE
#define infty2infty(infty1, infty2, val)
SCIP_RETCODE SCIPaddVarLocks(SCIP *scip, SCIP_VAR *var, int nlocksdown, int nlocksup)
SCIP_Bool SCIPconsIsStickingAtNode(SCIP_CONS *cons)
static SCIP_DECL_CONSCHECK(consCheckBivariate)
SCIP_RETCODE SCIPexprtreeCopy(BMS_BLKMEM *blkmem, SCIP_EXPRTREE **targettree, SCIP_EXPRTREE *sourcetree)
SCIP_RETCODE SCIPexprintCompile(SCIP_EXPRINT *exprint, SCIP_EXPRTREE *tree)
SCIP_INTERVAL SCIPexprgraphGetNodeBounds(SCIP_EXPRGRAPHNODE *node)
void SCIPexprReindexVars(SCIP_EXPR *expr, int *newindices)
void SCIPintervalSetBounds(SCIP_INTERVAL *resultant, SCIP_Real inf, SCIP_Real sup)
static SCIP_RETCODE solveDerivativeEquation(SCIP *scip, SCIP_EXPRINT *exprinterpreter, SCIP_EXPRTREE *f, SCIP_Real targetvalue, SCIP_Real lb, SCIP_Real ub, SCIP_Real *val, SCIP_Bool *success)
SCIP_Bool SCIPconsIsTransformed(SCIP_CONS *cons)
static SCIP_DECL_CONSGETNVARS(consGetNVarsBivariate)
SCIP_RETCODE SCIPexprtreeSetVars(SCIP_EXPRTREE *tree, int nvars, SCIP_VAR **vars)
SCIP_RETCODE SCIPtightenVarUb(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
#define SCIPfreeBlockMemory(scip, ptr)
#define CONSHDLR_ENFOPRIORITY
SCIP_RETCODE SCIPsetConshdlrSepa(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSSEPALP((*conssepalp)), SCIP_DECL_CONSSEPASOL((*conssepasol)), int sepafreq, int sepapriority, SCIP_Bool delaysepa)
SCIP_Bool SCIPintervalIsNegativeInfinity(SCIP_Real infinity, SCIP_INTERVAL operand)
SCIP_EVENTHDLR * SCIPfindEventhdlr(SCIP *scip, const char *name)
SCIP_MESSAGEHDLR * SCIPgetMessagehdlr(SCIP *scip)
SCIP_RETCODE SCIPexprgraphAddExprtreeSum(SCIP_EXPRGRAPH *exprgraph, int nexprtrees, SCIP_EXPRTREE **exprtrees, SCIP_Real *coefs, SCIP_EXPRGRAPHNODE **rootnode, SCIP_Bool *rootnodeisnew)
SCIP_Bool SCIPisEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_RETCODE SCIPincludeConshdlrBivariate(SCIP *scip)
static SCIP_RETCODE createConsFromMonomial(SCIP *scip, SCIP_CONS *srccons, SCIP_CONS **cons, const char *name, SCIP_VAR *x, SCIP_VAR *y, SCIP_VAR *z, SCIP_Real coef, SCIP_Real p, SCIP_Real q, SCIP_Real zcoef, SCIP_Real lhs, SCIP_Real rhs)
static SCIP_DECL_CONSACTIVE(consActiveBivariate)
SCIP_RETCODE SCIPcreateLPSol(SCIP *scip, SCIP_SOL **sol, SCIP_HEUR *heur)
SCIP_RETCODE SCIPexprtreeCreate(BMS_BLKMEM *blkmem, SCIP_EXPRTREE **tree, SCIP_EXPR *root, int nvars, int nparams, SCIP_Real *params)
static SCIP_RETCODE generate1ConvexIndefiniteUnderestimatorAtBoundary(SCIP *scip, SCIP_EXPRINT *exprinterpreter, SCIP_EXPRTREE *f, SCIP_Real xyref[2], SCIP_Real cutcoeff[4], SCIP_Real *convenvvalue, SCIP_Bool *success)
static SCIP_RETCODE generateOrthogonal_lx_ly_Underestimator(SCIP *scip, SCIP_EXPRINT *exprinterpreter, SCIP_EXPRTREE *f, SCIP_Real *xyref, SCIP_Real cutcoeff[4], SCIP_Real *convenvvalue, SCIP_Bool *success)
#define SCIPfreeBufferArray(scip, ptr)
static SCIP_RETCODE createConsFromQuadTerm(SCIP *scip, SCIP_CONS *srccons, SCIP_CONS **cons, const char *name, SCIP_VAR *x, SCIP_VAR *y, SCIP_VAR *z, SCIP_Real coefxx, SCIP_Real coefx, SCIP_Real coefyy, SCIP_Real coefy, SCIP_Real coefxy, SCIP_Real coefz, SCIP_Real lhs, SCIP_Real rhs)
SCIP_Real SCIPadjustedVarLb(SCIP *scip, SCIP_VAR *var, SCIP_Real lb)
#define SCIPallocBlockMemory(scip, ptr)
void SCIPexprtreeSetParamVal(SCIP_EXPRTREE *tree, int paramidx, SCIP_Real paramval)
#define SCIPdebugPrintCons(x, y, z)
SCIP_Bool SCIPconsIsRemovable(SCIP_CONS *cons)
#define SCIP_EVENTTYPE_BOUNDCHANGED
SCIP_RETCODE SCIPsetConshdlrInitlp(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSINITLP((*consinitlp)))
void SCIPwarningMessage(SCIP *scip, const char *formatstr,...)
#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 SCIPgetTransformedVars(SCIP *scip, int nvars, SCIP_VAR **vars, SCIP_VAR **transvars)
SCIP_Real SCIPgetLhsQuadratic(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPexprgraphFree(SCIP_EXPRGRAPH **exprgraph)
SCIP_Bool SCIPconsIsActive(SCIP_CONS *cons)
void SCIPinfoMessage(SCIP *scip, FILE *file, const char *formatstr,...)
SCIP_VAR ** SCIPexprtreeGetVars(SCIP_EXPRTREE *tree)
SCIP_RETCODE SCIPcreateCons(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_CONSHDLR *conshdlr, SCIP_CONSDATA *consdata, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)
SCIP_Real SCIPepsilon(SCIP *scip)
int SCIPexprgraphGetNodePolynomialNMonomials(SCIP_EXPRGRAPHNODE *node)
#define SCIP_PRESOLTIMING_FAST
SCIP_Real SCIPgetRowMaxCoef(SCIP *scip, SCIP_ROW *row)
SCIP_RETCODE SCIPaddLinearVarQuadratic(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real coef)
SCIP_RETCODE SCIPcreateConsQuadratic(SCIP *scip, SCIP_CONS **cons, const char *name, int nlinvars, SCIP_VAR **linvars, SCIP_Real *lincoefs, int nquadterms, SCIP_VAR **quadvars1, SCIP_VAR **quadvars2, SCIP_Real *quadcoefs, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable)
int SCIPgetNQuadVarTermsQuadratic(SCIP *scip, SCIP_CONS *cons)
static SCIP_RETCODE registerBranchingVariables(SCIP *scip, SCIP_CONS **conss, int nconss, int *nnotify)
#define SCIP_EVENTTYPE_LBCHANGED
SCIP_Bool SCIPintervalIsPositiveInfinity(SCIP_Real infinity, SCIP_INTERVAL operand)
int SCIPexprGetMonomialNFactors(SCIP_EXPRDATA_MONOMIAL *monomial)
SCIP_RETCODE SCIPexprtreePrintWithNames(SCIP_EXPRTREE *tree, SCIP_MESSAGEHDLR *messagehdlr, FILE *file)
static SCIP_DECL_CONSENFORELAX(consEnforelaxBivariate)
SCIP_EXPRTREE * SCIPgetExprtreeBivariate(SCIP *scip, SCIP_CONS *cons)
int SCIPgetNBilinTermsQuadratic(SCIP *scip, SCIP_CONS *cons)
#define CONSHDLR_DELAYPROP
SCIP_RETCODE SCIPheurPassSolTrySol(SCIP *scip, SCIP_HEUR *heur, SCIP_SOL *sol)
SCIP_EXPROP SCIPexprgraphGetNodeOperator(SCIP_EXPRGRAPHNODE *node)
static SCIP_DECL_CONSPROP(consPropBivariate)
SCIP_EXPRDATA_MONOMIAL ** SCIPexprgraphGetNodePolynomialMonomials(SCIP_EXPRGRAPHNODE *node)
SCIP_RETCODE SCIPexprgraphCreate(BMS_BLKMEM *blkmem, SCIP_EXPRGRAPH **exprgraph, int varssizeinit, int depthinit, SCIP_DECL_EXPRGRAPHVARADDED((*exprgraphvaradded)), SCIP_DECL_EXPRGRAPHVARREMOVE((*exprgraphvarremove)), SCIP_DECL_EXPRGRAPHVARCHGIDX((*exprgraphvarchgidx)), void *userdata)
SCIP_Real SCIPvarGetUbGlobal(SCIP_VAR *var)
SCIP_VAR * SCIPvarGetProbvar(SCIP_VAR *var)
SCIP_RETCODE SCIPsetConshdlrInitsol(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSINITSOL((*consinitsol)))
SCIP_Bool SCIPisConcaveQuadratic(SCIP *scip, SCIP_CONS *cons)
#define SCIP_EVENTTYPE_SOLFOUND
SCIP_Real SCIPeventGetNewbound(SCIP_EVENT *event)
SCIP_RETCODE SCIPcreateSolCopy(SCIP *scip, SCIP_SOL **sol, SCIP_SOL *sourcesol)
#define SCIP_PRESOLTIMING_MEDIUM
SCIP_Real SCIPexprgraphGetNodePolynomialConstant(SCIP_EXPRGRAPHNODE *node)
void SCIPmarkRowNotRemovableLocal(SCIP *scip, SCIP_ROW *row)
SCIP_RETCODE SCIPsetConshdlrCopy(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSHDLRCOPY((*conshdlrcopy)), SCIP_DECL_CONSCOPY((*conscopy)))
SCIP_EXPRCURV SCIPexprgraphGetNodeCurvature(SCIP_EXPRGRAPHNODE *node)
SCIP_RETCODE SCIPexprCreateQuadratic(BMS_BLKMEM *blkmem, SCIP_EXPR **expr, int nchildren, SCIP_EXPR **children, SCIP_Real constant, SCIP_Real *lincoefs, int nquadelems, SCIP_QUADELEM *quadelems)
const char * SCIPheurGetName(SCIP_HEUR *heur)
SCIP_HEUR * SCIPfindHeur(SCIP *scip, const char *name)
SCIP_RETCODE SCIPfindQuadVarTermQuadratic(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, int *pos)
SCIP_Real SCIPgetRowMinCoef(SCIP *scip, SCIP_ROW *row)
#define QUADCONSUPGD_PRIORITY
SCIP_RETCODE SCIPexprintEval(SCIP_EXPRINT *exprint, SCIP_EXPRTREE *tree, SCIP_Real *varvals, SCIP_Real *val)
SCIP_RETCODE SCIPaddCons(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPexprintCreate(BMS_BLKMEM *blkmem, SCIP_EXPRINT **exprint)
SCIP_RETCODE SCIPaddNlRow(SCIP *scip, SCIP_NLROW *nlrow)
static SCIP_RETCODE unlockLinearVariable(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real coef)
static SCIP_DECL_CONSINITSOL(consInitsolBivariate)
SCIP_RETCODE SCIPdelConsLocal(SCIP *scip, SCIP_CONS *cons)
SCIP_Real SCIPintervalGetInf(SCIP_INTERVAL interval)
SCIP_RETCODE SCIPgetSolVals(SCIP *scip, SCIP_SOL *sol, int nvars, SCIP_VAR **vars, SCIP_Real *vals)
static SCIP_RETCODE proposeFeasibleSolution(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss, SCIP_SOL *sol, SCIP_Bool *success)
SCIP_RETCODE SCIPexprCopyDeep(BMS_BLKMEM *blkmem, SCIP_EXPR **targetexpr, SCIP_EXPR *sourceexpr)
SCIP_RETCODE SCIPreleaseNlRow(SCIP *scip, SCIP_NLROW **nlrow)
SCIP_Bool SCIProwIsLocal(SCIP_ROW *row)
static SCIP_DECL_CONSLOCK(consLockBivariate)
SCIP_RETCODE SCIPgetProbvarSum(SCIP *scip, SCIP_VAR **var, SCIP_Real *scalar, SCIP_Real *constant)
SCIP_Real * SCIPgetCoefsLinearVarsQuadratic(SCIP *scip, SCIP_CONS *cons)
BMS_BLKMEM * SCIPblkmem(SCIP *scip)
static SCIP_DECL_CONSDELETE(consDeleteBivariate)
SCIP_RETCODE SCIPunlockVarCons(SCIP *scip, SCIP_VAR *var, SCIP_CONS *cons, SCIP_Bool lockdown, SCIP_Bool lockup)
SCIP_RETCODE SCIPsetConsChecked(SCIP *scip, SCIP_CONS *cons, SCIP_Bool check)
static SCIP_DECL_CONSCOPY(consCopyBivariate)
#define CONSHDLR_EAGERFREQ
const char * SCIPconsGetName(SCIP_CONS *cons)
SCIP_RETCODE SCIPmarkDoNotMultaggrVar(SCIP *scip, SCIP_VAR *var)
static SCIP_DECL_EXPRGRAPHVARADDED(exprgraphVarAdded)
SCIP_Bool SCIPconsIsPropagated(SCIP_CONS *cons)
struct SCIP_EventData SCIP_EVENTDATA
const char * SCIPvarGetName(SCIP_VAR *var)
SCIP_RETCODE SCIPsetConshdlrFree(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSFREE((*consfree)))
constraint handler for quadratic constraints
static SCIP_DECL_CONSENFOPS(consEnfopsBivariate)
SCIP_CONSHDLRDATA * SCIPconshdlrGetData(SCIP_CONSHDLR *conshdlr)
SCIP_RETCODE SCIPmarkConsPropagate(SCIP *scip, SCIP_CONS *cons)
SCIP_HEUR * SCIPsolGetHeur(SCIP_SOL *sol)
SCIP_Real SCIPgetSolTransObj(SCIP *scip, SCIP_SOL *sol)
static SCIP_RETCODE propagateBounds(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss, SCIP_RESULT *result, int *nchgbds, int *ndelconss)
int SCIPexprtreeGetNVars(SCIP_EXPRTREE *tree)
SCIP_RETCODE SCIPcreateChild(SCIP *scip, SCIP_NODE **node, SCIP_Real nodeselprio, SCIP_Real estimate)
SCIP_Real SCIPgetSepaMinEfficacy(SCIP *scip)
#define SCIP_EVENTTYPE_LBTIGHTENED
static SCIP_DECL_EXPRGRAPHVARREMOVE(exprgraphVarRemove)
SCIP_Bool SCIPisFeasGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_RETCODE SCIPexprCreatePolynomial(BMS_BLKMEM *blkmem, SCIP_EXPR **expr, int nchildren, SCIP_EXPR **children, int nmonomials, SCIP_EXPRDATA_MONOMIAL **monomials, SCIP_Real constant, SCIP_Bool copymonomials)
SCIP_RETCODE SCIPgetProbvarLinearSum(SCIP *scip, SCIP_VAR **vars, SCIP_Real *scalars, int *nvars, int varssize, SCIP_Real *constant, int *requiredsize, SCIP_Bool mergemultiples)
static SCIP_DECL_CONSTRANS(consTransBivariate)
static SCIP_RETCODE lockLinearVariable(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real coef)
SCIP_Bool SCIPisFeasLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
void SCIPintervalSet(SCIP_INTERVAL *resultant, SCIP_Real value)
SCIP_Real SCIProwGetRhs(SCIP_ROW *row)
void SCIPverbMessage(SCIP *scip, SCIP_VERBLEVEL msgverblevel, FILE *file, const char *formatstr,...)
SCIP_Bool SCIPconsIsLocal(SCIP_CONS *cons)
void SCIPexprgraphTightenNodeBounds(SCIP_EXPRGRAPH *exprgraph, SCIP_EXPRGRAPHNODE *node, SCIP_INTERVAL nodebounds, SCIP_Real minstrength, SCIP_Real infinity, SCIP_Bool *cutoff)
static SCIP_RETCODE freeSepaData(SCIP *scip, SCIP_CONS *cons)
static SCIP_RETCODE enforceConstraint(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss, int nusefulconss, SCIP_SOL *sol, SCIP_Bool solinfeasible, SCIP_RESULT *result)
SCIP_RETCODE SCIPcreateRowCons(SCIP *scip, SCIP_ROW **row, SCIP_CONSHDLR *conshdlr, const char *name, int len, SCIP_COL **cols, SCIP_Real *vals, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool removable)
SCIP_RETCODE SCIPaddRow(SCIP *scip, SCIP_ROW *row, SCIP_Bool forcecut, SCIP_Bool *infeasible)
#define SCIPdebugGetSolVal(scip, var, val)
struct SCIP_ConsData SCIP_CONSDATA
SCIP_BILINTERM * SCIPgetBilinTermsQuadratic(SCIP *scip, SCIP_CONS *cons)
#define SCIP_EVENTTYPE_BOUNDTIGHTENED
SCIP_EXPR * SCIPexprtreeGetRoot(SCIP_EXPRTREE *tree)
SCIP_COL ** SCIProwGetCols(SCIP_ROW *row)
int SCIPconshdlrGetNConss(SCIP_CONSHDLR *conshdlr)
static SCIP_DECL_CONSDEACTIVE(consDeactiveBivariate)
SCIP_Real SCIPgetRhsQuadratic(SCIP *scip, SCIP_CONS *cons)
static SCIP_DECL_EVENTEXEC(processLinearVarEvent)
SCIP_RETCODE SCIPaddBilinTermQuadratic(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var1, SCIP_VAR *var2, SCIP_Real coef)
static SCIP_DECL_CONSSEPALP(consSepalpBivariate)
#define SCIPallocBufferArray(scip, ptr, num)
SCIP_Real * SCIProwGetVals(SCIP_ROW *row)
static SCIP_RETCODE lifting(SCIP *scip, SCIP_EXPRINT *exprinterpreter, SCIP_EXPRTREE *f, SCIP_Real xval, SCIP_Real yval, SCIP_Real xlb, SCIP_Real xub, SCIP_Real ylb, SCIP_Real yub, int min_max, SCIP_Real cutcoeff[4], SCIP_Real *convenvvalue, SCIP_Bool *success)
SCIP_VAR * SCIPeventGetVar(SCIP_EVENT *event)
SCIP_RETCODE SCIPchgRowRhs(SCIP *scip, SCIP_ROW *row, SCIP_Real rhs)
SCIP_RETCODE SCIPexprintNewParametrization(SCIP_EXPRINT *exprint, SCIP_EXPRTREE *tree)
SCIP_RETCODE SCIPcatchEvent(SCIP *scip, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int *filterpos)
SCIP_EVENTTYPE SCIPeventGetType(SCIP_EVENT *event)
SCIP_Real SCIPgetLhsBivariate(SCIP *scip, SCIP_CONS *cons)
void SCIPexprgraphSetVarNodeLb(SCIP_EXPRGRAPH *exprgraph, SCIP_EXPRGRAPHNODE *varnode, SCIP_Real lb)
SCIP_RETCODE SCIPcreateEmptyRowCons(SCIP *scip, SCIP_ROW **row, SCIP_CONSHDLR *conshdlr, const char *name, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool removable)
static SCIP_Bool isConvexLocal(SCIP *scip, SCIP_CONS *cons, SCIP_SIDETYPE side)
SCIP_Real SCIPlpfeastol(SCIP *scip)
SCIP_EXPRINTDATA * SCIPexprtreeGetInterpreterData(SCIP_EXPRTREE *tree)
constraint handler for nonlinear constraints
static SCIP_DECL_CONSDISABLE(consDisableBivariate)
SCIP_RETCODE SCIPprintCons(SCIP *scip, SCIP_CONS *cons, FILE *file)
SCIP_RETCODE SCIPaddPoolCut(SCIP *scip, SCIP_ROW *row)
SCIP_CONSHDLR * SCIPconsGetHdlr(SCIP_CONS *cons)
void SCIPexprgraphSetVarNodeUb(SCIP_EXPRGRAPH *exprgraph, SCIP_EXPRGRAPHNODE *varnode, SCIP_Real ub)
SCIP_Bool SCIPconsIsDeleted(SCIP_CONS *cons)
SCIP_RETCODE SCIPchgRowLhs(SCIP *scip, SCIP_ROW *row, SCIP_Real lhs)
SCIP_RETCODE SCIPsetConshdlrDisable(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSDISABLE((*consdisable)))
SCIP_RETCODE SCIPdropEvent(SCIP *scip, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int filterpos)
SCIP_RETCODE SCIPexprCreate(BMS_BLKMEM *blkmem, SCIP_EXPR **expr, SCIP_EXPROP op,...)
SCIP_RETCODE SCIPfreeSol(SCIP *scip, SCIP_SOL **sol)
SCIP_Bool SCIPconsIsChecked(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsInitial(SCIP_CONS *cons)
SCIP_RETCODE SCIPexprtreeFree(SCIP_EXPRTREE **tree)
static SCIP_RETCODE removeFixedVariables(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS *cons, SCIP_Bool *ischanged, SCIP_Bool *isupgraded)
SCIP_RETCODE SCIPdropVarEvent(SCIP *scip, SCIP_VAR *var, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int filterpos)
static SCIP_DECL_CONSEXITSOL(consExitsolBivariate)
SCIP_RETCODE SCIPcreateVar(SCIP *scip, SCIP_VAR **var, const char *name, SCIP_Real lb, SCIP_Real ub, SCIP_Real obj, SCIP_VARTYPE vartype, SCIP_Bool initial, SCIP_Bool removable, SCIP_DECL_VARDELORIG((*vardelorig)), SCIP_DECL_VARTRANS((*vartrans)), SCIP_DECL_VARDELTRANS((*vardeltrans)), SCIP_DECL_VARCOPY((*varcopy)), SCIP_VARDATA *vardata)
SCIP_RETCODE SCIPaddExternBranchCand(SCIP *scip, SCIP_VAR *var, SCIP_Real score, SCIP_Real solval)
void SCIPintervalAdd(SCIP_Real infinity, SCIP_INTERVAL *resultant, SCIP_INTERVAL operand1, SCIP_INTERVAL operand2)
void SCIPexprgraphDisableNode(SCIP_EXPRGRAPH *exprgraph, SCIP_EXPRGRAPHNODE *node)
SCIP_Real SCIPintervalGetSup(SCIP_INTERVAL interval)
SCIP_Bool SCIPintervalAreDisjoint(SCIP_INTERVAL operand1, SCIP_INTERVAL operand2)
SCIP_RETCODE SCIPlockVarCons(SCIP *scip, SCIP_VAR *var, SCIP_CONS *cons, SCIP_Bool lockdown, SCIP_Bool lockup)
static SCIP_DECL_CONSINITPRE(consInitpreBivariate)
SCIP_RETCODE SCIPsetConshdlrPrint(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPRINT((*consprint)))
SCIP_RETCODE SCIPexprintHessianDense(SCIP_EXPRINT *exprint, SCIP_EXPRTREE *tree, SCIP_Real *varvals, SCIP_Bool new_varvals, SCIP_Real *val, SCIP_Real *hessian)
constraint handler for bivariate nonlinear constraints
#define SCIP_EVENTTYPE_UBTIGHTENED
Constraint handler for linear constraints in their most general form, .
SCIP_Bool SCIPisCutApplicable(SCIP *scip, SCIP_ROW *cut)
SCIP_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)
#define BMSclearMemory(ptr)
SCIP_Real SCIPexprGetMonomialCoef(SCIP_EXPRDATA_MONOMIAL *monomial)
SCIP_RETCODE SCIPexprintGrad(SCIP_EXPRINT *exprint, SCIP_EXPRTREE *tree, SCIP_Real *varvals, SCIP_Bool new_varvals, SCIP_Real *val, SCIP_Real *gradient)
SCIP_RETCODE SCIPsetConshdlrEnable(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSENABLE((*consenable)))
void * SCIPexprgraphGetNodeVar(SCIP_EXPRGRAPH *exprgraph, SCIP_EXPRGRAPHNODE *node)
SCIP_Bool SCIPinProbing(SCIP *scip)
SCIP_VAR * SCIPgetLinearVarBivariate(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPcheckCurvatureQuadratic(SCIP *scip, SCIP_CONS *cons)
#define SCIP_EVENTTYPE_DISABLED
static SCIP_DECL_CONSSEPASOL(consSepasolBivariate)
#define CONSHDLR_CHECKPRIORITY
SCIP_Real SCIPnodeGetEstimate(SCIP_NODE *node)
void SCIPenableNLP(SCIP *scip)
SCIP_RETCODE SCIPsetConshdlrExitpre(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSEXITPRE((*consexitpre)))
SCIP_RETCODE SCIPreleaseRow(SCIP *scip, SCIP_ROW **row)
int SCIPgetNLinearVarsQuadratic(SCIP *scip, SCIP_CONS *cons)
int SCIPvarGetNLocksDown(SCIP_VAR *var)
SCIP_Bool SCIPisGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
static SCIP_DECL_CONSEXIT(consExitBivariate)
SCIP_VAR * SCIPcolGetVar(SCIP_COL *col)
SCIP_RETCODE SCIPgetVarCopy(SCIP *sourcescip, SCIP *targetscip, SCIP_VAR *sourcevar, SCIP_VAR **targetvar, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, SCIP_Bool global, SCIP_Bool *success)
SCIP_RETCODE SCIPaddVar(SCIP *scip, SCIP_VAR *var)
SCIP_CONSDATA * SCIPconsGetData(SCIP_CONS *cons)
SCIP_RETCODE SCIPsetConshdlrInit(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSINIT((*consinit)))
SCIP_RETCODE SCIPsetConsEnforced(SCIP *scip, SCIP_CONS *cons, SCIP_Bool enforce)
SCIP_RETCODE SCIPsetConshdlrExit(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSEXIT((*consexit)))
static SCIP_DECL_CONSINITLP(consInitlpBivariate)
#define SCIP_EVENTTYPE_FORMAT
SCIP_RETCODE SCIPreleaseCons(SCIP *scip, SCIP_CONS **cons)
#define CONSHDLR_PROPFREQ
static SCIP_DECL_CONSGETVARS(consGetVarsBivariate)
SCIP_RETCODE SCIPsetConshdlrPresol(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPRESOL((*conspresol)), int maxprerounds, SCIP_PRESOLTIMING presoltiming)
NLP local search primal heuristic using sub-SCIPs.
void SCIPupdateSolConsViolation(SCIP *scip, SCIP_SOL *sol, SCIP_Real absviol, SCIP_Real relviol)
SCIP_RETCODE SCIPexprgraphReleaseNode(SCIP_EXPRGRAPH *exprgraph, SCIP_EXPRGRAPHNODE **node)
SCIP_Real SCIPgetRowLPFeasibility(SCIP *scip, SCIP_ROW *row)
SCIP_Real SCIPeventGetOldbound(SCIP_EVENT *event)
#define CONSHDLR_MAXPREROUNDS
static SCIP_RETCODE generateEstimatingHyperplane(SCIP *scip, SCIP_EXPRINT *exprinterpreter, SCIP_EXPRTREE *f, SCIP_Bool doover, SCIP_Real *x0y0, SCIP_Real *coefx, SCIP_Real *coefy, SCIP_Real *constant, SCIP_Bool *success)
#define NONLINCONSUPGD_PRIORITY
SCIP_VARSTATUS SCIPvarGetStatus(SCIP_VAR *var)
static SCIP_DECL_CONSINIT(consInitBivariate)
static SCIP_RETCODE generateOrthogonal_lx_uy_Underestimator(SCIP *scip, SCIP_EXPRINT *exprinterpreter, SCIP_EXPRTREE *f, SCIP_Real *xyref, SCIP_Real cutcoeff[4], SCIP_Real *convenvvalue, SCIP_Bool *success)
SCIP_Bool SCIPconsIsModifiable(SCIP_CONS *cons)
SCIP_RETCODE SCIPaddVarsToRow(SCIP *scip, SCIP_ROW *row, int nvars, SCIP_VAR **vars, SCIP_Real *vals)
static SCIP_RETCODE generateConvexConcaveUnderestimator(SCIP *scip, SCIP_EXPRINT *exprinterpreter, SCIP_EXPRTREE *f, SCIP_EXPRTREE *f_yfixed, SCIP_EXPRTREE *vred, SCIP_Real xyref[2], SCIP_Real cutcoeff[4], SCIP_Real *convenvvalue, SCIP_Bool *success)
static SCIP_RETCODE propagateBoundsTightenVar(SCIP *scip, SCIP_VAR *var, SCIP_INTERVAL bounds, SCIP_CONS *cons, SCIP_RESULT *result, int *nchgbds)
SCIP_Bool SCIPisStopped(SCIP *scip)
static SCIP_RETCODE generate1ConvexIndefiniteUnderestimatorInTheInteriorPatternB(SCIP *scip, SCIP_EXPRINT *exprinterpreter, SCIP_EXPRTREE *f, SCIP_Real xyref[2], SCIP_Real cutcoeff[4], SCIP_Real *convenvvalue, SCIP_Bool *success)
SCIP_RETCODE SCIPsetConshdlrGetNVars(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSGETNVARS((*consgetnvars)))
void SCIPintervalMulScalar(SCIP_Real infinity, SCIP_INTERVAL *resultant, SCIP_INTERVAL operand1, SCIP_Real operand2)
SCIP_RETCODE SCIPcreateConsNonlinear(SCIP *scip, SCIP_CONS **cons, const char *name, int nlinvars, SCIP_VAR **linvars, SCIP_Real *lincoefs, int nexprtrees, SCIP_EXPRTREE **exprtrees, SCIP_Real *nonlincoefs, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)
SCIP_Bool SCIPconsIsEnforced(SCIP_CONS *cons)
SCIP_EXPRGRAPHNODE ** SCIPexprgraphGetNodeChildren(SCIP_EXPRGRAPHNODE *node)
SCIP_Bool SCIPconsIsSeparated(SCIP_CONS *cons)
SCIP_RETCODE SCIPexprintHessianSparsityDense(SCIP_EXPRINT *exprint, SCIP_EXPRTREE *tree, SCIP_Real *varvals, SCIP_Bool *sparsity)
SCIP_RETCODE SCIPprintRow(SCIP *scip, SCIP_ROW *row, FILE *file)
SCIP_Real * SCIPexprGetMonomialExponents(SCIP_EXPRDATA_MONOMIAL *monomial)
SCIP_RETCODE SCIPexprtreeSubstituteVars(SCIP_EXPRTREE *tree, SCIP_EXPR **substexprs)
SCIP_RETCODE SCIPcreateConsQuadratic2(SCIP *scip, SCIP_CONS **cons, const char *name, int nlinvars, SCIP_VAR **linvars, SCIP_Real *lincoefs, int nquadvarterms, SCIP_QUADVARTERM *quadvarterms, int nbilinterms, SCIP_BILINTERM *bilinterms, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable)
SCIP_RETCODE SCIPaddQuadVarLinearCoefQuadratic(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real coef)
static SCIP_DECL_CONSENABLE(consEnableBivariate)
SCIP_Real SCIPgetRowSolFeasibility(SCIP *scip, SCIP_ROW *row, SCIP_SOL *sol)
SCIP_RETCODE SCIPunlinkSol(SCIP *scip, SCIP_SOL *sol)
static SCIP_RETCODE generate1ConvexIndefiniteUnderestimatorInTheInteriorPatternA(SCIP *scip, SCIP_EXPRINT *exprinterpreter, SCIP_EXPRTREE *f, SCIP_Real xyref[2], SCIP_Real cutcoeff[4], SCIP_Real *convenvvalue, SCIP_Bool *success)
#define SCIPdebugAddSolVal(scip, var, val)
static SCIP_RETCODE generateCut(SCIP *scip, SCIP_EXPRINT *exprinterpreter, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_SIDETYPE violside, SCIP_Real cutmaxrange, SCIP_ROW **row)
void SCIPintervalSub(SCIP_Real infinity, SCIP_INTERVAL *resultant, SCIP_INTERVAL operand1, SCIP_INTERVAL operand2)
SCIP_Bool SCIPisZero(SCIP *scip, SCIP_Real val)
static SCIP_RETCODE enforceViolatedFixedNonlinear(SCIP *scip, SCIP_CONS **conss, int nconss, SCIP_Bool *reduceddom, SCIP_Bool *infeasible)
SCIP_Bool SCIPisLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
struct SCIP_ConshdlrData SCIP_CONSHDLRDATA
SCIP_RETCODE SCIPcomputeHyperplaneThreePoints(SCIP *scip, SCIP_Real a1, SCIP_Real a2, SCIP_Real a3, SCIP_Real b1, SCIP_Real b2, SCIP_Real b3, SCIP_Real c1, SCIP_Real c2, SCIP_Real c3, SCIP_Real *alpha, SCIP_Real *beta, SCIP_Real *gamma_, SCIP_Real *delta)
SCIP_Real SCIPvarGetUbLocal(SCIP_VAR *var)
SCIP_RETCODE SCIPupdateStartpointHeurSubNlp(SCIP *scip, SCIP_HEUR *heur, SCIP_SOL *solcand, SCIP_Real violation)
SCIP_Bool SCIPconsIsMarkedPropagate(SCIP_CONS *cons)
static SCIP_RETCODE generateLinearizationCut(SCIP *scip, SCIP_EXPRINT *exprinterpreter, SCIP_CONS *cons, SCIP_Real *x0y0, SCIP_Bool newxy, SCIP_ROW **row)
static SCIP_RETCODE generate1ConvexIndefiniteUnderestimator(SCIP *scip, SCIP_EXPRINT *exprinterpreter, SCIP_CONS *cons, SCIP_Real *xyref, SCIP_ROW **row)
SCIP_Real SCIPgetUpperbound(SCIP *scip)
SCIP_RETCODE SCIPexprintFree(SCIP_EXPRINT **exprint)
#define BMSclearMemoryArray(ptr, num)
SCIP_Bool SCIPisSumLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
static SCIP_DECL_CONSFREE(consFreeBivariate)
SCIP_RETCODE SCIPsetConshdlrActive(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSACTIVE((*consactive)))
SCIP_QUADVARTERM * SCIPgetQuadVarTermsQuadratic(SCIP *scip, SCIP_CONS *cons)
#define CONSHDLR_SEPAFREQ
SCIP_RETCODE SCIPcreateNlRow(SCIP *scip, SCIP_NLROW **nlrow, const char *name, SCIP_Real constant, int nlinvars, SCIP_VAR **linvars, SCIP_Real *lincoefs, int nquadvars, SCIP_VAR **quadvars, int nquadelems, SCIP_QUADELEM *quadelems, SCIP_EXPRTREE *expression, SCIP_Real lhs, SCIP_Real rhs, SCIP_EXPRCURV curvature)
SCIP_Real SCIPceil(SCIP *scip, SCIP_Real val)
void ** SCIPexprgraphGetVars(SCIP_EXPRGRAPH *exprgraph)
SCIP_EVENTHDLRDATA * SCIPeventhdlrGetData(SCIP_EVENTHDLR *eventhdlr)
SCIP_RETCODE SCIPexprCreateLinear(BMS_BLKMEM *blkmem, SCIP_EXPR **expr, int nchildren, SCIP_EXPR **children, SCIP_Real *coefs, SCIP_Real constant)
static SCIP_RETCODE generateUnderestimatorParallelYFacets(SCIP *scip, SCIP_EXPRINT *exprinterpreter, SCIP_EXPRTREE *f, SCIP_Real *xyref, SCIP_Real cutcoeff[4], SCIP_Real *convenvvalue, SCIP_Bool *success)
SCIP_RETCODE SCIPsetConshdlrExitsol(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSEXITSOL((*consexitsol)))
SCIP_Longint SCIPgetNLPs(SCIP *scip)
SCIP_RETCODE SCIPwriteVarName(SCIP *scip, FILE *file, SCIP_VAR *var, SCIP_Bool type)
SCIP_Bool SCIPvarIsIntegral(SCIP_VAR *var)
static SCIP_RETCODE initSepaDataCreateVred(SCIP *scip, SCIP_EXPRTREE **vred, SCIP_EXPRTREE *f)
SCIP_RETCODE SCIPexprtreeSetParams(SCIP_EXPRTREE *tree, int nparams, SCIP_Real *paramvals)
static SCIP_DECL_CONSPRINT(consPrintBivariate)
SCIP_Real SCIPgetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var)
static void perturb(SCIP_Real *val, SCIP_Real lb, SCIP_Real ub, SCIP_Real amount)
SCIP_SOL * SCIPeventGetSol(SCIP_EVENT *event)
#define CONSHDLR_PRESOLTIMING
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)
#define SCIPduplicateBlockMemory(scip, ptr, source)
SCIP_Real SCIPfloor(SCIP *scip, SCIP_Real val)
static SCIP_DECL_CONSEXITPRE(consExitpreBivariate)
SCIP_Bool SCIPisConvexQuadratic(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPevalExprtreeLocalBounds(SCIP *scip, SCIP_EXPRTREE *tree, SCIP_Real infinity, SCIP_INTERVAL *val)
SCIP_Bool SCIPintervalIsSubsetEQ(SCIP_Real infinity, SCIP_INTERVAL operand1, SCIP_INTERVAL operand2)
SCIP_RETCODE SCIPexprtreeEval(SCIP_EXPRTREE *tree, SCIP_Real *varvals, SCIP_Real *val)
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_Bool SCIPvarIsActive(SCIP_VAR *var)
#define SCIPreallocBufferArray(scip, ptr, num)
SCIP_RETCODE SCIPsetConshdlrProp(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPROP((*consprop)), int propfreq, SCIP_Bool delayprop, SCIP_PROPTIMING proptiming)
#define CONSHDLR_DELAYSEPA
void SCIPexprgraphEnableNode(SCIP_EXPRGRAPH *exprgraph, SCIP_EXPRGRAPHNODE *node)
enum SCIP_SideType SCIP_SIDETYPE