68#define CONSHDLR_NAME "setppc"
69#define CONSHDLR_DESC "set partitioning / packing / covering constraints"
70#define CONSHDLR_SEPAPRIORITY +700000
71#define CONSHDLR_ENFOPRIORITY -700000
72#define CONSHDLR_CHECKPRIORITY -700000
73#define CONSHDLR_SEPAFREQ 0
74#define CONSHDLR_PROPFREQ 1
75#define CONSHDLR_EAGERFREQ 100
77#define CONSHDLR_MAXPREROUNDS -1
78#define CONSHDLR_DELAYSEPA FALSE
79#define CONSHDLR_DELAYPROP FALSE
80#define CONSHDLR_NEEDSCONS TRUE
82#define CONSHDLR_PRESOLTIMING SCIP_PRESOLTIMING_ALWAYS
83#define CONSHDLR_PROP_TIMING SCIP_PROPTIMING_BEFORELP
85#define LINCONSUPGD_PRIORITY +700000
86#define NONLINCONSUPGD_PRIORITY +700000
88#define EVENTHDLR_NAME "setppc"
89#define EVENTHDLR_DESC "bound change event handler for set partitioning / packing / covering constraints"
91#define CONFLICTHDLR_NAME "setppc"
92#define CONFLICTHDLR_DESC "conflict handler creating set covering constraints"
93#define CONFLICTHDLR_PRIORITY LINCONSUPGD_PRIORITY
95#define DEFAULT_PRESOLPAIRWISE TRUE
97#define HASHSIZE_SETPPCCONS 500
98#define DEFAULT_PRESOLUSEHASHING TRUE
99#define NMINCOMPARISONS 200000
100#define MINGAINPERNMINCOMPARISONS 1e-06
102#define DEFAULT_RANDSEED 3
107#define MINBRANCHWEIGHT 0.3
108#define MAXBRANCHWEIGHT 0.7
110#define DEFAULT_NPSEUDOBRANCHES 2
111#define DEFAULT_DUALPRESOLVING TRUE
113#define DEFAULT_CLIQUELIFTING FALSE
117#define DEFAULT_ADDVARIABLESASCLIQUES FALSE
120#define DEFAULT_CLIQUESHRINKING TRUE
131struct SCIP_ConshdlrData
138 SCIP_Longint nsetpart;
145 SCIP_Bool updatedsetppctype;
146 SCIP_Bool cliquelifting;
147 SCIP_Bool enablecliquelifting;
148 SCIP_Bool cliqueshrinking;
151 SCIP_Bool addvariablesascliques;
155 SCIP_Bool presolpairwise;
156 SCIP_Bool presolusehashing;
157 SCIP_Bool dualpresolving;
171 unsigned int setppctype:2;
172 unsigned int sorted:1;
173 unsigned int cliqueadded:1;
174 unsigned int validsignature:1;
175 unsigned int changed:1;
176 unsigned int varsdeleted:1;
177 unsigned int merged:1;
178 unsigned int presolpropagated:1;
179 unsigned int existmultaggr:1;
180 unsigned int catchevents:1;
222 if( consdata1->setppctype < consdata2->setppctype ||
226 else if( (consdata1->setppctype == consdata2->setppctype && consdata1->nvars == consdata2->nvars) )
230 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));
284 if( consdata1->setppctype < consdata2->setppctype ||
293 assert(consdata1->setppctype > consdata2->setppctype || ((consdata1->setppctype == consdata2->setppctype) &&
323 switch( consdata->setppctype )
355 switch( consdata->setppctype )
393 (*conshdlrdata)->eventhdlr = eventhdlr;
394 (*conshdlrdata)->nsetpart = 0;
440 varuses = conshdlrdata->varuses;
514 for( v = 0; v < consdata->nvars; ++v )
516 SCIP_CALL( conshdlrdataIncVaruses(
scip, conshdlrdata, consdata->vars[v]) );
534 for( v = 0; v < consdata->nvars; ++v )
536 SCIP_CALL( conshdlrdataDecVaruses(
scip, conshdlrdata, consdata->vars[v]) );
552 assert(consdata->nvars <= consdata->varssize);
554 if( num > consdata->varssize )
560 consdata->varssize = newsize;
562 assert(num <= consdata->varssize);
582 (*consdata)->signature = 0;
583 (*consdata)->row =
NULL;
584 (*consdata)->nlrow =
NULL;
585 (*consdata)->existmultaggr =
FALSE;
586 (*consdata)->catchevents =
FALSE;
587 (*consdata)->nfixedzeros = 0;
588 (*consdata)->nfixedones = 0;
597#ifdef SCIP_DISABLED_CODE
609 for( v = 0; v <
nvars; ++v )
615 (*consdata)->nfixedones++;
617 (*consdata)->nfixedzeros++;
619 varsbuffer[k++] =
vars[v];
622 (*consdata)->varssize = k;
623 (*consdata)->nvars = k;
638 (*consdata)->varssize =
nvars;
639 (*consdata)->nvars =
nvars;
648 for( v = 0; v < (*consdata)->nvars; v++ )
659 for( v = 0; v < (*consdata)->nvars; v++ )
668 (*consdata)->vars =
NULL;
669 (*consdata)->varssize = 0;
670 (*consdata)->nvars = 0;
672 (*consdata)->setppctype = setppctype;
673 (*consdata)->sorted = (
nvars <= 1);
674 (*consdata)->cliqueadded =
FALSE;
675 (*consdata)->validsignature =
FALSE;
676 (*consdata)->changed =
TRUE;
677 (*consdata)->varsdeleted =
FALSE;
678 (*consdata)->merged =
FALSE;
679 (*consdata)->presolpropagated =
FALSE;
719 if( (*consdata)->row !=
NULL )
725 if( (*consdata)->nlrow !=
NULL )
731 for( v = 0; v < (*consdata)->nvars; v++ )
754 if( consdata->nvars == 0 )
761 switch( consdata->setppctype )
788 if( !consdata->validsignature )
792 consdata->signature = 0;
793 for(
i = 0;
i < consdata->nvars; ++
i )
795 consdata->validsignature =
TRUE;
798 return consdata->signature;
809 if( !consdata->sorted )
811 if( consdata->nvars <= 1 )
812 consdata->sorted =
TRUE;
815 SCIPsortPtr((
void**)consdata->vars, SCIPvarComp, consdata->nvars);
816 consdata->sorted =
TRUE;
825 for( v = 0; v < consdata->nvars; ++v )
862 for(
i = 0;
i < consdata->nvars; ++
i )
877 ++(conshdlrdata->nsetpart);
878 assert(conshdlrdata->nsetpart >= 0);
882 --(conshdlrdata->nsetpart);
883 assert(conshdlrdata->nsetpart >= 0);
888 consdata->setppctype = setppctype;
893 for(
i = 0;
i < consdata->nvars; ++
i )
901 conshdlrdata->updatedsetppctype =
TRUE;
925 var = consdata->vars[pos];
948 consdata->nfixedzeros++;
953 consdata->presolpropagated =
FALSE;
956 if( consdata->nfixedzeros >= consdata->nvars - 1 )
964 consdata->nfixedones++;
968 consdata->presolpropagated =
FALSE;
995 var = consdata->vars[pos];
1005 consdata->nfixedzeros--;
1007 consdata->nfixedones--;
1026 if( consdata->catchevents ==
TRUE )
1030 for(
i = 0;
i < consdata->nvars; ++
i )
1035 consdata->catchevents =
TRUE;
1054 if( consdata->catchevents ==
FALSE )
1058 for(
i = 0;
i < consdata->nvars; ++
i )
1063 consdata->catchevents =
FALSE;
1077 SCIP_Bool transformed;
1096 consdata->vars[consdata->nvars] =
var;
1098 if( consdata->validsignature )
1100 consdata->sorted = (consdata->nvars == 1);
1101 consdata->changed =
TRUE;
1120 if( consdata->catchevents )
1126 consdata->existmultaggr =
TRUE;
1141 if( consdata->row !=
NULL )
1146 consdata->merged =
FALSE;
1147 consdata->cliqueadded =
FALSE;
1170 var = consdata->vars[pos];
1190 if( consdata->catchevents )
1196 if( consdata->nvars == 1 )
1198 consdata->presolpropagated =
FALSE;
1203 if( consdata->row !=
NULL )
1209 if( pos != consdata->nvars - 1 )
1211 consdata->vars[pos] = consdata->vars[consdata->nvars-1];
1212 consdata->sorted =
FALSE;
1215 consdata->validsignature =
FALSE;
1216 consdata->changed =
TRUE;
1298 SCIP_Real bestobjval;
1302 SCIP_Bool infeasible;
1339 assert(consdata->nfixedones == 0);
1340 assert(consdata->nfixedzeros == 0);
1342 nvars = consdata->nvars;
1351 vars = consdata->vars;
1356 switch( setppctype )
1384 for( v = 0; v <
nvars; ++v )
1408 if( idx == -1 ||
objval < bestobjval )
1420 if (
objval * objsign >= 0.0 )
1433 if( idx == -1 || nposfixings == 0 )
1443 noldfixed = *nfixedvars;
1453 SCIP_Bool redundant;
1454 SCIP_Bool aggregated;
1457 idx2 = 1 - indepidx;
1458 assert( 0 <= idx2 && idx2 < 2 );
1479 for( v =
nvars - 1; v >= 0; --v )
1505 if(
objval >= bestobjval )
1524 for( v =
nvars - 1; v >= 0; --v )
1613 assert(*nfixedvars >= noldfixed);
1616 if( *nfixedvars != noldfixed )
1656 if( consdata->nvars <= 1 )
1658 consdata->merged =
TRUE;
1662 assert(consdata->vars !=
NULL || consdata->nvars == 0);
1665 SCIPsortPtr((
void**)consdata->vars, SCIPvarCompActiveAndNegated, consdata->nvars);
1667 consdata->sorted =
FALSE;
1670 for( v = consdata->nvars - 1; v > 0; --v )
1680 var1 = consdata->vars[v];
1690 var2 = consdata->vars[v-1];
1702 SCIP_Bool infeasible;
1706 if( negated1 != negated2 )
1716 for(
i = consdata->nvars - 1;
i >= 0; --
i )
1717 if(
i != v &&
i != (v-1) )
1722 SCIPdebugMsg(
scip,
"setppc constraint <%s>: infeasible fixing <%s> == 0\n",
1749 SCIPdebugMsg(
scip,
"setppc constraint <%s>: infeasible fixing <%s> == %g\n",
1765 consdata->changed =
TRUE;
1768 consdata->merged =
TRUE;
1802 consdata->existmultaggr =
FALSE;
1805 while( v < consdata->
nvars )
1809 var = consdata->vars[v];
1829 SCIP_Real* consvals;
1830 SCIP_Real constant = 0.0;
1839 consvars[0] = repvar;
1845 if( requiredsize > nconsvars )
1851 assert(requiredsize <= nconsvars);
1859 for( v2 = nconsvars - 1; v2 >= 0; --v2 )
1874 for( v2 = consdata->nvars - 1; v2 > v; --v2 )
1881 if( v2 == v && nconsvars == 0 )
1886 if( nfixedvars !=
NULL )
1892 for( v2 = consdata->nvars - 1; v2 >= 0; --v2 )
1894 if( consdata->vars[v2] !=
var )
1902 SCIPdebugMsg(
scip,
"setppc constraint <%s>: infeasible fixing <%s> == 0\n",
1938 for( v2 = nconsvars - 1; v2 >= 0; --v2 )
1960 size =
MAX(nconsvars, 1) + consdata->nvars - 1;
1966 nconsvars = consdata->nvars;
1969 for( k = consdata->nvars - 1; k >= 0; --k )
1971 consvars[k] = consdata->vars[k];
1981 if( requiredsize > nconsvars )
1987 assert(requiredsize <= nconsvars);
1994 rhs = 1.0 - constant;
1998 lhs = 1.0 - constant;
1999 rhs = 1.0 - constant;
2004 lhs = 1.0 - constant;
2026 if( ndelconss !=
NULL && naddconss !=
NULL )
2073 consdata->existmultaggr =
FALSE;
2102 for( v = 0; v < consdata->nvars; ++v )
2139 for( v = 0; v < consdata->nvars && n < 2; ++v )
2163 SCIP_Bool* mustcheck
2180 oldnfixedvars = *nfixedvars;
2185 assert(consdata->nvars == 0 || consdata->vars !=
NULL);
2186 assert(0 <= consdata->nfixedzeros && consdata->nfixedzeros <= consdata->nvars);
2187 assert(0 <= consdata->nfixedones && consdata->nfixedones <= consdata->nvars);
2195 if( consdata->nfixedones == 1 )
2208 if( consdata->nfixedzeros < consdata->nvars - 1 )
2213 SCIP_Bool fixedonefound;
2215 SCIP_Bool infeasible;
2216 SCIP_Bool tightened;
2221 SCIPdebugMsg(
scip,
" -> fixing all other variables to zero in set packing/partitioning constraint <%s>\n",
2228 vars = consdata->vars;
2229 nvars = consdata->nvars;
2231 fixedonefound =
FALSE;
2233 for( v = 0; v <
nvars && consdata->nfixedones == 1; ++v )
2250 fixedonefound =
TRUE;
2256 assert(consdata->nfixedones >= 2 || (fixedonefound && *nfixedvars > oldnfixedvars));
2273 if( consdata->nfixedones >= 2 )
2297 else if( consdata->nfixedzeros == consdata->nvars )
2305 assert(consdata->nfixedones == 0);
2332 else if( consdata->nfixedzeros == consdata->nvars - 1 && consdata->nfixedones == 0 )
2353 SCIP_Bool infeasible;
2354 SCIP_Bool tightened;
2359 vars = consdata->vars;
2360 nvars = consdata->nvars;
2361 for( v = 0; v <
nvars; ++v )
2368 SCIPdebugMsg(
scip,
" -> fixing remaining variable <%s> to one in set covering/partitioning constraint <%s>\n",
2379 assert(consdata->nfixedzeros == consdata->nvars - 1);
2380 assert(consdata->nfixedones == 1);
2386 assert(consdata->nfixedzeros + consdata->nfixedones <= consdata->nvars);
2410 vars = consdata->vars;
2411 nvars = consdata->nvars;
2414 for( v = 0; v <
nvars && sum < sumbound; ++v )
2424 absviol = sum - 1.0;
2426 switch( consdata->setppctype )
2471 switch( consdata->setppctype )
2514 if( consdata->row ==
NULL )
2549 if( consdata->nlrow ==
NULL )
2556 for(
i = 0;
i < consdata->nvars; ++
i )
2604 SCIP_Bool* separated,
2605 SCIP_Bool* reduceddom
2610 SCIP_Bool mustcheck;
2623 assert(consdata->nvars == 0 || consdata->vars !=
NULL);
2624 assert(0 <= consdata->nfixedzeros && consdata->nfixedzeros <= consdata->nvars);
2625 assert(0 <= consdata->nfixedones && consdata->nfixedones <= consdata->nvars);
2640 *reduceddom = (nfixedvars > 0);
2653 if( lpfeas && consdata->row !=
NULL )
2655 SCIP_Real feasibility;
2688 SCIP_Bool* infeasible,
2689 SCIP_Bool* reduceddom,
2694 SCIP_Bool mustcheck;
2709 *reduceddom = (nfixedvars > 0);
2760 SCIP_Bool coefsequal;
2765 assert(consdata1->sorted);
2766 assert(consdata2->sorted);
2773 if( consdata1->nvars != consdata2->nvars )
2778 for(
i = 0;
i < consdata1->nvars; ++
i )
2781 if( consdata1->vars[
i] != consdata2->vars[
i] )
2811 assert(consdata->nvars > 0);
2819 assert(minidx >= 0 && minidx <= maxidx);
2821 return SCIPhashFour(consdata->nvars, minidx, mididx, maxidx);
2830 int*
const cliquepartition,
2833 int*
const nusefulconss,
2835 int*
const nfixedvars,
2836 int*
const naddconss,
2837 int*
const ndelconss,
2838 int*
const nchgcoefs,
2862 if(
nbinvars == 0 || ncliques == 0 )
2875 for(
c = 0;
c < ncliques - 1; ++
c )
2877 if( lastclqidx >= cliquepartition[
c] )
2890 if( cliquepartition[
c] == cliquepartition[v] )
2921 if( !
SCIPconsIsDeleted(cliquecons) && nadded - cliqueconsdata->nfixedzeros >= 2 )
2923 assert(cliqueconsdata->nfixedones == 0);
2926 usefulconss[*nusefulconss] = cliquecons;
2935 lastclqidx = cliquepartition[
c];
2951 int*
const nusefulconss,
2952 int*
const nfixedvars,
2953 int*
const ndelconss,
2954 int*
const nchgcoefs,
2961 SCIP_Bool mustcheck;
2962 int nlocaladdconss = 0;
2979 for(
c = nconss - 1;
c >= 0; --
c )
2998 assert(nlocaladdconss == 0);
3015 assert(consdata->nfixedones == 0);
3017 if( consdata->nvars == 0 )
3026 usefulconss[*nusefulconss] = cons;
3041 int const nusefulconss,
3043 int*
const nusefulvars,
3045 int*
const varnconss,
3046 int*
const maxnvarconsidx,
3047 int**
const varconsidxs,
3058 assert(usefulconss !=
NULL || nusefulconss == 0);
3067 if( nusefulconss == 0 )
3072 for(
c = nusefulconss - 1;
c >= 0; --
c )
3074 cons = usefulconss[
c];
3083 assert(consdata->merged);
3086 if( consdata->nvars > *maxnvars )
3087 *maxnvars = consdata->nvars;
3090 for( v = consdata->nvars - 1; v >= 0; --v )
3094 var = consdata->vars[v];
3108 usefulvars[*nusefulvars] =
var;
3110 varindex = *nusefulvars;
3127 if( varnconss[varindex] == maxnvarconsidx[varindex] )
3133 assert(varnconss[varindex] < maxnvarconsidx[varindex]);
3135 varconsidxs[varindex][varnconss[varindex]] =
c;
3137 ++(varnconss[varindex]);
3150 int*
const varnconss,
3151 int**
const varconsidxs
3157 SCIP_Bool found =
FALSE;
3171 for(
i = 0;
i < varnconss[varindex]; ++
i )
3173 if( varconsidxs[varindex][
i] == considx )
3175 varconsidxs[varindex][
i] = varconsidxs[varindex][varnconss[varindex] - 1];
3179 --(varnconss[varindex]);
3192 SCIP_Bool
const maybenew,
3194 int*
const nusefulvars,
3196 int*
const varnconss,
3197 int*
const maxnvarconsidx,
3198 int**
const varconsidxs
3223 varindex = *nusefulvars;
3228 maxnvarconsidx[varindex] = 1;
3230 varnconss[varindex] = 0;
3237 if( varnconss[varindex] == maxnvarconsidx[varindex] )
3243 assert(varnconss[varindex] < maxnvarconsidx[varindex]);
3244 varconsidxs[varindex][varnconss[varindex]] = considx;
3247 ++(varnconss[varindex]);
3260 SCIP_Bool
const aggregate,
3265 SCIP_Bool* undoneaggrtypes,
3269 int*
const naggregations,
3272 int*
const saggregations,
3276 int*
const nfixedvars,
3277 int*
const naggrvars,
3278 int*
const ndelconss,
3301 if( consdata->presolpropagated )
3304 consdata->presolpropagated =
TRUE;
3306 vars = consdata->vars;
3307 nvars = consdata->nvars;
3333 if( consdata->nfixedones > 1 )
3349 SCIPdebugMsg(
scip,
"set partitioning / packing constraint <%s> is infeasible, %d variables fixed to one\n",
SCIPconsGetName(cons), consdata->nfixedones);
3355 if( consdata->nfixedones == 1 )
3365 for( v =
nvars - 1; v >= 0; --v )
3375 SCIPdebugMsg(
scip,
"setppc constraint <%s>: infeasible fixing <%s> == 0\n",
3406 if( consdata->nfixedzeros ==
nvars )
3408 assert(consdata->nfixedones == 0);
3432 if( consdata->nfixedzeros + 1 ==
nvars )
3434 assert(consdata->nfixedones == 0);
3444 for( v =
nvars - 1; v >= 0; --v )
3455 SCIPdebugMsg(
scip,
"setppc constraint <%s>: infeasible fixing <%s> == 1\n",
3486 for( v =
nvars - 1; v >= 0; --v )
3496 SCIP_Bool redundant;
3497 SCIP_Bool aggregated;
3524 SCIPdebugMsg(
scip,
"set partitioning constraint <%s>: aggregate <%s> + <%s> == 1\n",
3558 if( *saggregations == *naggregations )
3561 assert(*saggregations > *naggregations);
3571 undoneaggrvars[2 * (*naggregations)] =
var;
3572 undoneaggrvars[2 * (*naggregations) + 1] =
vars[v];
3606 int const nusefulconss,
3608 int*
const nusefulvars,
3610 int*
const varnconss,
3611 int*
const maxnvarconsidx,
3612 int**
const varconsidxs,
3613 int*
const countofoverlapping,
3614 SCIP_Bool
const shrinking,
3615 SCIP_Bool*
const chgcons,
3621 SCIP_Bool* undoneaggrtypes,
3625 int*
const naggregations,
3626 int*
const saggregations,
3630 int*
const nfixedvars,
3631 int*
const naggrvars,
3632 int*
const nchgcoefs,
3633 int*
const ndelconss,
3645 SCIP_Bool overlapdestroyed;
3658 assert(usefulconss !=
NULL && nusefulconss > 0);
3659 assert(0 <= considx && considx < nusefulconss);
3660 assert(usefulconss[considx] == cons);
3661 assert(0 <= endidx && endidx <= nusefulconss);
3680 nvars = consdata->nvars;
3685 vars = consdata->vars;
3688 oldnfixedzeros = consdata->nfixedzeros;
3689 overlapdestroyed =
FALSE;
3692 for(
c = endidx - 1;
c >= 0; --
c )
3694 cons1 = usefulconss[
c];
3703 assert(usefulconss[
c] != cons);
3706 oldnaggrvars = *naggrvars;
3712 SCIP_CALL(
presolvePropagateCons(
scip, cons1,
FALSE, undoneaggrvars, undoneaggrtypes, naggregations, saggregations, nfixedvars, naggrvars, ndelconss,
cutoff) );
3718 assert(*naggrvars == oldnaggrvars);
3726 nvars1 = consdata1->nvars;
3732 assert(countofoverlapping[
c] <= nvars1);
3735 assert(consdata1->nfixedones == 0);
3740 if( !overlapdestroyed && countofoverlapping[
c] ==
nvars - consdata->nfixedzeros )
3744 if(
nvars - consdata->nfixedzeros < nvars1 )
3752 assert(consdata->merged);
3753 assert(consdata1->merged);
3755 vars1 = consdata1->vars;
3761 consdata1->sorted =
FALSE;
3764 for( v =
nvars - 1, v1 = nvars1 - 1; v >= 0 && v1 >= 0; )
3819 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]));
3840 assert(negated0 == negated1);
3847 for( ; v1 >= 0; --v1)
3852 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]));
3907 else if( (!overlapdestroyed && countofoverlapping[
c] + consdata1->nfixedzeros == nvars1) || countofoverlapping[
c] == nvars1 )
3912 const int oldnfixedvars = *nfixedvars;
3918 assert(consdata->merged);
3919 assert(consdata1->merged);
3921 vars1 = consdata1->vars;
3926 consdata1->sorted =
FALSE;
3929 for( v =
nvars - 1, v1 = nvars1 - 1; v >= 0 && v1 >= 0; )
4009 assert(negated0 == negated1);
4060 if( oldnfixedvars < *nfixedvars )
4061 overlapdestroyed =
TRUE;
4091 assert(consdata->merged);
4092 assert(consdata1->merged);
4094 vars1 = consdata1->vars;
4099 consdata1->sorted =
FALSE;
4102 for( v =
nvars - 1, v1 = nvars1 - 1; v >= 0 && v1 >= 0; )
4152 if( aggvar2 !=
NULL )
4161 aggvar2 = vars1[v1];
4163 if( aggvar1 !=
NULL )
4173 if( negated0 != negated1 )
4189 if( aggvar1 ==
NULL && aggvar2 ==
NULL )
4193 if( aggvar2 ==
NULL )
4195 for( ; v1 >= 0; --v1)
4200 aggvar2 = vars1[v1];
4205 else if( aggvar1 ==
NULL )
4219 if( aggvar1 ==
NULL || aggvar2 ==
NULL )
4225 if( *saggregations == *naggregations )
4228 assert(*saggregations > *naggregations);
4237 undoneaggrtypes[*naggregations] =
TRUE;
4238 undoneaggrvars[2 * (*naggregations)] = aggvar1;
4239 undoneaggrvars[2 * (*naggregations) + 1] = aggvar2;
4269 int constochangeidx;
4271 const int oldnchgcoefs = *nchgcoefs;
4279 assert(consdata->merged);
4280 assert(consdata1->merged);
4283 SCIPsortDownPtr((
void**)(consdata1->vars), SCIPvarCompActiveAndNegated, nvars1);
4285 consdata1->sorted =
FALSE;
4291 varstochange = consdata1->vars;
4292 nvarstostay =
nvars;
4293 nvarstochange = nvars1;
4295 constochange = cons1;
4296 consdatachange = consdata1;
4297 constochangeidx =
c;
4301 varstostay = consdata1->vars;
4302 varstochange =
vars;
4303 nvarstostay = nvars1;
4304 nvarstochange =
nvars;
4306 constochange = cons;
4307 consdatachange = consdata;
4308 constochangeidx = considx;
4316 for( v = nvarstostay - 1, v1 = nvarstochange - 1; v >= 0 && v1 >= 0; )
4337 var = varstostay[v];
4350 var1 = varstochange[v1];
4364 addvar = varstostay[v];
4377 if( negated0 != negated1 )
4396 SCIP_CALL(
presolvePropagateCons(
scip, constostay,
FALSE,
NULL,
NULL,
NULL,
NULL, nfixedvars, naggrvars, ndelconss,
cutoff) );
4417 assert(*nchgcoefs - oldnchgcoefs == countofoverlapping[
c]);
4420 if( addvar ==
NULL )
4430 addvar = varstostay[v];
4446 consdatachange->merged =
TRUE;
4447 assert(constochangeidx == (cons == constochange ? considx :
c));
4471 int*
const nusefulvars,
4473 SCIP_Bool** cliquevalues,
4478 int*
const varnconss,
4479 int*
const maxnvarconsidx,
4480 int**
const varconsidxs,
4485 SCIP_Bool*
const chgcons,
4488 int*
const nfixedvars,
4489 int*
const ndelconss,
4527 nvars = consdata->nvars;
4534 vars = consdata->vars;
4540 for( v =
nvars - 1; v >= 0 && v1 >= 0; )
4568 assert(consdata->merged);
4571 if( (*cliquevalues)[v] )
4582 var1 = usefulvars[v1];
4607 for( k =
nvars - 1; k >= 0; --k )
4615 if( (*cliquevalues)[k] )
4638 if( value != (*cliquevalues)[v] )
4646 for( k =
nvars - 1; k >= 0; --k )
4655 if( k == nottocheck )
4658 if( (*cliquevalues)[k] )
4689 if( nottocheck >= 0 )
4693 assert(consdata->merged);
4696 for( k = consdata->nvars - 1; k >= 0; --k )
4705 if( k != nottocheck )
4743 SCIPdebugMsg(
scip,
" -> deleting constraint <%s> number <%d> due to active and negated variable in the same clique constraint\n",
SCIPconsGetName(cons), arraypos);
4753 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]));
4775 addvar = usefulvars[v1 + 1];
4784 consdata->merged =
TRUE;
4796 vars = consdata->vars;
4797 nvars = consdata->nvars;
4802 if( (*maxnvars) <
nvars )
4804 while( (*maxnvars) <
nvars )
4819 for( ; v1 >= 0; --v1)
4827 var1 = usefulvars[v1];
4841 for( k =
nvars - 1; k >= 0; --k )
4850 if( (*cliquevalues)[k] )
4872 SCIPdebugMsg(
scip,
"trying to fix <%s> to 0 because this variable is in the same clique with a set partition\n",
SCIPvarGetName(usefulvars[v1]));
4894 addvar = usefulvars[v1];
4903 consdata->merged =
TRUE;
4915 vars = consdata->vars;
4916 nvars = consdata->nvars;
4921 if( (*maxnvars) <
nvars )
4923 while( (*maxnvars) <
nvars )
4944 SCIP_Bool*
const undoneaggrtypes,
4947 int const naggregations,
4948 int*
const naggrvars,
4954 SCIP_Bool aggregated;
4955 SCIP_Bool redundant;
4962 assert(naggregations > 0);
4967 for(
a = 0;
a < naggregations; ++
a )
4969 var1 = undoneaggrvars[2 *
a];
4970 var2 = undoneaggrvars[2 *
a + 1];
4980 SCIP_CALL( conshdlrdataDecVaruses(
scip, conshdlrdata, var1) );
4981 SCIP_CALL( conshdlrdataDecVaruses(
scip, conshdlrdata, var2) );
4985 if( undoneaggrtypes[
a] )
5008 SCIP_CALL( conshdlrdataIncVaruses(
scip, conshdlrdata, var1) );
5009 SCIP_CALL( conshdlrdataIncVaruses(
scip, conshdlrdata, var2) );
5027 int*
const firstchange,
5028 int*
const firstclique,
5029 int*
const lastclique,
5030 int*
const nfixedvars,
5031 int*
const naggrvars,
5032 int*
const ndelconss,
5033 int*
const nchgcoefs,
5044 int* maxnvarconsidx;
5045 int* countofoverlapping =
NULL;
5046 SCIP_Bool* cliquevalues =
NULL;
5062 SCIP_Bool* undoneaggrtypes;
5088 susefulvars = 2 *
nvars;
5094 saggregations =
nvars;
5115 if( conshdlrdata->nclqpresolve == 0 && conshdlrdata->addvariablesascliques )
5119 int* cliquepartition;
5146 nrounds, nfixedvars, &naddconss, ndelconss, nchgcoefs,
cutoff) );
5151 *ndelconss -= naddconss;
5171 if( nusefulconss <= 1 )
5184 SCIP_CALL(
collectCliqueData(
scip, usefulconss, nusefulconss, usefulvars, &nusefulvars, vartoindex, varnconss, maxnvarconsidx, varconsidxs, &maxnvars) );
5193 SCIPsortDownPtr((
void**)usefulvars, SCIPvarCompActiveAndNegated, nusefulvars);
5204 int cons0fixedzeros;
5207 const int oldnaggrvars = *naggrvars;
5209 cons0 = usefulconss[
c];
5217 SCIP_CALL(
presolvePropagateCons(
scip, cons0,
FALSE, undoneaggrvars, undoneaggrtypes, &naggregations, &saggregations, nfixedvars, naggrvars, ndelconss,
cutoff) );
5223 assert(*naggrvars == oldnaggrvars);
5232 cons0vars = consdata->vars;
5233 ncons0vars = consdata->nvars;
5236 SCIPsortDownPtr((
void**)cons0vars, SCIPvarCompActiveAndNegated, ncons0vars);
5238 consdata->sorted =
FALSE;
5241 assert(maxnvars >= ncons0vars);
5247 for( v = ncons0vars - 1; v >= 0 ; --v )
5249 var0 = cons0vars[v];
5258 for( v1 = varnconss[varindex] - 1; v1 >= 0 ; --v1 )
5259 ++(countofoverlapping[varconsidxs[varindex][v1]]);
5262 oldnchgcoefs = *nchgcoefs;
5263 cons0fixedzeros = consdata->nfixedzeros;
5269 varnconss, maxnvarconsidx, varconsidxs, countofoverlapping, conshdlrdata->cliqueshrinking, &chgcons0,
5270 undoneaggrvars, undoneaggrtypes, &naggregations, &saggregations,
5271 nfixedvars, naggrvars, nchgcoefs, ndelconss,
cutoff) );
5277 assert(*naggrvars == oldnaggrvars);
5280 if( chgcons0 && *nchgcoefs > oldnchgcoefs )
5285 cons0vars = consdata->vars;
5286 ncons0vars = consdata->nvars;
5289 SCIPsortDownPtr((
void**)cons0vars, SCIPvarCompActiveAndNegated, ncons0vars);
5291 consdata->sorted =
FALSE;
5295 if( consdata->nfixedones > 0 || consdata->nfixedzeros > cons0fixedzeros )
5300 SCIP_CALL(
presolvePropagateCons(
scip, cons0,
FALSE, undoneaggrvars, undoneaggrtypes, &naggregations, &saggregations, nfixedvars, naggrvars, ndelconss,
cutoff) );
5306 assert(*naggrvars == oldnaggrvars);
5323 v1 = nusefulvars - 1;
5327 if( conshdlrdata->nclqpresolve > 0 )
5328 v1 = nusefulvars - 1;
5332 (void)
SCIPsortedvecFindDownPtr((
void**)usefulvars, SCIPvarCompActiveAndNegated, (
void*)cons0vars[ncons0vars - 1], nusefulvars, &v1);
5333 assert(v1 >= 0 && v1 < nusefulvars);
5341 assert(maxnvars >= ncons0vars);
5343 for( v = ncons0vars - 1; v >= 0; --v )
5358 maxnvarconsidx, varconsidxs, &maxnvars, &nadded, &chgcons0, nfixedvars, ndelconss,
cutoff) );
5371 *firstchange =
MIN(*firstchange,
c);
5372 *firstclique =
MIN(*firstclique,
c);
5373 *lastclique =
MAX(*lastclique,
c);
5377 cons0vars = consdata->vars;
5378 ncons0vars = consdata->nvars;
5383 SCIPsortDownPtr((
void**)cons0vars, SCIPvarCompActiveAndNegated, ncons0vars);
5385 consdata->sorted =
FALSE;
5390 for( v = ncons0vars - 1; v >= 0 ; --v )
5392 var0 = cons0vars[v];
5401 for(
i = varnconss[varindex] - 1;
i >= 0 ; --
i )
5402 ++(countofoverlapping[varconsidxs[varindex][
i]]);
5409 usefulconss, nusefulconss, usefulvars, &nusefulvars, vartoindex, varnconss, maxnvarconsidx, varconsidxs,
5410 countofoverlapping, conshdlrdata->cliqueshrinking, &chgcons0,
5411 undoneaggrvars, undoneaggrtypes, &naggregations, &saggregations,
5412 nfixedvars, naggrvars, nchgcoefs, ndelconss,
cutoff) );
5418 assert(*naggrvars == oldnaggrvars);
5429 for(
c = nusefulvars;
c > 0; --
c )
5431 if( varconsidxs[
c] !=
NULL )
5456 if( *ndelconss < 0 )
5479 SCIP_Bool infeasible;
5484 assert(firstclique >= 0);
5485 assert(lastclique <= nconss);
5486 assert(conss !=
NULL || ((nconss == 0) && (lastclique == 0)));
5489 for(
c = firstclique;
c < lastclique; ++
c )
5500 *nchgbds += nlocalbdchgs;
5511 if( !consdata->cliqueadded && consdata->nvars >= 2 )
5518 *nchgbds += nlocalbdchgs;
5531 *nchgbds += nlocalbdchgs;
5539 consdata->cliqueadded =
TRUE;
5550 SCIP_Bool linearconshdlrexist,
5554 SCIP_Bool* infeasible,
5555 SCIP_Bool* aggregated
5571 SCIP_Bool redundant;
5582 if( !linearconshdlrexist )
5584 *infeasible =
FALSE;
5589 if( pos ==
nvars - 1 )
5595 tmpvars[pos] = tmpvars[
nvars - 1];
5600 for( v =
nvars - 2; v >= 0; --v )
5603 SCIPdebugMsg(
scip,
"multi-aggregating binary variable <%s> (locks: [%d,%d]; to %d variables)\n",
5613 if( pos <
nvars - 1 )
5656 SCIP_Bool dualpresolvingenabled,
5657 SCIP_Bool linearconshdlrexist,
5674 SCIP_Bool infeasible;
5675 SCIP_Bool aggregated;
5676 SCIP_Bool donotaggr;
5677 SCIP_Bool donotmultaggr;
5678 SCIP_Bool mustcheck;
5687 int posreplacements = 0;
5689 int nhashmapentries;
5711 for( v = nposbinvars - 1; v >= 0; --v )
5720 if( (nuplocks == 1 && ndownlocks <= 1) || (nuplocks <= 1 && ndownlocks == 1) || (nuplocks <= 2 && ndownlocks <= 2 &&
SCIPvarGetNegatedVar(binvars[v]) !=
NULL) )
5725 SCIPdebugMsg(
scip,
"found %d binary variables for possible multi-aggregation\n", nposvars);
5742 SCIPsortPtr((
void**)usefulconss, setppcConssSort2, nconss);
5744 nhashmapentries = 0;
5748 assert(!donotaggr || !donotmultaggr);
5756 for(
c = 0;
c < nconss; ++
c )
5766 cons = usefulconss[
c];
5804 oldnfixedvars = *nfixedvars;
5815 if( oldnfixedvars < *nfixedvars )
5820 assert(nlocaladdconss == 0);
5828 if( consdata->nvars < 2 )
5846 if( consdata->nvars == 0 )
5878 SCIP_Bool redundant;
5880 var = consdata->vars[0];
5888 if( nuplocks == 1 &&
objval <= 0 )
5912 var = consdata->vars[1];
5920 if( nuplocks == 1 &&
objval <= 0 )
5946 SCIP_Bool redundant;
5970 if( ndecs >= nposvars )
5978 assert(nposbinvars >= consdata->nvars);
5986 for( v = consdata->nvars - 1; v >= 0; --v )
5996 assert(nuplocks >= 1 && ndownlocks >= 0);
6000 assert(nuplocks == 1 && ndownlocks <= 1);
6003 if( ndownlocks == 0 )
6063 considxs[nhashmapentries - 1] =
c;
6064 posincons[nhashmapentries - 1] = v;
6074 assert(image > 0 && image <= nhashmapentries);
6076 consindex = considxs[image - 1];
6077 assert(0 <= consindex && consindex < nconss);
6086 assert(posreplacements >= 0);
6088 varindex = posincons[image - 1];
6089 considxs[image - 1] = -1;
6090 posincons[image - 1] = -1;
6105 multaggridx = consindex;
6117 if( (
objval < 0.0) == (multaggridx ==
c) )
6121 aggrallyindex = consindex;
6127 if( varindex >= aggrconsdata->nvars || aggrconsdata->vars[varindex] != negvar )
6134 assert(aggrconsdata->nvars >= 2);
6136 for( v2 = aggrconsdata->nvars - 1; v2 >= 0; --v2 )
6138 if( aggrconsdata->vars[v2] == negvar )
6147 assert(aggrconsdata->vars[varindex] == negvar);
6150 aggrconsindex = consindex;
6210 assert(image > 0 && image <= nhashmapentries);
6212 assert(0 <= considxs[image - 1] && considxs[image - 1] < nconss);
6215 considxs[image - 1] = -1;
6216 posincons[image - 1] = -1;
6223 assert(posreplacements >= 0);
6237 considxs[nhashmapentries - 1] =
c;
6238 posincons[nhashmapentries - 1] = v;
6260 assert(image > 0 && image <= nhashmapentries);
6262 consindex = considxs[image - 1];
6263 assert(0 <= consindex && consindex < nconss);
6272 assert(posreplacements >= 0);
6274 varindex = posincons[image - 1];
6275 considxs[image - 1] = -1;
6276 posincons[image - 1] = -1;
6290 assert(!dualpresolvingenabled || nuplocks + ndownlocks > 2);
6298 if( chgtype[consindex] )
6306 for( v2 = aggrconsdata->nvars - 1; v2 >= 0; --v2 )
6308 if( aggrconsdata->vars[v2] == negvar )
6315 SCIPdebugMsg(
scip,
"multi-aggregating in one set-partitioning or one set-packing constraint\n");
6319 aggrallyindex = consindex;
6331 SCIPdebugMsg(
scip,
"multi-aggregating in two set-partitioning or one set-partitioning and -packing constraint\n");
6335 if( varindex >= aggrconsdata->nvars || aggrconsdata->vars[varindex] != negvar )
6342 assert(aggrconsdata->nvars >= 2);
6344 for( v2 = aggrconsdata->nvars - 1; v2 >= 0; --v2 )
6346 if( aggrconsdata->vars[v2] == negvar )
6355 assert(aggrconsdata->vars[varindex] == negvar);
6358 aggrconsindex = consindex;
6377 assert(aggrconsindex >= 0);
6379 assert(aggrallyindex >= 0);
6381 cons = usefulconss[aggrallyindex];
6401 for( v = aggrconsdata->nvars - 1; v >= 0; --v )
6409 considxs[image - 1] = aggrallyindex;
6410 posincons[image - 1] = 0;
6468 hashtablesize = nconss;
6471 hashGetKeySetppccons, hashKeyEqSetppccons, hashKeyValSetppccons, (
void*)
scip) );
6474 for(
c = 0;
c < nconss; ++
c )
6503 assert(consdata0->nvars >= 1 && consdata0->nvars == consdata1->nvars);
6505 assert(consdata0->sorted && consdata1->sorted);
6506 assert(consdata0->vars[0] == consdata1->vars[0]);
6508 SCIPdebugMsg(
scip,
"setppc constraints <%s> and <%s> have identical variable sets\n",
6559 SCIPdebugMsg(
scip,
" -> removing setppc constraint <%s> which is redundant to <%s>\n",
6599 assert(consdata0->nvars < consdata1->nvars);
6600 assert(consdata0->sorted);
6601 assert(consdata1->sorted);
6604 for( v0 = 0, v1 = 0; v0 < consdata0->nvars && !(*cutoff); ++v0, ++v1 )
6610 for( ;
SCIPvarGetIndex(consdata1->vars[v1]) < index0 && !(*cutoff); ++v1 )
6627 for( ; v1 < consdata1->nvars && !(*cutoff); ++v1 )
6631 assert(consdata0->nvars == 0
6673 assert(consdata0->nvars < consdata1->nvars);
6674 assert(consdata0->sorted);
6675 assert(consdata1->sorted);
6677 switch( consdata0->setppctype )
6680 switch( consdata1->setppctype )
6705 switch( consdata1->setppctype )
6728 switch( consdata1->setppctype )
6777 uint64_t signature0;
6778 SCIP_Bool cons0changed;
6791 cons0 = conss[chkind];
6797 assert(consdata0->nvars >= 1);
6806 cons0changed = consdata0->changed;
6807 consdata0->changed =
FALSE;
6808 for(
c = (cons0changed ? 0 : firstchange);
c < chkind && !(*cutoff) &&
SCIPconsIsActive(cons0); ++
c )
6812 uint64_t signature1;
6813 uint64_t jointsignature;
6814 SCIP_Bool cons0iscontained;
6815 SCIP_Bool cons1iscontained;
6835 jointsignature = (signature0 | signature1);
6836 if( jointsignature != signature0 && jointsignature != signature1 )
6840 cons0iscontained = (consdata0->nvars <= consdata1->nvars);
6841 cons1iscontained = (consdata1->nvars <= consdata0->nvars);
6844 while( v0 < consdata0->
nvars && v1 < consdata1->
nvars )
6851 if( index0 < index1 )
6853 cons0iscontained =
FALSE;
6854 if( !cons1iscontained )
6856 for( v0++; v0 < consdata0->nvars &&
SCIPvarGetIndex(consdata0->vars[v0]) < index1; v0++ )
6859 else if( index1 < index0 )
6861 cons1iscontained =
FALSE;
6862 if( !cons0iscontained )
6864 for( v1++; v1 < consdata1->nvars &&
SCIPvarGetIndex(consdata1->vars[v1]) < index0; v1++ )
6873 cons0iscontained = cons0iscontained && (v0 == consdata0->nvars);
6874 cons1iscontained = cons1iscontained && (v1 == consdata1->nvars);
6876 if( cons0iscontained && cons1iscontained )
6878 SCIPdebugMsg(
scip,
"setppc constraints <%s> and <%s> have identical variable sets\n",
6884 if( consdata0->setppctype == consdata1->setppctype )
6913 else if( cons0iscontained )
6921 else if( cons1iscontained )
6954 for(
i = 0;
i < nconss;
i++ )
6959 if( consdata->varsdeleted )
6962 for( v = consdata->nvars - 1; v >= 0; v-- )
6969 consdata->varsdeleted =
FALSE;
6989 SCIP_Bool separated;
6990 SCIP_Bool reduceddom;
6998 SCIPdebugMsg(
scip,
"Enforcing %d set partitioning / packing / covering constraints for %s solution\n", nconss,
6999 sol ==
NULL ?
"LP" :
"relaxation");
7008 for(
c = 0;
c < nusefulconss && !
cutoff && !reduceddom; ++
c )
7014 for(
c = nusefulconss;
c < nconss && !
cutoff && !separated && !reduceddom; ++
c )
7035 else if( separated )
7037 else if( reduceddom )
7069 SCIP_Bool modifiable,
7075 SCIP_Bool removable,
7077 SCIP_Bool stickingatnode
7090 if( conshdlr ==
NULL )
7092 SCIPerrorMessage(
"set partitioning / packing / covering constraint handler not found\n");
7109 SCIP_CALL(
SCIPcreateCons(
scip, cons, name, conshdlr, consdata, initial, separate, enforce, check,
propagate,
7110 local, modifiable, dynamic, removable, stickingatnode) );
7117 ++(conshdlrdata->nsetpart);
7118 assert(conshdlrdata->nsetpart >= 0);
7156 SCIP_Bool modifiable,
7162 SCIP_Bool removable,
7164 SCIP_Bool stickingatnode
7174 assert(mult == +1 || mult == -1);
7180 for( v = 0; v <
nvars; ++v )
7182 if( mult * vals[v] > 0.0 )
7183 transvars[v] =
vars[v];
7193 initial, separate, enforce, check,
propagate, local, modifiable, dynamic, removable, stickingatnode) );
7223 if( nposbin + nnegbin + nposimplbin + nnegimplbin ==
nvars && ncoeffspone + ncoeffsnone ==
nvars )
7232 mult =
SCIPisEQ(
scip, lhs, 1.0 - ncoeffsnone) ? +1 : -1;
7286 SCIP_Bool isquadratic;
7292 SCIP_Real bilincoef;
7299 int nbilinexprterms;
7316 if( nvarexprs != 2 )
7342 if( nbilinexprterms != 1 )
7346 if( nquadexprs != 2 )
7363 coefx = lincoef + sqrcoef;
7366 coefy = lincoef + sqrcoef;
7435 SCIP_Real constant = 0.0;
7452 nlocvars = consdata->nvars;
7457 for(
i = 0;
i < consdata->nvars; ++
i )
7459 vars[
i] = consdata->vars[
i];
7468 rhs = 1.0 - constant;
7470 lhs = 1.0 - constant;
7475 rhs = 1.0 - constant;
7476 lhs = 1.0 - constant;
7480 cons, lhs, rhs, success) );
7543 conshdlrdata->noldfixedvars = 0;
7544 conshdlrdata->noldimpls = 0;
7545 conshdlrdata->noldcliques = 0;
7546 conshdlrdata->noldupgrs = 0;
7547 conshdlrdata->nclqpresolve = 0;
7548 conshdlrdata->updatedsetppctype =
FALSE;
7549 conshdlrdata->enablecliquelifting =
TRUE;
7564 for(
c = 0;
c < nconss; ++
c )
7584 for(
c = 0;
c < nconss; ++
c )
7601 for(
c = 0;
c < nconss; ++
c )
7606 if( consdata->row !=
NULL )
7611 if( consdata->nlrow !=
NULL )
7639 --(conshdlrdata->nsetpart);
7640 assert(conshdlrdata->nsetpart >= 0);
7695 ++(conshdlrdata->nsetpart);
7696 assert(conshdlrdata->nsetpart >= 0);
7712 *infeasible =
FALSE;
7714 for(
c = 0;
c < nconss && !(*infeasible); ++
c )
7729 SCIP_Bool separated;
7730 SCIP_Bool reduceddom;
7738 SCIPdebugMsg(
scip,
"separating %d/%d set partitioning / packing / covering constraints\n", nusefulconss, nconss);
7747 for(
c = 0;
c < nusefulconss && !
cutoff; ++
c )
7758 else if( reduceddom )
7760 else if( separated )
7772 SCIP_Bool separated;
7773 SCIP_Bool reduceddom;
7781 SCIPdebugMsg(
scip,
"separating %d/%d set partitioning / packing / covering constraints\n", nusefulconss, nconss);
7790 for(
c = 0;
c < nusefulconss && !
cutoff; ++
c )
7801 else if( reduceddom )
7803 else if( separated )
7825 SCIP_Real branchweight;
7843 varuses = conshdlrdata->varuses;
7851 assert(MINBRANCHWEIGHT <= MAXBRANCHWEIGHT);
7865 for( j = nsortcands; j > 0 && numuses > uses[j-1]; --j )
7867 sortcands[j] = sortcands[j-1];
7868 uses[j] = uses[j-1];
7870 assert(0 <= j && j <= nsortcands);
7881 if( nsortcands > 0 )
7883 SCIP_Real cumprio = 0.0;
7894 for( nselcands = 0; nselcands < nsortcands; ++nselcands )
7898 branchweight += solval;
7901 if( branchweight > MAXBRANCHWEIGHT )
7908 minprio =
MIN(minprio, tmp);
7910 minestzero =
MIN(minestzero, tmp);
7912 minestone =
MIN(minestone, tmp);
7918 branchweight -= solval;
7921 if( MINBRANCHWEIGHT <= branchweight && branchweight <= MAXBRANCHWEIGHT )
7930 for(
i = 0;
i < nselcands; ++
i )
7937 if( nselcands == 1 )
7961 for(
i = 0;
i < nselcands; ++
i )
7995 int maxnbranchcands;
8010 if( conshdlrdata->npseudobranches <= 1 )
8015 if( npseudocands == 0 )
8018 varuses = conshdlrdata->varuses;
8022 maxnbranchcands = conshdlrdata->npseudobranches-1;
8023 assert(maxnbranchcands >= 1);
8031 for(
i = 0;
i < npseudocands; ++
i )
8037 if( nbranchcands < maxnbranchcands || uses > canduses[nbranchcands-1] )
8039 for( j =
MIN(nbranchcands, maxnbranchcands-1); j > 0 && uses > canduses[j-1]; --j )
8041 branchcands[j] = branchcands[j-1];
8042 canduses[j] = canduses[j-1];
8044 assert(0 <= j && j <= nbranchcands && j < maxnbranchcands);
8045 branchcands[j] =
var;
8047 if( nbranchcands < maxnbranchcands )
8052 assert(nbranchcands <= maxnbranchcands);
8057 if( nbranchcands > 0 )
8068 for(
i = 0;
i < nbranchcands; ++
i )
8071 minestzero =
MIN(minestzero, tmp);
8080 for(
i = 0;
i < nbranchcands; ++
i )
8084 for( j = 0; j <
i; ++j )
8092 for(
i = 0;
i < nbranchcands; ++
i )
8105 SCIPdebugMsg(
scip,
"branched on pseudo solution: %d children\n", nchildren);
8144 SCIP_Bool infeasible;
8145 SCIP_Bool reduceddom;
8164 SCIPdebugMsg(
scip,
"pseudo enforcing %d set partitioning / packing / covering constraints\n", nconss);
8174 for(
c = 0;
c < nconss && !
cutoff && !reduceddom && !solvelp; ++
c )
8181 else if( reduceddom )
8185 else if( infeasible )
8231 SCIP_Real sum = 0.0;
8236 for( v = 0; v < consdata->nvars; ++v )
8258 SCIP_Bool mustcheck;
8259 SCIP_Bool inpresolve;
8270 SCIPdebugMsg(
scip,
"propagating %d/%d set partitioning / packing / covering constraints\n", nmarkedconss, nconss);
8276 for(
c = nmarkedconss - 1;
c >= 0 && !
cutoff; --
c )
8286 int naddconss, ndelconss;
8291 naddconss = ndelconss = 0;
8309 else if( nfixedvars > 0 )
8338 oldnfixedvars = *nfixedvars;
8339 oldndelconss = *ndelconss;
8340 oldnaggrvars = *naggrvars;
8341 oldnchgcoefs = *nchgcoefs;
8348 conshdlrdata->enablecliquelifting = conshdlrdata->enablecliquelifting || conshdlrdata->updatedsetppctype
8350 || conshdlrdata->noldcliques !=
SCIPgetNCliques(
scip) || conshdlrdata->noldupgrs != nconss;
8353 startdelconss = *ndelconss;
8356 conshdlrdata->updatedsetppctype =
FALSE;
8359 firstchange = INT_MAX;
8360 firstclique = INT_MAX;
8377 if( consdata->nfixedzeros > 0 || nnewaggrvars > 0 || nnewaddconss > 0 || nnewupgdconss > 0
8413 if( consdata->nfixedzeros > 0 )
8430 SCIP_CALL(
presolvePropagateCons(
scip, cons,
TRUE,
NULL,
NULL,
NULL,
NULL, nfixedvars, naggrvars, ndelconss, &
cutoff) );
8443 if( consdata->nfixedzeros > 0 )
8468 if( firstchange == INT_MAX && consdata->changed )
8472 if( !consdata->cliqueadded && consdata->nvars >= 2 )
8474 if( firstclique == INT_MAX )
8481 if( oldnfixedvars < *nfixedvars || oldnaggrvars < *naggrvars || oldndelconss < *ndelconss || oldnchgcoefs < *nchgcoefs )
8484 if( firstchange < nconss && conshdlrdata->presolusehashing )
8488 if( oldndelconss < *ndelconss )
8502 naggrvars, ndelconss, nchgcoefs, nchgsides, &
cutoff) );
8509 else if( oldnfixedvars < *nfixedvars || oldnaggrvars < *naggrvars || oldndelconss < *ndelconss )
8525 firstclique = nconss;
8530 &lastclique, nfixedvars, naggrvars, ndelconss, nchgcoefs, &
cutoff) );
8531 ++(conshdlrdata->nclqpresolve);
8538 else if( oldnfixedvars < *nfixedvars || oldnaggrvars < *naggrvars || oldndelconss < *ndelconss || oldnchgcoefs < *nchgcoefs )
8542 conshdlrdata->noldfixedvars = *nfixedvars + *naggrvars;
8543 conshdlrdata->enablecliquelifting =
FALSE;
8549 if( conshdlrdata->presolpairwise )
8551 SCIP_Longint npaircomparisons = 0;
8553 oldndelconss = *ndelconss;
8554 oldnfixedvars = *nfixedvars;
8573 if( (*ndelconss - oldndelconss + *nfixedvars - oldnfixedvars) / ((SCIP_Real)npaircomparisons) <
MINGAINPERNMINCOMPARISONS )
8575 oldndelconss = *ndelconss;
8576 oldnfixedvars = *nfixedvars;
8577 npaircomparisons = 0;
8592 conshdlrdata->noldupgrs = nconss - (*ndelconss - startdelconss);
8614 SCIPdebugMsg(
scip,
"conflict resolving method of set partitioning / packing / covering constraint handler\n");
8621 SCIP_Bool confvarfound;
8628 confvarfound =
FALSE;
8630 for( v = 0; v < consdata->nvars; ++v )
8632 if( consdata->vars[v] != infervar )
8642 confvarfound =
TRUE;
8655 if( inferinfo >= 0 )
8662 for( v = 0; v < consdata->nvars; ++v )
8692 switch( consdata->setppctype )
8695 nlocksdown = nlockspos + nlocksneg;
8696 nlocksup = nlockspos + nlocksneg;
8699 nlocksdown = nlocksneg;
8700 nlocksup = nlockspos;
8703 nlocksdown = nlockspos;
8704 nlocksup = nlocksneg;
8711 for(
i = 0;
i < consdata->nvars; ++
i )
8728 SCIPdebugMsg(
scip,
"activation information for set partitioning / packing / covering constraint <%s>\n",
8737 if( consdata->nfixedones >= 1 || consdata->nfixedzeros >= consdata->nvars - 1 )
8766 SCIPdebugMsg(
scip,
"deactivation information for set partitioning / packing / covering constraint <%s>\n",
8841 const char* consname;
8880 lhs, rhs, varmap, consmap,
8881 initial, separate, enforce, check,
propagate, local, modifiable, dynamic, removable, stickingatnode, global,
valid) );
8926 if( *success && requsize > coefssize )
8929 coefssize = requsize;
8934 assert(!*success || requsize <= coefssize);
8957 initial, separate, enforce, check,
propagate, local, modifiable, dynamic, removable, stickingatnode) );
8961 initial, separate, enforce, check,
propagate, local, modifiable, dynamic, removable, stickingatnode) );
8965 initial, separate, enforce, check,
propagate, local, modifiable, dynamic, removable, stickingatnode) );
8989 if( varssize < consdata->
nvars )
9011 (*nvars) = consdata->nvars;
9064 consdata->nfixedones++;
9067 consdata->nfixedones--;
9070 consdata->nfixedzeros++;
9073 consdata->nfixedzeros--;
9076 consdata->varsdeleted =
TRUE;
9079 if( consdata->merged )
9089 consdata->merged =
FALSE;
9092 if( !consdata->existmultaggr )
9098 consdata->existmultaggr =
TRUE;
9105 assert(0 <= consdata->nfixedzeros && consdata->nfixedzeros <= consdata->nvars);
9106 assert(0 <= consdata->nfixedones && consdata->nfixedones <= consdata->nvars);
9110 if( consdata->nfixedones >= 1 || consdata->nfixedzeros >= consdata->nvars - 1 )
9112 consdata->presolpropagated =
FALSE;
9117 consdata->presolpropagated =
FALSE;
9143 assert(bdchginfos !=
NULL || nbdchginfos == 0);
9156 if( nbdchginfos == 2 )
9196 SCIP_Bool infeasible;
9201 SCIPdebugMsg(
scip,
"new clique of conflict constraint %s led to %d fixings\n", consname, ncliquebdchgs);
9205 SCIPdebugMsg(
scip,
"new clique of conflict constraint %s led to infeasibility\n", consname);
9219 for(
i = 0;
i < nbdchginfos; ++
i )
9236 if(
i == nbdchginfos )
9275 eventExecSetppc,
NULL) );
9279 conflictExecSetppc,
NULL) );
9287 consEnfolpSetppc, consEnfopsSetppc, consCheckSetppc, consLockSetppc,
9320 if( conshdlrdata->conshdlrlinear !=
NULL )
9334 "number of children created in pseudo branching (0: disable pseudo branching)",
9338 "should pairwise constraint comparison be performed in presolving?",
9342 "should hash table be used for detecting redundant constraints in advance",
9346 "should dual presolving steps be performed?",
9350 " should we try to lift variables into other clique constraints, fix variables, aggregate them, and also shrink the amount of variables in clique constraints",
9354 "should we try to generate extra cliques out of all binary variables to maybe fasten redundant constraint detection",
9358 "should we try to shrink the number of variables in a clique constraints, by replacing more than one variable by only one",
9386 SCIP_Bool modifiable,
9392 SCIP_Bool removable,
9394 SCIP_Bool stickingatnode
9400 initial, separate, enforce, check,
propagate, local, modifiable, dynamic, removable, stickingatnode);
9444 SCIP_Bool modifiable,
9450 SCIP_Bool removable,
9452 SCIP_Bool stickingatnode
9458 initial, separate, enforce, check,
propagate, local, modifiable, dynamic, removable, stickingatnode);
9502 SCIP_Bool modifiable,
9508 SCIP_Bool removable,
9510 SCIP_Bool stickingatnode
9516 initial, separate, enforce, check,
propagate, local, modifiable, dynamic, removable, stickingatnode);
9552 SCIPerrorMessage(
"constraint is not a set partitioning / packing / covering constraint\n");
9573 SCIPerrorMessage(
"constraint is not a set partitioning / packing / covering constraint\n");
9581 return consdata->nvars;
9596 SCIPerrorMessage(
"constraint is not a set partitioning / packing / covering constraint\n");
9604 return consdata->vars;
9619 SCIPerrorMessage(
"constraint is not a set partitioning / packing / covering constraint\n");
9641 SCIPerrorMessage(
"constraint is not a set partitioning / packing / covering constraint\n");
9649 if( consdata->row !=
NULL )
9667 SCIPerrorMessage(
"constraint is not a set partitioning / packing / covering constraint\n");
9675 if( consdata->row !=
NULL )
9695 SCIPerrorMessage(
"constraint is not a set partitioning / packing / covering constraint\n");
9703 return consdata->row;
9718 SCIPerrorMessage(
"constraint is not a set partitioning / packing / covering constraint\n");
9726 return consdata->nfixedones;
9742 SCIPerrorMessage(
"constraint is not a set partitioning / packing / covering constraint\n");
9750 return consdata->nfixedzeros;
9756 SCIP_Bool onlychecked,
9757 SCIP_Bool* infeasible,
9770 if( conshdlr ==
NULL )
9777 *infeasible =
FALSE;
9783 for(
i = nconss - 1;
i >= 0; --
i )
Constraint handler for linear constraints in their most general form, .
constraint handler for nonlinear constraints specified by algebraic expressions
static int setppcCompare(SCIP_CONS *const cons1, SCIP_CONS *const cons2)
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 SCIP_RETCODE conshdlrdataFree(SCIP *scip, SCIP_CONSHDLRDATA **conshdlrdata)
static SCIP_RETCODE addCoef(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var)
static SCIP_RETCODE consdataPrint(SCIP *scip, SCIP_CONSDATA *consdata, FILE *file)
#define DEFAULT_DUALPRESOLVING
static SCIP_RETCODE dropEvent(SCIP *scip, SCIP_CONS *cons, SCIP_EVENTHDLR *eventhdlr, int pos)
#define CONSHDLR_NEEDSCONS
#define CONSHDLR_SEPAFREQ
#define CONFLICTHDLR_PRIORITY
#define CONFLICTHDLR_NAME
static SCIP_RETCODE addCut(SCIP *scip, SCIP_CONS *cons, SCIP_Bool *cutoff)
#define CONSHDLR_CHECKPRIORITY
static SCIP_RETCODE mergeMultiples(SCIP *scip, SCIP_CONS *cons, int *nfixedvars, int *ndelconss, int *nchgcoefs, SCIP_Bool *cutoff)
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)
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)
static SCIP_RETCODE createRow(SCIP *scip, SCIP_CONS *cons)
#define DEFAULT_NPSEUDOBRANCHES
#define CONSHDLR_PROP_TIMING
#define HASHSIZE_SETPPCCONS
#define CONFLICTHDLR_DESC
static SCIP_RETCODE unlockRounding(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var)
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)
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_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)
#define CONSHDLR_MAXPREROUNDS
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)
#define DEFAULT_PRESOLPAIRWISE
static SCIP_RETCODE performVarDeletions(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss)
static SCIP_RETCODE dualPresolving(SCIP *scip, SCIP_CONS *cons, int *nfixedvars, int *ndelconss, int *naggrvars, SCIP_RESULT *result)
#define CONSHDLR_SEPAPRIORITY
static SCIP_Bool checkCons(SCIP *scip, SCIP_CONSDATA *consdata, SCIP_SOL *sol)
static SCIP_RETCODE consdataCreateTransformed(SCIP *scip, SCIP_CONSDATA **consdata, int nvars, SCIP_VAR **vars, SCIP_SETPPCTYPE setppctype)
#define DEFAULT_CLIQUELIFTING
static SCIP_RETCODE setSetppcType(SCIP *scip, SCIP_CONS *cons, SCIP_SETPPCTYPE setppctype)
static SCIP_RETCODE analyzeConflictOne(SCIP *scip, SCIP_CONS *cons)
static int setppcCompare2(SCIP_CONS *const cons1, SCIP_CONS *const cons2)
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)
static SCIP_RETCODE addSymmetryInformation(SCIP *scip, SYM_SYMTYPE symtype, SCIP_CONS *cons, SYM_GRAPH *graph, SCIP_Bool *success)
static SCIP_RETCODE lockRounding(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var)
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)
static SCIP_RETCODE consdataEnsureVarsSize(SCIP *scip, SCIP_CONSDATA *consdata, int num)
#define DEFAULT_ADDVARIABLESASCLIQUES
#define NONLINCONSUPGD_PRIORITY
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 applyFixings(SCIP *scip, SCIP_CONS *cons, int *naddconss, int *ndelconss, int *nfixedvars, SCIP_Bool *cutoff)
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)
#define DEFAULT_PRESOLUSEHASHING
static void deleteCliqueDataEntry(SCIP_VAR *const var, int const considx, SCIP_HASHMAP *const vartoindex, int *const varnconss, int **const varconsidxs)
static uint64_t consdataGetSignature(SCIP_CONSDATA *consdata)
static SCIP_RETCODE delCoefPos(SCIP *scip, SCIP_CONS *cons, int pos)
#define MINGAINPERNMINCOMPARISONS
static SCIP_RETCODE analyzeConflictZero(SCIP *scip, SCIP_CONS *cons)
static SCIP_RETCODE multiAggregateBinvar(SCIP *scip, SCIP_Bool linearconshdlrexist, SCIP_VAR **vars, int nvars, int pos, SCIP_Bool *infeasible, SCIP_Bool *aggregated)
#define CONSHDLR_PROPFREQ
#define CONSHDLR_PRESOLTIMING
static SCIP_RETCODE enforceConstraint(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss, int nusefulconss, SCIP_SOL *sol, SCIP_RESULT *result)
static SCIP_RETCODE consdataFree(SCIP *scip, SCIP_CONSDATA **consdata)
static void consdataSort(SCIP_CONSDATA *consdata)
static SCIP_RETCODE addNlrow(SCIP *scip, SCIP_CONS *cons)
#define CONSHDLR_EAGERFREQ
static SCIP_RETCODE enforcePseudo(SCIP *scip, SCIP_CONS *cons, SCIP_Bool *cutoff, SCIP_Bool *infeasible, SCIP_Bool *reduceddom, SCIP_Bool *solvelp)
static SCIP_RETCODE conshdlrdataCreate(SCIP *scip, SCIP_CONSHDLRDATA **conshdlrdata, SCIP_EVENTHDLR *eventhdlr)
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)
static SCIP_RETCODE processFixings(SCIP *scip, SCIP_CONS *cons, SCIP_Bool *cutoff, int *nfixedvars, SCIP_Bool *addcut, SCIP_Bool *mustcheck)
#define CONSHDLR_ENFOPRIORITY
static SCIP_RETCODE processContainedCons(SCIP *scip, SCIP_CONS *cons0, SCIP_CONS *cons1, SCIP_Bool *cutoff, int *nfixedvars, int *ndelconss, int *nchgsides)
static SCIP_RETCODE dropAllEvents(SCIP *scip, SCIP_CONS *cons, SCIP_EVENTHDLR *eventhdlr)
#define DEFAULT_CLIQUESHRINKING
static SCIP_RETCODE catchAllEvents(SCIP *scip, SCIP_CONS *cons, SCIP_EVENTHDLR *eventhdlr)
#define LINCONSUPGD_PRIORITY
#define CONSHDLR_DELAYSEPA
static SCIP_RETCODE detectRedundantConstraints(SCIP *scip, BMS_BLKMEM *blkmem, SCIP_CONS **conss, int nconss, int *firstchange, int *ndelconss, int *nchgsides)
static SCIP_RETCODE addCliques(SCIP *scip, SCIP_CONS **conss, int nconss, int firstclique, int lastclique, int *naddconss, int *ndelconss, int *nchgbds, SCIP_Bool *cutoff)
static SCIP_RETCODE removeRedundantCons(SCIP *scip, SCIP_CONS *cons0, SCIP_CONS *cons1, int *ndelconss)
static SCIP_RETCODE consdataCreate(SCIP *scip, SCIP_CONSDATA **consdata, int nvars, SCIP_VAR **vars, SCIP_SETPPCTYPE setppctype)
static SCIP_RETCODE fixAdditionalVars(SCIP *scip, SCIP_CONS *cons0, SCIP_CONS *cons1, SCIP_Bool *cutoff, int *nfixedvars)
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)
#define CONSHDLR_DELAYPROP
static SCIP_RETCODE catchEvent(SCIP *scip, SCIP_CONS *cons, SCIP_EVENTHDLR *eventhdlr, int pos)
static SCIP_RETCODE removeRedundantConstraints(SCIP *scip, SCIP_CONS **conss, int firstchange, int chkind, SCIP_Bool *cutoff, int *nfixedvars, int *ndelconss, int *nchgsides)
Constraint handler for the set partitioning / packing / covering constraints .
#define SCIP_LONGINT_FORMAT
SCIP_RETCODE SCIPcheckQuadraticNonlinear(SCIP *scip, SCIP_CONS *cons, SCIP_Bool *isquadratic)
SCIP_RETCODE SCIPincludeLinconsUpgrade(SCIP *scip, SCIP_DECL_LINCONSUPGD((*linconsupgd)), int priority, const char *conshdlrname)
#define SCIP_DECL_NONLINCONSUPGD(x)
SCIP_RETCODE SCIPcleanupConssSetppc(SCIP *scip, SCIP_Bool onlychecked, SCIP_Bool *infeasible, int *naddconss, int *ndelconss, int *nchgcoefs, int *nfixedvars)
SCIP_RETCODE SCIPcreateConsBasicSetpart(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars)
SCIP_RETCODE SCIPincludeConsUpgradeNonlinear(SCIP *scip, SCIP_DECL_NONLINCONSUPGD((*nlconsupgd)), int priority, SCIP_Bool active, const char *conshdlrname)
int SCIPgetNFixedzerosSetppc(SCIP *scip, SCIP_CONS *cons)
SCIP_ROW * SCIPgetRowSetppc(SCIP *scip, SCIP_CONS *cons)
int SCIPgetNVarsSetppc(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPcreateConsSetpack(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)
SCIP_VAR ** SCIPgetVarsSetppc(SCIP *scip, SCIP_CONS *cons)
SCIP_EXPR * SCIPgetExprNonlinear(SCIP_CONS *cons)
int SCIPgetNFixedonesSetppc(SCIP *scip, SCIP_CONS *cons)
SCIP_Real SCIPgetRhsNonlinear(SCIP_CONS *cons)
SCIP_RETCODE SCIPcreateConsBasicSetcover(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars)
SCIP_RETCODE SCIPaddCoefSetppc(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var)
enum SCIP_SetppcType SCIP_SETPPCTYPE
#define SCIP_DECL_LINCONSUPGD(x)
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)
SCIP_SETPPCTYPE SCIPgetTypeSetppc(SCIP *scip, SCIP_CONS *cons)
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 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 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_Real SCIPgetLhsNonlinear(SCIP_CONS *cons)
SCIP_Real SCIPgetDualsolSetppc(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPcreateConsBasicSetpack(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars)
SCIP_Real SCIPgetDualfarkasSetppc(SCIP *scip, SCIP_CONS *cons)
@ SCIP_SETPPCTYPE_PARTITIONING
@ SCIP_SETPPCTYPE_COVERING
@ SCIP_SETPPCTYPE_PACKING
SCIP_RETCODE SCIPincludeConshdlrSetppc(SCIP *scip)
SCIP_Bool SCIPisConsCompressionEnabled(SCIP *scip)
SCIP_Bool SCIPisTransformed(SCIP *scip)
SCIP_Bool SCIPisStopped(SCIP *scip)
SCIP_STAGE SCIPgetStage(SCIP *scip)
int SCIPgetNIntVars(SCIP *scip)
int SCIPgetNImplVars(SCIP *scip)
int SCIPgetNContVars(SCIP *scip)
int SCIPgetNVars(SCIP *scip)
SCIP_RETCODE SCIPaddCons(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPdelCons(SCIP *scip, SCIP_CONS *cons)
SCIP_VAR ** SCIPgetVars(SCIP *scip)
int SCIPgetNFixedVars(SCIP *scip)
int SCIPgetNBinVars(SCIP *scip)
void SCIPhashmapFree(SCIP_HASHMAP **hashmap)
int SCIPhashmapGetImageInt(SCIP_HASHMAP *hashmap, void *origin)
SCIP_RETCODE SCIPhashmapCreate(SCIP_HASHMAP **hashmap, BMS_BLKMEM *blkmem, int mapsize)
SCIP_Bool SCIPhashmapExists(SCIP_HASHMAP *hashmap, void *origin)
SCIP_RETCODE SCIPhashmapInsertInt(SCIP_HASHMAP *hashmap, void *origin, int image)
SCIP_RETCODE SCIPhashmapRemove(SCIP_HASHMAP *hashmap, void *origin)
void SCIPhashtableFree(SCIP_HASHTABLE **hashtable)
#define SCIPhashFour(a, b, c, d)
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)
void * SCIPhashtableRetrieve(SCIP_HASHTABLE *hashtable, void *key)
SCIP_RETCODE SCIPhashtableInsert(SCIP_HASHTABLE *hashtable, void *element)
#define SCIPhashSignature64(a)
SCIP_RETCODE SCIPdelConsLocal(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPaddConsNode(SCIP *scip, SCIP_NODE *node, SCIP_CONS *cons, SCIP_NODE *validnode)
SCIP_RETCODE SCIPaddConflict(SCIP *scip, SCIP_NODE *node, SCIP_CONS *cons, SCIP_NODE *validnode, SCIP_CONFTYPE conftype, SCIP_Bool iscutoffinvolved)
void SCIPinfoMessage(SCIP *scip, FILE *file, const char *formatstr,...)
void SCIPverbMessage(SCIP *scip, SCIP_VERBLEVEL msgverblevel, FILE *file, const char *formatstr,...)
#define SCIPdebugMsgPrint
void SCIPwarningMessage(SCIP *scip, const char *formatstr,...)
SCIP_Real SCIPrelDiff(SCIP_Real val1, SCIP_Real val2)
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 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)
void SCIPrandomPermuteArray(SCIP_RANDNUMGEN *randnumgen, void **array, int begin, int end)
SCIP_Real SCIPcalcNodeselPriority(SCIP *scip, SCIP_VAR *var, SCIP_BRANCHDIR branchdir, SCIP_Real targetvalue)
SCIP_Real SCIPcalcChildEstimate(SCIP *scip, SCIP_VAR *var, SCIP_Real targetvalue)
SCIP_RETCODE SCIPgetLPBranchCands(SCIP *scip, SCIP_VAR ***lpcands, SCIP_Real **lpcandssol, SCIP_Real **lpcandsfrac, int *nlpcands, int *npriolpcands, int *nfracimplvars)
SCIP_RETCODE SCIPgetPseudoBranchCands(SCIP *scip, SCIP_VAR ***pseudocands, int *npseudocands, int *npriopseudocands)
SCIP_RETCODE SCIPcreateChild(SCIP *scip, SCIP_NODE **node, SCIP_Real nodeselprio, SCIP_Real estimate)
SCIP_RETCODE SCIPinitConflictAnalysis(SCIP *scip, SCIP_CONFTYPE conftype, SCIP_Bool iscutoffinvolved)
const char * SCIPconflicthdlrGetName(SCIP_CONFLICTHDLR *conflicthdlr)
SCIP_Bool SCIPisConflictAnalysisApplicable(SCIP *scip)
SCIP_RETCODE SCIPaddConflictBinvar(SCIP *scip, SCIP_VAR *var)
SCIP_RETCODE SCIPanalyzeConflictCons(SCIP *scip, SCIP_CONS *cons, SCIP_Bool *success)
SCIP_RETCODE SCIPincludeConflicthdlrBasic(SCIP *scip, SCIP_CONFLICTHDLR **conflicthdlrptr, const char *name, const char *desc, int priority, SCIP_DECL_CONFLICTEXEC((*conflictexec)), SCIP_CONFLICTHDLRDATA *conflicthdlrdata)
int SCIPconshdlrGetNCheckConss(SCIP_CONSHDLR *conshdlr)
void SCIPconshdlrSetData(SCIP_CONSHDLR *conshdlr, SCIP_CONSHDLRDATA *conshdlrdata)
SCIP_RETCODE SCIPsetConshdlrFree(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrActive(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_CONS ** SCIPconshdlrGetCheckConss(SCIP_CONSHDLR *conshdlr)
SCIP_RETCODE SCIPsetConshdlrPresol(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPRESOL((*conspresol)), int maxprerounds, SCIP_PRESOLTIMING presoltiming)
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 SCIPsetConshdlrProp(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPROP((*consprop)), int propfreq, SCIP_Bool delayprop, SCIP_PROPTIMING proptiming)
SCIP_RETCODE SCIPsetConshdlrEnforelax(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
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_RETCODE SCIPsetConshdlrParse(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrGetVars(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrPrint(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrGetSignedPermsymGraph(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
const char * SCIPconshdlrGetName(SCIP_CONSHDLR *conshdlr)
SCIP_RETCODE SCIPsetConshdlrCopy(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSHDLRCOPY((*conshdlrcopy)),)
SCIP_CONSHDLR * SCIPfindConshdlr(SCIP *scip, const char *name)
SCIP_RETCODE SCIPsetConshdlrInit(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrGetPermsymGraph(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrDelete(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrInitsol(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrDeactive(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_CONSHDLRDATA * SCIPconshdlrGetData(SCIP_CONSHDLR *conshdlr)
int SCIPconshdlrGetNActiveConss(SCIP_CONSHDLR *conshdlr)
SCIP_RETCODE SCIPsetConshdlrTrans(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrResprop(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrExitpre(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrExitsol(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_CONS ** SCIPconshdlrGetConss(SCIP_CONSHDLR *conshdlr)
SCIP_RETCODE SCIPsetConshdlrDelvars(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrInitlp(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrGetNVars(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_CONSDATA * SCIPconsGetData(SCIP_CONS *cons)
int SCIPconsGetPos(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsDynamic(SCIP_CONS *cons)
SCIP_CONSHDLR * SCIPconsGetHdlr(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsInitial(SCIP_CONS *cons)
SCIP_RETCODE SCIPprintCons(SCIP *scip, SCIP_CONS *cons, FILE *file)
SCIP_Bool SCIPconsIsChecked(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsDeleted(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsTransformed(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsLockedType(SCIP_CONS *cons, SCIP_LOCKTYPE locktype)
SCIP_Bool SCIPconsIsEnforced(SCIP_CONS *cons)
SCIP_RETCODE SCIPunmarkConsPropagate(SCIP *scip, SCIP_CONS *cons)
SCIP_Bool SCIPconsIsActive(SCIP_CONS *cons)
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_Bool SCIPconsIsPropagated(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsLocal(SCIP_CONS *cons)
const char * SCIPconsGetName(SCIP_CONS *cons)
SCIP_RETCODE SCIPresetConsAge(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPmarkConsPropagate(SCIP *scip, SCIP_CONS *cons)
SCIP_Bool SCIPconsIsModifiable(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsAdded(SCIP_CONS *cons)
SCIP_RETCODE SCIPupdateConsFlags(SCIP *scip, SCIP_CONS *cons0, SCIP_CONS *cons1)
SCIP_Bool SCIPconsIsStickingAtNode(SCIP_CONS *cons)
SCIP_RETCODE SCIPreleaseCons(SCIP *scip, SCIP_CONS **cons)
SCIP_Bool SCIPconsIsSeparated(SCIP_CONS *cons)
SCIP_RETCODE SCIPincConsAge(SCIP *scip, SCIP_CONS *cons)
SCIP_Bool SCIPconsIsRemovable(SCIP_CONS *cons)
SCIP_RETCODE SCIPaddRow(SCIP *scip, SCIP_ROW *row, SCIP_Bool forcecut, SCIP_Bool *infeasible)
int SCIPgetIntarrayVal(SCIP *scip, SCIP_INTARRAY *intarray, int idx)
SCIP_RETCODE SCIPcreateIntarray(SCIP *scip, SCIP_INTARRAY **intarray)
SCIP_RETCODE SCIPincIntarrayVal(SCIP *scip, SCIP_INTARRAY *intarray, int idx, int incval)
SCIP_RETCODE SCIPfreeIntarray(SCIP *scip, SCIP_INTARRAY **intarray)
SCIP_RETCODE SCIPsetIntarrayVal(SCIP *scip, SCIP_INTARRAY *intarray, int idx, int val)
SCIP_RETCODE SCIPincludeEventhdlrBasic(SCIP *scip, SCIP_EVENTHDLR **eventhdlrptr, const char *name, const char *desc, SCIP_DECL_EVENTEXEC((*eventexec)), SCIP_EVENTHDLRDATA *eventhdlrdata)
const char * SCIPeventhdlrGetName(SCIP_EVENTHDLR *eventhdlr)
SCIP_EVENTTYPE SCIPeventGetType(SCIP_EVENT *event)
SCIP_RETCODE SCIPcatchVarEvent(SCIP *scip, SCIP_VAR *var, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int *filterpos)
SCIP_RETCODE SCIPdropVarEvent(SCIP *scip, SCIP_VAR *var, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int filterpos)
SCIP_VAR * SCIPeventGetVar(SCIP_EVENT *event)
void SCIPexprGetQuadraticBilinTerm(SCIP_EXPR *expr, int termidx, SCIP_EXPR **expr1, SCIP_EXPR **expr2, SCIP_Real *coef, int *pos2, SCIP_EXPR **prodexpr)
void SCIPexprGetQuadraticData(SCIP_EXPR *expr, SCIP_Real *constant, int *nlinexprs, SCIP_EXPR ***linexprs, SCIP_Real **lincoefs, int *nquadexprs, int *nbilinexprs, SCIP_Real **eigenvalues, SCIP_Real **eigenvectors)
SCIP_VAR * SCIPgetVarExprVar(SCIP_EXPR *expr)
void SCIPexprGetQuadraticQuadTerm(SCIP_EXPR *quadexpr, int termidx, SCIP_EXPR **expr, SCIP_Real *lincoef, SCIP_Real *sqrcoef, int *nadjbilin, int **adjbilin, SCIP_EXPR **sqrexpr)
SCIP_Bool SCIPhasCurrentNodeLP(SCIP *scip)
int SCIPcalcMemGrowSize(SCIP *scip, int num)
#define SCIPallocBufferArray(scip, ptr, num)
#define SCIPreallocBufferArray(scip, ptr, num)
#define SCIPfreeBufferArray(scip, ptr)
#define SCIPduplicateBufferArray(scip, ptr, source, num)
#define SCIPreallocBlockMemoryArray(scip, ptr, oldnum, newnum)
#define SCIPfreeBlockMemory(scip, ptr)
#define SCIPfreeBlockMemoryArrayNull(scip, ptr, num)
#define SCIPfreeBufferArrayNull(scip, ptr)
#define SCIPallocBlockMemory(scip, ptr)
#define SCIPduplicateBlockMemoryArray(scip, ptr, source, num)
SCIP_RETCODE SCIPdelNlRow(SCIP *scip, SCIP_NLROW *nlrow)
SCIP_RETCODE SCIPaddNlRow(SCIP *scip, SCIP_NLROW *nlrow)
SCIP_Bool SCIPisNLPConstructed(SCIP *scip)
SCIP_RETCODE SCIPreleaseNlRow(SCIP *scip, SCIP_NLROW **nlrow)
SCIP_Bool SCIPnlrowIsInNLP(SCIP_NLROW *nlrow)
SCIP_RETCODE SCIPcreateNlRow(SCIP *scip, SCIP_NLROW **nlrow, const char *name, SCIP_Real constant, int nlinvars, SCIP_VAR **linvars, SCIP_Real *lincoefs, SCIP_EXPR *expr, SCIP_Real lhs, SCIP_Real rhs, SCIP_EXPRCURV curvature)
SCIP_Bool SCIPinProbing(SCIP *scip)
SCIP_RETCODE SCIPaddVarsToRowSameCoef(SCIP *scip, SCIP_ROW *row, int nvars, SCIP_VAR **vars, SCIP_Real val)
SCIP_RETCODE SCIPcreateEmptyRowCons(SCIP *scip, SCIP_ROW **row, SCIP_CONS *cons, const char *name, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool removable)
SCIP_RETCODE SCIPaddVarToRow(SCIP *scip, SCIP_ROW *row, SCIP_VAR *var, SCIP_Real val)
SCIP_Real SCIPgetRowSolFeasibility(SCIP *scip, SCIP_ROW *row, SCIP_SOL *sol)
SCIP_RETCODE SCIPreleaseRow(SCIP *scip, SCIP_ROW **row)
SCIP_Real SCIProwGetDualfarkas(SCIP_ROW *row)
SCIP_Bool SCIProwIsInLP(SCIP_ROW *row)
SCIP_Real SCIProwGetDualsol(SCIP_ROW *row)
SCIP_Real SCIPgetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var)
void SCIPupdateSolLPConsViolation(SCIP *scip, SCIP_SOL *sol, SCIP_Real absviol, SCIP_Real relviol)
int SCIPgetNImplications(SCIP *scip)
SCIP_Longint SCIPgetNTotalNodes(SCIP *scip)
int SCIPgetNRuns(SCIP *scip)
SCIP_Longint SCIPgetNConflictConssApplied(SCIP *scip)
SCIP_Bool SCIPisFeasGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Real SCIPinfinity(SCIP *scip)
SCIP_Bool SCIPisFeasEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisFeasZero(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisFeasNegative(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisFeasLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Real SCIPfeastol(SCIP *scip)
SCIP_Bool SCIPisNegative(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisZero(SCIP *scip, SCIP_Real val)
SCIP_RETCODE SCIPgetChildren(SCIP *scip, SCIP_NODE ***children, int *nchildren)
int SCIPvarCompareActiveAndNegated(SCIP_VAR *var1, SCIP_VAR *var2)
SCIP_RETCODE SCIPgetProbvarLinearSum(SCIP *scip, SCIP_VAR **vars, SCIP_Real *scalars, int *nvars, int varssize, SCIP_Real *constant, int *requiredsize, SCIP_Bool mergemultiples)
SCIP_Bool SCIPvarIsDeleted(SCIP_VAR *var)
SCIP_RETCODE SCIPlockVarCons(SCIP *scip, SCIP_VAR *var, SCIP_CONS *cons, SCIP_Bool lockdown, SCIP_Bool lockup)
SCIP_VAR * SCIPvarGetNegatedVar(SCIP_VAR *var)
SCIP_Bool SCIPvarIsActive(SCIP_VAR *var)
SCIP_Bool SCIPvarIsBinary(SCIP_VAR *var)
SCIP_RETCODE SCIPaddClique(SCIP *scip, SCIP_VAR **vars, SCIP_Bool *values, int nvars, SCIP_Bool isequation, SCIP_Bool *infeasible, int *nbdchgs)
SCIP_RETCODE SCIPcalcCliquePartition(SCIP *const scip, SCIP_VAR **const vars, int const nvars, int *const cliquepartition, int *const ncliques)
SCIP_RETCODE SCIPgetTransformedVars(SCIP *scip, int nvars, SCIP_VAR **vars, SCIP_VAR **transvars)
SCIP_VARSTATUS SCIPvarGetStatus(SCIP_VAR *var)
int SCIPvarGetNLocksUpType(SCIP_VAR *var, SCIP_LOCKTYPE locktype)
SCIP_Bool SCIPdoNotAggr(SCIP *scip)
SCIP_RETCODE SCIPvarGetAggregatedObj(SCIP_VAR *var, SCIP_Real *aggrobj)
SCIP_Real SCIPvarGetUbLocal(SCIP_VAR *var)
SCIP_Bool SCIPvarIsTransformed(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 SCIPchgVarUbNode(SCIP *scip, SCIP_NODE *node, SCIP_VAR *var, SCIP_Real newbound)
SCIP_Real SCIPvarGetObj(SCIP_VAR *var)
SCIP_VAR * SCIPvarGetProbvar(SCIP_VAR *var)
SCIP_VARTYPE SCIPvarGetType(SCIP_VAR *var)
SCIP_Real SCIPvarGetUbGlobal(SCIP_VAR *var)
int SCIPvarGetIndex(SCIP_VAR *var)
SCIP_RETCODE SCIPaddVarLocksType(SCIP *scip, SCIP_VAR *var, SCIP_LOCKTYPE locktype, int nlocksdown, int nlocksup)
SCIP_RETCODE SCIPunlockVarCons(SCIP *scip, SCIP_VAR *var, SCIP_CONS *cons, SCIP_Bool lockdown, SCIP_Bool lockup)
SCIP_Real SCIPgetVarUbAtIndex(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx, SCIP_Bool after)
const char * SCIPvarGetName(SCIP_VAR *var)
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)
SCIP_VAR * SCIPbdchginfoGetVar(SCIP_BDCHGINFO *bdchginfo)
SCIP_RETCODE SCIPreleaseVar(SCIP *scip, SCIP_VAR **var)
SCIP_Bool SCIPdoNotMultaggr(SCIP *scip)
SCIP_RETCODE SCIPparseVarsLinearsum(SCIP *scip, const char *str, SCIP_VAR **vars, SCIP_Real *vals, int *nvars, int varssize, int *requiredsize, char **endptr, SCIP_Bool *success)
SCIP_Real SCIPgetVarSol(SCIP *scip, SCIP_VAR *var)
SCIP_RETCODE SCIPgetNegatedVar(SCIP *scip, SCIP_VAR *var, SCIP_VAR **negvar)
SCIP_Bool SCIPhaveVarsCommonClique(SCIP *scip, SCIP_VAR *var1, SCIP_Bool value1, SCIP_VAR *var2, SCIP_Bool value2, SCIP_Bool regardimplics)
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)
SCIP_Real SCIPvarGetLbLocal(SCIP_VAR *var)
SCIP_Bool SCIPvarIsNegated(SCIP_VAR *var)
SCIP_VAR * SCIPvarGetNegationVar(SCIP_VAR *var)
int SCIPgetNCliques(SCIP *scip)
SCIP_Real SCIPvarGetLbGlobal(SCIP_VAR *var)
SCIP_RETCODE SCIPfixVar(SCIP *scip, SCIP_VAR *var, SCIP_Real fixedval, SCIP_Bool *infeasible, SCIP_Bool *fixed)
SCIP_Real SCIPgetVarLbAtIndex(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx, SCIP_Bool after)
int SCIPvarCompare(SCIP_VAR *var1, SCIP_VAR *var2)
SCIP_RETCODE SCIPchgVarLbNode(SCIP *scip, SCIP_NODE *node, SCIP_VAR *var, SCIP_Real newbound)
SCIP_RETCODE SCIPvarGetProbvarBinary(SCIP_VAR **var, SCIP_Bool *negated)
SCIP_RETCODE SCIPinferBinvarCons(SCIP *scip, SCIP_VAR *var, SCIP_Bool fixedval, SCIP_CONS *infercons, int inferinfo, SCIP_Bool *infeasible, SCIP_Bool *tightened)
SCIP_RETCODE SCIPgetBinvarRepresentative(SCIP *scip, SCIP_VAR *var, SCIP_VAR **repvar, SCIP_Bool *negated)
SCIP_RETCODE SCIPwriteVarsLinearsum(SCIP *scip, FILE *file, SCIP_VAR **vars, SCIP_Real *vals, int nvars, SCIP_Bool type)
SCIP_Bool SCIPvarsHaveCommonClique(SCIP_VAR *var1, SCIP_Bool value1, SCIP_VAR *var2, SCIP_Bool value2, SCIP_Bool regardimplics)
SCIP_Real SCIPbdchginfoGetNewbound(SCIP_BDCHGINFO *bdchginfo)
int SCIPvarGetNLocksDownType(SCIP_VAR *var, SCIP_LOCKTYPE locktype)
SCIP_RETCODE SCIPgetTransformedVar(SCIP *scip, SCIP_VAR *var, SCIP_VAR **transvar)
SCIP_RETCODE SCIPcaptureVar(SCIP *scip, SCIP_VAR *var)
SCIP_Bool SCIPallowStrongDualReds(SCIP *scip)
void SCIPsortPtr(void **ptrarray, SCIP_DECL_SORTPTRCOMP((*ptrcomp)), int len)
void SCIPsortDownPtr(void **ptrarray, SCIP_DECL_SORTPTRCOMP((*ptrcomp)), int len)
SCIP_Bool SCIPsortedvecFindDownPtr(void **ptrarray, SCIP_DECL_SORTPTRCOMP((*ptrcomp)), void *val, int len, int *pos)
void SCIPsortedvecInsertDownPtr(void **ptrarray, SCIP_DECL_SORTPTRCOMP((*ptrcomp)), void *keyval, int *len, int *pos)
int SCIPsnprintf(char *t, int len, const char *s,...)
SCIP_RETCODE SCIPskipSpace(char **s)
SCIP_RETCODE SCIPgetSymActiveVariables(SCIP *scip, SYM_SYMTYPE symtype, SCIP_VAR ***vars, SCIP_Real **scalars, int *nvars, SCIP_Real *constant, SCIP_Bool transformed)
SCIP_RETCODE SCIPextendPermsymDetectionGraphLinear(SCIP *scip, SYM_GRAPH *graph, SCIP_VAR **vars, SCIP_Real *vals, int nvars, SCIP_CONS *cons, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool *success)
SCIPfreeRandom(scip, &heurdata->randnumgen)
SCIPcreateRandom(scip, &heurdata->randnumgen, DEFAULT_RANDSEED, TRUE))
assert(minobj< SCIPgetCutoffbound(scip))
static SCIP_Bool propagate
static const SCIP_Real scalars[]
memory allocation routines
#define BMScopyMemoryArray(ptr, source, num)
#define BMSclearMemoryArray(ptr, num)
struct BMS_BlkMem BMS_BLKMEM
BMS_BLKMEM * SCIPblkmem(SCIP *scip)
public methods for conflict analysis handlers
public methods for managing constraints
public methods for managing events
public methods for LP management
public methods for message output
#define SCIPdebugPrintCons(x, y, z)
public data structures and miscellaneous methods
methods for sorting joint arrays of various types
public methods for problem variables
public methods for conflict handler plugins and conflict analysis
public methods for constraint handler plugins and constraints
public methods for cuts and aggregation rows
public methods for event handler plugins and event handlers
public methods for the LP relaxation, rows and columns
public methods for memory management
public methods for message handling
public methods for nonlinear relaxation
public methods for numerical tolerances
public methods for SCIP parameter handling
public methods for global and local (sub)problems
public methods for the probing mode
public methods for random numbers
public methods for solutions
public methods for querying solving statistics
public methods for SCIP variables
structs for symmetry computations
methods for dealing with symmetry detection graphs
#define SCIP_DECL_CONFLICTEXEC(x)
@ SCIP_CONFTYPE_PROPAGATION
#define SCIP_DECL_CONSGETSIGNEDPERMSYMGRAPH(x)
#define SCIP_DECL_CONSGETPERMSYMGRAPH(x)
#define SCIP_DECL_CONSENFOLP(x)
#define SCIP_DECL_CONSDELETE(x)
#define SCIP_DECL_CONSGETVARS(x)
#define SCIP_DECL_CONSINITSOL(x)
#define SCIP_DECL_CONSPRINT(x)
struct SCIP_ConshdlrData SCIP_CONSHDLRDATA
#define SCIP_DECL_CONSSEPALP(x)
#define SCIP_DECL_CONSENFORELAX(x)
#define SCIP_DECL_CONSPROP(x)
#define SCIP_DECL_CONSGETNVARS(x)
#define SCIP_DECL_CONSRESPROP(x)
#define SCIP_DECL_CONSACTIVE(x)
#define SCIP_DECL_CONSENFOPS(x)
#define SCIP_DECL_CONSPARSE(x)
#define SCIP_DECL_CONSTRANS(x)
#define SCIP_DECL_CONSDEACTIVE(x)
#define SCIP_DECL_CONSPRESOL(x)
#define SCIP_DECL_CONSINITLP(x)
#define SCIP_DECL_CONSEXITPRE(x)
#define SCIP_DECL_CONSLOCK(x)
#define SCIP_DECL_CONSCOPY(x)
#define SCIP_DECL_CONSINIT(x)
struct SCIP_ConsData SCIP_CONSDATA
#define SCIP_DECL_CONSCHECK(x)
#define SCIP_DECL_CONSHDLRCOPY(x)
#define SCIP_DECL_CONSEXITSOL(x)
#define SCIP_DECL_CONSFREE(x)
#define SCIP_DECL_CONSSEPASOL(x)
#define SCIP_DECL_CONSDELVARS(x)
#define SCIP_EVENTTYPE_BOUNDCHANGED
struct SCIP_EventData SCIP_EVENTDATA
#define SCIP_EVENTTYPE_UBTIGHTENED
#define SCIP_EVENTTYPE_VARFIXED
#define SCIP_EVENTTYPE_VARDELETED
#define SCIP_DECL_EVENTEXEC(x)
#define SCIP_EVENTTYPE_LBRELAXED
#define SCIP_EVENTTYPE_BOUNDTIGHTENED
#define SCIP_EVENTTYPE_LBTIGHTENED
#define SCIP_EVENTTYPE_UBRELAXED
@ SCIP_BRANCHDIR_DOWNWARDS
#define SCIP_DECL_SORTPTRCOMP(x)
#define SCIP_DECL_HASHKEYEQ(x)
#define SCIP_DECL_HASHGETKEY(x)
#define SCIP_DECL_HASHKEYVAL(x)
enum SCIP_Result SCIP_RESULT
enum SCIP_Retcode SCIP_RETCODE
@ SCIP_STAGE_TRANSFORMING
enum SYM_Symtype SYM_SYMTYPE
#define SCIP_PRESOLTIMING_MEDIUM
#define SCIP_PRESOLTIMING_EXHAUSTIVE
@ SCIP_VARTYPE_CONTINUOUS
@ SCIP_VARSTATUS_MULTAGGR
enum SCIP_LockType SCIP_LOCKTYPE