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);
437 assert(consdata != NULL);
439 SCIPdebugMsg(scip,
"checking variable bound constraint <%s> for feasibility of solution %p (lprows=%u)\n",
448 if( checklprows || consdata->row == NULL || !
SCIProwIsInLP(consdata->row) )
454 sum = solval + consdata->vbdcoef *
SCIPgetSolVal(scip, sol, consdata->vbdvar);
457 absviol =
MAX(consdata->lhs - sum, sum - consdata->rhs);
460 relviol =
MAX(lhsrelviol, rhsrelviol);
497 assert(consdata != NULL);
503 vbdvar = consdata->vbdvar;
504 assert(vbdvar != NULL);
506 vbdcoef = consdata->vbdcoef;
513 assert(infervar == var);
529 relaxedbd = (consdata->lhs - (inferbd - 1.0 + 2.0*
SCIPfeastol(scip))) / vbdcoef;
531 relaxedbd = (consdata->lhs - inferbd) / vbdcoef;
569 assert(infervar == vbdvar);
590 relaxedub = consdata->lhs - (inferbd - 1.0 + 2.0 *
SCIPfeastol(scip)) * vbdcoef;
592 relaxedub = consdata->lhs - inferbd * vbdcoef;
607 relaxedub = consdata->lhs - (inferbd + 1.0 - 2.0 *
SCIPfeastol(scip)) * vbdcoef;
609 relaxedub = consdata->lhs - inferbd * vbdcoef;
631 assert(infervar == var);
647 relaxedbd = (consdata->rhs - (inferbd + 1.0 - 2.0 *
SCIPfeastol(scip))) / vbdcoef;
649 relaxedbd = (consdata->rhs - inferbd) / vbdcoef;
687 assert(infervar == vbdvar);
708 relaxedlb = consdata->rhs - (inferbd + 1.0 - 2.0 *
SCIPfeastol(scip)) * vbdcoef;
710 relaxedlb = consdata->rhs - inferbd * vbdcoef;
725 relaxedlb = consdata->rhs - (inferbd - 1.0 + 2.0 *
SCIPfeastol(scip)) * vbdcoef;
727 relaxedlb = consdata->rhs - inferbd * vbdcoef;
786 relaxedub = inferbd - 1.0;
793 assert(consdata != NULL);
796 assert(infervar == consdata->var);
798 abscoef =
REALABS(consdata->vbdcoef);
817 inferbd = inferbd + 1.0;
824 assert(consdata != NULL);
827 assert(infervar == consdata->var);
829 abscoef =
REALABS(consdata->vbdcoef);
855 relaxedlb = inferbd + 1.0;
862 assert(consdata != NULL);
865 assert(infervar == consdata->var);
867 abscoef =
REALABS(consdata->vbdcoef);
886 inferbd = inferbd - 1.0;
893 assert(consdata != NULL);
896 assert(infervar == consdata->var);
898 abscoef =
REALABS(consdata->vbdcoef);
938 assert(cons != NULL);
939 assert(result != NULL);
942 assert(consdata != NULL);
946 if( conshdlr == NULL )
955 vbdvar = consdata->vbdvar;
956 vbdcoef = consdata->vbdcoef;
972 &cutoff, &tightened) );
999 &cutoff, &tightened) );
1011 else if( tightened )
1023 if( !
checkCons(scip, cons, sol, (sol != NULL)) )
1026 if( consdata->row == NULL )
1030 assert(consdata->row != NULL);
1062 assert(scip != NULL);
1063 assert(cons != NULL);
1071 assert(consdata != NULL);
1072 assert(consdata->var != NULL && consdata->vbdvar != NULL);
1076 if(
SCIPisEQ(scip, consdata->lhs, lhs) )
1079 assert(consdata->row == NULL);
1082 if(
SCIPisEQ(scip, lhs, consdata->rhs) )
1083 consdata->rhs = lhs;
1120 if(
SCIPisLT(scip, consdata->lhs, lhs) )
1122 consdata->varboundsadded =
FALSE;
1123 consdata->tightened =
FALSE;
1128 consdata->presolved =
FALSE;
1129 consdata->lhs = lhs;
1130 consdata->changed =
TRUE;
1145 assert(scip != NULL);
1146 assert(cons != NULL);
1154 assert(consdata != NULL);
1155 assert(consdata->var != NULL && consdata->vbdvar != NULL);
1159 if(
SCIPisEQ(scip, consdata->rhs, rhs) )
1162 assert(consdata->row == NULL);
1165 if(
SCIPisEQ(scip, rhs, consdata->lhs) )
1166 consdata->lhs = rhs;
1203 if(
SCIPisGT(scip, consdata->rhs, rhs) )
1205 consdata->varboundsadded =
FALSE;
1206 consdata->tightened =
FALSE;
1211 consdata->presolved =
FALSE;
1212 consdata->rhs = rhs;
1213 consdata->changed =
TRUE;
1240 assert(cutoff != NULL);
1241 assert(nchgbds != NULL);
1244 assert(consdata != NULL);
1246 SCIPdebugMsg(scip,
"propagating variable bound constraint <%s>: %.15g <= <%s>[%.9g, %.9g] + %.15g<%s>[%.9g, %.9g] <= %.15g\n",
1266 if(
SCIPisZero(scip, consdata->vbdcoef) &&
SCIPisEQ(scip, consdata->lhs, consdata->rhs) )
1284 tightenedround =
FALSE;
1296 if( consdata->vbdcoef > 0.0 )
1299 newlb =
SCIPadjustedVarLb(scip, consdata->var, consdata->lhs - consdata->vbdcoef * yub);
1306 newlb =
SCIPadjustedVarLb(scip, consdata->var, consdata->lhs - consdata->vbdcoef * ylb);
1315 SCIPdebugMsg(scip,
"cutoff while tightening <%s>[%.15g,%.15g] -> [%.15g,%.15g]\n",
SCIPvarGetName(consdata->var), xlb, xub, newlb, xub);
1328 tightenedround =
TRUE;
1342 if( consdata->vbdcoef > 0.0 )
1344 newlb =
SCIPadjustedVarLb(scip, consdata->vbdvar, (consdata->lhs - xub)/consdata->vbdcoef);
1345 if( newlb > ylb + 0.5 )
1351 SCIPdebugMsg(scip,
"cutoff while tightening <%s>[%.15g,%.15g] -> [%.15g,%.15g]\n",
SCIPvarGetName(consdata->vbdvar), ylb, yub, newlb, yub);
1361 SCIPdebugMsg(scip,
" -> tighten <%s>[%.15g,%.15g] -> [%.15g,%.15g]\n",
SCIPvarGetName(consdata->vbdvar), ylb, yub, newlb, yub);
1362 tightenedround =
TRUE;
1370 newub =
SCIPadjustedVarUb(scip, consdata->vbdvar, (consdata->lhs - xub)/consdata->vbdcoef);
1371 if( newub < yub - 0.5 )
1377 SCIPdebugMsg(scip,
"cutoff while tightening <%s>[%.15g,%.15g] -> [%.15g,%.15g]\n",
SCIPvarGetName(consdata->vbdvar), ylb, yub, ylb, newub);
1389 SCIPdebugMsg(scip,
" -> tighten <%s>[%.15g,%.15g] -> [%.15g,%.15g]\n",
SCIPvarGetName(consdata->vbdvar), ylb, yub, ylb, newub);
1390 tightenedround =
TRUE;
1410 if( consdata->vbdcoef > 0.0 )
1413 newub =
SCIPadjustedVarUb(scip, consdata->var, consdata->rhs - consdata->vbdcoef * ylb);
1420 newub =
SCIPadjustedVarUb(scip, consdata->var, consdata->rhs - consdata->vbdcoef * yub);
1429 SCIPdebugMsg(scip,
"cutoff while tightening <%s>[%.15g,%.15g] -> [%.15g,%.15g]\n",
SCIPvarGetName(consdata->var), xlb, xub, xlb, newub);
1442 tightenedround =
TRUE;
1456 if( consdata->vbdcoef > 0.0 )
1458 newub =
SCIPadjustedVarUb(scip, consdata->vbdvar, (consdata->rhs - xlb)/consdata->vbdcoef);
1459 if( newub < yub - 0.5 )
1465 SCIPdebugMsg(scip,
"cutoff while tightening <%s>[%.15g,%.15g] -> [%.15g,%.15g]\n",
SCIPvarGetName(consdata->vbdvar), ylb, yub, ylb, newub);
1477 SCIPdebugMsg(scip,
" -> tighten <%s>[%.15g,%.15g] -> [%.15g,%.15g]\n",
SCIPvarGetName(consdata->vbdvar), ylb, yub, ylb, newub);
1478 tightenedround =
TRUE;
1487 newlb =
SCIPadjustedVarLb(scip, consdata->vbdvar, (consdata->rhs - xlb)/consdata->vbdcoef);
1488 if( newlb > ylb + 0.5 )
1494 SCIPdebugMsg(scip,
"cutoff while tightening <%s>[%.15g,%.15g] -> [%.15g,%.15g]\n",
SCIPvarGetName(consdata->vbdvar), ylb, yub, newlb, yub);
1506 SCIPdebugMsg(scip,
" -> tighten <%s>[%.15g,%.15g] -> [%.15g,%.15g]\n",
SCIPvarGetName(consdata->vbdvar), ylb, yub, newlb, yub);
1507 tightenedround =
TRUE;
1518 while( tightenedround );
1525 ((consdata->vbdcoef > 0.0 &&
SCIPisFeasGE(scip, xlb + consdata->vbdcoef * ylb, consdata->lhs))
1526 || (consdata->vbdcoef < 0.0 &&
SCIPisFeasGE(scip, xlb + consdata->vbdcoef * yub, consdata->lhs))) )
1536 ((consdata->vbdcoef > 0.0 &&
SCIPisFeasLE(scip, xub + consdata->vbdcoef * yub, consdata->rhs))
1537 || (consdata->vbdcoef < 0.0 &&
SCIPisFeasLE(scip, xub + consdata->vbdcoef * ylb, consdata->rhs))) )
1547 || (consdata->vbdcoef > 0.0 &&
SCIPisFeasGE(scip, xlb + consdata->vbdcoef * ylb, consdata->lhs))
1548 || (consdata->vbdcoef < 0.0 &&
SCIPisFeasGE(scip, xlb + consdata->vbdcoef * yub, consdata->lhs)))
1550 || (consdata->vbdcoef > 0.0 &&
SCIPisFeasLE(scip, xub + consdata->vbdcoef * yub, consdata->rhs))
1551 || (consdata->vbdcoef < 0.0 &&
SCIPisFeasLE(scip, xub + consdata->vbdcoef * ylb, consdata->rhs))) )
1553 SCIPdebugMsg(scip,
"variable bound constraint <%s> is redundant: <%s>[%.15g,%.15g], <%s>[%.15g,%.15g]\n",
1560 #ifdef SCIP_DISABLED_CODE 1565 && ((consdata->vbdcoef > 0.0 && !
SCIPisInfinity(scip, -consdata->lhs))
1566 || (consdata->vbdcoef < 0.0 && !
SCIPisInfinity(scip, consdata->rhs))) )
1575 && ((consdata->vbdcoef < 0.0 && !
SCIPisInfinity(scip, -consdata->lhs))
1576 || (consdata->vbdcoef > 0.0 && !
SCIPisInfinity(scip, consdata->rhs))) )
1601 if( ndelconss != NULL )
1653 assert(scip != NULL);
1654 assert(var != NULL);
1655 assert(vbdvar != NULL);
1656 assert(sideequal != NULL);
1657 assert(cons0sidered != NULL);
1658 assert(cons1sidered != NULL);
1666 redundant0 = cons1sidered;
1667 redundant1 = cons0sidered;
1671 redundant0 = cons0sidered;
1672 redundant1 = cons1sidered;
1681 if( !*redundant0 && !*redundant1 )
1684 boundxlb1 = side0 - lbvbdvar*coef0;
1685 boundxlb2 = side1 - lbvbdvar*coef1;
1686 boundylb1 = (side0 - lbvar)/coef0;
1687 boundylb2 = (side1 - lbvar)/coef1;
1689 boundxub1 = side0 - ubvbdvar*coef0;
1690 boundxub2 = side1 - ubvbdvar*coef1;
1691 boundyub1 = (side0 - ubvar)/coef0;
1692 boundyub2 = (side1 - ubvar)/coef1;
1696 boundvaluex1 =
MAX(boundxlb1, boundxlb2);
1697 boundvaluex2 =
MAX(boundxub1, boundxub2);
1701 boundvaluex1 = MIN(boundxlb1, boundxlb2);
1702 boundvaluex2 = MIN(boundxub1, boundxub2);
1708 valuex1 = MIN(boundvaluex1, ubvar);
1709 valuex1 =
MAX(valuex1, lbvar);
1710 valuex2 =
MAX(boundvaluex2, lbvar);
1711 valuex2 = MIN(valuex2, ubvar);
1724 valuex1 =
MAX(boundvaluex1, lbvar);
1725 valuex1 = MIN(valuex1, ubvar);
1726 valuex2 = MIN(boundvaluex2, ubvar);
1727 valuex2 =
MAX(valuex2, lbvar);
1740 valuey1 = (side0 - valuex1)/coef0;
1741 valuey2 = (side1 - valuex1)/coef1;
1744 if( valuey1 - valuey2 <=
eps )
1748 if( valuey1 < valuey2 )
1755 if( valuey1 < valuey2 )
1762 valuey1 = (side0 - valuex2)/coef0;
1763 valuey2 = (side1 - valuex2)/coef1;
1769 if( (*redundant1 && valuey1 > valuey2) || (*redundant0 && valuey1 < valuey2) )
1772 *redundant0 =
FALSE;
1773 *redundant1 =
FALSE;
1776 else if( *sideequal )
1778 if( valuey1 +
eps < valuey2 )
1783 else if( valuey1 +
eps > valuey2 )
1793 if( (*redundant1 && valuey1 < valuey2) || (*redundant0 && valuey1 > valuey2) )
1796 *redundant0 =
FALSE;
1797 *redundant1 =
FALSE;
1800 else if( *sideequal )
1802 if( valuey1 +
eps < valuey2 )
1807 else if( valuey1 +
eps > valuey2 )
1814 assert(*sideequal || *redundant0 || *redundant1);
1821 boundvaluey1 =
MAX(boundylb1, boundylb2);
1822 boundvaluey2 =
MAX(boundyub1, boundyub2);
1826 boundvaluey1 = MIN(boundylb1, boundylb2);
1827 boundvaluey2 = MIN(boundyub1, boundyub2);
1830 valuey1 = MIN(boundvaluey1, ubvbdvar);
1831 valuey1 =
MAX(valuey1, lbvbdvar);
1832 valuey2 =
MAX(boundvaluey2, lbvbdvar);
1833 valuey2 = MIN(valuey2, ubvbdvar);
1844 boundvaluey1 = MIN(boundylb1, boundylb2);
1845 boundvaluey2 = MIN(boundyub1, boundyub2);
1849 boundvaluey1 =
MAX(boundylb1, boundylb2);
1850 boundvaluey2 =
MAX(boundyub1, boundyub2);
1853 valuey1 =
MAX(boundvaluey1, lbvbdvar);
1854 valuey1 = MIN(valuey1, ubvbdvar);
1855 valuey2 = MIN(boundvaluey2, ubvbdvar);
1856 valuey2 =
MAX(valuey2, lbvbdvar);
1866 valuex1 = side0 - valuey1*coef0;
1867 valuex2 = side1 - valuey1*coef1;
1870 if( (*redundant1 && valuex1 > valuex2) || (*redundant0 && valuex1 < valuex2) )
1873 *redundant0 =
FALSE;
1874 *redundant1 =
FALSE;
1879 if( valuex1 +
eps < valuex2 )
1884 else if( valuex1 +
eps > valuex2 )
1892 valuex1 = side0 - valuey2*coef0;
1893 valuex2 = side1 - valuey2*coef1;
1896 if( (*redundant1 && valuex1 > valuex2) || (*redundant0 && valuex1 < valuex2) )
1899 *redundant0 =
FALSE;
1900 *redundant1 =
FALSE;
1905 if( valuex1 +
eps < valuex2 )
1910 else if( valuex1 +
eps > valuex2 )
1916 assert(*redundant0 || *redundant1 || *sideequal);
1977 assert(scip != NULL);
1978 assert(conss != NULL);
1979 assert(cutoff != NULL);
1980 assert(nchgbds != NULL);
1981 assert(ndelconss != NULL);
1982 assert(nchgcoefs != NULL);
1983 assert(nchgsides != NULL);
1989 SCIPsortPtr((
void**)sortedconss, consVarboundComp, nconss);
1992 for( c = nconss - 1; c > 0 && !(*cutoff); --c )
1997 cons0 = sortedconss[c];
2003 assert(consdata0 != NULL);
2004 assert(consdata0->var != NULL);
2005 assert(consdata0->vbdvar != NULL);
2008 assert(!
SCIPisZero(scip, consdata0->vbdcoef));
2011 if( !consdata0->changed )
2014 consdata0->changed =
FALSE;
2016 for( s = c - 1; s >= 0; --s )
2025 cons1 = sortedconss[s];
2031 assert(consdata1 != NULL);
2032 assert(consdata1->var != NULL);
2033 assert(consdata1->vbdvar != NULL);
2036 assert(!
SCIPisZero(scip, consdata1->vbdcoef));
2039 lhs = consdata0->lhs;
2040 rhs = consdata0->rhs;
2041 coef = consdata0->vbdcoef;
2044 if ( consdata0->var == consdata1->vbdvar && consdata0->vbdvar == consdata1->var &&
2052 scalar = (1.0 - coef * consdata1->vbdcoef);
2055 assert( !
SCIPisZero(scip, consdata0->vbdcoef) );
2056 assert( !
SCIPisZero(scip, consdata1->vbdcoef) );
2064 bnd = (lhs - coef * consdata1->rhs)/scalar;
2070 bnd = (lhs - coef * consdata1->lhs)/scalar;
2107 bnd = (rhs - coef * consdata1->lhs)/scalar;
2113 bnd = (rhs - coef * consdata1->rhs)/scalar;
2151 bnd = (consdata1->lhs - consdata1->vbdcoef * rhs)/scalar;
2157 bnd = (consdata1->lhs - consdata1->vbdcoef * lhs)/scalar;
2194 bnd = (consdata1->rhs - consdata1->vbdcoef * lhs)/scalar;
2200 bnd = (consdata1->rhs - consdata1->vbdcoef * rhs)/scalar;
2232 if( consdata0->var != consdata1->var || consdata0->vbdvar != consdata1->vbdvar )
2239 if(
SCIPisEQ(scip, coef, consdata1->vbdcoef) )
2241 lhs =
MAX(consdata1->lhs, lhs);
2242 rhs = MIN(consdata1->rhs, rhs);
2255 lhs =
MAX(consdata1->lhs, lhs);
2256 coef = lhs -
MAX(consdata1->lhs - consdata1->vbdcoef, consdata0->lhs - coef);
2261 rhs = MIN(consdata1->rhs, rhs);
2262 coef = rhs - MIN(consdata1->rhs - consdata1->vbdcoef, consdata0->rhs - coef);
2284 checkRedundancySide(scip, consdata0->var, consdata0->vbdvar, coef, consdata1->vbdcoef, lhs, consdata1->lhs, &lhsequal, &cons0lhsred, &cons1lhsred,
TRUE);
2287 checkRedundancySide(scip, consdata0->var, consdata0->vbdvar, coef, consdata1->vbdcoef, rhs, consdata1->rhs, &rhsequal, &cons0rhsred, &cons1rhsred,
FALSE);
2290 if( (lhsequal || cons0lhsred) && (rhsequal || cons0rhsred) )
2307 else if( cons1lhsred && cons1rhsred )
2324 else if( (lhsequal || cons0lhsred) && !
SCIPisInfinity(scip, -lhs) )
2341 deletecons1 =
FALSE;
2344 else if( (rhsequal || cons0rhsred) && !
SCIPisInfinity(scip, rhs) )
2361 deletecons1 =
FALSE;
2408 rhs = (lhs + rhs)/2;
2426 SCIPdebugMsg(scip,
"are both redundant and lead to bounding of <%s> in [%g, %g]\n",
SCIPvarGetName(consdata0->var), lhs, rhs);
2437 assert(!infeasible);
2446 assert(!infeasible);
2488 if( !
SCIPisEQ(scip, consdata0->vbdcoef, coef) )
2493 consdata0->varboundsadded =
FALSE;
2494 consdata0->tightened =
FALSE;
2495 consdata0->presolved =
FALSE;
2496 consdata0->changed =
FALSE;
2498 consdata0->vbdcoef = coef;
2504 if( !
SCIPisEQ(scip, consdata0->lhs, lhs) )
2509 if( !
SCIPisEQ(scip, consdata0->rhs, rhs) )
2552 assert(scip != NULL);
2553 assert(conss != NULL || nconss == 0);
2554 assert(nchgcoefs != NULL);
2555 assert(nchgsides != NULL);
2561 for( c = nconss - 1; c >= 0; --c )
2563 assert(conss != NULL);
2569 assert(consdata != NULL);
2590 success =
SCIPrealToRational(consdata->vbdcoef, -epsilon, epsilon , maxmult, &nominator, &denominator);
2597 denominator /= nominator;
2601 success = success && (denominator <= maxmult);
2604 if( success && ABS(denominator) > 1 && nominator == 1)
2611 assert(
SCIPisEQ(scip, consdata->vbdcoef * denominator, 1.0));
2614 if( consdata->vbdcoef < 0 )
2616 assert(denominator < 0);
2623 consdata->lhs = consdata->rhs * denominator;
2631 consdata->rhs = consdata->lhs * denominator;
2641 tmp = consdata->lhs;
2642 consdata->lhs = consdata->rhs * denominator;
2643 consdata->rhs = tmp * denominator;
2644 consdata->tightened =
FALSE;
2654 assert(denominator > 0);
2659 consdata->lhs *= denominator;
2667 consdata->rhs *= denominator;
2672 assert(
SCIPisGE(scip, consdata->rhs, consdata->lhs));
2676 swapvar = consdata->var;
2677 consdata->var = consdata->vbdvar;
2678 consdata->vbdvar = swapvar;
2681 consdata->vbdcoef = (
SCIP_Real)denominator;
2685 consdata->varboundsadded =
FALSE;
2686 consdata->tightened =
FALSE;
2721 assert(scip != NULL);
2722 assert(cons != NULL);
2723 assert(cutoff != NULL);
2724 assert(nchgbds != NULL);
2725 assert(ndelconss != NULL);
2726 assert(naddconss != NULL);
2733 assert(consdata != NULL);
2736 var = consdata->var;
2740 vbdvar = consdata->vbdvar;
2742 vbdvarconstant = 0.0;
2744 varschanged = (var != consdata->var || vbdvar != consdata->vbdvar);
2752 SCIPdebugMsg(scip,
"variable bound constraint <%s> has equal variable and vbd variable <%s>\n",
2758 scalar = varscalar + consdata->vbdcoef * vbdvarscalar;
2759 constant = varconstant + consdata->vbdcoef * vbdvarconstant;
2766 else if( scalar > 0.0 )
2829 SCIPdebugMsg(scip,
"variable bound constraint <%s>: variable <%s> is fixed to %.15g\n",
2838 if( consdata->vbdcoef > 0.0 )
2843 TRUE, cutoff, &tightened) );
2855 TRUE, cutoff, &tightened) );
2865 if( consdata->vbdcoef > 0.0 )
2870 TRUE, cutoff, &tightened) );
2882 TRUE, cutoff, &tightened) );
2893 else if( var != consdata->var )
2896 if( varscalar > 0.0 )
2903 consdata->lhs = (consdata->lhs - varconstant)/varscalar;
2905 consdata->rhs = (consdata->rhs - varconstant)/varscalar;
2906 consdata->vbdcoef /= varscalar;
2910 consdata->vbdcoef =
SCIPround(scip, consdata->vbdcoef);
2912 consdata->tightened =
FALSE;
2918 assert(varscalar != 0.0);
2924 lhs = consdata->lhs;
2925 consdata->lhs = -consdata->rhs;
2926 consdata->rhs = -lhs;
2928 consdata->lhs = (consdata->lhs + varconstant)/(-varscalar);
2930 consdata->rhs = (consdata->rhs + varconstant)/(-varscalar);
2931 consdata->vbdcoef /= varscalar;
2935 consdata->vbdcoef =
SCIPround(scip, consdata->vbdcoef);
2937 consdata->tightened =
FALSE;
2941 consdata->var = var;
2949 SCIPdebugMsg(scip,
"variable bound constraint <%s>: vbd variable <%s> is fixed to %.15g\n",
2961 TRUE, cutoff, &tightened) );
2973 TRUE, cutoff, &tightened) );
2983 else if( vbdvar != consdata->vbdvar )
2991 consdata->lhs -= consdata->vbdcoef * vbdvarconstant;
2993 consdata->rhs -= consdata->vbdcoef * vbdvarconstant;
2994 consdata->vbdcoef *= vbdvarscalar;
2996 consdata->tightened =
FALSE;
3000 consdata->vbdvar = vbdvar;
3015 consdata->changed =
TRUE;
3025 lhs = consdata->lhs;
3026 rhs = consdata->rhs;
3036 if( var != consdata->var )
3056 assert(var == consdata->var);
3062 if( vbdvar != consdata->vbdvar )
3082 assert(vbdvar == consdata->vbdvar);
3089 SCIPdebugMsg(scip,
"resolved multi aggregation in varbound constraint <%s> by creating a new linear constraint\n",
SCIPconsGetName(cons));
3099 if( !(*cutoff) && redundant )
3130 assert(nchgcoefs != NULL);
3131 assert(nchgsides != NULL);
3132 assert(ndelconss != NULL);
3135 assert(consdata != NULL);
3138 if( consdata->tightened )
3143 consdata->tightened =
TRUE;
3154 consdata->changed =
TRUE;
3160 consdata->changed =
TRUE;
3168 oldnchgcoefs = *nchgcoefs;
3169 oldnchgsides = *nchgsides;
3170 oldcoef = consdata->vbdcoef;
3245 consdata->vbdcoef =
SCIPfeasCeil(scip, consdata->vbdcoef);
3257 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))) )
3259 consdata->vbdcoef =
SCIPfeasCeil(scip, consdata->vbdcoef);
3278 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))) )
3368 consdata->vbdcoef = oldcoef;
3390 if( consdata->vbdcoef > 0.0 &&
SCIPisFeasGT(scip, xlb, consdata->lhs - consdata->vbdcoef) &&
SCIPisFeasLT(scip, xub, consdata->rhs) )
3396 oldrhs = consdata->rhs;
3402 newcoef =
MAX(consdata->vbdcoef - consdata->rhs + xub, consdata->lhs - xlb);
3403 newrhs = consdata->rhs - consdata->vbdcoef + newcoef;
3405 SCIPdebugMsg(scip,
"tighten varbound %.15g <= <%s>[%.15g,%.15g] %+.15g<%s> <= %.15g to %.15g <= <%s> %+.15g<%s> <= %.15g\n",
3410 assert(consdata->vbdcoef * newcoef > 0);
3412 consdata->vbdcoef = newcoef;
3413 consdata->rhs = newrhs;
3423 consdata->tightened =
FALSE;
3425 assert(consdata->tightened);
3430 else if( consdata->vbdcoef < 0.0 &&
SCIPisFeasGT(scip, xlb, consdata->lhs) &&
SCIPisFeasLT(scip, xub, consdata->rhs - consdata->vbdcoef) )
3436 oldlhs = consdata->lhs;
3442 newcoef = MIN(consdata->vbdcoef - consdata->lhs + xlb, consdata->rhs - xub);
3443 newlhs = consdata->lhs - consdata->vbdcoef + newcoef;
3445 SCIPdebugMsg(scip,
"tighten varbound %.15g <= <%s>[%.15g,%.15g] %+.15g<%s> <= %.15g to %.15g <= <%s> %+.15g<%s> <= %.15g\n",
3450 assert(consdata->vbdcoef * newcoef > 0);
3452 consdata->vbdcoef = newcoef;
3453 consdata->lhs = newlhs;
3463 consdata->tightened =
FALSE;
3465 assert(consdata->tightened);
3474 if( consdata->vbdcoef > 0.0 &&
SCIPisFeasGT(scip, xlb, consdata->lhs - consdata->vbdcoef) )
3480 SCIPdebugMsg(scip,
"tighten binary VLB <%s>[%.15g,%.15g] %+.15g<%s> >= %.15g to <%s> %+.15g<%s> >= %.15g\n",
3485 assert(consdata->vbdcoef * (consdata->lhs - xlb) > 0);
3487 consdata->vbdcoef = consdata->lhs - xlb;
3490 else if( consdata->vbdcoef < 0.0 &&
SCIPisFeasGT(scip, xlb, consdata->lhs) )
3496 SCIPdebugMsg(scip,
"tighten binary VLB <%s>[%.15g,%.15g] %+.15g<%s> >= %.15g to <%s> %+.15g<%s> >= %.15g\n",
3501 assert(consdata->vbdcoef * (consdata->vbdcoef - consdata->lhs + xlb) > 0);
3503 consdata->vbdcoef = consdata->vbdcoef - consdata->lhs + xlb;
3504 consdata->lhs = xlb;
3512 if( consdata->vbdcoef < 0.0 &&
SCIPisFeasLT(scip, xub, consdata->rhs - consdata->vbdcoef) )
3518 SCIPdebugMsg(scip,
"tighten binary VUB <%s>[%.15g,%.15g] %+.15g<%s> <= %.15g to <%s> %+.15g<%s> <= %.15g\n",
3523 assert(consdata->vbdcoef * (consdata->rhs - xub) > 0);
3525 consdata->vbdcoef = consdata->rhs - xub;
3528 else if( consdata->vbdcoef > 0.0 &&
SCIPisFeasLT(scip, xub, consdata->rhs) )
3534 SCIPdebugMsg(scip,
"tighten binary VUB <%s>[%.15g,%.15g] %+.15g<%s> <= %.15g to <%s> %+.15g<%s> <= %.15g\n",
3539 assert(consdata->vbdcoef * (consdata->vbdcoef - consdata->rhs + xub) > 0);
3541 consdata->vbdcoef = consdata->vbdcoef - consdata->rhs + xub;
3542 consdata->rhs = xub;
3551 if( *nchgcoefs > oldnchgcoefs || *nchgsides > oldnchgsides )
3553 consdata->varboundsadded =
FALSE;
3554 consdata->changed =
TRUE;
3582 assert(scip != NULL);
3583 assert(conshdlrdata != NULL);
3584 assert(conss != NULL || nconss == 0);
3585 assert(cutoff != NULL);
3586 assert(naggrvars != NULL);
3587 assert(nchgbds != NULL);
3588 assert(nchgcoefs != NULL);
3589 assert(nchgsides != NULL);
3590 assert(ndelconss != NULL);
3591 assert(naddconss != NULL);
3600 assert(conss != NULL);
3602 for( c = nconss - 1; c >= 0; --c )
3605 assert(cons != NULL);
3611 assert(consdata != NULL);
3612 assert(
SCIPisLE(scip, consdata->lhs, consdata->rhs));
3614 if( !consdata->presolved )
3617 SCIP_CALL(
applyFixings(scip, cons, conshdlrdata->eventhdlr, cutoff, nchgbds, ndelconss, naddconss) );
3628 SCIP_CALL(
propagateCons(scip, cons, conshdlrdata->usebdwidening, cutoff, nchgbds, nchgsides, ndelconss) );
3636 if( !consdata->tightened )
3646 assert(
SCIPisLE(scip, consdata->lhs, consdata->rhs));
3659 if( consdata->vbdcoef > 0.0 )
3661 if(
SCIPisEQ(scip, consdata->rhs, 1.0) )
3664 if(
SCIPisEQ(scip, consdata->lhs, 1.0) )
3670 SCIPdebugMsg(scip,
"varbound constraint <%s>: aggregate <%s> + <%s> == 1\n",
3675 assert(!infeasible);
3683 assert(consdata->lhs < 0.5);
3685 vars[0] = consdata->var;
3686 vars[1] = consdata->vbdvar;
3690 assert(
SCIPisEQ(scip, consdata->lhs, 1.0));
3709 SCIPdebugMsg(scip,
"varbound constraint <%s>: aggregate <%s> - <%s> == 0\n",
3714 assert(!infeasible);
3722 assert(consdata->lhs < -0.5);
3724 vars[0] = consdata->var;
3733 vars[1] = consdata->vbdvar;
3771 assert(upgdcons != NULL);
3778 upgrade = (nvars == 2) && (nposbin + nnegbin <= 1) && (nposcont + nnegcont <= 1);
3804 if(
SCIPisZero(scip, vals[vbdind]/vals[1-vbdind]) )
3809 var = vars[1-vbdind];
3810 vbdvar = vars[vbdind];
3813 vbdcoef = vals[vbdind]/vals[1-vbdind];
3815 if( vals[1-vbdind] > 0.0 )
3850 assert(scip != NULL);
3851 assert(conshdlr != NULL);
3868 assert(scip != NULL);
3869 assert(conshdlr != NULL);
3874 assert(conshdlrdata != NULL);
3891 for( c = 0; c < nconss; ++c )
3894 assert(consdata != NULL);
3896 if( consdata->row != NULL )
3913 assert(conshdlrdata != NULL);
3935 assert(conshdlr != NULL);
3938 assert(conshdlrdata != NULL);
3941 assert(sourcedata != NULL);
3945 sourcedata->var, sourcedata->vbdvar, sourcedata->vbdcoef, sourcedata->lhs, sourcedata->rhs) );
3967 *infeasible =
FALSE;
3969 for( i = 0; i < nconss && !(*infeasible); i++ )
3986 assert(conshdlr != NULL);
3989 assert(conshdlrdata != NULL);
3994 for( i = 0; i < nusefulconss; ++i )
4000 for( i = nusefulconss; i < nconss && *result ==
SCIP_DIDNOTFIND; ++i )
4016 assert(conshdlr != NULL);
4019 assert(conshdlrdata != NULL);
4024 for( i = 0; i < nusefulconss; ++i )
4030 for( i = nusefulconss; i < nconss && *result ==
SCIP_DIDNOTFIND; ++i )
4046 assert(conshdlr != NULL);
4049 assert(conshdlrdata != NULL);
4053 for( i = 0; i < nconss; i++ )
4086 assert(conshdlr != NULL);
4089 assert(conshdlrdata != NULL);
4093 for( i = 0; i < nconss; i++ )
4125 for( i = 0; i < nconss; i++ )
4154 for( i = 0; i < nconss && (*result ==
SCIP_FEASIBLE || completely); i++ )
4156 if( !
checkCons(scip, conss[i], sol, checklprows) )
4166 assert( consdata != NULL );
4175 SCIPinfoMessage(scip, NULL,
"violation: left hand side is violated by %.15g\n", consdata->lhs - sum);
4179 SCIPinfoMessage(scip, NULL,
"violation: right hand side is violated by %.15g\n", sum - consdata->rhs);
4199 assert(conshdlr != NULL);
4202 assert(conshdlrdata != NULL);
4207 SCIPdebugMsg(scip,
"propagating %d variable bound constraints\n", nmarkedconss);
4210 for( i = 0; i < nmarkedconss && !cutoff; i++ )
4212 SCIP_CALL(
propagateCons(scip, conss[i], conshdlrdata->usebdwidening, &cutoff, &nchgbds, &nchgsides, NULL) );
4217 else if( nchgbds > 0 )
4242 assert(scip != NULL);
4243 assert(conshdlr != NULL);
4245 assert(result != NULL);
4249 assert(conshdlrdata != NULL);
4252 oldnchgbds = *nchgbds;
4253 oldndelconss = *ndelconss;
4254 oldnaddconss = *naddconss;
4255 oldnchgcoefs = *nchgcoefs;
4256 oldnchgsides = *nchgsides;
4257 oldnaggrvars = *naggrvars;
4259 for( i = 0; i < nconss; i++ )
4262 assert(cons != NULL);
4267 assert(consdata != NULL);
4274 consdata->presolved =
FALSE;
4276 if( consdata->presolved )
4278 consdata->presolved =
TRUE;
4281 SCIP_CALL(
applyFixings(scip, cons, conshdlrdata->eventhdlr, &cutoff, nchgbds, ndelconss, naddconss) );
4289 SCIP_CALL(
propagateCons(scip, cons, conshdlrdata->usebdwidening, &cutoff, nchgbds, nchgsides, ndelconss) );
4304 if( !consdata->varboundsadded )
4308 int localoldnchgbds;
4310 localoldnchgbds = *nchgbds;
4315 SCIPdebugMsg(scip,
"adding variable lower bound <%s> >= %g<%s> + %g (and potentially also <%s> %s %g<%s> + %g)\n",
4317 SCIPvarGetName(consdata->vbdvar), (consdata->vbdcoef > 0 ?
">=" :
"<="), 1.0/-consdata->vbdcoef,
4321 &infeasible, &nlocalchgbds) );
4322 assert(!infeasible);
4324 *nchgbds += nlocalchgbds;
4330 SCIPdebugMsg(scip,
"adding variable upper bound <%s> <= %g<%s> + %g (and potentially also <%s> %s %g<%s> + %g)\n",
4332 SCIPvarGetName(consdata->vbdvar), (consdata->vbdcoef > 0 ?
"<=" :
">="), 1.0/-consdata->vbdcoef,
4336 &infeasible, &nlocalchgbds) );
4337 assert(!infeasible);
4339 *nchgbds += nlocalchgbds;
4341 consdata->varboundsadded =
TRUE;
4343 if( *nchgbds > localoldnchgbds )
4359 SCIP_CALL(
upgradeConss(scip, conshdlrdata, conss, nconss, &cutoff, naggrvars, nchgbds, nchgcoefs, nchgsides, ndelconss, naddconss) );
4371 else if( *nchgbds > oldnchgbds || *ndelconss > oldndelconss || *naddconss > oldnaddconss
4372 || *nchgcoefs > oldnchgcoefs || *nchgsides > oldnchgsides || *naggrvars > oldnaggrvars )
4387 assert(conshdlr != NULL);
4390 assert(conshdlrdata != NULL);
4407 assert(consdata != NULL);
4412 if( consdata->vbdcoef > 0.0 )
4425 if( consdata->vbdcoef > 0.0 )
4444 assert(scip != NULL);
4445 assert(conshdlr != NULL);
4446 assert(cons != NULL);
4449 assert(consdata != NULL);
4454 && !
SCIPisEQ(scip, consdata->lhs, consdata->rhs) )
4468 if(
SCIPisEQ(scip, consdata->lhs, consdata->rhs) )
4486 const char* consname;
4505 initial, separate, enforce, check, propagate, local, modifiable, dynamic, removable, stickingatnode, global, valid) );
4525 assert(scip != NULL);
4526 assert(success != NULL);
4527 assert(str != NULL);
4528 assert(name != NULL);
4529 assert(cons != NULL);
4542 while( isspace(*str) )
4545 if( isdigit(str[0]) || ((str[0] ==
'-' || str[0] ==
'+') && isdigit(str[1])) )
4554 while( isspace(*endstr) )
4557 if( endstr[0] !=
'<' || endstr[1] !=
'=' )
4559 SCIPerrorMessage(
"missing \"<=\" after left hand side(, found %c%c)\n", endstr[0], endstr[1]);
4563 SCIPdebugMsg(scip,
"found left hand side <%g>\n", lhs);
4576 if( requiredsize == 2 && *success )
4582 assert(
SCIPisEQ(scip, coefs[0], 1.0));
4587 while( isspace(*endstr) )
4600 assert(str[1] ==
'=');
4604 assert(str[1] ==
'=');
4610 assert(str[1] ==
'=');
4619 else if( strncmp(str,
"[free]", 6) != 0 )
4626 initial, separate, enforce, check, propagate, local, modifiable, dynamic, removable, stickingatnode) );
4646 assert(cons != NULL);
4647 assert(vars != NULL);
4650 assert(consdata != NULL);
4652 vars[0] = consdata->var;
4653 vars[1] = consdata->vbdvar;
4681 assert(event != NULL);
4683 assert(cons != NULL);
4685 assert(consdata != NULL);
4689 consdata->presolved =
FALSE;
4695 consdata->presolved =
FALSE;
4696 consdata->tightened =
FALSE;
4723 eventExecVarbound, NULL) );
4731 consEnfolpVarbound, consEnfopsVarbound, consCheckVarbound, consLockVarbound,
4733 assert(conshdlr != NULL);
4763 "should pairwise constraint comparison be performed in presolving?",
4767 "maximum coefficient in varbound constraint to be added as a row into LP",
4770 "constraints/" CONSHDLR_NAME "/usebdwidening",
"should bound widening be used in conflict analysis?",
4820 if( conshdlr == NULL )
4827 assert(conshdlrdata != NULL);
4833 SCIP_CALL(
SCIPcreateCons(scip, cons, name, conshdlr, consdata, initial, separate, enforce, check, propagate,
4834 local, modifiable, dynamic, removable, stickingatnode) );
4883 assert(consdata != NULL);
4885 return consdata->lhs;
4904 assert(consdata != NULL);
4906 return consdata->rhs;
4925 assert(consdata != NULL);
4927 return consdata->var;
4946 assert(consdata != NULL);
4948 return consdata->vbdvar;
4967 assert(consdata != NULL);
4969 return consdata->vbdcoef;
4988 assert(consdata != NULL);
4990 if( consdata->row != NULL )
5012 assert(consdata != NULL);
5014 if( consdata->row != NULL )
5038 assert(consdata != NULL);
5040 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_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)
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 SCIPtightenVarLbGlobal(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
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)
void SCIPupdateSolLPConsViolation(SCIP *scip, SCIP_SOL *sol, SCIP_Real absviol, SCIP_Real relviol)
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 SCIPaddRow(SCIP *scip, SCIP_ROW *row, SCIP_Bool forcecut, SCIP_Bool *infeasible)
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)
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)
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
static SCIP_RETCODE tightenCoefs(SCIP *scip, SCIP_CONS *cons, int *nchgcoefs, int *nchgsides, int *ndelconss, SCIP_Bool *cutoff, int *nchgbds)
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)
SCIP_RETCODE SCIPtightenVarUbGlobal(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
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)