53 #define CONSHDLR_NAME "varbound" 54 #define CONSHDLR_DESC "variable bounds lhs <= x + c*y <= rhs, x non-binary, y non-continuous" 55 #define CONSHDLR_SEPAPRIORITY +900000 56 #define CONSHDLR_ENFOPRIORITY -500000 57 #define CONSHDLR_CHECKPRIORITY -500000 58 #define CONSHDLR_SEPAFREQ 0 59 #define CONSHDLR_PROPFREQ 1 60 #define CONSHDLR_EAGERFREQ 100 62 #define CONSHDLR_MAXPREROUNDS -1 63 #define CONSHDLR_DELAYSEPA FALSE 64 #define CONSHDLR_DELAYPROP FALSE 65 #define CONSHDLR_NEEDSCONS TRUE 67 #define CONSHDLR_PRESOLTIMING (SCIP_PRESOLTIMING_FAST | SCIP_PRESOLTIMING_MEDIUM) 68 #define CONSHDLR_PROP_TIMING SCIP_PROPTIMING_BEFORELP 70 #define EVENTHDLR_NAME "varbound" 71 #define EVENTHDLR_DESC "bound change event handler for variable bound constraints" 73 #define LINCONSUPGD_PRIORITY +50000 82 #define DEFAULT_PRESOLPAIRWISE TRUE 83 #define DEFAULT_MAXLPCOEF 1e+09 84 #define DEFAULT_USEBDWIDENING TRUE 87 #define MAXSCALEDCOEF 1000LL 100 unsigned int presolved:1;
101 unsigned int varboundsadded:1;
102 unsigned int changed:1;
103 unsigned int tightened:1;
107 struct SCIP_ConshdlrData
148 assert(elem1 !=
NULL);
149 assert(elem2 !=
NULL);
154 assert(consdata1 !=
NULL);
155 assert(consdata2 !=
NULL);
167 && !consdata1->changed && consdata2->changed) )
171 && (consdata1->changed == consdata2->changed) )
185 assert(scip !=
NULL);
186 assert(conshdlrdata !=
NULL);
191 (*conshdlrdata)->eventhdlr = eventhdlr;
203 assert(scip !=
NULL);
204 assert(conshdlrdata !=
NULL);
205 assert(*conshdlrdata !=
NULL);
222 assert(cons !=
NULL);
223 assert(eventhdlr !=
NULL);
225 assert(consdata !=
NULL);
242 assert(cons !=
NULL);
243 assert(eventhdlr !=
NULL);
245 assert(consdata !=
NULL);
265 assert(consdata !=
NULL);
282 SCIPerrorMessage(
"left hand side of varbound constraint greater than right hand side\n");
298 (*consdata)->var = var;
299 (*consdata)->vbdvar = vbdvar;
300 (*consdata)->vbdcoef = vbdcoef;
301 (*consdata)->lhs = lhs;
302 (*consdata)->rhs = rhs;
303 (*consdata)->row =
NULL;
304 (*consdata)->presolved =
FALSE;
305 (*consdata)->varboundsadded =
FALSE;
306 (*consdata)->changed =
TRUE;
307 (*consdata)->tightened =
FALSE;
335 assert(consdata !=
NULL);
336 assert(*consdata !=
NULL);
339 if( (*consdata)->row !=
NULL )
363 assert(consdata !=
NULL);
364 assert(consdata->row ==
NULL);
387 assert(consdata !=
NULL);
391 if( conshdlr ==
NULL )
398 assert(conshdlrdata !=
NULL);
403 if(
SCIPisGT(scip,
REALABS(consdata->vbdcoef), conshdlrdata->maxlpcoef) )
406 if( consdata->row ==
NULL )
410 assert(consdata->row !=
NULL);
435 assert(consdata !=
NULL);
437 SCIPdebugMsg(scip,
"checking variable bound constraint <%s> for feasibility of solution %p (lprows=%u)\n",
450 sum = solval + consdata->vbdcoef *
SCIPgetSolVal(scip, sol, consdata->vbdvar);
485 assert(consdata !=
NULL);
491 vbdvar = consdata->vbdvar;
492 assert(vbdvar !=
NULL);
494 vbdcoef = consdata->vbdcoef;
501 assert(infervar == var);
516 relaxedbd = (consdata->lhs - (inferbd - 1.0 + 2.0*
SCIPfeastol(scip))) / vbdcoef;
518 relaxedbd = (consdata->lhs - inferbd) / vbdcoef;
556 assert(infervar == vbdvar);
576 relaxedub = consdata->lhs - (inferbd - 1.0 + 2.0 *
SCIPfeastol(scip)) * vbdcoef;
578 relaxedub = consdata->lhs - inferbd * vbdcoef;
592 relaxedub = consdata->lhs - (inferbd + 1.0 - 2.0 *
SCIPfeastol(scip)) * vbdcoef;
594 relaxedub = consdata->lhs - inferbd * vbdcoef;
616 assert(infervar == var);
631 relaxedbd = (consdata->rhs - (inferbd + 1.0 - 2.0 *
SCIPfeastol(scip))) / vbdcoef;
633 relaxedbd = (consdata->rhs - inferbd) / vbdcoef;
671 assert(infervar == vbdvar);
691 relaxedlb = consdata->rhs - (inferbd + 1.0 - 2.0 *
SCIPfeastol(scip)) * vbdcoef;
693 relaxedlb = consdata->rhs - inferbd * vbdcoef;
707 relaxedlb = consdata->rhs - (inferbd - 1.0 + 2.0 *
SCIPfeastol(scip)) * vbdcoef;
709 relaxedlb = consdata->rhs - inferbd * vbdcoef;
768 relaxedub = inferbd - 1.0;
775 assert(consdata !=
NULL);
778 assert(infervar == consdata->var);
780 abscoef =
REALABS(consdata->vbdcoef);
799 inferbd = inferbd + 1.0;
806 assert(consdata !=
NULL);
809 assert(infervar == consdata->var);
811 abscoef =
REALABS(consdata->vbdcoef);
837 relaxedlb = inferbd + 1.0;
844 assert(consdata !=
NULL);
847 assert(infervar == consdata->var);
849 abscoef =
REALABS(consdata->vbdcoef);
868 inferbd = inferbd - 1.0;
875 assert(consdata !=
NULL);
878 assert(infervar == consdata->var);
880 abscoef =
REALABS(consdata->vbdcoef);
920 assert(cons !=
NULL);
921 assert(result !=
NULL);
924 assert(consdata !=
NULL);
928 if( conshdlr ==
NULL )
937 vbdvar = consdata->vbdvar;
938 vbdcoef = consdata->vbdcoef;
954 &cutoff, &tightened) );
981 &cutoff, &tightened) );
1008 if( consdata->row ==
NULL )
1012 assert(consdata->row !=
NULL);
1044 assert(scip !=
NULL);
1045 assert(cons !=
NULL);
1053 assert(consdata !=
NULL);
1054 assert(consdata->var !=
NULL && consdata->vbdvar !=
NULL);
1058 if(
SCIPisEQ(scip, consdata->lhs, lhs) )
1061 assert(consdata->row ==
NULL);
1064 if(
SCIPisEQ(scip, lhs, consdata->rhs) )
1065 consdata->rhs = lhs;
1102 if(
SCIPisLT(scip, consdata->lhs, lhs) )
1104 consdata->varboundsadded =
FALSE;
1105 consdata->tightened =
FALSE;
1110 consdata->presolved =
FALSE;
1111 consdata->lhs = lhs;
1112 consdata->changed =
TRUE;
1127 assert(scip !=
NULL);
1128 assert(cons !=
NULL);
1136 assert(consdata !=
NULL);
1137 assert(consdata->var !=
NULL && consdata->vbdvar !=
NULL);
1141 if(
SCIPisEQ(scip, consdata->rhs, rhs) )
1144 assert(consdata->row ==
NULL);
1147 if(
SCIPisEQ(scip, rhs, consdata->lhs) )
1148 consdata->lhs = rhs;
1185 if(
SCIPisGT(scip, consdata->rhs, rhs) )
1187 consdata->varboundsadded =
FALSE;
1188 consdata->tightened =
FALSE;
1193 consdata->presolved =
FALSE;
1194 consdata->rhs = rhs;
1195 consdata->changed =
TRUE;
1222 assert(cutoff !=
NULL);
1223 assert(nchgbds !=
NULL);
1226 assert(consdata !=
NULL);
1228 SCIPdebugMsg(scip,
"propagating variable bound constraint <%s>: %.15g <= <%s>[%.9g, %.9g] + %.15g<%s>[%.9g, %.9g] <= %.15g\n",
1248 if(
SCIPisZero(scip, consdata->vbdcoef) &&
SCIPisEQ(scip, consdata->lhs, consdata->rhs) )
1266 tightenedround =
FALSE;
1278 if( consdata->vbdcoef > 0.0 )
1281 newlb =
SCIPadjustedVarLb(scip, consdata->var, consdata->lhs - consdata->vbdcoef * yub);
1288 newlb =
SCIPadjustedVarLb(scip, consdata->var, consdata->lhs - consdata->vbdcoef * ylb);
1297 SCIPdebugMsg(scip,
"cutoff while tightening <%s>[%.15g,%.15g] -> [%.15g,%.15g]\n",
SCIPvarGetName(consdata->var), xlb, xub, newlb, xub);
1310 tightenedround =
TRUE;
1324 if( consdata->vbdcoef > 0.0 )
1326 newlb =
SCIPadjustedVarLb(scip, consdata->vbdvar, (consdata->lhs - xub)/consdata->vbdcoef);
1327 if( newlb > ylb + 0.5 )
1333 SCIPdebugMsg(scip,
"cutoff while tightening <%s>[%.15g,%.15g] -> [%.15g,%.15g]\n",
SCIPvarGetName(consdata->vbdvar), ylb, yub, newlb, yub);
1343 SCIPdebugMsg(scip,
" -> tighten <%s>[%.15g,%.15g] -> [%.15g,%.15g]\n",
SCIPvarGetName(consdata->vbdvar), ylb, yub, newlb, yub);
1344 tightenedround =
TRUE;
1352 newub =
SCIPadjustedVarUb(scip, consdata->vbdvar, (consdata->lhs - xub)/consdata->vbdcoef);
1353 if( newub < yub - 0.5 )
1359 SCIPdebugMsg(scip,
"cutoff while tightening <%s>[%.15g,%.15g] -> [%.15g,%.15g]\n",
SCIPvarGetName(consdata->vbdvar), ylb, yub, ylb, newub);
1371 SCIPdebugMsg(scip,
" -> tighten <%s>[%.15g,%.15g] -> [%.15g,%.15g]\n",
SCIPvarGetName(consdata->vbdvar), ylb, yub, ylb, newub);
1372 tightenedround =
TRUE;
1392 if( consdata->vbdcoef > 0.0 )
1395 newub =
SCIPadjustedVarUb(scip, consdata->var, consdata->rhs - consdata->vbdcoef * ylb);
1402 newub =
SCIPadjustedVarUb(scip, consdata->var, consdata->rhs - consdata->vbdcoef * yub);
1411 SCIPdebugMsg(scip,
"cutoff while tightening <%s>[%.15g,%.15g] -> [%.15g,%.15g]\n",
SCIPvarGetName(consdata->var), xlb, xub, xlb, newub);
1424 tightenedround =
TRUE;
1438 if( consdata->vbdcoef > 0.0 )
1440 newub =
SCIPadjustedVarUb(scip, consdata->vbdvar, (consdata->rhs - xlb)/consdata->vbdcoef);
1441 if( newub < yub - 0.5 )
1447 SCIPdebugMsg(scip,
"cutoff while tightening <%s>[%.15g,%.15g] -> [%.15g,%.15g]\n",
SCIPvarGetName(consdata->vbdvar), ylb, yub, ylb, newub);
1459 SCIPdebugMsg(scip,
" -> tighten <%s>[%.15g,%.15g] -> [%.15g,%.15g]\n",
SCIPvarGetName(consdata->vbdvar), ylb, yub, ylb, newub);
1460 tightenedround =
TRUE;
1469 newlb =
SCIPadjustedVarLb(scip, consdata->vbdvar, (consdata->rhs - xlb)/consdata->vbdcoef);
1470 if( newlb > ylb + 0.5 )
1476 SCIPdebugMsg(scip,
"cutoff while tightening <%s>[%.15g,%.15g] -> [%.15g,%.15g]\n",
SCIPvarGetName(consdata->vbdvar), ylb, yub, newlb, yub);
1488 SCIPdebugMsg(scip,
" -> tighten <%s>[%.15g,%.15g] -> [%.15g,%.15g]\n",
SCIPvarGetName(consdata->vbdvar), ylb, yub, newlb, yub);
1489 tightenedround =
TRUE;
1500 while( tightenedround );
1507 ((consdata->vbdcoef > 0.0 &&
SCIPisFeasGE(scip, xlb + consdata->vbdcoef * ylb, consdata->lhs))
1508 || (consdata->vbdcoef < 0.0 &&
SCIPisFeasGE(scip, xlb + consdata->vbdcoef * yub, consdata->lhs))) )
1518 ((consdata->vbdcoef > 0.0 &&
SCIPisFeasLE(scip, xub + consdata->vbdcoef * yub, consdata->rhs))
1519 || (consdata->vbdcoef < 0.0 &&
SCIPisFeasLE(scip, xub + consdata->vbdcoef * ylb, consdata->rhs))) )
1529 || (consdata->vbdcoef > 0.0 &&
SCIPisFeasGE(scip, xlb + consdata->vbdcoef * ylb, consdata->lhs))
1530 || (consdata->vbdcoef < 0.0 &&
SCIPisFeasGE(scip, xlb + consdata->vbdcoef * yub, consdata->lhs)))
1532 || (consdata->vbdcoef > 0.0 &&
SCIPisFeasLE(scip, xub + consdata->vbdcoef * yub, consdata->rhs))
1533 || (consdata->vbdcoef < 0.0 &&
SCIPisFeasLE(scip, xub + consdata->vbdcoef * ylb, consdata->rhs))) )
1535 SCIPdebugMsg(scip,
"variable bound constraint <%s> is redundant: <%s>[%.15g,%.15g], <%s>[%.15g,%.15g]\n",
1542 #ifdef SCIP_DISABLED_CODE 1547 && ((consdata->vbdcoef > 0.0 && !
SCIPisInfinity(scip, -consdata->lhs))
1548 || (consdata->vbdcoef < 0.0 && !
SCIPisInfinity(scip, consdata->rhs))) )
1557 && ((consdata->vbdcoef < 0.0 && !
SCIPisInfinity(scip, -consdata->lhs))
1558 || (consdata->vbdcoef > 0.0 && !
SCIPisInfinity(scip, consdata->rhs))) )
1583 if( ndelconss !=
NULL )
1635 assert(scip !=
NULL);
1636 assert(var !=
NULL);
1637 assert(vbdvar !=
NULL);
1638 assert(sideequal !=
NULL);
1639 assert(cons0sidered !=
NULL);
1640 assert(cons1sidered !=
NULL);
1648 redundant0 = cons1sidered;
1649 redundant1 = cons0sidered;
1653 redundant0 = cons0sidered;
1654 redundant1 = cons1sidered;
1663 if( !*redundant0 && !*redundant1 )
1666 boundxlb1 = side0 - lbvbdvar*coef0;
1667 boundxlb2 = side1 - lbvbdvar*coef1;
1668 boundylb1 = (side0 - lbvar)/coef0;
1669 boundylb2 = (side1 - lbvar)/coef1;
1671 boundxub1 = side0 - ubvbdvar*coef0;
1672 boundxub2 = side1 - ubvbdvar*coef1;
1673 boundyub1 = (side0 - ubvar)/coef0;
1674 boundyub2 = (side1 - ubvar)/coef1;
1678 boundvaluex1 =
MAX(boundxlb1, boundxlb2);
1679 boundvaluex2 =
MAX(boundxub1, boundxub2);
1683 boundvaluex1 =
MIN(boundxlb1, boundxlb2);
1684 boundvaluex2 =
MIN(boundxub1, boundxub2);
1690 valuex1 =
MIN(boundvaluex1, ubvar);
1691 valuex1 =
MAX(valuex1, lbvar);
1692 valuex2 =
MAX(boundvaluex2, lbvar);
1693 valuex2 =
MIN(valuex2, ubvar);
1706 valuex1 =
MAX(boundvaluex1, lbvar);
1707 valuex1 =
MIN(valuex1, ubvar);
1708 valuex2 =
MIN(boundvaluex2, ubvar);
1709 valuex2 =
MAX(valuex2, lbvar);
1722 valuey1 = (side0 - valuex1)/coef0;
1723 valuey2 = (side1 - valuex1)/coef1;
1726 if( valuey1 - valuey2 <= eps )
1730 if( valuey1 < valuey2 )
1737 if( valuey1 < valuey2 )
1744 valuey1 = (side0 - valuex2)/coef0;
1745 valuey2 = (side1 - valuex2)/coef1;
1751 if( (*redundant1 && valuey1 > valuey2) || (*redundant0 && valuey1 < valuey2) )
1754 *redundant0 =
FALSE;
1755 *redundant1 =
FALSE;
1758 else if( *sideequal )
1760 if( valuey1 + eps < valuey2 )
1765 else if( valuey1 + eps > valuey2 )
1775 if( (*redundant1 && valuey1 < valuey2) || (*redundant0 && valuey1 > valuey2) )
1778 *redundant0 =
FALSE;
1779 *redundant1 =
FALSE;
1782 else if( *sideequal )
1784 if( valuey1 + eps < valuey2 )
1789 else if( valuey1 + eps > valuey2 )
1796 assert(*sideequal || *redundant0 || *redundant1);
1803 boundvaluey1 =
MAX(boundylb1, boundylb2);
1804 boundvaluey2 =
MAX(boundyub1, boundyub2);
1808 boundvaluey1 =
MIN(boundylb1, boundylb2);
1809 boundvaluey2 =
MIN(boundyub1, boundyub2);
1812 valuey1 =
MIN(boundvaluey1, ubvbdvar);
1813 valuey1 =
MAX(valuey1, lbvbdvar);
1814 valuey2 =
MAX(boundvaluey2, lbvbdvar);
1815 valuey2 =
MIN(valuey2, ubvbdvar);
1826 boundvaluey1 =
MIN(boundylb1, boundylb2);
1827 boundvaluey2 =
MIN(boundyub1, boundyub2);
1831 boundvaluey1 =
MAX(boundylb1, boundylb2);
1832 boundvaluey2 =
MAX(boundyub1, boundyub2);
1835 valuey1 =
MAX(boundvaluey1, lbvbdvar);
1836 valuey1 =
MIN(valuey1, ubvbdvar);
1837 valuey2 =
MIN(boundvaluey2, ubvbdvar);
1838 valuey2 =
MAX(valuey2, lbvbdvar);
1848 valuex1 = side0 - valuey1*coef0;
1849 valuex2 = side1 - valuey1*coef1;
1852 if( (*redundant1 && valuex1 > valuex2) || (*redundant0 && valuex1 < valuex2) )
1855 *redundant0 =
FALSE;
1856 *redundant1 =
FALSE;
1861 if( valuex1 + eps < valuex2 )
1866 else if( valuex1 + eps > valuex2 )
1874 valuex1 = side0 - valuey2*coef0;
1875 valuex2 = side1 - valuey2*coef1;
1878 if( (*redundant1 && valuex1 > valuex2) || (*redundant0 && valuex1 < valuex2) )
1881 *redundant0 =
FALSE;
1882 *redundant1 =
FALSE;
1887 if( valuex1 + eps < valuex2 )
1892 else if( valuex1 + eps > valuex2 )
1898 assert(*redundant0 || *redundant1 || *sideequal);
1959 assert(scip !=
NULL);
1960 assert(conss !=
NULL);
1961 assert(cutoff !=
NULL);
1962 assert(nchgbds !=
NULL);
1963 assert(ndelconss !=
NULL);
1964 assert(nchgcoefs !=
NULL);
1965 assert(nchgsides !=
NULL);
1971 SCIPsortPtr((
void**)sortedconss, consVarboundComp, nconss);
1974 for( c = nconss - 1; c > 0 && !(*cutoff); --c )
1979 cons0 = sortedconss[c];
1985 assert(consdata0 !=
NULL);
1986 assert(consdata0->var !=
NULL);
1987 assert(consdata0->vbdvar !=
NULL);
1990 assert(!
SCIPisZero(scip, consdata0->vbdcoef));
1993 if( !consdata0->changed )
1996 consdata0->changed =
FALSE;
1998 for( s = c - 1; s >= 0; --s )
2007 cons1 = sortedconss[s];
2013 assert(consdata1 !=
NULL);
2014 assert(consdata1->var !=
NULL);
2015 assert(consdata1->vbdvar !=
NULL);
2018 assert(!
SCIPisZero(scip, consdata1->vbdcoef));
2021 lhs = consdata0->lhs;
2022 rhs = consdata0->rhs;
2023 coef = consdata0->vbdcoef;
2026 if ( consdata0->var == consdata1->vbdvar && consdata0->vbdvar == consdata1->var &&
2034 scalar = (1.0 - coef * consdata1->vbdcoef);
2037 assert( !
SCIPisZero(scip, consdata0->vbdcoef) );
2038 assert( !
SCIPisZero(scip, consdata1->vbdcoef) );
2046 bnd = (lhs - coef * consdata1->rhs)/scalar;
2052 bnd = (lhs - coef * consdata1->lhs)/scalar;
2089 bnd = (rhs - coef * consdata1->lhs)/scalar;
2095 bnd = (rhs - coef * consdata1->rhs)/scalar;
2133 bnd = (consdata1->lhs - consdata1->vbdcoef * rhs)/scalar;
2139 bnd = (consdata1->lhs - consdata1->vbdcoef * lhs)/scalar;
2176 bnd = (consdata1->rhs - consdata1->vbdcoef * lhs)/scalar;
2182 bnd = (consdata1->rhs - consdata1->vbdcoef * rhs)/scalar;
2214 if( consdata0->var != consdata1->var || consdata0->vbdvar != consdata1->vbdvar )
2221 if(
SCIPisEQ(scip, coef, consdata1->vbdcoef) )
2223 lhs =
MAX(consdata1->lhs, lhs);
2224 rhs =
MIN(consdata1->rhs, rhs);
2237 lhs =
MAX(consdata1->lhs, lhs);
2238 coef = lhs -
MAX(consdata1->lhs - consdata1->vbdcoef, consdata0->lhs - coef);
2243 rhs =
MIN(consdata1->rhs, rhs);
2244 coef = rhs -
MIN(consdata1->rhs - consdata1->vbdcoef, consdata0->rhs - coef);
2266 checkRedundancySide(scip, consdata0->var, consdata0->vbdvar, coef, consdata1->vbdcoef, lhs, consdata1->lhs, &lhsequal, &cons0lhsred, &cons1lhsred,
TRUE);
2269 checkRedundancySide(scip, consdata0->var, consdata0->vbdvar, coef, consdata1->vbdcoef, rhs, consdata1->rhs, &rhsequal, &cons0rhsred, &cons1rhsred,
FALSE);
2272 if( (lhsequal || cons0lhsred) && (rhsequal || cons0rhsred) )
2289 else if( cons1lhsred && cons1rhsred )
2306 else if( (lhsequal || cons0lhsred) && !
SCIPisInfinity(scip, -lhs) )
2323 deletecons1 =
FALSE;
2326 else if( (rhsequal || cons0rhsred) && !
SCIPisInfinity(scip, rhs) )
2343 deletecons1 =
FALSE;
2390 rhs = (lhs + rhs)/2;
2408 SCIPdebugMsg(scip,
"are both redundant and lead to bounding of <%s> in [%g, %g]\n",
SCIPvarGetName(consdata0->var), lhs, rhs);
2419 assert(!infeasible);
2428 assert(!infeasible);
2470 if( !
SCIPisEQ(scip, consdata0->vbdcoef, coef) )
2475 consdata0->varboundsadded =
FALSE;
2476 consdata0->tightened =
FALSE;
2477 consdata0->presolved =
FALSE;
2478 consdata0->changed =
FALSE;
2480 consdata0->vbdcoef = coef;
2486 if( !
SCIPisEQ(scip, consdata0->lhs, lhs) )
2491 if( !
SCIPisEQ(scip, consdata0->rhs, rhs) )
2534 assert(scip !=
NULL);
2535 assert(conss !=
NULL || nconss == 0);
2536 assert(nchgcoefs !=
NULL);
2537 assert(nchgsides !=
NULL);
2543 for( c = nconss - 1; c >= 0; --c )
2545 assert(conss !=
NULL);
2551 assert(consdata !=
NULL);
2572 success =
SCIPrealToRational(consdata->vbdcoef, -epsilon, epsilon , maxmult, &nominator, &denominator);
2579 denominator /= nominator;
2583 success = success && (denominator <= maxmult);
2586 if( success && ABS(denominator) > 1 && nominator == 1)
2593 assert(
SCIPisEQ(scip, consdata->vbdcoef * denominator, 1.0));
2596 if( consdata->vbdcoef < 0 )
2598 assert(denominator < 0);
2605 consdata->lhs = consdata->rhs * denominator;
2613 consdata->rhs = consdata->lhs * denominator;
2623 tmp = consdata->lhs;
2624 consdata->lhs = consdata->rhs * denominator;
2625 consdata->rhs = tmp * denominator;
2626 consdata->tightened =
FALSE;
2636 assert(denominator > 0);
2641 consdata->lhs *= denominator;
2649 consdata->rhs *= denominator;
2654 assert(
SCIPisGE(scip, consdata->rhs, consdata->lhs));
2658 swapvar = consdata->var;
2659 consdata->var = consdata->vbdvar;
2660 consdata->vbdvar = swapvar;
2663 consdata->vbdcoef = (
SCIP_Real)denominator;
2667 consdata->varboundsadded =
FALSE;
2668 consdata->tightened =
FALSE;
2703 assert(scip !=
NULL);
2704 assert(cons !=
NULL);
2705 assert(cutoff !=
NULL);
2706 assert(nchgbds !=
NULL);
2707 assert(ndelconss !=
NULL);
2708 assert(naddconss !=
NULL);
2715 assert(consdata !=
NULL);
2718 var = consdata->var;
2722 vbdvar = consdata->vbdvar;
2724 vbdvarconstant = 0.0;
2726 varschanged = (var != consdata->var || vbdvar != consdata->vbdvar);
2734 SCIPdebugMsg(scip,
"variable bound constraint <%s> has equal variable and vbd variable <%s>\n",
2740 scalar = varscalar + consdata->vbdcoef * vbdvarscalar;
2741 constant = varconstant + consdata->vbdcoef * vbdvarconstant;
2748 else if( scalar > 0.0 )
2811 SCIPdebugMsg(scip,
"variable bound constraint <%s>: variable <%s> is fixed to %.15g\n",
2820 if( consdata->vbdcoef > 0.0 )
2825 TRUE, cutoff, &tightened) );
2837 TRUE, cutoff, &tightened) );
2847 if( consdata->vbdcoef > 0.0 )
2852 TRUE, cutoff, &tightened) );
2864 TRUE, cutoff, &tightened) );
2875 else if( var != consdata->var )
2878 if( varscalar > 0.0 )
2885 consdata->lhs = (consdata->lhs - varconstant)/varscalar;
2887 consdata->rhs = (consdata->rhs - varconstant)/varscalar;
2888 consdata->vbdcoef /= varscalar;
2892 consdata->vbdcoef =
SCIPround(scip, consdata->vbdcoef);
2894 consdata->tightened =
FALSE;
2900 assert(varscalar != 0.0);
2906 lhs = consdata->lhs;
2907 consdata->lhs = -consdata->rhs;
2908 consdata->rhs = -lhs;
2910 consdata->lhs = (consdata->lhs + varconstant)/(-varscalar);
2912 consdata->rhs = (consdata->rhs + varconstant)/(-varscalar);
2913 consdata->vbdcoef /= varscalar;
2917 consdata->vbdcoef =
SCIPround(scip, consdata->vbdcoef);
2919 consdata->tightened =
FALSE;
2923 consdata->var = var;
2931 SCIPdebugMsg(scip,
"variable bound constraint <%s>: vbd variable <%s> is fixed to %.15g\n",
2943 TRUE, cutoff, &tightened) );
2955 TRUE, cutoff, &tightened) );
2965 else if( vbdvar != consdata->vbdvar )
2973 consdata->lhs -= consdata->vbdcoef * vbdvarconstant;
2975 consdata->rhs -= consdata->vbdcoef * vbdvarconstant;
2976 consdata->vbdcoef *= vbdvarscalar;
2978 consdata->tightened =
FALSE;
2982 consdata->vbdvar = vbdvar;
2997 consdata->changed =
TRUE;
3007 lhs = consdata->lhs;
3008 rhs = consdata->rhs;
3018 if( var != consdata->var )
3038 assert(var == consdata->var);
3044 if( vbdvar != consdata->vbdvar )
3064 assert(vbdvar == consdata->vbdvar);
3071 SCIPdebugMsg(scip,
"resolved multi aggregation in varbound constraint <%s> by creating a new linear constraint\n",
SCIPconsGetName(cons));
3081 if( !(*cutoff) && redundant )
3109 assert(nchgcoefs !=
NULL);
3110 assert(nchgsides !=
NULL);
3111 assert(ndelconss !=
NULL);
3114 assert(consdata !=
NULL);
3117 if( consdata->tightened )
3122 consdata->tightened =
TRUE;
3133 consdata->changed =
TRUE;
3139 consdata->changed =
TRUE;
3147 oldnchgcoefs = *nchgcoefs;
3148 oldnchgsides = *nchgsides;
3223 consdata->vbdcoef =
SCIPfeasCeil(scip, consdata->vbdcoef);
3235 else if( (
SCIPisInfinity(scip, -consdata->lhs) ||
SCIPisFeasGE(scip, consdata->vbdcoef -
SCIPfeasFloor(scip, consdata->vbdcoef), consdata->lhs -
SCIPfeasFloor(scip, consdata->lhs))) && (
SCIPisInfinity(scip, consdata->rhs) ||
SCIPisFeasGT(scip, consdata->vbdcoef -
SCIPfeasFloor(scip, consdata->vbdcoef), consdata->rhs -
SCIPfeasFloor(scip, consdata->rhs))) )
3237 consdata->vbdcoef =
SCIPfeasCeil(scip, consdata->vbdcoef);
3256 else if( (
SCIPisInfinity(scip, -consdata->lhs) ||
SCIPisFeasLT(scip, consdata->vbdcoef -
SCIPfeasFloor(scip, consdata->vbdcoef), consdata->lhs -
SCIPfeasFloor(scip, consdata->lhs))) && (
SCIPisInfinity(scip, consdata->rhs) ||
SCIPisFeasLE(scip, consdata->vbdcoef -
SCIPfeasFloor(scip, consdata->vbdcoef), consdata->rhs -
SCIPfeasFloor(scip, consdata->rhs))) )
3335 if( consdata->vbdcoef > 0.0 &&
SCIPisFeasGT(scip, xlb, consdata->lhs - consdata->vbdcoef) &&
SCIPisFeasLT(scip, xub, consdata->rhs) )
3341 oldrhs = consdata->rhs;
3347 newcoef =
MAX(consdata->vbdcoef - consdata->rhs + xub, consdata->lhs - xlb);
3348 newrhs = consdata->rhs - consdata->vbdcoef + newcoef;
3350 SCIPdebugMsg(scip,
"tighten varbound %.15g <= <%s>[%.15g,%.15g] %+.15g<%s> <= %.15g to %.15g <= <%s> %+.15g<%s> <= %.15g\n",
3355 assert(consdata->vbdcoef * newcoef > 0);
3357 consdata->vbdcoef = newcoef;
3358 consdata->rhs = newrhs;
3368 consdata->tightened =
FALSE;
3370 assert(consdata->tightened);
3375 else if( consdata->vbdcoef < 0.0 &&
SCIPisFeasGT(scip, xlb, consdata->lhs) &&
SCIPisFeasLT(scip, xub, consdata->rhs - consdata->vbdcoef) )
3381 oldlhs = consdata->lhs;
3387 newcoef =
MIN(consdata->vbdcoef - consdata->lhs + xlb, consdata->rhs - xub);
3388 newlhs = consdata->lhs - consdata->vbdcoef + newcoef;
3390 SCIPdebugMsg(scip,
"tighten varbound %.15g <= <%s>[%.15g,%.15g] %+.15g<%s> <= %.15g to %.15g <= <%s> %+.15g<%s> <= %.15g\n",
3395 assert(consdata->vbdcoef * newcoef > 0);
3397 consdata->vbdcoef = newcoef;
3398 consdata->lhs = newlhs;
3408 consdata->tightened =
FALSE;
3410 assert(consdata->tightened);
3419 if( consdata->vbdcoef > 0.0 &&
SCIPisFeasGT(scip, xlb, consdata->lhs - consdata->vbdcoef) )
3425 SCIPdebugMsg(scip,
"tighten binary VLB <%s>[%.15g,%.15g] %+.15g<%s> >= %.15g to <%s> %+.15g<%s> >= %.15g\n",
3430 assert(consdata->vbdcoef * (consdata->lhs - xlb) > 0);
3432 consdata->vbdcoef = consdata->lhs - xlb;
3435 else if( consdata->vbdcoef < 0.0 &&
SCIPisFeasGT(scip, xlb, consdata->lhs) )
3441 SCIPdebugMsg(scip,
"tighten binary VLB <%s>[%.15g,%.15g] %+.15g<%s> >= %.15g to <%s> %+.15g<%s> >= %.15g\n",
3446 assert(consdata->vbdcoef * (consdata->vbdcoef - consdata->lhs + xlb) > 0);
3448 consdata->vbdcoef = consdata->vbdcoef - consdata->lhs + xlb;
3449 consdata->lhs = xlb;
3457 if( consdata->vbdcoef < 0.0 &&
SCIPisFeasLT(scip, xub, consdata->rhs - consdata->vbdcoef) )
3463 SCIPdebugMsg(scip,
"tighten binary VUB <%s>[%.15g,%.15g] %+.15g<%s> <= %.15g to <%s> %+.15g<%s> <= %.15g\n",
3468 assert(consdata->vbdcoef * (consdata->rhs - xub) > 0);
3470 consdata->vbdcoef = consdata->rhs - xub;
3473 else if( consdata->vbdcoef > 0.0 &&
SCIPisFeasLT(scip, xub, consdata->rhs) )
3479 SCIPdebugMsg(scip,
"tighten binary VUB <%s>[%.15g,%.15g] %+.15g<%s> <= %.15g to <%s> %+.15g<%s> <= %.15g\n",
3484 assert(consdata->vbdcoef * (consdata->vbdcoef - consdata->rhs + xub) > 0);
3486 consdata->vbdcoef = consdata->vbdcoef - consdata->rhs + xub;
3487 consdata->rhs = xub;
3496 if( *nchgcoefs > oldnchgcoefs || *nchgsides > oldnchgsides )
3498 consdata->varboundsadded =
FALSE;
3499 consdata->changed =
TRUE;
3527 assert(scip !=
NULL);
3528 assert(conshdlrdata !=
NULL);
3529 assert(conss !=
NULL || nconss == 0);
3530 assert(cutoff !=
NULL);
3531 assert(naggrvars !=
NULL);
3532 assert(nchgbds !=
NULL);
3533 assert(nchgcoefs !=
NULL);
3534 assert(nchgsides !=
NULL);
3535 assert(ndelconss !=
NULL);
3536 assert(naddconss !=
NULL);
3545 assert(conss !=
NULL);
3547 for( c = nconss - 1; c >= 0; --c )
3550 assert(cons !=
NULL);
3556 assert(consdata !=
NULL);
3557 assert(
SCIPisLE(scip, consdata->lhs, consdata->rhs));
3559 if( !consdata->presolved )
3562 SCIP_CALL(
applyFixings(scip, cons, conshdlrdata->eventhdlr, cutoff, nchgbds, ndelconss, naddconss) );
3573 SCIP_CALL(
propagateCons(scip, cons, conshdlrdata->usebdwidening, cutoff, nchgbds, nchgsides, ndelconss) );
3581 if( !consdata->tightened )
3589 assert(
SCIPisLE(scip, consdata->lhs, consdata->rhs));
3602 if( consdata->vbdcoef > 0.0 )
3604 if(
SCIPisEQ(scip, consdata->rhs, 1.0) )
3607 if(
SCIPisEQ(scip, consdata->lhs, 1.0) )
3613 SCIPdebugMsg(scip,
"varbound constraint <%s>: aggregate <%s> + <%s> == 1\n",
3618 assert(!infeasible);
3626 assert(consdata->lhs < 0.5);
3628 vars[0] = consdata->var;
3629 vars[1] = consdata->vbdvar;
3633 assert(
SCIPisEQ(scip, consdata->lhs, 1.0));
3652 SCIPdebugMsg(scip,
"varbound constraint <%s>: aggregate <%s> - <%s> == 0\n",
3657 assert(!infeasible);
3665 assert(consdata->lhs < -0.5);
3667 vars[0] = consdata->var;
3676 vars[1] = consdata->vbdvar;
3714 assert(upgdcons !=
NULL);
3721 upgrade = (nvars == 2) && (nposbin + nnegbin <= 1) && (nposcont + nnegcont <= 1);
3747 if(
SCIPisZero(scip, vals[vbdind]/vals[1-vbdind]) )
3752 var = vars[1-vbdind];
3753 vbdvar = vars[vbdind];
3756 vbdcoef = vals[vbdind]/vals[1-vbdind];
3758 if( vals[1-vbdind] > 0.0 )
3793 assert(scip !=
NULL);
3794 assert(conshdlr !=
NULL);
3811 assert(scip !=
NULL);
3812 assert(conshdlr !=
NULL);
3817 assert(conshdlrdata !=
NULL);
3834 for( c = 0; c < nconss; ++c )
3837 assert(consdata !=
NULL);
3839 if( consdata->row !=
NULL )
3856 assert(conshdlrdata !=
NULL);
3878 assert(conshdlr !=
NULL);
3881 assert(conshdlrdata !=
NULL);
3884 assert(sourcedata !=
NULL);
3888 sourcedata->var, sourcedata->vbdvar, sourcedata->vbdcoef, sourcedata->lhs, sourcedata->rhs) );
3910 *infeasible =
FALSE;
3912 for( i = 0; i < nconss && !(*infeasible); i++ )
3929 assert(conshdlr !=
NULL);
3932 assert(conshdlrdata !=
NULL);
3937 for( i = 0; i < nusefulconss; ++i )
3943 for( i = nusefulconss; i < nconss && *result ==
SCIP_DIDNOTFIND; ++i )
3959 assert(conshdlr !=
NULL);
3962 assert(conshdlrdata !=
NULL);
3967 for( i = 0; i < nusefulconss; ++i )
3973 for( i = nusefulconss; i < nconss && *result ==
SCIP_DIDNOTFIND; ++i )
3989 assert(conshdlr !=
NULL);
3992 assert(conshdlrdata !=
NULL);
3996 for( i = 0; i < nconss; i++ )
4029 assert(conshdlr !=
NULL);
4032 assert(conshdlrdata !=
NULL);
4036 for( i = 0; i < nconss; i++ )
4068 for( i = 0; i < nconss; i++ )
4097 for( i = 0; i < nconss && (*result ==
SCIP_FEASIBLE || completely); i++ )
4099 if( !
checkCons(scip, conss[i], sol, checklprows) )
4109 assert( consdata !=
NULL );
4118 SCIPinfoMessage(scip,
NULL,
"violation: left hand side is violated by %.15g\n", consdata->lhs - sum);
4122 SCIPinfoMessage(scip,
NULL,
"violation: right hand side is violated by %.15g\n", sum - consdata->rhs);
4142 assert(conshdlr !=
NULL);
4145 assert(conshdlrdata !=
NULL);
4150 SCIPdebugMsg(scip,
"propagating %d variable bound constraints\n", nmarkedconss);
4153 for( i = 0; i < nmarkedconss && !cutoff; i++ )
4160 else if( nchgbds > 0 )
4185 assert(scip !=
NULL);
4186 assert(conshdlr !=
NULL);
4188 assert(result !=
NULL);
4192 assert(conshdlrdata !=
NULL);
4195 oldnchgbds = *nchgbds;
4196 oldndelconss = *ndelconss;
4197 oldnaddconss = *naddconss;
4198 oldnchgcoefs = *nchgcoefs;
4199 oldnchgsides = *nchgsides;
4200 oldnaggrvars = *naggrvars;
4202 for( i = 0; i < nconss; i++ )
4205 assert(cons !=
NULL);
4210 assert(consdata !=
NULL);
4217 consdata->presolved =
FALSE;
4219 if( consdata->presolved )
4221 consdata->presolved =
TRUE;
4224 SCIP_CALL(
applyFixings(scip, cons, conshdlrdata->eventhdlr, &cutoff, nchgbds, ndelconss, naddconss) );
4232 SCIP_CALL(
propagateCons(scip, cons, conshdlrdata->usebdwidening, &cutoff, nchgbds, nchgsides, ndelconss) );
4245 if( !consdata->varboundsadded )
4249 int localoldnchgbds;
4251 localoldnchgbds = *nchgbds;
4256 SCIPdebugMsg(scip,
"adding variable lower bound <%s> >= %g<%s> + %g (and potentially also <%s> %s %g<%s> + %g)\n",
4258 SCIPvarGetName(consdata->vbdvar), (consdata->vbdcoef > 0 ?
">=" :
"<="), 1.0/-consdata->vbdcoef,
4262 &infeasible, &nlocalchgbds) );
4263 assert(!infeasible);
4265 *nchgbds += nlocalchgbds;
4271 SCIPdebugMsg(scip,
"adding variable upper bound <%s> <= %g<%s> + %g (and potentially also <%s> %s %g<%s> + %g)\n",
4273 SCIPvarGetName(consdata->vbdvar), (consdata->vbdcoef > 0 ?
"<=" :
">="), 1.0/-consdata->vbdcoef,
4277 &infeasible, &nlocalchgbds) );
4278 assert(!infeasible);
4280 *nchgbds += nlocalchgbds;
4282 consdata->varboundsadded =
TRUE;
4284 if( *nchgbds > localoldnchgbds )
4298 SCIP_CALL(
upgradeConss(scip, conshdlrdata, conss, nconss, &cutoff, naggrvars, nchgbds, nchgcoefs, nchgsides, ndelconss, naddconss) );
4310 else if( *nchgbds > oldnchgbds || *ndelconss > oldndelconss || *naddconss > oldnaddconss
4311 || *nchgcoefs > oldnchgcoefs || *nchgsides > oldnchgsides || *naggrvars > oldnaggrvars )
4326 assert(conshdlr !=
NULL);
4329 assert(conshdlrdata !=
NULL);
4346 assert(consdata !=
NULL);
4351 if( consdata->vbdcoef > 0.0 )
4364 if( consdata->vbdcoef > 0.0 )
4383 assert(scip !=
NULL);
4384 assert(conshdlr !=
NULL);
4385 assert(cons !=
NULL);
4388 assert(consdata !=
NULL);
4393 && !
SCIPisEQ(scip, consdata->lhs, consdata->rhs) )
4407 if(
SCIPisEQ(scip, consdata->lhs, consdata->rhs) )
4425 const char* consname;
4444 initial, separate, enforce, check, propagate, local, modifiable, dynamic, removable, stickingatnode, global, valid) );
4464 assert(scip !=
NULL);
4465 assert(success !=
NULL);
4466 assert(str !=
NULL);
4467 assert(name !=
NULL);
4468 assert(cons !=
NULL);
4481 while( isspace(*str) )
4484 if( isdigit(str[0]) || ((str[0] ==
'-' || str[0] ==
'+') && isdigit(str[1])) )
4493 while( isspace(*endstr) )
4496 if( endstr[0] !=
'<' || endstr[1] !=
'=' )
4498 SCIPerrorMessage(
"missing \"<=\" after left hand side(, found %c%c)\n", endstr[0], endstr[1]);
4502 SCIPdebugMsg(scip,
"found left hand side <%g>\n", lhs);
4515 if( requiredsize == 2 && *success )
4521 assert(
SCIPisEQ(scip, coefs[0], 1.0));
4526 while( isspace(*endstr) )
4539 assert(str[1] ==
'=');
4543 assert(str[1] ==
'=');
4549 assert(str[1] ==
'=');
4558 else if( strncmp(str,
"[free]", 6) != 0 )
4565 initial, separate, enforce, check, propagate, local, modifiable, dynamic, removable, stickingatnode) );
4585 assert(cons !=
NULL);
4586 assert(vars !=
NULL);
4589 assert(consdata !=
NULL);
4591 vars[0] = consdata->var;
4592 vars[1] = consdata->vbdvar;
4620 assert(event !=
NULL);
4622 assert(cons !=
NULL);
4624 assert(consdata !=
NULL);
4628 consdata->presolved =
FALSE;
4634 consdata->presolved =
FALSE;
4635 consdata->tightened =
FALSE;
4662 eventExecVarbound,
NULL) );
4670 consEnfolpVarbound, consEnfopsVarbound, consCheckVarbound, consLockVarbound,
4672 assert(conshdlr !=
NULL);
4702 "should pairwise constraint comparison be performed in presolving?",
4706 "maximum coefficient in varbound constraint to be added as a row into LP",
4709 "constraints/" CONSHDLR_NAME "/usebdwidening",
"should bound widening be used in conflict analysis?",
4759 if( conshdlr ==
NULL )
4766 assert(conshdlrdata !=
NULL);
4772 SCIP_CALL(
SCIPcreateCons(scip, cons, name, conshdlr, consdata, initial, separate, enforce, check, propagate,
4773 local, modifiable, dynamic, removable, stickingatnode) );
4822 assert(consdata !=
NULL);
4824 return consdata->lhs;
4843 assert(consdata !=
NULL);
4845 return consdata->rhs;
4864 assert(consdata !=
NULL);
4866 return consdata->var;
4885 assert(consdata !=
NULL);
4887 return consdata->vbdvar;
4906 assert(consdata !=
NULL);
4908 return consdata->vbdcoef;
4927 assert(consdata !=
NULL);
4929 if( consdata->row !=
NULL )
4951 assert(consdata !=
NULL);
4953 if( consdata->row !=
NULL )
4977 assert(consdata !=
NULL);
4979 return consdata->row;
enum SCIP_Result SCIP_RESULT
enum SCIP_BoundType SCIP_BOUNDTYPE
void SCIPconshdlrSetData(SCIP_CONSHDLR *conshdlr, SCIP_CONSHDLRDATA *conshdlrdata)
int SCIPgetNIntVars(SCIP *scip)
SCIP_Bool SCIPisFeasZero(SCIP *scip, SCIP_Real val)
#define CONSHDLR_PROP_TIMING
SCIP_RETCODE SCIPincConsAge(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPsetConshdlrDelete(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSDELETE((*consdelete)))
SCIP_Bool SCIPinRepropagation(SCIP *scip)
static SCIP_RETCODE separateCons(SCIP *scip, SCIP_CONS *cons, SCIP_Bool usebdwidening, SCIP_SOL *sol, SCIP_RESULT *result)
static void conshdlrdataFree(SCIP *scip, SCIP_CONSHDLRDATA **conshdlrdata)
SCIP_Real SCIPfeastol(SCIP *scip)
static SCIP_DECL_CONSPROP(consPropVarbound)
SCIP_RETCODE SCIPtightenVarLb(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
#define CONSHDLR_DELAYSEPA
SCIP_Bool SCIPisFeasEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_STAGE SCIPgetStage(SCIP *scip)
static SCIP_RETCODE chgLhs(SCIP *scip, SCIP_CONS *cons, SCIP_Real lhs)
#define SCIP_EVENTTYPE_VARFIXED
SCIP_Bool SCIPconsIsDynamic(SCIP_CONS *cons)
SCIP_RETCODE SCIPsetConshdlrTrans(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSTRANS((*constrans)))
SCIP_Real SCIPgetDualfarkasVarbound(SCIP *scip, SCIP_CONS *cons)
SCIP_Bool SCIPisFeasLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
static SCIP_RETCODE consdataCreate(SCIP *scip, SCIP_CONSDATA **consdata, SCIP_VAR *var, SCIP_VAR *vbdvar, SCIP_Real vbdcoef, SCIP_Real lhs, SCIP_Real rhs)
Constraint handler for variable bound constraints .
static SCIP_RETCODE resolvePropagation(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *infervar, PROPRULE proprule, SCIP_BOUNDTYPE boundtype, SCIP_BDCHGIDX *bdchgidx, SCIP_Real inferbd, SCIP_Bool usebdwidening)
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)
SCIP_Real SCIPvarGetLbGlobal(SCIP_VAR *var)
static SCIP_DECL_CONSSEPALP(consSepalpVarbound)
SCIP_RETCODE SCIPsetConshdlrGetVars(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSGETVARS((*consgetvars)))
SCIP_RETCODE SCIPcopyConsLinear(SCIP *scip, SCIP_CONS **cons, SCIP *sourcescip, const char *name, int nvars, SCIP_VAR **sourcevars, SCIP_Real *sourcecoefs, SCIP_Real lhs, SCIP_Real rhs, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, 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 global, SCIP_Bool *valid)
static SCIP_DECL_CONSINITLP(consInitlpVarbound)
static SCIP_RETCODE chgRhs(SCIP *scip, SCIP_CONS *cons, SCIP_Real rhs)
static SCIP_DECL_CONSENFOLP(consEnfolpVarbound)
SCIP_RETCODE SCIPsetConshdlrEnforelax(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSENFORELAX((*consenforelax)))
#define SCIP_VARTYPE_INTEGER_CHAR
SCIP_RETCODE SCIPresetConsAge(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPdelCons(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPaddVarToRow(SCIP *scip, SCIP_ROW *row, SCIP_VAR *var, SCIP_Real val)
#define CONSHDLR_SEPAFREQ
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)
SCIP_RETCODE SCIPincludeEventhdlrBasic(SCIP *scip, SCIP_EVENTHDLR **eventhdlrptr, const char *name, const char *desc, SCIP_DECL_EVENTEXEC((*eventexec)), SCIP_EVENTHDLRDATA *eventhdlrdata)
SCIP_RETCODE SCIPgetTransformedVar(SCIP *scip, SCIP_VAR *var, SCIP_VAR **transvar)
SCIP_RETCODE SCIPupdateConsFlags(SCIP *scip, SCIP_CONS *cons0, SCIP_CONS *cons1)
SCIP_RETCODE SCIPreleaseVar(SCIP *scip, SCIP_VAR **var)
SCIP_Bool SCIPvarIsBinary(SCIP_VAR *var)
#define CONSHDLR_MAXPREROUNDS
SCIP_Bool SCIPisFeasNegative(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisFeasGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
static SCIP_DECL_CONSTRANS(consTransVarbound)
SCIP_Real SCIPadjustedVarUb(SCIP *scip, SCIP_VAR *var, SCIP_Real ub)
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)
SCIP_Bool SCIPisNegative(SCIP *scip, SCIP_Real val)
SCIP_RETCODE SCIPunmarkConsPropagate(SCIP *scip, SCIP_CONS *cons)
SCIP_Real SCIPgetConflictVarUb(SCIP *scip, SCIP_VAR *var)
enum SCIP_Retcode SCIP_RETCODE
SCIP_RETCODE SCIPaddConflictUb(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx)
SCIP_RETCODE SCIPaddVarLocks(SCIP *scip, SCIP_VAR *var, int nlocksdown, int nlocksup)
SCIP_Bool SCIPconsIsStickingAtNode(SCIP_CONS *cons)
static SCIP_DECL_CONSGETVARS(consGetVarsVarbound)
static SCIP_RETCODE conshdlrdataCreate(SCIP *scip, SCIP_CONSHDLRDATA **conshdlrdata, SCIP_EVENTHDLR *eventhdlr)
SCIP_Bool SCIPconsIsTransformed(SCIP_CONS *cons)
SCIP_RETCODE SCIPaddConflictRelaxedLb(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx, SCIP_Real relaxedlb)
SCIP_RETCODE SCIPinitConflictAnalysis(SCIP *scip, SCIP_CONFTYPE conftype, SCIP_Bool iscutoffinvolved)
SCIP_RETCODE SCIPtightenVarUb(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
#define SCIPfreeBlockMemory(scip, ptr)
SCIP_RETCODE SCIPsetConshdlrSepa(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSSEPALP((*conssepalp)), SCIP_DECL_CONSSEPASOL((*conssepasol)), int sepafreq, int sepapriority, SCIP_Bool delaysepa)
#define DEFAULT_PRESOLPAIRWISE
#define SCIPduplicateBufferArray(scip, ptr, source, num)
SCIP_RETCODE SCIPchgVarLb(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound)
SCIP_Bool SCIPisEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_RETCODE SCIPaddVarVlb(SCIP *scip, SCIP_VAR *var, SCIP_VAR *vlbvar, SCIP_Real vlbcoef, SCIP_Real vlbconstant, SCIP_Bool *infeasible, int *nbdchgs)
#define SCIPfreeBufferArray(scip, ptr)
SCIP_Real SCIPadjustedVarLb(SCIP *scip, SCIP_VAR *var, SCIP_Real lb)
Constraint handler for the set partitioning / packing / covering constraints .
#define SCIPallocBlockMemory(scip, ptr)
static SCIP_DECL_LINCONSUPGD(linconsUpgdVarbound)
#define SCIPdebugPrintCons(x, y, z)
SCIP_Bool SCIPisTransformed(SCIP *scip)
SCIP_RETCODE SCIPaddVarVub(SCIP *scip, SCIP_VAR *var, SCIP_VAR *vubvar, SCIP_Real vubcoef, SCIP_Real vubconstant, SCIP_Bool *infeasible, int *nbdchgs)
SCIP_Bool SCIPconsIsRemovable(SCIP_CONS *cons)
SCIP_RETCODE SCIPsetConshdlrInitlp(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSINITLP((*consinitlp)))
SCIP_Real SCIProwGetDualsol(SCIP_ROW *row)
static SCIP_DECL_CONSPARSE(consParseVarbound)
SCIP_RETCODE SCIPsetConshdlrParse(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPARSE((*consparse)))
SCIP_Bool SCIPconsIsActive(SCIP_CONS *cons)
SCIP_RETCODE SCIPaddCoefLinear(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real val)
void SCIPinfoMessage(SCIP *scip, FILE *file, const char *formatstr,...)
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)
SCIP_RETCODE SCIPparseVarsLinearsum(SCIP *scip, const char *str, SCIP_VAR **vars, SCIP_Real *vals, int *nvars, int varssize, int *requiredsize, char **endptr, SCIP_Bool *success)
SCIP_RETCODE SCIPaddConflictLb(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx)
SCIP_Real SCIPfeasCeil(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPfeasFloor(SCIP *scip, SCIP_Real val)
SCIP_RETCODE SCIPcreateConsVarbound(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *var, SCIP_VAR *vbdvar, SCIP_Real vbdcoef, 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 SCIProwIsInLP(SCIP_ROW *row)
#define CONSHDLR_SEPAPRIORITY
SCIP_Bool SCIPisConflictAnalysisApplicable(SCIP *scip)
SCIP_Bool SCIPrealToRational(SCIP_Real val, SCIP_Real mindelta, SCIP_Real maxdelta, SCIP_Longint maxdnom, SCIP_Longint *nominator, SCIP_Longint *denominator)
static SCIP_DECL_CONSEXITSOL(consExitsolVarbound)
static SCIP_DECL_EVENTEXEC(eventExecVarbound)
SCIP_Real SCIPvarGetUbGlobal(SCIP_VAR *var)
SCIP_VAR * SCIPvarGetProbvar(SCIP_VAR *var)
SCIP_ROW * SCIPgetRowVarbound(SCIP *scip, SCIP_CONS *cons)
SCIP_Bool SCIPconsIsLocked(SCIP_CONS *cons)
#define SCIP_PRESOLTIMING_MEDIUM
SCIP_VAR * SCIPgetVarVarbound(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPsetConshdlrCopy(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSHDLRCOPY((*conshdlrcopy)), SCIP_DECL_CONSCOPY((*conscopy)))
static SCIP_RETCODE preprocessConstraintPairs(SCIP *scip, SCIP_CONS **conss, int nconss, SCIP_Bool *cutoff, int *nchgbds, int *ndelconss, int *nchgcoefs, int *nchgsides)
const char * SCIPconshdlrGetName(SCIP_CONSHDLR *conshdlr)
SCIP_RETCODE SCIPaddCons(SCIP *scip, SCIP_CONS *cons)
#define CONSHDLR_PRESOLTIMING
SCIP_Bool SCIPisLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
static SCIP_DECL_CONSHDLRCOPY(conshdlrCopyVarbound)
SCIP_Real SCIPgetRhsVarbound(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPdelConsLocal(SCIP *scip, SCIP_CONS *cons)
static SCIP_DECL_SORTPTRCOMP(consVarboundComp)
SCIP_RETCODE SCIPgetProbvarSum(SCIP *scip, SCIP_VAR **var, SCIP_Real *scalar, SCIP_Real *constant)
SCIP_Real SCIPgetVbdcoefVarbound(SCIP *scip, SCIP_CONS *cons)
SCIP_Real SCIPgetConflictVarLb(SCIP *scip, SCIP_VAR *var)
SCIP_RETCODE SCIPunlockVarCons(SCIP *scip, SCIP_VAR *var, SCIP_CONS *cons, SCIP_Bool lockdown, SCIP_Bool lockup)
const char * SCIPconsGetName(SCIP_CONS *cons)
SCIP_RETCODE SCIPchgVarUb(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound)
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)))
SCIP_CONSHDLRDATA * SCIPconshdlrGetData(SCIP_CONSHDLR *conshdlr)
SCIP_RETCODE SCIPmarkConsPropagate(SCIP *scip, SCIP_CONS *cons)
static SCIP_DECL_CONSCHECK(consCheckVarbound)
SCIP_VAR * SCIPgetVbdvarVarbound(SCIP *scip, SCIP_CONS *cons)
void SCIPsortPtr(void **ptrarray, SCIP_DECL_SORTPTRCOMP((*ptrcomp)), int len)
SCIP_Bool SCIPisFeasGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisFeasLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
static SCIP_RETCODE propagateCons(SCIP *scip, SCIP_CONS *cons, SCIP_Bool usebdwidening, SCIP_Bool *cutoff, int *nchgbds, int *nchgsides, int *ndelconss)
SCIP_RETCODE SCIPanalyzeConflictCons(SCIP *scip, SCIP_CONS *cons, SCIP_Bool *success)
SCIP_Bool SCIPconsIsLocal(SCIP_CONS *cons)
#define DEFAULT_MAXLPCOEF
SCIP_RETCODE SCIPsetConshdlrResprop(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSRESPROP((*consresprop)))
static void checkRedundancySide(SCIP *scip, SCIP_VAR *var, SCIP_VAR *vbdvar, SCIP_Real coef0, SCIP_Real coef1, SCIP_Real side0, SCIP_Real side1, SCIP_Bool *sideequal, SCIP_Bool *cons0sidered, SCIP_Bool *cons1sidered, SCIP_Bool islhs)
SCIP_RETCODE SCIPaddCut(SCIP *scip, SCIP_SOL *sol, SCIP_ROW *cut, SCIP_Bool forcecut, SCIP_Bool *infeasible)
struct SCIP_ConsData SCIP_CONSDATA
#define SCIP_EVENTTYPE_BOUNDTIGHTENED
#define CONSHDLR_DELAYPROP
SCIP_RETCODE SCIPcreateConsSetpack(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, 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)
#define SCIPallocBufferArray(scip, ptr, num)
static SCIP_DECL_CONSFREE(consFreeVarbound)
int SCIPgetNImplVars(SCIP *scip)
SCIP_EVENTTYPE SCIPeventGetType(SCIP_EVENT *event)
#define CONSHDLR_CHECKPRIORITY
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_RETCODE analyzeConflict(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *infervar, SCIP_Real inferbd, PROPRULE proprule, SCIP_BOUNDTYPE boundtype, SCIP_Bool usebdwidening)
SCIP_RETCODE SCIPprintCons(SCIP *scip, SCIP_CONS *cons, FILE *file)
int SCIPvarGetNLocksUp(SCIP_VAR *var)
SCIP_Bool SCIPstrToRealValue(const char *str, SCIP_Real *value, char **endptr)
static SCIP_RETCODE addRelaxation(SCIP *scip, SCIP_CONS *cons, SCIP_Bool *infeasible)
static SCIP_DECL_CONSRESPROP(consRespropVarbound)
SCIP_CONSHDLR * SCIPconsGetHdlr(SCIP_CONS *cons)
SCIP_RETCODE SCIPaddConflictRelaxedUb(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx, SCIP_Real relaxedub)
SCIP_Bool SCIPconsIsDeleted(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsChecked(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsInitial(SCIP_CONS *cons)
SCIP_Real SCIPvarGetObj(SCIP_VAR *var)
SCIP_RETCODE SCIPdropVarEvent(SCIP *scip, SCIP_VAR *var, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int filterpos)
SCIP_RETCODE SCIPfixVar(SCIP *scip, SCIP_VAR *var, SCIP_Real fixedval, SCIP_Bool *infeasible, SCIP_Bool *fixed)
SCIP_Real SCIProwGetDualfarkas(SCIP_ROW *row)
SCIP_RETCODE SCIPlockVarCons(SCIP *scip, SCIP_VAR *var, SCIP_CONS *cons, SCIP_Bool lockdown, SCIP_Bool lockup)
#define DEFAULT_USEBDWIDENING
SCIP_RETCODE SCIPcreateConsBasicVarbound(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *var, SCIP_VAR *vbdvar, SCIP_Real vbdcoef, SCIP_Real lhs, SCIP_Real rhs)
SCIP_RETCODE SCIPsetConshdlrPrint(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPRINT((*consprint)))
#define CONSHDLR_PROPFREQ
Constraint handler for linear constraints in their most general form, .
SCIP_RETCODE SCIPchgRhsLinear(SCIP *scip, SCIP_CONS *cons, SCIP_Real rhs)
SCIP_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)
SCIP_RETCODE SCIPinferVarLbCons(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_CONS *infercons, int inferinfo, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
#define LINCONSUPGD_PRIORITY
int SCIPgetNBinVars(SCIP *scip)
SCIP_Bool SCIPinProbing(SCIP *scip)
static SCIP_RETCODE applyFixings(SCIP *scip, SCIP_CONS *cons, SCIP_EVENTHDLR *eventhdlr, SCIP_Bool *cutoff, int *nchgbds, int *ndelconss, int *naddconss)
SCIP_RETCODE SCIPincludeLinconsUpgrade(SCIP *scip, SCIP_DECL_LINCONSUPGD((*linconsupgd)), int priority, const char *conshdlrname)
static SCIP_RETCODE tightenCoefs(SCIP *scip, SCIP_CONS *cons, int *nchgcoefs, int *nchgsides, int *ndelconss)
SCIP_RETCODE SCIPcreateConsLinear(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Real *vals, 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_RETCODE SCIPreleaseRow(SCIP *scip, SCIP_ROW **row)
#define SCIP_VARTYPE_IMPLINT_CHAR
int SCIPvarGetNLocksDown(SCIP_VAR *var)
SCIP_Bool SCIPisGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisIntegral(SCIP *scip, SCIP_Real val)
SCIP_CONSDATA * SCIPconsGetData(SCIP_CONS *cons)
SCIP_RETCODE SCIPinferVarUbCons(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_CONS *infercons, int inferinfo, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
static SCIP_DECL_CONSCOPY(consCopyVarbound)
SCIP_Real SCIPgetHugeValue(SCIP *scip)
#define SCIP_VARTYPE_CONTINUOUS_CHAR
static SCIP_DECL_CONSSEPASOL(consSepasolVarbound)
static SCIP_DECL_CONSENFOPS(consEnfopsVarbound)
SCIP_RETCODE SCIPreleaseCons(SCIP *scip, SCIP_CONS **cons)
SCIP_RETCODE SCIPsetConshdlrPresol(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPRESOL((*conspresol)), int maxprerounds, SCIP_PRESOLTIMING presoltiming)
SCIP_Bool SCIPisFeasPositive(SCIP *scip, SCIP_Real val)
static SCIP_DECL_CONSENFORELAX(consEnforelaxVarbound)
SCIP_VARSTATUS SCIPvarGetStatus(SCIP_VAR *var)
SCIP_RETCODE SCIPaggregateVars(SCIP *scip, SCIP_VAR *varx, SCIP_VAR *vary, SCIP_Real scalarx, SCIP_Real scalary, SCIP_Real rhs, SCIP_Bool *infeasible, SCIP_Bool *redundant, SCIP_Bool *aggregated)
SCIP_RETCODE SCIPcaptureVar(SCIP *scip, SCIP_VAR *var)
SCIP_Bool SCIPconsIsModifiable(SCIP_CONS *cons)
SCIP_Bool SCIPisStopped(SCIP *scip)
SCIP_RETCODE SCIPsetConshdlrGetNVars(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSGETNVARS((*consgetnvars)))
#define CONSHDLR_NEEDSCONS
SCIP_Bool SCIPconsIsEnforced(SCIP_CONS *cons)
static SCIP_Bool checkCons(SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_Bool checklprows)
SCIP_Bool SCIPconsIsSeparated(SCIP_CONS *cons)
SCIP_RETCODE SCIPprintRow(SCIP *scip, SCIP_ROW *row, FILE *file)
static SCIP_RETCODE prettifyConss(SCIP *scip, SCIP_CONS **conss, int nconss, int *nchgcoefs, int *nchgsides)
static SCIP_DECL_CONSDELETE(consDeleteVarbound)
#define CONSHDLR_ENFOPRIORITY
int SCIPvarGetIndex(SCIP_VAR *var)
SCIP_Real SCIPgetRowSolFeasibility(SCIP *scip, SCIP_ROW *row, SCIP_SOL *sol)
SCIP_VARTYPE SCIPvarGetType(SCIP_VAR *var)
#define SCIP_VARTYPE_BINARY_CHAR
static SCIP_RETCODE consdataFree(SCIP *scip, SCIP_CONSDATA **consdata)
SCIP_Bool SCIPisZero(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
struct SCIP_ConshdlrData SCIP_CONSHDLRDATA
SCIP_RETCODE SCIPchgLhsLinear(SCIP *scip, SCIP_CONS *cons, SCIP_Real lhs)
SCIP_Real SCIPvarGetUbLocal(SCIP_VAR *var)
SCIP_Bool SCIPisFeasIntegral(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPconsIsMarkedPropagate(SCIP_CONS *cons)
static SCIP_RETCODE upgradeConss(SCIP *scip, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_CONS **conss, int nconss, SCIP_Bool *cutoff, int *naggrvars, int *nchgbds, int *nchgcoefs, int *nchgsides, int *ndelconss, int *naddconss)
static SCIP_RETCODE createRelaxation(SCIP *scip, SCIP_CONS *cons)
SCIP_Real SCIPgetDualsolVarbound(SCIP *scip, SCIP_CONS *cons)
static SCIP_DECL_CONSLOCK(consLockVarbound)
static SCIP_DECL_CONSPRESOL(consPresolVarbound)
static SCIP_RETCODE dropEvents(SCIP *scip, SCIP_CONS *cons, SCIP_EVENTHDLR *eventhdlr)
static SCIP_DECL_CONSPRINT(consPrintVarbound)
SCIP_RETCODE SCIPsetConshdlrExitsol(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSEXITSOL((*consexitsol)))
SCIP_Real SCIPgetLhsVarbound(SCIP *scip, SCIP_CONS *cons)
SCIP_Real SCIPround(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPvarIsIntegral(SCIP_VAR *var)
static SCIP_RETCODE catchEvents(SCIP *scip, SCIP_CONS *cons, SCIP_EVENTHDLR *eventhdlr)
#define CONSHDLR_EAGERFREQ
SCIP_Real SCIPgetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var)
SCIP_RETCODE SCIPaddRealParam(SCIP *scip, const char *name, const char *desc, SCIP_Real *valueptr, SCIP_Bool isadvanced, SCIP_Real defaultvalue, SCIP_Real minvalue, SCIP_Real maxvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
SCIP_RETCODE SCIPgetNegatedVar(SCIP *scip, SCIP_VAR *var, SCIP_VAR **negvar)
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)
static SCIP_DECL_CONSGETNVARS(consGetNVarsVarbound)
SCIP_RETCODE SCIPsetConshdlrProp(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPROP((*consprop)), int propfreq, SCIP_Bool delayprop, SCIP_PROPTIMING proptiming)
SCIP_RETCODE SCIPincludeConshdlrVarbound(SCIP *scip)