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;
174 assert(cons2 !=
NULL);
182 assert(consdata1 !=
NULL);
185 assert(consdata2 !=
NULL);
188 if( consdata1->setppctype < consdata2->setppctype ||
192 else if( (consdata1->setppctype == consdata2->setppctype && consdata1->nvars == consdata2->nvars) )
196 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(cons2 !=
NULL);
243 assert(consdata1 !=
NULL);
245 assert(consdata2 !=
NULL);
250 if( consdata1->setppctype < consdata2->setppctype ||
259 assert(consdata1->setppctype > consdata2->setppctype || ((consdata1->setppctype == consdata2->setppctype) &&
287 assert(consdata !=
NULL);
289 switch( consdata->setppctype )
322 assert(consdata !=
NULL);
324 switch( consdata->setppctype )
354 assert(scip !=
NULL);
355 assert(conshdlrdata !=
NULL);
365 (*conshdlrdata)->eventhdlr = eventhdlr;
366 (*conshdlrdata)->nsetpart = 0;
382 assert(conshdlrdata !=
NULL);
383 assert(*conshdlrdata !=
NULL);
409 assert(conshdlrdata !=
NULL);
412 varuses = conshdlrdata->varuses;
413 assert(varuses !=
NULL);
446 assert(conshdlrdata !=
NULL);
451 SCIP_CALL( conshdlrdataAddVaruses(scip, conshdlrdata, var, +1) );
464 assert(conshdlrdata !=
NULL);
469 SCIP_CALL( conshdlrdataAddVaruses(scip, conshdlrdata, var, -1) );
484 assert(consdata !=
NULL);
486 for( v = 0; v < consdata->nvars; ++v )
488 SCIP_CALL( conshdlrdataIncVaruses(scip, conshdlrdata, consdata->vars[v]) );
504 assert(consdata !=
NULL);
506 for( v = 0; v < consdata->nvars; ++v )
508 SCIP_CALL( conshdlrdataDecVaruses(scip, conshdlrdata, consdata->vars[v]) );
523 assert(consdata !=
NULL);
524 assert(consdata->nvars <= consdata->varssize);
526 if( num > consdata->varssize )
532 consdata->varssize = newsize;
534 assert(num <= consdata->varssize);
550 assert(nvars == 0 || vars !=
NULL);
554 (*consdata)->signature = 0;
555 (*consdata)->row =
NULL;
556 (*consdata)->existmultaggr =
FALSE;
557 (*consdata)->nfixedzeros = 0;
558 (*consdata)->nfixedones = 0;
567 #ifdef SCIP_DISABLED_CODE 579 for( v = 0; v < nvars; ++v )
585 (*consdata)->nfixedones++;
587 (*consdata)->nfixedzeros++;
589 varsbuffer[k++] = vars[v];
592 (*consdata)->varssize = k;
593 (*consdata)->nvars = k;
608 (*consdata)->varssize = nvars;
609 (*consdata)->nvars = nvars;
619 for( v = 0; v < (*consdata)->nvars; v++ )
630 for( v = 0; v < (*consdata)->nvars; v++ )
632 assert((*consdata)->vars[v] !=
NULL);
640 (*consdata)->vars =
NULL;
641 (*consdata)->varssize = 0;
642 (*consdata)->nvars = 0;
644 (*consdata)->setppctype = setppctype;
645 (*consdata)->sorted = (nvars <= 1);
646 (*consdata)->cliqueadded =
FALSE;
647 (*consdata)->validsignature =
FALSE;
648 (*consdata)->changed =
TRUE;
649 (*consdata)->varsdeleted =
FALSE;
650 (*consdata)->merged =
FALSE;
651 (*consdata)->presolpropagated =
FALSE;
667 assert(nvars == 0 || vars !=
NULL);
687 assert(consdata !=
NULL);
691 if( (*consdata)->row !=
NULL )
697 for( v = 0; v < (*consdata)->nvars; v++ )
699 assert((*consdata)->vars[v] !=
NULL);
717 assert(consdata !=
NULL);
720 if( consdata->nvars == 0 )
727 switch( consdata->setppctype )
752 assert(consdata !=
NULL);
754 if( !consdata->validsignature )
758 consdata->signature = 0;
759 for( i = 0; i < consdata->nvars; ++i )
761 consdata->validsignature =
TRUE;
764 return consdata->signature;
773 assert(consdata !=
NULL);
775 if( !consdata->sorted )
777 if( consdata->nvars <= 1 )
778 consdata->sorted =
TRUE;
781 SCIPsortPtr((
void**)consdata->vars, SCIPvarComp, consdata->nvars);
782 consdata->sorted =
TRUE;
785 assert(consdata->sorted);
791 for( v = 0; v < consdata->nvars; ++v )
793 assert(v == consdata->nvars-1 ||
SCIPvarCompare(consdata->vars[v], consdata->vars[v+1]) <= 0);
812 assert(consdata !=
NULL);
824 for( v = 0; v < consdata->nvars; ++v )
831 assert(conshdlr !=
NULL);
833 assert(conshdlrdata !=
NULL);
839 ++(conshdlrdata->nsetpart);
840 assert(conshdlrdata->nsetpart >= 0);
844 --(conshdlrdata->nsetpart);
845 assert(conshdlrdata->nsetpart >= 0);
850 consdata->setppctype = setppctype;
857 for( v = 0; v < consdata->nvars; ++v )
865 conshdlrdata->updatedsetppctype =
TRUE;
884 assert(consdata !=
NULL);
885 assert(eventhdlr !=
NULL);
886 assert(0 <= pos && pos < consdata->nvars);
887 assert(consdata->vars !=
NULL);
889 var = consdata->vars[pos];
912 consdata->nfixedzeros++;
917 consdata->presolpropagated =
FALSE;
920 if( consdata->nfixedzeros >= consdata->nvars - 1 )
928 consdata->nfixedones++;
932 consdata->presolpropagated =
FALSE;
954 assert(consdata !=
NULL);
955 assert(eventhdlr !=
NULL);
956 assert(0 <= pos && pos < consdata->nvars);
957 assert(consdata->vars !=
NULL);
959 var = consdata->vars[pos];
969 consdata->nfixedzeros--;
971 consdata->nfixedones--;
988 assert(consdata !=
NULL);
991 for( i = 0; i < consdata->nvars; ++i )
1011 assert(consdata !=
NULL);
1014 for( i = 0; i < consdata->nvars; ++i )
1033 assert(var !=
NULL);
1036 assert(consdata !=
NULL);
1046 assert(var !=
NULL);
1050 consdata->vars[consdata->nvars] = var;
1052 if( consdata->validsignature )
1054 consdata->sorted = (consdata->nvars == 1);
1055 consdata->changed =
TRUE;
1068 assert(conshdlr !=
NULL);
1070 assert(conshdlrdata !=
NULL);
1071 assert(conshdlrdata->eventhdlr !=
NULL);
1077 consdata->existmultaggr =
TRUE;
1083 SCIP_CALL( conshdlrdataIncVaruses(scip, conshdlrdata, var) );
1092 if( consdata->row !=
NULL )
1097 consdata->merged =
FALSE;
1098 consdata->cliqueadded =
FALSE;
1114 assert(scip !=
NULL);
1115 assert(cons !=
NULL);
1118 assert(consdata !=
NULL);
1119 assert(0 <= pos && pos < consdata->nvars);
1121 var = consdata->vars[pos];
1122 assert(var !=
NULL);
1137 assert(conshdlrdata !=
NULL);
1138 assert(conshdlrdata->eventhdlr !=
NULL);
1144 if( consdata->nvars == 1 )
1146 consdata->presolpropagated =
FALSE;
1151 if( consdata->row !=
NULL )
1157 if( pos != consdata->nvars - 1 )
1159 consdata->vars[pos] = consdata->vars[consdata->nvars-1];
1160 consdata->sorted =
FALSE;
1163 consdata->validsignature =
FALSE;
1164 consdata->changed =
TRUE;
1255 assert(scip !=
NULL);
1256 assert(cons !=
NULL);
1257 assert(nfixedvars !=
NULL);
1258 assert(ndelconss !=
NULL);
1259 assert(result !=
NULL);
1271 assert(consdata !=
NULL);
1280 assert(consdata->nfixedones == 0);
1281 assert(consdata->nfixedzeros == 0);
1283 nvars = consdata->nvars;
1292 vars = consdata->vars;
1297 switch( setppctype )
1322 for( v = 0; v < nvars; ++v )
1325 assert(var !=
NULL);
1345 if( idx == -1 || objval < bestobjval )
1348 bestobjval = objval;
1359 if( idx == -1 || nposfixings == 0 )
1366 assert(idx >= 0 && idx < nvars);
1369 noldfixed = *nfixedvars;
1375 for( v = nvars - 1; v >= 0; --v )
1381 assert(var !=
NULL);
1400 if( objval >= bestobjval )
1403 assert(!infeasible);
1419 for( v = nvars - 1; v >= 0; --v )
1425 assert(var !=
NULL);
1457 assert(!infeasible);
1483 assert(!infeasible);
1500 assert(*nfixedvars >= noldfixed);
1503 if( *nfixedvars != noldfixed )
1531 assert(scip !=
NULL);
1532 assert(cons !=
NULL);
1533 assert(nfixedvars !=
NULL);
1534 assert(ndelconss !=
NULL);
1535 assert(nchgcoefs !=
NULL);
1536 assert(cutoff !=
NULL);
1539 assert(consdata !=
NULL);
1544 if( consdata->nvars <= 1 )
1546 consdata->merged =
TRUE;
1550 assert(consdata->vars !=
NULL || consdata->nvars == 0);
1553 SCIPsortPtr((
void**)consdata->vars, SCIPvarCompActiveAndNegated, consdata->nvars);
1555 consdata->sorted =
FALSE;
1558 for( v = consdata->nvars - 1; v > 0; --v )
1568 var1 = consdata->vars[v];
1576 assert(var1 !=
NULL);
1578 var2 = consdata->vars[v-1];
1586 assert(var2 !=
NULL);
1594 if( negated1 != negated2 )
1604 for( i = consdata->nvars - 1; i >= 0; --i )
1605 if( i != v && i != (v-1) )
1610 SCIPdebugMsg(scip,
"setppc constraint <%s>: infeasible fixing <%s> == 0\n",
1637 SCIPdebugMsg(scip,
"setppc constraint <%s>: infeasible fixing <%s> == %g\n",
1653 consdata->changed =
TRUE;
1656 consdata->merged =
TRUE;
1683 assert(scip !=
NULL);
1684 assert(cons !=
NULL);
1687 assert(consdata !=
NULL);
1690 consdata->existmultaggr =
FALSE;
1693 while( v < consdata->nvars )
1697 var = consdata->vars[v];
1727 consvars[0] = repvar;
1733 if( requiredsize > nconsvars )
1739 assert(requiredsize <= nconsvars);
1747 for( v2 = nconsvars - 1; v2 >= 0; --v2 )
1753 SCIPerrorMessage(
"try to resolve a multi-aggregation with a non-binary variable <%s>\n", consvars[v2]);
1758 if( !
SCIPisEQ(scip, consvals[v2], 1.0) )
1768 for( v2 = consdata->nvars - 1; v2 > v; --v2 )
1775 if( v2 == v && nconsvars == 0 )
1780 if( nfixedvars !=
NULL )
1784 assert(cutoff !=
NULL);
1786 for( v2 = consdata->nvars - 1; v2 >= 0; --v2 )
1788 if( consdata->vars[v2] != var )
1790 SCIPdebugMsg(scip,
"trying to fix <%s> to 0 due to at least one variable is already fixed to 1\n",
SCIPvarGetName(consdata->vars[v2]));
1796 SCIPdebugMsg(scip,
"setppc constraint <%s>: infeasible fixing <%s> == 0\n",
1832 for( v2 = nconsvars - 1; v2 >= 0; --v2 )
1854 size =
MAX(nconsvars, 1) + consdata->nvars - 1;
1860 nconsvars = consdata->nvars;
1863 for( k = consdata->nvars - 1; k >= 0; --k )
1865 consvars[k] = consdata->vars[k];
1875 if( requiredsize > nconsvars )
1881 assert(requiredsize <= nconsvars);
1888 rhs = 1.0 - constant;
1892 lhs = 1.0 - constant;
1893 rhs = 1.0 - constant;
1898 lhs = 1.0 - constant;
1920 if( ndelconss !=
NULL && naddconss !=
NULL )
1941 SCIPwarningMessage(scip,
"setppc constraint <%s> has a multi-aggregated variable, which was not resolved and therefore could lead to aborts\n",
SCIPconsGetName(cons));
1967 consdata->existmultaggr =
FALSE;
1989 assert(consdata !=
NULL);
1996 for( v = 0; v < consdata->nvars; ++v )
2025 assert(consdata !=
NULL);
2033 for( v = 0; v < consdata->nvars && n < 2; ++v )
2065 assert(cons !=
NULL);
2068 assert(cutoff !=
NULL);
2069 assert(nfixedvars !=
NULL);
2070 assert(addcut !=
NULL);
2071 assert(mustcheck !=
NULL);
2074 oldnfixedvars = *nfixedvars;
2078 assert(consdata !=
NULL);
2079 assert(consdata->nvars == 0 || consdata->vars !=
NULL);
2080 assert(0 <= consdata->nfixedzeros && consdata->nfixedzeros <= consdata->nvars);
2081 assert(0 <= consdata->nfixedones && consdata->nfixedones <= consdata->nvars);
2089 if( consdata->nfixedones == 1 )
2102 if( consdata->nfixedzeros < consdata->nvars - 1 )
2115 SCIPdebugMsg(scip,
" -> fixing all other variables to zero in set packing/partitioning constraint <%s>\n",
2122 vars = consdata->vars;
2123 nvars = consdata->nvars;
2125 fixedonefound =
FALSE;
2127 for( v = 0; v < nvars && consdata->nfixedones == 1; ++v )
2134 assert(!infeasible);
2144 fixedonefound =
TRUE;
2150 assert(consdata->nfixedones >= 2 || (fixedonefound && *nfixedvars > oldnfixedvars));
2167 if( consdata->nfixedones >= 2 )
2191 else if( consdata->nfixedzeros == consdata->nvars )
2199 assert(consdata->nfixedones == 0);
2226 else if( consdata->nfixedzeros == consdata->nvars - 1 && consdata->nfixedones == 0 )
2253 vars = consdata->vars;
2254 nvars = consdata->nvars;
2255 for( v = 0; v < nvars; ++v )
2262 SCIPdebugMsg(scip,
" -> fixing remaining variable <%s> to one in set covering/partitioning constraint <%s>\n",
2265 assert(!infeasible);
2273 assert(consdata->nfixedzeros == consdata->nvars - 1);
2274 assert(consdata->nfixedones == 1);
2280 assert(consdata->nfixedzeros + consdata->nfixedones <= consdata->nvars);
2301 vars = consdata->vars;
2302 nvars = consdata->nvars;
2305 for( v = 0; v < nvars && sum < sumbound; ++v )
2315 switch( consdata->setppctype )
2342 assert(consdata !=
NULL);
2343 assert(consdata->row ==
NULL);
2345 switch( consdata->setppctype )
2383 assert( cutoff !=
NULL );
2387 assert(consdata !=
NULL);
2389 if( consdata->row ==
NULL )
2394 assert(consdata->row !=
NULL);
2422 assert(cons !=
NULL);
2425 assert(cutoff !=
NULL);
2426 assert(separated !=
NULL);
2427 assert(reduceddom !=
NULL);
2432 assert(consdata !=
NULL);
2433 assert(consdata->nvars == 0 || consdata->vars !=
NULL);
2434 assert(0 <= consdata->nfixedzeros && consdata->nfixedzeros <= consdata->nvars);
2435 assert(0 <= consdata->nfixedones && consdata->nfixedones <= consdata->nvars);
2450 *reduceddom = (nfixedvars > 0);
2463 if( lpfeas && consdata->row !=
NULL )
2472 addcut = !
checkCons(scip, consdata, sol);
2508 assert(cons !=
NULL);
2511 assert(cutoff !=
NULL);
2512 assert(infeasible !=
NULL);
2513 assert(reduceddom !=
NULL);
2514 assert(solvelp !=
NULL);
2519 *reduceddom = (nfixedvars > 0);
2528 assert(consdata !=
NULL);
2575 assert(consdata1->sorted);
2576 assert(consdata2->sorted);
2578 scip = (
SCIP*)userptr;
2579 assert(scip !=
NULL);
2583 if( consdata1->nvars != consdata2->nvars )
2588 for( i = 0; i < consdata1->nvars; ++i )
2591 if( consdata1->vars[i] != consdata2->vars[i] )
2593 assert(
SCIPvarCompare(consdata1->vars[i], consdata2->vars[i]) == 1 ||
2598 assert(
SCIPvarCompare(consdata1->vars[i], consdata2->vars[i]) == 0);
2615 scip = (
SCIP*)userptr;
2616 assert(scip !=
NULL);
2620 assert(consdata !=
NULL);
2621 assert(consdata->nvars > 0);
2629 assert(minidx >= 0 && minidx <= maxidx);
2641 int*
const cliquepartition,
2644 int*
const nusefulconss,
2646 int*
const nfixedvars,
2647 int*
const naddconss,
2648 int*
const ndelconss,
2649 int*
const nchgcoefs,
2660 assert(scip !=
NULL);
2661 assert(binvars !=
NULL || nbinvars == 0);
2662 assert(cliquepartition !=
NULL || nbinvars == 0);
2663 assert(ncliques >= 0 && ncliques <= nbinvars);
2664 assert(usefulconss !=
NULL);
2665 assert(nusefulconss !=
NULL);
2666 assert(nfixedvars !=
NULL);
2667 assert(naddconss !=
NULL);
2668 assert(ndelconss !=
NULL);
2669 assert(nchgcoefs !=
NULL);
2670 assert(cutoff !=
NULL);
2673 if( nbinvars == 0 || ncliques == 0 )
2676 assert(binvars !=
NULL);
2677 assert(cliquepartition !=
NULL);
2680 if( ncliques == nbinvars )
2686 for( c = 0; c < ncliques - 1; ++c )
2688 if( lastclqidx >= cliquepartition[c] )
2699 for( v = c; v < nbinvars - 1; ++v )
2701 if( cliquepartition[c] == cliquepartition[v] )
2729 assert(cliqueconsdata !=
NULL);
2732 if( !
SCIPconsIsDeleted(cliquecons) && nadded - cliqueconsdata->nfixedzeros >= 2 )
2734 assert(cliqueconsdata->nfixedones == 0);
2737 usefulconss[*nusefulconss] = cliquecons;
2746 lastclqidx = cliquepartition[c];
2762 int*
const nusefulconss,
2763 int*
const nfixedvars,
2764 int*
const ndelconss,
2765 int*
const nchgcoefs,
2773 int nlocaladdconss = 0;
2776 assert(scip !=
NULL);
2777 assert(conss !=
NULL || nconss == 0);
2778 assert(usefulconss !=
NULL);
2779 assert(nusefulconss !=
NULL);
2780 assert(nfixedvars !=
NULL);
2781 assert(ndelconss !=
NULL);
2782 assert(nchgcoefs !=
NULL);
2783 assert(cutoff !=
NULL);
2788 assert(conss !=
NULL);
2790 for( c = nconss - 1; c >= 0; --c )
2809 assert(nlocaladdconss == 0);
2816 assert(consdata !=
NULL);
2826 assert(consdata->nfixedones == 0);
2828 if( consdata->nvars == 0 )
2837 usefulconss[*nusefulconss] = cons;
2852 int const nusefulconss,
2854 int*
const nusefulvars,
2856 int*
const varnconss,
2857 int*
const maxnvarconsidx,
2858 int**
const varconsidxs,
2868 assert(scip !=
NULL);
2869 assert(usefulconss !=
NULL || nusefulconss == 0);
2870 assert(usefulvars !=
NULL);
2871 assert(nusefulvars !=
NULL);
2872 assert(vartoindex !=
NULL);
2873 assert(varnconss !=
NULL);
2874 assert(maxnvarconsidx !=
NULL);
2875 assert(varconsidxs !=
NULL);
2876 assert(maxnvars !=
NULL);
2878 if( nusefulconss == 0 )
2881 assert(usefulconss !=
NULL);
2883 for( c = nusefulconss - 1; c >= 0; --c )
2885 cons = usefulconss[c];
2890 assert(consdata !=
NULL);
2894 assert(consdata->merged);
2897 if( consdata->nvars > *maxnvars )
2898 *maxnvars = consdata->nvars;
2901 for( v = consdata->nvars - 1; v >= 0; --v )
2905 var = consdata->vars[v];
2906 assert(var !=
NULL);
2919 usefulvars[*nusefulvars] = var;
2921 varindex = *nusefulvars;
2937 if( varnconss[varindex] == maxnvarconsidx[varindex] )
2943 assert(varnconss[varindex] < maxnvarconsidx[varindex]);
2945 varconsidxs[varindex][varnconss[varindex]] = c;
2947 ++(varnconss[varindex]);
2960 int*
const varnconss,
2961 int**
const varconsidxs
2970 assert(var !=
NULL);
2972 assert(considx >= 0);
2973 assert(vartoindex !=
NULL);
2974 assert(varnconss !=
NULL);
2975 assert(varconsidxs !=
NULL);
2981 for( i = 0; i < varnconss[varindex]; ++i )
2983 if( varconsidxs[varindex][i] == considx )
2985 varconsidxs[varindex][i] = varconsidxs[varindex][varnconss[varindex] - 1];
2989 --(varnconss[varindex]);
3004 int*
const nusefulvars,
3006 int*
const varnconss,
3007 int*
const maxnvarconsidx,
3008 int**
const varconsidxs
3013 assert(scip !=
NULL);
3014 assert(addvar !=
NULL);
3016 assert(usefulvars !=
NULL);
3017 assert(nusefulvars !=
NULL);
3018 assert(vartoindex !=
NULL);
3019 assert(varnconss !=
NULL);
3020 assert(maxnvarconsidx !=
NULL);
3021 assert(varconsidxs !=
NULL);
3033 varindex = *nusefulvars;
3036 assert(varconsidxs[varindex] ==
NULL);
3038 maxnvarconsidx[varindex] = 1;
3040 varnconss[varindex] = 0;
3047 if( varnconss[varindex] == maxnvarconsidx[varindex] )
3053 assert(varnconss[varindex] < maxnvarconsidx[varindex]);
3054 varconsidxs[varindex][varnconss[varindex]] = considx;
3057 ++(varnconss[varindex]);
3079 int*
const naggregations,
3082 int*
const saggregations,
3086 int*
const nfixedvars,
3087 int*
const naggrvars,
3088 int*
const ndelconss,
3098 assert(scip !=
NULL);
3099 assert(cons !=
NULL);
3100 assert(nfixedvars !=
NULL);
3101 assert(naggrvars !=
NULL);
3102 assert(ndelconss !=
NULL);
3103 assert(cutoff !=
NULL);
3109 assert(consdata !=
NULL);
3111 if( consdata->presolpropagated )
3114 consdata->presolpropagated =
TRUE;
3116 vars = consdata->vars;
3117 nvars = consdata->nvars;
3143 if( consdata->nfixedones > 1 )
3159 SCIPdebugMsg(scip,
"set partitioning / packing constraint <%s> is infeasible, %d variables fixed to one\n",
SCIPconsGetName(cons), consdata->nfixedones);
3165 if( consdata->nfixedones == 1 )
3173 assert(vars !=
NULL);
3175 for( v = nvars - 1; v >= 0; --v )
3185 SCIPdebugMsg(scip,
"setppc constraint <%s>: infeasible fixing <%s> == 0\n",
3213 assert(vars !=
NULL);
3216 if( consdata->nfixedzeros == nvars )
3218 assert(consdata->nfixedones == 0);
3242 if( consdata->nfixedzeros + 1 == nvars )
3244 assert(consdata->nfixedones == 0);
3254 for( v = nvars - 1; v >= 0; --v )
3259 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]));
3265 SCIPdebugMsg(scip,
"setppc constraint <%s>: infeasible fixing <%s> == 1\n",
3296 for( v = nvars - 1; v >= 0; --v )
3314 assert(conshdlr !=
NULL);
3316 assert(conshdlrdata !=
NULL);
3326 SCIP_CALL( conshdlrdataDecVaruses(scip, conshdlrdata, var) );
3327 SCIP_CALL( conshdlrdataDecVaruses(scip, conshdlrdata, vars[v]) );
3334 SCIPdebugMsg(scip,
"set partitioning constraint <%s>: aggregate <%s> + <%s> == 1\n",
3342 SCIP_CALL( conshdlrdataIncVaruses(scip, conshdlrdata, var) );
3343 SCIP_CALL( conshdlrdataIncVaruses(scip, conshdlrdata, vars[v]) );
3360 assert(undoneaggrvars !=
NULL);
3361 assert(undoneaggrtypes !=
NULL);
3362 assert(naggregations !=
NULL);
3363 assert(saggregations !=
NULL);
3368 if( *saggregations == *naggregations )
3371 assert(*saggregations > *naggregations);
3380 assert(undoneaggrtypes[*naggregations] ==
FALSE);
3381 undoneaggrvars[2 * (*naggregations)] = var;
3382 undoneaggrvars[2 * (*naggregations) + 1] = vars[v];
3416 int const nusefulconss,
3418 int*
const nusefulvars,
3420 int*
const varnconss,
3421 int*
const maxnvarconsidx,
3422 int**
const varconsidxs,
3423 int*
const countofoverlapping,
3435 int*
const naggregations,
3436 int*
const saggregations,
3440 int*
const nfixedvars,
3441 int*
const naggrvars,
3442 int*
const nchgcoefs,
3443 int*
const ndelconss,
3466 assert(scip !=
NULL);
3467 assert(cons !=
NULL);
3468 assert(usefulconss !=
NULL && nusefulconss > 0);
3469 assert(0 <= considx && considx < nusefulconss);
3470 assert(usefulconss[considx] == cons);
3471 assert(0 <= endidx && endidx <= nusefulconss);
3472 assert(countofoverlapping !=
NULL);
3473 assert(chgcons !=
NULL);
3474 assert(undoneaggrvars !=
NULL);
3475 assert(undoneaggrtypes !=
NULL);
3476 assert(naggregations !=
NULL);
3477 assert(saggregations !=
NULL);
3478 assert(nfixedvars !=
NULL);
3479 assert(naggrvars !=
NULL);
3480 assert(nchgcoefs !=
NULL);
3481 assert(ndelconss !=
NULL);
3482 assert(cutoff !=
NULL);
3488 assert(consdata !=
NULL);
3490 nvars = consdata->nvars;
3495 vars = consdata->vars;
3496 assert(vars !=
NULL);
3498 oldnfixedzeros = consdata->nfixedzeros;
3499 overlapdestroyed =
FALSE;
3502 for( c = endidx - 1; c >= 0; --c )
3504 cons1 = usefulconss[c];
3513 assert(usefulconss[c] != cons);
3516 oldnaggrvars = *naggrvars;
3522 SCIP_CALL(
presolvePropagateCons(scip, cons1,
FALSE, undoneaggrvars, undoneaggrtypes, naggregations, saggregations, nfixedvars, naggrvars, ndelconss, cutoff) );
3528 assert(*naggrvars == oldnaggrvars);
3534 assert(consdata1 !=
NULL);
3536 nvars1 = consdata1->nvars;
3542 assert(countofoverlapping[c] <= nvars1);
3545 assert(consdata1->nfixedones == 0);
3550 if( !overlapdestroyed && countofoverlapping[c] == nvars - consdata->nfixedzeros )
3554 if( nvars - consdata->nfixedzeros < nvars1 )
3562 assert(consdata->merged);
3563 assert(consdata1->merged);
3565 vars1 = consdata1->vars;
3566 assert(vars1 !=
NULL);
3571 consdata1->sorted =
FALSE;
3574 for( v = nvars - 1, v1 = nvars1 - 1; v >= 0 && v1 >= 0; )
3629 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]));
3650 assert(negated0 == negated1);
3657 for( ; v1 >= 0; --v1)
3662 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]));
3682 SCIPdebugMsg(scip,
"all variables in the set-partitioning constraint <%s> are fixed to zero, this leads to a cutoff\n",
SCIPconsGetName(cons1));
3717 else if( (!overlapdestroyed && countofoverlapping[c] + consdata1->nfixedzeros == nvars1) || countofoverlapping[c] == nvars1 )
3722 const int oldnfixedvars = *nfixedvars;
3728 assert(consdata->merged);
3729 assert(consdata1->merged);
3731 vars1 = consdata1->vars;
3736 consdata1->sorted =
FALSE;
3739 for( v = nvars - 1, v1 = nvars1 - 1; v >= 0 && v1 >= 0; )
3794 SCIPdebugMsg(scip,
"trying to fix <%s> to 0 because it is in the same clique with a complete set partitioning constraint\n",
SCIPvarGetName(var));
3819 assert(negated0 == negated1);
3832 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]));
3851 SCIPdebugMsg(scip,
"all variables in the set-partitioning constraint <%s> are fixed to zero, this leads to a cutoff\n",
SCIPconsGetName(cons1));
3870 if( oldnfixedvars < *nfixedvars )
3871 overlapdestroyed =
TRUE;
3901 assert(consdata->merged);
3902 assert(consdata1->merged);
3904 vars1 = consdata1->vars;
3909 consdata1->sorted =
FALSE;
3912 for( v = nvars - 1, v1 = nvars1 - 1; v >= 0 && v1 >= 0; )
3959 assert(aggvar1 ==
NULL);
3962 if( aggvar2 !=
NULL )
3970 assert(aggvar2 ==
NULL);
3971 aggvar2 = vars1[v1];
3973 if( aggvar1 !=
NULL )
3983 if( negated0 != negated1 )
3988 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]));
3999 if( aggvar1 ==
NULL && aggvar2 ==
NULL )
4003 if( aggvar2 ==
NULL )
4005 for( ; v1 >= 0; --v1)
4010 aggvar2 = vars1[v1];
4015 else if( aggvar1 ==
NULL )
4029 if( aggvar1 ==
NULL || aggvar2 ==
NULL )
4035 if( *saggregations == *naggregations )
4038 assert(*saggregations > *naggregations);
4047 undoneaggrtypes[*naggregations] =
TRUE;
4048 undoneaggrvars[2 * (*naggregations)] = aggvar1;
4049 undoneaggrvars[2 * (*naggregations) + 1] = aggvar2;
4067 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)) )
4079 int constochangeidx;
4081 const int oldnchgcoefs = *nchgcoefs;
4089 assert(consdata->merged);
4090 assert(consdata1->merged);
4093 SCIPsortDownPtr((
void**)(consdata1->vars), SCIPvarCompActiveAndNegated, nvars1);
4095 consdata1->sorted =
FALSE;
4101 varstochange = consdata1->vars;
4102 nvarstostay = nvars;
4103 nvarstochange = nvars1;
4105 constochange = cons1;
4106 consdatachange = consdata1;
4107 constochangeidx = c;
4111 varstostay = consdata1->vars;
4112 varstochange = vars;
4113 nvarstostay = nvars1;
4114 nvarstochange = nvars;
4116 constochange = cons;
4117 consdatachange = consdata;
4118 constochangeidx = considx;
4126 for( v = nvarstostay - 1, v1 = nvarstochange - 1; v >= 0 && v1 >= 0; )
4147 var = varstostay[v];
4160 var1 = varstochange[v1];
4173 assert(addvar ==
NULL);
4174 addvar = varstostay[v];
4187 if( negated0 != negated1 )
4189 assert(addvar ==
NULL);
4191 SCIPdebugMsg(scip,
"-> trying to fix <%s> to 0 because it would exist twice in a constraint\n",
SCIPvarGetName(varstochange[v1]));
4206 SCIP_CALL(
presolvePropagateCons(scip, constostay,
FALSE,
NULL,
NULL,
NULL,
NULL, nfixedvars, naggrvars, ndelconss, cutoff) );
4225 assert(addvar !=
NULL || v >= 0);
4227 assert(*nchgcoefs - oldnchgcoefs == countofoverlapping[c]);
4230 if( addvar ==
NULL )
4240 addvar = varstostay[v];
4244 assert(addvar !=
NULL);
4248 assert(addvar !=
NULL);
4256 consdatachange->merged =
TRUE;
4257 assert(constochangeidx == (cons == constochange ? considx : c));
4281 int*
const nusefulvars,
4288 int*
const varnconss,
4289 int*
const maxnvarconsidx,
4290 int**
const varconsidxs,
4298 int*
const nfixedvars,
4299 int*
const ndelconss,
4315 assert(scip !=
NULL);
4316 assert(cons !=
NULL);
4317 assert(usefulvars !=
NULL);
4318 assert(cliquevalues !=
NULL);
4319 assert(*cliquevalues !=
NULL);
4320 assert(vartoindex !=
NULL);
4321 assert(varnconss !=
NULL);
4322 assert(maxnvarconsidx !=
NULL);
4323 assert(varconsidxs !=
NULL);
4324 assert(maxnvars !=
NULL);
4325 assert(nadded !=
NULL);
4326 assert(chgcons !=
NULL);
4327 assert(nfixedvars !=
NULL);
4328 assert(ndelconss !=
NULL);
4329 assert(cutoff !=
NULL);
4335 assert(consdata !=
NULL);
4337 nvars = consdata->nvars;
4342 assert(nvars <= *maxnvars);
4344 vars = consdata->vars;
4345 assert(vars !=
NULL);
4350 for( v = nvars - 1; v >= 0 && v1 >= 0; )
4378 assert(consdata->merged);
4381 if( (*cliquevalues)[v] )
4392 var1 = usefulvars[v1];
4417 for( k = nvars - 1; k >= 0; --k )
4425 if( (*cliquevalues)[k] )
4448 if( value != (*cliquevalues)[v] )
4453 assert(nvars <= consdata->nvars);
4456 for( k = nvars - 1; k >= 0; --k )
4465 if( k == nottocheck )
4468 if( (*cliquevalues)[k] )
4499 if( nottocheck >= 0 )
4502 assert(nvars <= consdata->nvars);
4503 assert(consdata->merged);
4506 for( k = consdata->nvars - 1; k >= 0; --k )
4515 if( k != nottocheck )
4517 SCIPdebugMsg(scip,
"trying to fix <%s> to 0 because we could lift a negated variable of another constraint variable\n",
SCIPvarGetName(vars[k]));
4538 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]));
4553 SCIPdebugMsg(scip,
" -> deleting constraint <%s> number <%d> due to active and negated variable in the same clique constraint\n",
SCIPconsGetName(cons), arraypos);
4563 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]));
4585 addvar = usefulvars[v1 + 1];
4594 consdata->merged =
TRUE;
4606 vars = consdata->vars;
4607 nvars = consdata->nvars;
4612 if( (*maxnvars) < nvars )
4614 while( (*maxnvars) < nvars )
4629 for( ; v1 >= 0; --v1)
4637 var1 = usefulvars[v1];
4648 assert(nvars <= consdata->nvars);
4651 for( k = nvars - 1; k >= 0; --k )
4660 if( (*cliquevalues)[k] )
4682 SCIPdebugMsg(scip,
"trying to fix <%s> to 0 because this variable is in the same clique with a set partition\n",
SCIPvarGetName(usefulvars[v1]));
4704 addvar = usefulvars[v1];
4713 consdata->merged =
TRUE;
4725 vars = consdata->vars;
4726 nvars = consdata->nvars;
4731 if( (*maxnvars) < nvars )
4733 while( (*maxnvars) < nvars )
4757 int const naggregations,
4758 int*
const naggrvars,
4768 assert(scip !=
NULL);
4769 assert(conshdlrdata !=
NULL);
4770 assert(undoneaggrvars !=
NULL);
4771 assert(undoneaggrtypes !=
NULL);
4772 assert(naggregations > 0);
4773 assert(naggrvars !=
NULL);
4774 assert(cutoff !=
NULL);
4777 for( a = 0; a < naggregations; ++a )
4779 var1 = undoneaggrvars[2 * a];
4780 var2 = undoneaggrvars[2 * a + 1];
4781 assert(var1 !=
NULL);
4782 assert(var2 !=
NULL);
4790 SCIP_CALL( conshdlrdataDecVaruses(scip, conshdlrdata, var1) );
4791 SCIP_CALL( conshdlrdataDecVaruses(scip, conshdlrdata, var2) );
4795 if( undoneaggrtypes[a] )
4818 SCIP_CALL( conshdlrdataIncVaruses(scip, conshdlrdata, var1) );
4819 SCIP_CALL( conshdlrdataIncVaruses(scip, conshdlrdata, var2) );
4837 int*
const firstchange,
4838 int*
const firstclique,
4839 int*
const lastclique,
4840 int*
const nfixedvars,
4841 int*
const naggrvars,
4842 int*
const ndelconss,
4843 int*
const nchgcoefs,
4854 int* maxnvarconsidx;
4855 int* countofoverlapping =
NULL;
4876 assert(scip !=
NULL);
4877 assert(conshdlrdata !=
NULL);
4878 assert(conss !=
NULL || nconss == 0);
4879 assert(firstchange !=
NULL);
4880 assert(firstclique !=
NULL);
4881 assert(lastclique !=
NULL);
4882 assert(nfixedvars !=
NULL);
4883 assert(naggrvars !=
NULL);
4884 assert(ndelconss !=
NULL);
4885 assert(nchgcoefs !=
NULL);
4886 assert(cutoff !=
NULL);
4898 susefulvars = 2 * nvars;
4904 saggregations = nvars;
4925 if( conshdlrdata->nclqpresolve == 0 && conshdlrdata->addvariablesascliques )
4928 int* cliquepartition;
4955 nrounds, nfixedvars, &naddconss, ndelconss, nchgcoefs, cutoff) );
4960 *ndelconss -= naddconss;
4980 if( nusefulconss <= 1 )
4993 SCIP_CALL(
collectCliqueData(scip, usefulconss, nusefulconss, usefulvars, &nusefulvars, vartoindex, varnconss, maxnvarconsidx, varconsidxs, &maxnvars) );
4994 assert(maxnvars > 0);
5002 SCIPsortDownPtr((
void**)usefulvars, SCIPvarCompActiveAndNegated, nusefulvars);
5005 for( c = nusefulconss - 1; c >= 0 && !
SCIPisStopped(scip); --c )
5013 int cons0fixedzeros;
5016 const int oldnaggrvars = *naggrvars;
5018 cons0 = usefulconss[c];
5026 SCIP_CALL(
presolvePropagateCons(scip, cons0,
FALSE, undoneaggrvars, undoneaggrtypes, &naggregations, &saggregations, nfixedvars, naggrvars, ndelconss, cutoff) );
5032 assert(*naggrvars == oldnaggrvars);
5039 assert(consdata !=
NULL);
5041 cons0vars = consdata->vars;
5042 ncons0vars = consdata->nvars;
5045 SCIPsortDownPtr((
void**)cons0vars, SCIPvarCompActiveAndNegated, ncons0vars);
5047 consdata->sorted =
FALSE;
5050 assert(maxnvars >= ncons0vars);
5056 for( v = ncons0vars - 1; v >= 0 ; --v )
5058 var0 = cons0vars[v];
5067 for( v1 = varnconss[varindex] - 1; v1 >= 0 ; --v1 )
5068 ++(countofoverlapping[varconsidxs[varindex][v1]]);
5071 oldnchgcoefs = *nchgcoefs;
5072 cons0fixedzeros = consdata->nfixedzeros;
5078 varnconss, maxnvarconsidx, varconsidxs, countofoverlapping, conshdlrdata->cliqueshrinking, &chgcons0,
5079 undoneaggrvars, undoneaggrtypes, &naggregations, &saggregations,
5080 nfixedvars, naggrvars, nchgcoefs, ndelconss, cutoff) );
5086 assert(*naggrvars == oldnaggrvars);
5089 if( chgcons0 && *nchgcoefs > oldnchgcoefs )
5092 assert(consdata !=
NULL);
5094 cons0vars = consdata->vars;
5095 ncons0vars = consdata->nvars;
5098 SCIPsortDownPtr((
void**)cons0vars, SCIPvarCompActiveAndNegated, ncons0vars);
5100 consdata->sorted =
FALSE;
5104 if( consdata->nfixedones > 0 || consdata->nfixedzeros > cons0fixedzeros )
5109 SCIP_CALL(
presolvePropagateCons(scip, cons0,
FALSE, undoneaggrvars, undoneaggrtypes, &naggregations, &saggregations, nfixedvars, naggrvars, ndelconss, cutoff) );
5115 assert(*naggrvars == oldnaggrvars);
5132 v1 = nusefulvars - 1;
5136 if( conshdlrdata->nclqpresolve > 0 )
5137 v1 = nusefulvars - 1;
5141 (void)
SCIPsortedvecFindDownPtr((
void**)usefulvars, SCIPvarCompActiveAndNegated, (
void*)cons0vars[ncons0vars - 1], nusefulvars, &v1);
5142 assert(v1 >= 0 && v1 < nusefulvars);
5150 assert(maxnvars >= ncons0vars);
5152 for( v = ncons0vars - 1; v >= 0; --v )
5167 maxnvarconsidx, varconsidxs, &maxnvars, &nadded, &chgcons0, nfixedvars, ndelconss, cutoff) );
5180 *firstchange =
MIN(*firstchange, c);
5181 *firstclique =
MIN(*firstclique, c);
5182 *lastclique =
MAX(*lastclique, c);
5186 cons0vars = consdata->vars;
5187 ncons0vars = consdata->nvars;
5192 SCIPsortDownPtr((
void**)cons0vars, SCIPvarCompActiveAndNegated, ncons0vars);
5194 consdata->sorted =
FALSE;
5199 for( v = ncons0vars - 1; v >= 0 ; --v )
5201 var0 = cons0vars[v];
5210 for( i = varnconss[varindex] - 1; i >= 0 ; --i )
5211 ++(countofoverlapping[varconsidxs[varindex][i]]);
5218 usefulconss, nusefulconss, usefulvars, &nusefulvars, vartoindex, varnconss, maxnvarconsidx, varconsidxs,
5219 countofoverlapping, conshdlrdata->cliqueshrinking, &chgcons0,
5220 undoneaggrvars, undoneaggrtypes, &naggregations, &saggregations,
5221 nfixedvars, naggrvars, nchgcoefs, ndelconss, cutoff) );
5227 assert(*naggrvars == oldnaggrvars);
5238 for( c = nusefulvars; c > 0; --c )
5240 if( varconsidxs[c] !=
NULL )
5266 if( *ndelconss < 0 )
5293 assert(scip !=
NULL);
5294 assert(firstclique >= 0);
5295 assert(lastclique <= nconss);
5296 assert(conss !=
NULL || ((nconss == 0) && (lastclique == 0)));
5299 for( c = firstclique; c < lastclique; ++c )
5302 assert(cons !=
NULL);
5310 *nchgbds += nlocalbdchgs;
5316 assert(consdata !=
NULL);
5321 if( !consdata->cliqueadded && consdata->nvars >= 2 )
5328 *nchgbds += nlocalbdchgs;
5341 *nchgbds += nlocalbdchgs;
5349 consdata->cliqueadded =
TRUE;
5372 assert(scip !=
NULL);
5373 assert(vars !=
NULL);
5375 assert(0 <= pos && pos < nvars);
5376 assert(infeasible !=
NULL);
5377 assert(aggregated !=
NULL);
5387 assert(*infeasible || *aggregated);
5392 if( !linearconshdlrexist )
5396 if( pos == nvars - 1 )
5402 tmpvars[pos] = tmpvars[nvars - 1];
5407 for( v = nvars - 2; v >= 0; --v )
5414 assert(!(*infeasible));
5418 if( pos < nvars - 1 )
5420 assert(tmpvars != vars);
5491 int posreplacements;
5492 int nhashmapentries;
5497 assert(scip !=
NULL);
5498 assert(conss !=
NULL);
5500 assert(nfixedvars !=
NULL);
5501 assert(naggrvars !=
NULL);
5502 assert(ndelconss !=
NULL);
5503 assert(nchgcoefs !=
NULL);
5504 assert(nchgsides !=
NULL);
5514 for( v = nposbinvars - 1; v >= 0; --v )
5523 if( (nuplocks == 1 && ndownlocks <= 1) || (nuplocks <= 1 && ndownlocks == 1) || (nuplocks <= 2 && ndownlocks <= 2 &&
SCIPvarGetNegatedVar(binvars[v]) !=
NULL) )
5528 SCIPdebugMsg(scip,
"found %d binary variables for possible multi-aggregation\n", nposvars);
5545 SCIPsortPtr((
void**)usefulconss, setppcConssSort2, nconss);
5547 posreplacements = 0;
5548 nhashmapentries = 0;
5552 assert(!donotaggr || !donotmultaggr);
5560 for( c = 0; c < nconss; ++c )
5567 cons = usefulconss[c];
5568 assert(cons !=
NULL);
5574 assert(consdata !=
NULL);
5605 oldnfixedvars = *nfixedvars;
5616 if( oldnfixedvars < *nfixedvars )
5621 assert(nlocaladdconss == 0);
5629 if( consdata->nvars < 2 )
5647 if( consdata->nvars == 0 )
5658 assert(!infeasible);
5681 var = consdata->vars[0];
5682 assert(var !=
NULL);
5689 if( nuplocks == 1 && objval <= 0 )
5712 var = consdata->vars[1];
5713 assert(var !=
NULL);
5720 if( nuplocks == 1 && objval <= 0 )
5749 SCIP_CALL(
SCIPaggregateVars(scip, consdata->vars[0], consdata->vars[1], 1.0, 1.0, 1.0, &infeasible, &redundant, &aggregated) );
5767 if( ndecs >= nposvars )
5775 assert(nposbinvars >= consdata->nvars);
5778 for( v = consdata->nvars - 1; v >= 0; --v )
5781 int deleteconsindex = -1;
5783 var = consdata->vars[v];
5784 assert(var !=
NULL);
5790 assert(nuplocks >= 1 && ndownlocks >= 0);
5794 assert(nuplocks == 1 && ndownlocks <= 1);
5797 if( ndownlocks == 0 )
5811 assert(!infeasible);
5818 SCIPdebugMsg(scip,
"multi-aggregating in set-packing constraint\n");
5854 considxs[nhashmapentries - 1] = c;
5855 posincons[nhashmapentries - 1] = v;
5863 assert(image > 0 && image <= nhashmapentries);
5865 consindex = considxs[image - 1];
5866 assert(0 <= consindex && consindex < nconss);
5869 assert(consindex < c);
5873 assert(posreplacements >= 0);
5875 varindex = posincons[image - 1];
5876 considxs[image - 1] = -1;
5877 posincons[image - 1] = -1;
5885 assert(aggrconsdata !=
NULL);
5887 assert(0 <= varindex);
5892 if( varindex >= aggrconsdata->nvars || aggrconsdata->vars[varindex] != negvar )
5899 assert(aggrconsdata->nvars >= 2);
5901 for( v2 = aggrconsdata->nvars - 1; v2 >= 0; --v2 )
5903 if( aggrconsdata->vars[v2] == negvar )
5910 assert(0 <= varindex && varindex < aggrconsdata->nvars);
5911 assert(aggrconsdata->vars[varindex] == negvar);
5918 multaggridx = consindex;
5925 notmultaggridx = consindex;
5929 SCIPdebugMsg(scip,
"multi-aggregating in two set-packing constraint\n");
5934 if( multaggridx == c )
5942 deleteconsindex = multaggridx;
5947 if( multaggridx == c )
5955 deleteconsindex = notmultaggridx;
5964 assert(deleteconsindex >= 0 && deleteconsindex <= c);
5970 SCIPdebugMsg(scip,
"multi-aggregating in set-partitioning constraint\n");
5995 assert(image > 0 && image <= nhashmapentries);
5997 assert(0 <= considxs[image - 1] && considxs[image - 1] < nconss);
5998 assert(
SCIPconsIsDeleted(usefulconss[considxs[image - 1]]) || chgtype[considxs[image - 1]] || (0 <= posincons[image - 1] && posincons[image - 1] <
SCIPconsGetData(usefulconss[considxs[image - 1]])->nvars));
6000 considxs[image - 1] = -1;
6001 posincons[image - 1] = -1;
6006 assert(posreplacements >= 0);
6020 considxs[nhashmapentries - 1] = c;
6021 posincons[nhashmapentries - 1] = v;
6038 assert(!chgtype[c]);
6041 assert(image > 0 && image <= nhashmapentries);
6043 consindex = considxs[image - 1];
6044 assert(0 <= consindex && consindex < nconss);
6047 assert(consindex < c);
6051 assert(posreplacements >= 0);
6053 varindex = posincons[image - 1];
6054 considxs[image - 1] = -1;
6055 posincons[image - 1] = -1;
6065 assert(aggrconsdata !=
NULL);
6071 assert(!dualpresolvingenabled || nuplocks + ndownlocks > 2);
6081 if( chgtype[consindex] )
6089 for( v2 = aggrconsdata->nvars - 1; v2 >= 0; --v2 )
6098 SCIPdebugMsg(scip,
"multi-aggregating in one set-partitioning or one set-packing constraint\n");
6108 assert(deleteconsindex == -1);
6120 assert(0 <= varindex && varindex < aggrconsdata->nvars);
6124 SCIPdebugMsg(scip,
"multi-aggregating in two set-partitioning or one set-partitioning and -packing constraint\n");
6136 cons = usefulconss[consindex];
6137 assert(deleteconsindex == -1);
6143 assert(nuplocks >= 1 && ndownlocks >= 0);
6148 assert(deleteconsindex < 0);
6155 assert(deleteconsindex < 0);
6160 SCIPdebugMsg(scip,
"changing constraint <%s> from set-partitioning to set-packing, due to multi-aggregation\n",
SCIPconsGetName(cons));
6169 if( deleteconsindex >= 0 )
6171 SCIPdebugMsg(scip,
"1: deleting redundant constraint <%s>, due to multi-aggregation\n",
SCIPconsGetName(usefulconss[deleteconsindex]));
6224 assert(scip !=
NULL);
6225 assert(blkmem !=
NULL);
6226 assert(conss !=
NULL || nconss == 0);
6227 assert(firstchange !=
NULL);
6228 assert(ndelconss !=
NULL);
6229 assert(nchgsides !=
NULL);
6234 assert(conss !=
NULL);
6237 hashtablesize = nconss;
6240 hashGetKeySetppccons, hashKeyEqSetppccons, hashKeyValSetppccons, (
void*) scip) );
6243 for( c = 0; c < nconss; ++c )
6271 assert(consdata0 !=
NULL && consdata1 !=
NULL);
6272 assert(consdata0->nvars >= 1 && consdata0->nvars == consdata1->nvars);
6274 assert(consdata0->sorted && consdata1->sorted);
6275 assert(consdata0->vars[0] == consdata1->vars[0]);
6277 SCIPdebugMsg(scip,
"setppc constraints <%s> and <%s> have identical variable sets\n",
6325 assert(ndelconss !=
NULL);
6327 SCIPdebugMsg(scip,
" -> removing setppc constraint <%s> which is redundant to <%s>\n",
6357 assert(cutoff !=
NULL);
6358 assert(nfixedvars !=
NULL);
6365 assert(consdata0 !=
NULL);
6366 assert(consdata1 !=
NULL);
6367 assert(consdata0->nvars < consdata1->nvars);
6368 assert(consdata0->sorted);
6369 assert(consdata1->sorted);
6372 for( v0 = 0, v1 = 0; v0 < consdata0->nvars && !(*cutoff); ++v0, ++v1 )
6376 assert(v1 < consdata1->nvars);
6378 for( ;
SCIPvarGetIndex(consdata1->vars[v1]) < index0 && !(*cutoff); ++v1 )
6389 assert(v1 < consdata1->nvars-1);
6395 for( ; v1 < consdata1->nvars && !(*cutoff); ++v1 )
6399 assert(consdata0->nvars == 0
6429 assert(cutoff !=
NULL);
6430 assert(nfixedvars !=
NULL);
6431 assert(ndelconss !=
NULL);
6432 assert(nchgsides !=
NULL);
6439 assert(consdata0 !=
NULL);
6440 assert(consdata1 !=
NULL);
6441 assert(consdata0->nvars < consdata1->nvars);
6442 assert(consdata0->sorted);
6443 assert(consdata1->sorted);
6445 switch( consdata0->setppctype )
6448 switch( consdata1->setppctype )
6473 switch( consdata1->setppctype )
6496 switch( consdata1->setppctype )
6545 uint64_t signature0;
6549 assert(scip !=
NULL);
6550 assert(conss !=
NULL);
6551 assert(cutoff !=
NULL);
6552 assert(nfixedvars !=
NULL);
6553 assert(ndelconss !=
NULL);
6554 assert(nchgsides !=
NULL);
6559 cons0 = conss[chkind];
6564 assert(consdata0 !=
NULL);
6565 assert(consdata0->nvars >= 1);
6574 cons0changed = consdata0->changed;
6575 consdata0->changed =
FALSE;
6576 for( c = (cons0changed ? 0 : firstchange); c < chkind && !(*cutoff) &&
SCIPconsIsActive(cons0); ++c )
6580 uint64_t signature1;
6581 uint64_t jointsignature;
6594 assert(consdata1 !=
NULL);
6603 jointsignature = (signature0 | signature1);
6604 if( jointsignature != signature0 && jointsignature != signature1 )
6608 cons0iscontained = (consdata0->nvars <= consdata1->nvars);
6609 cons1iscontained = (consdata1->nvars <= consdata0->nvars);
6612 while( v0 < consdata0->nvars && v1 < consdata1->nvars )
6619 if( index0 < index1 )
6621 cons0iscontained =
FALSE;
6622 if( !cons1iscontained )
6624 for( v0++; v0 < consdata0->nvars &&
SCIPvarGetIndex(consdata0->vars[v0]) < index1; v0++ )
6627 else if( index1 < index0 )
6629 cons1iscontained =
FALSE;
6630 if( !cons0iscontained )
6632 for( v1++; v1 < consdata1->nvars &&
SCIPvarGetIndex(consdata1->vars[v1]) < index0; v1++ )
6641 cons0iscontained = cons0iscontained && (v0 == consdata0->nvars);
6642 cons1iscontained = cons1iscontained && (v1 == consdata1->nvars);
6644 if( cons0iscontained && cons1iscontained )
6646 SCIPdebugMsg(scip,
"setppc constraints <%s> and <%s> have identical variable sets\n",
6652 if( consdata0->setppctype == consdata1->setppctype )
6681 else if( cons0iscontained )
6689 else if( cons1iscontained )
6716 assert(scip !=
NULL);
6717 assert(conshdlr !=
NULL);
6718 assert(conss !=
NULL);
6719 assert(nconss >= 0);
6723 for( i = 0; i < nconss; i++ )
6728 if( consdata->varsdeleted )
6731 for( v = consdata->nvars - 1; v >= 0; v-- )
6738 consdata->varsdeleted =
FALSE;
6762 assert(conshdlr !=
NULL);
6764 assert(nconss == 0 || conss !=
NULL);
6765 assert(result !=
NULL);
6767 SCIPdebugMsg(scip,
"Enforcing %d set partitioning / packing / covering constraints for %s solution\n", nconss,
6768 sol ==
NULL ?
"LP" :
"relaxation");
6777 for( c = 0; c < nusefulconss && !cutoff && !reduceddom; ++c )
6783 for( c = nusefulconss; c < nconss && !cutoff && !separated && !reduceddom; ++c )
6791 if( (sol ==
NULL) && !cutoff && !separated && !reduceddom )
6794 SCIP_CALL( branchLP(scip, conshdlr, result) );
6804 else if( separated )
6806 else if( reduceddom )
6855 assert(scip !=
NULL);
6859 if( conshdlr ==
NULL )
6861 SCIPerrorMessage(
"set partitioning / packing / covering constraint handler not found\n");
6878 SCIP_CALL(
SCIPcreateCons(scip, cons, name, conshdlr, consdata, initial, separate, enforce, check, propagate,
6879 local, modifiable, dynamic, removable, stickingatnode) );
6882 assert(conshdlrdata !=
NULL);
6886 ++(conshdlrdata->nsetpart);
6887 assert(conshdlrdata->nsetpart >= 0);
6893 assert(conshdlrdata->eventhdlr !=
NULL);
6941 assert(nvars == 0 || vars !=
NULL);
6942 assert(nvars == 0 || vals !=
NULL);
6943 assert(mult == +1 || mult == -1);
6949 for( v = 0; v < nvars; ++v )
6951 if( mult * vals[v] > 0.0 )
6952 transvars[v] = vars[v];
6957 assert(transvars[v] !=
NULL);
6962 initial, separate, enforce, check, propagate, local, modifiable, dynamic, removable, stickingatnode) );
6974 assert(upgdcons !=
NULL);
6992 if( nposbin + nnegbin + nposimplbin + nnegimplbin == nvars && ncoeffspone + ncoeffsnone == nvars )
6996 if(
SCIPisEQ(scip, lhs, rhs) && (
SCIPisEQ(scip, lhs, 1.0 - ncoeffsnone) ||
SCIPisEQ(scip, lhs, ncoeffspone - 1.0)) )
7001 mult =
SCIPisEQ(scip, lhs, 1.0 - ncoeffsnone) ? +1 : -1;
7062 assert( scip !=
NULL );
7063 assert( cons !=
NULL );
7064 assert( nupgdconss !=
NULL );
7065 assert( upgdconss !=
NULL );
7108 coefx /= term->
coef;
7109 coefy /= term->
coef;
7121 if( !
SCIPisEQ(scip, rhs, -coefx * coefy) )
7126 vars[0] = quadvarterms[0].
var;
7130 assert(
SCIPisEQ(scip, coefy, -1.0));
7136 vars[1] = quadvarterms[1].
var;
7140 assert(
SCIPisEQ(scip, coefx, -1.0));
7170 assert(scip !=
NULL);
7171 assert(conshdlr !=
NULL);
7188 assert(conshdlr !=
NULL);
7190 assert(scip !=
NULL);
7194 assert(conshdlrdata !=
NULL);
7209 assert(conshdlr !=
NULL);
7211 assert(scip !=
NULL);
7215 assert(conshdlrdata !=
NULL);
7217 conshdlrdata->noldfixedvars = 0;
7218 conshdlrdata->noldimpls = 0;
7219 conshdlrdata->noldcliques = 0;
7220 conshdlrdata->noldupgrs = 0;
7221 conshdlrdata->nclqpresolve = 0;
7222 conshdlrdata->updatedsetppctype =
FALSE;
7223 conshdlrdata->enablecliquelifting =
TRUE;
7235 assert(scip !=
NULL);
7236 assert(conshdlr !=
NULL);
7238 for( c = 0; c < nconss; ++c )
7258 for( c = 0; c < nconss; ++c )
7261 assert(consdata !=
NULL);
7263 if( consdata->row !=
NULL )
7279 assert(conshdlr !=
NULL);
7284 assert(conshdlrdata !=
NULL);
7285 assert(conshdlrdata->eventhdlr !=
NULL);
7291 --(conshdlrdata->nsetpart);
7292 assert(conshdlrdata->nsetpart >= 0);
7322 assert(sourcecons !=
NULL);
7323 assert(targetcons !=
NULL);
7327 assert(conshdlrdata !=
NULL);
7328 assert(conshdlrdata->eventhdlr !=
NULL);
7331 assert(sourcedata !=
NULL);
7332 assert(sourcedata->row ==
NULL);
7347 ++(conshdlrdata->nsetpart);
7348 assert(conshdlrdata->nsetpart >= 0);
7364 *infeasible =
FALSE;
7366 for( c = 0; c < nconss && !(*infeasible); ++c )
7385 assert(conshdlr !=
NULL);
7387 assert(nconss == 0 || conss !=
NULL);
7388 assert(result !=
NULL);
7390 SCIPdebugMsg(scip,
"separating %d/%d set partitioning / packing / covering constraints\n", nusefulconss, nconss);
7399 for( c = 0; c < nusefulconss && !cutoff; ++c )
7410 else if( reduceddom )
7412 else if( separated )
7428 assert(conshdlr !=
NULL);
7430 assert(nconss == 0 || conss !=
NULL);
7431 assert(result !=
NULL);
7433 SCIPdebugMsg(scip,
"separating %d/%d set partitioning / packing / covering constraints\n", nusefulconss, nconss);
7442 for( c = 0; c < nusefulconss && !cutoff; ++c )
7453 else if( reduceddom )
7455 else if( separated )
7489 assert(conshdlr !=
NULL);
7490 assert(result !=
NULL);
7493 assert(conshdlrdata !=
NULL);
7495 varuses = conshdlrdata->varuses;
7496 assert(varuses !=
NULL);
7503 assert(MINBRANCHWEIGHT <= MAXBRANCHWEIGHT);
7511 for( i = 0; i < nlpcands; ++i )
7517 for( j = nsortcands; j > 0 && numuses > uses[j-1]; --j )
7519 sortcands[j] = sortcands[j-1];
7520 uses[j] = uses[j-1];
7522 assert(0 <= j && j <= nsortcands);
7528 assert(nsortcands <= nlpcands);
7533 if( nsortcands > 0 )
7546 for( nselcands = 0; nselcands < nsortcands; ++nselcands )
7550 branchweight += solval;
7553 if( branchweight > MAXBRANCHWEIGHT )
7560 minprio =
MIN(minprio, tmp);
7562 minestzero =
MIN(minestzero, tmp);
7564 minestone =
MIN(minestone, tmp);
7569 assert(nselcands > 0);
7570 branchweight -= solval;
7573 if( MINBRANCHWEIGHT <= branchweight && branchweight <= MAXBRANCHWEIGHT )
7578 assert(1 <= nselcands && nselcands <= nlpcands);
7582 for( i = 0; i < nselcands; ++i )
7589 if( nselcands == 1 )
7612 SCIPdebugMsg(scip,
"binary set branching: nselcands=%d/%d, weight(S)=%g, A={", nselcands, nlpcands, branchweight);
7613 for( i = 0; i < nselcands; ++i )
7647 int maxnbranchcands;
7655 assert(conshdlr !=
NULL);
7656 assert(result !=
NULL);
7659 assert(conshdlrdata !=
NULL);
7662 if( conshdlrdata->npseudobranches <= 1 )
7667 if( npseudocands == 0 )
7670 varuses = conshdlrdata->varuses;
7671 assert(varuses !=
NULL);
7674 maxnbranchcands = conshdlrdata->npseudobranches-1;
7675 assert(maxnbranchcands >= 1);
7683 for( i = 0; i < npseudocands; ++i )
7685 var = pseudocands[i];
7689 if( nbranchcands < maxnbranchcands || uses > canduses[nbranchcands-1] )
7691 for( j =
MIN(nbranchcands, maxnbranchcands-1); j > 0 && uses > canduses[j-1]; --j )
7693 branchcands[j] = branchcands[j-1];
7694 canduses[j] = canduses[j-1];
7696 assert(0 <= j && j <= nbranchcands && j < maxnbranchcands);
7697 branchcands[j] = var;
7699 if( nbranchcands < maxnbranchcands )
7704 assert(nbranchcands <= maxnbranchcands);
7709 if( nbranchcands > 0 )
7720 for( i = 0; i < nbranchcands; ++i )
7723 minestzero =
MIN(minestzero, tmp);
7732 for( i = 0; i < nbranchcands; ++i )
7736 for( j = 0; j < i; ++j )
7744 for( i = 0; i < nbranchcands; ++i )
7757 SCIPdebugMsg(scip,
"branched on pseudo solution: %d children\n", nchildren);
7803 assert(nconss == 0 || conss !=
NULL);
7804 assert(result !=
NULL);
7811 SCIP_CALL( branchPseudo(scip, conshdlr, result) );
7816 SCIPdebugMsg(scip,
"pseudo enforcing %d set partitioning / packing / covering constraints\n", nconss);
7826 for( c = 0; c < nconss && !cutoff && !reduceddom && !solvelp; ++c )
7833 else if( reduceddom )
7837 else if( infeasible )
7845 SCIP_CALL( branchPseudo(scip, conshdlr, result) );
7861 assert(conshdlr !=
NULL);
7863 assert(nconss == 0 || conss !=
NULL);
7864 assert(result !=
NULL);
7869 for( c = 0; c < nconss && (*result ==
SCIP_FEASIBLE || completely); ++c )
7873 assert(consdata !=
NULL);
7888 for( v = 0; v < consdata->nvars; ++v )
7895 SCIPinfoMessage(scip,
NULL,
"violation: the right hand side is violated by by %.15g\n", ABS(sum - 1));
7915 assert(conshdlr !=
NULL);
7917 assert(nconss == 0 || conss !=
NULL);
7918 assert(result !=
NULL);
7922 SCIPdebugMsg(scip,
"propagating %d/%d set partitioning / packing / covering constraints\n", nmarkedconss, nconss);
7928 for( c = nmarkedconss - 1; c >= 0 && !cutoff; --c )
7938 int naddconss, ndelconss;
7943 naddconss = ndelconss = 0;
7961 else if( nfixedvars > 0 )
7984 assert(conshdlr !=
NULL);
7986 assert(scip !=
NULL);
7987 assert(result !=
NULL);
7990 oldnfixedvars = *nfixedvars;
7991 oldndelconss = *ndelconss;
7992 oldnaggrvars = *naggrvars;
7993 oldnchgcoefs = *nchgcoefs;
7997 assert(conshdlrdata !=
NULL);
8000 conshdlrdata->enablecliquelifting = conshdlrdata->enablecliquelifting || conshdlrdata->updatedsetppctype
8002 || conshdlrdata->noldcliques !=
SCIPgetNCliques(scip) || conshdlrdata->noldupgrs != nconss;
8005 startdelconss = *ndelconss;
8008 conshdlrdata->updatedsetppctype =
FALSE;
8011 firstchange = INT_MAX;
8012 firstclique = INT_MAX;
8022 assert(cons !=
NULL);
8024 assert(consdata !=
NULL);
8029 if( consdata->nfixedzeros > 0 || nnewaggrvars > 0 || nnewaddconss > 0 || nnewupgdconss > 0
8030 || *naggrvars > oldnaggrvars || (nrounds == 0 &&
SCIPgetNRuns(scip) > 1) )
8065 if( consdata->nfixedzeros > 0 )
8082 SCIP_CALL(
presolvePropagateCons(scip, cons,
TRUE,
NULL,
NULL,
NULL,
NULL, nfixedvars, naggrvars, ndelconss, &cutoff) );
8095 if( consdata->nfixedzeros > 0 )
8120 if( firstchange == INT_MAX && consdata->changed )
8124 if( !consdata->cliqueadded && consdata->nvars >= 2 )
8126 if( firstclique == INT_MAX )
8133 if( oldnfixedvars < *nfixedvars || oldnaggrvars < *naggrvars || oldndelconss < *ndelconss || oldnchgcoefs < *nchgcoefs )
8136 if( firstchange < nconss && conshdlrdata->presolusehashing )
8140 if( oldndelconss < *ndelconss )
8148 && ((conshdlrdata->nsetpart > 0 && !
SCIPdoNotMultaggr(scip) && conshdlrdata->conshdlrlinear !=
NULL)
8150 && conshdlrdata->nsetpart < nconss && !
SCIPdoNotAggr(scip))) )
8154 naggrvars, ndelconss, nchgcoefs, nchgsides, &cutoff) );
8161 else if( oldnfixedvars < *nfixedvars || oldnaggrvars < *naggrvars || oldndelconss < *ndelconss )
8169 SCIP_CALL(
addCliques(scip, conss, nconss, firstclique, lastclique, naddconss, ndelconss, nchgbds, &cutoff) );
8177 firstclique = nconss;
8182 &lastclique, nfixedvars, naggrvars, ndelconss, nchgcoefs, &cutoff) );
8183 ++(conshdlrdata->nclqpresolve);
8190 else if( oldnfixedvars < *nfixedvars || oldnaggrvars < *naggrvars || oldndelconss < *ndelconss || oldnchgcoefs < *nchgcoefs )
8194 conshdlrdata->noldfixedvars = *nfixedvars + *naggrvars;
8197 if( oldndelconss == *ndelconss && (presoltiming & SCIP_PRESOLTIMING_EXHAUSTIVE) != 0 )
8200 if( conshdlrdata->presolpairwise )
8204 oldndelconss = *ndelconss;
8205 oldnfixedvars = *nfixedvars;
8207 for( c = firstchange; c < nconss && !
SCIPisStopped(scip); ++c )
8226 oldndelconss = *ndelconss;
8227 oldnfixedvars = *nfixedvars;
8228 npaircomparisons = 0;
8238 nchgbds, &cutoff) );
8243 conshdlrdata->enablecliquelifting =
FALSE;
8244 conshdlrdata->noldupgrs = nconss - (*ndelconss - startdelconss);
8257 assert(conshdlr !=
NULL);
8259 assert(cons !=
NULL);
8261 assert(result !=
NULL);
8264 assert(consdata !=
NULL);
8266 SCIPdebugMsg(scip,
"conflict resolving method of set partitioning / packing / covering constraint handler\n");
8280 confvarfound =
FALSE;
8282 for( v = 0; v < consdata->nvars; ++v )
8284 if( consdata->vars[v] != infervar )
8293 assert(!confvarfound);
8294 confvarfound =
TRUE;
8298 assert(confvarfound);
8307 if( inferinfo >= 0 )
8314 for( v = 0; v < consdata->nvars; ++v )
8322 assert(v < consdata->nvars);
8344 switch( consdata->setppctype )
8347 nlocksdown = nlockspos + nlocksneg;
8348 nlocksup = nlockspos + nlocksneg;
8351 nlocksdown = nlocksneg;
8352 nlocksup = nlockspos;
8355 nlocksdown = nlockspos;
8356 nlocksup = nlocksneg;
8363 for( i = 0; i < consdata->nvars; ++i )
8376 assert(cons !=
NULL);
8380 SCIPdebugMsg(scip,
"activation information for set partitioning / packing / covering constraint <%s>\n",
8387 assert(consdata !=
NULL);
8389 if( consdata->nfixedones >= 1 || consdata->nfixedzeros >= consdata->nvars - 1 )
8412 SCIPdebugMsg(scip,
"deactivation information for set partitioning / packing / covering constraint <%s>\n",
8426 assert( scip !=
NULL );
8427 assert( conshdlr !=
NULL );
8428 assert( conss !=
NULL || nconss == 0 );
8445 assert( scip !=
NULL );
8446 assert( conshdlr !=
NULL );
8447 assert( cons !=
NULL );
8459 const char* consname;
8498 lhs, rhs, varmap, consmap,
8499 initial, separate, enforce, check, propagate, local, modifiable, dynamic, removable, stickingatnode, global, valid) );
8500 assert(cons !=
NULL);
8512 assert(scip !=
NULL);
8513 assert(success !=
NULL);
8514 assert(str !=
NULL);
8516 assert(cons !=
NULL);
8526 assert(str[1] ==
' ');
8544 if( *success && requsize > coefssize )
8547 coefssize = requsize;
8552 assert(!*success || requsize <= coefssize);
8567 while( isspace((
unsigned char)*str) )
8576 initial, separate, enforce, check, propagate, local, modifiable, dynamic, removable, stickingatnode) );
8580 initial, separate, enforce, check, propagate, local, modifiable, dynamic, removable, stickingatnode) );
8584 initial, separate, enforce, check, propagate, local, modifiable, dynamic, removable, stickingatnode) );
8606 assert(consdata !=
NULL);
8608 if( varssize < consdata->nvars )
8612 assert(vars !=
NULL);
8628 assert(consdata !=
NULL);
8630 (*nvars) = consdata->nvars;
8647 assert(eventhdlr !=
NULL);
8648 assert(eventdata !=
NULL);
8650 assert(event !=
NULL);
8655 assert(cons !=
NULL);
8658 assert(consdata !=
NULL);
8665 consdata->nfixedones++;
8668 consdata->nfixedones--;
8671 consdata->nfixedzeros++;
8674 consdata->nfixedzeros--;
8677 consdata->varsdeleted =
TRUE;
8680 if( consdata->merged )
8686 assert(var !=
NULL);
8690 consdata->merged =
FALSE;
8693 if( !consdata->existmultaggr )
8696 assert(var !=
NULL);
8699 consdata->existmultaggr =
TRUE;
8706 assert(0 <= consdata->nfixedzeros && consdata->nfixedzeros <= consdata->nvars);
8707 assert(0 <= consdata->nfixedones && consdata->nfixedones <= consdata->nvars);
8711 if( consdata->nfixedones >= 1 || consdata->nfixedzeros >= consdata->nvars - 1 )
8713 consdata->presolpropagated =
FALSE;
8718 consdata->presolpropagated =
FALSE;
8741 assert(conflicthdlr !=
NULL);
8743 assert(bdchginfos !=
NULL || nbdchginfos == 0);
8756 if( nbdchginfos == 2 )
8762 assert(bdchginfos !=
NULL);
8801 SCIPdebugMsg(scip,
"new clique of conflict constraint %s led to %d fixings\n", consname, ncliquebdchgs);
8805 SCIPdebugMsg(scip,
"new clique of conflict constraint %s led to infeasibility\n", consname);
8819 for( i = 0; i < nbdchginfos; ++i )
8821 assert(bdchginfos !=
NULL);
8836 if( i == nbdchginfos )
8875 eventExecSetppc,
NULL) );
8879 conflictExecSetppc,
NULL) );
8887 consEnfolpSetppc, consEnfopsSetppc, consCheckSetppc, consLockSetppc,
8889 assert(conshdlr !=
NULL);
8919 if( conshdlrdata->conshdlrlinear !=
NULL )
8934 "number of children created in pseudo branching (0: disable pseudo branching)",
8938 "should pairwise constraint comparison be performed in presolving?",
8942 "should hash table be used for detecting redundant constraints in advance",
8946 "should dual presolving steps be performed?",
8950 " should we try to lift variables into other clique constraints, fix variables, aggregate them, and also shrink the amount of variables in clique constraints",
8954 "should we try to generate extra cliques out of all binary variables to maybe fasten redundant constraint detection",
8958 "should we try to shrink the number of variables in a clique constraints, by replacing more than one variable by only one",
9000 initial, separate, enforce, check, propagate, local, modifiable, dynamic, removable, stickingatnode);
9058 initial, separate, enforce, check, propagate, local, modifiable, dynamic, removable, stickingatnode);
9117 initial, separate, enforce, check, propagate, local, modifiable, dynamic, removable, stickingatnode);
9147 assert(var !=
NULL);
9154 SCIPerrorMessage(
"constraint is not a set partitioning / packing / covering constraint\n");
9173 SCIPerrorMessage(
"constraint is not a set partitioning / packing / covering constraint\n");
9179 assert(consdata !=
NULL);
9181 return consdata->nvars;
9194 SCIPerrorMessage(
"constraint is not a set partitioning / packing / covering constraint\n");
9200 assert(consdata !=
NULL);
9202 return consdata->vars;
9215 SCIPerrorMessage(
"constraint is not a set partitioning / packing / covering constraint\n");
9220 assert(consdata !=
NULL);
9235 SCIPerrorMessage(
"constraint is not a set partitioning / packing / covering constraint\n");
9241 assert(consdata !=
NULL);
9243 if( consdata->row !=
NULL )
9259 SCIPerrorMessage(
"constraint is not a set partitioning / packing / covering constraint\n");
9265 assert(consdata !=
NULL);
9267 if( consdata->row !=
NULL )
9285 SCIPerrorMessage(
"constraint is not a set partitioning / packing / covering constraint\n");
9291 assert(consdata !=
NULL);
9293 return consdata->row;
9306 SCIPerrorMessage(
"constraint is not a set partitioning / packing / covering constraint\n");
9312 assert(consdata !=
NULL);
9314 return consdata->nfixedones;
9328 SCIPerrorMessage(
"constraint is not a set partitioning / packing / covering constraint\n");
9334 assert(consdata !=
NULL);
9336 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)
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 SCIPrandomCreate(SCIP_RANDNUMGEN **randnumgen, BMS_BLKMEM *blkmem, unsigned int initialseed)
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 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_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)
void SCIPrandomFree(SCIP_RANDNUMGEN **randnumgen)
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)
static SCIP_RETCODE addCut(SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_Bool *cutoff)
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)
#define SCIP_DECL_CONSDEACTIVE(x)
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)
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 SCIPsetConshdlrResprop(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSRESPROP((*consresprop)))
SCIP_RETCODE SCIPaddCut(SCIP *scip, SCIP_SOL *sol, SCIP_ROW *cut, SCIP_Bool forcecut, SCIP_Bool *infeasible)
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)
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)
unsigned int SCIPinitializeRandomSeed(SCIP *scip, int initialseedvalue)
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 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)