120#define CONSHDLR_NAME "SOS1"
121#define CONSHDLR_DESC "SOS1 constraint handler"
122#define CONSHDLR_SEPAPRIORITY 1000
123#define CONSHDLR_ENFOPRIORITY 100
124#define CONSHDLR_CHECKPRIORITY -10
125#define CONSHDLR_SEPAFREQ 10
126#define CONSHDLR_PROPFREQ 1
127#define CONSHDLR_EAGERFREQ 100
129#define CONSHDLR_MAXPREROUNDS -1
130#define CONSHDLR_DELAYSEPA FALSE
131#define CONSHDLR_DELAYPROP FALSE
132#define CONSHDLR_NEEDSCONS TRUE
133#define CONSHDLR_PROP_TIMING SCIP_PROPTIMING_BEFORELP
134#define CONSHDLR_PRESOLTIMING SCIP_PRESOLTIMING_MEDIUM
137#define DEFAULT_MAXSOSADJACENCY 10000
141#define DEFAULT_MAXEXTENSIONS 1
142#define DEFAULT_MAXTIGHTENBDS 5
143#define DEFAULT_PERFIMPLANALYSIS FALSE
144#define DEFAULT_DEPTHIMPLANALYSIS -1
147#define DEFAULT_CONFLICTPROP TRUE
148#define DEFAULT_IMPLPROP TRUE
149#define DEFAULT_SOSCONSPROP FALSE
152#define DEFAULT_BRANCHSTRATEGIES "nbs"
153#define DEFAULT_BRANCHINGRULE 'n'
155#define DEFAULT_AUTOSOS1BRANCH TRUE
156#define DEFAULT_FIXNONZERO FALSE
158#define DEFAULT_ADDCOMPS FALSE
160#define DEFAULT_MAXADDCOMPS -1
161#define DEFAULT_ADDCOMPSDEPTH 30
162#define DEFAULT_ADDCOMPSFEAS -0.6
163#define DEFAULT_ADDBDSFEAS 1.0
164#define DEFAULT_ADDEXTENDEDBDS TRUE
167#define DEFAULT_NSTRONGROUNDS 0
169#define DEFAULT_NSTRONGITER 10000
172#define DEFAULT_BOUNDCUTSFROMSOS1 FALSE
173#define DEFAULT_BOUNDCUTSFROMGRAPH TRUE
174#define DEFAULT_AUTOCUTSFROMSOS1 TRUE
175#define DEFAULT_BOUNDCUTSFREQ 10
176#define DEFAULT_BOUNDCUTSDEPTH 40
177#define DEFAULT_MAXBOUNDCUTS 50
178#define DEFAULT_MAXBOUNDCUTSROOT 150
179#define DEFAULT_STRTHENBOUNDCUTS TRUE
180#define DEFAULT_IMPLCUTSFREQ 0
181#define DEFAULT_IMPLCUTSDEPTH 40
182#define DEFAULT_MAXIMPLCUTS 50
183#define DEFAULT_MAXIMPLCUTSROOT 150
186#define EVENTHDLR_NAME "SOS1"
187#define EVENTHDLR_DESC "bound change event handler for SOS1 constraints"
189#define EVENTHDLR_EVENT_TYPE (SCIP_EVENTTYPE_BOUNDCHANGED | SCIP_EVENTTYPE_GBDCHANGED)
192#define DIVINGCUTOFFVALUE 1e6
251struct SCIP_ConshdlrData
271 int maxnfixnonzerovars;
278 int depthimplanalysis;
312 int maxboundcutsroot;
339 if ( vertex1 == vertex2 )
343 if ( adjacencymatrix ==
NULL )
354 if ( nsucc1 < 1 || nsucc2 < 1 )
357 if ( nsucc1 > nsucc2 )
366 for (j = 0; j < nsucc1; ++j)
368 succvertex = succ[j];
369 if ( succvertex == vertex2 )
371 else if ( succvertex > vertex2 )
377 if ( vertex1 < vertex2 )
378 return adjacencymatrix[vertex2][vertex1];
380 return adjacencymatrix[vertex1][vertex2];
418 for (s = 0; s < nsucc; ++s)
603 SCIP_CALL(
SCIPcreateConsLinear(
scip, &cons,
"branch", 1, &
var, &val, 0.0, 0.0,
TRUE,
TRUE,
TRUE,
TRUE,
TRUE,
666 for (
i = 0;
i < naggrvars; ++
i)
671 allnonnegative =
FALSE;
676 if ( allnonnegative )
679 for (
i = 0;
i < naggrvars; ++
i)
685 *tightened = *tightened || fixed;
733 *tightened = *tightened || tighten;
737 *tightened = *tightened || tighten;
796 assert( consdata->nvars <= consdata->maxvars );
798 if ( num > consdata->maxvars )
804 if ( reserveWeights )
806 consdata->maxvars = newsize;
808 assert( num <= consdata->maxvars );
844 assert( consdata->nfixednonzeros >= 0 );
846 ++consdata->nfixednonzeros;
868 conflictgraph = conshdlrdata->conflictgraph;
869 if ( conflictgraph ==
NULL )
874 assert( node < conshdlrdata->nsos1vars );
881 SCIPdebugMsg(
scip,
"Switched to SOS1 branching rule, since conflict graph could be infeasible.\n");
882 conshdlrdata->switchsos1branch =
TRUE;
888 if ( ! consdata->local )
894 vars = consdata->vars;
895 nvars = consdata->nvars;
897 for (v = 0; v <
nvars; ++v)
906 assert( nodev < conshdlrdata->nsos1vars );
938 SCIPdebugMsg(
scip,
"Switched to SOS1 branching rule, since conflict graph could be infeasible.\n");
939 conshdlrdata->switchsos1branch =
TRUE;
971 if ( consdata->weights ==
NULL && consdata->maxvars > 0 )
990 assert( consdata->maxvars >= consdata->nvars+1 );
993 for (pos = 0; pos < consdata->nvars; ++pos)
995 if ( consdata->weights[pos] > weight )
1001 for (j = consdata->nvars; j > pos; --j)
1003 consdata->vars[j] = consdata->vars[j-1];
1004 consdata->weights[j] = consdata->weights[j-1];
1008 consdata->vars[pos] =
var;
1009 consdata->weights[pos] = weight;
1037 assert( consdata->nvars >= 0 );
1050 if ( consdata->weights !=
NULL )
1060 consdata->vars[consdata->nvars] =
var;
1061 if ( consdata->weights !=
NULL )
1063 if ( consdata->nvars > 0 )
1064 consdata->weights[consdata->nvars] = consdata->weights[consdata->nvars-1] + 1.0;
1066 consdata->weights[consdata->nvars] = 0.0;
1098 for (j = pos; j < consdata->nvars-1; ++j)
1100 consdata->vars[j] = consdata->vars[j+1];
1101 if ( consdata->weights !=
NULL )
1102 consdata->weights[j] = consdata->weights[j+1];
1144 int* workingsetnew =
NULL;
1171 mincands = nworkingset;
1179 for (
i = 0;
i < nexts; ++
i)
1181 for (j = nexts; j < nworkingset; ++j)
1189 for (
i = 0;
i < nworkingset; ++
i)
1194 vertex = workingset[
i];
1197 for (j = nexts; j < nworkingset && cnt < mincands; ++j)
1199 if ( vertex != workingset[j] && !
isConnectedSOS1(adjacencymatrix,
NULL, vertex, workingset[j]) )
1209 if ( cnt < mincands )
1231 for (btriter = mincands + btriter; btriter >= 1; --btriter)
1237 selvertex = workingset[selpos];
1238 workingset[selpos] = workingset[nexts];
1239 workingset[nexts] = selvertex;
1243 for (j = 0 ; j < nexts; ++j)
1246 workingsetnew[nextsnew++] = workingset[j];
1248 nworkingsetnew = nextsnew;
1249 for (j = nexts + 1; j < nworkingset; ++j)
1252 workingsetnew[nworkingsetnew++] = workingset[j];
1255 newclique[cliquesizes[*ncliques]++] = selvertex;
1258 if ( nworkingsetnew == 0 )
1265 cliqueind = nsos1vars + *ncliques;
1268 assert( cliquesizes[*ncliques] >= 0 && cliquesizes[*ncliques] <= nsos1vars );
1269 assert( *ncliques <
MAX(1, conshdlrdata->maxextensions) * nconss );
1271 for (j = 0 ; j < cliquesizes[*ncliques]; ++j)
1275 cliques[*ncliques][j] = newclique[j];
1278 SCIPsortInt(cliques[*ncliques], cliquesizes[*ncliques]);
1293 for (j = 0; j < consdata->nvars; ++j)
1303 ++(conshdlrdata->cntextsos1);
1305 cliquesizes[*ncliques] = cliquesizes[*ncliques-1];
1311 if ( *maxextensions <= 0 )
1317 else if ( nextsnew < nworkingsetnew )
1322 SCIP_CALL(
extensionOperatorSOS1(
scip, conshdlrdata, adjacencymatrix, vertexcliquegraph, nsos1vars, nconss, cons,
vars, weights,
FALSE, usebacktrack,
1323 cliques, ncliques, cliquesizes, newclique, workingsetnew, nworkingsetnew, nextsnew, pos, maxextensions, naddconss, success) );
1324 if ( *maxextensions <= 0 )
1334 assert( nworkingset >= nworkingsetnew );
1335 for (
w = 0;
w < nworkingsetnew; ++
w)
1336 workingset[
w] = workingsetnew[
w];
1337 nworkingset = nworkingsetnew;
1341 SCIP_CALL(
extensionOperatorSOS1(
scip, conshdlrdata, adjacencymatrix, vertexcliquegraph, nsos1vars, nconss, cons,
vars, weights,
FALSE, usebacktrack,
1342 cliques, ncliques, cliquesizes, newclique, workingset, nworkingset, nextsnew, pos, maxextensions, naddconss, success) );
1343 assert( *maxextensions <= 0 );
1351 --cliquesizes[*ncliques];
1359 for (j = nexts; j < nworkingset; ++j)
1361 assert( fixvertex != workingset[j] );
1401 for (v = 1; v < nlinvars; ++v)
1406 if ( indexinsosvars >= 0 )
1411 for (s = 0; s < nsucc; ++s)
1414 indexinlinvars = posinlinvars[succ[s]];
1415 assert( indexinlinvars < nlinvars );
1417 if ( indexinlinvars >= 0 && indexinlinvars < v )
1471 for (j = 0; j <
nvars; ++j)
1473 for (
i = k;
i < nsucc; ++
i)
1475 if ( succ[
i] > clique[j] )
1480 else if ( succ[
i] == clique[j] )
1486 comsucc[(*ncomsucc)++] = succ[
i];
1491 for (v = 1; v <
nvars; ++v)
1493 int ncomsuccsave = 0;
1506 for (j = 0; j < *ncomsucc; ++j)
1508 for (
i = k;
i < nsucc; ++
i)
1510 if ( succ[
i] > comsucc[j] )
1515 else if ( succ[
i] == comsucc[j] )
1517 comsucc[ncomsuccsave++] = succ[
i];
1523 *ncomsucc = ncomsuccsave;
1565 for (s = 0; s < nsucc; ++s)
1570 data = succdatas[s];
1577 assert( sos1node == succnode );
1578 implnodes[sos1node] =
TRUE;
1618 int lastFixedNonzero;
1631 *substituted =
FALSE;
1639 lastFixedNonzero = -1;
1640 allvarsbinary =
TRUE;
1641 vars = consdata->vars;
1644 while ( j < consdata->
nvars )
1673 *substituted =
TRUE;
1677 for (l = j+1; l < consdata->nvars; ++l)
1703 lastFixedNonzero = j;
1717 allvarsbinary =
FALSE;
1724 if ( consdata->nvars < 2 )
1737 if ( nfixednonzeros > 1 )
1739 SCIPdebugMsg(
scip,
"The problem is infeasible: more than one variable has bounds that keep it from being 0.\n");
1740 assert( lastFixedNonzero >= 0 );
1746 if ( nfixednonzeros == 1 )
1748 assert( lastFixedNonzero >= 0 );
1751 for (j = 0; j < consdata->nvars; ++j)
1753 if ( j != lastFixedNonzero )
1844 int** cliques =
NULL;
1846 int* cliquesizes =
NULL;
1847 int* newclique =
NULL;
1848 int* indconss =
NULL;
1849 int* lengthconss =
NULL;
1850 int* comsucc =
NULL;
1868 csize =
MAX(1, conshdlrdata->maxextensions) * nconss;
1884 for (
c = 0;
c < nconss; ++
c)
1892 lengthconss[
c] = consdata->nvars;
1897 for (iter = 0; iter < nconss; ++iter)
1904 int savennupgdconss;
1918 assert( consdata->nvars >= 0 );
1919 assert( consdata->nvars <= consdata->maxvars );
1921 assert( ncliques < csize );
1923 savendelconss = *ndelconss;
1924 savennupgdconss = *nupgdconss;
1927 SCIP_CALL(
presolRoundConsSOS1(
scip, cons, consdata, eventhdlr, &substituted, &
cutoff, &success, ndelconss, nupgdconss, nfixedvars, nremovedvars) );
1935 if ( *ndelconss > savendelconss || *nupgdconss > savennupgdconss || substituted )
1945 nvars = consdata->nvars;
1948 vars = consdata->vars;
1950 if (
nvars > 1 && conshdlrdata->maxextensions != 0 )
1959 for (j = 0; j <
nvars; ++j)
1963 if ( varprobind >= 0 )
1964 newclique[cliquesize++] = varprobind;
1967 if ( cliquesize > 1 )
1969 cliquesizes[ncliques] = cliquesize;
1981 varprobind = newclique[0];
1986 for (j = 0; j < ncomsucc; ++j)
1989 assert( j == 0 || succ[j] > succ[j-1] );
1990 comsucc[j] = succ[j];
1994 for (v = 1; v < cliquesize && ncomsucc > 0; ++v)
1996 varprobind = newclique[v];
2024 if ( conshdlrdata->maxextensions != 0 && adjacencymatrix !=
NULL )
2033 maxextensions = conshdlrdata->maxextensions;
2036 TRUE, (maxextensions <= 1) ?
FALSE :
TRUE, cliques, &ncliques, cliquesizes, newclique, comsucc, ncomsucc, 0, -1, &maxextensions,
2037 naddconss, &extended) );
2052 cliqueind = nsos1vars + ncliques;
2055 assert( cliquesize >= 0 && cliquesize <= nsos1vars );
2056 assert( ncliques < csize );
2058 for (j = 0; j < cliquesize; ++j)
2060 cliques[ncliques][j] = newclique[j];
2072 for (
c = ncliques-1;
c >= 0; --
c)
2123 if ( conshdlrdata->depthimplanalysis >= 0 && *probingdepth >= conshdlrdata->depthimplanalysis )
2132 for (s = 0; s < nsucc; ++s)
2151 impllbs[succnode] = 0;
2152 implubs[succnode] = 0;
2163 if ( givennode > succnode )
2164 adjacencymatrix[givennode][succnode] = 1;
2166 adjacencymatrix[succnode][givennode] = 1;
2174 SCIP_CALL(
SCIPcreateConsSOS1(
scip, &soscons, namesos, 0,
NULL,
NULL,
TRUE,
TRUE,
TRUE,
FALSE,
TRUE,
2198 for (s = 0; s < nsucc; ++s)
2201 int oldprobingdepth;
2204 data = succdatas[s];
2205 oldprobingdepth = *probingdepth;
2210 impllbs[succnode] = data->lbimpl;
2217 implnodes[succnode] =
TRUE;
2218 SCIP_CALL(
performImplicationGraphAnalysis(
scip, conshdlrdata, conflictgraph, totalvars, implgraph, implhash, adjacencymatrix, givennode, succnode, impllbs, implubs, implnodes, naddconss, probingdepth, infeasible) );
2219 *probingdepth = oldprobingdepth;
2230 implubs[succnode] = data->ubimpl;
2237 implnodes[succnode] =
TRUE;
2238 SCIP_CALL(
performImplicationGraphAnalysis(
scip, conshdlrdata, conflictgraph, totalvars, implgraph, implhash, adjacencymatrix, givennode, succnode, impllbs, implubs, implnodes, naddconss, probingdepth, infeasible) );
2239 *probingdepth = oldprobingdepth;
2271 for (s = 0; s < nsucc; ++s)
2273 if ( implnodes[succ[s]] )
2325 if ( infeasible1 || infeasible2 )
2331 if ( tightened1 || tightened2 )
2348 for (s = 0; s < nsucc; ++s)
2350 if ( succ[s] == indw )
2352 data = succdatas[s];
2359 data->lbimpl = newbound;
2369 data->ubimpl = newbound;
2385 data->lbimpl = newbound;
2392 data->ubimpl = newbound;
2419 int* cliquecoversizes,
2442 *infeasible =
FALSE;
2452 int newninftynonzero;
2459 newninftynonzero = ninftynonzero;
2473 implbound = boundnonzero -
bound;
2474 ind = varincover[
w];
2475 assert( cliquecoversizes[ind] > 0 );
2478 for (j = 0; j < cliquecoversizes[ind]; ++j)
2480 indcliq = cliquecovers[ind][j];
2491 implbound += bounds[
w];
2496 else if ( implcoverw )
2501 implbound -= bounds[indcliq];
2514 if ( ! implinfty && newninftynonzero == 0 )
2528 newbound = implbound / coef;
2538 SCIP_CALL(
updateArcData(
scip, implgraph, implhash, totalvars,
var,
vars[
w], lb, ub, newbound,
TRUE, nchgbds, update, infeasible) );
2542 SCIP_CALL(
updateArcData(
scip, implgraph, implhash, totalvars,
var,
vars[
w], lb, ub, newbound,
FALSE, nchgbds, update, infeasible) );
2549 SCIP_CALL(
updateArcData(
scip, implgraph, implhash, totalvars,
var,
vars[
w], lb, ub, newbound,
FALSE, nchgbds, update, infeasible) );
2553 SCIP_CALL(
updateArcData(
scip, implgraph, implhash, totalvars,
var,
vars[
w], lb, ub, newbound,
TRUE, nchgbds, update, infeasible) );
2592 assert( ! coveredvars[v] );
2602 int nextensions = 0;
2613 for (s = 0; s < nsucc; ++s)
2616 if ( ! coveredvars[succnode] )
2617 extensions[nextensions++] = succ[s];
2621 while ( nextensions > 0 )
2625 if ( considersolvals )
2633 for (s = 0; s < nextensions; ++s)
2638 bestbigMval = bigMval;
2639 bestindex = extensions[s];
2644 bestindex = extensions[0];
2646 assert( bestindex != -1 );
2649 clique[(*cliquesize)++] = bestindex;
2653 for (s = 0; s < nextensions; ++s)
2655 if ( s != bestindex &&
isConnectedSOS1(
NULL, conflictgraphlin, bestindex, extensions[s]) )
2656 extensions[nextensionsnew++] = extensions[s];
2658 nextensions = nextensionsnew;
2666 for (s = 0; s < *cliquesize; ++s)
2672 assert( ! coveredvars[ind] );
2673 coveredvars[ind] =
TRUE;
2703 int* varindincons =
NULL;
2706 int ntrafolinvars = 0;
2724 *implupdate =
FALSE;
2728 if ( conshdlrlinear ==
NULL )
2744 for (
c = 0;
c < nlinearconss + nsos1vars && ! (*cutoff); ++
c)
2747 int** cliquecovers =
NULL;
2748 int* cliquecoversizes =
NULL;
2752 int* varincover =
NULL;
2761 if (
c < nlinearconss )
2768 if ( ntrafolinvars < 1 )
2797 trafolinvars[0] = sosvar;
2798 trafolinvals[0] = 1.0;
2803 assert( ntrafolinvars >= 1 );
2808 if( requiredsize > ntrafolinvars )
2815 assert(requiredsize == ntrafolinvars);
2817 trafolhs -= constant;
2819 traforhs -= constant;
2821 if ( ntrafolinvars == 0 )
2829 if ( sosvar !=
NULL )
2831 trafolinvals[ntrafolinvars] = -1.0;
2832 trafolinvars[ntrafolinvars] = sosvar;
2837 for (v = 0; v < ntrafolinvars; ++v)
2845 if ( trafolinvals[v] < 0.0 )
2853 trafolbs[v] = lb * trafolinvals[v];
2858 trafoubs[v] = ub * trafolinvals[v];
2862 for (v = 0; v < nsos1vars; ++v)
2863 varindincons[v] = -1;
2866 for (v = 0; v < ntrafolinvars; ++v)
2873 varindincons[node] = v;
2881 for (
i = 0;
i < ntrafolinvars; ++
i)
2891 for (v = 0; v < ntrafolinvars; ++v)
2894 if ( ! coveredvars[v] )
2907 for (v = 0; v < ntrafolinvars; ++v)
2924 for (s = 0; s < nsucc; ++s)
2929 if ( varindincons[succnode] == -1 )
2932 varindincons[succnode] = -2;
2943 for (
i = 0;
i < ncliquecovers; ++
i)
2945 for (j = 0; j < cliquecoversizes[
i]; ++j)
2947 int ind = cliquecovers[
i][j];
2949 varincover[ind] =
i;
2950 cliquecovervals[j] = trafoubs[ind];
2956 for (v = 0; v < ntrafolinvars + nsos1linvars; ++v)
2970 int ninftynonzero = 0;
2974 if ( v < ntrafolinvars )
2976 var = trafolinvars[v];
2977 trafoubv = trafoubs[v];
2981 assert( v >= ntrafolinvars );
2982 var = sos1linvars[v-ntrafolinvars];
2992 newboundnonzero = trafolhs;
2993 newboundnores = trafolhs;
2995 assert( nodev < nsos1vars );
2998 for (
w = 0;
w < nsos1vars; ++
w)
3003 for (
i = 0;
i < ncliquecovers; ++
i)
3008 assert( cliquecoversizes[
i] > 0 );
3010 indcliq = cliquecovers[
i][0];
3011 assert( 0 <= indcliq && indcliq < ntrafolinvars );
3019 newboundnores -= trafoubs[indcliq];
3021 else if ( cliquecoversizes[
i] > 1 )
3023 assert( 0 <= cliquecovers[
i][1] && cliquecovers[
i][1] < ntrafolinvars );
3027 newboundnores -= trafoubs[cliquecovers[
i][1]];
3031 for (j = 0; j < cliquecoversizes[
i]; ++j)
3033 indcliq = cliquecovers[
i][j];
3034 assert( 0 <= indcliq && indcliq < ntrafolinvars );
3037 assert( nodecliq < nsos1vars );
3047 newboundnonzero -= trafoubs[indcliq];
3054 assert( ninftynonzero == 0 || inftynores );
3057 if ( ninftynonzero == 0 && v < ntrafolinvars )
3059 linval = trafolinvals[v];
3066 newbound = newboundnonzero;
3068 newbound =
MIN(0, newboundnonzero);
3119 SCIP_CALL(
updateImplicationGraphSOS1(
scip, conshdlrdata, conflictgraph, adjacencymatrix, implgraph, implhash, implnodes, totalvars, cliquecovers, cliquecoversizes, varincover,
3120 trafolinvars, trafolinvals, ntrafolinvars, trafoubs,
var, trafoubv, newboundnonzero, ninftynonzero,
TRUE, nchgbds, &update, &infeasible) );
3131 for (j = ncliquecovers-1; j >= 0; --j)
3144 for (
i = 0;
i < ncliquecovers; ++
i)
3146 for (j = 0; j < cliquecoversizes[
i]; ++j)
3148 int ind = cliquecovers[
i][j];
3150 varincover[ind] =
i;
3151 cliquecovervals[j] = trafolbs[ind];
3158 for (v = 0; v < ntrafolinvars + nsos1linvars; ++v)
3172 int ninftynonzero = 0;
3176 if ( v < ntrafolinvars )
3178 var = trafolinvars[v];
3179 trafolbv = trafolbs[v];
3183 assert( v-ntrafolinvars >= 0 );
3184 var = sos1linvars[v-ntrafolinvars];
3192 newboundnonzero = traforhs;
3193 newboundnores = traforhs;
3195 assert( nodev < nsos1vars );
3198 for (
w = 0;
w < nsos1vars; ++
w)
3203 for (
i = 0;
i < ncliquecovers; ++
i)
3208 assert( cliquecoversizes[
i] > 0 );
3210 indcliq = cliquecovers[
i][0];
3211 assert( 0 <= indcliq && indcliq < ntrafolinvars );
3220 newboundnores -= trafolbs[indcliq];
3222 else if ( cliquecoversizes[
i] > 1 )
3224 assert( 0 <= cliquecovers[
i][1] && cliquecovers[
i][1] < ntrafolinvars );
3228 newboundnores -= trafolbs[cliquecovers[
i][1]];
3232 for (j = 0; j < cliquecoversizes[
i]; ++j)
3234 indcliq = cliquecovers[
i][j];
3235 assert( 0 <= indcliq && indcliq < ntrafolinvars );
3238 assert( nodecliq < nsos1vars );
3249 newboundnonzero -= trafolbs[indcliq];
3256 assert( ninftynonzero == 0 || inftynores );
3259 if ( ninftynonzero == 0 && v < ntrafolinvars )
3261 linval = trafolinvals[v];
3268 newbound = newboundnonzero;
3270 newbound =
MAX(0, newboundnonzero);
3322 SCIP_CALL(
updateImplicationGraphSOS1(
scip, conshdlrdata, conflictgraph, adjacencymatrix, implgraph, implhash, implnodes, totalvars, cliquecovers, cliquecoversizes, varincover,
3323 trafolinvars, trafolinvals, ntrafolinvars, trafolbs,
var, trafolbv, newboundnonzero, ninftynonzero,
FALSE, nchgbds, &update, &infeasible) );
3332 for (j = ncliquecovers-1; j >= 0; --j)
3394 for (
i = 0;
i < nsos1vars; ++
i)
3403 totalvars[ntotalvars++] =
var;
3406 for (
i = 0;
i < nprobvars; ++
i)
3416 totalvars[ntotalvars++] =
var;
3424 updateconfl =
FALSE;
3425 for (j = 0; (j < conshdlrdata->maxtightenbds || conshdlrdata->maxtightenbds == -1 ) && !
cutoff; ++j)
3430 nchgbdssave = *nchgbds;
3432 assert( ntotalvars > 0 );
3433 SCIP_CALL(
tightenVarsBoundsSOS1(
scip, conshdlrdata, conflictgraph, implgraph, implhash, adjacencymatrix, totalvars, ntotalvars, nsos1vars, nchgbds, &implupdate, &
cutoff) );
3434 if ( *nchgbds > nchgbdssave )
3440 else if ( implupdate )
3447 if ( updateconfl && conshdlrdata->perfimplanalysis && !
cutoff )
3462 naddconsssave = *naddconss;
3463 for (
i = 0;
i < nsos1vars; ++
i)
3468 for (j = 0; j < nsos1vars; ++j)
3469 implnodes[j] =
FALSE;
3470 for (j = 0; j < ntotalvars; ++j)
3477 SCIP_CALL(
performImplicationGraphAnalysis(
scip, conshdlrdata, conflictgraph, totalvars, implgraph, implhash, adjacencymatrix,
i,
i, impllbs, implubs, implnodes, naddconss, &probingdepth, &infeasible) );
3486 SCIPdebugMsg(
scip,
"fixed variable %s with lower bound %f and upper bound %f to zero\n",
3496 if ( *naddconss > naddconsssave )
3513 for (j = ntotalvars-1; j >= 0; --j)
3522 for (s = nsucc-1; s >= 0; --s)
3554 if ( consdata->nfixednonzeros > 1 )
3556 SCIPdebugMsg(
scip,
"the node is infeasible, more than 1 variable is fixed to be nonzero.\n");
3563 if ( consdata->nfixednonzeros == 1 )
3570 int firstFixedNonzero;
3574 firstFixedNonzero = -1;
3575 nvars = consdata->nvars;
3576 vars = consdata->vars;
3580 for (j = 0; j <
nvars; ++j)
3584 firstFixedNonzero = j;
3588 assert( firstFixedNonzero >= 0 );
3594 for (j = 0; j < firstFixedNonzero; ++j)
3599 allVarFixed = allVarFixed && success;
3605 for (j = firstFixedNonzero+1; j <
nvars; ++j)
3610 allVarFixed = allVarFixed && success;
3658 inferinfo = -node - 1;
3666 for (s = 0; s < nsucc; ++s)
3698 if ( implprop && implgraph !=
NULL )
3711 if ( succdatas !=
NULL )
3715 for (s = 0; s < nsucc; ++s)
3723 succdata = succdatas[s];
3803 assert( conshdlrdata->nimplnodes == 0 );
3811 if ( conshdlrdata->maxsosadjacency != -1 && nsos1vars > conshdlrdata->maxsosadjacency )
3814 SCIPdebugMsg(
scip,
"Implication graph was not created since number of SOS1 variables (%d) is larger than %d.\n", nsos1vars, conshdlrdata->maxsosadjacency);
3837 for (
i = 0;
i < nsos1vars; ++
i)
3846 implvars[nimplnodes++] =
var;
3849 for (
i = 0;
i < nprobvars; ++
i)
3859 implvars[nimplnodes++] =
var;
3862 conshdlrdata->nimplnodes = nimplnodes;
3865 for (
i = 0;
i < nimplnodes; ++
i)
3881 for (
i = 0;
i < nsos1vars; ++
i)
3885 for (
i = 0;
i < nsos1vars; ++
i)
3887 for (j = 0; j <
i+1; ++j)
3888 adjacencymatrix[
i][j] = 0;
3891 for (
i = 0;
i < nsos1vars; ++
i)
3898 for (j = 0; j < nsucc; ++j)
3901 adjacencymatrix[
i][succ[j]] = 1;
3908 for (j = 0; (j < maxrounds || maxrounds == -1 ); ++j)
3913 nchgbdssave = *nchgbds;
3915 assert( nimplnodes > 0 );
3916 SCIP_CALL(
tightenVarsBoundsSOS1(
scip, conshdlrdata, conflictgraph, conshdlrdata->implgraph, implhash, adjacencymatrix, implvars, nimplnodes, nsos1vars, nchgbds, &implupdate,
cutoff) );
3917 if ( *
cutoff || ( ! implupdate && ! ( *nchgbds > nchgbdssave ) ) )
3922 for (
i = nsos1vars-1;
i >= 0; --
i)
3935 else if ( *nchgbds > 0 )
3960 if ( conshdlrdata->implgraph ==
NULL )
3962 assert( conshdlrdata->nimplnodes == 0 );
3967 for (j = conshdlrdata->nimplnodes-1; j >= 0; --j)
3976 for (s = nsucc-1; s >= 0; --s)
3984 for (j = conshdlrdata->nimplnodes-1; j >= 0; --j)
3995 conshdlrdata->nimplnodes = 0;
4027 *ncoververtices = 0;
4030 if ( neightocover ==
NULL )
4032 assert( nneightocover == 0 );
4038 nsucc1 = nneightocover;
4039 succ1 = neightocover;
4043 for (s = 0; s < nsucc1; ++s)
4045 int succvertex1 = succ1[s];
4047 if ( ! verticesarefixed[succvertex1] )
4058 if ( *ncoververtices == 0 )
4060 for (j = 0; j < nsucc2; ++j)
4062 succvertex2 = succ2[j];
4063 if ( ! verticesarefixed[succvertex2] )
4064 coververtices[(*ncoververtices)++] = succvertex2;
4074 for (v = 0; v < *ncoververtices; ++v)
4077 for (j = k; j < nsucc2; ++j)
4079 succvertex2 = succ2[j];
4080 if ( succvertex2 > coververtices[v] )
4086 else if ( succvertex2 == coververtices[v] )
4089 coververtices[vv++] = succvertex2;
4096 *ncoververtices = vv;
4103 for (s = 0; s < *ncoververtices; ++s)
4105 assert( *ncoververtices <= 1 || coververtices[*ncoververtices - 1] > coververtices[*ncoververtices - 2] );
4136 assert( ! verticesarefixed[branchvertex] );
4157 for (j = 0; j < nsucc; ++j)
4161 assert( ! verticesarefixed[succ[j]] );
4162 fixingsnode1[(*nfixingsnode1)++] = succ[j];
4167 if ( *nfixingsnode1 > 0 )
4170 SCIP_CALL(
getCoverVertices(conflictgraph, verticesarefixed, branchvertex, fixingsnode1, *nfixingsnode1, fixingsnode2, nfixingsnode2) );
4173 SCIP_CALL(
getCoverVertices(conflictgraph, verticesarefixed, branchvertex, fixingsnode2, *nfixingsnode2, fixingsnode1, nfixingsnode1) );
4175 for (j = 0; j < *nfixingsnode2; ++j)
4186 for (j = 0; j < *nfixingsnode1; ++j)
4194 takeallsucc =
FALSE;
4203 for (j = 0; j < nsucc; ++j)
4205 if ( ! verticesarefixed[succ[j]] )
4206 fixingsnode1[(*nfixingsnode1)++] = succ[j];
4212 SCIP_CALL(
getCoverVertices(conflictgraph, verticesarefixed, branchvertex, fixingsnode1, *nfixingsnode1, fixingsnode2, nfixingsnode2) );
4217 fixingsnode2[0] = branchvertex;
4239 int* vertexbestprior,
4257 if ( vertexbestprior !=
NULL )
4258 *vertexbestprior = -1;
4260 for (
i = 0;
i < nsos1vars; ++
i)
4281 assert( ! verticesarefixed[
i] );
4284 for (j = 0; j < nfixingsnode1; ++j)
4294 for (j = 0; j < nfixingsnode2; ++j)
4304 if ( iszero1 || iszero2 )
4307 prior = sum1 * sum2;
4310 if ( branchpriors !=
NULL )
4311 branchpriors[
i] = prior;
4312 if ( bestprior < prior )
4316 if ( vertexbestprior !=
NULL )
4317 *vertexbestprior =
i;
4324 *relsolfeas =
FALSE;
4343 int* ndomainfixings,
4355 assert( nfixingsop > 0 );
4357 assert( nfixingsop > 0 );
4358 assert( inititer >= -1 );
4361 assert( *ndomainfixings >= 0 );
4368 *infeasible =
FALSE;
4374 if ( fixnonzero && nfixingsop == 1 )
4414 for (
i = 0;
i < nfixingsexec && ! *infeasible; ++
i)
4428 if ( ! *infeasible )
4454 for (
i = 0;
i < nfixingsop; ++
i)
4455 domainfixings[(*ndomainfixings)++] = fixingsop[
i];
4486 int* vertexbestprior,
4493 int* indsos1vars =
NULL;
4494 int* domainfixings =
NULL;
4501 int lastscorechange;
4524 bipbranch, fixingsnode1, fixingsnode2, branchpriors,
NULL, &relsolfeas) );
4530 *vertexbestprior = -1;
4544 for (j = 0; j < nsos1vars; ++j)
4564 if ( conshdlrdata->nstrongiter == -2 )
4568 inititer =
MAX(inititer, 10);
4569 inititer =
MIN(inititer, 500);
4572 inititer = conshdlrdata->nstrongiter;
4579 lastscorechange = -1;
4581 *vertexbestprior = indsos1vars[0];
4585 maxfailures = nstrongrounds;
4588 for (j = 0; j < nstrongrounds; ++j)
4593 testvertex = indsos1vars[j];
4606 assert( ! verticesarefixed[testvertex] );
4608 fixingsnode1, &nfixingsnode1, fixingsnode2, &nfixingsnode2) );
4612 inititer, conshdlrdata->fixnonzero, domainfixings, &ndomainfixings, &infeasible1, &objval1, &
lperror) );
4618 inititer,
FALSE, domainfixings, &ndomainfixings, &infeasible2, &objval2, &
lperror) );
4623 if ( infeasible1 && infeasible2 )
4637 else if ( ! infeasible1 && ! infeasible2 )
4640 if ( ndomainfixings == 0 )
4647 *vertexbestprior = testvertex;
4648 *bestobjval1 = objval1;
4649 *bestobjval2 = objval2;
4651 lastscorechange = j;
4653 else if ( j - lastscorechange > maxfailures )
4661 if ( ndomainfixings > 0 )
4666 for (
i = 0;
i < ndomainfixings; ++
i)
4711 int* extensions =
NULL;
4712 int nextensions = 0;
4730 if ( boundvar ==
NULL )
4750 else if ( boundvar ==
nodedata->ubboundvar )
4774 *feas += coef * solval;
4790 for (s = 0; s < nsucc; ++s)
4791 extensions[s] = succ[s];
4792 nextensions = nsucc;
4798 while ( nextensions > 0 )
4816 for (s = 0; s < nextensions; ++s)
4818 ext = extensions[s];
4822 bestbigMval = bigMval;
4827 assert( bestindex != -1 );
4834 if ( boundvar ==
NULL )
4854 else if ( boundvar ==
nodedata->ubboundvar )
4877 *feas += coef * solval;
4886 for (s = 0; s < nextensions; ++s)
4889 extensions[nextensionsnew++] = extensions[s];
4891 nextensions = nextensionsnew;
4902 if ( boundvar ==
NULL )
4947 if ( nfixingsnode2 > 1 )
4973 for (
i = 0;
i < nsos1vars; ++
i)
4974 mark[
i] = (verticesarefixed[
i]);
4977 for (
i = 0;
i < nfixingsnode1; ++
i)
4979 assert( nfixingsnode1 <= 1 || (fixingsnode1[nfixingsnode1 - 1] > fixingsnode1[nfixingsnode1 - 2]) );
4980 mark[fixingsnode1[
i]] =
TRUE;
4984 for (
i = 0;
i < nfixingsnode2; ++
i)
4986 assert( nfixingsnode2 <= 1 || (fixingsnode2[nfixingsnode2 - 1] > fixingsnode2[nfixingsnode2 - 2]) );
4987 mark[fixingsnode2[
i]] =
TRUE;
4992 for (
i = 0;
i < nfixingsnode2; ++
i)
4997 for (s = 0; s < nsucc; ++s)
4999 int succnode = succ[s];
5001 if ( ! mark[succnode] )
5003 mark[succnode] =
TRUE;
5004 succarray[nsuccarray++] = succnode;
5013 for (
i = 0;
i < nsos1vars; ++
i)
5017 for (
i = 0;
i < nfixingsnode2; ++
i)
5018 mark[fixingsnode2[
i]] =
TRUE;
5021 for (
i = 0;
i < nsuccarray; ++
i)
5028 vertex1 = succarray[
i];
5040 for (s = 0; s < nsucc; ++s)
5042 if ( mark[succ[s]] )
5044 fixingsnode21[nfixingsnode21++] = succ[s];
5045 assert( nfixingsnode21 == 1 || (fixingsnode21[nfixingsnode21 - 1] > fixingsnode21[nfixingsnode21 - 2]) );
5050 if ( nfixingsnode21 == nfixingsnode2 )
5061 assert ( nfixingsnode22 + nfixingsnode21 == nfixingsnode2 );
5064 SCIP_CALL(
getCoverVertices(conflictgraph, verticesarefixed, -1, fixingsnode22, nfixingsnode22, coverarray, &ncoverarray) );
5068 for (j = 0; j < ncoverarray; ++j)
5072 vertex2 = coverarray[j];
5073 assert( vertex2 != vertex1 );
5076 if ( vertex2 < vertex1 )
5106 lbboundcoef1 =
nodedata->lbboundcoef;
5107 ubboundcoef1 =
nodedata->ubboundcoef;
5111 lbboundcoef2 =
nodedata->lbboundcoef;
5112 ubboundcoef2 =
nodedata->ubboundcoef;
5118 if ( conshdlrdata->addextendedbds )
5120 if ( localconflicts ==
NULL )
5123 localconflicts = conshdlrdata->localconflicts;
5137 conshdlrdata->isconflocal =
TRUE;
5177 feas += solval1/ubboundcoef1;
5183 feas += solval1/lbboundcoef1;
5190 feas += solval2/ubboundcoef2;
5196 feas += solval2/lbboundcoef2;
5201 if (
SCIPisGT(
scip, feas, conshdlrdata->addcompsfeas) )
5205 SCIP_CALL(
SCIPcreateConsSOS1(
scip, &conssos1, name, 0,
NULL,
NULL,
TRUE,
TRUE,
TRUE,
FALSE,
TRUE,
5229 SCIP_CALL(
SCIPcreateConsLinear(
scip, &conssos1, name, 0,
NULL,
NULL, -
SCIPinfinity(
scip), 0.0,
TRUE,
FALSE,
TRUE,
FALSE,
FALSE,
5238 SCIP_CALL(
SCIPcreateConsLinear(
scip, &conssos1, name, 0,
NULL,
NULL, -
SCIPinfinity(
scip), 1.0,
TRUE,
FALSE,
TRUE,
FALSE,
FALSE,
5257 if ( conshdlrdata->maxaddcomps >= 0 && *naddedconss > conshdlrdata->maxaddcomps )
5265 if ( conshdlrdata->maxaddcomps >= 0 && *naddedconss > conshdlrdata->maxaddcomps )
5291 for (j = 0; j < nsos1vars; ++j)
5353 int* fixingsnode1 =
NULL;
5354 int* fixingsnode2 =
NULL;
5386 nsos1vars = conshdlrdata->nsos1vars;
5389 if ( nsos1vars == 0 || nconss == 0 )
5396 conflictgraph = conshdlrdata->conflictgraph;
5397 assert( ! conshdlrdata->isconflocal );
5400 for (
c = 0;
c < nconss; ++
c)
5413 if ( consdata->nvars < 2 )
5432 if ( consdata->local )
5439 if ( conshdlrdata->localconflicts ==
NULL )
5444 vars = consdata->vars;
5445 nvars = consdata->nvars;
5458 for (j =
i+1; j <
nvars; ++j)
5476 conshdlrdata->isconflocal =
TRUE;
5486 if ( conshdlrdata->isconflocal )
5488 for (j = 0; j < nsos1vars; ++j)
5504 if ( conshdlrdata->isconflocal )
5507 conshdlrdata->isconflocal =
FALSE;
5514 for (j = 0; j < nsos1vars; ++j)
5524 verticesarefixed[j] =
TRUE;
5526 verticesarefixed[j] =
FALSE;
5530 if ( conshdlrdata->branchingrule ==
'b' )
5534 if ( conshdlrdata->nstrongrounds >= 0 )
5535 nstrongrounds =
MIN(conshdlrdata->nstrongrounds, nsos1vars);
5545 nstrongrounds =
MIN(nsos1vars, nstrongrounds);
5556 if ( nstrongrounds == 0 )
5562 bipbranch, fixingsnode1, fixingsnode2,
NULL, &branchvertex, &relsolfeas) );
5573 if ( conshdlrdata->isconflocal )
5576 conshdlrdata->isconflocal =
FALSE;
5591 bipbranch, nstrongrounds, verticesarefixed, fixingsnode1, fixingsnode2, &branchvertex, &bestobjval1,
5597 if ( conshdlrdata->isconflocal )
5600 conshdlrdata->isconflocal =
FALSE;
5613 if ( ! conshdlrdata->branchsos )
5616 if ( conshdlrdata->isconflocal )
5619 conshdlrdata->isconflocal =
FALSE;
5627 assert( branchvertex >= 0 && branchvertex < nsos1vars );
5635 SCIPerrorMessage(
"Incompatible parameter setting: branchsos can only be set to false if all SOS1 variables are binary.\n");
5643 assert( branchvertex >= 0 && branchvertex < nsos1vars );
5644 assert( ! verticesarefixed[branchvertex] );
5646 fixingsnode1, &nfixingsnode1, fixingsnode2, &nfixingsnode2) );
5651 for (j = 0; j < nfixingsnode1; ++j)
5665 if ( conshdlrdata->fixnonzero && nfixingsnode2 == 1 )
5705 for (j = 0; j < nfixingsnode1; ++j)
5715 for (j = 0; j < nfixingsnode2; ++j)
5729 for (j = 0; j < nfixingsnode2; ++j)
5736 if ( conshdlrdata->addcomps && ( conshdlrdata->addcompsdepth == -1 || conshdlrdata->addcompsdepth >=
SCIPgetDepth(
scip) ) )
5740 assert( ! conshdlrdata->fixnonzero );
5744 nsos1vars, verticesarefixed, fixingsnode1, nfixingsnode1, fixingsnode2, nfixingsnode2, &naddedconss,
TRUE) );
5746 if ( naddedconss == 0 )
5750 nsos1vars, verticesarefixed, fixingsnode2, nfixingsnode2, fixingsnode1, nfixingsnode1, &naddedconss,
TRUE) );
5755 if ( nstrongrounds > 0 )
5762 if ( conshdlrdata->isconflocal )
5765 conshdlrdata->isconflocal =
FALSE;
5846 for (
c = 0;
c < nconss; ++
c)
5862 nvars = consdata->nvars;
5863 vars = consdata->vars;
5886 for (j = 0; j <
nvars; ++j)
5892 if ( conshdlrdata->branchnonzeros )
5896 if ( conshdlrdata->branchweight && consdata->weights !=
NULL )
5899 if ( consdata->weights[j] > weight )
5900 weight = consdata->weights[j];
5909 if ( cnt > 1 && weight > maxWeight )
5924 if ( ! conshdlrdata->branchsos )
5929 for (j = 0; j < consdata->nvars; ++j)
5935 if ( j == consdata->nvars )
5942 SCIPerrorMessage(
"Incompatible parameter setting: branchsos can only be set to false if all SOS1 variables are binary.\n");
5951 nvars = consdata->nvars;
5952 vars = consdata->vars;
5990 for (j = 0; j <
nvars; ++j)
6004 w = weight1/weight2;
6015 for (j = 0; j <= ind; ++j)
6024 for (j = 0; j <= ind; ++j)
6033 for (j = ind+1; j <
nvars; ++j)
6042 for (j = ind+1; j <
nvars; ++j)
6077 if ( conshdlrdata->addcomps && conshdlrdata->fixnonzero )
6079 SCIPerrorMessage(
"Incompatible parameter setting: addcomps = TRUE and fixnonzero = TRUE.\n");
6083 if ( conshdlrdata->fixnonzero && ( conshdlrdata->branchingrule ==
'b' || conshdlrdata->branchingrule ==
's' ) )
6085 SCIPerrorMessage(
"Incompatible parameter setting: nonzero fixing is not compatible with bipartite or sos1 branching.\n");
6089 if ( conshdlrdata->branchingrule ==
's' && conshdlrdata->nstrongrounds != 0 )
6091 SCIPerrorMessage(
"Strong branching is not available for SOS1 branching.\n");
6095 if ( conshdlrdata->branchingrule ==
's' || conshdlrdata->switchsos1branch )
6102 if ( conshdlrdata->branchingrule !=
'n' && conshdlrdata->branchingrule !=
'b' )
6104 SCIPerrorMessage(
"branching rule %c unknown\n", conshdlrdata->branchingrule);
6136 for (j = 0; j < nsos1vars; ++j)
6143 for (j = 0; j < nsos1vars; ++j)
6153 for (
i = 0;
i < nsucc; ++
i)
6170 tcliquedata = conshdlrdata->tcliquedata;
6178 tcliquedata->
ncuts = 0;
6179 tcliquedata->
nboundcuts = conshdlrdata->nboundcuts;
6181 tcliquedata->
maxboundcuts = conshdlrdata->maxboundcutsroot;
6203 for (j = 0; j < nsos1vars; ++j)
6214 if ( conshdlrdata->strthenboundcuts )
6221 if ( conshdlrdata->strthenboundcuts )
6267 if ( rowlb !=
NULL )
6278 ++tcliquedata->
ncuts;
6284 if ( rowub !=
NULL )
6295 ++tcliquedata->
ncuts;
6334 const char* nameext,
6350 assert( ! local || ! global );
6358 if ( rowub !=
NULL )
6367 useboundvar = strengthen;
6368 for (j = 0; j <
nnodes; ++j)
6382 useboundvar =
FALSE;
6403 if ( ubboundvar ==
NULL )
6409 else if ( ubboundvar ==
nodedata->ubboundvar )
6413 useboundvar =
FALSE;
6435 vals[cnt++] = 1.0/val;
6440 if ( j ==
nnodes && cnt >= 2 )
6450 rhs = rhs * vals[0] * vals[1];
6451 assert( (! useboundvar && cnt == 2 ) || (useboundvar && cnt == 3 ) );
6457 vars[cnt] = ubboundvar;
6479 if ( rowlb !=
NULL )
6488 useboundvar = strengthen;
6489 for (j = 0; j <
nnodes; ++j)
6503 useboundvar =
FALSE;
6524 if ( lbboundvar ==
NULL )
6536 useboundvar =
FALSE;
6558 vals[cnt++] = 1.0/val;
6563 if ( j ==
nnodes && cnt >= 2 )
6573 rhs = rhs * vals[0] * vals[1];
6574 assert( (! useboundvar && cnt == 2 ) || (useboundvar && cnt == 3 ) );
6580 vars[cnt] = lbboundvar;
6623 *stopsolving =
FALSE;
6626 minweightinc = (cliqueweight - *minweight)/10;
6627 minweightinc =
MAX(minweightinc, 1);
6628 *minweight += minweightinc;
6631 if( cliqueweight > tcliquedata->scaleval )
6642 scip = tcliquedata->scip;
6643 sol = tcliquedata->sol;
6647 unscaledweight = 0.0;
6648 for(
i = 0;
i < ncliquenodes;
i++ )
6650 node = cliquenodes[
i];
6656 if ( tcliquedata->strthenboundcuts )
6663 if ( tcliquedata->strthenboundcuts )
6689 cliquenodes, ncliquenodes, 1.0,
FALSE,
FALSE, tcliquedata->strthenboundcuts,
FALSE, nameext, &rowlb, &rowub) !=
SCIP_OKAY )
6704 if ( rowlb !=
NULL )
6713 if ( rowub !=
NULL )
6726 SCIPdebugMsg(
scip,
" -> found bound cut corresponding to clique (act=%g)\n", unscaledweight);
6731 if( tcliquedata->maxboundcuts >= 0 )
6733 if ( tcliquedata->ncuts > tcliquedata->maxboundcuts/2 )
6735 if ( tcliquedata->ncuts >= tcliquedata->maxboundcuts )
6736 *stopsolving =
TRUE;
6740 *stopsolving =
TRUE;
6765 int maxtreenodes = 10000;
6766 int maxzeroextensions = 1000;
6767 int backtrackfreq = 1000;
6785 tcliquedata = conshdlrdata->tcliquedata;
6789 tcliquedata->
ncuts = 0;
6799 tcliqueMaxClique(tcliqueGetNNodes, tcliqueGetWeights, tcliqueIsEdge, tcliqueSelectAdjnodes,
6800 conshdlrdata->tcliquegraph, tcliqueNewsolClique, tcliquedata,
6801 cliquenodes, &ncliquenodes, &cliqueweight, (
int)scaleval-1, (
int)scaleval+1,
6802 maxtreenodes, backtrackfreq, maxzeroextensions, -1, &ntreenodes, &tcliquestatus);
6808 *ngen = tcliquedata->
ncuts;
6814 conshdlrdata->nboundcuts = tcliquedata->
nboundcuts;
6849 nvars = consdata->nvars;
6860 for (j = 0; j <
nvars; ++j)
6907 for (
c = 0;
c < nconss; ++
c)
6930 if ( consdata->local )
6937 if ( consdata->rowub ==
NULL || consdata->rowlb ==
NULL )
6940 (consdata->rowlb ==
NULL) ? &consdata->rowlb :
NULL,
6941 (consdata->rowub ==
NULL) ? &consdata->rowub :
NULL) );
6943 rowub = consdata->rowub;
6944 rowlb = consdata->rowlb;
6975 if ( rowlb !=
NULL )
6979 if ( rowub !=
NULL )
6985 if ( *
cutoff || ( maxboundcuts >= 0 && cnt >= maxboundcuts ) )
7024 if ( conshdlrdata->conflictgraph ==
NULL )
7028 implgraph = conshdlrdata->implgraph;
7031 if ( implgraph ==
NULL )
7039 if ( *
cutoff || ! success )
7041 implgraph = conshdlrdata->implgraph;
7048 nimplnodes = conshdlrdata->nimplnodes;
7058 for (
i = 0;
i < nimplnodes && ! genbreak; ++
i)
7080 for (s = 0; s < nsucc && ! genbreak; ++s)
7095 succdata = succdatas[s];
7109 bound1lower =
FALSE;
7114 for (k = 0; k < 2; ++k)
7122 impl = succdata->lbimpl;
7134 impl = succdata->ubimpl;
7148 bound2lower =
FALSE;
7151 lhsrhs = bound1 * bound2;
7154 if ( bound1lower == bound2lower )
7156 if (
SCIPisFeasGT(
scip, solval * (bound2-impl) + solvalsucc * bound1, lhsrhs) )
7165 if (
SCIPisFeasLT(
scip, solval * (bound2-impl) + solvalsucc * bound1, lhsrhs) )
7205 if ( maxcuts >= 0 && *ngen > maxcuts )
7260 if ( conshdlrdata->boundcutsfreq >= 0 &&
7261 ( (conshdlrdata->boundcutsfreq == 0 &&
depth == 0) || (conshdlrdata->boundcutsfreq > 0 &&
depth % conshdlrdata->boundcutsfreq == 0)) )
7268 maxboundcuts = conshdlrdata->maxboundcutsroot;
7270 maxboundcuts = conshdlrdata->maxboundcuts;
7272 if ( maxboundcuts >= 1 )
7275 if( conshdlrdata->boundcutsfromsos1 || conshdlrdata->switchcutsfromsos1 )
7288 if( conshdlrdata->boundcutsfromgraph && ! conshdlrdata->switchcutsfromsos1 )
7307 if ( conshdlrdata->implcutsfreq >= 0 &&
7308 ( (conshdlrdata->implcutsfreq == 0 &&
depth == 0) || (conshdlrdata->implcutsfreq > 0 &&
depth % conshdlrdata->implcutsfreq == 0)) )
7315 maximplcuts = conshdlrdata->maximplcutsroot;
7317 maximplcuts = conshdlrdata->maximplcuts;
7320 if ( maximplcuts >= 1 )
7368 for (
i = 0;
i < nsos1vars; ++
i)
7372 if( nsucc == 0 || indicatorzero[
i] )
7386 for (j = 0; j < nsucc; ++j)
7393 sum +=
MIN(10E05, valsucc);
7403 val =
MIN(1e6, val);
7444 for (j = 0; j < nsucc && !(*cutoff); ++j)
7449 assert( indset[succj] == 0 );
7471 if ( aggrnode >= 0 )
7476 if ( ! mark[aggrnode] )
7478 mark[aggrnode] =
TRUE;
7481 else if ( indset[aggrnode] == 1 )
7490 if ( indset[aggrnode] == 0 )
7493 if ( mark[aggrnode] )
7500 indset[aggrnode] = 1;
7501 mark[aggrnode] =
TRUE;
7522 if ( indset[negnode] == 1 )
7527 else if ( ! mark[negnode] )
7529 mark[negnode] =
TRUE;
7569 int* indscipvars =
NULL;
7586 for (
i = 0;
i < nsos1vars; ++
i)
7594 for (
i = 0;
i < nsos1vars; ++
i)
7598 if ( indset[
i] == 0 )
7600 if( indicatorzero[
i] )
7605 else if ( nsucc == 0 )
7627 for (
i = 0; k < nsos1vars; ++
i)
7631 ind = indscipvars[
i];
7647 assert( k == nsos1vars );
7683 *allroundable =
TRUE;
7688 assert( nsos1vars >= 0 );
7699 for (j = 0; j < nsos1vars; ++j)
7712 indicatorzero[j] =
TRUE;
7715 indicatorzero[j] =
FALSE;
7720 *allroundable =
FALSE;
7726 indicatorzero[j] =
TRUE;
7733 if ( ! (*allroundable) )
7744 for (j = 0; j < nsos1vars; ++j)
7746 if ( indset[j] == 0 )
7766 for (
c = 0;
c < nconss; ++
c)
7772 for (j = 0; j < consdata->nvars; ++j)
7812 *allroundable =
TRUE;
7821 for (
c = 0;
c < nconss && *allroundable; ++
c)
7836 nvars = consdata->nvars;
7837 vars = consdata->vars;
7840 for (j = 0; j <
nvars; ++j)
7857 *allroundable =
FALSE;
7888 if ( ! (*allroundable) )
7890 else if ( pos >= 0 )
7897 if ( *allroundable )
7899 for (
c = 0;
c < nconss; ++
c)
7907 for (j = 0; j < consdata->nvars; ++j)
7958 for (v = 0; v < nsos1vars; ++v)
8004 fixneigh = !fixneigh;
8016 if ( score > bestscore )
8023 bestvarfixneigh = fixneigh;
8035 assert( bestnode >= 0 && bestnode < nsos1vars );
8045 for (s = 0; s < nsucc; ++s)
8098 for (
c = 0;
c < nconss; ++
c)
8108 nvars = consdata->nvars;
8109 vars = consdata->vars;
8112 for (j = 0; j <
nvars && cnt < 2; ++j)
8129 for (j = 0; j <
nvars; ++j)
8192 if ( score > bestscore )
8199 bestvarfixcomp = fixcomp;
8215 nvars = consdata->nvars;
8216 vars = consdata->vars;
8218 assert( bestcons >= 0 && bestcons < nconss );
8226 for (j = 0; j <
nvars; ++j)
8349 processed[node] =
TRUE;
8350 concomp[(*nconcomp)++] = node;
8366 if ( boundvar ==
NULL )
8368 if ( comparevar !=
NULL )
8373 if ( comparevar ==
NULL )
8383 for (s = 0; s < nsucc; ++s)
8385 if ( ! processed[succ[s]] )
8417 for (j = 0; j < nsos1vars; ++j)
8418 processed[j] =
FALSE;
8421 for (j = 0; j < nsos1vars; ++j)
8424 if ( ! processed[j] )
8442 processed[j] =
TRUE;
8449 for (s = 0; s < nsucc; ++s)
8451 if ( ! processed[succ[s]] )
8458 if ( unique && boundvar !=
NULL )
8460 for (s = 0; s < nconcomp; ++s)
8471 SCIPdebugMsg(
scip,
"Found a connected component of size <%i> with unique bound variable.\n", nconcomp);
8498 for (
c = 0;
c < nlinconss; ++
c)
8503 lincons = linconss[
c];
8573 if ( conshdlrdata->nsos1vars > 0 )
8575 for (
c = 0;
c < nconss && nonoverlap; ++
c)
8590 nvars = consdata->nvars;
8591 vars = consdata->vars;
8609 assert( node < conshdlrdata->nsos1vars );
8623 if ( conshdlrdata->autosos1branch )
8625 conshdlrdata->switchsos1branch =
TRUE;
8626 SCIPdebugMsg(
scip,
"Switched to SOS1 branching, since the SOS1 constraints do not overlap\n");
8629 if ( conshdlrdata->autocutsfromsos1 )
8631 conshdlrdata->switchcutsfromsos1 =
TRUE;
8632 SCIPdebugMsg(
scip,
"Switched to separating bound cuts from SOS1 constraints (and not from the conflict graph), since the SOS1 constraints do not overlap\n");
8653 if ( nsos1vars == 0 )
8658 if ( linconshdlr ==
NULL )
8704 for (
i = 0;
i < ntotalvars; ++
i)
8709 for (
c = 0;
c < nconss; ++
c)
8722 nvars = consdata->nvars;
8723 vars = consdata->vars;
8738 assert( ind >= 0 && ind < ntotalvars );
8739 if ( ! nodecreated[ind] )
8741 nodecreated[ind] =
TRUE;
8742 nodeorig[ind] = cntsos;
8753 conshdlrdata->nsos1vars = 0;
8758 for (
i = 0;
i < ntotalvars; ++
i)
8769 for (
c = 0;
c < nconss; ++
c)
8782 nvars = consdata->nvars;
8783 vars = consdata->vars;
8799 if ( ! nodecreated[indi] )
8823 nodecreated[indi] =
TRUE;
8828 for (j =
i+1; j <
nvars; ++j)
8853 conshdlrdata->nsos1vars = cntsos;
8860 for (j = 0; j < conshdlrdata->nsos1vars; ++j)
8881 if ( conshdlrdata->conflictgraph ==
NULL )
8883 assert( conshdlrdata->nsos1vars == 0 );
8888 assert( conshdlrdata->nsos1vars > 0 );
8889 for (j = 0; j < conshdlrdata->nsos1vars; ++j)
8894 assert( conshdlrdata->conflictgraph !=
NULL );
8907 conshdlrdata->nsos1vars = 0;
8910 assert( conshdlrdata->conflictgraph ==
NULL );
8970 conshdlrdata->nsos1vars = 0;
8971 conshdlrdata->varhash =
NULL;
8981 if ( ( conshdlrdata->autosos1branch || conshdlrdata->autocutsfromsos1 )
8982 && ( ! conshdlrdata->switchsos1branch || ! conshdlrdata->switchcutsfromsos1 )
8993 if ( conshdlrdata->addcomps )
8999 if ( conshdlrdata->fixnonzerovars ==
NULL )
9001 conshdlrdata->maxnfixnonzerovars = conshdlrdata->nsos1vars;
9024 for (
c = 0;
c < nconss; ++
c)
9036 if ( consdata->rowub !=
NULL )
9041 if ( consdata->rowlb !=
NULL )
9048 if ( conshdlrdata->implgraph !=
NULL )
9055 if ( conshdlrdata->tcliquegraph !=
NULL )
9066 conshdlrdata->nfixnonzerovars = 0;
9067 conshdlrdata->maxnfixnonzerovars = 0;
9070 if ( conshdlrdata->localconflicts !=
NULL )
9072 assert( conshdlrdata->localconflicts ==
NULL );
9076 assert( conshdlrdata->conflictgraph ==
NULL );
9105 for (j = 0; j < (*consdata)->nvars; ++j)
9113 if ( (*consdata)->weights !=
NULL )
9119 if ( (*consdata)->rowub !=
NULL )
9123 if ( (*consdata)->rowlb !=
NULL )
9162 assert( sourcedata->nvars > 0 );
9163 assert( sourcedata->nvars <= sourcedata->maxvars );
9166 if ( conshdlrdata->fixnonzerovars ==
NULL )
9175 consdata->nvars = sourcedata->nvars;
9176 consdata->maxvars = sourcedata->nvars;
9177 consdata->rowub =
NULL;
9178 consdata->rowlb =
NULL;
9179 consdata->nfixednonzeros = 0;
9180 consdata->local = sourcedata->local;
9185 if ( sourcedata->weights !=
NULL )
9190 consdata->weights =
NULL;
9192 for (j = 0; j < sourcedata->nvars; ++j)
9194 assert( sourcedata->vars[j] != 0 );
9199 ++(consdata->nfixednonzeros);
9212 for (j = 0; j < consdata->nvars; ++j)
9219 if ( consdata->nfixednonzeros > 0 )
9222 consdata->nfixednonzeros );
9235 SCIPdebug(
int oldnfixedvars = *nfixedvars; )
9237 SCIPdebug(
int oldndelconss = *ndelconss; )
9238 SCIPdebug(
int oldnupgdconss = *nupgdconss; )
9256 if( nconss > 0 && ( nrounds == 0 || nnewfixedvars > 0 || nnewaggrvars > 0 || nnewchgbds > 0 ) )
9276 conflictgraph = conshdlrdata->conflictgraph;
9277 nsos1vars = conshdlrdata->nsos1vars;
9278 if ( nsos1vars < 2 )
9285 if ( conshdlrdata->maxsosadjacency == -1 || nsos1vars <= conshdlrdata->maxsosadjacency )
9289 for (
i = 0;
i < nsos1vars; ++
i)
9295 for (
i = 0;
i < nsos1vars; ++
i)
9297 for (j = 0; j <
i+1; ++j)
9298 adjacencymatrix[
i][j] = 0;
9300 for (
i = 0;
i < nsos1vars; ++
i)
9308 for (j = 0; j < nsucc; ++j)
9311 adjacencymatrix[
i][succ[j]] = 1;
9317 SCIPdebugMsg(
scip,
"Adjacency matrix was not created since number of SOS1 variables (%d) is larger than %d.\n", nsos1vars, conshdlrdata->maxsosadjacency);
9321 SCIP_CALL(
presolRoundConssSOS1(
scip, eventhdlr, conshdlrdata, conflictgraph, adjacencymatrix, conss, nconss, nsos1vars, naddconss, ndelconss, nupgdconss, nfixedvars, &nremovedvars,
result) );
9323 if ( adjacencymatrix !=
NULL )
9332 for (j = nsos1vars-1; j >= 0; --j)
9340 (*nchgcoefs) += nremovedvars;
9342 SCIPdebug(
SCIPdebugMsg(
scip,
"presolving fixed %d variables, changed %d bounds, removed %d variables, deleted %d constraints, and upgraded %d constraints.\n",
9343 *nfixedvars - oldnfixedvars, *nchgbds - oldnchgbds, nremovedvars, *ndelconss - oldndelconss, *nupgdconss - oldnupgdconss); )
9362 *infeasible =
FALSE;
9365 if( conshdlrdata->boundcutsfromsos1 || conshdlrdata->switchcutsfromsos1 )
9485 for (j = 0; j < consdata->nvars; ++j)
9509 for (l = 0; l < consdata->nvars; ++l)
9558 conflictgraph = conshdlrdata->conflictgraph;
9561 implgraph = conshdlrdata->implgraph;
9562 if ( implgraph ==
NULL && conshdlrdata->implprop && conflictgraph !=
NULL )
9572 conshdlrdata->implprop =
FALSE;
9579 else if ( nchbds > 0 )
9581 implgraph = conshdlrdata->implgraph;
9584 conshdlrdata->implprop =
FALSE;
9588 if ( conshdlrdata->conflictprop && conflictgraph !=
NULL )
9591 int nfixnonzerovars;
9597 nfixnonzerovars = conshdlrdata->nfixnonzerovars;
9598 fixnonzerovars = conshdlrdata->fixnonzerovars;
9602 for (j = 0; j < nfixnonzerovars; ++j)
9606 var = fixnonzerovars[j];
9634 conshdlrdata->nfixnonzerovars = 0;
9637 if ( conshdlrdata->sosconsprop || conflictgraph ==
NULL )
9642 for (
c = 0;
c < nconss; ++
c)
9692 if ( inferinfo < 0 )
9701 assert( conshdlrdata->conflictgraph !=
NULL );
9702 assert( inferinfo >= -conshdlrdata->maxnfixnonzerovars );
9703 assert( inferinfo >= -conshdlrdata->nsos1vars );
9704 assert( inferinfo <= -1 );
9717 var = consdata->vars[inferinfo];
9771 vars = consdata->vars;
9772 nvars = consdata->nvars;
9775 for (j = 0; j <
nvars; ++j)
9812 for (j = 0; j < consdata->nvars; ++j)
9817 if ( consdata->weights ==
NULL )
9835 const char* consname;
9858 nvars = sourceconsdata->nvars;
9862 if ( sourceconsdata->weights !=
NULL )
9868 sourcevars = sourceconsdata->vars;
9880 initial,
separate, enforce, check,
propagate, local, dynamic, removable, stickingatnode) );
9910 SCIP_CALL(
SCIPcreateConsSOS1(
scip, cons, name, 0,
NULL,
NULL, initial,
separate, enforce, check,
propagate, local, dynamic, removable, stickingatnode) );
9937 weight = strtod(s, &t);
9990 if( varssize < consdata->
nvars )
10013 (*nvars) = consdata->nvars;
10046 assert( 0 <= consdata->nfixednonzeros && consdata->nfixednonzeros <= consdata->nvars );
10052 switch ( eventtype )
10065 if ( conshdlrdata->nfixnonzerovars < conshdlrdata->maxnfixnonzerovars )
10067 assert( conshdlrdata->fixnonzerovars !=
NULL );
10069 conshdlrdata->fixnonzerovars[conshdlrdata->nfixnonzerovars++] =
SCIPeventGetVar(event);
10072 ++(consdata->nfixednonzeros);
10087 if ( conshdlrdata->nfixnonzerovars < conshdlrdata->maxnfixnonzerovars )
10089 assert( conshdlrdata->fixnonzerovars !=
NULL );
10091 conshdlrdata->fixnonzerovars[conshdlrdata->nfixnonzerovars++] =
SCIPeventGetVar(event);
10094 ++(consdata->nfixednonzeros);
10101 --(consdata->nfixednonzeros);
10107 --(consdata->nfixednonzeros);
10138 assert( 0 <= consdata->nfixednonzeros && consdata->nfixednonzeros <= consdata->nvars );
10141 oldbound, newbound, consdata->nfixednonzeros);
10160 *infeasible =
FALSE;
10174 if ( conshdlrdata->switchsos1branch )
10208 nconsvars = consdata->nvars;
10219 for(
i = 0;
i < nconsvars; ++
i )
10221 locvars[0] = consvars[
i];
10274 nconsvars = consdata->nvars;
10285 for(
i = 0;
i < nconsvars; ++
i )
10287 locvars[0] = consvars[
i];
10307 allownegation =
TRUE;
10313 if( allownegation )
10333 for( j = 0; j < nlocvars; ++j )
10370 conshdlrdata->branchsos =
TRUE;
10371 conshdlrdata->switchsos1branch =
FALSE;
10372 conshdlrdata->switchcutsfromsos1 =
FALSE;
10373 conshdlrdata->eventhdlr =
NULL;
10374 conshdlrdata->fixnonzerovars =
NULL;
10375 conshdlrdata->maxnfixnonzerovars = 0;
10376 conshdlrdata->nfixnonzerovars = 0;
10377 conshdlrdata->conflictgraph =
NULL;
10378 conshdlrdata->localconflicts =
NULL;
10379 conshdlrdata->isconflocal =
FALSE;
10380 conshdlrdata->implgraph =
NULL;
10381 conshdlrdata->nimplnodes = 0;
10382 conshdlrdata->nboundcuts = 0;
10383 conshdlrdata->tcliquegraph =
NULL;
10384 conshdlrdata->tcliquedata =
NULL;
10385 conshdlrdata->cntextsos1 = -1;
10386 conshdlrdata->varhash =
NULL;
10387 conshdlrdata->nsos1vars = 0;
10391 if ( conshdlrdata->eventhdlr ==
NULL )
10400 consEnfolpSOS1, consEnfopsSOS1, consCheckSOS1, consLockSOS1, conshdlrdata) );
10428 "do not create an adjacency matrix if number of SOS1 variables is larger than predefined value (-1: no limit)",
10433 "maximal number of extensions that will be computed for each SOS1 constraint (-1: no limit)",
10437 "maximal number of bound tightening rounds per presolving round (-1: no limit)",
10441 "if TRUE then perform implication graph analysis (might add additional SOS1 constraints)",
10445 "number of recursive calls of implication graph analysis (-1: no limit)",
10450 "whether to use conflict graph propagation",
10454 "whether to use implication graph propagation",
10458 "whether to use SOS1 constraint propagation",
10463 "which branching rule should be applied ? ('n': neighborhood, 'b': bipartite, 's': SOS1/clique) (note: in some cases an automatic switching to SOS1 branching is possible)",
10467 "if TRUE then automatically switch to SOS1 branching if the SOS1 constraints do not overlap",
10471 "if neighborhood branching is used, then fix the branching variable (if positive in sign) to the value of the feasibility tolerance",
10475 "if TRUE then add complementarity constraints to the branching nodes (can be used in combination with neighborhood or bipartite branching)",
10479 "maximal number of complementarity constraints added per branching node (-1: no limit)",
10483 "minimal feasibility value for complementarity constraints in order to be added to the branching node",
10487 "minimal feasibility value for bound inequalities in order to be added to the branching node",
10491 "should added complementarity constraints be extended to SOS1 constraints to get tighter bound inequalities",
10495 "Use SOS1 branching in enforcing (otherwise leave decision to branching rules)? This value can only be set to false if all SOS1 variables are binary",
10499 "Branch on SOS constraint with most number of nonzeros?",
10503 "Branch on SOS cons. with highest nonzero-variable weight for branching (needs branchnonzeros = false)?",
10507 "only add complementarity constraints to branching nodes for predefined depth (-1: no limit)",
10512 "maximal number of strong branching rounds to perform for each node (-1: auto); only available for neighborhood and bipartite branching",
10516 "maximal number LP iterations to perform for each strong branching round (-2: auto, -1: no limit)",
10521 "if TRUE separate bound inequalities from initial SOS1 constraints",
10525 "if TRUE separate bound inequalities from the conflict graph",
10529 "if TRUE then automatically switch to separating initial SOS1 constraints if the SOS1 constraints do not overlap",
10533 "frequency for separating bound cuts; zero means to separate only in the root node",
10537 "node depth of separating bound cuts (-1: no limit)",
10541 "maximal number of bound cuts separated per branching node",
10545 "maximal number of bound cuts separated per iteration in the root node",
10549 "if TRUE then bound cuts are strengthened in case bound variables are available",
10553 "frequency for separating implied bound cuts; zero means to separate only in the root node",
10557 "node depth of separating implied bound cuts (-1: no limit)",
10561 "maximal number of implied bound cuts separated per branching node",
10565 "maximal number of implied bound cuts separated per iteration in the root node",
10614 modifiable =
FALSE;
10618 if ( conshdlr ==
NULL )
10631 for (v = 0; v <
nvars; ++v)
10638 consdata->vars =
NULL;
10639 consdata->nvars =
nvars;
10640 consdata->maxvars =
nvars;
10641 consdata->rowub =
NULL;
10642 consdata->rowlb =
NULL;
10643 consdata->nfixednonzeros = transformed ? 0 : -1;
10644 consdata->weights =
NULL;
10645 consdata->local = local;
10652 if ( weights !=
NULL )
10667 for (v = 0; v <
nvars; ++v)
10673 SCIP_CALL(
SCIPcreateCons(
scip, cons, name, conshdlr, consdata, initial,
separate, enforce, check,
propagate,
10674 local, modifiable, dynamic, removable, stickingatnode) );
10678 for (v =
nvars - 1; v >= 0; --v)
10718 SCIP_CALL(
SCIPcreateConsSOS1(
scip, cons, name,
nvars,
vars, weights,
TRUE,
TRUE,
TRUE,
TRUE,
TRUE,
FALSE,
FALSE,
FALSE,
FALSE) );
10814 return consdata->nvars;
10839 return consdata->vars;
10864 return consdata->weights;
10889 return conshdlrdata->conflictgraph;
10911 return conshdlrdata->nsos1vars;
10959 if ( conshdlrdata->varhash ==
NULL )
11025 allroundable =
FALSE;
11036 if ( conshdlrdata->switchsos1branch )
11045 if ( ! allroundable )
#define CONSHDLR_NEEDSCONS
#define CONSHDLR_SEPAFREQ
#define CONSHDLR_CHECKPRIORITY
#define CONSHDLR_PROP_TIMING
#define CONSHDLR_MAXPREROUNDS
#define CONSHDLR_SEPAPRIORITY
#define CONSHDLR_PROPFREQ
#define CONSHDLR_PRESOLTIMING
#define CONSHDLR_EAGERFREQ
#define CONSHDLR_ENFOPRIORITY
#define CONSHDLR_DELAYSEPA
#define CONSHDLR_DELAYPROP
#define EVENTHDLR_EVENT_TYPE
struct SCIP_NodeData SCIP_NODEDATA
static SCIP_RETCODE branchCons(SCIP *scip, SCIP_CONS *cons, SCIP_RESULT *result)
Constraint handler for linear constraints in their most general form, .
Constraint handler for the set partitioning / packing / covering constraints .
#define DEFAULT_MAXSOSADJACENCY
static SCIP_RETCODE lockVariableSOS1(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var)
#define DEFAULT_AUTOCUTSFROMSOS1
#define DEFAULT_MAXADDCOMPS
static SCIP_Bool isImpliedZero(SCIP_DIGRAPH *conflictgraph, SCIP_Bool *implnodes, int node)
static SCIP_RETCODE getDiveBdChgsSOS1constraints(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DIVESET *diveset, SCIP_SOL *sol, SCIP_Bool *success)
#define DEFAULT_BRANCHINGRULE
static SCIP_RETCODE updateWeightsTCliquegraph(SCIP *scip, SCIP_CONSHDLRDATA *conshdlrdata, TCLIQUE_DATA *tcliquedata, SCIP_DIGRAPH *conflictgraph, SCIP_SOL *sol, int nsos1vars)
static SCIP_RETCODE initTCliquegraph(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_DIGRAPH *conflictgraph, int nsos1vars)
#define DEFAULT_NSTRONGROUNDS
static SCIP_RETCODE consdataEnsurevarsSizeSOS1(SCIP *scip, SCIP_CONSDATA *consdata, int num, SCIP_Bool reserveWeights)
#define DEFAULT_MAXBOUNDCUTS
#define DEFAULT_MAXBOUNDCUTSROOT
static SCIP_RETCODE getBranchingDecisionStrongbranchSOS1(SCIP *scip, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_DIGRAPH *conflictgraph, SCIP_SOL *sol, int nsos1vars, SCIP_Real lpobjval, SCIP_Bool bipbranch, int nstrongrounds, SCIP_Bool *verticesarefixed, int *fixingsnode1, int *fixingsnode2, int *vertexbestprior, SCIP_Real *bestobjval1, SCIP_Real *bestobjval2, SCIP_RESULT *result)
static SCIP_RETCODE appendVarSOS1(SCIP *scip, SCIP_CONS *cons, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_VAR *var)
static SCIP_RETCODE computeNodeDataSOS1(SCIP *scip, SCIP_CONSHDLRDATA *conshdlrdata, int nsos1vars)
#define DIVINGCUTOFFVALUE
static SCIP_RETCODE maxWeightIndSetHeuristic(SCIP *scip, SCIP_SOL *sol, SCIP_CONSHDLR *conshdlr, SCIP_DIGRAPH *conflictgraph, int nsos1vars, SCIP_Bool *indicatorzero, SCIP_Bool *indset)
static SCIP_Bool varIsSOS1(SCIP_CONSHDLRDATA *conshdlrdata, SCIP_VAR *var)
#define DEFAULT_AUTOSOS1BRANCH
#define DEFAULT_ADDEXTENDEDBDS
#define DEFAULT_MAXTIGHTENBDS
static SCIP_RETCODE tightenVarsBoundsSOS1(SCIP *scip, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_DIGRAPH *conflictgraph, SCIP_DIGRAPH *implgraph, SCIP_HASHMAP *implhash, SCIP_Bool **adjacencymatrix, SCIP_VAR **totalvars, int ntotalvars, int nsos1vars, int *nchgbds, SCIP_Bool *implupdate, SCIP_Bool *cutoff)
static SCIP_Real nodeGetSolvalVarboundUbSOS1(SCIP *scip, SCIP_DIGRAPH *conflictgraph, SCIP_SOL *sol, int node)
static SCIP_RETCODE handleNewVariableSOS1(SCIP *scip, SCIP_CONS *cons, SCIP_CONSDATA *consdata, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_VAR *var, SCIP_Bool transformed)
#define DEFAULT_BOUNDCUTSDEPTH
#define DEFAULT_DEPTHIMPLANALYSIS
static SCIP_RETCODE getVectorOfWeights(SCIP *scip, SCIP_SOL *sol, SCIP_DIGRAPH *conflictgraph, int nsos1vars, SCIP_Bool *indicatorzero, SCIP_Real *weights)
static SCIP_RETCODE getCoverVertices(SCIP_DIGRAPH *conflictgraph, SCIP_Bool *verticesarefixed, int vertex, int *neightocover, int nneightocover, int *coververtices, int *ncoververtices)
static SCIP_RETCODE getBoundConsFromVertices(SCIP *scip, SCIP_DIGRAPH *conflictgraph, SCIP_SOL *sol, int v1, int v2, SCIP_VAR *boundvar, SCIP_Bool extend, SCIP_CONS *cons, SCIP_Real *feas)
static SCIP_RETCODE updateImplicationGraphSOS1(SCIP *scip, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_DIGRAPH *conflictgraph, SCIP_Bool **adjacencymatrix, SCIP_DIGRAPH *implgraph, SCIP_HASHMAP *implhash, SCIP_Bool *implnodes, SCIP_VAR **totalvars, int **cliquecovers, int *cliquecoversizes, int *varincover, SCIP_VAR **vars, SCIP_Real *coefs, int nvars, SCIP_Real *bounds, SCIP_VAR *var, SCIP_Real bound, SCIP_Real boundnonzero, int ninftynonzero, SCIP_Bool lower, int *nchgbds, SCIP_Bool *update, SCIP_Bool *infeasible)
static SCIP_RETCODE checkSwitchNonoverlappingSOS1Methods(SCIP *scip, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_DIGRAPH *conflictgraph, SCIP_CONS **conss, int nconss)
static SCIP_RETCODE enforceConflictgraph(SCIP *scip, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_CONSHDLR *conshdlr, int nconss, SCIP_CONS **conss, SCIP_SOL *sol, SCIP_RESULT *result)
static SCIP_RETCODE makeSOS1conflictgraphFeasible(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_SOL *sol, SCIP_Bool *changed, SCIP_Bool *allroundable)
static SCIP_RETCODE getDiveBdChgsSOS1conflictgraph(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DIVESET *diveset, SCIP_SOL *sol, SCIP_Bool *success)
static SCIP_RETCODE sepaImplBoundCutsSOS1(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_SOL *sol, int maxcuts, int *ngen, SCIP_Bool *cutoff)
static int varGetNodeSOS1(SCIP_CONSHDLRDATA *conshdlrdata, SCIP_VAR *var)
#define DEFAULT_STRTHENBOUNDCUTS
static SCIP_RETCODE passConComponentVarbound(SCIP *scip, SCIP_DIGRAPH *conflictgraph, int node, SCIP_VAR *boundvar, SCIP_Bool checklb, SCIP_Bool *processed, int *concomp, int *nconcomp, SCIP_Bool *unique)
#define DEFAULT_BRANCHSTRATEGIES
static SCIP_RETCODE detectVarboundSOS1(SCIP *scip, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_VAR *var0, SCIP_VAR *var1, SCIP_Real val0, SCIP_Real val1)
static SCIP_Bool isViolatedSOS1(SCIP *scip, SCIP_DIGRAPH *conflictgraph, int node, SCIP_SOL *sol)
#define DEFAULT_SOSCONSPROP
static SCIP_RETCODE propVariableNonzero(SCIP *scip, SCIP_DIGRAPH *conflictgraph, SCIP_DIGRAPH *implgraph, SCIP_CONS *cons, int node, SCIP_Bool implprop, SCIP_Bool *cutoff, int *ngen)
static SCIP_RETCODE presolRoundConsSOS1(SCIP *scip, SCIP_CONS *cons, SCIP_CONSDATA *consdata, SCIP_EVENTHDLR *eventhdlr, SCIP_Bool *substituted, SCIP_Bool *cutoff, SCIP_Bool *success, int *ndelconss, int *nupgdconss, int *nfixedvars, int *nremovedvars)
static SCIP_RETCODE checkLinearConssVarboundSOS1(SCIP *scip, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_CONS **linconss, int nlinconss)
#define DEFAULT_MAXEXTENSIONS
#define DEFAULT_FIXNONZERO
static SCIP_RETCODE fixVariableZeroNode(SCIP *scip, SCIP_VAR *var, SCIP_NODE *node, SCIP_Bool *infeasible)
static SCIP_RETCODE makeSOS1constraintsFeasible(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_SOL *sol, SCIP_Bool *changed, SCIP_Bool *allroundable)
static SCIP_RETCODE freeConflictgraph(SCIP *scip, SCIP_CONSHDLRDATA *conshdlrdata)
#define DEFAULT_ADDCOMPSFEAS
static SCIP_RETCODE updateArcData(SCIP *scip, SCIP_DIGRAPH *implgraph, SCIP_HASHMAP *implhash, SCIP_VAR **totalvars, SCIP_VAR *varv, SCIP_VAR *varw, SCIP_Real lb, SCIP_Real ub, SCIP_Real newbound, SCIP_Bool lower, int *nchgbds, SCIP_Bool *update, SCIP_Bool *infeasible)
#define DEFAULT_MAXIMPLCUTS
static SCIP_RETCODE inferVariableZero(SCIP *scip, SCIP_VAR *var, SCIP_CONS *cons, int inferinfo, SCIP_Bool *infeasible, SCIP_Bool *tightened, SCIP_Bool *success)
#define DEFAULT_BOUNDCUTSFROMSOS1
static SCIP_RETCODE getBranchingVerticesSOS1(SCIP *scip, SCIP_DIGRAPH *conflictgraph, SCIP_SOL *sol, SCIP_Bool *verticesarefixed, SCIP_Bool bipbranch, int branchvertex, int *fixingsnode1, int *nfixingsnode1, int *fixingsnode2, int *nfixingsnode2)
#define DEFAULT_ADDCOMPSDEPTH
static SCIP_RETCODE getBranchingPrioritiesSOS1(SCIP *scip, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_DIGRAPH *conflictgraph, SCIP_SOL *sol, int nsos1vars, SCIP_Bool *verticesarefixed, SCIP_Bool bipbranch, int *fixingsnode1, int *fixingsnode2, SCIP_Real *branchpriors, int *vertexbestprior, SCIP_Bool *relsolfeas)
static SCIP_RETCODE genConflictgraphLinearCons(SCIP_CONSHDLRDATA *conshdlrdata, SCIP_DIGRAPH *conflictgraphlin, SCIP_DIGRAPH *conflictgraphorig, SCIP_VAR **linvars, int nlinvars, int *posinlinvars)
static SCIP_RETCODE fixVariableZero(SCIP *scip, SCIP_VAR *var, SCIP_Bool *infeasible, SCIP_Bool *tightened)
static SCIP_Real nodeGetSolvalBinaryBigMSOS1(SCIP *scip, SCIP_DIGRAPH *conflictgraph, SCIP_SOL *sol, int node)
static SCIP_RETCODE initConflictgraph(SCIP *scip, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_CONS **conss, int nconss)
static SCIP_RETCODE initsepaBoundInequalityFromSOS1Cons(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_CONS **conss, int nconss, SCIP_SOL *sol, SCIP_Bool solvedinitlp, int maxboundcuts, int *ngen, SCIP_Bool *cutoff)
static SCIP_RETCODE generateBoundInequalityFromSOS1Nodes(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DIGRAPH *conflictgraph, int *nodes, int nnodes, SCIP_Real rhs, SCIP_Bool local, SCIP_Bool global, SCIP_Bool strengthen, SCIP_Bool removable, const char *nameext, SCIP_ROW **rowlb, SCIP_ROW **rowub)
#define DEFAULT_NSTRONGITER
static SCIP_RETCODE enforceSOS1(SCIP *scip, SCIP_CONSHDLR *conshdlr, int nconss, SCIP_CONS **conss, SCIP_SOL *sol, SCIP_RESULT *result)
#define DEFAULT_BOUNDCUTSFREQ
static SCIP_RETCODE computeVarsCoverSOS1(SCIP *scip, SCIP_DIGRAPH *conflictgraphroot, SCIP_DIGRAPH *conflictgraphlin, SCIP_VAR **linvars, SCIP_Bool *coveredvars, int *clique, int *cliquesize, int v, SCIP_Bool considersolvals)
static SCIP_RETCODE enforceConssSOS1(SCIP *scip, SCIP_CONSHDLR *conshdlr, int nconss, SCIP_CONS **conss, SCIP_SOL *sol, SCIP_RESULT *result)
static SCIP_RETCODE checkConComponentsVarbound(SCIP *scip, SCIP_DIGRAPH *conflictgraph, int nsos1vars, SCIP_Bool checklb)
static SCIP_RETCODE unlockVariableSOS1(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var)
static SCIP_Bool isConnectedSOS1(SCIP_Bool **adjacencymatrix, SCIP_DIGRAPH *conflictgraph, int vertex1, int vertex2)
#define DEFAULT_BOUNDCUTSFROMGRAPH
static SCIP_RETCODE addBranchingComplementaritiesSOS1(SCIP *scip, SCIP_NODE *node, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_DIGRAPH *conflictgraph, SCIP_DIGRAPH *localconflicts, SCIP_SOL *sol, int nsos1vars, SCIP_Bool *verticesarefixed, int *fixingsnode1, int nfixingsnode1, int *fixingsnode2, int nfixingsnode2, int *naddedconss, SCIP_Bool onlyviolsos1)
static SCIP_RETCODE performStrongbranchSOS1(SCIP *scip, SCIP_DIGRAPH *conflictgraph, int *fixingsexec, int nfixingsexec, int *fixingsop, int nfixingsop, int inititer, SCIP_Bool fixnonzero, int *domainfixings, int *ndomainfixings, SCIP_Bool *infeasible, SCIP_Real *objval, SCIP_Bool *lperror)
#define DEFAULT_ADDBDSFEAS
static SCIP_RETCODE generateBoundInequalityFromSOS1Cons(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS *cons, SCIP_Bool local, SCIP_Bool global, SCIP_Bool strengthen, SCIP_Bool removable, SCIP_ROW **rowlb, SCIP_ROW **rowub)
static SCIP_RETCODE getSOS1Implications(SCIP *scip, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_VAR **vars, SCIP_DIGRAPH *implgraph, SCIP_HASHMAP *implhash, SCIP_Bool *implnodes, int node)
static SCIP_RETCODE addVarSOS1(SCIP *scip, SCIP_CONS *cons, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_VAR *var, SCIP_Real weight)
static SCIP_RETCODE freeImplGraphSOS1(SCIP *scip, SCIP_CONSHDLRDATA *conshdlrdata)
#define DEFAULT_IMPLCUTSDEPTH
#define DEFAULT_CONFLICTPROP
#define DEFAULT_MAXIMPLCUTSROOT
#define DEFAULT_IMPLCUTSFREQ
struct SCIP_SuccData SCIP_SUCCDATA
static SCIP_RETCODE presolRoundConssSOS1(SCIP *scip, SCIP_EVENTHDLR *eventhdlr, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_DIGRAPH *conflictgraph, SCIP_Bool **adjacencymatrix, SCIP_CONS **conss, int nconss, int nsos1vars, int *naddconss, int *ndelconss, int *nupgdconss, int *nfixedvars, int *nremovedvars, SCIP_RESULT *result)
static SCIP_RETCODE resetConflictgraphSOS1(SCIP_DIGRAPH *conflictgraph, SCIP_DIGRAPH *localconflicts, int nsos1vars)
static SCIP_RETCODE initImplGraphSOS1(SCIP *scip, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_DIGRAPH *conflictgraph, int nsos1vars, int maxrounds, int *nchgbds, SCIP_Bool *cutoff, SCIP_Bool *success)
#define DEFAULT_PERFIMPLANALYSIS
static SCIP_RETCODE markNeighborsMWISHeuristic(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DIGRAPH *conflictgraph, int node, SCIP_Bool *mark, SCIP_Bool *indset, int *cnt, SCIP_Bool *cutoff)
static SCIP_RETCODE presolRoundVarsSOS1(SCIP *scip, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_DIGRAPH *conflictgraph, SCIP_Bool **adjacencymatrix, int nsos1vars, int *nfixedvars, int *nchgbds, int *naddconss, SCIP_RESULT *result)
static SCIP_RETCODE sepaBoundInequalitiesFromGraph(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_SOL *sol, int maxboundcuts, int *ngen, SCIP_Bool *cutoff)
static SCIP_RETCODE addBoundCutSepa(SCIP *scip, TCLIQUE_DATA *tcliquedata, SCIP_ROW *rowlb, SCIP_ROW *rowub, SCIP_Bool *success, SCIP_Bool *cutoff)
static SCIP_RETCODE propConsSOS1(SCIP *scip, SCIP_CONS *cons, SCIP_CONSDATA *consdata, SCIP_Bool *cutoff, int *ngen)
static SCIP_RETCODE extensionOperatorSOS1(SCIP *scip, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_Bool **adjacencymatrix, SCIP_DIGRAPH *vertexcliquegraph, int nsos1vars, int nconss, SCIP_CONS *cons, SCIP_VAR **vars, SCIP_Real *weights, SCIP_Bool firstcall, SCIP_Bool usebacktrack, int **cliques, int *ncliques, int *cliquesizes, int *newclique, int *workingset, int nworkingset, int nexts, int pos, int *maxextensions, int *naddconss, SCIP_Bool *success)
static SCIP_RETCODE deleteVarSOS1(SCIP *scip, SCIP_CONS *cons, SCIP_CONSDATA *consdata, SCIP_EVENTHDLR *eventhdlr, int pos)
static SCIP_RETCODE performImplicationGraphAnalysis(SCIP *scip, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_DIGRAPH *conflictgraph, SCIP_VAR **totalvars, SCIP_DIGRAPH *implgraph, SCIP_HASHMAP *implhash, SCIP_Bool **adjacencymatrix, int givennode, int nonznode, SCIP_Real *impllbs, SCIP_Real *implubs, SCIP_Bool *implnodes, int *naddconss, int *probingdepth, SCIP_Bool *infeasible)
static SCIP_Real nodeGetSolvalVarboundLbSOS1(SCIP *scip, SCIP_DIGRAPH *conflictgraph, SCIP_SOL *sol, int node)
static SCIP_RETCODE cliqueGetCommonSuccessorsSOS1(SCIP_CONSHDLRDATA *conshdlrdata, SCIP_DIGRAPH *conflictgraph, int *clique, SCIP_VAR **vars, int nvars, int *comsucc, int *ncomsucc)
static SCIP_RETCODE separateSOS1(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_SOL *sol, int nconss, SCIP_CONS **conss, SCIP_RESULT *result)
constraint handler for SOS type 1 constraints
#define SCIP_MAXTREEDEPTH
#define SCIP_LONGINT_FORMAT
static const NodeData nodedata[]
void SCIPcomputeArraysSetminusInt(int *array1, int narray1, int *array2, int narray2, int *setminusarray, int *nsetminusarray)
void SCIPcomputeArraysIntersectionInt(int *array1, int narray1, int *array2, int narray2, int *intersectarray, int *nintersectarray)
SCIP_Real SCIPgetRhsLinear(SCIP *scip, SCIP_CONS *cons)
SCIP_DIGRAPH * SCIPgetConflictgraphSOS1(SCIP_CONSHDLR *conshdlr)
SCIP_VAR ** SCIPgetVarsLinear(SCIP *scip, SCIP_CONS *cons)
SCIP_Bool SCIPvarIsSOS1(SCIP_CONSHDLR *conshdlr, SCIP_VAR *var)
SCIP_RETCODE SCIPaddCoefLinear(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real val)
SCIP_RETCODE SCIPmakeSOS1sFeasible(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_SOL *sol, SCIP_Bool *changed, SCIP_Bool *success)
SCIP_Real SCIPgetLhsLinear(SCIP *scip, SCIP_CONS *cons)
int SCIPgetNVarsLinear(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPaddVarSOS1(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real weight)
SCIP_Real * SCIPgetValsLinear(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPcreateConsSOS1(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Real *weights, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)
SCIP_RETCODE SCIPcreateConsBasicSOS1(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Real *weights)
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_Real * SCIPgetWeightsSOS1(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPappendVarSOS1(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var)
int SCIPgetNSOS1Vars(SCIP_CONSHDLR *conshdlr)
int SCIPvarGetNodeSOS1(SCIP_CONSHDLR *conshdlr, SCIP_VAR *var)
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_VAR ** SCIPgetVarsSOS1(SCIP *scip, SCIP_CONS *cons)
int SCIPgetNVarsSOS1(SCIP *scip, SCIP_CONS *cons)
SCIP_VAR * SCIPnodeGetVarSOS1(SCIP_DIGRAPH *conflictgraph, int node)
SCIP_RETCODE SCIPincludeConshdlrSOS1(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)
void ** SCIPdigraphGetSuccessorsData(SCIP_DIGRAPH *digraph, int node)
int SCIPdigraphGetNSuccessors(SCIP_DIGRAPH *digraph, int node)
int SCIPdigraphGetNNodes(SCIP_DIGRAPH *digraph)
SCIP_RETCODE SCIPdigraphAddArc(SCIP_DIGRAPH *digraph, int startnode, int endnode, void *data)
SCIP_RETCODE SCIPdigraphAddArcSafe(SCIP_DIGRAPH *digraph, int startnode, int endnode, void *data)
void SCIPdigraphFree(SCIP_DIGRAPH **digraph)
int SCIPdigraphGetNArcs(SCIP_DIGRAPH *digraph)
void * SCIPdigraphGetNodeData(SCIP_DIGRAPH *digraph, int node)
void SCIPdigraphSetNodeData(SCIP_DIGRAPH *digraph, void *dataptr, int node)
SCIP_RETCODE SCIPdigraphSetNSuccessors(SCIP_DIGRAPH *digraph, int node, int nsuccessors)
int * SCIPdigraphGetSuccessors(SCIP_DIGRAPH *digraph, int node)
SCIP_RETCODE SCIPcreateDigraph(SCIP *scip, SCIP_DIGRAPH **digraph, int nnodes)
SCIP_Bool SCIPisTransformed(SCIP *scip)
SCIP_Bool SCIPisStopped(SCIP *scip)
SCIP_STAGE SCIPgetStage(SCIP *scip)
SCIP_RETCODE SCIPaddConsUpgrade(SCIP *scip, SCIP_CONS *oldcons, SCIP_CONS **newcons)
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)
SCIP_OBJSENSE SCIPgetObjsense(SCIP *scip)
int SCIPgetNTotalVars(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 SCIPupdateNodeLowerbound(SCIP *scip, SCIP_NODE *node, SCIP_Real newbound)
SCIP_RETCODE SCIPdelConsLocal(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPaddConsNode(SCIP *scip, SCIP_NODE *node, SCIP_CONS *cons, SCIP_NODE *validnode)
SCIP_Real SCIPgetLocalTransEstimate(SCIP *scip)
void SCIPinfoMessage(SCIP *scip, FILE *file, const char *formatstr,...)
SCIP_RETCODE SCIPaddCharParam(SCIP *scip, const char *name, const char *desc, char *valueptr, SCIP_Bool isadvanced, char defaultvalue, const char *allowedvalues, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
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 SCIPaddRealParam(SCIP *scip, const char *name, const char *desc, SCIP_Real *valueptr, SCIP_Bool isadvanced, SCIP_Real defaultvalue, SCIP_Real minvalue, SCIP_Real 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 SCIPswapInts(int *value1, int *value2)
void SCIPswapReals(SCIP_Real *value1, SCIP_Real *value2)
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_Real SCIPcalcChildEstimateIncrease(SCIP *scip, SCIP_VAR *var, SCIP_Real varsol, SCIP_Real targetvalue)
SCIP_RETCODE SCIPcreateChild(SCIP *scip, SCIP_NODE **node, SCIP_Real nodeselprio, SCIP_Real estimate)
SCIP_RETCODE SCIPaddConflictLb(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx)
SCIP_RETCODE SCIPaddConflictUb(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx)
SCIP_RETCODE SCIPsetConshdlrFree(SCIP *scip, 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 SCIPsetConshdlrGetDiveBdChgs(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
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,)
int SCIPconshdlrGetNConss(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 SCIPsetConshdlrGetPermsymGraph(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrDelete(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrInitsol(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_CONSHDLRDATA * SCIPconshdlrGetData(SCIP_CONSHDLR *conshdlr)
SCIP_RETCODE SCIPsetConshdlrTrans(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrResprop(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrExitsol(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_CONS ** SCIPconshdlrGetConss(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)
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 SCIPconsIsTransformed(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsEnforced(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_Bool SCIPconsIsModifiable(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsStickingAtNode(SCIP_CONS *cons)
SCIP_RETCODE SCIPreleaseCons(SCIP *scip, SCIP_CONS **cons)
SCIP_Bool SCIPconsIsSeparated(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsRemovable(SCIP_CONS *cons)
SCIP_Bool SCIPisCutEfficacious(SCIP *scip, SCIP_SOL *sol, SCIP_ROW *cut)
SCIP_Bool SCIPisEfficacious(SCIP *scip, SCIP_Real efficacy)
SCIP_RETCODE SCIPaddRow(SCIP *scip, SCIP_ROW *row, SCIP_Bool forcecut, SCIP_Bool *infeasible)
SCIP_Bool SCIPdivesetSupportsType(SCIP_DIVESET *diveset, SCIP_DIVETYPE divetype)
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_Real SCIPeventGetOldbound(SCIP_EVENT *event)
SCIP_VAR * SCIPeventGetVar(SCIP_EVENT *event)
SCIP_Real SCIPeventGetNewbound(SCIP_EVENT *event)
SCIP_LPSOLSTAT SCIPgetLPSolstat(SCIP *scip)
SCIP_Real SCIPgetLPObjval(SCIP *scip)
#define SCIPfreeBlockMemoryArray(scip, ptr, num)
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 SCIPallocBlockMemoryArray(scip, ptr, 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_Longint SCIPnodeGetNumber(SCIP_NODE *node)
SCIP_RETCODE SCIPgetDivesetScore(SCIP *scip, SCIP_DIVESET *diveset, SCIP_DIVETYPE divetype, SCIP_VAR *divecand, SCIP_Real divecandsol, SCIP_Real divecandfrac, SCIP_Real *candscore, SCIP_Bool *roundup)
SCIP_RETCODE SCIPchgVarUbProbing(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound)
SCIP_RETCODE SCIPchgVarLbProbing(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound)
SCIP_RETCODE SCIPpropagateProbing(SCIP *scip, int maxproprounds, SCIP_Bool *cutoff, SCIP_Longint *ndomredsfound)
SCIP_RETCODE SCIPstartProbing(SCIP *scip)
SCIP_RETCODE SCIPaddDiveBoundChange(SCIP *scip, SCIP_VAR *var, SCIP_BRANCHDIR dir, SCIP_Real value, SCIP_Bool preferred)
SCIP_RETCODE SCIPsolveProbingLP(SCIP *scip, int itlim, SCIP_Bool *lperror, SCIP_Bool *cutoff)
SCIP_RETCODE SCIPfixVarProbing(SCIP *scip, SCIP_VAR *var, SCIP_Real fixedval)
SCIP_RETCODE SCIPcacheRowExtensions(SCIP *scip, SCIP_ROW *row)
SCIP_RETCODE SCIPflushRowExtensions(SCIP *scip, SCIP_ROW *row)
SCIP_RETCODE SCIPcreateEmptyRowConshdlr(SCIP *scip, SCIP_ROW **row, SCIP_CONSHDLR *conshdlr, const char *name, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool removable)
SCIP_RETCODE SCIPaddVarToRow(SCIP *scip, SCIP_ROW *row, SCIP_VAR *var, SCIP_Real val)
SCIP_RETCODE SCIPprintRow(SCIP *scip, SCIP_ROW *row, FILE *file)
SCIP_RETCODE SCIPreleaseRow(SCIP *scip, SCIP_ROW **row)
SCIP_Bool SCIProwIsInLP(SCIP_ROW *row)
SCIP_RETCODE SCIPaddVarsToRow(SCIP *scip, SCIP_ROW *row, int nvars, SCIP_VAR **vars, SCIP_Real *vals)
void SCIPupdateSolConsViolation(SCIP *scip, SCIP_SOL *sol, SCIP_Real absviol, SCIP_Real relviol)
SCIP_Real SCIPgetSolOrigObj(SCIP *scip, SCIP_SOL *sol)
SCIP_RETCODE SCIPsetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var, SCIP_Real val)
SCIP_Real SCIPgetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var)
SCIP_Real SCIPgetUpperbound(SCIP *scip)
SCIP_Longint SCIPgetNNodes(SCIP *scip)
SCIP_Longint SCIPgetNNodeInitLPs(SCIP *scip)
SCIP_Longint SCIPgetNDualResolveLPIterations(SCIP *scip)
SCIP_Longint SCIPgetNNodeInitLPIterations(SCIP *scip)
SCIP_Longint SCIPgetNDualResolveLPs(SCIP *scip)
SCIP_Real SCIPinfinity(SCIP *scip)
SCIP_Bool SCIPisFeasEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisPositive(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisFeasZero(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPfloor(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisFeasLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisFeasNegative(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPfeastol(SCIP *scip)
SCIP_Bool SCIPisGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisNegative(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPceil(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisFeasGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisZero(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPsumepsilon(SCIP *scip)
SCIP_Bool SCIPisLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisFeasPositive(SCIP *scip, SCIP_Real val)
int SCIPgetDepth(SCIP *scip)
SCIP_NODE * SCIPgetCurrentNode(SCIP *scip)
SCIP_RETCODE SCIPtightenVarLb(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
SCIP_Real SCIPvarGetNegationConstant(SCIP_VAR *var)
SCIP_RETCODE SCIPlockVarCons(SCIP *scip, SCIP_VAR *var, SCIP_CONS *cons, SCIP_Bool lockdown, SCIP_Bool lockup)
SCIP_Bool SCIPvarMayRoundUp(SCIP_VAR *var)
SCIP_Real SCIPvarGetMultaggrConstant(SCIP_VAR *var)
SCIP_Bool SCIPvarIsActive(SCIP_VAR *var)
SCIP_Bool SCIPvarIsBinary(SCIP_VAR *var)
SCIP_VARSTATUS SCIPvarGetStatus(SCIP_VAR *var)
SCIP_Real SCIPvarGetAggrConstant(SCIP_VAR *var)
SCIP_Real SCIPvarGetUbLocal(SCIP_VAR *var)
SCIP_Bool SCIPvarIsTransformed(SCIP_VAR *var)
SCIP_RETCODE SCIPinferVarUbCons(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_CONS *infercons, int inferinfo, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
SCIP_Bool SCIPvarMayRoundDown(SCIP_VAR *var)
SCIP_RETCODE SCIPchgVarUbNode(SCIP *scip, SCIP_NODE *node, SCIP_VAR *var, SCIP_Real newbound)
SCIP_RETCODE SCIPtightenVarUb(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
SCIP_RETCODE SCIPparseVarName(SCIP *scip, const char *str, SCIP_VAR **var, char **endptr)
SCIP_RETCODE SCIPgetProbvarSum(SCIP *scip, SCIP_VAR **var, SCIP_Real *scalar, SCIP_Real *constant)
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 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_RETCODE SCIPflattenVarAggregationGraph(SCIP *scip, SCIP_VAR *var)
SCIP_VAR ** SCIPvarGetMultaggrVars(SCIP_VAR *var)
int SCIPvarGetMultaggrNVars(SCIP_VAR *var)
SCIP_Real SCIPvarGetLbLocal(SCIP_VAR *var)
SCIP_VAR * SCIPvarGetNegationVar(SCIP_VAR *var)
SCIP_Real SCIPvarGetLbGlobal(SCIP_VAR *var)
SCIP_RETCODE SCIPmarkDoNotMultaggrVar(SCIP *scip, SCIP_VAR *var)
SCIP_RETCODE SCIPfixVar(SCIP *scip, SCIP_VAR *var, SCIP_Real fixedval, SCIP_Bool *infeasible, SCIP_Bool *fixed)
SCIP_RETCODE SCIPinferVarLbCons(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_CONS *infercons, int inferinfo, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
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 SCIPwriteVarName(SCIP *scip, FILE *file, SCIP_VAR *var, SCIP_Bool type)
SCIP_RETCODE SCIPgetTransformedVar(SCIP *scip, SCIP_VAR *var, SCIP_VAR **transvar)
SCIP_Real * SCIPvarGetMultaggrScalars(SCIP_VAR *var)
SCIP_VAR * SCIPvarGetAggrVar(SCIP_VAR *var)
void SCIPsortDownIntInt(int *intarray1, int *intarray2, int len)
void SCIPsortRealPtr(SCIP_Real *realarray, void **ptrarray, int len)
void SCIPsortRealInt(SCIP_Real *realarray, int *intarray, int len)
void SCIPsortDownRealInt(SCIP_Real *realarray, int *intarray, int len)
void SCIPsortInt(int *intarray, int len)
int SCIPsnprintf(char *t, int len, const char *s,...)
SCIP_RETCODE SCIPskipSpace(char **s)
SCIP_RETCODE SCIPaddSymgraphEdge(SCIP *scip, SYM_GRAPH *graph, int first, int second, SCIP_Bool hasval, SCIP_Real val)
SCIP_RETCODE SCIPaddSymgraphOpnode(SCIP *scip, SYM_GRAPH *graph, int op, int *nodeidx)
SCIP_RETCODE SCIPgetSymActiveVariables(SCIP *scip, SYM_SYMTYPE symtype, SCIP_VAR ***vars, SCIP_Real **scalars, int *nvars, SCIP_Real *constant, SCIP_Bool transformed)
SCIP_RETCODE SCIPaddSymgraphValnode(SCIP *scip, SYM_GRAPH *graph, SCIP_Real val, int *nodeidx)
int SCIPgetSymgraphVarnodeidx(SCIP *scip, SYM_GRAPH *graph, SCIP_VAR *var)
SCIP_RETCODE SCIPaddSymgraphConsnode(SCIP *scip, SYM_GRAPH *graph, SCIP_CONS *cons, SCIP_Real lhs, SCIP_Real rhs, int *nodeidx)
SCIP_RETCODE SCIPaddSymgraphVarAggregation(SCIP *scip, SYM_GRAPH *graph, int rootidx, SCIP_VAR **vars, SCIP_Real *vals, int nvars, SCIP_Real constant)
int SCIPgetSymgraphNegatedVarnodeidx(SCIP *scip, SYM_GRAPH *graph, SCIP_VAR *var)
static SCIP_DIVESET * diveset
assert(minobj< SCIPgetCutoffbound(scip))
static SCIP_Bool propagate
memory allocation routines
#define BMScopyMemoryArray(ptr, source, num)
public methods for managing constraints
public methods for managing events
public methods for primal heuristics
public methods for LP management
public methods for message output
public data structures and miscellaneous methods
methods for sorting joint arrays of various types
public methods for branch and bound tree
public methods for problem variables
public methods for branching rule plugins and branching
public methods for conflict handler plugins and conflict analysis
public methods for constraint handler plugins and constraints
public methods for problem copies
public methods for cuts and aggregation rows
public methods for data structures
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 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 solutions
public methods for querying solving statistics
public methods for the branch-and-bound tree
public methods for SCIP variables
static SCIP_RETCODE separate(SCIP *scip, SCIP_SEPA *sepa, SCIP_SOL *sol, SCIP_RESULT *result)
Main separation function.
SCIP_Bool strthenboundcuts
SCIP_DIGRAPH * conflictgraph
structs for symmetry computations
methods for dealing with symmetry detection graphs
void tcliqueChangeWeight(TCLIQUE_GRAPH *tcliquegraph, int node, TCLIQUE_WEIGHT weight)
void tcliqueFree(TCLIQUE_GRAPH **tcliquegraph)
enum TCLIQUE_Status TCLIQUE_STATUS
void tcliqueMaxClique(TCLIQUE_GETNNODES((*getnnodes)), TCLIQUE_GETWEIGHTS((*getweights)), TCLIQUE_ISEDGE((*isedge)), TCLIQUE_SELECTADJNODES((*selectadjnodes)), TCLIQUE_GRAPH *tcliquegraph, TCLIQUE_NEWSOL((*newsol)), TCLIQUE_DATA *tcliquedata, int *maxcliquenodes, int *nmaxcliquenodes, TCLIQUE_WEIGHT *maxcliqueweight, TCLIQUE_WEIGHT maxfirstnodeweight, TCLIQUE_WEIGHT minweight, int maxntreenodes, int backtrackfreq, int maxnzeroextensions, int fixednode, int *ntreenodes, TCLIQUE_STATUS *status)
TCLIQUE_Bool tcliqueFlush(TCLIQUE_GRAPH *tcliquegraph)
struct TCLIQUE_Graph TCLIQUE_GRAPH
TCLIQUE_Bool tcliqueCreate(TCLIQUE_GRAPH **tcliquegraph)
struct TCLIQUE_Data TCLIQUE_DATA
TCLIQUE_Bool tcliqueAddNode(TCLIQUE_GRAPH *tcliquegraph, int node, TCLIQUE_WEIGHT weight)
#define TCLIQUE_NEWSOL(x)
TCLIQUE_Bool tcliqueAddEdge(TCLIQUE_GRAPH *tcliquegraph, int node1, int node2)
#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)
#define SCIP_DECL_CONSENFORELAX(x)
#define SCIP_DECL_CONSGETDIVEBDCHGS(x)
#define SCIP_DECL_CONSPROP(x)
#define SCIP_DECL_CONSGETNVARS(x)
#define SCIP_DECL_CONSRESPROP(x)
#define SCIP_DECL_CONSENFOPS(x)
#define SCIP_DECL_CONSPARSE(x)
#define SCIP_DECL_CONSTRANS(x)
#define SCIP_DECL_CONSPRESOL(x)
#define SCIP_DECL_CONSINITLP(x)
#define SCIP_DECL_CONSLOCK(x)
struct SCIP_Conshdlr SCIP_CONSHDLR
#define SCIP_DECL_CONSCOPY(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)
struct SCIP_Eventhdlr SCIP_EVENTHDLR
#define SCIP_EVENTTYPE_GUBCHANGED
struct SCIP_EventData SCIP_EVENTDATA
#define SCIP_EVENTTYPE_UBTIGHTENED
#define SCIP_DECL_EVENTEXEC(x)
#define SCIP_EVENTTYPE_LBRELAXED
#define SCIP_EVENTTYPE_GLBCHANGED
#define SCIP_EVENTTYPE_LBTIGHTENED
#define SCIP_EVENTTYPE_UBRELAXED
struct SCIP_Diveset SCIP_DIVESET
#define SCIP_DIVETYPE_SOS1VARIABLE
@ SCIP_BRANCHDIR_DOWNWARDS
enum SCIP_LPSolStat SCIP_LPSOLSTAT
@ SCIP_LPSOLSTAT_TIMELIMIT
@ SCIP_LPSOLSTAT_INFEASIBLE
@ SCIP_LPSOLSTAT_OBJLIMIT
@ SCIP_LPSOLSTAT_ITERLIMIT
struct SCIP_HashMap SCIP_HASHMAP
struct SCIP_Digraph SCIP_DIGRAPH
enum SCIP_Result SCIP_RESULT
enum SCIP_Retcode SCIP_RETCODE
struct SCIP_Node SCIP_NODE
@ SCIP_VARSTATUS_MULTAGGR
@ SCIP_VARSTATUS_AGGREGATED
enum SCIP_Varstatus SCIP_VARSTATUS