67#define CONSHDLR_NAME "setppc"
68#define CONSHDLR_DESC "set partitioning / packing / covering constraints"
69#define CONSHDLR_SEPAPRIORITY +700000
70#define CONSHDLR_ENFOPRIORITY -700000
71#define CONSHDLR_CHECKPRIORITY -700000
72#define CONSHDLR_SEPAFREQ 0
73#define CONSHDLR_PROPFREQ 1
74#define CONSHDLR_EAGERFREQ 100
76#define CONSHDLR_MAXPREROUNDS -1
77#define CONSHDLR_DELAYSEPA FALSE
78#define CONSHDLR_DELAYPROP FALSE
79#define CONSHDLR_NEEDSCONS TRUE
81#define CONSHDLR_PRESOLTIMING SCIP_PRESOLTIMING_ALWAYS
82#define CONSHDLR_PROP_TIMING SCIP_PROPTIMING_BEFORELP
84#define LINCONSUPGD_PRIORITY +700000
85#define NONLINCONSUPGD_PRIORITY +700000
87#define EVENTHDLR_NAME "setppc"
88#define EVENTHDLR_DESC "bound change event handler for set partitioning / packing / covering constraints"
90#define CONFLICTHDLR_NAME "setppc"
91#define CONFLICTHDLR_DESC "conflict handler creating set covering constraints"
92#define CONFLICTHDLR_PRIORITY LINCONSUPGD_PRIORITY
94#define DEFAULT_PRESOLPAIRWISE TRUE
96#define HASHSIZE_SETPPCCONS 500
97#define DEFAULT_PRESOLUSEHASHING TRUE
98#define NMINCOMPARISONS 200000
99#define MINGAINPERNMINCOMPARISONS 1e-06
101#define DEFAULT_RANDSEED 3
106#define MINBRANCHWEIGHT 0.3
107#define MAXBRANCHWEIGHT 0.7
109#define DEFAULT_NPSEUDOBRANCHES 2
110#define DEFAULT_DUALPRESOLVING TRUE
112#define DEFAULT_CLIQUELIFTING FALSE
116#define DEFAULT_ADDVARIABLESASCLIQUES FALSE
119#define DEFAULT_COPYTYPEDCONS FALSE
120#define DEFAULT_CLIQUESHRINKING TRUE
131struct SCIP_ConshdlrData
160 int probtoidxmapsize;
174 unsigned int setppctype:2;
175 unsigned int sorted:1;
176 unsigned int cliqueadded:1;
177 unsigned int validsignature:1;
178 unsigned int changed:1;
179 unsigned int varsdeleted:1;
180 unsigned int merged:1;
181 unsigned int presolpropagated:1;
182 unsigned int existmultaggr:1;
183 unsigned int catchevents:1;
225 if( consdata1->setppctype < consdata2->setppctype ||
229 else if( (consdata1->setppctype == consdata2->setppctype && consdata1->nvars == consdata2->nvars) )
233 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));
287 if( consdata1->setppctype < consdata2->setppctype ||
296 assert(consdata1->setppctype > consdata2->setppctype || ((consdata1->setppctype == consdata2->setppctype) &&
326 switch( consdata->setppctype )
358 switch( consdata->setppctype )
396 (*conshdlrdata)->eventhdlr = eventhdlr;
397 (*conshdlrdata)->nsetpart = 0;
398 (*conshdlrdata)->probtoidxmap =
NULL;
399 (*conshdlrdata)->probtoidxmapsize = 0;
446 varuses = conshdlrdata->varuses;
520 for( v = 0; v < consdata->nvars; ++v )
522 SCIP_CALL( conshdlrdataIncVaruses(
scip, conshdlrdata, consdata->vars[v]) );
540 for( v = 0; v < consdata->nvars; ++v )
542 SCIP_CALL( conshdlrdataDecVaruses(
scip, conshdlrdata, consdata->vars[v]) );
558 assert(consdata->nvars <= consdata->varssize);
560 if( num > consdata->varssize )
566 consdata->varssize = newsize;
568 assert(num <= consdata->varssize);
588 (*consdata)->signature = 0;
589 (*consdata)->row =
NULL;
590 (*consdata)->nlrow =
NULL;
591 (*consdata)->existmultaggr =
FALSE;
592 (*consdata)->catchevents =
FALSE;
593 (*consdata)->nfixedzeros = 0;
594 (*consdata)->nfixedones = 0;
603#ifdef SCIP_DISABLED_CODE
615 for( v = 0; v <
nvars; ++v )
621 (*consdata)->nfixedones++;
623 (*consdata)->nfixedzeros++;
625 varsbuffer[k++] =
vars[v];
628 (*consdata)->varssize = k;
629 (*consdata)->nvars = k;
644 (*consdata)->varssize =
nvars;
645 (*consdata)->nvars =
nvars;
654 for( v = 0; v < (*consdata)->nvars; v++ )
665 for( v = 0; v < (*consdata)->nvars; v++ )
674 (*consdata)->vars =
NULL;
675 (*consdata)->varssize = 0;
676 (*consdata)->nvars = 0;
678 (*consdata)->setppctype = setppctype;
679 (*consdata)->sorted = (
nvars <= 1);
680 (*consdata)->cliqueadded =
FALSE;
681 (*consdata)->validsignature =
FALSE;
682 (*consdata)->changed =
TRUE;
683 (*consdata)->varsdeleted =
FALSE;
684 (*consdata)->merged =
FALSE;
685 (*consdata)->presolpropagated =
FALSE;
725 if( (*consdata)->row !=
NULL )
731 if( (*consdata)->nlrow !=
NULL )
737 for( v = 0; v < (*consdata)->nvars; v++ )
760 if( consdata->nvars == 0 )
767 switch( consdata->setppctype )
794 if( !consdata->validsignature )
798 consdata->signature = 0;
799 for(
i = 0;
i < consdata->nvars; ++
i )
801 consdata->validsignature =
TRUE;
804 return consdata->signature;
815 if( !consdata->sorted )
817 if( consdata->nvars <= 1 )
818 consdata->sorted =
TRUE;
821 SCIPsortPtr((
void**)consdata->vars, SCIPvarComp, consdata->nvars);
822 consdata->sorted =
TRUE;
831 for( v = 0; v < consdata->nvars; ++v )
868 for(
i = 0;
i < consdata->nvars; ++
i )
883 ++(conshdlrdata->nsetpart);
884 assert(conshdlrdata->nsetpart >= 0);
888 --(conshdlrdata->nsetpart);
889 assert(conshdlrdata->nsetpart >= 0);
894 consdata->setppctype = setppctype;
899 for(
i = 0;
i < consdata->nvars; ++
i )
907 conshdlrdata->updatedsetppctype =
TRUE;
931 var = consdata->vars[pos];
954 consdata->nfixedzeros++;
959 consdata->presolpropagated =
FALSE;
962 if( consdata->nfixedzeros >= consdata->nvars - 1 )
970 consdata->nfixedones++;
974 consdata->presolpropagated =
FALSE;
1001 var = consdata->vars[pos];
1011 consdata->nfixedzeros--;
1013 consdata->nfixedones--;
1032 if( consdata->catchevents ==
TRUE )
1036 for(
i = 0;
i < consdata->nvars; ++
i )
1041 consdata->catchevents =
TRUE;
1060 if( consdata->catchevents ==
FALSE )
1064 for(
i = 0;
i < consdata->nvars; ++
i )
1069 consdata->catchevents =
FALSE;
1102 consdata->vars[consdata->nvars] =
var;
1104 if( consdata->validsignature )
1106 consdata->sorted = (consdata->nvars == 1);
1107 consdata->changed =
TRUE;
1126 if( consdata->catchevents )
1132 consdata->existmultaggr =
TRUE;
1147 if( consdata->row !=
NULL )
1152 consdata->merged =
FALSE;
1153 consdata->cliqueadded =
FALSE;
1176 var = consdata->vars[pos];
1196 if( consdata->catchevents )
1202 if( consdata->nvars == 1 )
1204 consdata->presolpropagated =
FALSE;
1209 if( consdata->row !=
NULL )
1215 if( pos != consdata->nvars - 1 )
1217 consdata->vars[pos] = consdata->vars[consdata->nvars-1];
1218 consdata->sorted =
FALSE;
1221 consdata->validsignature =
FALSE;
1222 consdata->changed =
TRUE;
1345 assert(consdata->nfixedones == 0);
1346 assert(consdata->nfixedzeros == 0);
1348 nvars = consdata->nvars;
1357 vars = consdata->vars;
1362 switch( setppctype )
1390 for( v = 0; v <
nvars; ++v )
1414 if( idx == -1 ||
objval < bestobjval )
1426 if (
objval * objsign >= 0.0 )
1439 if( idx == -1 || nposfixings == 0 )
1449 noldfixed = *nfixedvars;
1463 idx2 = 1 - indepidx;
1464 assert( 0 <= idx2 && idx2 < 2 );
1485 for( v =
nvars - 1; v >= 0; --v )
1511 if(
objval >= bestobjval )
1530 for( v =
nvars - 1; v >= 0; --v )
1619 assert(*nfixedvars >= noldfixed);
1622 if( *nfixedvars != noldfixed )
1662 if( consdata->nvars <= 1 )
1664 consdata->merged =
TRUE;
1668 assert(consdata->vars !=
NULL || consdata->nvars == 0);
1671 SCIPsortPtr((
void**)consdata->vars, SCIPvarCompActiveAndNegated, consdata->nvars);
1673 consdata->sorted =
FALSE;
1676 for( v = consdata->nvars - 1; v > 0; --v )
1686 var1 = consdata->vars[v];
1696 var2 = consdata->vars[v-1];
1712 if( negated1 != negated2 )
1722 for(
i = consdata->nvars - 1;
i >= 0; --
i )
1723 if(
i != v &&
i != (v-1) )
1728 SCIPdebugMsg(
scip,
"setppc constraint <%s>: infeasible fixing <%s> == 0\n",
1755 SCIPdebugMsg(
scip,
"setppc constraint <%s>: infeasible fixing <%s> == %g\n",
1771 consdata->changed =
TRUE;
1774 consdata->merged =
TRUE;
1808 consdata->existmultaggr =
FALSE;
1811 while( v < consdata->
nvars )
1815 var = consdata->vars[v];
1840 int consvarssize = 10;
1846 consvars[0] = repvar;
1852 if( requiredsize > consvarssize )
1854 consvarssize = requiredsize;
1859 assert(requiredsize <= consvarssize);
1861 assert(requiredsize == nconsvars);
1868 for( v2 = nconsvars - 1; v2 >= 0; --v2 )
1883 for( v2 = consdata->nvars - 1; v2 > v; --v2 )
1890 if( v2 == v && nconsvars == 0 )
1895 if( nfixedvars !=
NULL )
1901 for( v2 = consdata->nvars - 1; v2 >= 0; --v2 )
1903 if( consdata->vars[v2] !=
var )
1911 SCIPdebugMsg(
scip,
"setppc constraint <%s>: infeasible fixing <%s> == 0\n",
1947 for( v2 = nconsvars - 1; v2 >= 0; --v2 )
1969 size =
MAX(nconsvars, 1) + consdata->nvars - 1;
1975 nconsvars = consdata->nvars;
1978 for( k = consdata->nvars - 1; k >= 0; --k )
1980 consvars[k] = consdata->vars[k];
1990 if( requiredsize > size )
1992 size = requiredsize;
1997 assert(requiredsize <= size);
1999 assert(requiredsize == nconsvars);
2005 rhs = 1.0 - constant;
2009 lhs = 1.0 - constant;
2010 rhs = 1.0 - constant;
2015 lhs = 1.0 - constant;
2039 if( ndelconss !=
NULL && naddconss !=
NULL )
2086 consdata->existmultaggr =
FALSE;
2115 for( v = 0; v < consdata->nvars; ++v )
2152 for( v = 0; v < consdata->nvars && n < 2; ++v )
2194 oldnfixedvars = *nfixedvars;
2199 assert(consdata->nvars == 0 || consdata->vars !=
NULL);
2200 assert(0 <= consdata->nfixedzeros && consdata->nfixedzeros <= consdata->nvars);
2201 assert(0 <= consdata->nfixedones && consdata->nfixedones <= consdata->nvars);
2209 if( consdata->nfixedones == 1 )
2222 if( consdata->nfixedzeros < consdata->nvars - 1 )
2235 SCIPdebugMsg(
scip,
" -> fixing all other variables to zero in set packing/partitioning constraint <%s>\n",
2242 vars = consdata->vars;
2243 nvars = consdata->nvars;
2245 fixedonefound =
FALSE;
2247 for( v = 0; v <
nvars && consdata->nfixedones == 1; ++v )
2264 fixedonefound =
TRUE;
2270 assert(consdata->nfixedones >= 2 || (fixedonefound && *nfixedvars > oldnfixedvars));
2287 if( consdata->nfixedones >= 2 )
2311 else if( consdata->nfixedzeros == consdata->nvars )
2319 assert(consdata->nfixedones == 0);
2346 else if( consdata->nfixedzeros == consdata->nvars - 1 && consdata->nfixedones == 0 )
2373 vars = consdata->vars;
2374 nvars = consdata->nvars;
2375 for( v = 0; v <
nvars; ++v )
2382 SCIPdebugMsg(
scip,
" -> fixing remaining variable <%s> to one in set covering/partitioning constraint <%s>\n",
2393 assert(consdata->nfixedzeros == consdata->nvars - 1);
2394 assert(consdata->nfixedones == 1);
2400 assert(consdata->nfixedzeros + consdata->nfixedones <= consdata->nvars);
2424 vars = consdata->vars;
2425 nvars = consdata->nvars;
2428 for( v = 0; v <
nvars && sum < sumbound; ++v )
2438 absviol = sum - 1.0;
2440 switch( consdata->setppctype )
2485 switch( consdata->setppctype )
2528 if( consdata->row ==
NULL )
2563 if( consdata->nlrow ==
NULL )
2570 for(
i = 0;
i < consdata->nvars; ++
i )
2638 assert(consdata->nvars == 0 || consdata->vars !=
NULL);
2639 assert(0 <= consdata->nfixedzeros && consdata->nfixedzeros <= consdata->nvars);
2640 assert(0 <= consdata->nfixedones && consdata->nfixedones <= consdata->nvars);
2655 *reduceddom = (nfixedvars > 0);
2668 if( lpfeas && consdata->row !=
NULL )
2725 *reduceddom = (nfixedvars > 0);
2781 assert(consdata1->sorted);
2782 assert(consdata2->sorted);
2789 if( consdata1->nvars != consdata2->nvars )
2794 for(
i = 0;
i < consdata1->nvars; ++
i )
2797 if( consdata1->vars[
i] != consdata2->vars[
i] )
2827 assert(consdata->nvars > 0);
2835 assert(minidx >= 0 && minidx <= maxidx);
2837 return SCIPhashFour(consdata->nvars, minidx, mididx, maxidx);
2846 int*
const cliquepartition,
2849 int*
const nusefulconss,
2851 int*
const nfixedvars,
2852 int*
const naddconss,
2853 int*
const ndelconss,
2854 int*
const nchgcoefs,
2867 assert(cliquepartition !=
NULL || nbinvars == 0);
2868 assert(ncliques >= 0 && ncliques <= nbinvars);
2878 if( nbinvars == 0 || ncliques == 0 )
2885 if( ncliques == nbinvars )
2891 for(
c = 0;
c < ncliques - 1; ++
c )
2893 if( lastclqidx >= cliquepartition[
c] )
2904 for( v =
c; v < nbinvars - 1; ++v )
2906 if( cliquepartition[
c] == cliquepartition[v] )
2937 if( !
SCIPconsIsDeleted(cliquecons) && nadded - cliqueconsdata->nfixedzeros >= 2 )
2939 assert(cliqueconsdata->nfixedones == 0);
2942 usefulconss[*nusefulconss] = cliquecons;
2951 lastclqidx = cliquepartition[
c];
2967 int*
const nusefulconss,
2968 int*
const nfixedvars,
2969 int*
const ndelconss,
2970 int*
const nchgcoefs,
2978 int nlocaladdconss = 0;
2995 for(
c = nconss - 1;
c >= 0; --
c )
3014 assert(nlocaladdconss == 0);
3031 assert(consdata->nfixedones == 0);
3033 if( consdata->nvars == 0 )
3042 usefulconss[*nusefulconss] = cons;
3057 int const nusefulconss,
3059 int*
const nusefulvars,
3061 int*
const varnconss,
3062 int*
const maxnvarconsidx,
3063 int**
const varconsidxs,
3074 assert(usefulconss !=
NULL || nusefulconss == 0);
3083 if( nusefulconss == 0 )
3088 for(
c = nusefulconss - 1;
c >= 0; --
c )
3090 cons = usefulconss[
c];
3099 assert(consdata->merged);
3102 if( consdata->nvars > *maxnvars )
3103 *maxnvars = consdata->nvars;
3106 for( v = consdata->nvars - 1; v >= 0; --v )
3110 var = consdata->vars[v];
3124 usefulvars[*nusefulvars] =
var;
3126 varindex = *nusefulvars;
3143 if( varnconss[varindex] == maxnvarconsidx[varindex] )
3149 assert(varnconss[varindex] < maxnvarconsidx[varindex]);
3151 varconsidxs[varindex][varnconss[varindex]] =
c;
3153 ++(varnconss[varindex]);
3166 int*
const varnconss,
3167 int**
const varconsidxs
3187 for(
i = 0;
i < varnconss[varindex]; ++
i )
3189 if( varconsidxs[varindex][
i] == considx )
3191 varconsidxs[varindex][
i] = varconsidxs[varindex][varnconss[varindex] - 1];
3195 --(varnconss[varindex]);
3210 int*
const nusefulvars,
3212 int*
const varnconss,
3213 int*
const maxnvarconsidx,
3214 int**
const varconsidxs
3239 varindex = *nusefulvars;
3244 maxnvarconsidx[varindex] = 1;
3246 varnconss[varindex] = 0;
3253 if( varnconss[varindex] == maxnvarconsidx[varindex] )
3259 assert(varnconss[varindex] < maxnvarconsidx[varindex]);
3260 varconsidxs[varindex][varnconss[varindex]] = considx;
3263 ++(varnconss[varindex]);
3285 int*
const naggregations,
3288 int*
const saggregations,
3292 int*
const nfixedvars,
3293 int*
const naggrvars,
3294 int*
const ndelconss,
3317 if( consdata->presolpropagated )
3320 consdata->presolpropagated =
TRUE;
3322 vars = consdata->vars;
3323 nvars = consdata->nvars;
3349 if( consdata->nfixedones > 1 )
3365 SCIPdebugMsg(
scip,
"set partitioning / packing constraint <%s> is infeasible, %d variables fixed to one\n",
SCIPconsGetName(cons), consdata->nfixedones);
3371 if( consdata->nfixedones == 1 )
3381 for( v =
nvars - 1; v >= 0; --v )
3391 SCIPdebugMsg(
scip,
"setppc constraint <%s>: infeasible fixing <%s> == 0\n",
3422 if( consdata->nfixedzeros ==
nvars )
3424 assert(consdata->nfixedones == 0);
3448 if( consdata->nfixedzeros + 1 ==
nvars )
3450 assert(consdata->nfixedones == 0);
3460 for( v =
nvars - 1; v >= 0; --v )
3471 SCIPdebugMsg(
scip,
"setppc constraint <%s>: infeasible fixing <%s> == 1\n",
3502 for( v =
nvars - 1; v >= 0; --v )
3540 SCIPdebugMsg(
scip,
"set partitioning constraint <%s>: aggregate <%s> + <%s> == 1\n",
3574 if( *saggregations == *naggregations )
3577 assert(*saggregations > *naggregations);
3587 undoneaggrvars[2 * (*naggregations)] =
var;
3588 undoneaggrvars[2 * (*naggregations) + 1] =
vars[v];
3622 int const nusefulconss,
3624 int*
const nusefulvars,
3626 int*
const varnconss,
3627 int*
const maxnvarconsidx,
3628 int**
const varconsidxs,
3629 int*
const countofoverlapping,
3641 int*
const naggregations,
3642 int*
const saggregations,
3646 int*
const nfixedvars,
3647 int*
const naggrvars,
3648 int*
const nchgcoefs,
3649 int*
const ndelconss,
3674 assert(usefulconss !=
NULL && nusefulconss > 0);
3675 assert(0 <= considx && considx < nusefulconss);
3676 assert(usefulconss[considx] == cons);
3677 assert(0 <= endidx && endidx <= nusefulconss);
3696 nvars = consdata->nvars;
3701 vars = consdata->vars;
3704 oldnfixedzeros = consdata->nfixedzeros;
3705 overlapdestroyed =
FALSE;
3708 for(
c = endidx - 1;
c >= 0; --
c )
3710 cons1 = usefulconss[
c];
3719 assert(usefulconss[
c] != cons);
3722 oldnaggrvars = *naggrvars;
3728 SCIP_CALL(
presolvePropagateCons(
scip, cons1,
FALSE, undoneaggrvars, undoneaggrtypes, naggregations, saggregations, nfixedvars, naggrvars, ndelconss,
cutoff) );
3734 assert(*naggrvars == oldnaggrvars);
3742 nvars1 = consdata1->nvars;
3748 assert(countofoverlapping[
c] <= nvars1);
3751 assert(consdata1->nfixedones == 0);
3756 if( !overlapdestroyed && countofoverlapping[
c] ==
nvars - consdata->nfixedzeros )
3760 if(
nvars - consdata->nfixedzeros < nvars1 )
3768 assert(consdata->merged);
3769 assert(consdata1->merged);
3771 vars1 = consdata1->vars;
3777 consdata1->sorted =
FALSE;
3780 for( v =
nvars - 1, v1 = nvars1 - 1; v >= 0 && v1 >= 0; )
3835 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]));
3856 assert(negated0 == negated1);
3863 for( ; v1 >= 0; --v1)
3868 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]));
3923 else if( (!overlapdestroyed && countofoverlapping[
c] + consdata1->nfixedzeros == nvars1) || countofoverlapping[
c] == nvars1 )
3928 const int oldnfixedvars = *nfixedvars;
3934 assert(consdata->merged);
3935 assert(consdata1->merged);
3937 vars1 = consdata1->vars;
3942 consdata1->sorted =
FALSE;
3945 for( v =
nvars - 1, v1 = nvars1 - 1; v >= 0 && v1 >= 0; )
4025 assert(negated0 == negated1);
4076 if( oldnfixedvars < *nfixedvars )
4077 overlapdestroyed =
TRUE;
4107 assert(consdata->merged);
4108 assert(consdata1->merged);
4110 vars1 = consdata1->vars;
4115 consdata1->sorted =
FALSE;
4118 for( v =
nvars - 1, v1 = nvars1 - 1; v >= 0 && v1 >= 0; )
4168 if( aggvar2 !=
NULL )
4177 aggvar2 = vars1[v1];
4179 if( aggvar1 !=
NULL )
4189 if( negated0 != negated1 )
4205 if( aggvar1 ==
NULL && aggvar2 ==
NULL )
4209 if( aggvar2 ==
NULL )
4211 for( ; v1 >= 0; --v1)
4216 aggvar2 = vars1[v1];
4221 else if( aggvar1 ==
NULL )
4235 if( aggvar1 ==
NULL || aggvar2 ==
NULL )
4241 if( *saggregations == *naggregations )
4244 assert(*saggregations > *naggregations);
4253 undoneaggrtypes[*naggregations] =
TRUE;
4254 undoneaggrvars[2 * (*naggregations)] = aggvar1;
4255 undoneaggrvars[2 * (*naggregations) + 1] = aggvar2;
4285 int constochangeidx;
4287 const int oldnchgcoefs = *nchgcoefs;
4295 assert(consdata->merged);
4296 assert(consdata1->merged);
4299 SCIPsortDownPtr((
void**)(consdata1->vars), SCIPvarCompActiveAndNegated, nvars1);
4301 consdata1->sorted =
FALSE;
4307 varstochange = consdata1->vars;
4308 nvarstostay =
nvars;
4309 nvarstochange = nvars1;
4311 constochange = cons1;
4312 consdatachange = consdata1;
4313 constochangeidx =
c;
4317 varstostay = consdata1->vars;
4318 varstochange =
vars;
4319 nvarstostay = nvars1;
4320 nvarstochange =
nvars;
4322 constochange = cons;
4323 consdatachange = consdata;
4324 constochangeidx = considx;
4332 for( v = nvarstostay - 1, v1 = nvarstochange - 1; v >= 0 && v1 >= 0; )
4353 var = varstostay[v];
4366 var1 = varstochange[v1];
4380 addvar = varstostay[v];
4393 if( negated0 != negated1 )
4412 SCIP_CALL(
presolvePropagateCons(
scip, constostay,
FALSE,
NULL,
NULL,
NULL,
NULL, nfixedvars, naggrvars, ndelconss,
cutoff) );
4433 assert(*nchgcoefs - oldnchgcoefs == countofoverlapping[
c]);
4436 if( addvar ==
NULL )
4446 addvar = varstostay[v];
4462 consdatachange->merged =
TRUE;
4463 assert(constochangeidx == (cons == constochange ? considx :
c));
4487 int*
const nusefulvars,
4494 int*
const varnconss,
4495 int*
const maxnvarconsidx,
4496 int**
const varconsidxs,
4504 int*
const nfixedvars,
4505 int*
const ndelconss,
4543 nvars = consdata->nvars;
4550 vars = consdata->vars;
4556 for( v =
nvars - 1; v >= 0 && v1 >= 0; )
4584 assert(consdata->merged);
4587 if( (*cliquevalues)[v] )
4598 var1 = usefulvars[v1];
4623 for( k =
nvars - 1; k >= 0; --k )
4631 if( (*cliquevalues)[k] )
4654 if( value != (*cliquevalues)[v] )
4662 for( k =
nvars - 1; k >= 0; --k )
4671 if( k == nottocheck )
4674 if( (*cliquevalues)[k] )
4705 if( nottocheck >= 0 )
4709 assert(consdata->merged);
4712 for( k = consdata->nvars - 1; k >= 0; --k )
4721 if( k != nottocheck )
4759 SCIPdebugMsg(
scip,
" -> deleting constraint <%s> number <%d> due to active and negated variable in the same clique constraint\n",
SCIPconsGetName(cons), arraypos);
4769 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]));
4791 addvar = usefulvars[v1 + 1];
4800 consdata->merged =
TRUE;
4812 vars = consdata->vars;
4813 nvars = consdata->nvars;
4818 if( (*maxnvars) <
nvars )
4820 while( (*maxnvars) <
nvars )
4835 for( ; v1 >= 0; --v1)
4843 var1 = usefulvars[v1];
4857 for( k =
nvars - 1; k >= 0; --k )
4866 if( (*cliquevalues)[k] )
4888 SCIPdebugMsg(
scip,
"trying to fix <%s> to 0 because this variable is in the same clique with a set partition\n",
SCIPvarGetName(usefulvars[v1]));
4910 addvar = usefulvars[v1];
4919 consdata->merged =
TRUE;
4931 vars = consdata->vars;
4932 nvars = consdata->nvars;
4937 if( (*maxnvars) <
nvars )
4939 while( (*maxnvars) <
nvars )
4963 int const naggregations,
4964 int*
const naggrvars,
4978 assert(naggregations > 0);
4983 for(
a = 0;
a < naggregations; ++
a )
4985 var1 = undoneaggrvars[2 *
a];
4986 var2 = undoneaggrvars[2 *
a + 1];
4996 SCIP_CALL( conshdlrdataDecVaruses(
scip, conshdlrdata, var1) );
4997 SCIP_CALL( conshdlrdataDecVaruses(
scip, conshdlrdata, var2) );
5001 if( undoneaggrtypes[
a] )
5024 SCIP_CALL( conshdlrdataIncVaruses(
scip, conshdlrdata, var1) );
5025 SCIP_CALL( conshdlrdataIncVaruses(
scip, conshdlrdata, var2) );
5043 int*
const firstchange,
5044 int*
const firstclique,
5045 int*
const lastclique,
5046 int*
const nfixedvars,
5047 int*
const naggrvars,
5048 int*
const ndelconss,
5049 int*
const nchgcoefs,
5060 int* maxnvarconsidx;
5061 int* countofoverlapping =
NULL;
5105 susefulvars = 2 *
nvars;
5111 saggregations =
nvars;
5129 startndelconss = *ndelconss;
5133 if( conshdlrdata->nclqpresolve == 0 && conshdlrdata->addvariablesascliques )
5137 int* cliquepartition;
5164 nrounds, nfixedvars, &naddconss, ndelconss, nchgcoefs,
cutoff) );
5169 *ndelconss -= naddconss;
5189 if( nusefulconss <= 1 )
5202 SCIP_CALL(
collectCliqueData(
scip, usefulconss, nusefulconss, usefulvars, &nusefulvars, vartoindex, varnconss, maxnvarconsidx, varconsidxs, &maxnvars) );
5211 SCIPsortDownPtr((
void**)usefulvars, SCIPvarCompActiveAndNegated, nusefulvars);
5222 int cons0fixedzeros;
5225 const int oldnaggrvars = *naggrvars;
5227 cons0 = usefulconss[
c];
5235 SCIP_CALL(
presolvePropagateCons(
scip, cons0,
FALSE, undoneaggrvars, undoneaggrtypes, &naggregations, &saggregations, nfixedvars, naggrvars, ndelconss,
cutoff) );
5241 assert(*naggrvars == oldnaggrvars);
5250 cons0vars = consdata->vars;
5251 ncons0vars = consdata->nvars;
5254 SCIPsortDownPtr((
void**)cons0vars, SCIPvarCompActiveAndNegated, ncons0vars);
5256 consdata->sorted =
FALSE;
5259 assert(maxnvars >= ncons0vars);
5265 for( v = ncons0vars - 1; v >= 0 ; --v )
5267 var0 = cons0vars[v];
5276 for( v1 = varnconss[varindex] - 1; v1 >= 0 ; --v1 )
5277 ++(countofoverlapping[varconsidxs[varindex][v1]]);
5280 oldnchgcoefs = *nchgcoefs;
5281 cons0fixedzeros = consdata->nfixedzeros;
5287 varnconss, maxnvarconsidx, varconsidxs, countofoverlapping, conshdlrdata->cliqueshrinking, &chgcons0,
5288 undoneaggrvars, undoneaggrtypes, &naggregations, &saggregations,
5289 nfixedvars, naggrvars, nchgcoefs, ndelconss,
cutoff) );
5295 assert(*naggrvars == oldnaggrvars);
5298 if( chgcons0 && *nchgcoefs > oldnchgcoefs )
5303 cons0vars = consdata->vars;
5304 ncons0vars = consdata->nvars;
5307 SCIPsortDownPtr((
void**)cons0vars, SCIPvarCompActiveAndNegated, ncons0vars);
5309 consdata->sorted =
FALSE;
5313 if( consdata->nfixedones > 0 || consdata->nfixedzeros > cons0fixedzeros )
5318 SCIP_CALL(
presolvePropagateCons(
scip, cons0,
FALSE, undoneaggrvars, undoneaggrtypes, &naggregations, &saggregations, nfixedvars, naggrvars, ndelconss,
cutoff) );
5324 assert(*naggrvars == oldnaggrvars);
5341 v1 = nusefulvars - 1;
5345 if( conshdlrdata->nclqpresolve > 0 )
5346 v1 = nusefulvars - 1;
5350 (void)
SCIPsortedvecFindDownPtr((
void**)usefulvars, SCIPvarCompActiveAndNegated, (
void*)cons0vars[ncons0vars - 1], nusefulvars, &v1);
5351 assert(v1 >= 0 && v1 < nusefulvars);
5359 assert(maxnvars >= ncons0vars);
5361 for( v = ncons0vars - 1; v >= 0; --v )
5376 maxnvarconsidx, varconsidxs, &maxnvars, &nadded, &chgcons0, nfixedvars, ndelconss,
cutoff) );
5389 *firstchange =
MIN(*firstchange,
c);
5390 *firstclique =
MIN(*firstclique,
c);
5391 *lastclique =
MAX(*lastclique,
c);
5395 cons0vars = consdata->vars;
5396 ncons0vars = consdata->nvars;
5401 SCIPsortDownPtr((
void**)cons0vars, SCIPvarCompActiveAndNegated, ncons0vars);
5403 consdata->sorted =
FALSE;
5408 for( v = ncons0vars - 1; v >= 0 ; --v )
5410 var0 = cons0vars[v];
5419 for(
i = varnconss[varindex] - 1;
i >= 0 ; --
i )
5420 ++(countofoverlapping[varconsidxs[varindex][
i]]);
5427 usefulconss, nusefulconss, usefulvars, &nusefulvars, vartoindex, varnconss, maxnvarconsidx, varconsidxs,
5428 countofoverlapping, conshdlrdata->cliqueshrinking, &chgcons0,
5429 undoneaggrvars, undoneaggrtypes, &naggregations, &saggregations,
5430 nfixedvars, naggrvars, nchgcoefs, ndelconss,
cutoff) );
5436 assert(*naggrvars == oldnaggrvars);
5447 for(
c = nusefulvars;
c > 0; --
c )
5449 if( varconsidxs[
c] !=
NULL )
5474 if( *ndelconss < startndelconss )
5475 *ndelconss = startndelconss;
5502 assert(firstclique >= 0);
5503 assert(lastclique <= nconss);
5504 assert(conss !=
NULL || ((nconss == 0) && (lastclique == 0)));
5507 for(
c = firstclique;
c < lastclique; ++
c )
5518 *nchgbds += nlocalbdchgs;
5529 if( !consdata->cliqueadded && consdata->nvars >= 2 )
5536 *nchgbds += nlocalbdchgs;
5549 *nchgbds += nlocalbdchgs;
5557 consdata->cliqueadded =
TRUE;
5588 if( !linearconshdlrexist &&
nvars > 2 )
5590 *infeasible =
FALSE;
5591 *aggregated =
FALSE;
5600 else if( pos ==
nvars - 1 )
5612 for( v =
nvars - 2; v >= 0; --v )
5615 SCIPdebugMsg(
scip,
"multi-aggregating binary variable <%s> (locks: [%d,%d]; to %d variables)\n",
5625 if( pos != 0 && pos !=
nvars - 1 )
5700 int posreplacements = 0;
5702 int nhashmapentries;
5724 for( v = nposbinvars - 1; v >= 0; --v )
5733 if( (nuplocks == 1 && ndownlocks <= 1) || (nuplocks <= 1 && ndownlocks == 1) || (nuplocks <= 2 && ndownlocks <= 2 &&
SCIPvarGetNegatedVar(binvars[v]) !=
NULL) )
5738 SCIPdebugMsg(
scip,
"found %d binary variables for possible multi-aggregation\n", nposvars);
5755 SCIPsortPtr((
void**)usefulconss, setppcConssSort2, nconss);
5757 nhashmapentries = 0;
5761 assert(!donotaggr || !donotmultaggr);
5769 for(
c = 0;
c < nconss; ++
c )
5779 cons = usefulconss[
c];
5817 oldnfixedvars = *nfixedvars;
5828 if( oldnfixedvars < *nfixedvars )
5833 assert(nlocaladdconss == 0);
5841 if( consdata->nvars < 2 )
5859 if( consdata->nvars == 0 )
5893 var = consdata->vars[0];
5901 if( nuplocks == 1 &&
objval <= 0 )
5925 var = consdata->vars[1];
5933 if( nuplocks == 1 &&
objval <= 0 )
5983 if( ndecs >= nposvars )
5991 assert(nposbinvars >= consdata->nvars);
5999 for( v = consdata->nvars - 1; v >= 0; --v )
6009 assert(nuplocks >= 1 && ndownlocks >= 0);
6013 assert(nuplocks == 1 && ndownlocks <= 1);
6016 if( ndownlocks == 0 )
6076 considxs[nhashmapentries - 1] =
c;
6077 posincons[nhashmapentries - 1] = v;
6087 assert(image > 0 && image <= nhashmapentries);
6089 consindex = considxs[image - 1];
6090 assert(0 <= consindex && consindex < nconss);
6099 assert(posreplacements >= 0);
6101 varindex = posincons[image - 1];
6102 considxs[image - 1] = -1;
6103 posincons[image - 1] = -1;
6118 multaggridx = consindex;
6130 if( (
objval < 0.0) == (multaggridx ==
c) )
6134 aggrallyindex = consindex;
6140 if( varindex >= aggrconsdata->nvars || aggrconsdata->vars[varindex] != negvar )
6147 assert(aggrconsdata->nvars >= 2);
6149 for( v2 = aggrconsdata->nvars - 1; v2 >= 0; --v2 )
6151 if( aggrconsdata->vars[v2] == negvar )
6160 assert(aggrconsdata->vars[varindex] == negvar);
6163 aggrconsindex = consindex;
6223 assert(image > 0 && image <= nhashmapentries);
6225 assert(0 <= considxs[image - 1] && considxs[image - 1] < nconss);
6228 considxs[image - 1] = -1;
6229 posincons[image - 1] = -1;
6236 assert(posreplacements >= 0);
6250 considxs[nhashmapentries - 1] =
c;
6251 posincons[nhashmapentries - 1] = v;
6273 if( ndownlocks >= 2 )
6286 assert(image > 0 && image <= nhashmapentries);
6288 consindex = considxs[image - 1];
6289 assert(0 <= consindex && consindex < nconss);
6298 assert(posreplacements >= 0);
6300 varindex = posincons[image - 1];
6301 considxs[image - 1] = -1;
6302 posincons[image - 1] = -1;
6316 assert(!dualpresolvingenabled || nuplocks + ndownlocks > 2);
6324 if( chgtype[consindex] )
6332 for( v2 = aggrconsdata->nvars - 1; v2 >= 0; --v2 )
6334 if( aggrconsdata->vars[v2] == negvar )
6341 SCIPdebugMsg(
scip,
"multi-aggregating in one set-partitioning or one set-packing constraint\n");
6345 aggrallyindex = consindex;
6357 SCIPdebugMsg(
scip,
"multi-aggregating in two set-partitioning or one set-partitioning and -packing constraint\n");
6361 if( varindex >= aggrconsdata->nvars || aggrconsdata->vars[varindex] != negvar )
6368 assert(aggrconsdata->nvars >= 2);
6370 for( v2 = aggrconsdata->nvars - 1; v2 >= 0; --v2 )
6372 if( aggrconsdata->vars[v2] == negvar )
6381 assert(aggrconsdata->vars[varindex] == negvar);
6384 aggrconsindex = consindex;
6403 assert(aggrconsindex >= 0);
6405 assert(aggrallyindex >= 0);
6407 cons = usefulconss[aggrallyindex];
6427 for( v = aggrconsdata->nvars - 1; v >= 0; --v )
6435 considxs[image - 1] = aggrallyindex;
6436 posincons[image - 1] = 0;
6494 hashtablesize = nconss;
6497 hashGetKeySetppccons, hashKeyEqSetppccons, hashKeyValSetppccons, (
void*)
scip) );
6500 for(
c = 0;
c < nconss; ++
c )
6529 assert(consdata0->nvars >= 1 && consdata0->nvars == consdata1->nvars);
6531 assert(consdata0->sorted && consdata1->sorted);
6532 assert(consdata0->vars[0] == consdata1->vars[0]);
6534 SCIPdebugMsg(
scip,
"setppc constraints <%s> and <%s> have identical variable sets\n",
6585 SCIPdebugMsg(
scip,
" -> removing setppc constraint <%s> which is redundant to <%s>\n",
6625 assert(consdata0->nvars < consdata1->nvars);
6626 assert(consdata0->sorted);
6627 assert(consdata1->sorted);
6630 for( v0 = 0, v1 = 0; v0 < consdata0->nvars && !(*cutoff); ++v0, ++v1 )
6636 for( ;
SCIPvarGetIndex(consdata1->vars[v1]) < index0 && !(*cutoff); ++v1 )
6653 for( ; v1 < consdata1->nvars && !(*cutoff); ++v1 )
6657 assert(consdata0->nvars == 0
6699 assert(consdata0->nvars < consdata1->nvars);
6700 assert(consdata0->sorted);
6701 assert(consdata1->sorted);
6703 switch( consdata0->setppctype )
6706 switch( consdata1->setppctype )
6731 switch( consdata1->setppctype )
6754 switch( consdata1->setppctype )
6803 uint64_t signature0;
6817 cons0 = conss[chkind];
6823 assert(consdata0->nvars >= 1);
6832 cons0changed = consdata0->changed;
6833 consdata0->changed =
FALSE;
6834 for(
c = (cons0changed ? 0 : firstchange);
c < chkind && !(*cutoff) &&
SCIPconsIsActive(cons0); ++
c )
6838 uint64_t signature1;
6839 uint64_t jointsignature;
6861 jointsignature = (signature0 | signature1);
6862 if( jointsignature != signature0 && jointsignature != signature1 )
6866 cons0iscontained = (consdata0->nvars <= consdata1->nvars);
6867 cons1iscontained = (consdata1->nvars <= consdata0->nvars);
6870 while( v0 < consdata0->
nvars && v1 < consdata1->
nvars )
6877 if( index0 < index1 )
6879 cons0iscontained =
FALSE;
6880 if( !cons1iscontained )
6882 for( v0++; v0 < consdata0->nvars &&
SCIPvarGetIndex(consdata0->vars[v0]) < index1; v0++ )
6885 else if( index1 < index0 )
6887 cons1iscontained =
FALSE;
6888 if( !cons0iscontained )
6890 for( v1++; v1 < consdata1->nvars &&
SCIPvarGetIndex(consdata1->vars[v1]) < index0; v1++ )
6899 cons0iscontained = cons0iscontained && (v0 == consdata0->nvars);
6900 cons1iscontained = cons1iscontained && (v1 == consdata1->nvars);
6902 if( cons0iscontained && cons1iscontained )
6904 SCIPdebugMsg(
scip,
"setppc constraints <%s> and <%s> have identical variable sets\n",
6910 if( consdata0->setppctype == consdata1->setppctype )
6939 else if( cons0iscontained )
6947 else if( cons1iscontained )
6981 for(
i = 0;
i < nconss;
i++ )
6986 if( consdata->varsdeleted )
6989 for( v = consdata->nvars - 1; v >= 0; v-- )
6996 consdata->varsdeleted =
FALSE;
7026 SCIPdebugMsg(
scip,
"Enforcing %d set partitioning / packing / covering constraints for %s solution\n", nconss,
7027 sol ==
NULL ?
"LP" :
"relaxation");
7036 for(
c = 0;
c < nusefulconss && !
cutoff && !reduceddom; ++
c )
7042 for(
c = nusefulconss;
c < nconss && !
cutoff && !separated && !reduceddom; ++
c )
7063 else if( separated )
7065 else if( reduceddom )
7119 if( conshdlr ==
NULL )
7121 SCIPerrorMessage(
"set partitioning / packing / covering constraint handler not found\n");
7149 SCIP_CALL(
SCIPcreateCons(
scip, cons, name, conshdlr, consdata, initial,
separate, enforce, check,
propagate,
7150 local, modifiable, dynamic, removable, stickingatnode) );
7157 ++(conshdlrdata->nsetpart);
7158 assert(conshdlrdata->nsetpart >= 0);
7214 assert(mult == +1 || mult == -1);
7220 for( v = 0; v <
nvars; ++v )
7222 if( mult * vals[v] > 0.0 )
7223 transvars[v] =
vars[v];
7233 initial,
separate, enforce, check,
propagate, local, modifiable, dynamic, removable, stickingatnode) );
7264 if( nposbin + nnegbin + nposimplbin + nnegimplbin ==
nvars && ncoeffspone + ncoeffsnone ==
nvars )
7273 mult =
SCIPisEQ(
scip, lhs, 1.0 - ncoeffsnone) ? +1 : -1;
7340 int nbilinexprterms;
7358 if( nvarexprs != 2 )
7384 if( nbilinexprterms != 1 )
7388 if( nquadexprs != 2 )
7406 coefx = lincoef + sqrcoef;
7409 coefy = lincoef + sqrcoef;
7495 nlocvars = consdata->nvars;
7500 for(
i = 0;
i < consdata->nvars; ++
i )
7502 vars[
i] = consdata->vars[
i];
7511 rhs = 1.0 - constant;
7513 lhs = 1.0 - constant;
7518 rhs = 1.0 - constant;
7519 lhs = 1.0 - constant;
7523 cons, lhs, rhs, success) );
7589 conshdlrdata->noldfixedvars = 0;
7590 conshdlrdata->noldimpls = 0;
7591 conshdlrdata->noldcliques = 0;
7592 conshdlrdata->noldupgrs = 0;
7593 conshdlrdata->nclqpresolve = 0;
7594 conshdlrdata->updatedsetppctype =
FALSE;
7595 conshdlrdata->enablecliquelifting =
TRUE;
7610 for(
c = 0;
c < nconss; ++
c )
7630 for(
c = 0;
c < nconss; ++
c )
7647 for(
c = 0;
c < nconss; ++
c )
7652 if( consdata->row !=
NULL )
7657 if( consdata->nlrow !=
NULL )
7686 --(conshdlrdata->nsetpart);
7687 assert(conshdlrdata->nsetpart >= 0);
7743 ++(conshdlrdata->nsetpart);
7744 assert(conshdlrdata->nsetpart >= 0);
7760 *infeasible =
FALSE;
7762 for(
c = 0;
c < nconss && !(*infeasible); ++
c )
7787 SCIPdebugMsg(
scip,
"separating %d/%d set partitioning / packing / covering constraints\n", nusefulconss, nconss);
7796 for(
c = 0;
c < nusefulconss && !
cutoff; ++
c )
7807 else if( reduceddom )
7809 else if( separated )
7831 SCIPdebugMsg(
scip,
"separating %d/%d set partitioning / packing / covering constraints\n", nusefulconss, nconss);
7840 for(
c = 0;
c < nusefulconss && !
cutoff; ++
c )
7851 else if( reduceddom )
7853 else if( separated )
7893 varuses = conshdlrdata->varuses;
7901 assert(MINBRANCHWEIGHT <= MAXBRANCHWEIGHT);
7915 for( j = nsortcands; j > 0 && numuses > uses[j-1]; --j )
7917 sortcands[j] = sortcands[j-1];
7918 uses[j] = uses[j-1];
7920 assert(0 <= j && j <= nsortcands);
7931 if( nsortcands > 0 )
7944 for( nselcands = 0; nselcands < nsortcands; ++nselcands )
7948 branchweight += solval;
7951 if( branchweight > MAXBRANCHWEIGHT )
7958 minprio =
MIN(minprio, tmp);
7960 minestzero =
MIN(minestzero, tmp);
7962 minestone =
MIN(minestone, tmp);
7968 branchweight -= solval;
7971 if( MINBRANCHWEIGHT <= branchweight && branchweight <= MAXBRANCHWEIGHT )
7980 for(
i = 0;
i < nselcands; ++
i )
7987 if( nselcands == 1 )
8011 for(
i = 0;
i < nselcands; ++
i )
8045 int maxnbranchcands;
8060 if( conshdlrdata->npseudobranches <= 1 )
8065 if( npseudocands == 0 )
8068 varuses = conshdlrdata->varuses;
8072 maxnbranchcands = conshdlrdata->npseudobranches-1;
8073 assert(maxnbranchcands >= 1);
8081 for(
i = 0;
i < npseudocands; ++
i )
8087 if( nbranchcands < maxnbranchcands || uses > canduses[nbranchcands-1] )
8089 for( j =
MIN(nbranchcands, maxnbranchcands-1); j > 0 && uses > canduses[j-1]; --j )
8091 branchcands[j] = branchcands[j-1];
8092 canduses[j] = canduses[j-1];
8094 assert(0 <= j && j <= nbranchcands && j < maxnbranchcands);
8095 branchcands[j] =
var;
8097 if( nbranchcands < maxnbranchcands )
8102 assert(nbranchcands <= maxnbranchcands);
8107 if( nbranchcands > 0 )
8118 for(
i = 0;
i < nbranchcands; ++
i )
8121 minestzero =
MIN(minestzero, tmp);
8130 for(
i = 0;
i < nbranchcands; ++
i )
8134 for( j = 0; j <
i; ++j )
8142 for(
i = 0;
i < nbranchcands; ++
i )
8155 SCIPdebugMsg(
scip,
"branched on pseudo solution: %d children\n", nchildren);
8215 SCIPdebugMsg(
scip,
"pseudo enforcing %d set partitioning / packing / covering constraints\n", nconss);
8225 for(
c = 0;
c < nconss && !
cutoff && !reduceddom && !solvelp; ++
c )
8232 else if( reduceddom )
8236 else if( infeasible )
8288 for( v = 0; v < consdata->nvars; ++v )
8323 SCIPdebugMsg(
scip,
"propagating %d/%d set partitioning / packing / covering constraints\n", nmarkedconss, nconss);
8329 for(
c = nmarkedconss - 1;
c >= 0 && !
cutoff; --
c )
8339 int naddconss, ndelconss;
8344 naddconss = ndelconss = 0;
8362 else if( nfixedvars > 0 )
8392 oldnfixedvars = *nfixedvars;
8393 oldndelconss = *ndelconss;
8394 oldnaggrvars = *naggrvars;
8395 oldnchgcoefs = *nchgcoefs;
8402 conshdlrdata->enablecliquelifting = conshdlrdata->enablecliquelifting || conshdlrdata->updatedsetppctype
8404 || conshdlrdata->noldcliques !=
SCIPgetNCliques(
scip) || conshdlrdata->noldupgrs != nconss;
8407 startdelconss = *ndelconss;
8410 conshdlrdata->updatedsetppctype =
FALSE;
8413 firstchange = INT_MAX;
8414 firstclique = INT_MAX;
8431 if( consdata->nfixedzeros > 0 || nnewaggrvars > 0 || nnewaddconss > 0 || nnewupgdconss > 0
8467 if( consdata->nfixedzeros > 0 )
8484 SCIP_CALL(
presolvePropagateCons(
scip, cons,
TRUE,
NULL,
NULL,
NULL,
NULL, nfixedvars, naggrvars, ndelconss, &
cutoff) );
8497 if( consdata->nfixedzeros > 0 )
8522 if( firstchange == INT_MAX && consdata->changed )
8526 if( !consdata->cliqueadded && consdata->nvars >= 2 )
8528 if( firstclique == INT_MAX )
8535 if( oldnfixedvars < *nfixedvars || oldnaggrvars < *naggrvars || oldndelconss < *ndelconss || oldnchgcoefs < *nchgcoefs )
8538 if( firstchange < nconss && conshdlrdata->presolusehashing )
8542 if( oldndelconss < *ndelconss )
8556 naggrvars, ndelconss, nchgcoefs, nchgsides, &
cutoff) );
8563 else if( oldnfixedvars < *nfixedvars || oldnaggrvars < *naggrvars || oldndelconss < *ndelconss )
8579 firstclique = nconss;
8584 &lastclique, nfixedvars, naggrvars, ndelconss, nchgcoefs, &
cutoff) );
8585 ++(conshdlrdata->nclqpresolve);
8592 else if( oldnfixedvars < *nfixedvars || oldnaggrvars < *naggrvars || oldndelconss < *ndelconss || oldnchgcoefs < *nchgcoefs )
8596 conshdlrdata->noldfixedvars = *nfixedvars + *naggrvars;
8597 conshdlrdata->enablecliquelifting =
FALSE;
8603 if( conshdlrdata->presolpairwise )
8607 oldnfixedvars = *nfixedvars;
8628 oldndelconss = *ndelconss;
8629 oldnfixedvars = *nfixedvars;
8630 npaircomparisons = 0;
8645 conshdlrdata->noldupgrs = nconss - (*ndelconss - startdelconss);
8668 SCIPdebugMsg(
scip,
"conflict resolving method of set partitioning / packing / covering constraint handler\n");
8682 confvarfound =
FALSE;
8684 for( v = 0; v < consdata->nvars; ++v )
8686 if( consdata->vars[v] != infervar )
8696 confvarfound =
TRUE;
8709 if( inferinfo >= 0 )
8716 for( v = 0; v < consdata->nvars; ++v )
8746 switch( consdata->setppctype )
8749 nlocksdown = nlockspos + nlocksneg;
8750 nlocksup = nlockspos + nlocksneg;
8753 nlocksdown = nlocksneg;
8754 nlocksup = nlockspos;
8757 nlocksdown = nlockspos;
8758 nlocksup = nlocksneg;
8765 for(
i = 0;
i < consdata->nvars; ++
i )
8783 SCIPdebugMsg(
scip,
"activation information for set partitioning / packing / covering constraint <%s>\n",
8792 if( consdata->nfixedones >= 1 || consdata->nfixedzeros >= consdata->nvars - 1 )
8822 SCIPdebugMsg(
scip,
"deactivation information for set partitioning / packing / covering constraint <%s>\n",
8898 const char* consname;
8917 if( conshdlrdata->copytypedcons )
8947 initial,
separate, enforce, check,
propagate, local, modifiable, dynamic, removable, stickingatnode) );
8951 initial,
separate, enforce, check,
propagate, local, modifiable, dynamic, removable, stickingatnode) );
8955 initial,
separate, enforce, check,
propagate, local, modifiable, dynamic, removable, stickingatnode) );
8998 lhs, rhs, varmap, consmap,
8999 initial,
separate, enforce, check,
propagate, local, modifiable, dynamic, removable, stickingatnode, global,
valid) );
9045 if( *success && requsize > coefssize )
9048 coefssize = requsize;
9053 assert(!*success || requsize <= coefssize);
9076 initial,
separate, enforce, check,
propagate, local, modifiable, dynamic, removable, stickingatnode) );
9080 initial,
separate, enforce, check,
propagate, local, modifiable, dynamic, removable, stickingatnode) );
9084 initial,
separate, enforce, check,
propagate, local, modifiable, dynamic, removable, stickingatnode) );
9108 if( varssize < consdata->
nvars )
9130 (*nvars) = consdata->nvars;
9184 consdata->nfixedones++;
9187 consdata->nfixedones--;
9190 consdata->nfixedzeros++;
9193 consdata->nfixedzeros--;
9196 consdata->varsdeleted =
TRUE;
9199 if( consdata->merged )
9209 consdata->merged =
FALSE;
9212 if( !consdata->existmultaggr )
9218 consdata->existmultaggr =
TRUE;
9225 assert(0 <= consdata->nfixedzeros && consdata->nfixedzeros <= consdata->nvars);
9226 assert(0 <= consdata->nfixedones && consdata->nfixedones <= consdata->nvars);
9230 if( consdata->nfixedones >= 1 || consdata->nfixedzeros >= consdata->nvars - 1 )
9232 consdata->presolpropagated =
FALSE;
9237 consdata->presolpropagated =
FALSE;
9262 assert(bdchginfos !=
NULL || nbdchginfos == 0);
9277 if( nbdchginfos == 2 )
9322 SCIPdebugMsg(
scip,
"new clique of conflict constraint %s led to %d fixings\n", consname, ncliquebdchgs);
9326 SCIPdebugMsg(
scip,
"new clique of conflict constraint %s led to infeasibility\n", consname);
9340 for(
i = 0;
i < nbdchginfos; ++
i )
9357 if(
i == nbdchginfos )
9396 eventExecSetppc,
NULL) );
9400 conflictExecSetppc,
NULL) );
9408 consEnfolpSetppc, consEnfopsSetppc, consCheckSetppc, consLockSetppc,
9441 if( conshdlrdata->conshdlrlinear !=
NULL )
9455 "number of children created in pseudo branching (0: disable pseudo branching)",
9459 "should pairwise constraint comparison be performed in presolving?",
9463 "should hash table be used for detecting redundant constraints in advance",
9467 "should dual presolving steps be performed?",
9471 " should we try to lift variables into other clique constraints, fix variables, aggregate them, and also shrink the amount of variables in clique constraints",
9475 "should we try to generate extra cliques out of all binary variables to maybe fasten redundant constraint detection",
9479 "should we try to shrink the number of variables in a clique constraints, by replacing more than one variable by only one",
9483 "should setppc constraints be copied as setppc instead of as linear constraints?",
9525 initial,
separate, enforce, check,
propagate, local, modifiable, dynamic, removable, stickingatnode);
9583 initial,
separate, enforce, check,
propagate, local, modifiable, dynamic, removable, stickingatnode);
9641 initial,
separate, enforce, check,
propagate, local, modifiable, dynamic, removable, stickingatnode);
9697 return consdata->nvars;
9715 return consdata->vars;
9751 if( consdata->row !=
NULL )
9772 if( consdata->row !=
NULL )
9795 return consdata->row;
9817 switch( consdata->setppctype )
9859 return consdata->nfixedones;
9878 return consdata->nfixedzeros;
9898 if( conshdlr ==
NULL )
9905 *infeasible =
FALSE;
9911 for(
i = nconss - 1;
i >= 0; --
i )
#define DEFAULT_DUALPRESOLVING
#define CONSHDLR_NEEDSCONS
#define CONSHDLR_SEPAFREQ
#define CONSHDLR_CHECKPRIORITY
#define CONSHDLR_PROP_TIMING
#define CONSHDLR_MAXPREROUNDS
#define DEFAULT_PRESOLPAIRWISE
#define CONSHDLR_SEPAPRIORITY
#define DEFAULT_PRESOLUSEHASHING
#define MINGAINPERNMINCOMPARISONS
#define CONSHDLR_PROPFREQ
#define CONSHDLR_PRESOLTIMING
#define CONSHDLR_EAGERFREQ
#define CONSHDLR_ENFOPRIORITY
#define CONSHDLR_DELAYSEPA
#define CONSHDLR_DELAYPROP
#define CONFLICTHDLR_PRIORITY
#define CONFLICTHDLR_NAME
#define CONFLICTHDLR_DESC
#define LINCONSUPGD_PRIORITY
#define DEFAULT_COPYTYPEDCONS
#define NONLINCONSUPGD_PRIORITY
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)
static SCIP_RETCODE dropEvent(SCIP *scip, SCIP_CONS *cons, SCIP_EVENTHDLR *eventhdlr, int pos)
static SCIP_RETCODE addCut(SCIP *scip, SCIP_CONS *cons, SCIP_Bool *cutoff)
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 HASHSIZE_SETPPCCONS
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)
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)
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)
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
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)
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)
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)
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)
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)
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)
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)
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_STRINGEQ(name, reference, retcode)
#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_RETCODE SCIPcreateRowSetppc(SCIP *scip, SCIP_CONS *cons)
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_RETCODE SCIPgetVarCopy(SCIP *sourcescip, SCIP *targetscip, SCIP_VAR *sourcevar, SCIP_VAR **targetvar, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, SCIP_Bool global, SCIP_Bool *success)
SCIP_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)
BMS_BLKMEM * SCIPblkmem(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_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 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_Bool SCIPvarIsImpliedIntegral(SCIP_VAR *var)
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 SCIPcalcCliquePartition(SCIP *scip, SCIP_VAR **vars, int nvars, int **probtoidxmap, int *probtoidxmapsize, int *cliquepartition, int *ncliques)
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_RETCODE SCIPgetProbvarLinearSum(SCIP *scip, SCIP_VAR **vars, SCIP_Real *scalars, int *nvars, int varssize, SCIP_Real *constant, int *requiredsize)
SCIP_Bool SCIPvarIsIntegral(SCIP_VAR *var)
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
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
static SCIP_RETCODE separate(SCIP *scip, SCIP_SEPA *sepa, SCIP_SOL *sol, SCIP_RESULT *result)
Main separation function.
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)
struct SCIP_Cons SCIP_CONS
#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)
struct SYM_Graph SYM_GRAPH
#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)
struct SCIP_Conshdlr SCIP_CONSHDLR
#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)
struct SCIP_Eventhdlr SCIP_EVENTHDLR
#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
struct SCIP_Expr SCIP_EXPR
@ SCIP_BRANCHDIR_DOWNWARDS
struct SCIP_IntArray SCIP_INTARRAY
struct SCIP_HashMap SCIP_HASHMAP
#define SCIP_DECL_SORTPTRCOMP(x)
#define SCIP_DECL_HASHKEYEQ(x)
struct SCIP_RandNumGen SCIP_RANDNUMGEN
#define SCIP_DECL_HASHGETKEY(x)
#define SCIP_DECL_HASHKEYVAL(x)
struct SCIP_HashTable SCIP_HASHTABLE
struct SCIP_NlRow SCIP_NLROW
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
struct SCIP_Node SCIP_NODE
@ SCIP_VARSTATUS_MULTAGGR
enum SCIP_LockType SCIP_LOCKTYPE