36 #define CONSHDLR_NAME "setppc" 37 #define CONSHDLR_DESC "set partitioning / packing / covering constraints" 38 #define CONSHDLR_SEPAPRIORITY +700000 39 #define CONSHDLR_ENFOPRIORITY -700000 40 #define CONSHDLR_CHECKPRIORITY -700000 41 #define CONSHDLR_SEPAFREQ 0 42 #define CONSHDLR_PROPFREQ 1 43 #define CONSHDLR_EAGERFREQ 100 45 #define CONSHDLR_MAXPREROUNDS -1 46 #define CONSHDLR_DELAYSEPA FALSE 47 #define CONSHDLR_DELAYPROP FALSE 48 #define CONSHDLR_NEEDSCONS TRUE 50 #define CONSHDLR_PRESOLTIMING SCIP_PRESOLTIMING_ALWAYS 51 #define CONSHDLR_PROP_TIMING SCIP_PROPTIMING_BEFORELP 53 #define LINCONSUPGD_PRIORITY +700000 54 #define QUADCONSUPGD_PRIORITY +700000 56 #define EVENTHDLR_NAME "setppc" 57 #define EVENTHDLR_DESC "bound change event handler for set partitioning / packing / covering constraints" 59 #define CONFLICTHDLR_NAME "setppc" 60 #define CONFLICTHDLR_DESC "conflict handler creating set covering constraints" 61 #define CONFLICTHDLR_PRIORITY LINCONSUPGD_PRIORITY 63 #define DEFAULT_PRESOLPAIRWISE TRUE 65 #define HASHSIZE_SETPPCCONS 500 66 #define DEFAULT_PRESOLUSEHASHING TRUE 67 #define NMINCOMPARISONS 200000 68 #define MINGAINPERNMINCOMPARISONS 1e-06 70 #define DEFAULT_RANDSEED 3 75 #define MINBRANCHWEIGHT 0.3 76 #define MAXBRANCHWEIGHT 0.7 78 #define DEFAULT_NPSEUDOBRANCHES 2 79 #define DEFAULT_DUALPRESOLVING TRUE 81 #define DEFAULT_CLIQUELIFTING FALSE 85 #define DEFAULT_ADDVARIABLESASCLIQUES FALSE 88 #define DEFAULT_CLIQUESHRINKING TRUE 99 struct SCIP_ConshdlrData
138 unsigned int setppctype:2;
139 unsigned int sorted:1;
140 unsigned int cliqueadded:1;
141 unsigned int validsignature:1;
142 unsigned int changed:1;
143 unsigned int varsdeleted:1;
144 unsigned int merged:1;
145 unsigned int presolpropagated:1;
146 unsigned int existmultaggr:1;
147 unsigned int catchevents:1;
174 assert(cons1 != NULL);
175 assert(cons2 != NULL);
183 assert(consdata1 != NULL);
186 assert(consdata2 != NULL);
189 if( consdata1->setppctype < consdata2->setppctype ||
193 else if( (consdata1->setppctype == consdata2->setppctype && consdata1->nvars == consdata2->nvars) )
197 assert(consdata1->setppctype > consdata2->setppctype || (consdata1->setppctype ==
SCIP_SETPPCTYPE_PARTITIONING && consdata1->setppctype == consdata2->setppctype && consdata1->nvars > consdata2->nvars) || (consdata1->setppctype ==
SCIP_SETPPCTYPE_PACKING && consdata1->setppctype == consdata2->setppctype && consdata1->nvars < consdata2->nvars));
230 assert(cons1 != NULL);
231 assert(cons2 != NULL);
244 assert(consdata1 != NULL);
246 assert(consdata2 != NULL);
251 if( consdata1->setppctype < consdata2->setppctype ||
260 assert(consdata1->setppctype > consdata2->setppctype || ((consdata1->setppctype == consdata2->setppctype) &&
288 assert(consdata != NULL);
290 switch( consdata->setppctype )
323 assert(consdata != NULL);
325 switch( consdata->setppctype )
355 assert(scip != NULL);
356 assert(conshdlrdata != NULL);
357 assert(eventhdlr != NULL);
366 (*conshdlrdata)->eventhdlr = eventhdlr;
367 (*conshdlrdata)->nsetpart = 0;
383 assert(conshdlrdata != NULL);
384 assert(*conshdlrdata != NULL);
410 assert(conshdlrdata != NULL);
413 varuses = conshdlrdata->varuses;
414 assert(varuses != NULL);
447 assert(conshdlrdata != NULL);
452 SCIP_CALL( conshdlrdataAddVaruses(scip, conshdlrdata, var, +1) );
465 assert(conshdlrdata != NULL);
470 SCIP_CALL( conshdlrdataAddVaruses(scip, conshdlrdata, var, -1) );
485 assert(consdata != NULL);
487 for( v = 0; v < consdata->nvars; ++v )
489 SCIP_CALL( conshdlrdataIncVaruses(scip, conshdlrdata, consdata->vars[v]) );
505 assert(consdata != NULL);
507 for( v = 0; v < consdata->nvars; ++v )
509 SCIP_CALL( conshdlrdataDecVaruses(scip, conshdlrdata, consdata->vars[v]) );
524 assert(consdata != NULL);
525 assert(consdata->nvars <= consdata->varssize);
527 if( num > consdata->varssize )
533 consdata->varssize = newsize;
535 assert(num <= consdata->varssize);
550 assert(consdata != NULL);
551 assert(nvars == 0 || vars != NULL);
555 (*consdata)->signature = 0;
556 (*consdata)->row = NULL;
557 (*consdata)->existmultaggr =
FALSE;
558 (*consdata)->catchevents =
FALSE;
559 (*consdata)->nfixedzeros = 0;
560 (*consdata)->nfixedones = 0;
569 #ifdef SCIP_DISABLED_CODE 581 for( v = 0; v < nvars; ++v )
587 (*consdata)->nfixedones++;
589 (*consdata)->nfixedzeros++;
591 varsbuffer[k++] = vars[v];
594 (*consdata)->varssize = k;
595 (*consdata)->nvars = k;
610 (*consdata)->varssize = nvars;
611 (*consdata)->nvars = nvars;
621 for( v = 0; v < (*consdata)->nvars; v++ )
632 for( v = 0; v < (*consdata)->nvars; v++ )
634 assert((*consdata)->vars[v] != NULL);
642 (*consdata)->vars = NULL;
643 (*consdata)->varssize = 0;
644 (*consdata)->nvars = 0;
646 (*consdata)->setppctype = setppctype;
647 (*consdata)->sorted = (nvars <= 1);
648 (*consdata)->cliqueadded =
FALSE;
649 (*consdata)->validsignature =
FALSE;
650 (*consdata)->changed =
TRUE;
651 (*consdata)->varsdeleted =
FALSE;
652 (*consdata)->merged =
FALSE;
653 (*consdata)->presolpropagated =
FALSE;
668 assert(consdata != NULL);
669 assert(nvars == 0 || vars != NULL);
689 assert(consdata != NULL);
690 assert(*consdata != NULL);
693 if( (*consdata)->row != NULL )
699 for( v = 0; v < (*consdata)->nvars; v++ )
701 assert((*consdata)->vars[v] != NULL);
719 assert(consdata != NULL);
722 if( consdata->nvars == 0 )
729 switch( consdata->setppctype )
754 assert(consdata != NULL);
756 if( !consdata->validsignature )
760 consdata->signature = 0;
761 for( i = 0; i < consdata->nvars; ++i )
763 consdata->validsignature =
TRUE;
766 return consdata->signature;
775 assert(consdata != NULL);
777 if( !consdata->sorted )
779 if( consdata->nvars <= 1 )
780 consdata->sorted =
TRUE;
783 SCIPsortPtr((
void**)consdata->vars, SCIPvarComp, consdata->nvars);
784 consdata->sorted =
TRUE;
787 assert(consdata->sorted);
793 for( v = 0; v < consdata->nvars; ++v )
795 assert(v == consdata->nvars-1 ||
SCIPvarCompare(consdata->vars[v], consdata->vars[v+1]) <= 0);
814 assert(consdata != NULL);
826 for( v = 0; v < consdata->nvars; ++v )
833 assert(conshdlr != NULL);
835 assert(conshdlrdata != NULL);
841 ++(conshdlrdata->nsetpart);
842 assert(conshdlrdata->nsetpart >= 0);
846 --(conshdlrdata->nsetpart);
847 assert(conshdlrdata->nsetpart >= 0);
852 consdata->setppctype = setppctype;
859 for( v = 0; v < consdata->nvars; ++v )
867 conshdlrdata->updatedsetppctype =
TRUE;
886 assert(consdata != NULL);
887 assert(eventhdlr != NULL);
888 assert(0 <= pos && pos < consdata->nvars);
889 assert(consdata->vars != NULL);
891 var = consdata->vars[pos];
914 consdata->nfixedzeros++;
919 consdata->presolpropagated =
FALSE;
922 if( consdata->nfixedzeros >= consdata->nvars - 1 )
930 consdata->nfixedones++;
934 consdata->presolpropagated =
FALSE;
956 assert(consdata != NULL);
957 assert(eventhdlr != NULL);
958 assert(0 <= pos && pos < consdata->nvars);
959 assert(consdata->vars != NULL);
961 var = consdata->vars[pos];
971 consdata->nfixedzeros--;
973 consdata->nfixedones--;
990 assert(consdata != NULL);
992 if( consdata->catchevents ==
TRUE )
996 for( i = 0; i < consdata->nvars; ++i )
1001 consdata->catchevents =
TRUE;
1018 assert(consdata != NULL);
1020 if( consdata->catchevents ==
FALSE )
1024 for( i = 0; i < consdata->nvars; ++i )
1029 consdata->catchevents =
FALSE;
1045 assert(var != NULL);
1048 assert(consdata != NULL);
1058 assert(var != NULL);
1062 consdata->vars[consdata->nvars] = var;
1064 if( consdata->validsignature )
1066 consdata->sorted = (consdata->nvars == 1);
1067 consdata->changed =
TRUE;
1080 assert(conshdlr != NULL);
1082 assert(conshdlrdata != NULL);
1083 assert(conshdlrdata->eventhdlr != NULL);
1086 if( consdata->catchevents )
1092 consdata->existmultaggr =
TRUE;
1098 SCIP_CALL( conshdlrdataIncVaruses(scip, conshdlrdata, var) );
1107 if( consdata->row != NULL )
1112 consdata->merged =
FALSE;
1113 consdata->cliqueadded =
FALSE;
1129 assert(scip != NULL);
1130 assert(cons != NULL);
1133 assert(consdata != NULL);
1134 assert(0 <= pos && pos < consdata->nvars);
1136 var = consdata->vars[pos];
1137 assert(var != NULL);
1152 assert(conshdlrdata != NULL);
1153 assert(conshdlrdata->eventhdlr != NULL);
1156 if( consdata->catchevents )
1162 if( consdata->nvars == 1 )
1164 consdata->presolpropagated =
FALSE;
1169 if( consdata->row != NULL )
1175 if( pos != consdata->nvars - 1 )
1177 consdata->vars[pos] = consdata->vars[consdata->nvars-1];
1178 consdata->sorted =
FALSE;
1181 consdata->validsignature =
FALSE;
1182 consdata->changed =
TRUE;
1273 assert(scip != NULL);
1274 assert(cons != NULL);
1275 assert(nfixedvars != NULL);
1276 assert(ndelconss != NULL);
1277 assert(result != NULL);
1289 assert(consdata != NULL);
1298 assert(consdata->nfixedones == 0);
1299 assert(consdata->nfixedzeros == 0);
1301 nvars = consdata->nvars;
1310 vars = consdata->vars;
1315 switch( setppctype )
1340 for( v = 0; v < nvars; ++v )
1343 assert(var != NULL);
1363 if( idx == -1 || objval < bestobjval )
1366 bestobjval = objval;
1377 if( idx == -1 || nposfixings == 0 )
1384 assert(idx >= 0 && idx < nvars);
1387 noldfixed = *nfixedvars;
1393 for( v = nvars - 1; v >= 0; --v )
1399 assert(var != NULL);
1418 if( objval >= bestobjval )
1421 assert(!infeasible);
1437 for( v = nvars - 1; v >= 0; --v )
1443 assert(var != NULL);
1476 assert(!infeasible);
1502 assert(!infeasible);
1519 assert(*nfixedvars >= noldfixed);
1522 if( *nfixedvars != noldfixed )
1550 assert(scip != NULL);
1551 assert(cons != NULL);
1552 assert(nfixedvars != NULL);
1553 assert(ndelconss != NULL);
1554 assert(nchgcoefs != NULL);
1555 assert(cutoff != NULL);
1558 assert(consdata != NULL);
1563 if( consdata->nvars <= 1 )
1565 consdata->merged =
TRUE;
1569 assert(consdata->vars != NULL || consdata->nvars == 0);
1572 SCIPsortPtr((
void**)consdata->vars, SCIPvarCompActiveAndNegated, consdata->nvars);
1574 consdata->sorted =
FALSE;
1577 for( v = consdata->nvars - 1; v > 0; --v )
1587 var1 = consdata->vars[v];
1595 assert(var1 != NULL);
1597 var2 = consdata->vars[v-1];
1605 assert(var2 != NULL);
1613 if( negated1 != negated2 )
1623 for( i = consdata->nvars - 1; i >= 0; --i )
1624 if( i != v && i != (v-1) )
1629 SCIPdebugMsg(scip,
"setppc constraint <%s>: infeasible fixing <%s> == 0\n",
1656 SCIPdebugMsg(scip,
"setppc constraint <%s>: infeasible fixing <%s> == %g\n",
1672 consdata->changed =
TRUE;
1675 consdata->merged =
TRUE;
1702 assert(scip != NULL);
1703 assert(cons != NULL);
1706 assert(consdata != NULL);
1709 consdata->existmultaggr =
FALSE;
1712 while( v < consdata->nvars )
1716 var = consdata->vars[v];
1746 consvars[0] = repvar;
1752 if( requiredsize > nconsvars )
1758 assert(requiredsize <= nconsvars);
1766 for( v2 = nconsvars - 1; v2 >= 0; --v2 )
1772 SCIPerrorMessage(
"try to resolve a multi-aggregation with a non-binary variable <%s>\n", consvars[v2]);
1777 if( !
SCIPisEQ(scip, consvals[v2], 1.0) )
1787 for( v2 = consdata->nvars - 1; v2 > v; --v2 )
1794 if( v2 == v && nconsvars == 0 )
1799 if( nfixedvars != NULL )
1803 assert(cutoff != NULL);
1805 for( v2 = consdata->nvars - 1; v2 >= 0; --v2 )
1807 if( consdata->vars[v2] != var )
1809 SCIPdebugMsg(scip,
"trying to fix <%s> to 0 due to at least one variable is already fixed to 1\n",
SCIPvarGetName(consdata->vars[v2]));
1815 SCIPdebugMsg(scip,
"setppc constraint <%s>: infeasible fixing <%s> == 0\n",
1851 for( v2 = nconsvars - 1; v2 >= 0; --v2 )
1860 else if( (ndelconss != NULL && naddconss != NULL) ||
SCIPconsIsAdded(cons) )
1873 size =
MAX(nconsvars, 1) + consdata->nvars - 1;
1879 nconsvars = consdata->nvars;
1882 for( k = consdata->nvars - 1; k >= 0; --k )
1884 consvars[k] = consdata->vars[k];
1894 if( requiredsize > nconsvars )
1900 assert(requiredsize <= nconsvars);
1907 rhs = 1.0 - constant;
1911 lhs = 1.0 - constant;
1912 rhs = 1.0 - constant;
1917 lhs = 1.0 - constant;
1939 if( ndelconss != NULL && naddconss != NULL )
1960 SCIPwarningMessage(scip,
"setppc constraint <%s> has a multi-aggregated variable, which was not resolved and therefore could lead to aborts\n",
SCIPconsGetName(cons));
1986 consdata->existmultaggr =
FALSE;
2008 assert(consdata != NULL);
2015 for( v = 0; v < consdata->nvars; ++v )
2044 assert(consdata != NULL);
2052 for( v = 0; v < consdata->nvars && n < 2; ++v )
2084 assert(cons != NULL);
2087 assert(cutoff != NULL);
2088 assert(nfixedvars != NULL);
2089 assert(addcut != NULL);
2090 assert(mustcheck != NULL);
2093 oldnfixedvars = *nfixedvars;
2097 assert(consdata != NULL);
2098 assert(consdata->nvars == 0 || consdata->vars != NULL);
2099 assert(0 <= consdata->nfixedzeros && consdata->nfixedzeros <= consdata->nvars);
2100 assert(0 <= consdata->nfixedones && consdata->nfixedones <= consdata->nvars);
2108 if( consdata->nfixedones == 1 )
2121 if( consdata->nfixedzeros < consdata->nvars - 1 )
2134 SCIPdebugMsg(scip,
" -> fixing all other variables to zero in set packing/partitioning constraint <%s>\n",
2141 vars = consdata->vars;
2142 nvars = consdata->nvars;
2144 fixedonefound =
FALSE;
2146 for( v = 0; v < nvars && consdata->nfixedones == 1; ++v )
2153 assert(!infeasible);
2163 fixedonefound =
TRUE;
2169 assert(consdata->nfixedones >= 2 || (fixedonefound && *nfixedvars > oldnfixedvars));
2186 if( consdata->nfixedones >= 2 )
2210 else if( consdata->nfixedzeros == consdata->nvars )
2218 assert(consdata->nfixedones == 0);
2245 else if( consdata->nfixedzeros == consdata->nvars - 1 && consdata->nfixedones == 0 )
2272 vars = consdata->vars;
2273 nvars = consdata->nvars;
2274 for( v = 0; v < nvars; ++v )
2281 SCIPdebugMsg(scip,
" -> fixing remaining variable <%s> to one in set covering/partitioning constraint <%s>\n",
2284 assert(!infeasible);
2292 assert(consdata->nfixedzeros == consdata->nvars - 1);
2293 assert(consdata->nfixedones == 1);
2299 assert(consdata->nfixedzeros + consdata->nfixedones <= consdata->nvars);
2323 vars = consdata->vars;
2324 nvars = consdata->nvars;
2327 for( v = 0; v < nvars && sum < sumbound; ++v )
2337 absviol = sum - 1.0;
2339 switch( consdata->setppctype )
2381 assert(consdata != NULL);
2382 assert(consdata->row == NULL);
2384 switch( consdata->setppctype )
2421 assert( cutoff != NULL );
2425 assert(consdata != NULL);
2427 if( consdata->row == NULL )
2432 assert(consdata->row != NULL);
2460 assert(cons != NULL);
2463 assert(cutoff != NULL);
2464 assert(separated != NULL);
2465 assert(reduceddom != NULL);
2470 assert(consdata != NULL);
2471 assert(consdata->nvars == 0 || consdata->vars != NULL);
2472 assert(0 <= consdata->nfixedzeros && consdata->nfixedzeros <= consdata->nvars);
2473 assert(0 <= consdata->nfixedones && consdata->nfixedones <= consdata->nvars);
2476 if( lpfeas && consdata->row != NULL &&
SCIProwIsInLP(consdata->row) )
2488 *reduceddom = (nfixedvars > 0);
2501 if( lpfeas && consdata->row != NULL )
2510 addcut = !
checkCons(scip, consdata, sol);
2546 assert(cons != NULL);
2549 assert(cutoff != NULL);
2550 assert(infeasible != NULL);
2551 assert(reduceddom != NULL);
2552 assert(solvelp != NULL);
2557 *reduceddom = (nfixedvars > 0);
2566 assert(consdata != NULL);
2613 assert(consdata1->sorted);
2614 assert(consdata2->sorted);
2616 scip = (
SCIP*)userptr;
2617 assert(scip != NULL);
2621 if( consdata1->nvars != consdata2->nvars )
2626 for( i = 0; i < consdata1->nvars; ++i )
2629 if( consdata1->vars[i] != consdata2->vars[i] )
2631 assert(
SCIPvarCompare(consdata1->vars[i], consdata2->vars[i]) == 1 ||
2636 assert(
SCIPvarCompare(consdata1->vars[i], consdata2->vars[i]) == 0);
2653 scip = (
SCIP*)userptr;
2654 assert(scip != NULL);
2658 assert(consdata != NULL);
2659 assert(consdata->nvars > 0);
2667 assert(minidx >= 0 && minidx <= maxidx);
2679 int*
const cliquepartition,
2682 int*
const nusefulconss,
2684 int*
const nfixedvars,
2685 int*
const naddconss,
2686 int*
const ndelconss,
2687 int*
const nchgcoefs,
2698 assert(scip != NULL);
2699 assert(binvars != NULL || nbinvars == 0);
2700 assert(cliquepartition != NULL || nbinvars == 0);
2701 assert(ncliques >= 0 && ncliques <= nbinvars);
2702 assert(usefulconss != NULL);
2703 assert(nusefulconss != NULL);
2704 assert(nfixedvars != NULL);
2705 assert(naddconss != NULL);
2706 assert(ndelconss != NULL);
2707 assert(nchgcoefs != NULL);
2708 assert(cutoff != NULL);
2711 if( nbinvars == 0 || ncliques == 0 )
2714 assert(binvars != NULL);
2715 assert(cliquepartition != NULL);
2718 if( ncliques == nbinvars )
2724 for( c = 0; c < ncliques - 1; ++c )
2726 if( lastclqidx >= cliquepartition[c] )
2737 for( v = c; v < nbinvars - 1; ++v )
2739 if( cliquepartition[c] == cliquepartition[v] )
2767 assert(cliqueconsdata != NULL);
2770 if( !
SCIPconsIsDeleted(cliquecons) && nadded - cliqueconsdata->nfixedzeros >= 2 )
2772 assert(cliqueconsdata->nfixedones == 0);
2775 usefulconss[*nusefulconss] = cliquecons;
2784 lastclqidx = cliquepartition[c];
2800 int*
const nusefulconss,
2801 int*
const nfixedvars,
2802 int*
const ndelconss,
2803 int*
const nchgcoefs,
2811 int nlocaladdconss = 0;
2814 assert(scip != NULL);
2815 assert(conss != NULL || nconss == 0);
2816 assert(usefulconss != NULL);
2817 assert(nusefulconss != NULL);
2818 assert(nfixedvars != NULL);
2819 assert(ndelconss != NULL);
2820 assert(nchgcoefs != NULL);
2821 assert(cutoff != NULL);
2826 assert(conss != NULL);
2828 for( c = nconss - 1; c >= 0; --c )
2847 assert(nlocaladdconss == 0);
2854 assert(consdata != NULL);
2864 assert(consdata->nfixedones == 0);
2866 if( consdata->nvars == 0 )
2875 usefulconss[*nusefulconss] = cons;
2890 int const nusefulconss,
2892 int*
const nusefulvars,
2894 int*
const varnconss,
2895 int*
const maxnvarconsidx,
2896 int**
const varconsidxs,
2906 assert(scip != NULL);
2907 assert(usefulconss != NULL || nusefulconss == 0);
2908 assert(usefulvars != NULL);
2909 assert(nusefulvars != NULL);
2910 assert(vartoindex != NULL);
2911 assert(varnconss != NULL);
2912 assert(maxnvarconsidx != NULL);
2913 assert(varconsidxs != NULL);
2914 assert(maxnvars != NULL);
2916 if( nusefulconss == 0 )
2919 assert(usefulconss != NULL);
2921 for( c = nusefulconss - 1; c >= 0; --c )
2923 cons = usefulconss[c];
2928 assert(consdata != NULL);
2932 assert(consdata->merged);
2935 if( consdata->nvars > *maxnvars )
2936 *maxnvars = consdata->nvars;
2939 for( v = consdata->nvars - 1; v >= 0; --v )
2943 var = consdata->vars[v];
2944 assert(var != NULL);
2957 usefulvars[*nusefulvars] = var;
2959 varindex = *nusefulvars;
2975 if( varnconss[varindex] == maxnvarconsidx[varindex] )
2981 assert(varnconss[varindex] < maxnvarconsidx[varindex]);
2983 varconsidxs[varindex][varnconss[varindex]] = c;
2985 ++(varnconss[varindex]);
2998 int*
const varnconss,
2999 int**
const varconsidxs
3008 assert(var != NULL);
3010 assert(considx >= 0);
3011 assert(vartoindex != NULL);
3012 assert(varnconss != NULL);
3013 assert(varconsidxs != NULL);
3019 for( i = 0; i < varnconss[varindex]; ++i )
3021 if( varconsidxs[varindex][i] == considx )
3023 varconsidxs[varindex][i] = varconsidxs[varindex][varnconss[varindex] - 1];
3027 --(varnconss[varindex]);
3042 int*
const nusefulvars,
3044 int*
const varnconss,
3045 int*
const maxnvarconsidx,
3046 int**
const varconsidxs
3051 assert(scip != NULL);
3052 assert(addvar != NULL);
3054 assert(usefulvars != NULL);
3055 assert(nusefulvars != NULL);
3056 assert(vartoindex != NULL);
3057 assert(varnconss != NULL);
3058 assert(maxnvarconsidx != NULL);
3059 assert(varconsidxs != NULL);
3071 varindex = *nusefulvars;
3074 assert(varconsidxs[varindex] == NULL);
3076 maxnvarconsidx[varindex] = 1;
3078 varnconss[varindex] = 0;
3085 if( varnconss[varindex] == maxnvarconsidx[varindex] )
3091 assert(varnconss[varindex] < maxnvarconsidx[varindex]);
3092 varconsidxs[varindex][varnconss[varindex]] = considx;
3095 ++(varnconss[varindex]);
3117 int*
const naggregations,
3120 int*
const saggregations,
3124 int*
const nfixedvars,
3125 int*
const naggrvars,
3126 int*
const ndelconss,
3136 assert(scip != NULL);
3137 assert(cons != NULL);
3138 assert(nfixedvars != NULL);
3139 assert(naggrvars != NULL);
3140 assert(ndelconss != NULL);
3141 assert(cutoff != NULL);
3147 assert(consdata != NULL);
3149 if( consdata->presolpropagated )
3152 consdata->presolpropagated =
TRUE;
3154 vars = consdata->vars;
3155 nvars = consdata->nvars;
3181 if( consdata->nfixedones > 1 )
3197 SCIPdebugMsg(scip,
"set partitioning / packing constraint <%s> is infeasible, %d variables fixed to one\n",
SCIPconsGetName(cons), consdata->nfixedones);
3203 if( consdata->nfixedones == 1 )
3211 assert(vars != NULL);
3213 for( v = nvars - 1; v >= 0; --v )
3223 SCIPdebugMsg(scip,
"setppc constraint <%s>: infeasible fixing <%s> == 0\n",
3251 assert(vars != NULL);
3254 if( consdata->nfixedzeros == nvars )
3256 assert(consdata->nfixedones == 0);
3280 if( consdata->nfixedzeros + 1 == nvars )
3282 assert(consdata->nfixedones == 0);
3292 for( v = nvars - 1; v >= 0; --v )
3297 SCIPdebugMsg(scip,
"trying to fix <%s> to 1 due to it's the last unfixed variable is the set-partitioning/covering constraint\n",
SCIPvarGetName(vars[v]));
3303 SCIPdebugMsg(scip,
"setppc constraint <%s>: infeasible fixing <%s> == 1\n",
3334 for( v = nvars - 1; v >= 0; --v )
3352 assert(conshdlr != NULL);
3354 assert(conshdlrdata != NULL);
3364 SCIP_CALL( conshdlrdataDecVaruses(scip, conshdlrdata, var) );
3365 SCIP_CALL( conshdlrdataDecVaruses(scip, conshdlrdata, vars[v]) );
3372 SCIPdebugMsg(scip,
"set partitioning constraint <%s>: aggregate <%s> + <%s> == 1\n",
3380 SCIP_CALL( conshdlrdataIncVaruses(scip, conshdlrdata, var) );
3381 SCIP_CALL( conshdlrdataIncVaruses(scip, conshdlrdata, vars[v]) );
3398 assert(undoneaggrvars != NULL);
3399 assert(undoneaggrtypes != NULL);
3400 assert(naggregations != NULL);
3401 assert(saggregations != NULL);
3406 if( *saggregations == *naggregations )
3409 assert(*saggregations > *naggregations);
3418 assert(undoneaggrtypes[*naggregations] ==
FALSE);
3419 undoneaggrvars[2 * (*naggregations)] = var;
3420 undoneaggrvars[2 * (*naggregations) + 1] = vars[v];
3454 int const nusefulconss,
3456 int*
const nusefulvars,
3458 int*
const varnconss,
3459 int*
const maxnvarconsidx,
3460 int**
const varconsidxs,
3461 int*
const countofoverlapping,
3473 int*
const naggregations,
3474 int*
const saggregations,
3478 int*
const nfixedvars,
3479 int*
const naggrvars,
3480 int*
const nchgcoefs,
3481 int*
const ndelconss,
3504 assert(scip != NULL);
3505 assert(cons != NULL);
3506 assert(usefulconss != NULL && nusefulconss > 0);
3507 assert(0 <= considx && considx < nusefulconss);
3508 assert(usefulconss[considx] == cons);
3509 assert(0 <= endidx && endidx <= nusefulconss);
3510 assert(countofoverlapping != NULL);
3511 assert(chgcons != NULL);
3512 assert(undoneaggrvars != NULL);
3513 assert(undoneaggrtypes != NULL);
3514 assert(naggregations != NULL);
3515 assert(saggregations != NULL);
3516 assert(nfixedvars != NULL);
3517 assert(naggrvars != NULL);
3518 assert(nchgcoefs != NULL);
3519 assert(ndelconss != NULL);
3520 assert(cutoff != NULL);
3526 assert(consdata != NULL);
3528 nvars = consdata->nvars;
3533 vars = consdata->vars;
3534 assert(vars != NULL);
3536 oldnfixedzeros = consdata->nfixedzeros;
3537 overlapdestroyed =
FALSE;
3540 for( c = endidx - 1; c >= 0; --c )
3542 cons1 = usefulconss[c];
3551 assert(usefulconss[c] != cons);
3554 oldnaggrvars = *naggrvars;
3560 SCIP_CALL(
presolvePropagateCons(scip, cons1,
FALSE, undoneaggrvars, undoneaggrtypes, naggregations, saggregations, nfixedvars, naggrvars, ndelconss, cutoff) );
3566 assert(*naggrvars == oldnaggrvars);
3572 assert(consdata1 != NULL);
3574 nvars1 = consdata1->nvars;
3580 assert(countofoverlapping[c] <= nvars1);
3583 assert(consdata1->nfixedones == 0);
3588 if( !overlapdestroyed && countofoverlapping[c] == nvars - consdata->nfixedzeros )
3592 if( nvars - consdata->nfixedzeros < nvars1 )
3600 assert(consdata->merged);
3601 assert(consdata1->merged);
3603 vars1 = consdata1->vars;
3604 assert(vars1 != NULL);
3609 consdata1->sorted =
FALSE;
3612 for( v = nvars - 1, v1 = nvars1 - 1; v >= 0 && v1 >= 0; )
3667 SCIPdebugMsg(scip,
"trying to fix <%s> to 0 because it is in the same clique with a complete set partitioning constraint\n",
SCIPvarGetName(vars1[v1]));
3688 assert(negated0 == negated1);
3695 for( ; v1 >= 0; --v1)
3700 SCIPdebugMsg(scip,
"trying to fix <%s> to 0 because it is in the same clique with a complete set partitioning constraint\n",
SCIPvarGetName(vars1[v1]));
3720 SCIPdebugMsg(scip,
"all variables in the set-partitioning constraint <%s> are fixed to zero, this leads to a cutoff\n",
SCIPconsGetName(cons1));
3755 else if( (!overlapdestroyed && countofoverlapping[c] + consdata1->nfixedzeros == nvars1) || countofoverlapping[c] == nvars1 )
3760 const int oldnfixedvars = *nfixedvars;
3766 assert(consdata->merged);
3767 assert(consdata1->merged);
3769 vars1 = consdata1->vars;
3774 consdata1->sorted =
FALSE;
3777 for( v = nvars - 1, v1 = nvars1 - 1; v >= 0 && v1 >= 0; )
3832 SCIPdebugMsg(scip,
"trying to fix <%s> to 0 because it is in the same clique with a complete set partitioning constraint\n",
SCIPvarGetName(var));
3857 assert(negated0 == negated1);
3870 SCIPdebugMsg(scip,
"trying to fix <%s> to 0 because it is in the same clique with a complete set partitioning constraint\n",
SCIPvarGetName(vars[v]));
3889 SCIPdebugMsg(scip,
"all variables in the set-partitioning constraint <%s> are fixed to zero, this leads to a cutoff\n",
SCIPconsGetName(cons1));
3908 if( oldnfixedvars < *nfixedvars )
3909 overlapdestroyed =
TRUE;
3939 assert(consdata->merged);
3940 assert(consdata1->merged);
3942 vars1 = consdata1->vars;
3947 consdata1->sorted =
FALSE;
3950 for( v = nvars - 1, v1 = nvars1 - 1; v >= 0 && v1 >= 0; )
3997 assert(aggvar1 == NULL);
4000 if( aggvar2 != NULL )
4008 assert(aggvar2 == NULL);
4009 aggvar2 = vars1[v1];
4011 if( aggvar1 != NULL )
4021 if( negated0 != negated1 )
4026 SCIPdebugMsg(scip,
"two set-partitioning constraint <%s> and <%s> have only one variable not in common, but this variable <%s> appears in one constraint as the negated version as in the other constraint\n",
SCIPconsGetName(cons),
SCIPconsGetName(cons1),
SCIPvarGetName(vars[v]));
4037 if( aggvar1 == NULL && aggvar2 == NULL )
4041 if( aggvar2 == NULL )
4043 for( ; v1 >= 0; --v1)
4048 aggvar2 = vars1[v1];
4053 else if( aggvar1 == NULL )
4067 if( aggvar1 == NULL || aggvar2 == NULL )
4073 if( *saggregations == *naggregations )
4076 assert(*saggregations > *naggregations);
4085 undoneaggrtypes[*naggregations] =
TRUE;
4086 undoneaggrvars[2 * (*naggregations)] = aggvar1;
4087 undoneaggrvars[2 * (*naggregations) + 1] = aggvar2;
4105 else if( shrinking && !overlapdestroyed && countofoverlapping[c] > 1 && ((consdata->setppctype ==
SCIP_SETPPCTYPE_PARTITIONING && countofoverlapping[c] == nvars - oldnfixedzeros - 1) || (consdata1->setppctype ==
SCIP_SETPPCTYPE_PARTITIONING && countofoverlapping[c] == nvars1 - 1)) )
4117 int constochangeidx;
4119 const int oldnchgcoefs = *nchgcoefs;
4127 assert(consdata->merged);
4128 assert(consdata1->merged);
4131 SCIPsortDownPtr((
void**)(consdata1->vars), SCIPvarCompActiveAndNegated, nvars1);
4133 consdata1->sorted =
FALSE;
4139 varstochange = consdata1->vars;
4140 nvarstostay = nvars;
4141 nvarstochange = nvars1;
4143 constochange = cons1;
4144 consdatachange = consdata1;
4145 constochangeidx = c;
4149 varstostay = consdata1->vars;
4150 varstochange = vars;
4151 nvarstostay = nvars1;
4152 nvarstochange = nvars;
4154 constochange = cons;
4155 consdatachange = consdata;
4156 constochangeidx = considx;
4164 for( v = nvarstostay - 1, v1 = nvarstochange - 1; v >= 0 && v1 >= 0; )
4185 var = varstostay[v];
4198 var1 = varstochange[v1];
4211 assert(addvar == NULL);
4212 addvar = varstostay[v];
4225 if( negated0 != negated1 )
4227 assert(addvar == NULL);
4229 SCIPdebugMsg(scip,
"-> trying to fix <%s> to 0 because it would exist twice in a constraint\n",
SCIPvarGetName(varstochange[v1]));
4244 SCIP_CALL(
presolvePropagateCons(scip, constostay,
FALSE, NULL, NULL, NULL, NULL, nfixedvars, naggrvars, ndelconss, cutoff) );
4263 assert(addvar != NULL || v >= 0);
4265 assert(*nchgcoefs - oldnchgcoefs == countofoverlapping[c]);
4268 if( addvar == NULL )
4278 addvar = varstostay[v];
4282 assert(addvar != NULL);
4286 assert(addvar != NULL);
4294 consdatachange->merged =
TRUE;
4295 assert(constochangeidx == (cons == constochange ? considx : c));
4319 int*
const nusefulvars,
4326 int*
const varnconss,
4327 int*
const maxnvarconsidx,
4328 int**
const varconsidxs,
4336 int*
const nfixedvars,
4337 int*
const ndelconss,
4353 assert(scip != NULL);
4354 assert(cons != NULL);
4355 assert(usefulvars != NULL);
4356 assert(cliquevalues != NULL);
4357 assert(*cliquevalues != NULL);
4358 assert(vartoindex != NULL);
4359 assert(varnconss != NULL);
4360 assert(maxnvarconsidx != NULL);
4361 assert(varconsidxs != NULL);
4362 assert(maxnvars != NULL);
4363 assert(nadded != NULL);
4364 assert(chgcons != NULL);
4365 assert(nfixedvars != NULL);
4366 assert(ndelconss != NULL);
4367 assert(cutoff != NULL);
4373 assert(consdata != NULL);
4375 nvars = consdata->nvars;
4380 assert(nvars <= *maxnvars);
4382 vars = consdata->vars;
4383 assert(vars != NULL);
4388 for( v = nvars - 1; v >= 0 && v1 >= 0; )
4416 assert(consdata->merged);
4419 if( (*cliquevalues)[v] )
4430 var1 = usefulvars[v1];
4455 for( k = nvars - 1; k >= 0; --k )
4463 if( (*cliquevalues)[k] )
4486 if( value != (*cliquevalues)[v] )
4491 assert(nvars <= consdata->nvars);
4494 for( k = nvars - 1; k >= 0; --k )
4503 if( k == nottocheck )
4506 if( (*cliquevalues)[k] )
4537 if( nottocheck >= 0 )
4540 assert(nvars <= consdata->nvars);
4541 assert(consdata->merged);
4544 for( k = consdata->nvars - 1; k >= 0; --k )
4553 if( k != nottocheck )
4555 SCIPdebugMsg(scip,
"trying to fix <%s> to 0 because we could lift a negated variable of another constraint variable\n",
SCIPvarGetName(vars[k]));
4576 SCIPdebugMsg(scip,
"trying to fix <%s> to 1 due to this setpartitioning variable is with its negated in the same clique\n",
SCIPvarGetName(vars[nottocheck]));
4591 SCIPdebugMsg(scip,
" -> deleting constraint <%s> number <%d> due to active and negated variable in the same clique constraint\n",
SCIPconsGetName(cons), arraypos);
4601 SCIPdebugMsg(scip,
"trying to fix <%s> to 0 because this variable is in the same clique with a set partition\n",
SCIPvarGetName(usefulvars[v1 + 1]));
4623 addvar = usefulvars[v1 + 1];
4632 consdata->merged =
TRUE;
4644 vars = consdata->vars;
4645 nvars = consdata->nvars;
4650 if( (*maxnvars) < nvars )
4652 while( (*maxnvars) < nvars )
4667 for( ; v1 >= 0; --v1)
4675 var1 = usefulvars[v1];
4686 assert(nvars <= consdata->nvars);
4689 for( k = nvars - 1; k >= 0; --k )
4698 if( (*cliquevalues)[k] )
4720 SCIPdebugMsg(scip,
"trying to fix <%s> to 0 because this variable is in the same clique with a set partition\n",
SCIPvarGetName(usefulvars[v1]));
4742 addvar = usefulvars[v1];
4751 consdata->merged =
TRUE;
4763 vars = consdata->vars;
4764 nvars = consdata->nvars;
4769 if( (*maxnvars) < nvars )
4771 while( (*maxnvars) < nvars )
4795 int const naggregations,
4796 int*
const naggrvars,
4806 assert(scip != NULL);
4807 assert(conshdlrdata != NULL);
4808 assert(undoneaggrvars != NULL);
4809 assert(undoneaggrtypes != NULL);
4810 assert(naggregations > 0);
4811 assert(naggrvars != NULL);
4812 assert(cutoff != NULL);
4815 for( a = 0; a < naggregations; ++a )
4817 var1 = undoneaggrvars[2 * a];
4818 var2 = undoneaggrvars[2 * a + 1];
4819 assert(var1 != NULL);
4820 assert(var2 != NULL);
4828 SCIP_CALL( conshdlrdataDecVaruses(scip, conshdlrdata, var1) );
4829 SCIP_CALL( conshdlrdataDecVaruses(scip, conshdlrdata, var2) );
4833 if( undoneaggrtypes[a] )
4856 SCIP_CALL( conshdlrdataIncVaruses(scip, conshdlrdata, var1) );
4857 SCIP_CALL( conshdlrdataIncVaruses(scip, conshdlrdata, var2) );
4875 int*
const firstchange,
4876 int*
const firstclique,
4877 int*
const lastclique,
4878 int*
const nfixedvars,
4879 int*
const naggrvars,
4880 int*
const ndelconss,
4881 int*
const nchgcoefs,
4892 int* maxnvarconsidx;
4893 int* countofoverlapping = NULL;
4914 assert(scip != NULL);
4915 assert(conshdlrdata != NULL);
4916 assert(conss != NULL || nconss == 0);
4917 assert(firstchange != NULL);
4918 assert(firstclique != NULL);
4919 assert(lastclique != NULL);
4920 assert(nfixedvars != NULL);
4921 assert(naggrvars != NULL);
4922 assert(ndelconss != NULL);
4923 assert(nchgcoefs != NULL);
4924 assert(cutoff != NULL);
4936 susefulvars = 2 * nvars;
4942 saggregations = nvars;
4963 if( conshdlrdata->nclqpresolve == 0 && conshdlrdata->addvariablesascliques )
4967 int* cliquepartition;
4994 nrounds, nfixedvars, &naddconss, ndelconss, nchgcoefs, cutoff) );
4999 *ndelconss -= naddconss;
5019 if( nusefulconss <= 1 )
5032 SCIP_CALL(
collectCliqueData(scip, usefulconss, nusefulconss, usefulvars, &nusefulvars, vartoindex, varnconss, maxnvarconsidx, varconsidxs, &maxnvars) );
5033 assert(maxnvars > 0);
5041 SCIPsortDownPtr((
void**)usefulvars, SCIPvarCompActiveAndNegated, nusefulvars);
5044 for( c = nusefulconss - 1; c >= 0 && !
SCIPisStopped(scip); --c )
5052 int cons0fixedzeros;
5055 const int oldnaggrvars = *naggrvars;
5057 cons0 = usefulconss[c];
5065 SCIP_CALL(
presolvePropagateCons(scip, cons0,
FALSE, undoneaggrvars, undoneaggrtypes, &naggregations, &saggregations, nfixedvars, naggrvars, ndelconss, cutoff) );
5071 assert(*naggrvars == oldnaggrvars);
5078 assert(consdata != NULL);
5080 cons0vars = consdata->vars;
5081 ncons0vars = consdata->nvars;
5084 SCIPsortDownPtr((
void**)cons0vars, SCIPvarCompActiveAndNegated, ncons0vars);
5086 consdata->sorted =
FALSE;
5089 assert(maxnvars >= ncons0vars);
5095 for( v = ncons0vars - 1; v >= 0 ; --v )
5097 var0 = cons0vars[v];
5106 for( v1 = varnconss[varindex] - 1; v1 >= 0 ; --v1 )
5107 ++(countofoverlapping[varconsidxs[varindex][v1]]);
5110 oldnchgcoefs = *nchgcoefs;
5111 cons0fixedzeros = consdata->nfixedzeros;
5117 varnconss, maxnvarconsidx, varconsidxs, countofoverlapping, conshdlrdata->cliqueshrinking, &chgcons0,
5118 undoneaggrvars, undoneaggrtypes, &naggregations, &saggregations,
5119 nfixedvars, naggrvars, nchgcoefs, ndelconss, cutoff) );
5125 assert(*naggrvars == oldnaggrvars);
5128 if( chgcons0 && *nchgcoefs > oldnchgcoefs )
5131 assert(consdata != NULL);
5133 cons0vars = consdata->vars;
5134 ncons0vars = consdata->nvars;
5137 SCIPsortDownPtr((
void**)cons0vars, SCIPvarCompActiveAndNegated, ncons0vars);
5139 consdata->sorted =
FALSE;
5143 if( consdata->nfixedones > 0 || consdata->nfixedzeros > cons0fixedzeros )
5148 SCIP_CALL(
presolvePropagateCons(scip, cons0,
FALSE, undoneaggrvars, undoneaggrtypes, &naggregations, &saggregations, nfixedvars, naggrvars, ndelconss, cutoff) );
5154 assert(*naggrvars == oldnaggrvars);
5171 v1 = nusefulvars - 1;
5175 if( conshdlrdata->nclqpresolve > 0 )
5176 v1 = nusefulvars - 1;
5180 (void)
SCIPsortedvecFindDownPtr((
void**)usefulvars, SCIPvarCompActiveAndNegated, (
void*)cons0vars[ncons0vars - 1], nusefulvars, &v1);
5181 assert(v1 >= 0 && v1 < nusefulvars);
5189 assert(maxnvars >= ncons0vars);
5191 for( v = ncons0vars - 1; v >= 0; --v )
5206 maxnvarconsidx, varconsidxs, &maxnvars, &nadded, &chgcons0, nfixedvars, ndelconss, cutoff) );
5219 *firstchange = MIN(*firstchange, c);
5220 *firstclique = MIN(*firstclique, c);
5221 *lastclique =
MAX(*lastclique, c);
5225 cons0vars = consdata->vars;
5226 ncons0vars = consdata->nvars;
5231 SCIPsortDownPtr((
void**)cons0vars, SCIPvarCompActiveAndNegated, ncons0vars);
5233 consdata->sorted =
FALSE;
5238 for( v = ncons0vars - 1; v >= 0 ; --v )
5240 var0 = cons0vars[v];
5249 for( i = varnconss[varindex] - 1; i >= 0 ; --i )
5250 ++(countofoverlapping[varconsidxs[varindex][i]]);
5257 usefulconss, nusefulconss, usefulvars, &nusefulvars, vartoindex, varnconss, maxnvarconsidx, varconsidxs,
5258 countofoverlapping, conshdlrdata->cliqueshrinking, &chgcons0,
5259 undoneaggrvars, undoneaggrtypes, &naggregations, &saggregations,
5260 nfixedvars, naggrvars, nchgcoefs, ndelconss, cutoff) );
5266 assert(*naggrvars == oldnaggrvars);
5277 for( c = nusefulvars; c > 0; --c )
5279 if( varconsidxs[c] != NULL )
5305 if( *ndelconss < 0 )
5332 assert(scip != NULL);
5333 assert(firstclique >= 0);
5334 assert(lastclique <= nconss);
5335 assert(conss != NULL || ((nconss == 0) && (lastclique == 0)));
5338 for( c = firstclique; c < lastclique; ++c )
5341 assert(cons != NULL);
5349 *nchgbds += nlocalbdchgs;
5355 assert(consdata != NULL);
5360 if( !consdata->cliqueadded && consdata->nvars >= 2 )
5367 *nchgbds += nlocalbdchgs;
5380 *nchgbds += nlocalbdchgs;
5388 consdata->cliqueadded =
TRUE;
5411 assert(scip != NULL);
5412 assert(vars != NULL);
5414 assert(0 <= pos && pos < nvars);
5415 assert(infeasible != NULL);
5416 assert(aggregated != NULL);
5426 assert(*infeasible || *aggregated);
5431 if( !linearconshdlrexist )
5435 if( pos == nvars - 1 )
5441 tmpvars[pos] = tmpvars[nvars - 1];
5446 for( v = nvars - 2; v >= 0; --v )
5453 assert(!(*infeasible));
5457 if( pos < nvars - 1 )
5459 assert(tmpvars != vars);
5530 int posreplacements;
5531 int nhashmapentries;
5536 assert(scip != NULL);
5537 assert(conss != NULL);
5539 assert(nfixedvars != NULL);
5540 assert(naggrvars != NULL);
5541 assert(ndelconss != NULL);
5542 assert(nchgcoefs != NULL);
5543 assert(nchgsides != NULL);
5553 for( v = nposbinvars - 1; v >= 0; --v )
5562 if( (nuplocks == 1 && ndownlocks <= 1) || (nuplocks <= 1 && ndownlocks == 1) || (nuplocks <= 2 && ndownlocks <= 2 &&
SCIPvarGetNegatedVar(binvars[v]) != NULL) )
5567 SCIPdebugMsg(scip,
"found %d binary variables for possible multi-aggregation\n", nposvars);
5584 SCIPsortPtr((
void**)usefulconss, setppcConssSort2, nconss);
5586 posreplacements = 0;
5587 nhashmapentries = 0;
5591 assert(!donotaggr || !donotmultaggr);
5599 for( c = 0; c < nconss; ++c )
5606 cons = usefulconss[c];
5607 assert(cons != NULL);
5613 assert(consdata != NULL);
5644 oldnfixedvars = *nfixedvars;
5655 if( oldnfixedvars < *nfixedvars )
5660 assert(nlocaladdconss == 0);
5668 if( consdata->nvars < 2 )
5686 if( consdata->nvars == 0 )
5697 assert(!infeasible);
5720 var = consdata->vars[0];
5721 assert(var != NULL);
5728 if( nuplocks == 1 && objval <= 0 )
5751 var = consdata->vars[1];
5752 assert(var != NULL);
5759 if( nuplocks == 1 && objval <= 0 )
5788 SCIP_CALL(
SCIPaggregateVars(scip, consdata->vars[0], consdata->vars[1], 1.0, 1.0, 1.0, &infeasible, &redundant, &aggregated) );
5806 if( ndecs >= nposvars )
5814 assert(nposbinvars >= consdata->nvars);
5817 for( v = consdata->nvars - 1; v >= 0; --v )
5820 int deleteconsindex = -1;
5822 var = consdata->vars[v];
5823 assert(var != NULL);
5829 assert(nuplocks >= 1 && ndownlocks >= 0);
5833 assert(nuplocks == 1 && ndownlocks <= 1);
5836 if( ndownlocks == 0 )
5850 assert(!infeasible);
5857 SCIPdebugMsg(scip,
"multi-aggregating in set-packing constraint\n");
5893 considxs[nhashmapentries - 1] = c;
5894 posincons[nhashmapentries - 1] = v;
5902 assert(image > 0 && image <= nhashmapentries);
5904 consindex = considxs[image - 1];
5905 assert(0 <= consindex && consindex < nconss);
5908 assert(consindex < c);
5912 assert(posreplacements >= 0);
5914 varindex = posincons[image - 1];
5915 considxs[image - 1] = -1;
5916 posincons[image - 1] = -1;
5924 assert(aggrconsdata != NULL);
5926 assert(0 <= varindex);
5931 if( varindex >= aggrconsdata->nvars || aggrconsdata->vars[varindex] != negvar )
5938 assert(aggrconsdata->nvars >= 2);
5940 for( v2 = aggrconsdata->nvars - 1; v2 >= 0; --v2 )
5942 if( aggrconsdata->vars[v2] == negvar )
5949 assert(0 <= varindex && varindex < aggrconsdata->nvars);
5950 assert(aggrconsdata->vars[varindex] == negvar);
5957 multaggridx = consindex;
5964 notmultaggridx = consindex;
5968 SCIPdebugMsg(scip,
"multi-aggregating in two set-packing constraint\n");
5973 if( multaggridx == c )
5981 deleteconsindex = multaggridx;
5986 if( multaggridx == c )
5994 deleteconsindex = notmultaggridx;
6003 assert(deleteconsindex >= 0 && deleteconsindex <= c);
6009 SCIPdebugMsg(scip,
"multi-aggregating in set-partitioning constraint\n");
6034 assert(image > 0 && image <= nhashmapentries);
6036 assert(0 <= considxs[image - 1] && considxs[image - 1] < nconss);
6037 assert(
SCIPconsIsDeleted(usefulconss[considxs[image - 1]]) || chgtype[considxs[image - 1]] || (0 <= posincons[image - 1] && posincons[image - 1] <
SCIPconsGetData(usefulconss[considxs[image - 1]])->nvars));
6039 considxs[image - 1] = -1;
6040 posincons[image - 1] = -1;
6045 assert(posreplacements >= 0);
6059 considxs[nhashmapentries - 1] = c;
6060 posincons[nhashmapentries - 1] = v;
6077 assert(!chgtype[c]);
6080 assert(image > 0 && image <= nhashmapentries);
6082 consindex = considxs[image - 1];
6083 assert(0 <= consindex && consindex < nconss);
6086 assert(consindex < c);
6090 assert(posreplacements >= 0);
6092 varindex = posincons[image - 1];
6093 considxs[image - 1] = -1;
6094 posincons[image - 1] = -1;
6104 assert(aggrconsdata != NULL);
6110 assert(!dualpresolvingenabled || nuplocks + ndownlocks > 2);
6120 if( chgtype[consindex] )
6128 for( v2 = aggrconsdata->nvars - 1; v2 >= 0; --v2 )
6137 SCIPdebugMsg(scip,
"multi-aggregating in one set-partitioning or one set-packing constraint\n");
6147 assert(deleteconsindex == -1);
6159 assert(0 <= varindex && varindex < aggrconsdata->nvars);
6163 SCIPdebugMsg(scip,
"multi-aggregating in two set-partitioning or one set-partitioning and -packing constraint\n");
6175 cons = usefulconss[consindex];
6176 assert(deleteconsindex == -1);
6182 assert(nuplocks >= 1 && ndownlocks >= 0);
6187 assert(deleteconsindex < 0);
6194 assert(deleteconsindex < 0);
6199 SCIPdebugMsg(scip,
"changing constraint <%s> from set-partitioning to set-packing, due to multi-aggregation\n",
SCIPconsGetName(cons));
6208 if( deleteconsindex >= 0 )
6210 SCIPdebugMsg(scip,
"1: deleting redundant constraint <%s>, due to multi-aggregation\n",
SCIPconsGetName(usefulconss[deleteconsindex]));
6263 assert(scip != NULL);
6264 assert(blkmem != NULL);
6265 assert(conss != NULL || nconss == 0);
6266 assert(firstchange != NULL);
6267 assert(ndelconss != NULL);
6268 assert(nchgsides != NULL);
6273 assert(conss != NULL);
6276 hashtablesize = nconss;
6279 hashGetKeySetppccons, hashKeyEqSetppccons, hashKeyValSetppccons, (
void*) scip) );
6282 for( c = 0; c < nconss; ++c )
6310 assert(consdata0 != NULL && consdata1 != NULL);
6311 assert(consdata0->nvars >= 1 && consdata0->nvars == consdata1->nvars);
6313 assert(consdata0->sorted && consdata1->sorted);
6314 assert(consdata0->vars[0] == consdata1->vars[0]);
6316 SCIPdebugMsg(scip,
"setppc constraints <%s> and <%s> have identical variable sets\n",
6364 assert(ndelconss != NULL);
6366 SCIPdebugMsg(scip,
" -> removing setppc constraint <%s> which is redundant to <%s>\n",
6396 assert(cutoff != NULL);
6397 assert(nfixedvars != NULL);
6404 assert(consdata0 != NULL);
6405 assert(consdata1 != NULL);
6406 assert(consdata0->nvars < consdata1->nvars);
6407 assert(consdata0->sorted);
6408 assert(consdata1->sorted);
6411 for( v0 = 0, v1 = 0; v0 < consdata0->nvars && !(*cutoff); ++v0, ++v1 )
6415 assert(v1 < consdata1->nvars);
6417 for( ;
SCIPvarGetIndex(consdata1->vars[v1]) < index0 && !(*cutoff); ++v1 )
6428 assert(v1 < consdata1->nvars-1);
6434 for( ; v1 < consdata1->nvars && !(*cutoff); ++v1 )
6438 assert(consdata0->nvars == 0
6468 assert(cutoff != NULL);
6469 assert(nfixedvars != NULL);
6470 assert(ndelconss != NULL);
6471 assert(nchgsides != NULL);
6478 assert(consdata0 != NULL);
6479 assert(consdata1 != NULL);
6480 assert(consdata0->nvars < consdata1->nvars);
6481 assert(consdata0->sorted);
6482 assert(consdata1->sorted);
6484 switch( consdata0->setppctype )
6487 switch( consdata1->setppctype )
6512 switch( consdata1->setppctype )
6535 switch( consdata1->setppctype )
6584 uint64_t signature0;
6588 assert(scip != NULL);
6589 assert(conss != NULL);
6590 assert(cutoff != NULL);
6591 assert(nfixedvars != NULL);
6592 assert(ndelconss != NULL);
6593 assert(nchgsides != NULL);
6598 cons0 = conss[chkind];
6603 assert(consdata0 != NULL);
6604 assert(consdata0->nvars >= 1);
6613 cons0changed = consdata0->changed;
6614 consdata0->changed =
FALSE;
6615 for( c = (cons0changed ? 0 : firstchange); c < chkind && !(*cutoff) &&
SCIPconsIsActive(cons0); ++c )
6619 uint64_t signature1;
6620 uint64_t jointsignature;
6633 assert(consdata1 != NULL);
6642 jointsignature = (signature0 | signature1);
6643 if( jointsignature != signature0 && jointsignature != signature1 )
6647 cons0iscontained = (consdata0->nvars <= consdata1->nvars);
6648 cons1iscontained = (consdata1->nvars <= consdata0->nvars);
6651 while( v0 < consdata0->nvars && v1 < consdata1->nvars )
6658 if( index0 < index1 )
6660 cons0iscontained =
FALSE;
6661 if( !cons1iscontained )
6663 for( v0++; v0 < consdata0->nvars &&
SCIPvarGetIndex(consdata0->vars[v0]) < index1; v0++ )
6666 else if( index1 < index0 )
6668 cons1iscontained =
FALSE;
6669 if( !cons0iscontained )
6671 for( v1++; v1 < consdata1->nvars &&
SCIPvarGetIndex(consdata1->vars[v1]) < index0; v1++ )
6680 cons0iscontained = cons0iscontained && (v0 == consdata0->nvars);
6681 cons1iscontained = cons1iscontained && (v1 == consdata1->nvars);
6683 if( cons0iscontained && cons1iscontained )
6685 SCIPdebugMsg(scip,
"setppc constraints <%s> and <%s> have identical variable sets\n",
6691 if( consdata0->setppctype == consdata1->setppctype )
6720 else if( cons0iscontained )
6728 else if( cons1iscontained )
6755 assert(scip != NULL);
6756 assert(conshdlr != NULL);
6757 assert(conss != NULL);
6758 assert(nconss >= 0);
6762 for( i = 0; i < nconss; i++ )
6767 if( consdata->varsdeleted )
6770 for( v = consdata->nvars - 1; v >= 0; v-- )
6777 consdata->varsdeleted =
FALSE;
6801 assert(conshdlr != NULL);
6803 assert(nconss == 0 || conss != NULL);
6804 assert(result != NULL);
6806 SCIPdebugMsg(scip,
"Enforcing %d set partitioning / packing / covering constraints for %s solution\n", nconss,
6807 sol == NULL ?
"LP" :
"relaxation");
6816 for( c = 0; c < nusefulconss && !cutoff && !reduceddom; ++c )
6822 for( c = nusefulconss; c < nconss && !cutoff && !separated && !reduceddom; ++c )
6830 if( (sol == NULL) && !cutoff && !separated && !reduceddom )
6833 SCIP_CALL( branchLP(scip, conshdlr, result) );
6843 else if( separated )
6845 else if( reduceddom )
6894 assert(scip != NULL);
6898 if( conshdlr == NULL )
6900 SCIPerrorMessage(
"set partitioning / packing / covering constraint handler not found\n");
6917 SCIP_CALL(
SCIPcreateCons(scip, cons, name, conshdlr, consdata, initial, separate, enforce, check, propagate,
6918 local, modifiable, dynamic, removable, stickingatnode) );
6921 assert(conshdlrdata != NULL);
6925 ++(conshdlrdata->nsetpart);
6926 assert(conshdlrdata->nsetpart >= 0);
6932 assert(conshdlrdata->eventhdlr != NULL);
6980 assert(nvars == 0 || vars != NULL);
6981 assert(nvars == 0 || vals != NULL);
6982 assert(mult == +1 || mult == -1);
6988 for( v = 0; v < nvars; ++v )
6990 if( mult * vals[v] > 0.0 )
6991 transvars[v] = vars[v];
6996 assert(transvars[v] != NULL);
7001 initial, separate, enforce, check, propagate, local, modifiable, dynamic, removable, stickingatnode) );
7013 assert(upgdcons != NULL);
7031 if( nposbin + nnegbin + nposimplbin + nnegimplbin == nvars && ncoeffspone + ncoeffsnone == nvars )
7035 if(
SCIPisEQ(scip, lhs, rhs) && (
SCIPisEQ(scip, lhs, 1.0 - ncoeffsnone) ||
SCIPisEQ(scip, lhs, ncoeffspone - 1.0)) )
7040 mult =
SCIPisEQ(scip, lhs, 1.0 - ncoeffsnone) ? +1 : -1;
7101 assert( scip != NULL );
7102 assert( cons != NULL );
7103 assert( nupgdconss != NULL );
7104 assert( upgdconss != NULL );
7147 coefx /= term->
coef;
7148 coefy /= term->
coef;
7160 if( !
SCIPisEQ(scip, rhs, -coefx * coefy) )
7165 vars[0] = quadvarterms[0].
var;
7169 assert(
SCIPisEQ(scip, coefy, -1.0));
7175 vars[1] = quadvarterms[1].
var;
7179 assert(
SCIPisEQ(scip, coefx, -1.0));
7209 assert(scip != NULL);
7210 assert(conshdlr != NULL);
7227 assert(conshdlr != NULL);
7229 assert(scip != NULL);
7233 assert(conshdlrdata != NULL);
7248 assert(conshdlr != NULL);
7250 assert(scip != NULL);
7254 assert(conshdlrdata != NULL);
7256 conshdlrdata->noldfixedvars = 0;
7257 conshdlrdata->noldimpls = 0;
7258 conshdlrdata->noldcliques = 0;
7259 conshdlrdata->noldupgrs = 0;
7260 conshdlrdata->nclqpresolve = 0;
7261 conshdlrdata->updatedsetppctype =
FALSE;
7262 conshdlrdata->enablecliquelifting =
TRUE;
7274 assert(scip != NULL);
7275 assert(conshdlr != NULL);
7277 for( c = 0; c < nconss; ++c )
7297 for( c = 0; c < nconss; ++c )
7300 assert(consdata != NULL);
7302 if( consdata->row != NULL )
7318 assert(conshdlr != NULL);
7323 assert(conshdlrdata != NULL);
7324 assert(conshdlrdata->eventhdlr != NULL);
7330 --(conshdlrdata->nsetpart);
7331 assert(conshdlrdata->nsetpart >= 0);
7358 assert(conshdlr != NULL);
7361 assert(sourcecons != NULL);
7362 assert(targetcons != NULL);
7366 assert(conshdlrdata != NULL);
7367 assert(conshdlrdata->eventhdlr != NULL);
7370 assert(sourcedata != NULL);
7371 assert(sourcedata->row == NULL);
7386 ++(conshdlrdata->nsetpart);
7387 assert(conshdlrdata->nsetpart >= 0);
7403 *infeasible =
FALSE;
7405 for( c = 0; c < nconss && !(*infeasible); ++c )
7424 assert(conshdlr != NULL);
7426 assert(nconss == 0 || conss != NULL);
7427 assert(result != NULL);
7429 SCIPdebugMsg(scip,
"separating %d/%d set partitioning / packing / covering constraints\n", nusefulconss, nconss);
7438 for( c = 0; c < nusefulconss && !cutoff; ++c )
7449 else if( reduceddom )
7451 else if( separated )
7467 assert(conshdlr != NULL);
7469 assert(nconss == 0 || conss != NULL);
7470 assert(result != NULL);
7472 SCIPdebugMsg(scip,
"separating %d/%d set partitioning / packing / covering constraints\n", nusefulconss, nconss);
7481 for( c = 0; c < nusefulconss && !cutoff; ++c )
7492 else if( reduceddom )
7494 else if( separated )
7528 assert(conshdlr != NULL);
7529 assert(result != NULL);
7532 assert(conshdlrdata != NULL);
7534 varuses = conshdlrdata->varuses;
7535 assert(varuses != NULL);
7542 assert(MINBRANCHWEIGHT <= MAXBRANCHWEIGHT);
7550 for( i = 0; i < nlpcands; ++i )
7556 for( j = nsortcands; j > 0 && numuses > uses[j-1]; --j )
7558 sortcands[j] = sortcands[j-1];
7559 uses[j] = uses[j-1];
7561 assert(0 <= j && j <= nsortcands);
7567 assert(nsortcands <= nlpcands);
7572 if( nsortcands > 0 )
7585 for( nselcands = 0; nselcands < nsortcands; ++nselcands )
7589 branchweight += solval;
7592 if( branchweight > MAXBRANCHWEIGHT )
7599 minprio = MIN(minprio, tmp);
7601 minestzero = MIN(minestzero, tmp);
7603 minestone = MIN(minestone, tmp);
7608 assert(nselcands > 0);
7609 branchweight -= solval;
7612 if( MINBRANCHWEIGHT <= branchweight && branchweight <= MAXBRANCHWEIGHT )
7617 assert(1 <= nselcands && nselcands <= nlpcands);
7621 for( i = 0; i < nselcands; ++i )
7628 if( nselcands == 1 )
7651 SCIPdebugMsg(scip,
"binary set branching: nselcands=%d/%d, weight(S)=%g, A={", nselcands, nlpcands, branchweight);
7652 for( i = 0; i < nselcands; ++i )
7686 int maxnbranchcands;
7694 assert(conshdlr != NULL);
7695 assert(result != NULL);
7698 assert(conshdlrdata != NULL);
7701 if( conshdlrdata->npseudobranches <= 1 )
7706 if( npseudocands == 0 )
7709 varuses = conshdlrdata->varuses;
7710 assert(varuses != NULL);
7713 maxnbranchcands = conshdlrdata->npseudobranches-1;
7714 assert(maxnbranchcands >= 1);
7722 for( i = 0; i < npseudocands; ++i )
7724 var = pseudocands[i];
7728 if( nbranchcands < maxnbranchcands || uses > canduses[nbranchcands-1] )
7730 for( j = MIN(nbranchcands, maxnbranchcands-1); j > 0 && uses > canduses[j-1]; --j )
7732 branchcands[j] = branchcands[j-1];
7733 canduses[j] = canduses[j-1];
7735 assert(0 <= j && j <= nbranchcands && j < maxnbranchcands);
7736 branchcands[j] = var;
7738 if( nbranchcands < maxnbranchcands )
7743 assert(nbranchcands <= maxnbranchcands);
7748 if( nbranchcands > 0 )
7759 for( i = 0; i < nbranchcands; ++i )
7762 minestzero = MIN(minestzero, tmp);
7771 for( i = 0; i < nbranchcands; ++i )
7775 for( j = 0; j < i; ++j )
7783 for( i = 0; i < nbranchcands; ++i )
7796 SCIPdebugMsg(scip,
"branched on pseudo solution: %d children\n", nchildren);
7840 assert(conshdlr != NULL);
7842 assert(nconss == 0 || conss != NULL);
7843 assert(result != NULL);
7850 SCIP_CALL( branchPseudo(scip, conshdlr, result) );
7855 SCIPdebugMsg(scip,
"pseudo enforcing %d set partitioning / packing / covering constraints\n", nconss);
7865 for( c = 0; c < nconss && !cutoff && !reduceddom && !solvelp; ++c )
7872 else if( reduceddom )
7876 else if( infeasible )
7884 SCIP_CALL( branchPseudo(scip, conshdlr, result) );
7900 assert(conshdlr != NULL);
7902 assert(nconss == 0 || conss != NULL);
7903 assert(result != NULL);
7908 for( c = 0; c < nconss && (*result ==
SCIP_FEASIBLE || completely); ++c )
7912 assert(consdata != NULL);
7913 if( checklprows || consdata->row == NULL || !
SCIProwIsInLP(consdata->row) )
7927 for( v = 0; v < consdata->nvars; ++v )
7934 SCIPinfoMessage(scip, NULL,
"violation: the right hand side is violated by by %.15g\n", ABS(sum - 1));
7954 assert(conshdlr != NULL);
7956 assert(nconss == 0 || conss != NULL);
7957 assert(result != NULL);
7961 SCIPdebugMsg(scip,
"propagating %d/%d set partitioning / packing / covering constraints\n", nmarkedconss, nconss);
7967 for( c = nmarkedconss - 1; c >= 0 && !cutoff; --c )
7977 int naddconss, ndelconss;
7982 naddconss = ndelconss = 0;
8000 else if( nfixedvars > 0 )
8023 assert(conshdlr != NULL);
8025 assert(scip != NULL);
8026 assert(result != NULL);
8029 oldnfixedvars = *nfixedvars;
8030 oldndelconss = *ndelconss;
8031 oldnaggrvars = *naggrvars;
8032 oldnchgcoefs = *nchgcoefs;
8036 assert(conshdlrdata != NULL);
8039 conshdlrdata->enablecliquelifting = conshdlrdata->enablecliquelifting || conshdlrdata->updatedsetppctype
8041 || conshdlrdata->noldcliques !=
SCIPgetNCliques(scip) || conshdlrdata->noldupgrs != nconss;
8044 startdelconss = *ndelconss;
8047 conshdlrdata->updatedsetppctype =
FALSE;
8050 firstchange = INT_MAX;
8051 firstclique = INT_MAX;
8061 assert(cons != NULL);
8063 assert(consdata != NULL);
8068 if( consdata->nfixedzeros > 0 || nnewaggrvars > 0 || nnewaddconss > 0 || nnewupgdconss > 0
8069 || *naggrvars > oldnaggrvars || (nrounds == 0 &&
SCIPgetNRuns(scip) > 1) )
8104 if( consdata->nfixedzeros > 0 )
8121 SCIP_CALL(
presolvePropagateCons(scip, cons,
TRUE, NULL, NULL, NULL, NULL, nfixedvars, naggrvars, ndelconss, &cutoff) );
8134 if( consdata->nfixedzeros > 0 )
8159 if( firstchange == INT_MAX && consdata->changed )
8163 if( !consdata->cliqueadded && consdata->nvars >= 2 )
8165 if( firstclique == INT_MAX )
8172 if( oldnfixedvars < *nfixedvars || oldnaggrvars < *naggrvars || oldndelconss < *ndelconss || oldnchgcoefs < *nchgcoefs )
8175 if( firstchange < nconss && conshdlrdata->presolusehashing )
8179 if( oldndelconss < *ndelconss )
8187 && ((conshdlrdata->nsetpart > 0 && !
SCIPdoNotMultaggr(scip) && conshdlrdata->conshdlrlinear != NULL)
8189 && conshdlrdata->nsetpart < nconss && !
SCIPdoNotAggr(scip))) )
8193 naggrvars, ndelconss, nchgcoefs, nchgsides, &cutoff) );
8200 else if( oldnfixedvars < *nfixedvars || oldnaggrvars < *naggrvars || oldndelconss < *ndelconss )
8208 SCIP_CALL(
addCliques(scip, conss, nconss, firstclique, lastclique, naddconss, ndelconss, nchgbds, &cutoff) );
8216 firstclique = nconss;
8221 &lastclique, nfixedvars, naggrvars, ndelconss, nchgcoefs, &cutoff) );
8222 ++(conshdlrdata->nclqpresolve);
8229 else if( oldnfixedvars < *nfixedvars || oldnaggrvars < *naggrvars || oldndelconss < *ndelconss || oldnchgcoefs < *nchgcoefs )
8233 conshdlrdata->noldfixedvars = *nfixedvars + *naggrvars;
8236 if( oldndelconss == *ndelconss && (presoltiming & SCIP_PRESOLTIMING_EXHAUSTIVE) != 0 )
8239 if( conshdlrdata->presolpairwise )
8243 oldndelconss = *ndelconss;
8244 oldnfixedvars = *nfixedvars;
8246 for( c = firstchange; c < nconss && !
SCIPisStopped(scip); ++c )
8265 oldndelconss = *ndelconss;
8266 oldnfixedvars = *nfixedvars;
8267 npaircomparisons = 0;
8276 SCIP_CALL(
addCliques(scip, conss, nconss, MIN(firstclique, nconss), MIN(lastclique, nconss), naddconss, ndelconss,
8277 nchgbds, &cutoff) );
8282 conshdlrdata->enablecliquelifting =
FALSE;
8283 conshdlrdata->noldupgrs = nconss - (*ndelconss - startdelconss);
8296 assert(conshdlr != NULL);
8298 assert(cons != NULL);
8299 assert(infervar != NULL);
8300 assert(result != NULL);
8303 assert(consdata != NULL);
8305 SCIPdebugMsg(scip,
"conflict resolving method of set partitioning / packing / covering constraint handler\n");
8319 confvarfound =
FALSE;
8321 for( v = 0; v < consdata->nvars; ++v )
8323 if( consdata->vars[v] != infervar )
8332 assert(!confvarfound);
8333 confvarfound =
TRUE;
8337 assert(confvarfound);
8346 if( inferinfo >= 0 )
8353 for( v = 0; v < consdata->nvars; ++v )
8361 assert(v < consdata->nvars);
8381 assert(consdata != NULL);
8383 switch( consdata->setppctype )
8386 nlocksdown = nlockspos + nlocksneg;
8387 nlocksup = nlockspos + nlocksneg;
8390 nlocksdown = nlocksneg;
8391 nlocksup = nlockspos;
8394 nlocksdown = nlockspos;
8395 nlocksup = nlocksneg;
8402 for( i = 0; i < consdata->nvars; ++i )
8415 assert(cons != NULL);
8419 SCIPdebugMsg(scip,
"activation information for set partitioning / packing / covering constraint <%s>\n",
8426 assert(consdata != NULL);
8428 if( consdata->nfixedones >= 1 || consdata->nfixedzeros >= consdata->nvars - 1 )
8450 SCIPdebugMsg(scip,
"deactivation information for set partitioning / packing / covering constraint <%s>\n",
8465 assert(consdata != NULL);
8469 assert(conshdlrdata != NULL);
8470 assert(conshdlrdata->eventhdlr != NULL);
8486 assert( scip != NULL );
8487 assert( conshdlr != NULL );
8488 assert( conss != NULL || nconss == 0 );
8505 assert( scip != NULL );
8506 assert( conshdlr != NULL );
8507 assert( cons != NULL );
8519 const char* consname;
8558 lhs, rhs, varmap, consmap,
8559 initial, separate, enforce, check, propagate, local, modifiable, dynamic, removable, stickingatnode, global, valid) );
8560 assert(cons != NULL);
8572 assert(scip != NULL);
8573 assert(success != NULL);
8574 assert(str != NULL);
8575 assert(name != NULL);
8576 assert(cons != NULL);
8586 assert(str[1] ==
' ');
8604 if( *success && requsize > coefssize )
8607 coefssize = requsize;
8612 assert(!*success || requsize <= coefssize);
8627 while( isspace((
unsigned char)*str) )
8636 initial, separate, enforce, check, propagate, local, modifiable, dynamic, removable, stickingatnode) );
8640 initial, separate, enforce, check, propagate, local, modifiable, dynamic, removable, stickingatnode) );
8644 initial, separate, enforce, check, propagate, local, modifiable, dynamic, removable, stickingatnode) );
8666 assert(consdata != NULL);
8668 if( varssize < consdata->nvars )
8672 assert(vars != NULL);
8688 assert(consdata != NULL);
8690 (*nvars) = consdata->nvars;
8707 assert(eventhdlr != NULL);
8708 assert(eventdata != NULL);
8710 assert(event != NULL);
8715 assert(cons != NULL);
8718 assert(consdata != NULL);
8725 consdata->nfixedones++;
8728 consdata->nfixedones--;
8731 consdata->nfixedzeros++;
8734 consdata->nfixedzeros--;
8737 consdata->varsdeleted =
TRUE;
8740 if( consdata->merged )
8746 assert(var != NULL);
8750 consdata->merged =
FALSE;
8753 if( !consdata->existmultaggr )
8756 assert(var != NULL);
8759 consdata->existmultaggr =
TRUE;
8766 assert(0 <= consdata->nfixedzeros && consdata->nfixedzeros <= consdata->nvars);
8767 assert(0 <= consdata->nfixedones && consdata->nfixedones <= consdata->nvars);
8771 if( consdata->nfixedones >= 1 || consdata->nfixedzeros >= consdata->nvars - 1 )
8773 consdata->presolpropagated =
FALSE;
8778 consdata->presolpropagated =
FALSE;
8801 assert(conflicthdlr != NULL);
8803 assert(bdchginfos != NULL || nbdchginfos == 0);
8804 assert(result != NULL);
8816 if( nbdchginfos == 2 )
8822 assert(bdchginfos != NULL);
8861 SCIPdebugMsg(scip,
"new clique of conflict constraint %s led to %d fixings\n", consname, ncliquebdchgs);
8865 SCIPdebugMsg(scip,
"new clique of conflict constraint %s led to infeasibility\n", consname);
8879 for( i = 0; i < nbdchginfos; ++i )
8881 assert(bdchginfos != NULL);
8896 if( i == nbdchginfos )
8935 eventExecSetppc, NULL) );
8939 conflictExecSetppc, NULL) );
8947 consEnfolpSetppc, consEnfopsSetppc, consCheckSetppc, consLockSetppc,
8949 assert(conshdlr != NULL);
8977 if( conshdlrdata->conshdlrlinear != NULL )
8992 "number of children created in pseudo branching (0: disable pseudo branching)",
8996 "should pairwise constraint comparison be performed in presolving?",
9000 "should hash table be used for detecting redundant constraints in advance",
9004 "should dual presolving steps be performed?",
9008 " should we try to lift variables into other clique constraints, fix variables, aggregate them, and also shrink the amount of variables in clique constraints",
9012 "should we try to generate extra cliques out of all binary variables to maybe fasten redundant constraint detection",
9016 "should we try to shrink the number of variables in a clique constraints, by replacing more than one variable by only one",
9058 initial, separate, enforce, check, propagate, local, modifiable, dynamic, removable, stickingatnode);
9116 initial, separate, enforce, check, propagate, local, modifiable, dynamic, removable, stickingatnode);
9175 initial, separate, enforce, check, propagate, local, modifiable, dynamic, removable, stickingatnode);
9205 assert(var != NULL);
9212 SCIPerrorMessage(
"constraint is not a set partitioning / packing / covering constraint\n");
9231 SCIPerrorMessage(
"constraint is not a set partitioning / packing / covering constraint\n");
9237 assert(consdata != NULL);
9239 return consdata->nvars;
9252 SCIPerrorMessage(
"constraint is not a set partitioning / packing / covering constraint\n");
9258 assert(consdata != NULL);
9260 return consdata->vars;
9273 SCIPerrorMessage(
"constraint is not a set partitioning / packing / covering constraint\n");
9278 assert(consdata != NULL);
9293 SCIPerrorMessage(
"constraint is not a set partitioning / packing / covering constraint\n");
9299 assert(consdata != NULL);
9301 if( consdata->row != NULL )
9317 SCIPerrorMessage(
"constraint is not a set partitioning / packing / covering constraint\n");
9323 assert(consdata != NULL);
9325 if( consdata->row != NULL )
9343 SCIPerrorMessage(
"constraint is not a set partitioning / packing / covering constraint\n");
9349 assert(consdata != NULL);
9351 return consdata->row;
9364 SCIPerrorMessage(
"constraint is not a set partitioning / packing / covering constraint\n");
9370 assert(consdata != NULL);
9372 return consdata->nfixedones;
9386 SCIPerrorMessage(
"constraint is not a set partitioning / packing / covering constraint\n");
9392 assert(consdata != NULL);
9394 return consdata->nfixedzeros;
enum SCIP_Result SCIP_RESULT
#define LINCONSUPGD_PRIORITY
SCIP_RETCODE SCIPgetLPBranchCands(SCIP *scip, SCIP_VAR ***lpcands, SCIP_Real **lpcandssol, SCIP_Real **lpcandsfrac, int *nlpcands, int *npriolpcands, int *nfracimplvars)
void SCIPfreeRandom(SCIP *scip, SCIP_RANDNUMGEN **randnumgen)
SCIP_RETCODE SCIPaddVarsToRowSameCoef(SCIP *scip, SCIP_ROW *row, int nvars, SCIP_VAR **vars, SCIP_Real val)
void SCIPconshdlrSetData(SCIP_CONSHDLR *conshdlr, SCIP_CONSHDLRDATA *conshdlrdata)
int SCIPgetNIntVars(SCIP *scip)
SCIP_Bool SCIPisFeasZero(SCIP *scip, SCIP_Real val)
SCIP_RETCODE SCIPincConsAge(SCIP *scip, SCIP_CONS *cons)
#define SCIPreallocBlockMemoryArray(scip, ptr, oldnum, newnum)
SCIP_RETCODE SCIPsetConshdlrDelete(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSDELETE((*consdelete)))
static SCIP_RETCODE dualPresolving(SCIP *scip, SCIP_CONS *cons, int *nfixedvars, int *ndelconss, SCIP_RESULT *result)
SCIP_RETCODE SCIPincIntarrayVal(SCIP *scip, SCIP_INTARRAY *intarray, int idx, int incval)
static SCIP_RETCODE addCliques(SCIP *scip, SCIP_CONS **conss, int nconss, int firstclique, int lastclique, int *naddconss, int *ndelconss, int *nchgbds, SCIP_Bool *cutoff)
SCIP_Real SCIPfeastol(SCIP *scip)
static SCIP_RETCODE addExtraCliques(SCIP *const scip, SCIP_VAR **const binvars, int const nbinvars, int *const cliquepartition, int const ncliques, SCIP_CONS **const usefulconss, int *const nusefulconss, int const nrounds, int *const nfixedvars, int *const naddconss, int *const ndelconss, int *const nchgcoefs, SCIP_Bool *const cutoff)
SCIP_Bool SCIPvarsHaveCommonClique(SCIP_VAR *var1, SCIP_Bool value1, SCIP_VAR *var2, SCIP_Bool value2, SCIP_Bool regardimplics)
static SCIP_RETCODE analyzeConflictZero(SCIP *scip, SCIP_CONS *cons)
SCIP_Real SCIPgetVarUbAtIndex(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx, SCIP_Bool after)
int SCIPgetNFixedzerosSetppc(SCIP *scip, SCIP_CONS *cons)
SCIP_Bool SCIPisFeasEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
static SCIP_DECL_CONSENFORELAX(consEnforelaxSetppc)
SCIP_RETCODE SCIPaddCoefSetppc(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var)
SCIP_STAGE SCIPgetStage(SCIP *scip)
#define SCIP_EVENTTYPE_VARFIXED
SCIP_Bool SCIPconsIsDynamic(SCIP_CONS *cons)
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_RETCODE addCoef(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var)
static SCIP_DECL_CONSLOCK(consLockSetppc)
static SCIP_DECL_CONSPARSE(consParseSetppc)
SCIP_Real SCIPgetVarLbAtIndex(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx, SCIP_Bool after)
SCIP_RETCODE SCIPincludeConshdlrSetppc(SCIP *scip)
int SCIPgetNFixedonesSetppc(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPhashtableInsert(SCIP_HASHTABLE *hashtable, void *element)
static SCIP_RETCODE delCoefPos(SCIP *scip, SCIP_CONS *cons, int pos)
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 SCIPgetNVarsSetppc(SCIP *scip, SCIP_CONS *cons)
SCIP_VAR * SCIPbdchginfoGetVar(SCIP_BDCHGINFO *bdchginfo)
static SCIP_RETCODE analyzeConflictOne(SCIP *scip, SCIP_CONS *cons)
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)))
SCIP_RETCODE SCIPcopyConsLinear(SCIP *scip, SCIP_CONS **cons, SCIP *sourcescip, const char *name, int nvars, SCIP_VAR **sourcevars, SCIP_Real *sourcecoefs, SCIP_Real lhs, SCIP_Real rhs, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode, SCIP_Bool global, SCIP_Bool *valid)
static SCIP_RETCODE detectRedundantConstraints(SCIP *scip, BMS_BLKMEM *blkmem, SCIP_CONS **conss, int nconss, int *firstchange, int *ndelconss, int *nchgsides)
SCIP_RETCODE SCIPvarGetProbvarBinary(SCIP_VAR **var, SCIP_Bool *negated)
static SCIP_RETCODE collectCliqueData(SCIP *const scip, SCIP_CONS **const usefulconss, int const nusefulconss, SCIP_VAR **const usefulvars, int *const nusefulvars, SCIP_HASHMAP *const vartoindex, int *const varnconss, int *const maxnvarconsidx, int **const varconsidxs, int *const maxnvars)
#define DEFAULT_PRESOLUSEHASHING
static SCIP_DECL_CONSCOPY(consCopySetppc)
SCIP_RETCODE SCIPsetConshdlrEnforelax(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSENFORELAX((*consenforelax)))
SCIP_RETCODE SCIPcreateRandom(SCIP *scip, SCIP_RANDNUMGEN **randnumgen, unsigned int initialseed)
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)
#define CONSHDLR_EAGERFREQ
SCIP_Real SCIPvarGetLbLocal(SCIP_VAR *var)
SCIP_RETCODE SCIPaddConflictBinvar(SCIP *scip, SCIP_VAR *var)
SCIP_RETCODE SCIPcreateConsSetcover(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 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 SCIPgetTransformedVar(SCIP *scip, SCIP_VAR *var, SCIP_VAR **transvar)
SCIP_RETCODE SCIPupdateConsFlags(SCIP *scip, SCIP_CONS *cons0, SCIP_CONS *cons1)
SCIP_RETCODE SCIPreleaseVar(SCIP *scip, SCIP_VAR **var)
SCIP_Bool SCIPvarIsBinary(SCIP_VAR *var)
SCIP_Bool SCIPisFeasNegative(SCIP *scip, SCIP_Real val)
static SCIP_RETCODE createNormalizedSetppc(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Real *vals, int mult, SCIP_SETPPCTYPE setppctype, 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 DEFAULT_ADDVARIABLESASCLIQUES
#define CONSHDLR_PROP_TIMING
SCIP_Bool SCIPisFeasGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
static SCIP_DECL_CONSSEPASOL(consSepasolSetppc)
int SCIPconsGetPos(SCIP_CONS *cons)
SCIP_RETCODE SCIPhashmapCreate(SCIP_HASHMAP **hashmap, BMS_BLKMEM *blkmem, int mapsize)
const char * SCIPeventhdlrGetName(SCIP_EVENTHDLR *eventhdlr)
#define DEFAULT_NPSEUDOBRANCHES
SCIP_Real SCIPrelDiff(SCIP_Real val1, SCIP_Real val2)
SCIP_RETCODE SCIPincludeConshdlrBasic(SCIP *scip, SCIP_CONSHDLR **conshdlrptr, const char *name, const char *desc, int enfopriority, int chckpriority, int eagerfreq, SCIP_Bool needscons, SCIP_DECL_CONSENFOLP((*consenfolp)), SCIP_DECL_CONSENFOPS((*consenfops)), SCIP_DECL_CONSCHECK((*conscheck)), SCIP_DECL_CONSLOCK((*conslock)), SCIP_CONSHDLRDATA *conshdlrdata)
SCIP_Real SCIPinfinity(SCIP *scip)
static SCIP_DECL_HASHKEYVAL(hashKeyValSetppccons)
int SCIPsnprintf(char *t, int len, const char *s,...)
SCIP_Bool SCIPisNegative(SCIP *scip, SCIP_Real val)
void SCIPrandomPermuteArray(SCIP_RANDNUMGEN *randnumgen, void **array, int begin, int end)
SCIP_RETCODE SCIPunmarkConsPropagate(SCIP *scip, SCIP_CONS *cons)
enum SCIP_Retcode SCIP_RETCODE
SCIP_RETCODE SCIPaddVarLocks(SCIP *scip, SCIP_VAR *var, int nlocksdown, int nlocksup)
SCIP_Bool SCIPconsIsStickingAtNode(SCIP_CONS *cons)
SCIP_RETCODE SCIPcreateIntarray(SCIP *scip, SCIP_INTARRAY **intarray)
#define SCIP_PRESOLTIMING_EXHAUSTIVE
static SCIP_DECL_CONSGETVARS(consGetVarsSetppc)
static SCIP_RETCODE preprocessCliques(SCIP *const scip, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_CONS **const conss, int const nconss, int const nrounds, int *const firstchange, int *const firstclique, int *const lastclique, int *const nfixedvars, int *const naggrvars, int *const ndelconss, int *const nchgcoefs, SCIP_Bool *const cutoff)
SCIP_RETCODE SCIPfreeIntarray(SCIP *scip, SCIP_INTARRAY **intarray)
static SCIP_RETCODE enforcePseudo(SCIP *scip, SCIP_CONS *cons, SCIP_Bool *cutoff, SCIP_Bool *infeasible, SCIP_Bool *reduceddom, SCIP_Bool *solvelp)
SCIP_Bool SCIPconsIsTransformed(SCIP_CONS *cons)
SCIP_RETCODE SCIPinitConflictAnalysis(SCIP *scip, SCIP_CONFTYPE conftype, SCIP_Bool iscutoffinvolved)
static SCIP_DECL_QUADCONSUPGD(quadraticUpgdSetppc)
#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)
SCIP_RETCODE SCIPchgVarUbNode(SCIP *scip, SCIP_NODE *node, SCIP_VAR *var, SCIP_Real newbound)
#define SCIPduplicateBufferArray(scip, ptr, source, num)
SCIP_Real SCIPgetDualfarkasSetppc(SCIP *scip, SCIP_CONS *cons)
void * SCIPhashmapGetImage(SCIP_HASHMAP *hashmap, void *origin)
SCIP_Bool SCIPisEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
#define SCIPfreeBufferArray(scip, ptr)
Constraint handler for the set partitioning / packing / covering constraints .
SCIP_RETCODE SCIPincludeConflicthdlrBasic(SCIP *scip, SCIP_CONFLICTHDLR **conflicthdlrptr, const char *name, const char *desc, int priority, SCIP_DECL_CONFLICTEXEC((*conflictexec)), SCIP_CONFLICTHDLRDATA *conflicthdlrdata)
#define SCIPallocBlockMemory(scip, ptr)
#define SCIPdebugPrintCons(x, y, z)
SCIP_Bool SCIPisTransformed(SCIP *scip)
SCIP_RETCODE SCIPsetConshdlrDelvars(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSDELVARS((*consdelvars)))
SCIP_VAR * SCIPvarGetNegationVar(SCIP_VAR *var)
SCIP_Bool SCIPconsIsRemovable(SCIP_CONS *cons)
#define SCIP_EVENTTYPE_BOUNDCHANGED
SCIP_RETCODE SCIPsetConshdlrInitlp(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSINITLP((*consinitlp)))
SCIP_Real SCIProwGetDualsol(SCIP_ROW *row)
void SCIPwarningMessage(SCIP *scip, const char *formatstr,...)
#define SCIPdebugMsgPrint
SCIP_RETCODE SCIPaddIntParam(SCIP *scip, const char *name, const char *desc, int *valueptr, SCIP_Bool isadvanced, int defaultvalue, int minvalue, int maxvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
SCIP_RETCODE SCIPgetTransformedVars(SCIP *scip, int nvars, SCIP_VAR **vars, SCIP_VAR **transvars)
static SCIP_RETCODE separateCons(SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_Bool lpfeas, SCIP_Bool *cutoff, SCIP_Bool *separated, SCIP_Bool *reduceddom)
static SCIP_RETCODE removeRedundantCons(SCIP *scip, SCIP_CONS *cons0, SCIP_CONS *cons1, int *ndelconss)
SCIP_RETCODE SCIPsetConshdlrParse(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPARSE((*consparse)))
SCIP_Real SCIPgetLhsQuadratic(SCIP *scip, SCIP_CONS *cons)
static SCIP_RETCODE processContainedCons(SCIP *scip, SCIP_CONS *cons0, SCIP_CONS *cons1, SCIP_Bool *cutoff, int *nfixedvars, int *ndelconss, int *nchgsides)
SCIP_Bool SCIPconsIsActive(SCIP_CONS *cons)
void SCIPinfoMessage(SCIP *scip, FILE *file, const char *formatstr,...)
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)
SCIP_RETCODE SCIPparseVarsLinearsum(SCIP *scip, const char *str, SCIP_VAR **vars, SCIP_Real *vals, int *nvars, int varssize, int *requiredsize, char **endptr, SCIP_Bool *success)
#define CONSHDLR_DELAYSEPA
static SCIP_RETCODE checkForOverlapping(SCIP *const scip, SCIP_CONS *const cons, int const considx, int const endidx, SCIP_CONS **const usefulconss, int const nusefulconss, SCIP_VAR **const usefulvars, int *const nusefulvars, SCIP_HASHMAP *const vartoindex, int *const varnconss, int *const maxnvarconsidx, int **const varconsidxs, int *const countofoverlapping, SCIP_Bool const shrinking, SCIP_Bool *const chgcons, SCIP_VAR **undoneaggrvars, SCIP_Bool *undoneaggrtypes, int *const naggregations, int *const saggregations, int *const nfixedvars, int *const naggrvars, int *const nchgcoefs, int *const ndelconss, SCIP_Bool *const cutoff)
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)
int SCIPgetNQuadVarTermsQuadratic(SCIP *scip, SCIP_CONS *cons)
#define DEFAULT_CLIQUELIFTING
static SCIP_RETCODE consdataCreate(SCIP *scip, SCIP_CONSDATA **consdata, int nvars, SCIP_VAR **vars, SCIP_SETPPCTYPE setppctype)
SCIP_VAR * SCIPvarGetNegatedVar(SCIP_VAR *var)
SCIP_Bool SCIProwIsInLP(SCIP_ROW *row)
static SCIP_DECL_CONSEXITSOL(consExitsolSetppc)
SCIP_Bool SCIPhashmapExists(SCIP_HASHMAP *hashmap, void *origin)
#define SCIP_EVENTTYPE_LBRELAXED
int SCIPgetNBilinTermsQuadratic(SCIP *scip, SCIP_CONS *cons)
static SCIP_DECL_CONSPROP(consPropSetppc)
SCIP_Bool SCIPisConflictAnalysisApplicable(SCIP *scip)
int SCIPgetNFixedVars(SCIP *scip)
static SCIP_DECL_CONSPRINT(consPrintSetppc)
static SCIP_DECL_CONSRESPROP(consRespropSetppc)
SCIP_RETCODE SCIPaddClique(SCIP *scip, SCIP_VAR **vars, SCIP_Bool *values, int nvars, SCIP_Bool isequation, SCIP_Bool *infeasible, int *nbdchgs)
SCIP_Real SCIPvarGetUbGlobal(SCIP_VAR *var)
static SCIP_RETCODE removeDoubleAndSingletonsAndPerformDualpresolve(SCIP *scip, SCIP_CONS **conss, int nconss, SCIP_Bool dualpresolvingenabled, SCIP_Bool linearconshdlrexist, int *nfixedvars, int *naggrvars, int *ndelconss, int *nchgcoefs, int *nchgsides, SCIP_Bool *cutoff)
SCIP_VAR * SCIPvarGetProbvar(SCIP_VAR *var)
#define SCIPduplicateBlockMemoryArray(scip, ptr, source, num)
SCIP_RETCODE SCIPmultiaggregateVar(SCIP *scip, SCIP_VAR *var, int naggvars, SCIP_VAR **aggvars, SCIP_Real *scalars, SCIP_Real constant, SCIP_Bool *infeasible, SCIP_Bool *aggregated)
static SCIP_RETCODE fixAdditionalVars(SCIP *scip, SCIP_CONS *cons0, SCIP_CONS *cons1, SCIP_Bool *cutoff, int *nfixedvars)
SCIP_Bool SCIPconsIsLocked(SCIP_CONS *cons)
#define CONFLICTHDLR_NAME
#define SCIP_PRESOLTIMING_MEDIUM
SCIP_RETCODE SCIPsetConshdlrCopy(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSHDLRCOPY((*conshdlrcopy)), SCIP_DECL_CONSCOPY((*conscopy)))
const char * SCIPconshdlrGetName(SCIP_CONSHDLR *conshdlr)
SCIP_RETCODE SCIPaddCons(SCIP *scip, SCIP_CONS *cons)
static SCIP_DECL_CONSPRESOL(consPresolSetppc)
int SCIPvarCompareActiveAndNegated(SCIP_VAR *var1, SCIP_VAR *var2)
SCIP_Real SCIPgetDualsolSetppc(SCIP *scip, SCIP_CONS *cons)
void SCIPsortDownPtr(void **ptrarray, SCIP_DECL_SORTPTRCOMP((*ptrcomp)), int len)
SCIP_RETCODE SCIPdelConsLocal(SCIP *scip, SCIP_CONS *cons)
#define DEFAULT_DUALPRESOLVING
static SCIP_RETCODE addCliqueDataEntry(SCIP *const scip, SCIP_VAR *const addvar, int const considx, SCIP_Bool const maybenew, SCIP_VAR **const usefulvars, int *const nusefulvars, SCIP_HASHMAP *const vartoindex, int *const varnconss, int *const maxnvarconsidx, int **const varconsidxs)
static SCIP_DECL_HASHGETKEY(hashGetKeySetppccons)
SCIP_RETCODE SCIPgetChildren(SCIP *scip, SCIP_NODE ***children, int *nchildren)
#define MINGAINPERNMINCOMPARISONS
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)
#define SCIPfreeBufferArrayNull(scip, ptr)
static SCIP_DECL_CONSINIT(consInitSetppc)
#define CONFLICTHDLR_DESC
BMS_BLKMEM * SCIPblkmem(SCIP *scip)
static SCIP_DECL_CONSDELETE(consDeleteSetppc)
SCIP_RETCODE SCIPunlockVarCons(SCIP *scip, SCIP_VAR *var, SCIP_CONS *cons, SCIP_Bool lockdown, SCIP_Bool lockup)
SCIP_RETCODE SCIPcreateConsBasicSetpack(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars)
const char * SCIPconsGetName(SCIP_CONS *cons)
#define CONSHDLR_ENFOPRIORITY
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)))
void SCIPhashmapFree(SCIP_HASHMAP **hashmap)
constraint handler for quadratic constraints
static int setppcCompare(SCIP_CONS *const cons1, SCIP_CONS *const cons2)
static SCIP_RETCODE consdataCreateTransformed(SCIP *scip, SCIP_CONSDATA **consdata, int nvars, SCIP_VAR **vars, SCIP_SETPPCTYPE setppctype)
static SCIP_DECL_CONSHDLRCOPY(conshdlrCopySetppc)
SCIP_CONSHDLRDATA * SCIPconshdlrGetData(SCIP_CONSHDLR *conshdlr)
static SCIP_DECL_EVENTEXEC(eventExecSetppc)
static SCIP_RETCODE multiAggregateBinvar(SCIP *scip, SCIP_Bool linearconshdlrexist, SCIP_VAR **vars, int nvars, int pos, SCIP_Bool *infeasible, SCIP_Bool *aggregated)
static SCIP_RETCODE dropAllEvents(SCIP *scip, SCIP_CONS *cons, SCIP_EVENTHDLR *eventhdlr)
SCIP_RETCODE SCIPmarkConsPropagate(SCIP *scip, SCIP_CONS *cons)
static void consdataSort(SCIP_CONSDATA *consdata)
static SCIP_RETCODE consdataEnsureVarsSize(SCIP *scip, SCIP_CONSDATA *consdata, int num)
static SCIP_RETCODE catchEvent(SCIP *scip, SCIP_CONS *cons, SCIP_EVENTHDLR *eventhdlr, int pos)
static SCIP_RETCODE dropEvent(SCIP *scip, SCIP_CONS *cons, SCIP_EVENTHDLR *eventhdlr, int pos)
#define SCIP_EVENTTYPE_UBRELAXED
SCIP_RETCODE SCIPcreateChild(SCIP *scip, SCIP_NODE **node, SCIP_Real nodeselprio, SCIP_Real estimate)
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
static SCIP_RETCODE performVarDeletions(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss)
SCIP_Longint SCIPgetNTotalNodes(SCIP *scip)
#define SCIPhashSignature64(a)
SCIP_RETCODE SCIPgetProbvarLinearSum(SCIP *scip, SCIP_VAR **vars, SCIP_Real *scalars, int *nvars, int varssize, SCIP_Real *constant, int *requiredsize, SCIP_Bool mergemultiples)
SCIP_RETCODE SCIPcreateConsBasicSetcover(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars)
static SCIP_DECL_HASHKEYEQ(hashKeyEqSetppccons)
void SCIPupdateSolLPConsViolation(SCIP *scip, SCIP_SOL *sol, SCIP_Real absviol, SCIP_Real relviol)
int SCIPgetIntarrayVal(SCIP *scip, SCIP_INTARRAY *intarray, int idx)
SCIP_Bool SCIPisFeasLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
#define CONSHDLR_NEEDSCONS
SCIP_RETCODE SCIPanalyzeConflictCons(SCIP *scip, SCIP_CONS *cons, SCIP_Bool *success)
static SCIP_DECL_CONFLICTEXEC(conflictExecSetppc)
void SCIPverbMessage(SCIP *scip, SCIP_VERBLEVEL msgverblevel, FILE *file, const char *formatstr,...)
SCIP_Bool SCIPconsIsLocal(SCIP_CONS *cons)
static SCIP_DECL_CONSTRANS(consTransSetppc)
SCIP_RETCODE SCIPaddRow(SCIP *scip, SCIP_ROW *row, SCIP_Bool forcecut, SCIP_Bool *infeasible)
SCIP_RETCODE SCIPsetConshdlrResprop(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSRESPROP((*consresprop)))
static SCIP_DECL_SORTPTRCOMP(setppcConssSort)
struct SCIP_ConsData SCIP_CONSDATA
SCIP_BILINTERM * SCIPgetBilinTermsQuadratic(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPgetPseudoBranchCands(SCIP *scip, SCIP_VAR ***pseudocands, int *npseudocands, int *npriopseudocands)
#define SCIP_EVENTTYPE_BOUNDTIGHTENED
#define CONSHDLR_CHECKPRIORITY
static SCIP_RETCODE processFixings(SCIP *scip, SCIP_CONS *cons, SCIP_Bool *cutoff, int *nfixedvars, SCIP_Bool *addcut, SCIP_Bool *mustcheck)
#define DEFAULT_CLIQUESHRINKING
#define DEFAULT_PRESOLPAIRWISE
SCIP_Bool SCIPhasCurrentNodeLP(SCIP *scip)
static SCIP_RETCODE lockRounding(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var)
static SCIP_DECL_CONSDEACTIVE(consDeactiveSetppc)
SCIP_RETCODE SCIPaddConsNode(SCIP *scip, SCIP_NODE *node, SCIP_CONS *cons, SCIP_NODE *validnode)
SCIP_Real SCIPgetRhsQuadratic(SCIP *scip, SCIP_CONS *cons)
static SCIP_Bool checkCons(SCIP *scip, SCIP_CONSDATA *consdata, SCIP_SOL *sol)
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 CONFLICTHDLR_PRIORITY
#define SCIPallocBufferArray(scip, ptr, num)
static SCIP_RETCODE catchAllEvents(SCIP *scip, SCIP_CONS *cons, SCIP_EVENTHDLR *eventhdlr)
public data structures and miscellaneous methods
SCIP_VAR * SCIPeventGetVar(SCIP_EVENT *event)
int SCIPgetNImplVars(SCIP *scip)
SCIP_EVENTTYPE SCIPeventGetType(SCIP_EVENT *event)
#define CONSHDLR_PRESOLTIMING
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)
SCIP_SETPPCTYPE SCIPgetTypeSetppc(SCIP *scip, SCIP_CONS *cons)
static SCIP_DECL_CONSACTIVE(consActiveSetppc)
SCIP_RETCODE SCIPprintCons(SCIP *scip, SCIP_CONS *cons, FILE *file)
int SCIPvarGetNLocksUp(SCIP_VAR *var)
#define CONSHDLR_MAXPREROUNDS
static SCIP_RETCODE setSetppcType(SCIP *scip, SCIP_CONS *cons, SCIP_SETPPCTYPE setppctype)
SCIP_RETCODE SCIPcalcCliquePartition(SCIP *const scip, SCIP_VAR **const vars, int const nvars, int *const cliquepartition, int *const ncliques)
SCIP_CONSHDLR * SCIPconsGetHdlr(SCIP_CONS *cons)
int SCIPvarCompare(SCIP_VAR *var1, SCIP_VAR *var2)
static SCIP_DECL_CONSFREE(consFreeSetppc)
SCIP_Bool SCIPconsIsDeleted(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsChecked(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsInitial(SCIP_CONS *cons)
SCIP_Real SCIPvarGetObj(SCIP_VAR *var)
SCIP_RETCODE SCIPdropVarEvent(SCIP *scip, SCIP_VAR *var, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int filterpos)
SCIP_Real SCIPbdchginfoGetNewbound(SCIP_BDCHGINFO *bdchginfo)
SCIP_RETCODE SCIPsetIntarrayVal(SCIP *scip, SCIP_INTARRAY *intarray, int idx, int val)
SCIP_Real SCIPcalcNodeselPriority(SCIP *scip, SCIP_VAR *var, SCIP_BRANCHDIR branchdir, SCIP_Real targetvalue)
SCIP_ROW * SCIPgetRowSetppc(SCIP *scip, SCIP_CONS *cons)
static SCIP_DECL_CONSENFOPS(consEnfopsSetppc)
SCIP_RETCODE SCIPfixVar(SCIP *scip, SCIP_VAR *var, SCIP_Real fixedval, SCIP_Bool *infeasible, SCIP_Bool *fixed)
#define BMScopyMemoryArray(ptr, source, num)
int SCIPgetNRuns(SCIP *scip)
SCIP_Real SCIProwGetDualfarkas(SCIP_ROW *row)
SCIP_RETCODE SCIPlockVarCons(SCIP *scip, SCIP_VAR *var, SCIP_CONS *cons, SCIP_Bool lockdown, SCIP_Bool lockup)
static SCIP_RETCODE removeRedundantConstraints(SCIP *scip, SCIP_CONS **conss, int firstchange, int chkind, SCIP_Bool *cutoff, int *nfixedvars, int *ndelconss, int *nchgsides)
static SCIP_RETCODE consdataPrint(SCIP *scip, SCIP_CONSDATA *consdata, FILE *file)
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, .
SCIP_Longint SCIPgetNConflictConssApplied(SCIP *scip)
void * SCIPhashtableRetrieve(SCIP_HASHTABLE *hashtable, void *key)
SCIP_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)
static SCIP_RETCODE collectCliqueConss(SCIP *const scip, SCIP_CONS **const conss, int const nconss, SCIP_CONS **const usefulconss, int *const nusefulconss, int *const nfixedvars, int *const ndelconss, int *const nchgcoefs, SCIP_Bool *const cutoff)
static uint64_t consdataGetSignature(SCIP_CONSDATA *consdata)
SCIP_Real SCIPcalcChildEstimate(SCIP *scip, SCIP_VAR *var, SCIP_Real targetvalue)
static SCIP_RETCODE conshdlrdataCreate(SCIP *scip, SCIP_CONSHDLRDATA **conshdlrdata, SCIP_EVENTHDLR *eventhdlr)
int SCIPgetNBinVars(SCIP *scip)
SCIP_Bool SCIPinProbing(SCIP *scip)
SCIP_VAR ** SCIPgetVarsSetppc(SCIP *scip, SCIP_CONS *cons)
void SCIPhashtableFree(SCIP_HASHTABLE **hashtable)
SCIP_RETCODE SCIPincludeLinconsUpgrade(SCIP *scip, SCIP_DECL_LINCONSUPGD((*linconsupgd)), int priority, const char *conshdlrname)
int SCIPgetNVars(SCIP *scip)
static SCIP_RETCODE unlockRounding(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var)
SCIP_RETCODE SCIPwriteVarsLinearsum(SCIP *scip, FILE *file, SCIP_VAR **vars, SCIP_Real *vals, int nvars, SCIP_Bool type)
static SCIP_RETCODE createConsSetppc(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_SETPPCTYPE setppctype, 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 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)
int SCIPgetNLinearVarsQuadratic(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPhashmapRemove(SCIP_HASHMAP *hashmap, void *origin)
#define HASHSIZE_SETPPCCONS
int SCIPvarGetNLocksDown(SCIP_VAR *var)
enum SCIP_SetppcType SCIP_SETPPCTYPE
static SCIP_RETCODE mergeMultiples(SCIP *scip, SCIP_CONS *cons, int *nfixedvars, int *ndelconss, int *nchgcoefs, SCIP_Bool *cutoff)
static SCIP_DECL_LINCONSUPGD(linconsUpgdSetppc)
static const SCIP_Real scalars[]
SCIP_CONSDATA * SCIPconsGetData(SCIP_CONS *cons)
SCIP_RETCODE SCIPsetConshdlrInit(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSINIT((*consinit)))
static SCIP_DECL_CONSEXITPRE(consExitpreSetppc)
SCIP_Bool SCIPisConsCompressionEnabled(SCIP *scip)
SCIP_RETCODE SCIPreleaseCons(SCIP *scip, SCIP_CONS **cons)
static SCIP_RETCODE presolvePropagateCons(SCIP *const scip, SCIP_CONS *const cons, SCIP_Bool const aggregate, SCIP_VAR **undoneaggrvars, SCIP_Bool *undoneaggrtypes, int *const naggregations, int *const saggregations, int *const nfixedvars, int *const naggrvars, int *const ndelconss, SCIP_Bool *const cutoff)
static int setppcCompare2(SCIP_CONS *const cons1, SCIP_CONS *const cons2)
SCIP_Bool SCIPallowDualReds(SCIP *scip)
const char * SCIPconflicthdlrGetName(SCIP_CONFLICTHDLR *conflicthdlr)
SCIP_RETCODE SCIPsetConshdlrPresol(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPRESOL((*conspresol)), int maxprerounds, SCIP_PRESOLTIMING presoltiming)
int SCIPgetNCliques(SCIP *scip)
int SCIPgetNImplications(SCIP *scip)
SCIP_VAR ** SCIPgetVars(SCIP *scip)
SCIP_VARSTATUS SCIPvarGetStatus(SCIP_VAR *var)
SCIP_RETCODE SCIPaggregateVars(SCIP *scip, SCIP_VAR *varx, SCIP_VAR *vary, SCIP_Real scalarx, SCIP_Real scalary, SCIP_Real rhs, SCIP_Bool *infeasible, SCIP_Bool *redundant, SCIP_Bool *aggregated)
SCIP_RETCODE SCIPcaptureVar(SCIP *scip, SCIP_VAR *var)
SCIP_Bool SCIPconsIsModifiable(SCIP_CONS *cons)
SCIP_Bool SCIPisStopped(SCIP *scip)
SCIP_RETCODE SCIPsetConshdlrGetNVars(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSGETNVARS((*consgetnvars)))
SCIP_Bool SCIPhaveVarsCommonClique(SCIP *scip, SCIP_VAR *var1, SCIP_Bool value1, SCIP_VAR *var2, SCIP_Bool value2, SCIP_Bool regardimplics)
static SCIP_RETCODE addCut(SCIP *scip, SCIP_CONS *cons, SCIP_Bool *cutoff)
static SCIP_RETCODE conshdlrdataFree(SCIP *scip, SCIP_CONSHDLRDATA **conshdlrdata)
static SCIP_DECL_CONSGETNVARS(consGetNVarsSetppc)
SCIP_Bool SCIPconsIsEnforced(SCIP_CONS *cons)
SCIP_Bool SCIPdoNotAggr(SCIP *scip)
SCIP_Bool SCIPconsIsSeparated(SCIP_CONS *cons)
static SCIP_DECL_CONSSEPALP(consSepalpSetppc)
int SCIPvarGetIndex(SCIP_VAR *var)
SCIP_Real SCIPgetRowSolFeasibility(SCIP *scip, SCIP_ROW *row, SCIP_SOL *sol)
SCIP_VARTYPE SCIPvarGetType(SCIP_VAR *var)
SCIP_Bool SCIPisZero(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPdoNotMultaggr(SCIP *scip)
static SCIP_DECL_CONSENFOLP(consEnfolpSetppc)
#define CONSHDLR_PROPFREQ
struct SCIP_ConshdlrData SCIP_CONSHDLRDATA
static void deleteCliqueDataEntry(SCIP_VAR *const var, int const considx, SCIP_HASHMAP *const vartoindex, int *const varnconss, int **const varconsidxs)
SCIP_Real SCIPgetVarSol(SCIP *scip, SCIP_VAR *var)
static SCIP_RETCODE performAggregations(SCIP *const scip, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_VAR **const undoneaggrvars, SCIP_Bool *const undoneaggrtypes, int const naggregations, int *const naggrvars, SCIP_Bool *const cutoff)
SCIP_Real SCIPvarGetUbLocal(SCIP_VAR *var)
#define SCIPfreeBlockMemoryArrayNull(scip, ptr, num)
static SCIP_RETCODE liftCliqueVariables(SCIP *const scip, SCIP_CONS *const cons, int const arraypos, SCIP_VAR **const usefulvars, int *const nusefulvars, int const endidx, SCIP_Bool **cliquevalues, SCIP_HASHMAP *const vartoindex, int *const varnconss, int *const maxnvarconsidx, int **const varconsidxs, int *const maxnvars, int *const nadded, SCIP_Bool *const chgcons, int *const nfixedvars, int *const ndelconss, SCIP_Bool *const cutoff)
SCIP_Bool SCIPvarIsTransformed(SCIP_VAR *var)
SCIP_RETCODE SCIPhashmapInsert(SCIP_HASHMAP *hashmap, void *origin, void *image)
static SCIP_RETCODE consdataFree(SCIP *scip, SCIP_CONSDATA **consdata)
#define BMSclearMemoryArray(ptr, num)
static SCIP_RETCODE createRow(SCIP *scip, SCIP_CONS *cons)
#define CONSHDLR_DELAYPROP
SCIP_RETCODE SCIPsetConshdlrActive(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSACTIVE((*consactive)))
SCIP_QUADVARTERM * SCIPgetQuadVarTermsQuadratic(SCIP *scip, SCIP_CONS *cons)
static SCIP_DECL_CONSDELVARS(consDelvarsSetppc)
SCIP_RETCODE SCIPcreateConsBasicSetpart(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars)
struct BMS_BlkMem BMS_BLKMEM
SCIP_RETCODE SCIPaddConflict(SCIP *scip, SCIP_NODE *node, SCIP_CONS *cons, SCIP_NODE *validnode, SCIP_CONFTYPE conftype, SCIP_Bool iscutoffinvolved)
SCIP_RETCODE SCIPsetConshdlrExitsol(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSEXITSOL((*consexitsol)))
#define SCIPcombineTwoInt(a, b)
#define CONSHDLR_SEPAPRIORITY
static SCIP_RETCODE enforceConstraint(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss, int nusefulconss, SCIP_SOL *sol, SCIP_RESULT *result)
#define QUADCONSUPGD_PRIORITY
SCIP_Real SCIPgetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var)
SCIP_Bool SCIPvarIsDeleted(SCIP_VAR *var)
SCIP_RETCODE SCIPinferBinvarCons(SCIP *scip, SCIP_VAR *var, SCIP_Bool fixedval, SCIP_CONS *infercons, int inferinfo, SCIP_Bool *infeasible, SCIP_Bool *tightened)
void SCIPsortedvecInsertDownPtr(void **ptrarray, SCIP_DECL_SORTPTRCOMP((*ptrcomp)), void *keyval, int *len, int *pos)
static SCIP_DECL_CONSINITLP(consInitlpSetppc)
SCIP_Bool SCIPsortedvecFindDownPtr(void **ptrarray, SCIP_DECL_SORTPTRCOMP((*ptrcomp)), void *val, int len, int *pos)
#define SCIP_EVENTTYPE_VARDELETED
SCIP_RETCODE SCIPgetNegatedVar(SCIP *scip, SCIP_VAR *var, SCIP_VAR **negvar)
SCIP_RETCODE SCIPaddBoolParam(SCIP *scip, const char *name, const char *desc, SCIP_Bool *valueptr, SCIP_Bool isadvanced, SCIP_Bool defaultvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
static SCIP_RETCODE applyFixings(SCIP *scip, SCIP_CONS *cons, int *naddconss, int *ndelconss, int *nfixedvars, SCIP_Bool *cutoff)
SCIP_Bool SCIPvarIsActive(SCIP_VAR *var)
#define CONSHDLR_SEPAFREQ
SCIP_Bool SCIPvarIsNegated(SCIP_VAR *var)
#define SCIPreallocBufferArray(scip, ptr, num)
static SCIP_DECL_CONSCHECK(consCheckSetppc)
SCIP_RETCODE SCIPsetConshdlrProp(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPROP((*consprop)), int propfreq, SCIP_Bool delayprop, SCIP_PROPTIMING proptiming)