41 #define CONSHDLR_NAME "bounddisjunction" 42 #define CONSHDLR_DESC "bound disjunction constraints" 43 #define CONSHDLR_ENFOPRIORITY -3000000 44 #define CONSHDLR_CHECKPRIORITY -3000000 45 #define CONSHDLR_PROPFREQ 1 46 #define CONSHDLR_EAGERFREQ 100 48 #define CONSHDLR_MAXPREROUNDS -1 49 #define CONSHDLR_DELAYPROP FALSE 50 #define CONSHDLR_NEEDSCONS TRUE 52 #define CONSHDLR_PRESOLTIMING SCIP_PRESOLTIMING_FAST 53 #define CONSHDLR_PROP_TIMING SCIP_PROPTIMING_BEFORELP 55 #define QUADCONSUPGD_PRIORITY 500000 64 #define EVENTHDLR_NAME "bounddisjunction" 65 #define EVENTHDLR_DESC "event handler for bound disjunction constraints" 74 #define CONFLICTHDLR_NAME "bounddisjunction" 75 #define CONFLICTHDLR_DESC "conflict handler creating bound disjunction constraints" 76 #define CONFLICTHDLR_PRIORITY -3000000 85 #define DEFAULT_CONTINUOUSFRAC 0.4 96 #define AGEINCREASE(n) (1.0 + 0.2*n) 98 #define AGEINCREASE(n) (0.1*n) 109 #ifdef SCIP_DISABLED_CODE 111 #define isFeasLT(scip, var, val1, val2) (SCIPvarIsIntegral(var) ? (val2) - (val1) > 0.5 : SCIPisFeasLT(scip, val1, val2)) 112 #define isFeasLE(scip, var, val1, val2) (SCIPvarIsIntegral(var) ? (val2) - (val1) > -0.5 : SCIPisFeasLE(scip, val1, val2)) 113 #define isFeasGT(scip, var, val1, val2) (SCIPvarIsIntegral(var) ? (val1) - (val2) > 0.5 : SCIPisFeasGT(scip, val1, val2)) 114 #define isFeasGE(scip, var, val1, val2) (SCIPvarIsIntegral(var) ? (val1) - (val2) > -0.5 : SCIPisFeasGE(scip, val1, val2)) 116 #define isFeasLT(scip, var, val1, val2) SCIPisFeasLT(scip, val1, val2) 117 #define isFeasLE(scip, var, val1, val2) SCIPisFeasLE(scip, val1, val2) 118 #define isFeasGT(scip, var, val1, val2) SCIPisFeasGT(scip, val1, val2) 119 #define isFeasGE(scip, var, val1, val2) SCIPisFeasGE(scip, val1, val2) 125 struct SCIP_ConshdlrData
157 assert(consdata !=
NULL);
158 assert(0 <= pos && pos < consdata->nvars);
183 assert(consdata !=
NULL);
184 assert(0 <= pos && pos < consdata->nvars);
211 assert(consdata !=
NULL);
212 assert(0 <= pos && pos < consdata->nvars);
239 assert(consdata !=
NULL);
240 assert(0 <= pos && pos < consdata->nvars);
264 assert(scip !=
NULL);
265 assert(conshdlrdata !=
NULL);
266 assert(eventhdlr !=
NULL);
271 (*conshdlrdata)->eventhdlr = eventhdlr;
283 assert(conshdlrdata !=
NULL);
284 assert(*conshdlrdata !=
NULL);
302 assert(consdata !=
NULL);
303 assert(nvars == 0 || vars !=
NULL);
304 assert(nvars == 0 || boundtypes !=
NULL);
305 assert(nvars == 0 || bounds !=
NULL);
329 for( v = 0; v < nvars && !redundant; ++v )
343 boundtypesbuffer[0] = boundtype;
344 boundsbuffer[0] =
bound;
355 boundtypesbuffer[k] = boundtype;
356 boundsbuffer[k] =
bound;
364 assert(nviolations == nvars);
368 (*consdata)->varssize = 1;
369 (*consdata)->nvars = 1;
374 assert(!redundant || k == 1);
380 (*consdata)->varssize = k;
381 (*consdata)->nvars = k;
395 (*consdata)->varssize = nvars;
396 (*consdata)->nvars = nvars;
401 (*consdata)->vars =
NULL;
402 (*consdata)->boundtypes =
NULL;
403 (*consdata)->bounds =
NULL;
404 (*consdata)->varssize = 0;
405 (*consdata)->nvars = 0;
407 (*consdata)->watchedvar1 = -1;
408 (*consdata)->watchedvar2 = -1;
409 (*consdata)->filterpos1 = -1;
410 (*consdata)->filterpos2 = -1;
428 assert(consdata !=
NULL);
429 assert(*consdata !=
NULL);
450 assert(consdata !=
NULL);
454 for( v = 0; v < consdata->nvars; ++v )
456 assert(consdata->vars[v] !=
NULL);
481 assert(consdata !=
NULL);
482 assert(watchedvar1 == -1 || watchedvar1 != watchedvar2);
483 assert(watchedvar1 != -1 || watchedvar2 == -1);
484 assert(watchedvar1 == -1 || (0 <= watchedvar1 && watchedvar1 < consdata->nvars));
485 assert(watchedvar2 == -1 || (0 <= watchedvar2 && watchedvar2 < consdata->nvars));
492 if( watchedvar1 == consdata->watchedvar2 || watchedvar2 == consdata->watchedvar1 )
496 tmp = consdata->watchedvar1;
497 consdata->watchedvar1 = consdata->watchedvar2;
498 consdata->watchedvar2 = tmp;
499 tmp = consdata->filterpos1;
500 consdata->filterpos1 = consdata->filterpos2;
501 consdata->filterpos2 = tmp;
503 assert(watchedvar1 == -1 || watchedvar1 != consdata->watchedvar2);
504 assert(watchedvar2 == -1 || watchedvar2 != consdata->watchedvar1);
507 if( consdata->watchedvar1 != -1 && consdata->watchedvar1 != watchedvar1 )
509 assert(consdata->filterpos1 != -1);
510 SCIP_CALL(
dropEvents(scip, cons, consdata, eventhdlr, consdata->watchedvar1, consdata->filterpos1) );
511 consdata->watchedvar1 = -1;
513 if( consdata->watchedvar2 != -1 && consdata->watchedvar2 != watchedvar2 )
515 assert(consdata->filterpos2 != -1);
516 SCIP_CALL(
dropEvents(scip, cons, consdata, eventhdlr, consdata->watchedvar2, consdata->filterpos2) );
517 consdata->watchedvar2 = -1;
521 if( watchedvar1 != -1 && watchedvar1 != consdata->watchedvar1 )
525 if( watchedvar2 != -1 && watchedvar2 != consdata->watchedvar2 )
531 consdata->watchedvar1 = watchedvar1;
532 consdata->watchedvar2 = watchedvar2;
548 assert(eventhdlr !=
NULL);
551 assert(consdata !=
NULL);
552 assert(0 <= pos && pos < consdata->nvars);
561 if( consdata->watchedvar1 == pos )
565 if( consdata->watchedvar2 == pos )
570 assert(pos != consdata->watchedvar1);
571 assert(pos != consdata->watchedvar2);
574 consdata->vars[pos] = consdata->vars[consdata->nvars-1];
575 consdata->boundtypes[pos] = consdata->boundtypes[consdata->nvars-1];
576 consdata->bounds[pos] = consdata->bounds[consdata->nvars-1];
580 if( consdata->watchedvar1 == consdata->nvars )
581 consdata->watchedvar1 = pos;
582 if( consdata->watchedvar2 == consdata->nvars )
583 consdata->watchedvar2 = pos;
603 assert(eventhdlr !=
NULL);
606 assert(consdata !=
NULL);
612 if( consdata->varssize == consdata->nvars )
620 consdata->varssize = newsize;
622 assert(consdata->varssize > consdata->nvars);
625 consdata->vars[consdata->nvars] = var;
626 consdata->boundtypes[consdata->nvars] = boundtype;
627 consdata->bounds[consdata->nvars] =
bound;
636 if( consdata->watchedvar1 == -1 )
638 assert(consdata->watchedvar2 == -1);
641 else if( consdata->watchedvar2 == -1 )
665 assert(eventhdlr !=
NULL);
666 assert(redundant !=
NULL);
669 assert(consdata !=
NULL);
670 assert(consdata->nvars == 0 || consdata->vars !=
NULL);
674 while( v < consdata->nvars )
678 var = consdata->vars[v];
683 if(
isFeasGE(scip, var, bnd, consdata->bounds[v]) )
691 if(
isFeasLT(scip, var, bnd, consdata->bounds[v]) )
703 if(
isFeasLE(scip, var, bnd, consdata->bounds[v]) )
711 if(
isFeasGT(scip, var, bnd, consdata->bounds[v]) )
737 assert(consdata !=
NULL);
738 assert(0 <= pos && pos < consdata->nvars);
743 return isFeasGE(scip, consdata->vars[pos], bnd, consdata->bounds[pos]);
748 return isFeasLE(scip, consdata->vars[pos], bnd, consdata->bounds[pos]);
762 assert(consdata !=
NULL);
763 assert(0 <= pos && pos < consdata->nvars);
768 return isFeasLT(scip, consdata->vars[pos], bnd, consdata->bounds[pos]);
773 return isFeasGT(scip, consdata->vars[pos], bnd, consdata->bounds[pos]);
792 assert(scip !=
NULL);
793 assert(cons !=
NULL);
794 assert(eventhdlr !=
NULL);
797 assert(consdata !=
NULL);
800 while( v < consdata->nvars )
805 var = consdata->vars[v];
826 bound = consdata->bounds[v];
827 boundtype = consdata->boundtypes[v];
878 assert(scip !=
NULL);
879 assert(cons !=
NULL);
880 assert(ndelconss !=
NULL);
881 assert(naddconss !=
NULL);
882 assert(naddconss !=
NULL);
886 assert(consdata !=
NULL);
888 nvars = consdata->nvars;
890 assert(consdata->vars !=
NULL);
896 for( v = nvars - 1; v >= 0; --v )
914 newvars[v] = consdata->vars[v];
926 newvars[v] = consdata->vars[v];
952 SCIPdebugMsg(scip,
"updated constraint <%s> to the following %s constraint\n",
SCIPconsGetName(cons), (nvars == 2 ?
"setppc" :
"logicor"));
982 assert(consdata !=
NULL);
987 for( v = 0; v < consdata->nvars; ++v )
1042 assert(cons !=
NULL);
1045 assert(cutoff !=
NULL);
1046 assert(reduceddom !=
NULL);
1047 assert(mustcheck !=
NULL);
1050 assert(consdata !=
NULL);
1051 assert(consdata->watchedvar1 == -1 || consdata->watchedvar1 != consdata->watchedvar2);
1055 *infeasible =
FALSE;
1056 *reduceddom =
FALSE;
1061 nvars = consdata->nvars;
1062 vars = consdata->vars;
1063 boundtypes = consdata->boundtypes;
1064 bounds = consdata->bounds;
1065 assert(nvars == 0 || vars !=
NULL);
1066 assert(nvars == 0 || boundtypes !=
NULL);
1067 assert(nvars == 0 || bounds !=
NULL);
1070 if( consdata->watchedvar1 >= 0 &&
isLiteralSatisfied(scip, consdata, consdata->watchedvar1) )
1077 if( consdata->watchedvar2 >= 0 &&
isLiteralSatisfied(scip, consdata, consdata->watchedvar2) )
1090 if( consdata->watchedvar1 >= 0 && !
isLiteralViolated(scip, consdata, consdata->watchedvar1) )
1092 watchedvar1 = consdata->watchedvar1;
1095 if( consdata->watchedvar2 >= 0 && !
isLiteralViolated(scip, consdata, consdata->watchedvar2) )
1097 if( watchedvar1 == -1 )
1099 watchedvar1 = consdata->watchedvar2;
1104 watchedvar2 = consdata->watchedvar2;
1108 assert(watchedvar1 >= 0 || watchedvar2 == -1);
1109 assert(nbranchings1 <= nbranchings2);
1114 if( watchedvar2 == -1 )
1118 for( v = 0; v < nvars; ++v )
1123 if( v == consdata->watchedvar1 || v == consdata->watchedvar2 )
1133 assert(v != consdata->watchedvar1);
1134 assert(v != consdata->watchedvar2);
1139 SCIPdebugMsg(scip,
" -> disabling constraint <%s> (variable <%s> fixed to 1.0)\n",
1141 if( consdata->watchedvar1 != -1 )
1156 if( nbranchings < nbranchings2 )
1158 if( nbranchings < nbranchings1 )
1160 watchedvar2 = watchedvar1;
1161 nbranchings2 = nbranchings1;
1163 nbranchings1 = nbranchings;
1168 nbranchings2 = nbranchings;
1173 assert(nbranchings1 <= nbranchings2);
1174 assert(watchedvar1 >= 0 || watchedvar2 == -1);
1176 if( watchedvar1 == -1 )
1182 assert(watchedvar2 == -1);
1197 else if( watchedvar2 == -1 )
1204 assert(0 <= watchedvar1 && watchedvar1 < nvars);
1218 for (v = 0; v < nvars; ++v)
1220 if ( v != watchedvar1 )
1228 SCIPdebugMsg(scip,
" -> single-literal constraint <%s> (change bound <%s> %s %g) at depth %d\n",
1244 if( watchedvar1 != consdata->watchedvar1 )
1254 SCIPdebugMsg(scip,
" -> new watched variables <%s> and <%s> of constraint <%s> are still undecided\n",
1290 assert(violated !=
NULL);
1294 assert(consdata !=
NULL);
1296 nvars = consdata->nvars;
1297 vars = consdata->vars;
1298 boundtypes = consdata->boundtypes;
1299 bounds = consdata->bounds;
1300 assert(nvars == 0 || vars !=
NULL);
1301 assert(nvars == 0 || boundtypes !=
NULL);
1302 assert(nvars == 0 || bounds !=
NULL);
1306 for( v = 0; v < nvars; ++v )
1341 assert(cons !=
NULL);
1344 assert(neednarybranch !=
NULL);
1347 assert(consdata !=
NULL);
1348 nvars = consdata->nvars;
1349 vars = consdata->vars;
1350 boundtypes = consdata->boundtypes;
1351 bounds = consdata->bounds;
1352 assert(nvars == 0 || vars !=
NULL);
1353 assert(nvars == 0 || boundtypes !=
NULL);
1354 assert(nvars == 0 || bounds !=
NULL);
1356 *neednarybranch =
TRUE;
1358 for( v = 0; v < nvars; ++v )
1363 assert(var !=
NULL);
1398 *neednarybranch =
FALSE;
1421 assert(cons !=
NULL);
1424 assert(cutoff !=
NULL);
1425 assert(infeasible !=
NULL);
1426 assert(reduceddom !=
NULL);
1427 assert(registeredbrcand !=
NULL);
1453 if( !neednarybranch )
1454 *registeredbrcand =
TRUE;
1483 assert(cons !=
NULL);
1488 assert(consdata !=
NULL);
1489 nvars = consdata->nvars;
1490 vars = consdata->vars;
1491 boundtypes = consdata->boundtypes;
1492 bounds = consdata->bounds;
1493 assert(nvars == 0 || vars !=
NULL);
1494 assert(nvars == 0 || boundtypes !=
NULL);
1495 assert(nvars == 0 || bounds !=
NULL);
1497 for( v = 0; v < nvars; ++v )
1502 assert(var !=
NULL);
1530 SCIPdebugMsg(scip,
" -> creating child to enforce: <%s> %c= %g (priority: %g, estimate: %g)\n",
1600 int nnarybranchconsvars;
1603 assert(conshdlr !=
NULL);
1605 assert(nconss == 0 || conss !=
NULL);
1606 assert(result !=
NULL);
1608 SCIPdebugMsg(scip,
"Enforcing %d bound disjunction constraints for %s solution\n", nconss, sol ==
NULL ?
"LP" :
"relaxation");
1613 assert(conshdlrdata !=
NULL);
1618 registeredbrcand =
FALSE;
1619 narybranchcons =
NULL;
1620 nnarybranchconsvars = INT_MAX;
1623 for( c = 0; c < nconss && !cutoff && !reduceddom; ++c )
1625 infeasiblecons =
FALSE;
1627 ®isteredbrcand) );
1628 infeasible |= infeasiblecons;
1629 if( infeasiblecons && !registeredbrcand )
1634 narybranchcons = conss[c];
1636 assert(nnarybranchconsvars > 0);
1643 else if( reduceddom )
1645 else if( infeasible )
1647 if( registeredbrcand )
1691 assert(scip !=
NULL);
1692 assert(cons !=
NULL);
1693 assert(nupgdconss !=
NULL);
1694 assert(upgdconss !=
NULL);
1730 x = quadvarterms[0].
var;
1731 y = quadvarterms[1].
var;
1734 coefx = quadvarterms[0].
lincoef;
1735 coefy = quadvarterms[1].
lincoef;
1796 if( upgdconsssize < *nupgdconss )
1799 *nupgdconss = -*nupgdconss;
1807 if( *nupgdconss == 1 )
1812 2, xy, boundtypes, bounds,
1818 SCIPdebugMsg(scip,
"created bounddisjunction constraint:\n");
1826 assert(*nupgdconss == 2);
1834 2, xy, boundtypes, bounds,
1844 2, xy, boundtypes, bounds,
1850 SCIPdebugMsg(scip,
"created bounddisjunction constraints:\n");
1857 assert(*nupgdconss == 2);
1865 2, xy, boundtypes, bounds,
1875 2, xy, boundtypes, bounds,
1881 SCIPdebugMsg(scip,
"created bounddisjunction constraints:\n");
1889 assert(*nupgdconss == 4);
1896 2, xy, boundtypes, bounds,
1907 2, xy, boundtypes, bounds,
1918 2, xy, boundtypes, bounds,
1929 2, xy, boundtypes, bounds,
1935 SCIPdebugMsg(scip,
"created bounddisjunction constraints:\n");
1962 if( upgdconsssize < 2 )
1979 2, xy, boundtypes, bounds,
1990 2, xy, boundtypes, bounds,
1996 SCIPdebugMsg(scip,
"created bounddisjunction constraints:\n");
2022 if( upgdconsssize < 2 )
2039 2, xy, boundtypes, bounds,
2050 2, xy, boundtypes, bounds,
2056 SCIPdebugMsg(scip,
"created bounddisjunction constraints:\n");
2077 assert(scip !=
NULL);
2078 assert(conshdlr !=
NULL);
2095 assert(conshdlr !=
NULL);
2097 assert(scip !=
NULL);
2101 assert(conshdlrdata !=
NULL);
2120 assert(conshdlr !=
NULL);
2122 assert(scip !=
NULL);
2125 assert(conshdlrdata !=
NULL);
2128 for( c = 0; c < nconss; ++c )
2131 assert(cons !=
NULL);
2162 assert(conshdlr !=
NULL);
2164 assert(consdata !=
NULL);
2165 assert(*consdata !=
NULL);
2183 assert(conshdlr !=
NULL);
2186 assert(sourcecons !=
NULL);
2187 assert(targetcons !=
NULL);
2190 assert(sourcedata !=
NULL);
2194 sourcedata->boundtypes, sourcedata->bounds) );
2239 assert(conshdlr !=
NULL);
2241 assert(nconss == 0 || conss !=
NULL);
2242 assert(result !=
NULL);
2244 SCIPdebugMsg(scip,
"pseudo enforcing %d bound disjunction constraints\n", nconss);
2249 assert(conshdlrdata !=
NULL);
2254 registeredbrcand =
FALSE;
2255 narybranchcons =
NULL;
2258 for( c = 0; c < nconss && !cutoff && !reduceddom; ++c )
2261 ®isteredbrcand) );
2262 if( infeasible && !registeredbrcand )
2266 narybranchcons = conss[c];
2272 else if( reduceddom )
2274 else if( infeasible )
2276 if( registeredbrcand )
2299 assert(conshdlr !=
NULL);
2301 assert(nconss == 0 || conss !=
NULL);
2302 assert(result !=
NULL);
2307 for( c = 0; c < nconss && (*result ==
SCIP_FEASIBLE || completely); ++c )
2313 assert(consdata !=
NULL);
2324 for( v = 0; v < consdata->nvars; ++v )
2326 assert(consdata->vars[v] !=
NULL);
2356 assert(conshdlr !=
NULL);
2358 assert(nconss == 0 || conss !=
NULL);
2359 assert(result !=
NULL);
2362 assert(conshdlrdata !=
NULL);
2369 for( c = 0; c < nusefulconss && !cutoff; ++c )
2372 &cutoff, &infeasible, &consreduceddom, &mustcheck) );
2373 reduceddom = reduceddom || consreduceddom;
2379 else if( reduceddom )
2400 assert(conshdlr !=
NULL);
2402 assert(scip !=
NULL);
2403 assert(result !=
NULL);
2408 assert(conshdlrdata !=
NULL);
2414 assert(cons !=
NULL);
2416 assert(consdata !=
NULL);
2451 if( consdata->nvars == 0 )
2457 else if( consdata->nvars == 1 )
2459 SCIPdebugMsg(scip,
"bound disjunction constraint <%s> has only one undecided literal\n",
2462 assert(consdata->vars !=
NULL);
2497 1, &consdata->vars[0], &one, consdata->bounds[0],
SCIPinfinity(scip),
2506 1, &consdata->vars[0], &one, -
SCIPinfinity(scip), consdata->bounds[0],
2548 assert(conshdlr !=
NULL);
2550 assert(cons !=
NULL);
2551 assert(infervar !=
NULL);
2552 assert(result !=
NULL);
2555 assert(consdata !=
NULL);
2556 assert(consdata->vars !=
NULL);
2557 assert(consdata->nvars > 0);
2558 assert(0 <= inferinfo && inferinfo < consdata->nvars);
2559 assert(consdata->vars[inferinfo] == infervar);
2561 vars = consdata->vars;
2562 boundtypes = consdata->boundtypes;
2564 bounds = consdata->bounds;
2565 assert(bounds !=
NULL);
2567 assert(boundtypes !=
NULL);
2569 SCIPdebugMsg(scip,
"conflict resolving method of bound disjunction constraint handler\n");
2579 for( v = 0; v < consdata->nvars; ++v )
2581 if( v != inferinfo )
2583 assert(consdata->vars[v] != infervar || consdata->boundtypes[v] != consdata->boundtypes[inferinfo]);
2612 assert(consdata !=
NULL);
2615 for( i = 0; i < consdata->nvars; ++i )
2638 assert(conshdlr !=
NULL);
2640 assert(cons !=
NULL);
2644 assert(conshdlrdata !=
NULL);
2646 assert(consdata !=
NULL);
2647 assert(consdata->watchedvar1 == -1 || consdata->watchedvar1 != consdata->watchedvar2);
2653 if( consdata->watchedvar1 != -1 )
2656 &consdata->filterpos1) );
2658 if( consdata->watchedvar2 != -1 )
2661 &consdata->filterpos2) );
2675 assert(conshdlr !=
NULL);
2677 assert(cons !=
NULL);
2681 assert(conshdlrdata !=
NULL);
2683 assert(consdata !=
NULL);
2684 assert(consdata->watchedvar1 == -1 || consdata->watchedvar1 != consdata->watchedvar2);
2690 if( consdata->watchedvar1 != -1 )
2692 assert(consdata->filterpos1 != -1);
2693 SCIP_CALL(
dropEvents(scip, cons, consdata, conshdlrdata->eventhdlr, consdata->watchedvar1, consdata->filterpos1) );
2694 consdata->watchedvar1 = -1;
2696 if( consdata->watchedvar2 != -1 )
2698 assert(consdata->filterpos2 != -1);
2699 SCIP_CALL(
dropEvents(scip, cons, consdata, conshdlrdata->eventhdlr, consdata->watchedvar2, consdata->filterpos2) );
2700 consdata->watchedvar2 = -1;
2712 assert( scip !=
NULL );
2713 assert( conshdlr !=
NULL );
2714 assert( cons !=
NULL );
2732 assert(valid !=
NULL);
2745 for( v = 0; v < nvars && *valid; ++v )
2748 assert(!(*valid) || targetvars[v] !=
NULL);
2755 bounds, initial, separate, enforce, check, propagate, local, modifiable, dynamic, removable, stickingatnode) );
2774 assert( success !=
NULL );
2777 SCIPdebugMsg(scip,
"parse <%s> as bounddisjunction constraint\n", str);
2780 while( *str !=
'\0' && isspace((
unsigned char)*str) )
2784 if( strncmp(str,
"bounddisjunction(", 16) != 0 )
2803 while( *str !=
'\0' && *str !=
')' )
2819 while( *str !=
'\0' && isspace((
unsigned char)*str) && *str !=
'>' && *str !=
'<' )
2849 while( *str !=
'\0' && isspace((
unsigned char)*str) )
2862 while( (*str !=
'\0' && isspace((
unsigned char)*str)) || *str ==
',' )
2866 vars[nvars++] = var;
2869 if( nvars > varssize )
2881 if( *success && nvars > 0 )
2884 initial, separate, enforce, check, propagate, local, modifiable, dynamic, removable, stickingatnode) );
2902 assert(cons !=
NULL);
2905 assert(consdata !=
NULL);
2907 if( varssize < consdata->nvars )
2911 assert(vars !=
NULL);
2926 assert(cons !=
NULL);
2929 assert(consdata !=
NULL);
2931 (*nvars) = consdata->nvars;
2946 assert(eventhdlr !=
NULL);
2947 assert(eventdata !=
NULL);
2949 assert(event !=
NULL);
2976 struct SCIP_ConflicthdlrData
2994 assert(conflicthdlr !=
NULL);
2996 assert(bdchginfos !=
NULL || nbdchginfos == 0);
2997 assert(result !=
NULL);
3007 assert(conflicthdlrdata !=
NULL);
3017 for( i = 0; i < nbdchginfos; ++i )
3019 assert(bdchginfos !=
NULL);
3023 bounds[i] = relaxedbds[i];
3048 if( i == nbdchginfos && ncontinuous < conflicthdlrdata->continuousfrac * nbdchginfos + 0.5 )
3074 assert(conflicthdlr !=
NULL);
3078 assert(conflicthdlrdata !=
NULL);
3106 eventExecBounddisjunction,
NULL) );
3113 "conflict/" CONSHDLR_NAME "/continuousfrac",
"maximal percantage of continuous variables within a conflict",
3118 conflictExecBounddisjunction, conflicthdlrdata) );
3128 consEnfolpBounddisjunction, consEnfopsBounddisjunction, consCheckBounddisjunction, consLockBounddisjunction,
3131 assert(conshdlr !=
NULL);
3202 assert(scip !=
NULL);
3206 if( conshdlr ==
NULL )
3216 SCIP_CALL(
SCIPcreateCons(scip, cons, name, conshdlr, consdata, initial, separate, enforce, check, propagate,
3217 local, modifiable, dynamic, removable, stickingatnode) );
3240 assert(scip !=
NULL);
3264 assert(consdata !=
NULL);
3266 return consdata->nvars;
3285 assert(consdata !=
NULL);
3287 return consdata->vars;
3306 assert(consdata !=
NULL);
3308 return consdata->boundtypes;
3327 assert(consdata !=
NULL);
3329 return consdata->bounds;
enum SCIP_Result SCIP_RESULT
static SCIP_DECL_CONSCHECK(consCheckBounddisjunction)
enum SCIP_BoundType SCIP_BOUNDTYPE
void SCIPconshdlrSetData(SCIP_CONSHDLR *conshdlr, SCIP_CONSHDLRDATA *conshdlrdata)
static SCIP_RETCODE dropEvents(SCIP *scip, SCIP_CONS *cons, SCIP_CONSDATA *consdata, SCIP_EVENTHDLR *eventhdlr, int pos, int filterpos)
SCIP_RETCODE SCIPaddConsAge(SCIP *scip, SCIP_CONS *cons, SCIP_Real deltaage)
#define SCIPreallocBlockMemoryArray(scip, ptr, oldnum, newnum)
SCIP_RETCODE SCIPsetConshdlrDelete(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSDELETE((*consdelete)))
static SCIP_RETCODE lockRounding(SCIP *scip, SCIP_CONS *cons, SCIP_CONSDATA *consdata, int pos)
static SCIP_RETCODE conshdlrdataFree(SCIP *scip, SCIP_CONSHDLRDATA **conshdlrdata)
SCIP_RETCODE SCIPtightenVarLb(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
SCIP_RETCODE SCIPincludeConshdlrBounddisjunction(SCIP *scip)
SCIP_Real SCIPgetVarUbAtIndex(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx, SCIP_Bool after)
SCIP_Bool SCIPisFeasEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_STAGE SCIPgetStage(SCIP *scip)
SCIP_Bool SCIPconsIsDynamic(SCIP_CONS *cons)
SCIP_RETCODE SCIPsetConshdlrTrans(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSTRANS((*constrans)))
SCIP_Bool SCIPisFeasLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Real SCIPgetVarLbAtIndex(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx, SCIP_Bool after)
int SCIPconsGetValidDepth(SCIP_CONS *cons)
static SCIP_RETCODE consdataFree(SCIP *scip, SCIP_CONSDATA **consdata)
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_VAR * SCIPbdchginfoGetVar(SCIP_BDCHGINFO *bdchginfo)
static SCIP_DECL_CONSDELETE(consDeleteBounddisjunction)
#define CONSHDLR_PROPFREQ
SCIP_Real SCIPvarGetLbGlobal(SCIP_VAR *var)
SCIP_RETCODE SCIPincludeQuadconsUpgrade(SCIP *scip, SCIP_DECL_QUADCONSUPGD((*quadconsupgd)), int priority, SCIP_Bool active, const char *conshdlrname)
SCIP_RETCODE SCIPsetConshdlrGetVars(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSGETVARS((*consgetvars)))
#define CONSHDLR_NEEDSCONS
SCIP_RETCODE SCIPsetConshdlrEnforelax(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSENFORELAX((*consenforelax)))
SCIP_RETCODE SCIPresetConsAge(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPdelCons(SCIP *scip, SCIP_CONS *cons)
SCIP_Real * SCIPgetBoundsBounddisjunction(SCIP *scip, SCIP_CONS *cons)
int SCIPcalcMemGrowSize(SCIP *scip, int num)
static SCIP_RETCODE applyGlobalBounds(SCIP *scip, SCIP_CONS *cons, SCIP_EVENTHDLR *eventhdlr, SCIP_Bool *redundant)
SCIP_Real SCIPvarGetLbLocal(SCIP_VAR *var)
SCIP_Bool SCIPisGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_RETCODE SCIPdisableConsPropagation(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPsetConshdlrDeactive(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSDEACTIVE((*consdeactive)))
SCIP_RETCODE SCIPchgVarLbNode(SCIP *scip, SCIP_NODE *node, SCIP_VAR *var, SCIP_Real newbound)
SCIP_Bool SCIPconsIsAdded(SCIP_CONS *cons)
SCIP_RETCODE SCIPincludeEventhdlrBasic(SCIP *scip, SCIP_EVENTHDLR **eventhdlrptr, const char *name, const char *desc, SCIP_DECL_EVENTEXEC((*eventexec)), SCIP_EVENTHDLRDATA *eventhdlrdata)
SCIP_RETCODE SCIPdelConsNode(SCIP *scip, SCIP_NODE *node, SCIP_CONS *cons)
int SCIPgetNVarsBounddisjunction(SCIP *scip, SCIP_CONS *cons)
static SCIP_RETCODE disableCons(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPparseVarName(SCIP *scip, const char *str, SCIP_VAR **var, char **endptr)
SCIP_Bool SCIPvarIsBinary(SCIP_VAR *var)
static SCIP_RETCODE registerBranchingCandidates(SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_Bool *neednarybranch)
SCIP_Bool SCIPisFeasGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
#define isFeasGT(scip, var, val1, val2)
static SCIP_DECL_CONSGETVARS(consGetVarsBounddisjunction)
const char * SCIPeventhdlrGetName(SCIP_EVENTHDLR *eventhdlr)
#define isFeasGE(scip, var, val1, 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)
static SCIP_RETCODE delCoefPos(SCIP *scip, SCIP_CONS *cons, SCIP_EVENTHDLR *eventhdlr, int pos)
#define CONFLICTHDLR_DESC
SCIP_Real SCIPinfinity(SCIP *scip)
int SCIPsnprintf(char *t, int len, const char *s,...)
static SCIP_RETCODE catchEvents(SCIP *scip, SCIP_CONS *cons, SCIP_CONSDATA *consdata, SCIP_EVENTHDLR *eventhdlr, int pos, int *filterpos)
enum SCIP_Retcode SCIP_RETCODE
#define CONSHDLR_PROP_TIMING
SCIP_RETCODE SCIPaddVarLocks(SCIP *scip, SCIP_VAR *var, int nlocksdown, int nlocksup)
SCIP_Bool SCIPconsIsStickingAtNode(SCIP_CONS *cons)
#define CONFLICTHDLR_PRIORITY
static SCIP_DECL_CONSENFORELAX(consEnforelaxBounddisjunction)
static SCIP_RETCODE analyzeConflict(SCIP *scip, SCIP_CONS *cons)
SCIP_Bool SCIPconsIsTransformed(SCIP_CONS *cons)
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 SCIPenableConsPropagation(SCIP *scip, SCIP_CONS *cons)
static SCIP_DECL_CONSTRANS(consTransBounddisjunction)
SCIP_RETCODE SCIPchgVarUbNode(SCIP *scip, SCIP_NODE *node, SCIP_VAR *var, SCIP_Real newbound)
SCIP_Bool SCIPisEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
#define SCIPfreeBufferArray(scip, ptr)
SCIP_Longint SCIPvarGetNBranchingsCurrentRun(SCIP_VAR *var, SCIP_BRANCHDIR dir)
Constraint handler for the set partitioning / packing / covering constraints .
static SCIP_DECL_CONSFREE(consFreeBounddisjunction)
SCIP_RETCODE SCIPincludeConflicthdlrBasic(SCIP *scip, SCIP_CONFLICTHDLR **conflicthdlrptr, const char *name, const char *desc, int priority, SCIP_DECL_CONFLICTEXEC((*conflictexec)), SCIP_CONFLICTHDLRDATA *conflicthdlrdata)
#define CONSHDLR_ENFOPRIORITY
#define SCIPallocBlockMemory(scip, ptr)
#define SCIPdebugPrintCons(x, y, z)
SCIP_Bool SCIPisTransformed(SCIP *scip)
static SCIP_RETCODE addCoef(SCIP *scip, SCIP_CONS *cons, SCIP_EVENTHDLR *eventhdlr, SCIP_VAR *var, SCIP_BOUNDTYPE boundtype, SCIP_Real bound)
SCIP_Bool SCIPconsIsRemovable(SCIP_CONS *cons)
SCIP_RETCODE SCIPgetTransformedVars(SCIP *scip, int nvars, SCIP_VAR **vars, SCIP_VAR **transvars)
SCIP_RETCODE SCIPsetConshdlrParse(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPARSE((*consparse)))
SCIP_Real SCIPgetLhsQuadratic(SCIP *scip, SCIP_CONS *cons)
SCIP_Bool SCIPconsIsActive(SCIP_CONS *cons)
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)
#define CONSHDLR_DELAYPROP
SCIP_Real SCIPcomputeVarUbGlobal(SCIP *scip, SCIP_VAR *var)
SCIP_Real SCIPcomputeVarLbLocal(SCIP *scip, SCIP_VAR *var)
int SCIPgetNQuadVarTermsQuadratic(SCIP *scip, SCIP_CONS *cons)
static SCIP_Bool isLiteralSatisfied(SCIP *scip, SCIP_CONSDATA *consdata, int pos)
#define SCIP_EVENTTYPE_LBRELAXED
int SCIPgetNBilinTermsQuadratic(SCIP *scip, SCIP_CONS *cons)
SCIP_Bool SCIPisConflictAnalysisApplicable(SCIP *scip)
SCIP_RETCODE SCIPcreateConsBasicBounddisjunction(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_BOUNDTYPE *boundtypes, SCIP_Real *bounds)
#define CONSHDLR_EAGERFREQ
SCIP_RETCODE SCIPenableCons(SCIP *scip, SCIP_CONS *cons)
SCIP_Real SCIPvarGetUbGlobal(SCIP_VAR *var)
SCIP_VAR * SCIPvarGetProbvar(SCIP_VAR *var)
static SCIP_RETCODE enforceCurrentSol(SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_EVENTHDLR *eventhdlr, SCIP_Bool *cutoff, SCIP_Bool *infeasible, SCIP_Bool *reduceddom, SCIP_Bool *registeredbrcand)
#define SCIPduplicateBlockMemoryArray(scip, ptr, source, num)
SCIP_RETCODE SCIPsetConshdlrCopy(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSHDLRCOPY((*conshdlrcopy)), SCIP_DECL_CONSCOPY((*conscopy)))
static SCIP_DECL_QUADCONSUPGD(upgradeConsQuadratic)
SCIP_VAR ** SCIPgetVarsBounddisjunction(SCIP *scip, SCIP_CONS *cons)
SCIP_BOUNDTYPE SCIPboundtypeOpposite(SCIP_BOUNDTYPE boundtype)
const char * SCIPconshdlrGetName(SCIP_CONSHDLR *conshdlr)
static SCIP_RETCODE enforceConstraint(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss, SCIP_SOL *sol, SCIP_RESULT *result)
SCIP_RETCODE SCIPaddCons(SCIP *scip, SCIP_CONS *cons)
static SCIP_DECL_CONSGETNVARS(consGetNVarsBounddisjunction)
SCIP_Bool SCIPisLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
#define QUADCONSUPGD_PRIORITY
Constraint handler for logicor constraints (equivalent to set covering, but algorithms are suited fo...
SCIP_RETCODE SCIPunlockVarCons(SCIP *scip, SCIP_VAR *var, SCIP_CONS *cons, SCIP_Bool lockdown, SCIP_Bool lockup)
const char * SCIPconsGetName(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsPropagated(SCIP_CONS *cons)
struct SCIP_EventData SCIP_EVENTDATA
const char * SCIPvarGetName(SCIP_VAR *var)
SCIP_RETCODE SCIPsetConshdlrFree(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSFREE((*consfree)))
constraint handler for quadratic constraints
SCIP_CONSHDLRDATA * SCIPconshdlrGetData(SCIP_CONSHDLR *conshdlr)
static SCIP_DECL_CONSENFOLP(consEnfolpBounddisjunction)
#define CONSHDLR_CHECKPRIORITY
#define SCIP_EVENTTYPE_UBRELAXED
SCIP_RETCODE SCIPcreateChild(SCIP *scip, SCIP_NODE **node, SCIP_Real nodeselprio, SCIP_Real estimate)
SCIP_RETCODE SCIPsetConflicthdlrFree(SCIP *scip, SCIP_CONFLICTHDLR *conflicthdlr, SCIP_DECL_CONFLICTFREE((*conflictfree)))
struct SCIP_ConflicthdlrData SCIP_CONFLICTHDLRDATA
#define SCIP_EVENTTYPE_LBTIGHTENED
SCIP_Bool SCIPisFeasGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Real SCIPcomputeVarUbLocal(SCIP *scip, SCIP_VAR *var)
static SCIP_DECL_CONSPARSE(consParseBounddisjunction)
SCIP_Bool SCIPisFeasLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_RETCODE SCIPanalyzeConflictCons(SCIP *scip, SCIP_CONS *cons, SCIP_Bool *success)
void SCIPverbMessage(SCIP *scip, SCIP_VERBLEVEL msgverblevel, FILE *file, const char *formatstr,...)
SCIP_Bool SCIPconsIsLocal(SCIP_CONS *cons)
SCIP_RETCODE SCIPsetConshdlrResprop(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSRESPROP((*consresprop)))
struct SCIP_ConsData SCIP_CONSDATA
SCIP_RETCODE SCIPdisableCons(SCIP *scip, SCIP_CONS *cons)
SCIP_BILINTERM * SCIPgetBilinTermsQuadratic(SCIP *scip, SCIP_CONS *cons)
#define SCIP_EVENTTYPE_BOUNDTIGHTENED
SCIP_BOUNDTYPE * SCIPgetBoundtypesBounddisjunction(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPaddConsNode(SCIP *scip, SCIP_NODE *node, SCIP_CONS *cons, SCIP_NODE *validnode)
SCIP_Real SCIPgetRhsQuadratic(SCIP *scip, SCIP_CONS *cons)
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)
static SCIP_RETCODE processWatchedVars(SCIP *scip, SCIP_CONS *cons, SCIP_EVENTHDLR *eventhdlr, SCIP_Bool *cutoff, SCIP_Bool *infeasible, SCIP_Bool *reduceddom, SCIP_Bool *mustcheck)
#define SCIPallocBufferArray(scip, ptr, num)
public data structures and miscellaneous methods
static SCIP_RETCODE conshdlrdataCreate(SCIP *scip, SCIP_CONSHDLRDATA **conshdlrdata, SCIP_EVENTHDLR *eventhdlr)
SCIP_Bool SCIPconsIsUpdatedeactivate(SCIP_CONS *cons)
#define isFeasLT(scip, var, val1, val2)
SCIP_EVENTTYPE SCIPeventGetType(SCIP_EVENT *event)
SCIP_Bool SCIPconsIsPropagationEnabled(SCIP_CONS *cons)
static SCIP_DECL_CONSHDLRCOPY(conshdlrCopyBounddisjunction)
int SCIPgetDepth(SCIP *scip)
SCIP_RETCODE SCIPprintCons(SCIP *scip, SCIP_CONS *cons, FILE *file)
static SCIP_DECL_CONSACTIVE(consActiveBounddisjunction)
SCIP_Bool SCIPstrToRealValue(const char *str, SCIP_Real *value, char **endptr)
static SCIP_RETCODE removeFixedVariables(SCIP *scip, SCIP_CONS *cons, SCIP_EVENTHDLR *eventhdlr, SCIP_Bool *redundant)
SCIP_CONSHDLR * SCIPconsGetHdlr(SCIP_CONS *cons)
SCIP_RETCODE SCIPaddConflictBd(SCIP *scip, SCIP_VAR *var, SCIP_BOUNDTYPE boundtype, SCIP_BDCHGIDX *bdchgidx)
SCIP_Bool SCIPconsIsDeleted(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsChecked(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsInitial(SCIP_CONS *cons)
SCIP_Real SCIPcomputeVarLbGlobal(SCIP *scip, SCIP_VAR *var)
SCIP_RETCODE SCIPdropVarEvent(SCIP *scip, SCIP_VAR *var, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int filterpos)
SCIP_Real SCIPbdchginfoGetNewbound(SCIP_BDCHGINFO *bdchginfo)
SCIP_Real SCIPcalcNodeselPriority(SCIP *scip, SCIP_VAR *var, SCIP_BRANCHDIR branchdir, SCIP_Real targetvalue)
SCIP_RETCODE SCIPaddExternBranchCand(SCIP *scip, SCIP_VAR *var, SCIP_Real score, SCIP_Real solval)
static SCIP_DECL_CONSRESPROP(consRespropBounddisjunction)
#define BMScopyMemoryArray(ptr, source, num)
int SCIPgetNRuns(SCIP *scip)
static SCIP_RETCODE checkCons(SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_Bool *violated)
SCIP_RETCODE SCIPlockVarCons(SCIP *scip, SCIP_VAR *var, SCIP_CONS *cons, SCIP_Bool lockdown, SCIP_Bool lockup)
SCIP_RETCODE SCIPsetConshdlrPrint(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPRINT((*consprint)))
static SCIP_DECL_CONSPRESOL(consPresolBounddisjunction)
#define SCIP_EVENTTYPE_UBTIGHTENED
Constraint handler for linear constraints in their most general form, .
SCIP_Longint SCIPgetNConflictConssApplied(SCIP *scip)
SCIP_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)
SCIP_RETCODE SCIPcreateConsLogicor(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)
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)
SCIP_Real SCIPcalcChildEstimate(SCIP *scip, SCIP_VAR *var, SCIP_Real targetvalue)
SCIP_Bool SCIPinProbing(SCIP *scip)
SCIP_RETCODE SCIPvarGetProbvarBound(SCIP_VAR **var, SCIP_Real *bound, SCIP_BOUNDTYPE *boundtype)
static SCIP_Bool isLiteralViolated(SCIP *scip, SCIP_CONSDATA *consdata, int pos)
#define isFeasLE(scip, var, val1, val2)
static SCIP_DECL_CONSENFOPS(consEnfopsBounddisjunction)
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 SCIPsetConshdlrExitpre(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSEXITPRE((*consexitpre)))
int SCIPgetNLinearVarsQuadratic(SCIP *scip, SCIP_CONS *cons)
static SCIP_RETCODE createNAryBranch(SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol)
SCIP_Bool SCIPisGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
static SCIP_RETCODE upgradeCons(SCIP *scip, SCIP_CONS *cons, int *ndelconss, int *naddconss)
SCIP_Bool SCIPisIntegral(SCIP *scip, SCIP_Real val)
SCIP_RETCODE SCIPgetVarCopy(SCIP *sourcescip, SCIP *targetscip, SCIP_VAR *sourcevar, SCIP_VAR **targetvar, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, SCIP_Bool global, SCIP_Bool *success)
SCIP_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_RETCODE unlockRounding(SCIP *scip, SCIP_CONS *cons, SCIP_CONSDATA *consdata, int pos)
SCIP_Bool SCIPisConsCompressionEnabled(SCIP *scip)
SCIP_RETCODE SCIPreleaseCons(SCIP *scip, SCIP_CONS **cons)
const char * SCIPconflicthdlrGetName(SCIP_CONFLICTHDLR *conflicthdlr)
SCIP_RETCODE SCIPsetConshdlrPresol(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPRESOL((*conspresol)), int maxprerounds, SCIP_PRESOLTIMING presoltiming)
SCIP_VARSTATUS SCIPvarGetStatus(SCIP_VAR *var)
SCIP_Bool SCIPconsIsModifiable(SCIP_CONS *cons)
static SCIP_DECL_CONSPROP(consPropBounddisjunction)
SCIP_Bool SCIPisStopped(SCIP *scip)
SCIP_RETCODE SCIPsetConshdlrGetNVars(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSGETNVARS((*consgetnvars)))
SCIP_Bool SCIPconsIsEnforced(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsSeparated(SCIP_CONS *cons)
static void consdataPrint(SCIP *scip, SCIP_CONSDATA *consdata, FILE *file, SCIP_Bool endline)
SCIP_VARTYPE SCIPvarGetType(SCIP_VAR *var)
SCIP_RETCODE SCIPcreateConsBounddisjunction(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_BOUNDTYPE *boundtypes, SCIP_Real *bounds, 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)
static SCIP_RETCODE consdataCreate(SCIP *scip, SCIP_CONSDATA **consdata, int nvars, SCIP_VAR **vars, SCIP_BOUNDTYPE *boundtypes, SCIP_Real *bounds)
SCIP_Bool SCIPisZero(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
struct SCIP_ConshdlrData SCIP_CONSHDLRDATA
static SCIP_DECL_CONSCOPY(consCopyBounddisjunction)
SCIP_Real SCIPvarGetUbLocal(SCIP_VAR *var)
static SCIP_DECL_CONSEXITPRE(consExitpreBounddisjunction)
#define SCIPfreeBlockMemoryArrayNull(scip, ptr, num)
SCIP_Bool SCIPvarIsTransformed(SCIP_VAR *var)
SCIP_BOUNDTYPE SCIPbdchginfoGetBoundtype(SCIP_BDCHGINFO *bdchginfo)
SCIP_RETCODE SCIPsetConshdlrActive(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSACTIVE((*consactive)))
SCIP_QUADVARTERM * SCIPgetQuadVarTermsQuadratic(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPaddConflict(SCIP *scip, SCIP_NODE *node, SCIP_CONS *cons, SCIP_NODE *validnode, SCIP_CONFTYPE conftype, SCIP_Bool iscutoffinvolved)
static SCIP_DECL_CONFLICTFREE(conflictFreeBounddisjunction)
static SCIP_DECL_CONFLICTEXEC(conflictExecBounddisjunction)
SCIP_CONFLICTHDLRDATA * SCIPconflicthdlrGetData(SCIP_CONFLICTHDLR *conflicthdlr)
constraint handler for bound disjunction constraints
#define CONFLICTHDLR_NAME
static SCIP_DECL_CONSPRINT(consPrintBounddisjunction)
static SCIP_DECL_EVENTEXEC(eventExecBounddisjunction)
#define CONSHDLR_MAXPREROUNDS
SCIP_Bool SCIPvarIsIntegral(SCIP_VAR *var)
#define CONSHDLR_PRESOLTIMING
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)
#define DEFAULT_CONTINUOUSFRAC
SCIP_RETCODE SCIPgetNegatedVar(SCIP *scip, SCIP_VAR *var, SCIP_VAR **negvar)
static SCIP_DECL_CONSDEACTIVE(consDeactiveBounddisjunction)
static SCIP_RETCODE switchWatchedvars(SCIP *scip, SCIP_CONS *cons, SCIP_EVENTHDLR *eventhdlr, int watchedvar1, int watchedvar2)
SCIP_Bool SCIPvarIsActive(SCIP_VAR *var)
#define SCIPreallocBufferArray(scip, ptr, num)
SCIP_RETCODE SCIPsetConshdlrProp(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPROP((*consprop)), int propfreq, SCIP_Bool delayprop, SCIP_PROPTIMING proptiming)
static SCIP_DECL_CONSLOCK(consLockBounddisjunction)
#define SCIP_EVENTTYPE_BOUNDRELAXED