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
159 int probtoidxmapsize;
173 unsigned int setppctype:2;
174 unsigned int sorted:1;
175 unsigned int cliqueadded:1;
176 unsigned int validsignature:1;
177 unsigned int changed:1;
178 unsigned int varsdeleted:1;
179 unsigned int merged:1;
180 unsigned int presolpropagated:1;
181 unsigned int existmultaggr:1;
182 unsigned int catchevents:1;
224 if( consdata1->setppctype < consdata2->setppctype ||
228 else if( (consdata1->setppctype == consdata2->setppctype && consdata1->nvars == consdata2->nvars) )
232 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));
286 if( consdata1->setppctype < consdata2->setppctype ||
295 assert(consdata1->setppctype > consdata2->setppctype || ((consdata1->setppctype == consdata2->setppctype) &&
325 switch( consdata->setppctype )
357 switch( consdata->setppctype )
395 (*conshdlrdata)->eventhdlr = eventhdlr;
396 (*conshdlrdata)->nsetpart = 0;
397 (*conshdlrdata)->probtoidxmap =
NULL;
398 (*conshdlrdata)->probtoidxmapsize = 0;
445 varuses = conshdlrdata->varuses;
519 for( v = 0; v < consdata->nvars; ++v )
521 SCIP_CALL( conshdlrdataIncVaruses(
scip, conshdlrdata, consdata->vars[v]) );
539 for( v = 0; v < consdata->nvars; ++v )
541 SCIP_CALL( conshdlrdataDecVaruses(
scip, conshdlrdata, consdata->vars[v]) );
557 assert(consdata->nvars <= consdata->varssize);
559 if( num > consdata->varssize )
565 consdata->varssize = newsize;
567 assert(num <= consdata->varssize);
587 (*consdata)->signature = 0;
588 (*consdata)->row =
NULL;
589 (*consdata)->nlrow =
NULL;
590 (*consdata)->existmultaggr =
FALSE;
591 (*consdata)->catchevents =
FALSE;
592 (*consdata)->nfixedzeros = 0;
593 (*consdata)->nfixedones = 0;
602#ifdef SCIP_DISABLED_CODE
614 for( v = 0; v <
nvars; ++v )
620 (*consdata)->nfixedones++;
622 (*consdata)->nfixedzeros++;
624 varsbuffer[k++] =
vars[v];
627 (*consdata)->varssize = k;
628 (*consdata)->nvars = k;
643 (*consdata)->varssize =
nvars;
644 (*consdata)->nvars =
nvars;
653 for( v = 0; v < (*consdata)->nvars; v++ )
664 for( v = 0; v < (*consdata)->nvars; v++ )
673 (*consdata)->vars =
NULL;
674 (*consdata)->varssize = 0;
675 (*consdata)->nvars = 0;
677 (*consdata)->setppctype = setppctype;
678 (*consdata)->sorted = (
nvars <= 1);
679 (*consdata)->cliqueadded =
FALSE;
680 (*consdata)->validsignature =
FALSE;
681 (*consdata)->changed =
TRUE;
682 (*consdata)->varsdeleted =
FALSE;
683 (*consdata)->merged =
FALSE;
684 (*consdata)->presolpropagated =
FALSE;
724 if( (*consdata)->row !=
NULL )
730 if( (*consdata)->nlrow !=
NULL )
736 for( v = 0; v < (*consdata)->nvars; v++ )
759 if( consdata->nvars == 0 )
766 switch( consdata->setppctype )
793 if( !consdata->validsignature )
797 consdata->signature = 0;
798 for(
i = 0;
i < consdata->nvars; ++
i )
800 consdata->validsignature =
TRUE;
803 return consdata->signature;
814 if( !consdata->sorted )
816 if( consdata->nvars <= 1 )
817 consdata->sorted =
TRUE;
820 SCIPsortPtr((
void**)consdata->vars, SCIPvarComp, consdata->nvars);
821 consdata->sorted =
TRUE;
830 for( v = 0; v < consdata->nvars; ++v )
867 for(
i = 0;
i < consdata->nvars; ++
i )
882 ++(conshdlrdata->nsetpart);
883 assert(conshdlrdata->nsetpart >= 0);
887 --(conshdlrdata->nsetpart);
888 assert(conshdlrdata->nsetpart >= 0);
893 consdata->setppctype = setppctype;
898 for(
i = 0;
i < consdata->nvars; ++
i )
906 conshdlrdata->updatedsetppctype =
TRUE;
930 var = consdata->vars[pos];
953 consdata->nfixedzeros++;
958 consdata->presolpropagated =
FALSE;
961 if( consdata->nfixedzeros >= consdata->nvars - 1 )
969 consdata->nfixedones++;
973 consdata->presolpropagated =
FALSE;
1000 var = consdata->vars[pos];
1010 consdata->nfixedzeros--;
1012 consdata->nfixedones--;
1031 if( consdata->catchevents ==
TRUE )
1035 for(
i = 0;
i < consdata->nvars; ++
i )
1040 consdata->catchevents =
TRUE;
1059 if( consdata->catchevents ==
FALSE )
1063 for(
i = 0;
i < consdata->nvars; ++
i )
1068 consdata->catchevents =
FALSE;
1101 consdata->vars[consdata->nvars] =
var;
1103 if( consdata->validsignature )
1105 consdata->sorted = (consdata->nvars == 1);
1106 consdata->changed =
TRUE;
1125 if( consdata->catchevents )
1131 consdata->existmultaggr =
TRUE;
1146 if( consdata->row !=
NULL )
1151 consdata->merged =
FALSE;
1152 consdata->cliqueadded =
FALSE;
1175 var = consdata->vars[pos];
1195 if( consdata->catchevents )
1201 if( consdata->nvars == 1 )
1203 consdata->presolpropagated =
FALSE;
1208 if( consdata->row !=
NULL )
1214 if( pos != consdata->nvars - 1 )
1216 consdata->vars[pos] = consdata->vars[consdata->nvars-1];
1217 consdata->sorted =
FALSE;
1220 consdata->validsignature =
FALSE;
1221 consdata->changed =
TRUE;
1344 assert(consdata->nfixedones == 0);
1345 assert(consdata->nfixedzeros == 0);
1347 nvars = consdata->nvars;
1356 vars = consdata->vars;
1361 switch( setppctype )
1389 for( v = 0; v <
nvars; ++v )
1413 if( idx == -1 ||
objval < bestobjval )
1425 if (
objval * objsign >= 0.0 )
1438 if( idx == -1 || nposfixings == 0 )
1448 noldfixed = *nfixedvars;
1462 idx2 = 1 - indepidx;
1463 assert( 0 <= idx2 && idx2 < 2 );
1484 for( v =
nvars - 1; v >= 0; --v )
1510 if(
objval >= bestobjval )
1529 for( v =
nvars - 1; v >= 0; --v )
1618 assert(*nfixedvars >= noldfixed);
1621 if( *nfixedvars != noldfixed )
1661 if( consdata->nvars <= 1 )
1663 consdata->merged =
TRUE;
1667 assert(consdata->vars !=
NULL || consdata->nvars == 0);
1670 SCIPsortPtr((
void**)consdata->vars, SCIPvarCompActiveAndNegated, consdata->nvars);
1672 consdata->sorted =
FALSE;
1675 for( v = consdata->nvars - 1; v > 0; --v )
1685 var1 = consdata->vars[v];
1695 var2 = consdata->vars[v-1];
1711 if( negated1 != negated2 )
1721 for(
i = consdata->nvars - 1;
i >= 0; --
i )
1722 if(
i != v &&
i != (v-1) )
1727 SCIPdebugMsg(
scip,
"setppc constraint <%s>: infeasible fixing <%s> == 0\n",
1754 SCIPdebugMsg(
scip,
"setppc constraint <%s>: infeasible fixing <%s> == %g\n",
1770 consdata->changed =
TRUE;
1773 consdata->merged =
TRUE;
1807 consdata->existmultaggr =
FALSE;
1810 while( v < consdata->
nvars )
1814 var = consdata->vars[v];
1839 int consvarssize = 10;
1845 consvars[0] = repvar;
1851 if( requiredsize > consvarssize )
1853 consvarssize = requiredsize;
1858 assert(requiredsize <= consvarssize);
1860 assert(requiredsize == nconsvars);
1867 for( v2 = nconsvars - 1; v2 >= 0; --v2 )
1882 for( v2 = consdata->nvars - 1; v2 > v; --v2 )
1889 if( v2 == v && nconsvars == 0 )
1894 if( nfixedvars !=
NULL )
1900 for( v2 = consdata->nvars - 1; v2 >= 0; --v2 )
1902 if( consdata->vars[v2] !=
var )
1910 SCIPdebugMsg(
scip,
"setppc constraint <%s>: infeasible fixing <%s> == 0\n",
1946 for( v2 = nconsvars - 1; v2 >= 0; --v2 )
1968 size =
MAX(nconsvars, 1) + consdata->nvars - 1;
1974 nconsvars = consdata->nvars;
1977 for( k = consdata->nvars - 1; k >= 0; --k )
1979 consvars[k] = consdata->vars[k];
1989 if( requiredsize > size )
1991 size = requiredsize;
1996 assert(requiredsize <= size);
1998 assert(requiredsize == nconsvars);
2004 rhs = 1.0 - constant;
2008 lhs = 1.0 - constant;
2009 rhs = 1.0 - constant;
2014 lhs = 1.0 - constant;
2038 if( ndelconss !=
NULL && naddconss !=
NULL )
2085 consdata->existmultaggr =
FALSE;
2114 for( v = 0; v < consdata->nvars; ++v )
2151 for( v = 0; v < consdata->nvars && n < 2; ++v )
2192 oldnfixedvars = *nfixedvars;
2197 assert(consdata->nvars == 0 || consdata->vars !=
NULL);
2198 assert(0 <= consdata->nfixedzeros && consdata->nfixedzeros <= consdata->nvars);
2199 assert(0 <= consdata->nfixedones && consdata->nfixedones <= consdata->nvars);
2207 if( consdata->nfixedones == 1 )
2220 if( consdata->nfixedzeros < consdata->nvars - 1 )
2233 SCIPdebugMsg(
scip,
" -> fixing all other variables to zero in set packing/partitioning constraint <%s>\n",
2240 vars = consdata->vars;
2241 nvars = consdata->nvars;
2243 fixedonefound =
FALSE;
2245 for( v = 0; v <
nvars && consdata->nfixedones == 1; ++v )
2262 fixedonefound =
TRUE;
2268 assert(consdata->nfixedones >= 2 || (fixedonefound && *nfixedvars > oldnfixedvars));
2285 if( consdata->nfixedones >= 2 )
2309 else if( consdata->nfixedzeros == consdata->nvars )
2317 assert(consdata->nfixedones == 0);
2344 else if( consdata->nfixedzeros == consdata->nvars - 1 && consdata->nfixedones == 0 )
2371 vars = consdata->vars;
2372 nvars = consdata->nvars;
2373 for( v = 0; v <
nvars; ++v )
2380 SCIPdebugMsg(
scip,
" -> fixing remaining variable <%s> to one in set covering/partitioning constraint <%s>\n",
2391 assert(consdata->nfixedzeros == consdata->nvars - 1);
2392 assert(consdata->nfixedones == 1);
2398 assert(consdata->nfixedzeros + consdata->nfixedones <= consdata->nvars);
2422 vars = consdata->vars;
2423 nvars = consdata->nvars;
2426 for( v = 0; v <
nvars && sum < sumbound; ++v )
2436 absviol = sum - 1.0;
2438 switch( consdata->setppctype )
2483 switch( consdata->setppctype )
2526 if( consdata->row ==
NULL )
2561 if( consdata->nlrow ==
NULL )
2568 for(
i = 0;
i < consdata->nvars; ++
i )
2635 assert(consdata->nvars == 0 || consdata->vars !=
NULL);
2636 assert(0 <= consdata->nfixedzeros && consdata->nfixedzeros <= consdata->nvars);
2637 assert(0 <= consdata->nfixedones && consdata->nfixedones <= consdata->nvars);
2652 *reduceddom = (nfixedvars > 0);
2665 if( lpfeas && consdata->row !=
NULL )
2721 *reduceddom = (nfixedvars > 0);
2777 assert(consdata1->sorted);
2778 assert(consdata2->sorted);
2785 if( consdata1->nvars != consdata2->nvars )
2790 for(
i = 0;
i < consdata1->nvars; ++
i )
2793 if( consdata1->vars[
i] != consdata2->vars[
i] )
2823 assert(consdata->nvars > 0);
2831 assert(minidx >= 0 && minidx <= maxidx);
2833 return SCIPhashFour(consdata->nvars, minidx, mididx, maxidx);
2842 int*
const cliquepartition,
2845 int*
const nusefulconss,
2847 int*
const nfixedvars,
2848 int*
const naddconss,
2849 int*
const ndelconss,
2850 int*
const nchgcoefs,
2863 assert(cliquepartition !=
NULL || nbinvars == 0);
2864 assert(ncliques >= 0 && ncliques <= nbinvars);
2874 if( nbinvars == 0 || ncliques == 0 )
2881 if( ncliques == nbinvars )
2887 for(
c = 0;
c < ncliques - 1; ++
c )
2889 if( lastclqidx >= cliquepartition[
c] )
2900 for( v =
c; v < nbinvars - 1; ++v )
2902 if( cliquepartition[
c] == cliquepartition[v] )
2933 if( !
SCIPconsIsDeleted(cliquecons) && nadded - cliqueconsdata->nfixedzeros >= 2 )
2935 assert(cliqueconsdata->nfixedones == 0);
2938 usefulconss[*nusefulconss] = cliquecons;
2947 lastclqidx = cliquepartition[
c];
2963 int*
const nusefulconss,
2964 int*
const nfixedvars,
2965 int*
const ndelconss,
2966 int*
const nchgcoefs,
2974 int nlocaladdconss = 0;
2991 for(
c = nconss - 1;
c >= 0; --
c )
3010 assert(nlocaladdconss == 0);
3027 assert(consdata->nfixedones == 0);
3029 if( consdata->nvars == 0 )
3038 usefulconss[*nusefulconss] = cons;
3053 int const nusefulconss,
3055 int*
const nusefulvars,
3057 int*
const varnconss,
3058 int*
const maxnvarconsidx,
3059 int**
const varconsidxs,
3070 assert(usefulconss !=
NULL || nusefulconss == 0);
3079 if( nusefulconss == 0 )
3084 for(
c = nusefulconss - 1;
c >= 0; --
c )
3086 cons = usefulconss[
c];
3095 assert(consdata->merged);
3098 if( consdata->nvars > *maxnvars )
3099 *maxnvars = consdata->nvars;
3102 for( v = consdata->nvars - 1; v >= 0; --v )
3106 var = consdata->vars[v];
3120 usefulvars[*nusefulvars] =
var;
3122 varindex = *nusefulvars;
3139 if( varnconss[varindex] == maxnvarconsidx[varindex] )
3145 assert(varnconss[varindex] < maxnvarconsidx[varindex]);
3147 varconsidxs[varindex][varnconss[varindex]] =
c;
3149 ++(varnconss[varindex]);
3162 int*
const varnconss,
3163 int**
const varconsidxs
3183 for(
i = 0;
i < varnconss[varindex]; ++
i )
3185 if( varconsidxs[varindex][
i] == considx )
3187 varconsidxs[varindex][
i] = varconsidxs[varindex][varnconss[varindex] - 1];
3191 --(varnconss[varindex]);
3206 int*
const nusefulvars,
3208 int*
const varnconss,
3209 int*
const maxnvarconsidx,
3210 int**
const varconsidxs
3235 varindex = *nusefulvars;
3240 maxnvarconsidx[varindex] = 1;
3242 varnconss[varindex] = 0;
3249 if( varnconss[varindex] == maxnvarconsidx[varindex] )
3255 assert(varnconss[varindex] < maxnvarconsidx[varindex]);
3256 varconsidxs[varindex][varnconss[varindex]] = considx;
3259 ++(varnconss[varindex]);
3281 int*
const naggregations,
3284 int*
const saggregations,
3288 int*
const nfixedvars,
3289 int*
const naggrvars,
3290 int*
const ndelconss,
3313 if( consdata->presolpropagated )
3316 consdata->presolpropagated =
TRUE;
3318 vars = consdata->vars;
3319 nvars = consdata->nvars;
3345 if( consdata->nfixedones > 1 )
3361 SCIPdebugMsg(
scip,
"set partitioning / packing constraint <%s> is infeasible, %d variables fixed to one\n",
SCIPconsGetName(cons), consdata->nfixedones);
3367 if( consdata->nfixedones == 1 )
3377 for( v =
nvars - 1; v >= 0; --v )
3387 SCIPdebugMsg(
scip,
"setppc constraint <%s>: infeasible fixing <%s> == 0\n",
3418 if( consdata->nfixedzeros ==
nvars )
3420 assert(consdata->nfixedones == 0);
3444 if( consdata->nfixedzeros + 1 ==
nvars )
3446 assert(consdata->nfixedones == 0);
3456 for( v =
nvars - 1; v >= 0; --v )
3467 SCIPdebugMsg(
scip,
"setppc constraint <%s>: infeasible fixing <%s> == 1\n",
3498 for( v =
nvars - 1; v >= 0; --v )
3536 SCIPdebugMsg(
scip,
"set partitioning constraint <%s>: aggregate <%s> + <%s> == 1\n",
3570 if( *saggregations == *naggregations )
3573 assert(*saggregations > *naggregations);
3583 undoneaggrvars[2 * (*naggregations)] =
var;
3584 undoneaggrvars[2 * (*naggregations) + 1] =
vars[v];
3618 int const nusefulconss,
3620 int*
const nusefulvars,
3622 int*
const varnconss,
3623 int*
const maxnvarconsidx,
3624 int**
const varconsidxs,
3625 int*
const countofoverlapping,
3637 int*
const naggregations,
3638 int*
const saggregations,
3642 int*
const nfixedvars,
3643 int*
const naggrvars,
3644 int*
const nchgcoefs,
3645 int*
const ndelconss,
3670 assert(usefulconss !=
NULL && nusefulconss > 0);
3671 assert(0 <= considx && considx < nusefulconss);
3672 assert(usefulconss[considx] == cons);
3673 assert(0 <= endidx && endidx <= nusefulconss);
3692 nvars = consdata->nvars;
3697 vars = consdata->vars;
3700 oldnfixedzeros = consdata->nfixedzeros;
3701 overlapdestroyed =
FALSE;
3704 for(
c = endidx - 1;
c >= 0; --
c )
3706 cons1 = usefulconss[
c];
3715 assert(usefulconss[
c] != cons);
3718 oldnaggrvars = *naggrvars;
3724 SCIP_CALL(
presolvePropagateCons(
scip, cons1,
FALSE, undoneaggrvars, undoneaggrtypes, naggregations, saggregations, nfixedvars, naggrvars, ndelconss,
cutoff) );
3730 assert(*naggrvars == oldnaggrvars);
3738 nvars1 = consdata1->nvars;
3744 assert(countofoverlapping[
c] <= nvars1);
3747 assert(consdata1->nfixedones == 0);
3752 if( !overlapdestroyed && countofoverlapping[
c] ==
nvars - consdata->nfixedzeros )
3756 if(
nvars - consdata->nfixedzeros < nvars1 )
3764 assert(consdata->merged);
3765 assert(consdata1->merged);
3767 vars1 = consdata1->vars;
3773 consdata1->sorted =
FALSE;
3776 for( v =
nvars - 1, v1 = nvars1 - 1; v >= 0 && v1 >= 0; )
3831 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]));
3852 assert(negated0 == negated1);
3859 for( ; v1 >= 0; --v1)
3864 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]));
3919 else if( (!overlapdestroyed && countofoverlapping[
c] + consdata1->nfixedzeros == nvars1) || countofoverlapping[
c] == nvars1 )
3924 const int oldnfixedvars = *nfixedvars;
3930 assert(consdata->merged);
3931 assert(consdata1->merged);
3933 vars1 = consdata1->vars;
3938 consdata1->sorted =
FALSE;
3941 for( v =
nvars - 1, v1 = nvars1 - 1; v >= 0 && v1 >= 0; )
4021 assert(negated0 == negated1);
4072 if( oldnfixedvars < *nfixedvars )
4073 overlapdestroyed =
TRUE;
4103 assert(consdata->merged);
4104 assert(consdata1->merged);
4106 vars1 = consdata1->vars;
4111 consdata1->sorted =
FALSE;
4114 for( v =
nvars - 1, v1 = nvars1 - 1; v >= 0 && v1 >= 0; )
4164 if( aggvar2 !=
NULL )
4173 aggvar2 = vars1[v1];
4175 if( aggvar1 !=
NULL )
4185 if( negated0 != negated1 )
4201 if( aggvar1 ==
NULL && aggvar2 ==
NULL )
4205 if( aggvar2 ==
NULL )
4207 for( ; v1 >= 0; --v1)
4212 aggvar2 = vars1[v1];
4217 else if( aggvar1 ==
NULL )
4231 if( aggvar1 ==
NULL || aggvar2 ==
NULL )
4237 if( *saggregations == *naggregations )
4240 assert(*saggregations > *naggregations);
4249 undoneaggrtypes[*naggregations] =
TRUE;
4250 undoneaggrvars[2 * (*naggregations)] = aggvar1;
4251 undoneaggrvars[2 * (*naggregations) + 1] = aggvar2;
4281 int constochangeidx;
4283 const int oldnchgcoefs = *nchgcoefs;
4291 assert(consdata->merged);
4292 assert(consdata1->merged);
4295 SCIPsortDownPtr((
void**)(consdata1->vars), SCIPvarCompActiveAndNegated, nvars1);
4297 consdata1->sorted =
FALSE;
4303 varstochange = consdata1->vars;
4304 nvarstostay =
nvars;
4305 nvarstochange = nvars1;
4307 constochange = cons1;
4308 consdatachange = consdata1;
4309 constochangeidx =
c;
4313 varstostay = consdata1->vars;
4314 varstochange =
vars;
4315 nvarstostay = nvars1;
4316 nvarstochange =
nvars;
4318 constochange = cons;
4319 consdatachange = consdata;
4320 constochangeidx = considx;
4328 for( v = nvarstostay - 1, v1 = nvarstochange - 1; v >= 0 && v1 >= 0; )
4349 var = varstostay[v];
4362 var1 = varstochange[v1];
4376 addvar = varstostay[v];
4389 if( negated0 != negated1 )
4408 SCIP_CALL(
presolvePropagateCons(
scip, constostay,
FALSE,
NULL,
NULL,
NULL,
NULL, nfixedvars, naggrvars, ndelconss,
cutoff) );
4429 assert(*nchgcoefs - oldnchgcoefs == countofoverlapping[
c]);
4432 if( addvar ==
NULL )
4442 addvar = varstostay[v];
4458 consdatachange->merged =
TRUE;
4459 assert(constochangeidx == (cons == constochange ? considx :
c));
4483 int*
const nusefulvars,
4490 int*
const varnconss,
4491 int*
const maxnvarconsidx,
4492 int**
const varconsidxs,
4500 int*
const nfixedvars,
4501 int*
const ndelconss,
4539 nvars = consdata->nvars;
4546 vars = consdata->vars;
4552 for( v =
nvars - 1; v >= 0 && v1 >= 0; )
4580 assert(consdata->merged);
4583 if( (*cliquevalues)[v] )
4594 var1 = usefulvars[v1];
4619 for( k =
nvars - 1; k >= 0; --k )
4627 if( (*cliquevalues)[k] )
4650 if( value != (*cliquevalues)[v] )
4658 for( k =
nvars - 1; k >= 0; --k )
4667 if( k == nottocheck )
4670 if( (*cliquevalues)[k] )
4701 if( nottocheck >= 0 )
4705 assert(consdata->merged);
4708 for( k = consdata->nvars - 1; k >= 0; --k )
4717 if( k != nottocheck )
4755 SCIPdebugMsg(
scip,
" -> deleting constraint <%s> number <%d> due to active and negated variable in the same clique constraint\n",
SCIPconsGetName(cons), arraypos);
4765 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]));
4787 addvar = usefulvars[v1 + 1];
4796 consdata->merged =
TRUE;
4808 vars = consdata->vars;
4809 nvars = consdata->nvars;
4814 if( (*maxnvars) <
nvars )
4816 while( (*maxnvars) <
nvars )
4831 for( ; v1 >= 0; --v1)
4839 var1 = usefulvars[v1];
4853 for( k =
nvars - 1; k >= 0; --k )
4862 if( (*cliquevalues)[k] )
4884 SCIPdebugMsg(
scip,
"trying to fix <%s> to 0 because this variable is in the same clique with a set partition\n",
SCIPvarGetName(usefulvars[v1]));
4906 addvar = usefulvars[v1];
4915 consdata->merged =
TRUE;
4927 vars = consdata->vars;
4928 nvars = consdata->nvars;
4933 if( (*maxnvars) <
nvars )
4935 while( (*maxnvars) <
nvars )
4959 int const naggregations,
4960 int*
const naggrvars,
4974 assert(naggregations > 0);
4979 for(
a = 0;
a < naggregations; ++
a )
4981 var1 = undoneaggrvars[2 *
a];
4982 var2 = undoneaggrvars[2 *
a + 1];
4992 SCIP_CALL( conshdlrdataDecVaruses(
scip, conshdlrdata, var1) );
4993 SCIP_CALL( conshdlrdataDecVaruses(
scip, conshdlrdata, var2) );
4997 if( undoneaggrtypes[
a] )
5020 SCIP_CALL( conshdlrdataIncVaruses(
scip, conshdlrdata, var1) );
5021 SCIP_CALL( conshdlrdataIncVaruses(
scip, conshdlrdata, var2) );
5039 int*
const firstchange,
5040 int*
const firstclique,
5041 int*
const lastclique,
5042 int*
const nfixedvars,
5043 int*
const naggrvars,
5044 int*
const ndelconss,
5045 int*
const nchgcoefs,
5056 int* maxnvarconsidx;
5057 int* countofoverlapping =
NULL;
5101 susefulvars = 2 *
nvars;
5107 saggregations =
nvars;
5125 startndelconss = *ndelconss;
5129 if( conshdlrdata->nclqpresolve == 0 && conshdlrdata->addvariablesascliques )
5133 int* cliquepartition;
5160 nrounds, nfixedvars, &naddconss, ndelconss, nchgcoefs,
cutoff) );
5165 *ndelconss -= naddconss;
5185 if( nusefulconss <= 1 )
5198 SCIP_CALL(
collectCliqueData(
scip, usefulconss, nusefulconss, usefulvars, &nusefulvars, vartoindex, varnconss, maxnvarconsidx, varconsidxs, &maxnvars) );
5207 SCIPsortDownPtr((
void**)usefulvars, SCIPvarCompActiveAndNegated, nusefulvars);
5218 int cons0fixedzeros;
5221 const int oldnaggrvars = *naggrvars;
5223 cons0 = usefulconss[
c];
5231 SCIP_CALL(
presolvePropagateCons(
scip, cons0,
FALSE, undoneaggrvars, undoneaggrtypes, &naggregations, &saggregations, nfixedvars, naggrvars, ndelconss,
cutoff) );
5237 assert(*naggrvars == oldnaggrvars);
5246 cons0vars = consdata->vars;
5247 ncons0vars = consdata->nvars;
5250 SCIPsortDownPtr((
void**)cons0vars, SCIPvarCompActiveAndNegated, ncons0vars);
5252 consdata->sorted =
FALSE;
5255 assert(maxnvars >= ncons0vars);
5261 for( v = ncons0vars - 1; v >= 0 ; --v )
5263 var0 = cons0vars[v];
5272 for( v1 = varnconss[varindex] - 1; v1 >= 0 ; --v1 )
5273 ++(countofoverlapping[varconsidxs[varindex][v1]]);
5276 oldnchgcoefs = *nchgcoefs;
5277 cons0fixedzeros = consdata->nfixedzeros;
5283 varnconss, maxnvarconsidx, varconsidxs, countofoverlapping, conshdlrdata->cliqueshrinking, &chgcons0,
5284 undoneaggrvars, undoneaggrtypes, &naggregations, &saggregations,
5285 nfixedvars, naggrvars, nchgcoefs, ndelconss,
cutoff) );
5291 assert(*naggrvars == oldnaggrvars);
5294 if( chgcons0 && *nchgcoefs > oldnchgcoefs )
5299 cons0vars = consdata->vars;
5300 ncons0vars = consdata->nvars;
5303 SCIPsortDownPtr((
void**)cons0vars, SCIPvarCompActiveAndNegated, ncons0vars);
5305 consdata->sorted =
FALSE;
5309 if( consdata->nfixedones > 0 || consdata->nfixedzeros > cons0fixedzeros )
5314 SCIP_CALL(
presolvePropagateCons(
scip, cons0,
FALSE, undoneaggrvars, undoneaggrtypes, &naggregations, &saggregations, nfixedvars, naggrvars, ndelconss,
cutoff) );
5320 assert(*naggrvars == oldnaggrvars);
5337 v1 = nusefulvars - 1;
5341 if( conshdlrdata->nclqpresolve > 0 )
5342 v1 = nusefulvars - 1;
5346 (void)
SCIPsortedvecFindDownPtr((
void**)usefulvars, SCIPvarCompActiveAndNegated, (
void*)cons0vars[ncons0vars - 1], nusefulvars, &v1);
5347 assert(v1 >= 0 && v1 < nusefulvars);
5355 assert(maxnvars >= ncons0vars);
5357 for( v = ncons0vars - 1; v >= 0; --v )
5372 maxnvarconsidx, varconsidxs, &maxnvars, &nadded, &chgcons0, nfixedvars, ndelconss,
cutoff) );
5385 *firstchange =
MIN(*firstchange,
c);
5386 *firstclique =
MIN(*firstclique,
c);
5387 *lastclique =
MAX(*lastclique,
c);
5391 cons0vars = consdata->vars;
5392 ncons0vars = consdata->nvars;
5397 SCIPsortDownPtr((
void**)cons0vars, SCIPvarCompActiveAndNegated, ncons0vars);
5399 consdata->sorted =
FALSE;
5404 for( v = ncons0vars - 1; v >= 0 ; --v )
5406 var0 = cons0vars[v];
5415 for(
i = varnconss[varindex] - 1;
i >= 0 ; --
i )
5416 ++(countofoverlapping[varconsidxs[varindex][
i]]);
5423 usefulconss, nusefulconss, usefulvars, &nusefulvars, vartoindex, varnconss, maxnvarconsidx, varconsidxs,
5424 countofoverlapping, conshdlrdata->cliqueshrinking, &chgcons0,
5425 undoneaggrvars, undoneaggrtypes, &naggregations, &saggregations,
5426 nfixedvars, naggrvars, nchgcoefs, ndelconss,
cutoff) );
5432 assert(*naggrvars == oldnaggrvars);
5443 for(
c = nusefulvars;
c > 0; --
c )
5445 if( varconsidxs[
c] !=
NULL )
5470 if( *ndelconss < startndelconss )
5471 *ndelconss = startndelconss;
5498 assert(firstclique >= 0);
5499 assert(lastclique <= nconss);
5500 assert(conss !=
NULL || ((nconss == 0) && (lastclique == 0)));
5503 for(
c = firstclique;
c < lastclique; ++
c )
5514 *nchgbds += nlocalbdchgs;
5525 if( !consdata->cliqueadded && consdata->nvars >= 2 )
5532 *nchgbds += nlocalbdchgs;
5545 *nchgbds += nlocalbdchgs;
5553 consdata->cliqueadded =
TRUE;
5584 if( !linearconshdlrexist &&
nvars > 2 )
5586 *infeasible =
FALSE;
5587 *aggregated =
FALSE;
5596 else if( pos ==
nvars - 1 )
5608 for( v =
nvars - 2; v >= 0; --v )
5611 SCIPdebugMsg(
scip,
"multi-aggregating binary variable <%s> (locks: [%d,%d]; to %d variables)\n",
5621 if( pos != 0 && pos !=
nvars - 1 )
5696 int posreplacements = 0;
5698 int nhashmapentries;
5720 for( v = nposbinvars - 1; v >= 0; --v )
5729 if( (nuplocks == 1 && ndownlocks <= 1) || (nuplocks <= 1 && ndownlocks == 1) || (nuplocks <= 2 && ndownlocks <= 2 &&
SCIPvarGetNegatedVar(binvars[v]) !=
NULL) )
5734 SCIPdebugMsg(
scip,
"found %d binary variables for possible multi-aggregation\n", nposvars);
5751 SCIPsortPtr((
void**)usefulconss, setppcConssSort2, nconss);
5753 nhashmapentries = 0;
5757 assert(!donotaggr || !donotmultaggr);
5765 for(
c = 0;
c < nconss; ++
c )
5775 cons = usefulconss[
c];
5813 oldnfixedvars = *nfixedvars;
5824 if( oldnfixedvars < *nfixedvars )
5829 assert(nlocaladdconss == 0);
5837 if( consdata->nvars < 2 )
5855 if( consdata->nvars == 0 )
5889 var = consdata->vars[0];
5897 if( nuplocks == 1 &&
objval <= 0 )
5921 var = consdata->vars[1];
5929 if( nuplocks == 1 &&
objval <= 0 )
5979 if( ndecs >= nposvars )
5987 assert(nposbinvars >= consdata->nvars);
5995 for( v = consdata->nvars - 1; v >= 0; --v )
6005 assert(nuplocks >= 1 && ndownlocks >= 0);
6009 assert(nuplocks == 1 && ndownlocks <= 1);
6012 if( ndownlocks == 0 )
6072 considxs[nhashmapentries - 1] =
c;
6073 posincons[nhashmapentries - 1] = v;
6083 assert(image > 0 && image <= nhashmapentries);
6085 consindex = considxs[image - 1];
6086 assert(0 <= consindex && consindex < nconss);
6095 assert(posreplacements >= 0);
6097 varindex = posincons[image - 1];
6098 considxs[image - 1] = -1;
6099 posincons[image - 1] = -1;
6114 multaggridx = consindex;
6126 if( (
objval < 0.0) == (multaggridx ==
c) )
6130 aggrallyindex = consindex;
6136 if( varindex >= aggrconsdata->nvars || aggrconsdata->vars[varindex] != negvar )
6143 assert(aggrconsdata->nvars >= 2);
6145 for( v2 = aggrconsdata->nvars - 1; v2 >= 0; --v2 )
6147 if( aggrconsdata->vars[v2] == negvar )
6156 assert(aggrconsdata->vars[varindex] == negvar);
6159 aggrconsindex = consindex;
6219 assert(image > 0 && image <= nhashmapentries);
6221 assert(0 <= considxs[image - 1] && considxs[image - 1] < nconss);
6224 considxs[image - 1] = -1;
6225 posincons[image - 1] = -1;
6232 assert(posreplacements >= 0);
6246 considxs[nhashmapentries - 1] =
c;
6247 posincons[nhashmapentries - 1] = v;
6269 if( ndownlocks >= 2 )
6282 assert(image > 0 && image <= nhashmapentries);
6284 consindex = considxs[image - 1];
6285 assert(0 <= consindex && consindex < nconss);
6294 assert(posreplacements >= 0);
6296 varindex = posincons[image - 1];
6297 considxs[image - 1] = -1;
6298 posincons[image - 1] = -1;
6312 assert(!dualpresolvingenabled || nuplocks + ndownlocks > 2);
6320 if( chgtype[consindex] )
6328 for( v2 = aggrconsdata->nvars - 1; v2 >= 0; --v2 )
6330 if( aggrconsdata->vars[v2] == negvar )
6337 SCIPdebugMsg(
scip,
"multi-aggregating in one set-partitioning or one set-packing constraint\n");
6341 aggrallyindex = consindex;
6353 SCIPdebugMsg(
scip,
"multi-aggregating in two set-partitioning or one set-partitioning and -packing constraint\n");
6357 if( varindex >= aggrconsdata->nvars || aggrconsdata->vars[varindex] != negvar )
6364 assert(aggrconsdata->nvars >= 2);
6366 for( v2 = aggrconsdata->nvars - 1; v2 >= 0; --v2 )
6368 if( aggrconsdata->vars[v2] == negvar )
6377 assert(aggrconsdata->vars[varindex] == negvar);
6380 aggrconsindex = consindex;
6399 assert(aggrconsindex >= 0);
6401 assert(aggrallyindex >= 0);
6403 cons = usefulconss[aggrallyindex];
6423 for( v = aggrconsdata->nvars - 1; v >= 0; --v )
6431 considxs[image - 1] = aggrallyindex;
6432 posincons[image - 1] = 0;
6490 hashtablesize = nconss;
6493 hashGetKeySetppccons, hashKeyEqSetppccons, hashKeyValSetppccons, (
void*)
scip) );
6496 for(
c = 0;
c < nconss; ++
c )
6525 assert(consdata0->nvars >= 1 && consdata0->nvars == consdata1->nvars);
6527 assert(consdata0->sorted && consdata1->sorted);
6528 assert(consdata0->vars[0] == consdata1->vars[0]);
6530 SCIPdebugMsg(
scip,
"setppc constraints <%s> and <%s> have identical variable sets\n",
6581 SCIPdebugMsg(
scip,
" -> removing setppc constraint <%s> which is redundant to <%s>\n",
6621 assert(consdata0->nvars < consdata1->nvars);
6622 assert(consdata0->sorted);
6623 assert(consdata1->sorted);
6626 for( v0 = 0, v1 = 0; v0 < consdata0->nvars && !(*cutoff); ++v0, ++v1 )
6632 for( ;
SCIPvarGetIndex(consdata1->vars[v1]) < index0 && !(*cutoff); ++v1 )
6649 for( ; v1 < consdata1->nvars && !(*cutoff); ++v1 )
6653 assert(consdata0->nvars == 0
6695 assert(consdata0->nvars < consdata1->nvars);
6696 assert(consdata0->sorted);
6697 assert(consdata1->sorted);
6699 switch( consdata0->setppctype )
6702 switch( consdata1->setppctype )
6727 switch( consdata1->setppctype )
6750 switch( consdata1->setppctype )
6799 uint64_t signature0;
6813 cons0 = conss[chkind];
6819 assert(consdata0->nvars >= 1);
6828 cons0changed = consdata0->changed;
6829 consdata0->changed =
FALSE;
6830 for(
c = (cons0changed ? 0 : firstchange);
c < chkind && !(*cutoff) &&
SCIPconsIsActive(cons0); ++
c )
6834 uint64_t signature1;
6835 uint64_t jointsignature;
6857 jointsignature = (signature0 | signature1);
6858 if( jointsignature != signature0 && jointsignature != signature1 )
6862 cons0iscontained = (consdata0->nvars <= consdata1->nvars);
6863 cons1iscontained = (consdata1->nvars <= consdata0->nvars);
6866 while( v0 < consdata0->
nvars && v1 < consdata1->
nvars )
6873 if( index0 < index1 )
6875 cons0iscontained =
FALSE;
6876 if( !cons1iscontained )
6878 for( v0++; v0 < consdata0->nvars &&
SCIPvarGetIndex(consdata0->vars[v0]) < index1; v0++ )
6881 else if( index1 < index0 )
6883 cons1iscontained =
FALSE;
6884 if( !cons0iscontained )
6886 for( v1++; v1 < consdata1->nvars &&
SCIPvarGetIndex(consdata1->vars[v1]) < index0; v1++ )
6895 cons0iscontained = cons0iscontained && (v0 == consdata0->nvars);
6896 cons1iscontained = cons1iscontained && (v1 == consdata1->nvars);
6898 if( cons0iscontained && cons1iscontained )
6900 SCIPdebugMsg(
scip,
"setppc constraints <%s> and <%s> have identical variable sets\n",
6906 if( consdata0->setppctype == consdata1->setppctype )
6935 else if( cons0iscontained )
6943 else if( cons1iscontained )
6976 for(
i = 0;
i < nconss;
i++ )
6981 if( consdata->varsdeleted )
6984 for( v = consdata->nvars - 1; v >= 0; v-- )
6991 consdata->varsdeleted =
FALSE;
7020 SCIPdebugMsg(
scip,
"Enforcing %d set partitioning / packing / covering constraints for %s solution\n", nconss,
7021 sol ==
NULL ?
"LP" :
"relaxation");
7030 for(
c = 0;
c < nusefulconss && !
cutoff && !reduceddom; ++
c )
7036 for(
c = nusefulconss;
c < nconss && !
cutoff && !separated && !reduceddom; ++
c )
7057 else if( separated )
7059 else if( reduceddom )
7113 if( conshdlr ==
NULL )
7115 SCIPerrorMessage(
"set partitioning / packing / covering constraint handler not found\n");
7143 SCIP_CALL(
SCIPcreateCons(
scip, cons, name, conshdlr, consdata, initial,
separate, enforce, check,
propagate,
7144 local, modifiable, dynamic, removable, stickingatnode) );
7151 ++(conshdlrdata->nsetpart);
7152 assert(conshdlrdata->nsetpart >= 0);
7208 assert(mult == +1 || mult == -1);
7214 for( v = 0; v <
nvars; ++v )
7216 if( mult * vals[v] > 0.0 )
7217 transvars[v] =
vars[v];
7227 initial,
separate, enforce, check,
propagate, local, modifiable, dynamic, removable, stickingatnode) );
7257 if( nposbin + nnegbin + nposimplbin + nnegimplbin ==
nvars && ncoeffspone + ncoeffsnone ==
nvars )
7266 mult =
SCIPisEQ(
scip, lhs, 1.0 - ncoeffsnone) ? +1 : -1;
7333 int nbilinexprterms;
7350 if( nvarexprs != 2 )
7376 if( nbilinexprterms != 1 )
7380 if( nquadexprs != 2 )
7398 coefx = lincoef + sqrcoef;
7401 coefy = lincoef + sqrcoef;
7487 nlocvars = consdata->nvars;
7492 for(
i = 0;
i < consdata->nvars; ++
i )
7494 vars[
i] = consdata->vars[
i];
7503 rhs = 1.0 - constant;
7505 lhs = 1.0 - constant;
7510 rhs = 1.0 - constant;
7511 lhs = 1.0 - constant;
7515 cons, lhs, rhs, success) );
7578 conshdlrdata->noldfixedvars = 0;
7579 conshdlrdata->noldimpls = 0;
7580 conshdlrdata->noldcliques = 0;
7581 conshdlrdata->noldupgrs = 0;
7582 conshdlrdata->nclqpresolve = 0;
7583 conshdlrdata->updatedsetppctype =
FALSE;
7584 conshdlrdata->enablecliquelifting =
TRUE;
7599 for(
c = 0;
c < nconss; ++
c )
7619 for(
c = 0;
c < nconss; ++
c )
7636 for(
c = 0;
c < nconss; ++
c )
7641 if( consdata->row !=
NULL )
7646 if( consdata->nlrow !=
NULL )
7674 --(conshdlrdata->nsetpart);
7675 assert(conshdlrdata->nsetpart >= 0);
7730 ++(conshdlrdata->nsetpart);
7731 assert(conshdlrdata->nsetpart >= 0);
7747 *infeasible =
FALSE;
7749 for(
c = 0;
c < nconss && !(*infeasible); ++
c )
7773 SCIPdebugMsg(
scip,
"separating %d/%d set partitioning / packing / covering constraints\n", nusefulconss, nconss);
7782 for(
c = 0;
c < nusefulconss && !
cutoff; ++
c )
7793 else if( reduceddom )
7795 else if( separated )
7816 SCIPdebugMsg(
scip,
"separating %d/%d set partitioning / packing / covering constraints\n", nusefulconss, nconss);
7825 for(
c = 0;
c < nusefulconss && !
cutoff; ++
c )
7836 else if( reduceddom )
7838 else if( separated )
7878 varuses = conshdlrdata->varuses;
7886 assert(MINBRANCHWEIGHT <= MAXBRANCHWEIGHT);
7900 for( j = nsortcands; j > 0 && numuses > uses[j-1]; --j )
7902 sortcands[j] = sortcands[j-1];
7903 uses[j] = uses[j-1];
7905 assert(0 <= j && j <= nsortcands);
7916 if( nsortcands > 0 )
7929 for( nselcands = 0; nselcands < nsortcands; ++nselcands )
7933 branchweight += solval;
7936 if( branchweight > MAXBRANCHWEIGHT )
7943 minprio =
MIN(minprio, tmp);
7945 minestzero =
MIN(minestzero, tmp);
7947 minestone =
MIN(minestone, tmp);
7953 branchweight -= solval;
7956 if( MINBRANCHWEIGHT <= branchweight && branchweight <= MAXBRANCHWEIGHT )
7965 for(
i = 0;
i < nselcands; ++
i )
7972 if( nselcands == 1 )
7996 for(
i = 0;
i < nselcands; ++
i )
8030 int maxnbranchcands;
8045 if( conshdlrdata->npseudobranches <= 1 )
8050 if( npseudocands == 0 )
8053 varuses = conshdlrdata->varuses;
8057 maxnbranchcands = conshdlrdata->npseudobranches-1;
8058 assert(maxnbranchcands >= 1);
8066 for(
i = 0;
i < npseudocands; ++
i )
8072 if( nbranchcands < maxnbranchcands || uses > canduses[nbranchcands-1] )
8074 for( j =
MIN(nbranchcands, maxnbranchcands-1); j > 0 && uses > canduses[j-1]; --j )
8076 branchcands[j] = branchcands[j-1];
8077 canduses[j] = canduses[j-1];
8079 assert(0 <= j && j <= nbranchcands && j < maxnbranchcands);
8080 branchcands[j] =
var;
8082 if( nbranchcands < maxnbranchcands )
8087 assert(nbranchcands <= maxnbranchcands);
8092 if( nbranchcands > 0 )
8103 for(
i = 0;
i < nbranchcands; ++
i )
8106 minestzero =
MIN(minestzero, tmp);
8115 for(
i = 0;
i < nbranchcands; ++
i )
8119 for( j = 0; j <
i; ++j )
8127 for(
i = 0;
i < nbranchcands; ++
i )
8140 SCIPdebugMsg(
scip,
"branched on pseudo solution: %d children\n", nchildren);
8199 SCIPdebugMsg(
scip,
"pseudo enforcing %d set partitioning / packing / covering constraints\n", nconss);
8209 for(
c = 0;
c < nconss && !
cutoff && !reduceddom && !solvelp; ++
c )
8216 else if( reduceddom )
8220 else if( infeasible )
8271 for( v = 0; v < consdata->nvars; ++v )
8305 SCIPdebugMsg(
scip,
"propagating %d/%d set partitioning / packing / covering constraints\n", nmarkedconss, nconss);
8311 for(
c = nmarkedconss - 1;
c >= 0 && !
cutoff; --
c )
8321 int naddconss, ndelconss;
8326 naddconss = ndelconss = 0;
8344 else if( nfixedvars > 0 )
8373 oldnfixedvars = *nfixedvars;
8374 oldndelconss = *ndelconss;
8375 oldnaggrvars = *naggrvars;
8376 oldnchgcoefs = *nchgcoefs;
8383 conshdlrdata->enablecliquelifting = conshdlrdata->enablecliquelifting || conshdlrdata->updatedsetppctype
8385 || conshdlrdata->noldcliques !=
SCIPgetNCliques(
scip) || conshdlrdata->noldupgrs != nconss;
8388 startdelconss = *ndelconss;
8391 conshdlrdata->updatedsetppctype =
FALSE;
8394 firstchange = INT_MAX;
8395 firstclique = INT_MAX;
8412 if( consdata->nfixedzeros > 0 || nnewaggrvars > 0 || nnewaddconss > 0 || nnewupgdconss > 0
8448 if( consdata->nfixedzeros > 0 )
8465 SCIP_CALL(
presolvePropagateCons(
scip, cons,
TRUE,
NULL,
NULL,
NULL,
NULL, nfixedvars, naggrvars, ndelconss, &
cutoff) );
8478 if( consdata->nfixedzeros > 0 )
8503 if( firstchange == INT_MAX && consdata->changed )
8507 if( !consdata->cliqueadded && consdata->nvars >= 2 )
8509 if( firstclique == INT_MAX )
8516 if( oldnfixedvars < *nfixedvars || oldnaggrvars < *naggrvars || oldndelconss < *ndelconss || oldnchgcoefs < *nchgcoefs )
8519 if( firstchange < nconss && conshdlrdata->presolusehashing )
8523 if( oldndelconss < *ndelconss )
8537 naggrvars, ndelconss, nchgcoefs, nchgsides, &
cutoff) );
8544 else if( oldnfixedvars < *nfixedvars || oldnaggrvars < *naggrvars || oldndelconss < *ndelconss )
8560 firstclique = nconss;
8565 &lastclique, nfixedvars, naggrvars, ndelconss, nchgcoefs, &
cutoff) );
8566 ++(conshdlrdata->nclqpresolve);
8573 else if( oldnfixedvars < *nfixedvars || oldnaggrvars < *naggrvars || oldndelconss < *ndelconss || oldnchgcoefs < *nchgcoefs )
8577 conshdlrdata->noldfixedvars = *nfixedvars + *naggrvars;
8578 conshdlrdata->enablecliquelifting =
FALSE;
8584 if( conshdlrdata->presolpairwise )
8588 oldnfixedvars = *nfixedvars;
8609 oldndelconss = *ndelconss;
8610 oldnfixedvars = *nfixedvars;
8611 npaircomparisons = 0;
8626 conshdlrdata->noldupgrs = nconss - (*ndelconss - startdelconss);
8648 SCIPdebugMsg(
scip,
"conflict resolving method of set partitioning / packing / covering constraint handler\n");
8662 confvarfound =
FALSE;
8664 for( v = 0; v < consdata->nvars; ++v )
8666 if( consdata->vars[v] != infervar )
8676 confvarfound =
TRUE;
8689 if( inferinfo >= 0 )
8696 for( v = 0; v < consdata->nvars; ++v )
8726 switch( consdata->setppctype )
8729 nlocksdown = nlockspos + nlocksneg;
8730 nlocksup = nlockspos + nlocksneg;
8733 nlocksdown = nlocksneg;
8734 nlocksup = nlockspos;
8737 nlocksdown = nlockspos;
8738 nlocksup = nlocksneg;
8745 for(
i = 0;
i < consdata->nvars; ++
i )
8762 SCIPdebugMsg(
scip,
"activation information for set partitioning / packing / covering constraint <%s>\n",
8771 if( consdata->nfixedones >= 1 || consdata->nfixedzeros >= consdata->nvars - 1 )
8800 SCIPdebugMsg(
scip,
"deactivation information for set partitioning / packing / covering constraint <%s>\n",
8875 const char* consname;
8914 lhs, rhs, varmap, consmap,
8915 initial,
separate, enforce, check,
propagate, local, modifiable, dynamic, removable, stickingatnode, global,
valid) );
8960 if( *success && requsize > coefssize )
8963 coefssize = requsize;
8968 assert(!*success || requsize <= coefssize);
8991 initial,
separate, enforce, check,
propagate, local, modifiable, dynamic, removable, stickingatnode) );
8995 initial,
separate, enforce, check,
propagate, local, modifiable, dynamic, removable, stickingatnode) );
8999 initial,
separate, enforce, check,
propagate, local, modifiable, dynamic, removable, stickingatnode) );
9023 if( varssize < consdata->
nvars )
9045 (*nvars) = consdata->nvars;
9098 consdata->nfixedones++;
9101 consdata->nfixedones--;
9104 consdata->nfixedzeros++;
9107 consdata->nfixedzeros--;
9110 consdata->varsdeleted =
TRUE;
9113 if( consdata->merged )
9123 consdata->merged =
FALSE;
9126 if( !consdata->existmultaggr )
9132 consdata->existmultaggr =
TRUE;
9139 assert(0 <= consdata->nfixedzeros && consdata->nfixedzeros <= consdata->nvars);
9140 assert(0 <= consdata->nfixedones && consdata->nfixedones <= consdata->nvars);
9144 if( consdata->nfixedones >= 1 || consdata->nfixedzeros >= consdata->nvars - 1 )
9146 consdata->presolpropagated =
FALSE;
9151 consdata->presolpropagated =
FALSE;
9177 assert(bdchginfos !=
NULL || nbdchginfos == 0);
9190 if( nbdchginfos == 2 )
9235 SCIPdebugMsg(
scip,
"new clique of conflict constraint %s led to %d fixings\n", consname, ncliquebdchgs);
9239 SCIPdebugMsg(
scip,
"new clique of conflict constraint %s led to infeasibility\n", consname);
9253 for(
i = 0;
i < nbdchginfos; ++
i )
9270 if(
i == nbdchginfos )
9309 eventExecSetppc,
NULL) );
9313 conflictExecSetppc,
NULL) );
9321 consEnfolpSetppc, consEnfopsSetppc, consCheckSetppc, consLockSetppc,
9354 if( conshdlrdata->conshdlrlinear !=
NULL )
9368 "number of children created in pseudo branching (0: disable pseudo branching)",
9372 "should pairwise constraint comparison be performed in presolving?",
9376 "should hash table be used for detecting redundant constraints in advance",
9380 "should dual presolving steps be performed?",
9384 " should we try to lift variables into other clique constraints, fix variables, aggregate them, and also shrink the amount of variables in clique constraints",
9388 "should we try to generate extra cliques out of all binary variables to maybe fasten redundant constraint detection",
9392 "should we try to shrink the number of variables in a clique constraints, by replacing more than one variable by only one",
9434 initial,
separate, enforce, check,
propagate, local, modifiable, dynamic, removable, stickingatnode);
9492 initial,
separate, enforce, check,
propagate, local, modifiable, dynamic, removable, stickingatnode);
9550 initial,
separate, enforce, check,
propagate, local, modifiable, dynamic, removable, stickingatnode);
9586 SCIPerrorMessage(
"constraint is not a set partitioning / packing / covering constraint\n");
9607 SCIPerrorMessage(
"constraint is not a set partitioning / packing / covering constraint\n");
9615 return consdata->nvars;
9630 SCIPerrorMessage(
"constraint is not a set partitioning / packing / covering constraint\n");
9638 return consdata->vars;
9653 SCIPerrorMessage(
"constraint is not a set partitioning / packing / covering constraint\n");
9675 SCIPerrorMessage(
"constraint is not a set partitioning / packing / covering constraint\n");
9683 if( consdata->row !=
NULL )
9701 SCIPerrorMessage(
"constraint is not a set partitioning / packing / covering constraint\n");
9709 if( consdata->row !=
NULL )
9729 SCIPerrorMessage(
"constraint is not a set partitioning / packing / covering constraint\n");
9737 return consdata->row;
9755 SCIPerrorMessage(
"constraint is not a set partitioning / packing / covering constraint\n");
9764 switch( consdata->setppctype )
9803 SCIPerrorMessage(
"constraint is not a set partitioning / packing / covering constraint\n");
9811 return consdata->nfixedones;
9827 SCIPerrorMessage(
"constraint is not a set partitioning / packing / covering constraint\n");
9835 return consdata->nfixedzeros;
9855 if( conshdlr ==
NULL )
9862 *infeasible =
FALSE;
9868 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 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_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_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