49 #define CONSHDLR_NAME "and" 50 #define CONSHDLR_DESC "constraint handler for AND-constraints: r = and(x1, ..., xn)" 51 #define CONSHDLR_SEPAPRIORITY +850100 52 #define CONSHDLR_ENFOPRIORITY -850100 53 #define CONSHDLR_CHECKPRIORITY -850100 54 #define CONSHDLR_SEPAFREQ 1 55 #define CONSHDLR_PROPFREQ 1 56 #define CONSHDLR_EAGERFREQ 100 58 #define CONSHDLR_MAXPREROUNDS -1 59 #define CONSHDLR_DELAYSEPA FALSE 60 #define CONSHDLR_DELAYPROP FALSE 61 #define CONSHDLR_NEEDSCONS TRUE 63 #define CONSHDLR_PRESOLTIMING (SCIP_PRESOLTIMING_FAST | SCIP_PRESOLTIMING_EXHAUSTIVE) 64 #define CONSHDLR_PROP_TIMING SCIP_PROPTIMING_BEFORELP 66 #define EVENTHDLR_NAME "and" 67 #define EVENTHDLR_DESC "bound change event handler for AND-constraints" 69 #define DEFAULT_PRESOLPAIRWISE TRUE 70 #define DEFAULT_LINEARIZE FALSE 71 #define DEFAULT_ENFORCECUTS TRUE 72 #define DEFAULT_AGGRLINEARIZATION FALSE 73 #define DEFAULT_UPGRRESULTANT TRUE 74 #define DEFAULT_DUALPRESOLVING TRUE 76 #define HASHSIZE_ANDCONS 500 77 #define DEFAULT_PRESOLUSEHASHING TRUE 78 #define NMINCOMPARISONS 200000 79 #define MINGAINPERNMINCOMPARISONS 1e-06 80 #define EXPRGRAPHREFORM_PRIORITY 100000 102 unsigned int propagated:1;
103 unsigned int nofixedzero:1;
104 unsigned int impladded:1;
105 unsigned int opimpladded:1;
106 unsigned int sorted:1;
107 unsigned int changed:1;
108 unsigned int merged:1;
109 unsigned int checkwhenupgr:1;
112 unsigned int notremovablewhenupgr:1;
118 struct SCIP_ConshdlrData
186 assert(scip !=
NULL);
187 assert(conshdlrdata !=
NULL);
188 assert(eventhdlr !=
NULL);
193 (*conshdlrdata)->eventhdlr = eventhdlr;
205 assert(conshdlrdata !=
NULL);
206 assert(*conshdlrdata !=
NULL);
223 assert(consdata !=
NULL);
224 assert(consdata->vars !=
NULL);
225 assert(eventhdlr !=
NULL);
226 assert(0 <= pos && pos < consdata->nvars);
227 assert(filterpos !=
NULL);
247 assert(consdata !=
NULL);
248 assert(consdata->vars !=
NULL);
249 assert(eventhdlr !=
NULL);
250 assert(0 <= pos && pos < consdata->nvars);
251 assert(filterpos >= 0);
270 assert(consdata !=
NULL);
277 for( i = 0; i < consdata->nvars; ++i )
296 assert(consdata !=
NULL);
303 for( i = 0; i < consdata->nvars; ++i )
322 assert(consdata !=
NULL);
323 assert(watchedvar1 == -1 || watchedvar1 != watchedvar2);
324 assert(watchedvar1 != -1 || watchedvar2 == -1);
325 assert(watchedvar1 == -1 || (0 <= watchedvar1 && watchedvar1 < consdata->nvars));
326 assert(watchedvar2 == -1 || (0 <= watchedvar2 && watchedvar2 < consdata->nvars));
329 if( watchedvar1 == consdata->watchedvar2 || watchedvar2 == consdata->watchedvar1 )
333 tmp = consdata->watchedvar1;
334 consdata->watchedvar1 = consdata->watchedvar2;
335 consdata->watchedvar2 = tmp;
336 tmp = consdata->filterpos1;
337 consdata->filterpos1 = consdata->filterpos2;
338 consdata->filterpos2 = tmp;
340 assert(watchedvar1 == -1 || watchedvar1 != consdata->watchedvar2);
341 assert(watchedvar2 == -1 || watchedvar2 != consdata->watchedvar1);
344 if( consdata->watchedvar1 != -1 && consdata->watchedvar1 != watchedvar1 )
346 assert(consdata->filterpos1 != -1);
349 if( consdata->watchedvar2 != -1 && consdata->watchedvar2 != watchedvar2 )
351 assert(consdata->filterpos2 != -1);
356 if( watchedvar1 != -1 && watchedvar1 != consdata->watchedvar1 )
360 if( watchedvar2 != -1 && watchedvar2 != consdata->watchedvar2 )
366 consdata->watchedvar1 = watchedvar1;
367 consdata->watchedvar2 = watchedvar2;
380 assert(consdata !=
NULL);
381 assert(consdata->nvars <= consdata->varssize);
383 if( num > consdata->varssize )
389 consdata->varssize = newsize;
391 assert(num <= consdata->varssize);
415 assert(consdata !=
NULL);
416 assert(nvars == 0 || vars !=
NULL);
417 assert(resvar !=
NULL);
421 (*consdata)->resvar = resvar;
422 (*consdata)->rows =
NULL;
423 (*consdata)->aggrrow =
NULL;
424 (*consdata)->nvars = nvars;
425 (*consdata)->varssize = nvars;
426 (*consdata)->nrows = 0;
427 (*consdata)->watchedvar1 = -1;
428 (*consdata)->watchedvar2 = -1;
429 (*consdata)->filterpos1 = -1;
430 (*consdata)->filterpos2 = -1;
431 (*consdata)->propagated =
FALSE;
432 (*consdata)->nofixedzero =
FALSE;
433 (*consdata)->impladded =
FALSE;
434 (*consdata)->opimpladded =
FALSE;
435 (*consdata)->sorted =
FALSE;
436 (*consdata)->changed =
TRUE;
437 (*consdata)->merged =
FALSE;
438 (*consdata)->checkwhenupgr = checkwhenupgr;
439 (*consdata)->notremovablewhenupgr = notremovablewhenupgr;
458 for( v = 0; v < (*consdata)->nvars; ++v )
460 assert((*consdata)->vars[v] !=
NULL);
468 for( v = 0; v < (*consdata)->nvars; v++ )
470 assert((*consdata)->vars[v] !=
NULL);
488 assert(consdata !=
NULL);
490 if( consdata->rows !=
NULL )
492 for( r = 0; r < consdata->nrows; ++r )
501 if( consdata->aggrrow !=
NULL )
504 consdata->aggrrow =
NULL;
520 assert(consdata !=
NULL);
521 assert(*consdata !=
NULL);
533 assert((*consdata)->watchedvar1 == -1);
534 assert((*consdata)->watchedvar2 == -1);
541 for( v = 0; v < (*consdata)->nvars; v++ )
543 assert((*consdata)->vars[v] !=
NULL);
563 assert(consdata !=
NULL);
595 assert(consdata !=
NULL);
596 assert(consdata->rows ==
NULL);
610 consdata->vars[consdata->nvars] = var;
612 consdata->sorted = (consdata->nvars == 1);
613 consdata->changed =
TRUE;
614 consdata->merged =
FALSE;
631 if( consdata->rows !=
NULL )
633 SCIPerrorMessage(
"cannot add coefficients to AND-constraint after LP relaxation was created\n");
651 assert(eventhdlr !=
NULL);
654 assert(consdata !=
NULL);
655 assert(0 <= pos && pos < consdata->nvars);
671 if( consdata->watchedvar1 == pos )
675 if( consdata->watchedvar2 == pos )
680 assert(pos != consdata->watchedvar1);
681 assert(pos != consdata->watchedvar2);
687 consdata->vars[pos] = consdata->vars[consdata->nvars-1];
691 if( consdata->watchedvar1 == consdata->nvars )
692 consdata->watchedvar1 = pos;
693 if( consdata->watchedvar2 == consdata->nvars )
694 consdata->watchedvar2 = pos;
696 consdata->propagated =
FALSE;
697 consdata->sorted =
FALSE;
698 consdata->changed =
TRUE;
709 assert(consdata !=
NULL);
711 if( !consdata->sorted )
713 if( consdata->nvars <= 1 )
714 consdata->sorted =
TRUE;
721 if( consdata->watchedvar1 != -1 )
723 var1 = consdata->vars[consdata->watchedvar1];
724 assert(var1 !=
NULL);
725 consdata->watchedvar1 = -1;
726 if( consdata->watchedvar2 != -1 )
728 var2 = consdata->vars[consdata->watchedvar2];
729 assert(var2 !=
NULL);
730 consdata->watchedvar2 = -1;
733 assert(consdata->watchedvar1 == -1);
734 assert(consdata->watchedvar2 == -1);
735 assert(var1 !=
NULL || var2 ==
NULL);
738 SCIPsortPtr((
void**)consdata->vars, SCIPvarComp, consdata->nvars);
739 consdata->sorted =
TRUE;
748 found =
SCIPsortedvecFindPtr((
void**)consdata->vars, SCIPvarComp, (
void*)var1, consdata->nvars, &pos);
753 assert(pos >= 0 && pos < consdata->nvars);
754 consdata->watchedvar1 = pos;
759 found =
SCIPsortedvecFindPtr((
void**)consdata->vars, SCIPvarComp, (
void*)var2, consdata->nvars, &pos);
764 assert(pos >= 0 && pos < consdata->nvars);
765 consdata->watchedvar2 = pos;
776 for( v = 0; v < consdata->nvars; ++v )
778 assert(v == consdata->nvars-1 ||
SCIPvarCompare(consdata->vars[v], consdata->vars[v+1]) <= 0);
797 assert(scip !=
NULL);
798 assert(cons !=
NULL);
799 assert(eventhdlr !=
NULL);
800 assert(nchgcoefs !=
NULL);
803 assert(consdata !=
NULL);
804 assert(consdata->nvars == 0 || consdata->vars !=
NULL);
807 while( v < consdata->nvars )
809 var = consdata->vars[v];
840 #ifdef SCIP_DISABLED_CODE 852 if( repvar != consdata->resvar )
871 consdata->resvar = repvar;
872 consdata->changed =
TRUE;
897 assert(consdata !=
NULL);
898 assert(consdata->rows ==
NULL);
900 nvars = consdata->nvars;
903 consdata->nrows = nvars + 1;
919 for( i = 0; i < nvars; ++i )
951 assert(consdata !=
NULL);
954 if( consdata->aggrrow ==
NULL )
973 if( consdata->rows ==
NULL )
979 assert(consdata->rows !=
NULL);
1006 assert(violated !=
NULL);
1009 assert(consdata !=
NULL);
1014 mustcheck = checklprows;
1015 mustcheck = mustcheck || (consdata->rows ==
NULL);
1018 assert(consdata->rows !=
NULL);
1020 for( r = 0; r < consdata->nrows; ++r )
1043 for( i = 0; i < consdata->nvars; ++i )
1087 else if( i == consdata->nvars )
1118 assert(separated !=
NULL);
1119 assert(cutoff !=
NULL);
1125 assert(consdata !=
NULL);
1128 if( consdata->rows ==
NULL )
1132 assert(consdata->rows !=
NULL);
1135 for( r = 0; r < consdata->nrows; ++r )
1168 assert(consdata !=
NULL);
1170 assert(0 <= falsepos && falsepos < consdata->nvars);
1202 assert(consdata !=
NULL);
1209 for( v = 0; v < consdata->nvars; ++v )
1235 SCIPdebugMsg(scip,
"constraint <%s>: operator %d fixed to 0.0 -> fix resultant <%s> to 0.0\n",
1275 for( v = 0; v < nvars && !(*cutoff); ++v )
1277 SCIPdebugMsg(scip,
"constraint <%s>: resultant fixed to 1.0 -> fix operator var <%s> to 1.0\n",
1289 else if( tightened )
1331 assert(consdata !=
NULL);
1336 nvars = consdata->nvars;
1337 conscreated =
FALSE;
1361 else if( tightened )
1370 else if( tightened )
1390 for( v = 0; v < nvars; ++v )
1439 assert(consdata !=
NULL);
1442 if( watchedvar2 == -1 )
1447 assert(watchedvar1 != -1);
1454 for( v = consdata->nvars - 1; v >= 0; --v )
1455 if( v != watchedvar1 )
1460 SCIPdebugMsg(scip,
"constraint <%s>: resultant <%s> fixed to 0.0, only one unfixed operand -> fix operand <%s> to 0.0\n",
1492 unsigned char** entries,
1512 assert(scip !=
NULL);
1513 assert(cons !=
NULL);
1514 assert(eventhdlr !=
NULL);
1515 assert(*entries !=
NULL);
1516 assert(nentries !=
NULL);
1517 assert(nfixedvars !=
NULL);
1518 assert(nchgcoefs !=
NULL);
1519 assert(ndelconss !=
NULL);
1522 assert(consdata !=
NULL);
1524 if( consdata->merged )
1528 if( consdata->nvars <= 1 )
1530 consdata->merged =
TRUE;
1534 vars = consdata->vars;
1535 nvars = consdata->nvars;
1537 assert(vars !=
NULL);
1544 assert(*nentries >= nbinvars + nintvars + nimplvars);
1548 for( v = nvars - 1; v >= 0; --v )
1551 assert(var !=
NULL);
1555 assert(probvar !=
NULL);
1558 assert(0 <= probidx);
1564 (probidx >= nbinvars + nintvars && probidx < nbinvars + nintvars + nimplvars &&
1568 (*entries)[probidx] = 0;
1575 for( v = nvars - 1; v >= 0; --v )
1578 assert(var !=
NULL);
1582 assert(probvar !=
NULL);
1585 assert(0 <= probidx && probidx < *nentries);
1588 if( (*entries)[probidx] == 0 )
1606 SCIPdebugMsg(scip,
"AND-constraint <%s> is redundant: variable <%s> and its negation are present -> fix resultant <%s> = 0\n",
1620 assert(!infeasible);
1629 consdata->merged =
TRUE;
1664 assert(cutoff !=
NULL);
1665 assert(nfixedvars !=
NULL);
1668 assert(consdata !=
NULL);
1670 resvar = consdata->resvar;
1671 vars = consdata->vars;
1672 nvars = consdata->nvars;
1677 if( consdata->propagated )
1679 assert(consdata->nofixedzero);
1691 if( !consdata->nofixedzero )
1693 for( i = 0; i < nvars && SCIPvarGetUbLocal(vars[i]) > 0.5; ++i )
1701 consdata->nofixedzero =
TRUE;
1742 watchedvar1 = consdata->watchedvar1;
1743 watchedvar2 = consdata->watchedvar2;
1746 if( watchedvar1 != -1 )
1752 if( watchedvar2 != -1 )
1760 if( watchedvar1 == -1 )
1762 watchedvar1 = watchedvar2;
1765 assert(watchedvar1 != -1 || watchedvar2 == -1);
1768 if( watchedvar2 == -1 )
1770 for( i = 0; i < nvars; ++i )
1775 if( watchedvar1 == -1 )
1777 assert(watchedvar2 == -1);
1780 else if( watchedvar1 != i )
1788 assert(watchedvar1 != -1 || watchedvar2 == -1);
1791 if( watchedvar1 == -1 )
1793 assert(watchedvar2 == -1);
1795 SCIPdebugMsg(scip,
"constraint <%s>: all operator vars fixed to 1.0 -> fix resultant <%s> to 1.0\n",
1824 assert(watchedvar1 != -1);
1864 assert(result !=
NULL);
1867 assert(consdata !=
NULL);
1868 vars = consdata->vars;
1869 nvars = consdata->nvars;
1876 assert(infervar == consdata->resvar);
1877 for( i = 0; i < nvars; ++i )
1900 assert(infervar == consdata->resvar);
1901 for( i = 0; i < nvars; ++i )
1914 for( i = 0; i < nvars; ++i )
1916 if( vars[i] != infervar )
1941 unsigned char** entries,
1966 assert(scip !=
NULL);
1967 assert(conss !=
NULL || nconss == 0);
1968 assert(eventhdlr !=
NULL);
1969 assert(*entries !=
NULL);
1970 assert(nentries !=
NULL);
1971 assert(cutoff !=
NULL);
1972 assert(nfixedvars !=
NULL);
1973 assert(naggrvars !=
NULL);
1974 assert(nchgcoefs !=
NULL);
1975 assert(ndelconss !=
NULL);
1976 assert(nupgdconss !=
NULL);
1977 assert(naddconss !=
NULL);
1982 assert(conss !=
NULL);
1988 for( c = nconss - 1; c >= 0 && !(*cutoff); --c )
1991 assert(cons !=
NULL);
2014 assert(consdata !=
NULL);
2016 vars = consdata->vars;
2017 nvars = consdata->nvars;
2018 assert(vars !=
NULL || nvars == 0);
2023 assert(vars !=
NULL);
2025 resvar = consdata->resvar;
2026 assert(resvar !=
NULL);
2038 int oldnfixedvars = *nfixedvars;
2039 int oldnaggrvars = *naggrvars;
2044 for( v = nvars - 1; v >= 0; --v )
2047 assert(var !=
NULL);
2052 impoperands[nimpoperands] = var;
2065 maxpos = nimpoperands - 1;
2070 assert(nimpoperands >= 0 && nimpoperands <= nvars);
2073 if( nimpoperands == 0 )
2087 if( nimpoperands == nvars && poscontissmall )
2093 *cutoff = *cutoff || infeasible;
2098 for( v = nvars - 1; v >= 0 && !(*cutoff); --v )
2102 *cutoff = *cutoff || infeasible;
2117 assert(nimpoperands > 0);
2119 SCIPdebugMsg(scip,
"dual-fixing all variables in constraint <%s> with positive contribution (when together exceeding the negative contribution of the resultant) to 0 and with negative contribution to 1\n",
SCIPconsGetName(cons));
2121 for( v = nimpoperands - 1; v >= 0 && !(*cutoff); --v )
2130 *cutoff = *cutoff || infeasible;
2134 else if( !poscontissmall )
2137 assert(!infeasible);
2150 &infeasible, &redundant, &aggregated) );
2151 assert(!infeasible);
2158 aggregationperformed =
TRUE;
2164 assert(*nfixedvars - oldnfixedvars + *naggrvars - oldnaggrvars <= nimpoperands);
2169 if( aggregationperformed || zerofix )
2184 if( fixval < 0.5 || *nfixedvars - oldnfixedvars + *naggrvars - oldnaggrvars == nvars )
2189 assert(!infeasible);
2209 assert(nimpoperands > 0);
2210 assert(maxpos >= 0 && maxpos <= consdata->nvars);
2213 assert(
SCIPisEQ(scip, tmpobj, maxobj));
2219 if( nimpoperands == nvars &&
SCIPisLE(scip, maxobj, 0.0) )
2223 SCIPdebugMsg(scip,
"dual-fixing variable <%s> in constraint <%s> to %g, because the contribution is%s enough to nullify/exceed the contribution of the resultant \n",
SCIPvarGetName(impoperands[maxpos]),
SCIPconsGetName(cons), fixval, (fixval < 0.5) ?
" not" :
"");
2226 zerofix = (fixval < 0.5);
2228 *cutoff = *cutoff || infeasible;
2233 SCIPdebugMsg(scip,
"dual-fixing all variables, except the variable with the highest contribution to the objective, in constraint <%s> with positive contribution to 0 and with negative contribution to 1\n",
SCIPconsGetName(cons));
2235 for( v = nimpoperands - 1; v >= 0 && !(*cutoff); --v )
2253 *cutoff = *cutoff || infeasible;
2257 assert(*nfixedvars - oldnfixedvars <= nimpoperands);
2259 assert((*nfixedvars - oldnfixedvars == nvars) == (nimpoperands == nvars));
2261 if( *nfixedvars - oldnfixedvars == nvars )
2267 *cutoff = *cutoff || infeasible;
2290 int oldnchgcoefs = *nchgcoefs;
2291 int oldnfixedvars = *nfixedvars;
2297 resobjispos =
SCIPisGT(scip, resobj, 0.0);
2304 for( v = nvars - 1; v >= 0; --v )
2307 assert(var !=
NULL);
2322 &infeasible, &redundant, &aggregated) );
2337 *cutoff = *cutoff || infeasible;
2340 goodvarsfound =
TRUE;
2343 assert(*nchgcoefs - oldnchgcoefs <= nvars);
2355 if( !*cutoff && goodvarsfound && linearize )
2358 for( v = consdata->nvars - 1; v >= 0; --v )
2361 assert(var !=
NULL);
2374 assert(!infeasible);
2379 assert(*nfixedvars - oldnfixedvars <= consdata->nvars);
2381 assert(*nchgcoefs - oldnchgcoefs + *nfixedvars - oldnfixedvars <= nvars);
2391 for( v = nvars - 1; v >= 0; --v )
2394 assert(var !=
NULL);
2420 *cutoff = *cutoff || infeasible;
2427 assert(*nchgcoefs - oldnchgcoefs <= nvars);
2432 if( !zerofix && locksareone &&
SCIPisGE(scip, resobj,
REALABS(maxobj)) )
2436 assert(
SCIPisLT(scip, maxobj, 0.0));
2442 *cutoff = *cutoff || infeasible;
2456 *cutoff = *cutoff || infeasible;
2460 SCIPdebugMsg(scip,
"deleting constraint <%s> because at least one operand and the resultant is fixed to zero\n",
SCIPconsGetName(cons));
2480 consvars[0] = consdata->resvar;
2485 for( v = consdata->nvars - 1; v >= 0; --v )
2488 consvars[1] = consdata->vars[v];
2500 (*naddconss) += consdata->nvars;
2508 else if( consdata->nvars == 1 )
2514 &infeasible, &redundant, &aggregated) );
2519 *cutoff = *cutoff || infeasible;
2599 assert(scip !=
NULL);
2600 assert(cons !=
NULL);
2601 assert(eventhdlr !=
NULL);
2602 assert(cutoff !=
NULL);
2603 assert(nfixedvars !=
NULL);
2604 assert(naggrvars !=
NULL);
2605 assert(nchgcoefs !=
NULL);
2606 assert(ndelconss !=
NULL);
2607 assert(naddconss !=
NULL);
2610 assert(consdata !=
NULL);
2615 vars = consdata->vars;
2616 nvars = consdata->nvars;
2617 assert(vars !=
NULL || nvars == 0);
2624 for( v = nvars - 1; v >= 0; --v )
2626 assert(vars !=
NULL);
2630 SCIPdebugMsg(scip,
"In constraint <%s> the operand <%s> is fixed to 1 so remove it from the constraint\n",
2637 assert(consdata->vars == vars);
2643 SCIPdebugMsg(scip,
"constraint <%s> redundant: because operand <%s> is fixed to zero so we can fix the resultant <%s> to 0\n",
2647 *cutoff = *cutoff || infeasible;
2659 if( consdata->nvars < nvars )
2661 assert(vars == consdata->vars);
2666 if( consdata->nvars == 0 )
2668 SCIPdebugMsg(scip,
"All operand in constraint <%s> were deleted, so the resultant needs to be fixed to 1\n",
2672 *cutoff = *cutoff || infeasible;
2682 else if( consdata->nvars == 1 )
2689 &infeasible, &redundant, &aggregated) );
2697 *cutoff = *cutoff || infeasible;
2702 nvars = consdata->nvars;
2710 for( v = nvars - 1; v > 0; --v )
2712 assert(vars !=
NULL);
2715 assert(var1 !=
NULL);
2719 assert(var1 !=
NULL);
2728 for( v2 = v - 1; v2 >= 0; --v2 )
2731 assert(var2 !=
NULL);
2735 assert(var2 !=
NULL);
2757 SCIPdebugMsg(scip,
"constraint <%s> redundant: because variable <%s> and variable <%s> are in a clique, the resultant <%s> can be fixed to 0\n",
2761 *cutoff = *cutoff || infeasible;
2802 var1 = consdata->resvar;
2803 assert(var1 !=
NULL);
2807 assert(var1 !=
NULL);
2815 SCIPdebugMsg(scip,
"In constraint <%s> the resultant <%s> is fixed to 1 so fix all operands to 1\n",
2819 for( v = nvars - 1; v >= 0 && !(*cutoff); --v )
2821 assert(vars !=
NULL);
2826 *cutoff = *cutoff || infeasible;
2849 for( v = nvars - 1; v >= 0; --v )
2851 assert(vars !=
NULL);
2854 assert(var2 !=
NULL);
2858 assert(var2 !=
NULL);
2871 if( value1 != value2 )
2873 SCIPdebugMsg(scip,
"In constraint <%s> the resultant <%s> can be fixed to 0 because the negation of it is an operand.\n",
2877 *cutoff = *cutoff || infeasible;
2891 assert(value1 == value2);
2893 consvars[0] = consdata->resvar;
2895 for( v2 = nvars - 1; v2 >= 0; --v2 )
2913 if( value1 == negated )
2915 SCIPdebugMsg(scip,
"In constraint <%s> the resultant <%s> can be fixed to 0 because the negation of it is an operand.\n",
2919 *cutoff = *cutoff || infeasible;
2930 assert(consvars[1] !=
NULL);
2958 if( var1 == var2 && value1 == value2 )
2966 SCIPdebugMsg(scip,
"in constraint <%s> the resultant <%s> can be fixed to 0 because it is in a clique with operand <%s>\n",
2970 *cutoff = *cutoff || infeasible;
2983 for( v = nvars - 1; v >= 0; --v )
2985 assert(vars !=
NULL);
2988 assert(var1 !=
NULL);
2992 assert(var1 !=
NULL);
3002 allnegoperandsexist =
FALSE;
3007 allnegoperandsexist =
TRUE;
3012 else if( v2 >= 0 && v == -1 )
3026 for( v = vstart; v >= vend; --v )
3028 assert(vars !=
NULL);
3031 assert(var1 !=
NULL);
3035 assert(var1 !=
NULL);
3042 for( v2 = nvars - 1; v2 >= 0; --v2 )
3048 assert(var2 !=
NULL);
3052 assert(var2 !=
NULL);
3067 if( var1 == var2 && value1 == value2 )
3069 SCIPdebugMsg(scip,
"in constraint <%s> the resultant <%s> can be fixed to 0 because two operands are negated of each other\n",
3073 *cutoff = *cutoff || infeasible;
3083 if( var1 == var2 && value1 != value2 )
3095 SCIPdebugMsg(scip,
"In constraint <%s> the operand <%s> is in a negated clique with all other operands, so we can aggregated this operand to the resultant <%s>.\n",
3099 &infeasible, &redundant, &aggregated) );
3100 *cutoff = *cutoff || infeasible;
3123 var1 = consdata->resvar;
3125 assert(var1 !=
NULL);
3128 newvars[nvars] = var1;
3131 for( v = nvars - 1; v >= 0; --v )
3133 assert(vars !=
NULL);
3137 assert(var1 !=
NULL);
3143 assert(newvars[v] != newvars[nvars]);
3150 for( v = nvars - 1; v >= 0 && upgrade; --v )
3152 for( v2 = v - 1; v2 >= 0; --v2 )
3170 if( negations[nvars] )
3178 assert(newvars[nvars] !=
NULL);
3180 for( v = nvars - 1; v >= 0; --v )
3190 assert(newvars[v] !=
NULL);
3200 SCIPdebugMsg(scip,
" -> upgrading AND-constraint <%s> with use of clique information to a set-partitioning constraint: \n",
SCIPconsGetName(cons));
3237 scip = (
SCIP*)userptr;
3238 assert(scip !=
NULL);
3245 if( consdata1->nvars != consdata2->nvars )
3251 assert(consdata1->sorted);
3252 assert(consdata2->sorted);
3256 for( i = 0; i < consdata1->nvars ; ++i )
3259 if( consdata1->vars[i] != consdata2->vars[i] )
3261 assert(
SCIPvarCompare(consdata1->vars[i], consdata2->vars[i]) == 1 ||
3266 assert(
SCIPvarCompare(consdata1->vars[i], consdata2->vars[i]) == 0);
3282 assert(consdata !=
NULL);
3283 assert(consdata->sorted);
3284 assert(consdata->nvars > 0);
3289 assert(minidx >= 0 && minidx <= maxidx);
3314 assert(conss !=
NULL);
3315 assert(ndelconss !=
NULL);
3318 hashtablesize = nconss;
3321 hashGetKeyAndcons, hashKeyEqAndcons, hashKeyValAndcons, (
void*) scip) );
3326 for( c = 0; c < nconss; ++c )
3341 assert(consdata0->sorted);
3356 assert(consdata1 !=
NULL);
3357 assert(consdata0->nvars >= 1 && consdata0->nvars == consdata1->nvars);
3359 assert(consdata0->sorted && consdata1->sorted);
3360 assert(consdata0->vars[0] == consdata1->vars[0]);
3364 if( consdata0->resvar != consdata1->resvar )
3368 assert(
SCIPvarCompare(consdata0->resvar, consdata1->resvar) != 0);
3372 cutoff, &redundant, &aggregated) );
3390 consdata1->checkwhenupgr = consdata1->checkwhenupgr || consdata0->checkwhenupgr;
3391 consdata1->notremovablewhenupgr = consdata1->notremovablewhenupgr || consdata0->notremovablewhenupgr;
3436 assert(conshdlrdata !=
NULL);
3439 for( i = 0; i < nconss; i++ )
3444 if( conshdlrdata->enforcecuts )
3454 separated = separated || consseparated;
3464 #ifdef SCIP_DISABLED_CODE 3465 assert(consseparated);
3505 assert(conss !=
NULL);
3506 assert(firstchange <= chkind);
3507 assert(cutoff !=
NULL);
3508 assert(naggrvars !=
NULL);
3509 assert(nbdchgs !=
NULL);
3510 assert(ndelconss !=
NULL);
3513 cons0 = conss[chkind];
3522 assert(consdata0->nvars >= 1);
3523 assert(consdata0->sorted);
3526 cons0changed = consdata0->changed;
3530 for( c = (cons0changed ? 0 : firstchange); c < chkind && !(*cutoff); ++c )
3549 assert(consdata1 !=
NULL);
3551 #ifdef SCIP_DISABLED_CODE 3552 SCIPdebugMsg(scip,
"preprocess AND-constraint pair <%s>[chg:%d] and <%s>[chg:%d]\n",
3557 if( !cons0changed && !consdata1->changed )
3560 assert(consdata1->nvars >= 1);
3564 assert(consdata1->sorted);
3572 cons0superset =
TRUE;
3573 cons1superset =
TRUE;
3574 while( (v0 < consdata0->nvars || v1 < consdata1->nvars) && (cons0superset || cons1superset) )
3579 if( v0 < consdata0->nvars && v1 < consdata1->nvars )
3580 varcmp =
SCIPvarCompare(consdata0->vars[v0], consdata1->vars[v1]);
3581 else if( v0 < consdata0->nvars )
3590 cons1superset =
FALSE;
3596 cons0superset =
FALSE;
3614 if( cons0superset && cons1superset )
3621 SCIPdebugMsg(scip,
"equivalent AND-constraints <%s> and <%s>: aggregate resultants <%s> == <%s>\n",
3627 &infeasible, &redundant, &aggregated) );
3642 consdata0->checkwhenupgr = consdata1->checkwhenupgr || consdata0->checkwhenupgr;
3643 consdata0->notremovablewhenupgr = consdata1->notremovablewhenupgr || consdata0->notremovablewhenupgr;
3650 *cutoff = *cutoff || infeasible;
3652 else if( cons0superset )
3658 SCIPdebugMsg(scip,
"AND-constraint <%s> is superset of <%s>: add implication <%s> = 1 -> <%s> = 1\n",
3664 &infeasible, &nboundchgs) );
3665 *cutoff = *cutoff || infeasible;
3666 (*nbdchgs) += nboundchgs;
3668 else if( cons1superset )
3674 SCIPdebugMsg(scip,
"AND-constraint <%s> is superset of <%s>: add implication <%s> = 1 -> <%s> = 1\n",
3680 &infeasible, &nboundchgs) );
3681 *cutoff = *cutoff || infeasible;
3682 (*nbdchgs) += nboundchgs;
3686 consdata0->changed =
FALSE;
3703 assert(scip !=
NULL);
3704 assert(exprgraph !=
NULL);
3705 assert(node !=
NULL);
3706 assert(naddcons !=
NULL);
3707 assert(reformnode !=
NULL);
3725 if( nchildren <= 2 )
3729 for( c = 0; c < nchildren; ++c )
3742 SCIPdebugMsg(scip,
"reformulate node %p via AND-constraint\n", (
void*)node);
3746 for( c = 0; c < nchildren; ++c )
3761 #ifdef SCIP_DEBUG_SOLUTION 3762 if( SCIPdebugIsMainscip(scip) )
3768 for( c = 0; c < nchildren; ++c )
3771 debugval = debugval && (varval > 0.5);
3800 if( coef != 1.0 || constant != 0.0 )
3805 *reformnode = linnode;
3820 assert(scip !=
NULL);
3821 assert(conshdlr !=
NULL);
3840 assert(conshdlrdata !=
NULL);
3856 assert( scip !=
NULL );
3857 assert( conshdlr !=
NULL );
3858 assert( nconss == 0 || conss !=
NULL );
3861 assert(conshdlrdata !=
NULL);
3863 if( conshdlrdata->linearize )
3881 for( c = 0; c < nconss; ++c )
3884 assert( cons !=
NULL );
3891 assert( consdata !=
NULL );
3892 assert( consdata->resvar !=
NULL );
3894 nvars = consdata->nvars;
3896 if( !conshdlrdata->aggrlinearization )
3898 vars[0] = consdata->resvar;
3903 for( v = 0; v < nvars; ++v )
3906 vars[1] = consdata->vars[v];
3925 for( v = 0; v < nvars; ++v )
3927 vars[v] = consdata->vars[v];
3931 vars[nvars] = consdata->resvar;
3933 if( conshdlrdata->aggrlinearization )
3979 #ifdef GMLGATEPRINTING 4003 unsigned int id = 1;
4021 gmlfile = fopen(fname,
"w");
4023 if( gmlfile ==
NULL )
4037 for( c = nconss - 1; c >= 0; --c )
4046 assert(consdata !=
NULL);
4049 if( consdata->nvars == 0 )
4052 assert(consdata->vars !=
NULL);
4053 assert(consdata->resvar !=
NULL);
4076 for( v = consdata->nvars - 1; v >= 0; --v )
4098 #ifdef SCIP_DISABLED_CODE 4099 for( v = nvars - 1; v >= 0; --v )
4138 for( c = 0; c < nconss; ++c )
4141 assert(consdata !=
NULL);
4157 assert(conshdlrdata !=
NULL);
4174 assert(conshdlrdata !=
NULL);
4177 assert(sourcedata !=
NULL);
4181 sourcedata->nvars, sourcedata->vars, sourcedata->resvar, sourcedata->checkwhenupgr,
4182 sourcedata->notremovablewhenupgr) );
4201 *infeasible =
FALSE;
4203 for( i = 0; i < nconss && !(*infeasible); i++ )
4224 for( c = 0; c < nusefulconss; ++c )
4229 else if ( separated )
4251 for( c = 0; c < nusefulconss; ++c )
4256 else if ( separated )
4293 for( i = 0; i < nconss; i++ )
4318 for( i = 0; i < nconss && (*result ==
SCIP_FEASIBLE || completely); i++ )
4340 assert(conshdlrdata !=
NULL);
4347 for( c = 0; c < nusefulconss && !cutoff; ++c )
4355 else if( nfixedvars > 0 || nupgdconss > 0 )
4371 unsigned char* entries;
4382 assert(result !=
NULL);
4384 oldnfixedvars = *nfixedvars;
4385 oldnaggrvars = *naggrvars;
4386 oldnchgbds = *nchgbds;
4387 oldndelconss = *ndelconss;
4388 oldnupgdconss = *nupgdconss;
4394 assert(conshdlrdata !=
NULL);
4398 firstchange = INT_MAX;
4399 for( c = 0; c < nconss && !cutoff && (c % 1000 != 0 || !
SCIPisStopped(scip)); ++c )
4402 assert(cons !=
NULL);
4404 assert(consdata !=
NULL);
4408 consdata->propagated =
FALSE;
4411 if( firstchange == INT_MAX && consdata->changed )
4425 SCIP_CALL(
mergeMultiples(scip, cons, conshdlrdata->eventhdlr, &entries, &nentries, nfixedvars, nchgcoefs, ndelconss) );
4430 assert(consdata->nvars >= 1);
4433 if( consdata->nvars == 1 )
4440 assert(consdata->vars !=
NULL);
4446 &cutoff, &redundant, &aggregated) );
4462 else if( !consdata->impladded )
4467 for( i = 0; i < consdata->nvars && !cutoff; ++i )
4473 (*nchgbds) += nimplbdchgs;
4475 consdata->impladded =
TRUE;
4479 if( !cutoff &&
SCIPconsIsActive(cons) && consdata->nvars == 2 && !consdata->opimpladded
4486 (*nchgbds) += nimplbdchgs;
4487 consdata->opimpladded =
TRUE;
4495 SCIP_CALL(
dualPresolve(scip, conss, nconss, conshdlrdata->eventhdlr, &entries, &nentries, &cutoff, nfixedvars, naggrvars, nchgcoefs, ndelconss, nupgdconss, naddconss) );
4501 for( c = 0; c < nconss && !cutoff && !
SCIPisStopped(scip); ++c )
4506 SCIP_CALL(
cliquePresolve(scip, conss[c], conshdlrdata->eventhdlr, &cutoff, nfixedvars, naggrvars, nchgcoefs, ndelconss, naddconss) );
4515 if( !cutoff && conshdlrdata->presolusehashing && (presoltiming & SCIP_PRESOLTIMING_EXHAUSTIVE) != 0 )
4517 if( *nfixedvars == oldnfixedvars && *naggrvars == oldnaggrvars )
4519 if( firstchange < nconss )
4523 oldnaggrvars = *naggrvars;
4528 if( !cutoff && conshdlrdata->presolpairwise && (presoltiming & SCIP_PRESOLTIMING_EXHAUSTIVE) != 0 )
4530 if( *nfixedvars == oldnfixedvars && *naggrvars == oldnaggrvars )
4533 npaircomparisons = 0;
4534 oldndelconss = *ndelconss;
4536 for( c = firstchange; c < nconss && !cutoff && !
SCIPisStopped(scip); ++c )
4549 oldndelconss = *ndelconss;
4550 oldnaggrvars = *naggrvars;
4551 oldnchgbds = *nchgbds;
4553 npaircomparisons = 0;
4565 else if( *nfixedvars > oldnfixedvars || *naggrvars > oldnaggrvars || *nchgbds > oldnchgbds
4566 || *ndelconss > oldndelconss || *nupgdconss > oldnupgdconss )
4593 assert(consdata !=
NULL);
4599 for( i = 0; i < consdata->nvars; ++i )
4613 assert( scip !=
NULL );
4614 assert( conshdlr !=
NULL );
4615 assert( cons !=
NULL );
4630 const char* consname;
4634 assert(valid !=
NULL);
4641 assert(!(*valid) || resvar !=
NULL);
4654 for( v = 0; v < nvars; ++v )
4657 assert(!(*valid) || vars[v] !=
NULL);
4671 initial, separate, enforce, check, propagate, local, modifiable, dynamic, removable, stickingatnode) );
4691 SCIPdebugMsg(scip,
"parse <%s> as AND-constraint\n", str);
4699 if( resvar ==
NULL )
4701 SCIPdebugMsg(scip,
"resultant variable does not exist \n");
4705 char* strcopy =
NULL;
4709 startptr = strchr((
char*)str,
'(');
4711 if( startptr ==
NULL )
4713 SCIPerrorMessage(
"missing starting character '(' parsing AND-constraint\n");
4721 endptr = strrchr(startptr,
')');
4723 if( endptr ==
NULL )
4728 assert(endptr >= startptr);
4730 if( endptr > startptr )
4747 if( varssize < requiredsize )
4750 varssize = requiredsize;
4758 assert(varssize >= requiredsize);
4762 initial, separate, enforce, check, propagate, local, modifiable, dynamic, removable, stickingatnode) );
4779 initial, separate, enforce, check, propagate, local, modifiable, dynamic, removable, stickingatnode) );
4795 assert(consdata !=
NULL);
4797 if( varssize < consdata->nvars + 1 )
4802 vars[consdata->nvars] = consdata->resvar;
4815 assert(cons !=
NULL);
4818 assert(consdata !=
NULL);
4820 (*nvars) = consdata->nvars + 1;
4836 assert(eventhdlr !=
NULL);
4837 assert(eventdata !=
NULL);
4838 assert(event !=
NULL);
4841 assert(consdata !=
NULL);
4845 consdata->nofixedzero =
FALSE;
4847 consdata->propagated =
FALSE;
4868 eventExecAnd,
NULL) );
4876 consEnfolpAnd, consEnfopsAnd, consCheckAnd, consLockAnd,
4879 assert(conshdlr !=
NULL);
4884 #ifdef GMLGATEPRINTING 4907 "should pairwise constraint comparison be performed in presolving?",
4910 "constraints/and/presolusehashing",
4911 "should hash table be used for detecting redundant constraints in advance",
4915 "should the AND-constraint get linearized and removed (in presolving)?",
4919 "should cuts be separated during LP enforcing?",
4923 "should an aggregated linearization be used?",
4927 "should all binary resultant variables be upgraded to implicit binary variables?",
4931 "should dual presolving be performed?",
4986 if( conshdlr ==
NULL )
4993 assert(conshdlrdata !=
NULL);
5014 activeresvar = resvar;
5019 for( v = nvars - 1; v >= 0; --v )
5024 activevar = vars[v];
5034 assert(!infeasible);
5043 SCIP_CALL(
SCIPcreateCons(scip, cons, name, conshdlr, consdata, initial, separate, enforce, check, propagate,
5044 local, modifiable, dynamic, removable, stickingatnode) );
5066 assert(scip !=
NULL);
5083 assert(scip !=
NULL);
5084 assert(cons !=
NULL);
5094 assert(consdata !=
NULL);
5096 return consdata->nvars;
5107 assert(scip !=
NULL);
5108 assert(cons !=
NULL);
5118 assert(consdata !=
NULL);
5120 return consdata->vars;
5132 assert(cons !=
NULL);
5142 assert(consdata !=
NULL);
5144 return consdata->resvar;
5155 assert(scip !=
NULL);
5156 assert(cons !=
NULL);
5166 assert(consdata !=
NULL);
5168 return consdata->sorted;
5179 assert(scip !=
NULL);
5180 assert(cons !=
NULL);
5190 assert(consdata !=
NULL);
5193 assert(consdata->sorted);
5211 assert(scip !=
NULL);
5212 assert(cons !=
NULL);
5222 assert(consdata !=
NULL);
5224 consdata->checkwhenupgr = flag;
5243 assert(scip !=
NULL);
5244 assert(cons !=
NULL);
5254 assert(consdata !=
NULL);
5256 consdata->notremovablewhenupgr = flag;
enum SCIP_Result SCIP_RESULT
#define SCIPfreeBlockMemoryArray(scip, ptr, num)
SCIP_RETCODE SCIPaddVarsToRowSameCoef(SCIP *scip, SCIP_ROW *row, int nvars, SCIP_VAR **vars, SCIP_Real val)
static SCIP_RETCODE conshdlrdataCreate(SCIP *scip, SCIP_CONSHDLRDATA **conshdlrdata, SCIP_EVENTHDLR *eventhdlr)
void SCIPconshdlrSetData(SCIP_CONSHDLR *conshdlr, SCIP_CONSHDLRDATA *conshdlrdata)
int SCIPgetNIntVars(SCIP *scip)
static SCIP_RETCODE consdataFixResultantZero(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *resvar, int pos, SCIP_Bool *cutoff, int *nfixedvars)
SCIP_RETCODE SCIPincConsAge(SCIP *scip, SCIP_CONS *cons)
#define SCIPreallocBlockMemoryArray(scip, ptr, oldnum, newnum)
static SCIP_RETCODE resolvePropagation(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *infervar, PROPRULE proprule, SCIP_BDCHGIDX *bdchgidx, SCIP_RESULT *result)
SCIP_RETCODE SCIPsetConshdlrDelete(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSDELETE((*consdelete)))
SCIP_Bool SCIPinRepropagation(SCIP *scip)
#define ARTIFICIALVARNAMEPREFIX
SCIP_RETCODE SCIPincludeNonlinconsUpgrade(SCIP *scip, SCIP_DECL_NONLINCONSUPGD((*nonlinconsupgd)), SCIP_DECL_EXPRGRAPHNODEREFORM((*nodereform)), int priority, SCIP_Bool active, const char *conshdlrname)
static SCIP_DECL_CONSSEPASOL(consSepasolAnd)
SCIP_RETCODE SCIPexprgraphAddNode(SCIP_EXPRGRAPH *exprgraph, SCIP_EXPRGRAPHNODE *node, int mindepth, int nchildren, SCIP_EXPRGRAPHNODE **children)
SCIP_Bool SCIPvarsHaveCommonClique(SCIP_VAR *var1, SCIP_Bool value1, SCIP_VAR *var2, SCIP_Bool value2, SCIP_Bool regardimplics)
#define SCIPallocBlockMemoryArray(scip, ptr, num)
static SCIP_RETCODE cliquePresolve(SCIP *scip, SCIP_CONS *cons, SCIP_EVENTHDLR *eventhdlr, SCIP_Bool *cutoff, int *nfixedvars, int *naggrvars, int *nchgcoefs, int *ndelconss, int *naddconss)
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_RETCODE SCIPexprgraphAddVars(SCIP_EXPRGRAPH *exprgraph, int nvars, void **vars, SCIP_EXPRGRAPHNODE **varnodes)
SCIP_STAGE SCIPgetStage(SCIP *scip)
SCIP_Bool SCIPconsIsDynamic(SCIP_CONS *cons)
#define CONSHDLR_SEPAPRIORITY
SCIP_RETCODE SCIPsetConshdlrTrans(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSTRANS((*constrans)))
SCIP_RETCODE SCIPgetBinvarRepresentative(SCIP *scip, SCIP_VAR *var, SCIP_VAR **repvar, SCIP_Bool *negated)
static SCIP_DECL_EVENTEXEC(eventExecAnd)
SCIP_Real SCIPgetVarLbAtIndex(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx, SCIP_Bool after)
SCIP_RETCODE SCIPhashtableInsert(SCIP_HASHTABLE *hashtable, void *element)
SCIP_RETCODE SCIPcatchVarEvent(SCIP *scip, SCIP_VAR *var, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int *filterpos)
SCIP_CONSHDLR * SCIPfindConshdlr(SCIP *scip, const char *name)
int SCIPexprgraphGetNodeNChildren(SCIP_EXPRGRAPHNODE *node)
SCIP_RETCODE SCIPsortAndCons(SCIP *scip, SCIP_CONS *cons)
SCIP_Real SCIPvarGetLbGlobal(SCIP_VAR *var)
static SCIP_DECL_CONSENFORELAX(consEnforelaxAnd)
SCIP_RETCODE SCIPsetConshdlrGetVars(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSGETVARS((*consgetvars)))
SCIP_RETCODE SCIPvarGetProbvarBinary(SCIP_VAR **var, SCIP_Bool *negated)
static SCIP_RETCODE mergeMultiples(SCIP *scip, SCIP_CONS *cons, SCIP_EVENTHDLR *eventhdlr, unsigned char **entries, int *nentries, int *nfixedvars, int *nchgcoefs, int *ndelconss)
void SCIPgmlWriteArc(FILE *file, unsigned int source, unsigned int target, const char *label, const char *color)
SCIP_RETCODE SCIPsetConshdlrEnforelax(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSENFORELAX((*consenforelax)))
static SCIP_RETCODE analyzeConflictZero(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPresetConsAge(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPdelCons(SCIP *scip, SCIP_CONS *cons)
int SCIPcalcMemGrowSize(SCIP *scip, int num)
SCIP_RETCODE SCIPaddVarToRow(SCIP *scip, SCIP_ROW *row, SCIP_VAR *var, SCIP_Real val)
static SCIP_RETCODE consdataSwitchWatchedvars(SCIP *scip, SCIP_CONSDATA *consdata, SCIP_EVENTHDLR *eventhdlr, int watchedvar1, int watchedvar2)
SCIP_Bool SCIPisPositive(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPvarGetLbLocal(SCIP_VAR *var)
SCIP_RETCODE SCIPaddConflictBinvar(SCIP *scip, SCIP_VAR *var)
SCIP_Bool SCIPisGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPconsIsAdded(SCIP_CONS *cons)
SCIP_RETCODE SCIPincludeEventhdlrBasic(SCIP *scip, SCIP_EVENTHDLR **eventhdlrptr, const char *name, const char *desc, SCIP_DECL_EVENTEXEC((*eventexec)), SCIP_EVENTHDLRDATA *eventhdlrdata)
static SCIP_DECL_HASHKEYEQ(hashKeyEqAndcons)
void SCIPgmlWriteNode(FILE *file, unsigned int id, const char *label, const char *nodetype, const char *fillcolor, const char *bordercolor)
SCIP_RETCODE SCIPgetTransformedVar(SCIP *scip, SCIP_VAR *var, SCIP_VAR **transvar)
static SCIP_DECL_CONSPARSE(consParseAnd)
SCIP_RETCODE SCIPupdateConsFlags(SCIP *scip, SCIP_CONS *cons0, SCIP_CONS *cons1)
SCIP_RETCODE SCIPparseVarName(SCIP *scip, const char *str, SCIP_VAR **var, char **endptr)
SCIP_RETCODE SCIPreleaseVar(SCIP *scip, SCIP_VAR **var)
SCIP_Bool SCIPvarIsBinary(SCIP_VAR *var)
SCIP_RETCODE SCIPsetConshdlrInitpre(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSINITPRE((*consinitpre)))
SCIP_Bool SCIPisFeasNegative(SCIP *scip, SCIP_Real val)
void SCIPgmlWriteClosing(FILE *file)
static SCIP_RETCODE consdataFixOperandsOne(SCIP *scip, SCIP_CONS *cons, SCIP_VAR **vars, int nvars, SCIP_Bool *cutoff, int *nfixedvars)
static SCIP_RETCODE consdataFreeRows(SCIP *scip, SCIP_CONSDATA *consdata)
#define DEFAULT_PRESOLUSEHASHING
SCIP_RETCODE SCIPgetVarsData(SCIP *scip, SCIP_VAR ***vars, int *nvars, int *nbinvars, int *nintvars, int *nimplvars, int *ncontvars)
int SCIPconsGetPos(SCIP_CONS *cons)
SCIP_RETCODE SCIPhashmapCreate(SCIP_HASHMAP **hashmap, BMS_BLKMEM *blkmem, int mapsize)
SCIP_RETCODE SCIPincludeConshdlrAnd(SCIP *scip)
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)
#define CONSHDLR_CHECKPRIORITY
SCIP_RETCODE SCIPcutoffNode(SCIP *scip, SCIP_NODE *node)
SCIP_Real SCIPinfinity(SCIP *scip)
int SCIPsnprintf(char *t, int len, const char *s,...)
SCIP_Bool SCIPisNegative(SCIP *scip, SCIP_Real val)
enum SCIP_Retcode SCIP_RETCODE
SCIP_RETCODE SCIPaddVarLocks(SCIP *scip, SCIP_VAR *var, int nlocksdown, int nlocksup)
SCIP_Bool SCIPconsIsStickingAtNode(SCIP_CONS *cons)
static SCIP_DECL_CONSPROP(consPropAnd)
#define SCIP_PRESOLTIMING_EXHAUSTIVE
int SCIPvarGetProbindex(SCIP_VAR *var)
static SCIP_RETCODE consdataPrint(SCIP *scip, SCIP_CONSDATA *consdata, FILE *file)
SCIP_Bool SCIPconsIsTransformed(SCIP_CONS *cons)
SCIP_RETCODE SCIPinitConflictAnalysis(SCIP *scip, SCIP_CONFTYPE conftype, SCIP_Bool iscutoffinvolved)
static SCIP_RETCODE consdataLinearize(SCIP *scip, SCIP_CONS *cons, SCIP_Bool *cutoff, int *nfixedvars, int *nupgdconss)
#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)
Constraint handler for AND constraints, .
static SCIP_DECL_CONSINITPRE(consInitpreAnd)
#define SCIPduplicateBufferArray(scip, ptr, source, num)
#define DEFAULT_ENFORCECUTS
static SCIP_RETCODE unlockRounding(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var)
void * SCIPhashmapGetImage(SCIP_HASHMAP *hashmap, void *origin)
SCIP_Bool SCIPisEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
static SCIP_DECL_CONSPRINT(consPrintAnd)
#define SCIPfreeBufferArray(scip, ptr)
Constraint handler for the set partitioning / packing / covering constraints .
#define SCIPallocBlockMemory(scip, ptr)
#define SCIPdebugPrintCons(x, y, z)
SCIP_Bool SCIPisTransformed(SCIP *scip)
static SCIP_RETCODE consdataEnsureVarsSize(SCIP *scip, SCIP_CONSDATA *consdata, int num)
SCIP_Bool SCIPconsIsRemovable(SCIP_CONS *cons)
#define SCIP_EVENTTYPE_BOUNDCHANGED
SCIP_RETCODE SCIPsetConshdlrInitlp(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSINITLP((*consinitlp)))
SCIP_NODE * SCIPgetRootNode(SCIP *scip)
#define SCIPdebugMsgPrint
SCIP_RETCODE SCIPgetTransformedVars(SCIP *scip, int nvars, SCIP_VAR **vars, SCIP_VAR **transvars)
static SCIP_RETCODE consdataDropWatchedEvents(SCIP *scip, SCIP_CONSDATA *consdata, SCIP_EVENTHDLR *eventhdlr, int pos, int filterpos)
SCIP_RETCODE SCIPsetConshdlrParse(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPARSE((*consparse)))
static SCIP_DECL_CONSEXITSOL(consExitsolAnd)
SCIP_Bool SCIPconsIsActive(SCIP_CONS *cons)
void SCIPinfoMessage(SCIP *scip, FILE *file, const char *formatstr,...)
#define DEFAULT_PRESOLPAIRWISE
int SCIPgetNContVars(SCIP *scip)
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)
int SCIPexprgraphGetNodePolynomialNMonomials(SCIP_EXPRGRAPHNODE *node)
SCIP_RETCODE SCIPhashtableCreate(SCIP_HASHTABLE **hashtable, BMS_BLKMEM *blkmem, int tablesize, SCIP_DECL_HASHGETKEY((*hashgetkey)), SCIP_DECL_HASHKEYEQ((*hashkeyeq)), SCIP_DECL_HASHKEYVAL((*hashkeyval)), void *userptr)
static SCIP_RETCODE dualPresolve(SCIP *scip, SCIP_CONS **conss, int nconss, SCIP_EVENTHDLR *eventhdlr, unsigned char **entries, int *nentries, SCIP_Bool *cutoff, int *nfixedvars, int *naggrvars, int *nchgcoefs, int *ndelconss, int *nupgdconss, int *naddconss)
SCIP_Bool SCIPisAndConsSorted(SCIP *scip, SCIP_CONS *cons)
static SCIP_DECL_CONSENFOPS(consEnfopsAnd)
int SCIPexprGetMonomialNFactors(SCIP_EXPRDATA_MONOMIAL *monomial)
SCIP_VAR * SCIPvarGetNegatedVar(SCIP_VAR *var)
SCIP_Bool SCIProwIsInLP(SCIP_ROW *row)
#define SCIP_EVENTTYPE_LBRELAXED
SCIP_Bool SCIPisConflictAnalysisApplicable(SCIP *scip)
SCIP_EXPROP SCIPexprgraphGetNodeOperator(SCIP_EXPRGRAPHNODE *node)
SCIP_EXPRDATA_MONOMIAL ** SCIPexprgraphGetNodePolynomialMonomials(SCIP_EXPRGRAPHNODE *node)
SCIP_RETCODE SCIPchgVarType(SCIP *scip, SCIP_VAR *var, SCIP_VARTYPE vartype, SCIP_Bool *infeasible)
SCIP_Real SCIPvarGetUbGlobal(SCIP_VAR *var)
SCIP_VAR * SCIPvarGetProbvar(SCIP_VAR *var)
static SCIP_DECL_CONSFREE(consFreeAnd)
#define SCIPduplicateBlockMemoryArray(scip, ptr, source, num)
static SCIP_DECL_CONSPRESOL(consPresolAnd)
SCIP_RETCODE SCIPparseVarsList(SCIP *scip, const char *str, SCIP_VAR **vars, int *nvars, int varssize, int *requiredsize, char **endptr, char delimiter, SCIP_Bool *success)
SCIP_VAR ** SCIPgetVarsAnd(SCIP *scip, SCIP_CONS *cons)
SCIP_Real SCIPexprgraphGetNodePolynomialConstant(SCIP_EXPRGRAPHNODE *node)
SCIP_RETCODE SCIPsetConshdlrCopy(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSHDLRCOPY((*conshdlrcopy)), SCIP_DECL_CONSCOPY((*conscopy)))
#define CONSHDLR_PRESOLTIMING
SCIP_RETCODE SCIPgetBinvarRepresentatives(SCIP *scip, int nvars, SCIP_VAR **vars, SCIP_VAR **repvars, SCIP_Bool *negated)
static SCIP_RETCODE detectRedundantConstraints(SCIP *scip, BMS_BLKMEM *blkmem, SCIP_CONS **conss, int nconss, int *firstchange, SCIP_Bool *cutoff, int *naggrvars, int *ndelconss)
SCIP_RETCODE SCIPcreateConsAnd(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *resvar, 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)
const char * SCIPconshdlrGetName(SCIP_CONSHDLR *conshdlr)
SCIP_RETCODE SCIPaddCons(SCIP *scip, SCIP_CONS *cons)
#define CONSHDLR_PROP_TIMING
SCIP_VAR * SCIPgetResultantAnd(SCIP *scip, SCIP_CONS *cons)
SCIP_Bool SCIPisLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
static SCIP_RETCODE preprocessConstraintPairs(SCIP *scip, SCIP_CONS **conss, int firstchange, int chkind, SCIP_Bool *cutoff, int *naggrvars, int *nbdchgs, int *ndelconss)
SCIP_RETCODE SCIPdelConsLocal(SCIP *scip, SCIP_CONS *cons)
static SCIP_RETCODE delCoefPos(SCIP *scip, SCIP_CONS *cons, SCIP_EVENTHDLR *eventhdlr, int pos)
Constraint handler for logicor constraints (equivalent to set covering, but algorithms are suited fo...
SCIP_RETCODE SCIPaddVarImplication(SCIP *scip, SCIP_VAR *var, SCIP_Bool varfixing, SCIP_VAR *implvar, SCIP_BOUNDTYPE impltype, SCIP_Real implbound, SCIP_Bool *infeasible, int *nbdchgs)
static SCIP_DECL_CONSDELETE(consDeleteAnd)
BMS_BLKMEM * SCIPblkmem(SCIP *scip)
SCIP_Bool SCIPsortedvecFindPtr(void **ptrarray, SCIP_DECL_SORTPTRCOMP((*ptrcomp)), void *val, int len, int *pos)
SCIP_RETCODE SCIPunlockVarCons(SCIP *scip, SCIP_VAR *var, SCIP_CONS *cons, SCIP_Bool lockdown, SCIP_Bool lockup)
const char * SCIPconsGetName(SCIP_CONS *cons)
static SCIP_RETCODE checkCons(SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_Bool checklprows, SCIP_Bool printreason, SCIP_Bool *violated)
SCIP_RETCODE SCIPmarkDoNotMultaggrVar(SCIP *scip, SCIP_VAR *var)
SCIP_Bool SCIPconsIsPropagated(SCIP_CONS *cons)
struct SCIP_EventData SCIP_EVENTDATA
const char * SCIPvarGetName(SCIP_VAR *var)
SCIP_RETCODE SCIPcreateConsSetpart(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 SCIPsetConshdlrFree(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSFREE((*consfree)))
SCIP_RETCODE SCIPcreateConsBasicAnd(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *resvar, int nvars, SCIP_VAR **vars)
void SCIPhashmapFree(SCIP_HASHMAP **hashmap)
SCIP_CONSHDLRDATA * SCIPconshdlrGetData(SCIP_CONSHDLR *conshdlr)
static SCIP_DECL_CONSTRANS(consTransAnd)
static SCIP_RETCODE addRelaxation(SCIP *scip, SCIP_CONS *cons, SCIP_Bool *infeasible)
#define SCIP_EVENTTYPE_UBRELAXED
SCIP_RETCODE SCIPexprgraphCreateNodeLinear(BMS_BLKMEM *blkmem, SCIP_EXPRGRAPHNODE **node, int ncoefs, SCIP_Real *coefs, SCIP_Real constant)
#define DEFAULT_LINEARIZE
void SCIPsortPtr(void **ptrarray, SCIP_DECL_SORTPTRCOMP((*ptrcomp)), int len)
SCIP_RETCODE SCIPvarGetAggregatedObj(SCIP_VAR *var, SCIP_Real *aggrobj)
#define SCIPhashTwo(a, b)
#define SCIP_EVENTTYPE_LBTIGHTENED
SCIP_RETCODE SCIPchgAndConsRemovableFlagWhenUpgr(SCIP *scip, SCIP_CONS *cons, SCIP_Bool flag)
SCIP_RETCODE SCIPanalyzeConflictCons(SCIP *scip, SCIP_CONS *cons, SCIP_Bool *success)
static SCIP_RETCODE propagateCons(SCIP *scip, SCIP_CONS *cons, SCIP_EVENTHDLR *eventhdlr, SCIP_Bool *cutoff, int *nfixedvars, int *nupgdconss)
SCIP_Bool SCIPconsIsLocal(SCIP_CONS *cons)
#define EXPRGRAPHREFORM_PRIORITY
SCIP_RETCODE SCIPsetConshdlrResprop(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSRESPROP((*consresprop)))
#define SCIPdebugGetSolVal(scip, var, val)
SCIP_RETCODE SCIPaddCut(SCIP *scip, SCIP_SOL *sol, SCIP_ROW *cut, SCIP_Bool forcecut, SCIP_Bool *infeasible)
struct SCIP_ConsData SCIP_CONSDATA
static SCIP_DECL_CONSINITLP(consInitlpAnd)
static SCIP_RETCODE conshdlrdataFree(SCIP *scip, SCIP_CONSHDLRDATA **conshdlrdata)
static SCIP_DECL_CONSGETVARS(consGetVarsAnd)
static SCIP_RETCODE consdataFree(SCIP *scip, SCIP_CONSDATA **consdata, SCIP_EVENTHDLR *eventhdlr)
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)
public data structures and miscellaneous methods
SCIP_RETCODE SCIPchgAndConsCheckFlagWhenUpgr(SCIP *scip, SCIP_CONS *cons, SCIP_Bool flag)
static SCIP_RETCODE addCoef(SCIP *scip, SCIP_CONS *cons, SCIP_EVENTHDLR *eventhdlr, SCIP_VAR *var)
int SCIPgetNImplVars(SCIP *scip)
SCIP_EVENTTYPE SCIPeventGetType(SCIP_EVENT *event)
static SCIP_RETCODE enforceConstraint(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss, SCIP_SOL *sol, SCIP_RESULT *result)
#define CONSHDLR_NEEDSCONS
static SCIP_DECL_CONSCOPY(consCopyAnd)
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 consdataCreate(SCIP *scip, SCIP_CONSDATA **consdata, SCIP_EVENTHDLR *eventhdlr, int nvars, SCIP_VAR **vars, SCIP_VAR *resvar, SCIP_Bool checkwhenupgr, SCIP_Bool notremovablewhenupgr)
int SCIPgetDepth(SCIP *scip)
constraint handler for nonlinear constraints
SCIP_RETCODE SCIPprintCons(SCIP *scip, SCIP_CONS *cons, FILE *file)
int SCIPvarGetNLocksUp(SCIP_VAR *var)
#define SCIP_DECL_CONSEXITPRE(x)
static SCIP_DECL_HASHGETKEY(hashGetKeyAndcons)
SCIP_CONSHDLR * SCIPconsGetHdlr(SCIP_CONS *cons)
int SCIPvarCompare(SCIP_VAR *var1, SCIP_VAR *var2)
SCIP_Bool SCIPconsIsDeleted(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsChecked(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsInitial(SCIP_CONS *cons)
static SCIP_RETCODE lockRounding(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var)
SCIP_RETCODE SCIPdropVarEvent(SCIP *scip, SCIP_VAR *var, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int filterpos)
static SCIP_DECL_CONSHDLRCOPY(conshdlrCopyAnd)
#define CONSHDLR_MAXPREROUNDS
SCIP_RETCODE SCIPcreateVar(SCIP *scip, SCIP_VAR **var, const char *name, SCIP_Real lb, SCIP_Real ub, SCIP_Real obj, SCIP_VARTYPE vartype, SCIP_Bool initial, SCIP_Bool removable, SCIP_DECL_VARDELORIG((*vardelorig)), SCIP_DECL_VARTRANS((*vartrans)), SCIP_DECL_VARDELTRANS((*vardeltrans)), SCIP_DECL_VARCOPY((*varcopy)), SCIP_VARDATA *vardata)
#define DEFAULT_UPGRRESULTANT
SCIP_RETCODE SCIPfixVar(SCIP *scip, SCIP_VAR *var, SCIP_Real fixedval, SCIP_Bool *infeasible, SCIP_Bool *fixed)
#define BMScopyMemoryArray(ptr, source, num)
SCIP_RETCODE SCIPlockVarCons(SCIP *scip, SCIP_VAR *var, SCIP_CONS *cons, SCIP_Bool lockdown, SCIP_Bool lockup)
#define DEFAULT_DUALPRESOLVING
SCIP_RETCODE SCIPsetConshdlrPrint(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPRINT((*consprint)))
#define SCIP_EVENTTYPE_UBTIGHTENED
Constraint handler for linear constraints in their most general form, .
void * SCIPhashtableRetrieve(SCIP_HASHTABLE *hashtable, void *key)
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_Real SCIPexprGetMonomialCoef(SCIP_EXPRDATA_MONOMIAL *monomial)
#define CONSHDLR_DELAYPROP
void * SCIPexprgraphGetNodeVar(SCIP_EXPRGRAPH *exprgraph, SCIP_EXPRGRAPHNODE *node)
int SCIPgetNBinVars(SCIP *scip)
SCIP_Bool SCIPinProbing(SCIP *scip)
void SCIPhashtableFree(SCIP_HASHTABLE **hashtable)
static SCIP_DECL_CONSENFOLP(consEnfolpAnd)
int SCIPgetNVars(SCIP *scip)
#define CONSHDLR_EAGERFREQ
#define CONSHDLR_PROPFREQ
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)))
SCIP_RETCODE SCIPreleaseRow(SCIP *scip, SCIP_ROW **row)
SCIP_RETCODE SCIPwriteVarsList(SCIP *scip, FILE *file, SCIP_VAR **vars, int nvars, SCIP_Bool type, char delimiter)
static SCIP_RETCODE analyzeZeroResultant(SCIP *scip, SCIP_CONS *cons, int watchedvar1, int watchedvar2, SCIP_Bool *cutoff, int *nfixedvars)
static SCIP_DECL_EXPRGRAPHNODEREFORM(exprgraphnodeReformAnd)
int SCIPvarGetNLocksDown(SCIP_VAR *var)
static SCIP_RETCODE consdataCatchEvents(SCIP *scip, SCIP_CONSDATA *consdata, SCIP_EVENTHDLR *eventhdlr)
SCIP_Bool SCIPisGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
static SCIP_DECL_CONSSEPALP(consSepalpAnd)
SCIP_RETCODE SCIPgetVarCopy(SCIP *sourcescip, SCIP *targetscip, SCIP_VAR *sourcevar, SCIP_VAR **targetvar, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, SCIP_Bool global, SCIP_Bool *success)
SCIP_RETCODE SCIPaddVar(SCIP *scip, SCIP_VAR *var)
SCIP_CONSDATA * SCIPconsGetData(SCIP_CONS *cons)
#define DEFAULT_AGGRLINEARIZATION
static SCIP_RETCODE createRelaxation(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPreleaseCons(SCIP *scip, SCIP_CONS **cons)
#define MINGAINPERNMINCOMPARISONS
SCIP_Bool SCIPallowDualReds(SCIP *scip)
#define CONSHDLR_DELAYSEPA
SCIP_RETCODE SCIPsetConshdlrPresol(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPRESOL((*conspresol)), int maxprerounds, SCIP_PRESOLTIMING presoltiming)
static SCIP_RETCODE consdataCatchWatchedEvents(SCIP *scip, SCIP_CONSDATA *consdata, SCIP_EVENTHDLR *eventhdlr, int pos, int *filterpos)
SCIP_VARSTATUS SCIPvarGetStatus(SCIP_VAR *var)
static SCIP_RETCODE consdataDropEvents(SCIP *scip, SCIP_CONSDATA *consdata, SCIP_EVENTHDLR *eventhdlr)
#define CONSHDLR_SEPAFREQ
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)))
int SCIPgetNVarsAnd(SCIP *scip, SCIP_CONS *cons)
SCIP_Bool SCIPconsIsEnforced(SCIP_CONS *cons)
SCIP_Bool SCIPdoNotAggr(SCIP *scip)
static SCIP_DECL_HASHKEYVAL(hashKeyValAndcons)
SCIP_EXPRGRAPHNODE ** SCIPexprgraphGetNodeChildren(SCIP_EXPRGRAPHNODE *node)
SCIP_Bool SCIPconsIsSeparated(SCIP_CONS *cons)
void SCIPvarsGetProbvar(SCIP_VAR **vars, int nvars)
static void consdataSort(SCIP_CONSDATA *consdata)
static SCIP_DECL_CONSGETNVARS(consGetNVarsAnd)
int SCIPvarGetIndex(SCIP_VAR *var)
SCIP_Real SCIPgetRowSolFeasibility(SCIP *scip, SCIP_ROW *row, SCIP_SOL *sol)
#define SCIPdebugAddSolVal(scip, var, val)
SCIP_VARTYPE SCIPvarGetType(SCIP_VAR *var)
static SCIP_DECL_CONSRESPROP(consRespropAnd)
constraint handler for pseudoboolean constraints
SCIP_Bool SCIPisLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
static SCIP_DECL_CONSCHECK(consCheckAnd)
struct SCIP_ConshdlrData SCIP_CONSHDLRDATA
SCIP_Real SCIPvarGetUbLocal(SCIP_VAR *var)
void SCIPgmlWriteOpening(FILE *file, SCIP_Bool directed)
SCIP_Bool SCIPisFeasIntegral(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPvarIsTransformed(SCIP_VAR *var)
SCIP_RETCODE SCIPhashmapInsert(SCIP_HASHMAP *hashmap, void *origin, void *image)
#define BMSclearMemoryArray(ptr, num)
struct BMS_BlkMem BMS_BLKMEM
SCIP_RETCODE SCIPsetConshdlrExitsol(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSEXITSOL((*consexitsol)))
#define SCIPcombineTwoInt(a, b)
SCIP_RETCODE SCIPwriteVarName(SCIP *scip, FILE *file, SCIP_VAR *var, SCIP_Bool type)
SCIP_Real SCIPgetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var)
static SCIP_RETCODE separateCons(SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_Bool *separated, SCIP_Bool *cutoff)
#define CONSHDLR_ENFOPRIORITY
SCIP_RETCODE SCIPinferBinvarCons(SCIP *scip, SCIP_VAR *var, SCIP_Bool fixedval, SCIP_CONS *infercons, int inferinfo, SCIP_Bool *infeasible, SCIP_Bool *tightened)
static SCIP_RETCODE applyFixings(SCIP *scip, SCIP_CONS *cons, SCIP_EVENTHDLR *eventhdlr, int *nchgcoefs)
SCIP_RETCODE SCIPgetNegatedVar(SCIP *scip, SCIP_VAR *var, SCIP_VAR **negvar)
static SCIP_RETCODE analyzeConflictOne(SCIP *scip, SCIP_CONS *cons, int falsepos)
SCIP_RETCODE SCIPaddBoolParam(SCIP *scip, const char *name, const char *desc, SCIP_Bool *valueptr, SCIP_Bool isadvanced, SCIP_Bool defaultvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
SCIP_Bool SCIPvarIsActive(SCIP_VAR *var)
SCIP_Bool SCIPvarIsNegated(SCIP_VAR *var)
static SCIP_DECL_CONSLOCK(consLockAnd)
#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)