63 (*vbounds)->vars =
NULL;
64 (*vbounds)->coefs =
NULL;
65 (*vbounds)->constants =
NULL;
80 if( *vbounds !=
NULL )
101 if( *vbounds ==
NULL )
106 assert((*vbounds)->len <= (*vbounds)->size);
108 if( num > (*vbounds)->size )
116 (*vbounds)->size = newsize;
118 assert(num <= (*vbounds)->size);
140 if( vbounds ==
NULL )
155 if( (vbounds->
coefs[pos] < 0.0) == negativecoef )
161 else if( negativecoef )
164 if( pos+1 < vbounds->
len && vbounds->
vars[pos+1] ==
var )
181 if( pos-1 >= 0 && vbounds->
vars[pos-1] ==
var )
235 assert(0 <= insertpos && insertpos < (*vbounds)->len);
236 assert((*vbounds)->vars[insertpos] ==
var);
237 assert(((*vbounds)->coefs[insertpos] < 0.0) == (coef < 0.0));
241 if( constant +
MIN(coef, 0.0) < (*vbounds)->constants[insertpos] +
MIN((*vbounds)->coefs[insertpos], 0.0) )
243 (*vbounds)->coefs[insertpos] = coef;
244 (*vbounds)->constants[insertpos] = constant;
250 if( constant +
MAX(coef, 0.0) > (*vbounds)->constants[insertpos] +
MAX((*vbounds)->coefs[insertpos], 0.0) )
252 (*vbounds)->coefs[insertpos] = coef;
253 (*vbounds)->constants[insertpos] = constant;
265 assert(0 <= insertpos && insertpos <= (*vbounds)->len);
266 assert(0 <= insertpos && insertpos < (*vbounds)->size);
269 for(
i = (*vbounds)->len;
i > insertpos; --
i )
272 (*vbounds)->vars[
i] = (*vbounds)->vars[
i-1];
273 (*vbounds)->coefs[
i] = (*vbounds)->coefs[
i-1];
274 (*vbounds)->constants[
i] = (*vbounds)->constants[
i-1];
277 (*vbounds)->vars[insertpos] =
var;
278 (*vbounds)->coefs[insertpos] = coef;
279 (*vbounds)->constants[insertpos] = constant;
307 assert(0 <= pos && pos < (*vbounds)->len);
308 assert((*vbounds)->vars[pos] == vbdvar);
309 assert(((*vbounds)->coefs[pos] < 0.0) == negativecoef);
312 for(
i = pos;
i < (*vbounds)->len - 1;
i++ )
314 (*vbounds)->vars[
i] = (*vbounds)->vars[
i+1];
315 (*vbounds)->coefs[
i] = (*vbounds)->coefs[
i+1];
316 (*vbounds)->constants[
i] = (*vbounds)->constants[
i+1];
326 if( (*vbounds)->len == 0 )
341 assert(newnvbds <= (*vbounds)->len);
346 (*vbounds)->len = newnvbds;
373 if( var1idx < var2idx )
375 else if( var1idx > var2idx )
389 if( implics ==
NULL )
401 types = implics->
types[varfixing];
402 nimpls = implics->
nimpls[varfixing];
404 assert(0 <= nimpls && nimpls <= implics->size[varfixing]);
405 for(
i = 1;
i < nimpls; ++
i )
415 varfixing = !varfixing;
417 while( varfixing ==
TRUE );
420#define checkImplics(implics)
434 (*implics)->vars[0] =
NULL;
435 (*implics)->types[0] =
NULL;
436 (*implics)->bounds[0] =
NULL;
437 (*implics)->ids[0] =
NULL;
438 (*implics)->size[0] = 0;
439 (*implics)->nimpls[0] = 0;
440 (*implics)->vars[1] =
NULL;
441 (*implics)->types[1] =
NULL;
442 (*implics)->bounds[1] =
NULL;
443 (*implics)->ids[1] =
NULL;
444 (*implics)->size[1] = 0;
445 (*implics)->nimpls[1] = 0;
458 if( *implics !=
NULL )
485 if( *implics ==
NULL )
490 assert((*implics)->nimpls[varfixing] <= (*implics)->size[varfixing]);
492 if( num > (*implics)->size[varfixing] )
501 (*implics)->size[varfixing] = newsize;
503 assert(num <= (*implics)->size[varfixing]);
531 if( implics->
nimpls[varfixing] == 0 )
539 right = implics->
nimpls[varfixing] - 1;
543 found =
SCIPsortedvecFindPtr((
void**)(&(implics->
vars[varfixing][0])), SCIPvarComp, (
void*)implvar, right + 1, &pos);
548 assert(pos >= right || compVars((
void*)implics->
vars[varfixing][pos], (
void*)implvar) > 0);
549 assert(pos == 0 || compVars((
void*)implics->
vars[varfixing][pos-1], (
void*)implvar) < 0);
557 assert(implvar == implics->
vars[varfixing][pos]);
564 if( pos + 1 < implics->
nimpls[varfixing] && implics->
vars[varfixing][pos+1] == implvar )
577 if( pos - 1 >= 0 && implics->
vars[varfixing][pos-1] == implvar )
612 assert(*poslower == -1 || *posupper == -1 || *posupper == (*poslower)+1);
613 assert(*poslower == -1 || *posadd == *poslower);
614 assert(*poslower >= 0 || *posupper == -1 || *posadd == *posupper);
615 assert(0 <= *posadd && *posadd <= implics->nimpls[varfixing]);
618 return (*poslower >= 0);
623 assert(*posadd == *poslower);
626 return (*posupper >= 0);
656 assert(*implics ==
NULL || 0 <= (*implics)->nimpls[varfixing]);
674 if( *implics !=
NULL )
676 found =
implicsSearchImplic(*implics, varfixing, implvar, impltype, &poslower, &posupper, &posadd);
677 assert(-1 <= poslower && poslower < (*implics)->nimpls[varfixing]);
678 assert(-1 <= posupper && posupper < (*implics)->nimpls[varfixing]);
679 assert(0 <= posadd && posadd <= (*implics)->nimpls[varfixing]);
693 assert(found == (poslower >= 0));
696 if( poslower >= 0 &&
SCIPsetIsFeasLE(
set, implbound, (*implics)->bounds[varfixing][poslower]) )
703 if( posupper >= 0 &&
SCIPsetIsFeasGT(
set, implbound, (*implics)->bounds[varfixing][posupper]) )
716 assert(posadd == poslower);
719 assert((*implics)->vars[varfixing][poslower] == implvar);
721 (*implics)->bounds[varfixing][poslower] = implbound;
729 *implics !=
NULL ? (*implics)->nimpls[varfixing]+1 : 1) );
732 if( (*implics)->nimpls[varfixing] - posadd > 0 )
734 int amount = ((*implics)->nimpls[varfixing] - posadd);
737 for( k = (*implics)->nimpls[varfixing]; k > posadd; k-- )
739 assert(compVars((
void*)(*implics)->vars[varfixing][k-1], (
void*)implvar) >= 0);
742 BMSmoveMemoryArray(&((*implics)->types[varfixing][posadd+1]), &((*implics)->types[varfixing][posadd]), amount);
743 BMSmoveMemoryArray(&((*implics)->ids[varfixing][posadd+1]), &((*implics)->ids[varfixing][posadd]), amount);
744 BMSmoveMemoryArray(&((*implics)->vars[varfixing][posadd+1]), &((*implics)->vars[varfixing][posadd]), amount);
745 BMSmoveMemoryArray(&((*implics)->bounds[varfixing][posadd+1]), &((*implics)->bounds[varfixing][posadd]), amount);
748 (*implics)->vars[varfixing][posadd] = implvar;
749 (*implics)->types[varfixing][posadd] = impltype;
750 (*implics)->bounds[varfixing][posadd] = implbound;
752 (*implics)->nimpls[varfixing]++;
754 for( k = posadd-1; k >= 0; k-- )
755 assert(compVars((
void*)(*implics)->vars[varfixing][k], (
void*)implvar) <= 0);
762 assert(found == (posupper >= 0));
765 if( posupper >= 0 &&
SCIPsetIsFeasGE(
set, implbound, (*implics)->bounds[varfixing][posupper]) )
772 if( poslower >= 0 &&
SCIPsetIsFeasLT(
set, implbound, (*implics)->bounds[varfixing][poslower]) )
785 assert(posadd == posupper);
788 assert((*implics)->vars[varfixing][posupper] == implvar);
790 (*implics)->bounds[varfixing][posupper] = implbound;
798 *implics !=
NULL ? (*implics)->nimpls[varfixing]+1 : 1) );
801 if( (*implics)->nimpls[varfixing] - posadd > 0 )
803 int amount = ((*implics)->nimpls[varfixing] - posadd);
806 for( k = (*implics)->nimpls[varfixing]; k > posadd; k-- )
808 assert(compVars((
void*)(*implics)->vars[varfixing][k-1], (
void*)implvar) >= 0);
811 BMSmoveMemoryArray(&((*implics)->types[varfixing][posadd+1]), &((*implics)->types[varfixing][posadd]), amount);
812 BMSmoveMemoryArray(&((*implics)->ids[varfixing][posadd+1]), &((*implics)->ids[varfixing][posadd]), amount);
813 BMSmoveMemoryArray(&((*implics)->vars[varfixing][posadd+1]), &((*implics)->vars[varfixing][posadd]), amount);
814 BMSmoveMemoryArray(&((*implics)->bounds[varfixing][posadd+1]), &((*implics)->bounds[varfixing][posadd]), amount);
817 (*implics)->vars[varfixing][posadd] = implvar;
818 (*implics)->types[varfixing][posadd] = impltype;
819 (*implics)->bounds[varfixing][posadd] = implbound;
821 (*implics)->nimpls[varfixing]++;
823 for( k = posadd-1; k >= 0; k-- )
824 assert(compVars((
void*)(*implics)->vars[varfixing][k], (
void*)implvar) <= 0);
860 found =
implicsSearchImplic(*implics, varfixing, implvar, impltype, &poslower, &posupper, &posadd);
869 assert(0 <= posadd && posadd < (*implics)->nimpls[varfixing]);
870 assert((*implics)->vars[varfixing][posadd] == implvar);
871 assert((*implics)->types[varfixing][posadd] == impltype);
874 if( (*implics)->nimpls[varfixing] - posadd > 1 )
876 int amount = ((*implics)->nimpls[varfixing] - posadd - 1);
878 BMSmoveMemoryArray(&((*implics)->types[varfixing][posadd]), &((*implics)->types[varfixing][posadd+1]), amount);
879 BMSmoveMemoryArray(&((*implics)->vars[varfixing][posadd]), &((*implics)->vars[varfixing][posadd+1]), amount);
880 BMSmoveMemoryArray(&((*implics)->bounds[varfixing][posadd]), &((*implics)->bounds[varfixing][posadd+1]), amount);
882 (*implics)->nimpls[varfixing]--;
885 if( (*implics)->nimpls[0] == 0 && (*implics)->nimpls[1] == 0 )
909 implicsSearchVar(implics, varfixing, implvar, &poslower, &posupper, &posadd);
911 *haslowerimplic = (poslower >= 0);
912 *hasupperimplic = (posupper >= 0);
929 implicsSearchVar(implics, varfixing, implvar, lowerimplicpos, upperimplicpos, &posadd);
944 return implicsSearchImplic(implics, varfixing, implvar, impltype, &poslower, &posupper, &posadd);
963 if( first != second )
967 tmp = cliquetable->
cliques[first];
972 cliquetable->
cliques[second] = tmp;
1025 (*clique)->nvars =
nvars;
1026 (*clique)->size = size;
1027 (*clique)->startcleanup = -1;
1028 (*clique)->id = (
unsigned int)
id;
1029 (*clique)->eventsissued =
FALSE;
1030 (*clique)->equation = isequation;
1031 (*clique)->index = -1;
1045 if( *clique !=
NULL )
1064 if( num > clique->size )
1071 clique->size = newsize;
1073 assert(num <= clique->size);
1095 right = clique->nvars;
1096 while( left < right-1 )
1101 middle = (left+right)/2;
1113 if( clique->values[middle] < value )
1116 for(
i = middle+1;
i < clique->nvars && clique->vars[
i] ==
var; ++
i )
1118 if( clique->values[
i] == value )
1123 if( clique->values[middle] > value )
1126 for(
i = middle-1;
i >= 0 && clique->vars[
i] ==
var; --
i )
1128 if( clique->values[
i] == value )
1172 *doubleentry =
FALSE;
1173 *oppositeentry =
FALSE;
1187 if( pos < clique->
nvars )
1189 const int amount = clique->nvars - pos;
1200 for( ; pos < clique->nvars - 1 && clique->vars[pos + 1] ==
var && clique->values[pos + 1] == value; ++pos );
1203 if( pos < clique->
nvars - 1 && clique->vars[pos + 1] ==
var )
1205 assert(clique->values[pos + 1] != value);
1206 *oppositeentry =
TRUE;
1211 *doubleentry =
TRUE;
1215 for( ; pos > 0 && clique->vars[pos - 1] ==
var && clique->values[pos - 1] != value; --pos );
1218 if( pos > 0 && clique->vars[pos - 1] ==
var )
1220 assert(clique->values[pos - 1] == value);
1222 *doubleentry =
TRUE;
1228 assert(clique->values[pos] != value);
1230 clique->values[pos] = value;
1239 for( ; pos < clique->nvars - 1 && clique->vars[pos + 1] ==
var && clique->values[pos + 1] != value; ++pos );
1242 if( pos < clique->
nvars - 1 && clique->vars[pos + 1] ==
var )
1244 assert(clique->values[pos + 1] == value);
1245 *doubleentry =
TRUE;
1251 *oppositeentry =
TRUE;
1255 assert(clique->values[pos] != value);
1257 clique->values[pos] = value;
1263 for( ; pos > 0 && clique->vars[pos - 1] ==
var && clique->values[pos - 1] == value; --pos );
1266 *doubleentry =
TRUE;
1269 if( pos > 0 && clique->vars[pos - 1] ==
var && clique->values[pos - 1] != value )
1270 *oppositeentry =
TRUE;
1277 clique->vars[
i] =
var;
1278 clique->values[
i] = value;
1279 clique->eventsissued =
FALSE;
1299 if( cliquetable->
incleanup && clique->index == 0 )
1309 assert(clique->values[pos] == value);
1312 if( clique->startcleanup == -1 )
1315 if( clique->startcleanup == -1 || pos < clique->startcleanup )
1316 clique->startcleanup = pos;
1318#ifdef SCIP_MORE_DEBUG
1322 for( v = clique->startcleanup - 1; v >= 0; --v )
1339 unsigned int cliqueid;
1346 cliqueid = clique->id;
1349 while( left < right-1 )
1355 middle = (left+right)/2;
1356 id = cliques[middle]->
id;
1359 else if( cliqueid >
id )
1363 assert(clique == cliques[middle]);
1371#ifdef SCIP_MORE_DEBUG
1382 for(
i = 0;
i < clique->nvars; ++
i )
1389 var = clique->vars[
i];
1391 assert(
i == 0 || clique->vars[
i-1] !=
var || clique->values[
i-1] <= clique->values[
i]);
1408 assert(0 <= pos && pos < ncliques);
1409 assert(cliques[pos] == clique);
1412 assert(0 <= clique->startcleanup && clique->startcleanup <=
i);
1414 assert(clique->index >= 0);
1417#define cliqueCheck(clique)
1430 (*cliquelist)->cliques[0] =
NULL;
1431 (*cliquelist)->cliques[1] =
NULL;
1432 (*cliquelist)->ncliques[0] = 0;
1433 (*cliquelist)->ncliques[1] = 0;
1434 (*cliquelist)->size[0] = 0;
1435 (*cliquelist)->size[1] = 0;
1448 if( *cliquelist !=
NULL )
1468 if( num > cliquelist->
size[value] )
1474 cliquelist->
size[value] = newsize;
1476 assert(num <= cliquelist->size[value]);
1499 if( *cliquelist ==
NULL )
1505 if( (*cliquelist)->cliques[value] !=
NULL )
1507 for(
i = (*cliquelist)->ncliques[value];
i > 0 && (*cliquelist)->cliques[value][
i - 1]->id >
id; --
i );
1509 if(
i > 0 && (*cliquelist)->cliques[value][
i - 1]->id ==
id )
1516 clique->id, (
void*)*cliquelist, value, (*cliquelist)->ncliques[value]);
1518 BMSmoveMemoryArray(&((*cliquelist)->cliques[value][
i+1]), &((*cliquelist)->cliques[value][
i]), (*cliquelist)->ncliques[value] -
i);
1520 (*cliquelist)->cliques[value][
i] = clique;
1521 (*cliquelist)->ncliques[value]++;
1540 if( *cliquelist ==
NULL )
1543 SCIPdebugMessage(
"deleting clique %u from cliquelist %p value %u (length: %d)\n",
1544 clique->id, (
void*)*cliquelist, value, (*cliquelist)->ncliques[value]);
1546 pos =
cliquesSearchClique((*cliquelist)->cliques[value], (*cliquelist)->ncliques[value], clique);
1551#ifdef SCIP_MORE_DEBUG
1567 for( v = nclqvars - 1; v > 0; --v )
1569 if( clqvars[v] == clqvars[v - 1] )
1571 if( clqvalues[v] == clqvalues[v - 1] || (v > 1 && clqvars[v] == clqvars[v - 2]) )
1583 assert(0 <= pos && pos < (*cliquelist)->ncliques[value]);
1584 assert((*cliquelist)->cliques[value][pos] == clique);
1588 (*cliquelist)->ncliques[value]--;
1589 if( pos < (*cliquelist)->ncliques[value] )
1591 BMSmoveMemoryArray(&((*cliquelist)->cliques[value][pos]), &((*cliquelist)->cliques[value][pos+1]),
1592 (*cliquelist)->ncliques[value] - pos);
1596 if( (*cliquelist)->ncliques[0] == 0 && (*cliquelist)->ncliques[1] == 0 )
1619 if( cliquelist1 ==
NULL || cliquelist2 ==
NULL )
1622 ncliques1 = cliquelist1->
ncliques[value1];
1623 cliques1 = cliquelist1->
cliques[value1];
1624 ncliques2 = cliquelist2->
ncliques[value2];
1625 cliques2 = cliquelist2->
cliques[value2];
1630 if( i1 < ncliques1 && i2 < ncliques2 )
1632 unsigned int cliqueid;
1635 if( ncliques2 > ncliques1 )
1642 cliques1 = cliques2;
1643 ncliques1 = ncliques2;
1693 if( cliquelist !=
NULL )
1697 SCIPdebugMessage(
"removing variable <%s> from cliques (%d with value 0, %d with value 1)\n",
1700 for( value = 0; value < 2; ++value )
1710 for(
i = cliquelist->
ncliques[value] - 1;
i >= 0; --
i )
1714 clique = cliquelist->
cliques[value][
i];
1717 SCIPdebugMessage(
" -> removing variable <%s> == %d from clique %u (size %d)\n",
1723 clique->equation =
FALSE;
1725#ifdef SCIP_MORE_DEBUG
1727 if( ! cliquetable->
incleanup || clique->index > 0 )
1761 for(
i = 0;
i < clique1->
nvars; ++
i )
1780 clique->nvars, 2*clique->values[0] + clique->values[clique->nvars-1]);
1783#define HASHTABLE_CLIQUETABLE_SIZE 100
1802 hashgetkeyClique, hashkeyeqClique, hashkeyvalClique,
NULL) );
1804 (*cliquetable)->varidxtable =
NULL;
1805 (*cliquetable)->djset =
NULL;
1806 (*cliquetable)->cliques =
NULL;
1807 (*cliquetable)->ncliques = 0;
1808 (*cliquetable)->size = 0;
1809 (*cliquetable)->ncreatedcliques = 0;
1810 (*cliquetable)->ncleanupfixedvars = 0;
1811 (*cliquetable)->ncleanupaggrvars = 0;
1812 (*cliquetable)->ndirtycliques = 0;
1813 (*cliquetable)->nentries = 0;
1814 (*cliquetable)->incleanup =
FALSE;
1815 (*cliquetable)->compsfromscratch =
FALSE;
1816 (*cliquetable)->ncliquecomponents = -1;
1833 for(
i = (*cliquetable)->ncliques - 1;
i >= 0; --
i )
1839 if( (*cliquetable)->djset !=
NULL )
1843 if( (*cliquetable)->varidxtable !=
NULL )
1867 if( num > cliquetable->
size )
1873 cliquetable->
size = newsize;
1875 assert(num <= cliquetable->size);
1909 SCIPsetDebugMsg(
set,
"starting merging %d variables in clique %d\n", *nclqvars, (clique ==
NULL) ? -1 : (
int) clique->id);
1911 if( *nclqvars <= 1 )
1929 noldbdchgs = *nbdchgs;
1932 startidx = *nclqvars - 1;
1933 while( startidx >= 0 )
1940 var = clqvars[startidx];
1946 if( clqvalues[startidx] )
1956 curr = startidx - 1;
1961 if( clqvars[curr] ==
var )
1963 if( clqvalues[curr] )
1974 assert(nzeros + nones <= *nclqvars);
1977 if( nones + nzeros == 1 )
1983 if( nones >= 2 && nzeros >= 2 )
1990 if( nones >= 2 || nzeros >= 2 )
1995 assert(nones <= 1 || nzeros <= 1);
1998 if( clique !=
NULL )
2014 SCIP_CALL(
SCIPvarFixBinary(
var, blkmem,
set, stat, transprob, origprob, tree, reopt, lp, branchcand, eventqueue,
2015 eventfilter, cliquetable, fixvalue, infeasible, nbdchgs) );
2018 fixvalue ? 1 : 0, *infeasible ?
"infeasible" :
"feasible");
2025 if( nones >= 1 && nzeros >= 1 )
2030 if( nzeros + nones < *nclqvars )
2051 while(
w > 0 && clqvars[
w-1] == clqvars[
w] )
2053 if( clqvalues[
w-1] != clqvalues[
w] )
2064 if( clique !=
NULL )
2069 branchcand, eventqueue, eventfilter, cliquetable, !clqvalues[
w], infeasible, nbdchgs) );
2072 clqvalues[
w] ? 0 : 1, *infeasible ?
"infeasible" :
"feasible");
2081 if( clique !=
NULL )
2087 *isequation =
FALSE;
2099 if( *infeasible || *nclqvars == 0 )
2107 if( *nbdchgs > noldbdchgs )
2114 onefixedvalue =
TRUE;
2120 while( startidx < *nclqvars )
2124 var = clqvars[startidx];
2132 if( onefixedvar !=
NULL )
2136 SCIPsetDebugMsg(
set,
"two variables in clique %d fixed to one %s%s and %s%s\n", (clique !=
NULL) ? (
int) clique->id : -1,
2141 onefixedvalue = clqvalues[startidx];
2149 clqvars[
w] = clqvars[startidx];
2150 clqvalues[
w] = clqvalues[startidx];
2159 if( clique !=
NULL )
2171 if( onefixedvar !=
NULL )
2173 SCIPsetDebugMsg(
set,
"variable %s%s in clique %d fixed to one, fixing all other variables to zero\n",
2174 onefixedvalue ?
"" :
"~",
SCIPvarGetName(onefixedvar), (clique !=
NULL) ? (
int) clique->id : -1);
2177 for( startidx = *nclqvars; startidx >= 0; --startidx )
2183 if( onefixedvalue != clqvalues[startidx] || clqvars[startidx] != onefixedvar )
2185 if( clique !=
NULL )
2194 while( startidx > 0 && clqvars[startidx - 1] == clqvars[startidx] )
2196 if( clqvalues[startidx - 1] != clqvalues[startidx] )
2205 clqvalues[startidx] ? 0 : 1);
2209 branchcand, eventqueue, eventfilter, cliquetable, !clqvalues[startidx], infeasible, nbdchgs) );
2217 if( clique !=
NULL )
2223 *isequation =
FALSE;
2231 if( *nclqvars == 0 )
2237 else if( *nclqvars == 1 )
2242 if( clique !=
NULL )
2246 SCIP_CALL(
SCIPvarFixBinary(clqvars[0], blkmem,
set, stat, transprob, origprob, tree, reopt, lp, branchcand,
2247 eventqueue, eventfilter, cliquetable, clqvalues[0], infeasible, nbdchgs) );
2250 clqvalues[0] ? 1 : 0, *infeasible ?
"infeasible" :
"feasible");
2253 *isequation =
FALSE;
2327 clqvars = clique->vars;
2328 nclqvars = clique->nvars;
2337 if( currnode == - 1 )
2341 if( lastnode != -1 )
2344 lastnode = currnode;
2366 if( nodeindex >= 0 )
2403 int nlocalbdchgs = 0;
2415 *infeasible =
FALSE;
2419 if( values ==
NULL )
2424 for( v =
nvars - 1; v >= 0; --v )
2425 clqvalues[v] =
TRUE;
2437 for( v =
nvars - 1; v >= 0; --v )
2480#ifdef SCIP_DISABLED_CODE
2485 while(
w > 0 && clqvars[
w - 1] == clqvars[
w] )
2487 if( clqvalues[
w - 1] != clqvalues[
w] )
2498 branchcand, eventqueue, eventfilter, cliquetable, !clqval, infeasible, &nlocalbdchgs) );
2501 clqval ? 0 : 1, *infeasible ?
"infeasible" :
"feasible");
2518 clqvars[v] = clqvars[
nvars];
2519 clqvalues[v] = clqvalues[
nvars];
2524 if( nbdchgs !=
NULL )
2525 *nbdchgs += nlocalbdchgs;
2534 if( v < 0 &&
nvars <= 1)
2543 branchcand, eventqueue, eventfilter, cliquetable, clqvalues[0], infeasible, &nlocalbdchgs) );
2546 clqvalues[0] ? 1 : 0, *infeasible ?
"infeasible" :
"feasible");
2548 if( nbdchgs !=
NULL )
2549 *nbdchgs += nlocalbdchgs;
2551 else if(
nvars == 0 )
2565 SCIP_CALL(
sortAndMergeClique(clqvars, clqvalues, &
nvars, &isequation,
NULL, blkmem,
set, stat, transprob, origprob, tree,
2566 reopt, lp, branchcand, eventqueue, eventfilter, cliquetable, &nlocalbdchgs, infeasible) );
2568 if( nbdchgs !=
NULL )
2569 *nbdchgs += nlocalbdchgs;
2572 if(
nvars == 0 || *infeasible )
2577 SCIPsetDebugMsg(
set,
"reject %d-variable clique to keep clique table entries below threshold of %g entries\n",
2595 if( sameclique ==
NULL )
2616 SCIPsetDebugMsg(
set,
"same clique %p (id: %d) already found in cliquetable -> discard new one\n", (
void*) sameclique, sameclique->
id);
2622 if( !sameclique->equation && clique->equation )
2623 sameclique->equation =
TRUE;
2681 w = clique->startcleanup;
2683 SCIPsetDebugMsg(
set,
"Starting clean up of clique %u (size %d) from position %d\n", clique->id, clique->nvars,
w);
2686 for( v =
w; v < clique->nvars; ++v )
2690 addvartoclique =
FALSE;
2701 clique->values[v] = !clique->values[v];
2705 clique->equation =
FALSE;
2709 addvartoclique =
TRUE;
2721 if( !addvartoclique )
2725 clique->equation =
FALSE;
2735 if( onefixedvar !=
NULL )
2739 SCIPsetDebugMsg(
set,
"two variables in clique %u fixed to one %s%s and %s%s\n", clique->id,
2740 onefixedvalue ?
"" :
"~",
SCIPvarGetName(onefixedvar), clique->values[v] ?
"" :
"~",
2744 onefixedvar = clique->vars[v];
2745 onefixedvalue = clique->values[v];
2754 clique->vars[
w] = clique->vars[v];
2755 clique->values[
w] = clique->values[v];
2759 if( addvartoclique )
2769 if( onefixedvar !=
NULL )
2771 SCIPsetDebugMsg(
set,
"variable %s%s in clique %u fixed to one, fixing all other variables to zero\n",
2772 onefixedvalue ?
"" :
"~",
SCIPvarGetName(onefixedvar), clique->id);
2774 for( v = 0; v < clique->nvars ; ++v )
2776 SCIP_VAR* clqvar = clique->vars[v];
2782 if( onefixedvalue != clqval || clqvar != onefixedvar )
2796 assert(clqvar != onefixedvar);
2809#ifdef SCIP_DISABLED_CODE
2814 while( v < clique->
nvars - 1 && clique->vars[v + 1] == clqvar )
2816 if( clique->values[v + 1] != clique->values[v] )
2826 SCIP_CALL(
SCIPvarFixBinary(clqvar, blkmem,
set, stat, transprob, origprob, tree, reopt, lp, branchcand,
2827 eventqueue, eventfilter, cliquetable, !clqval, infeasible, nchgbds) );
2841 clique->equation =
FALSE;
2842 clique->startcleanup = -1;
2847 if( clique->equation )
2849 if( clique->nvars == 0 )
2854 else if( clique->nvars == 1 )
2863 clique->values[0] ? 1 : 0);
2866 branchcand, eventqueue, eventfilter, cliquetable, clique->values[0], infeasible, nchgbds) );
2869 clique->equation =
FALSE;
2870 clique->startcleanup = -1;
2878 SCIP_Bool isequation = clique->equation;
2882 transprob, origprob, tree, reopt, lp, branchcand, eventqueue, eventfilter, cliquetable, nchgbds, infeasible) );
2884 clique->equation = isequation;
2889 clique->startcleanup = -1;
2896#ifdef SCIP_MORE_DEBUG
2911 return (nentries == cliquetable->
nentries);
2914#define checkNEntries(cliquetable) TRUE
2944 *infeasible =
FALSE;
2963 clique = cliquetable->
cliques[0];
2969 cliquetable->
nentries -= clique->nvars;
2972 SCIP_CALL(
cliqueCleanup(clique, blkmem,
set, stat, transprob, origprob, tree, reopt, lp, branchcand, eventqueue,
2973 eventfilter, cliquetable, nchgbds, infeasible) );
2986#ifdef SCIP_DISABLED_CODE
2996 printf(
"aggr vars, clique %u\n", clique->id);
3000 var0 = clique->vars[0];
3001 var1 = clique->vars[1];
3003 if( !clique->values[0] )
3011 if( !clique->values[1] )
3021 var0 = clique->vars[1];
3022 var1 = clique->vars[0];
3024 if( !clique->values[0] )
3032 if( !clique->values[1] )
3046 tree, lp, cliquetable, branchcand, eventqueue, eventfilter,
3047 var0, var1, scalarx, scalary, rhs, infeasible, &aggregated) );
3049 assert(aggregated || *infeasible);
3056 if( clique->nvars <= 1 || sameclique !=
NULL )
3061 assert(clique->nvars > 1 || !clique->equation);
3066 if( clique->nvars > 1 && clique->equation && !sameclique->
equation )
3077 for( j = 0; j < clique->nvars; ++j )
3095 cliquetable->
nentries += clique->nvars;
3098 if( !clique->eventsissued )
3103 for( j = 0; j < clique->nvars; ++j )
3110 clique->eventsissued =
TRUE;
3160 ndiscvars = nbinvars + nintvars + nimplvars;
3163 for( v = nbinvars; v < ndiscvars; ++v )
3170 nbinvarstotal = nbinvars + nimplbinvars;
3173 if( nbinvarstotal == 0 )
3175 SCIPsetDebugMsg(
set,
"0 binary variables in total --> 0 connected components in the clique table");
3183 SCIPsetDebugMsg(
set,
"0 cliques --> Clique table has %d isolated nodes", nbinvarstotal);
3199 for( v = 0; v < ndiscvars; ++v )
3230 djset = cliquetable->
djset;
3233 nnonbinvars = (nintvars + nimplvars) - nimplbinvars;
3235 cliques = cliquetable->
cliques;
3244 clique = cliques[
c];
3268#undef SCIPvboundsGetNVbds
3269#undef SCIPvboundsGetVars
3270#undef SCIPvboundsGetCoefs
3271#undef SCIPvboundsGetConstants
3272#undef SCIPimplicsGetNImpls
3273#undef SCIPimplicsGetVars
3274#undef SCIPimplicsGetTypes
3275#undef SCIPimplicsGetBounds
3276#undef SCIPimplicsGetIds
3277#undef SCIPcliqueGetNVars
3278#undef SCIPcliqueGetVars
3279#undef SCIPcliqueGetValues
3280#undef SCIPcliqueGetId
3281#undef SCIPcliqueGetIndex
3282#undef SCIPcliqueIsCleanedUp
3283#undef SCIPcliqueIsEquation
3284#undef SCIPcliquelistGetNCliques
3285#undef SCIPcliquelistGetCliques
3286#undef SCIPcliquelistCheck
3287#undef SCIPcliquetableGetNCliques
3288#undef SCIPcliquetableGetCliques
3289#undef SCIPcliquetableGetNEntries
3290#undef SCIPcliquetableGetNCliqueComponents
3291#undef SCIPcliquetableNeedsComponentUpdate
3298 return vbounds !=
NULL ? vbounds->
len : 0;
3331 return implics !=
NULL ? implics->
nimpls[varfixing] : 0;
3340 return implics !=
NULL ? implics->
vars[varfixing] :
NULL;
3370 return implics !=
NULL ? implics->
ids[varfixing] :
NULL;
3380 return clique->nvars;
3390 return clique->vars;
3402 return clique->values;
3426 return clique->index;
3436 return (clique->startcleanup == -1);
3455 return cliquelist !=
NULL ? cliquelist->
ncliques[value] : 0;
3484 for( value = 0; value < 2; ++value )
3492 for(
i = 0;
i < ncliques; ++
i )
3497 clique = cliques[
i];
#define SCIPdebugCheckClique(set, vars, values, nvars)
#define SCIP_HASHSIZE_CLIQUES
#define SCIP_LONGINT_FORMAT
#define SCIP_HASHSIZE_CLIQUES_SMALL
SCIP_RETCODE SCIPeventqueueAdd(SCIP_EVENTQUEUE *eventqueue, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_PRIMAL *primal, SCIP_LP *lp, SCIP_BRANCHCAND *branchcand, SCIP_EVENTFILTER *eventfilter, SCIP_EVENT **event)
SCIP_RETCODE SCIPeventqueueProcess(SCIP_EVENTQUEUE *eventqueue, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_PRIMAL *primal, SCIP_LP *lp, SCIP_BRANCHCAND *branchcand, SCIP_EVENTFILTER *eventfilter)
SCIP_RETCODE SCIPeventCreateImplAdded(SCIP_EVENT **event, BMS_BLKMEM *blkmem, SCIP_VAR *var)
SCIP_RETCODE SCIPeventqueueDelay(SCIP_EVENTQUEUE *eventqueue)
internal methods for managing events
int SCIPdisjointsetGetSize(SCIP_DISJOINTSET *djset)
int SCIPdisjointsetGetComponentCount(SCIP_DISJOINTSET *djset)
int SCIPdisjointsetFind(SCIP_DISJOINTSET *djset, int element)
void SCIPdisjointsetUnion(SCIP_DISJOINTSET *djset, int p, int q, SCIP_Bool forcerepofp)
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 SCIPhashmapRemoveAll(SCIP_HASHMAP *hashmap)
void SCIPhashtableFree(SCIP_HASHTABLE **hashtable)
#define SCIPhashFour(a, b, c, d)
SCIP_RETCODE SCIPhashtableCreate(SCIP_HASHTABLE **hashtable, BMS_BLKMEM *blkmem, int tablesize, SCIP_DECL_HASHGETKEY((*hashgetkey)), SCIP_DECL_HASHKEYEQ((*hashkeyeq)), SCIP_DECL_HASHKEYVAL((*hashkeyval)), void *userptr)
void * SCIPhashtableRetrieve(SCIP_HASHTABLE *hashtable, void *key)
SCIP_RETCODE SCIPhashtableRemove(SCIP_HASHTABLE *hashtable, void *element)
SCIP_RETCODE SCIPhashtableInsert(SCIP_HASHTABLE *hashtable, void *element)
SCIP_Bool SCIPvarIsActive(SCIP_VAR *var)
SCIP_Bool SCIPvarIsBinary(SCIP_VAR *var)
SCIP_VARSTATUS SCIPvarGetStatus(SCIP_VAR *var)
SCIP_VAR * SCIPvarGetProbvar(SCIP_VAR *var)
SCIP_VARTYPE SCIPvarGetType(SCIP_VAR *var)
SCIP_Real SCIPvarGetUbGlobal(SCIP_VAR *var)
int SCIPvarGetIndex(SCIP_VAR *var)
const char * SCIPvarGetName(SCIP_VAR *var)
SCIP_Bool SCIPvarIsIntegral(SCIP_VAR *var)
int SCIPvarGetNCliques(SCIP_VAR *var, SCIP_Bool varfixing)
SCIP_VAR * SCIPvarGetNegationVar(SCIP_VAR *var)
SCIP_CLIQUE ** SCIPvarGetCliques(SCIP_VAR *var, SCIP_Bool varfixing)
SCIP_Real SCIPvarGetLbGlobal(SCIP_VAR *var)
SCIP_RETCODE SCIPvarGetProbvarBinary(SCIP_VAR **var, SCIP_Bool *negated)
SCIP_RETCODE SCIPvarsGetProbvarBinary(SCIP_VAR ***vars, SCIP_Bool **negatedarr, int nvars)
SCIP_Bool SCIPsortedvecFindPtr(void **ptrarray, SCIP_DECL_SORTPTRCOMP((*ptrcomp)), void *val, int len, int *pos)
void SCIPsortPtrBool(void **ptrarray, SCIP_Bool *boolarray, SCIP_DECL_SORTPTRCOMP((*ptrcomp)), int len)
assert(minobj< SCIPgetCutoffbound(scip))
SCIP_VAR ** SCIPimplicsGetVars(SCIP_IMPLICS *implics, SCIP_Bool varfixing)
void SCIPcliqueDelVar(SCIP_CLIQUE *clique, SCIP_CLIQUETABLE *cliquetable, SCIP_VAR *var, SCIP_Bool value)
SCIP_RETCODE SCIPcliquetableAdd(SCIP_CLIQUETABLE *cliquetable, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_TREE *tree, SCIP_REOPT *reopt, SCIP_LP *lp, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter, SCIP_VAR **vars, SCIP_Bool *values, int nvars, SCIP_Bool isequation, SCIP_Bool *infeasible, int *nbdchgs)
void SCIPcliquelistRemoveFromCliques(SCIP_CLIQUELIST *cliquelist, SCIP_CLIQUETABLE *cliquetable, SCIP_VAR *var, SCIP_Bool irrelevantvar)
SCIP_RETCODE SCIPcliquetableFree(SCIP_CLIQUETABLE **cliquetable, BMS_BLKMEM *blkmem)
void SCIPvboundsFree(SCIP_VBOUNDS **vbounds, BMS_BLKMEM *blkmem)
SCIP_Real * SCIPvboundsGetCoefs(SCIP_VBOUNDS *vbounds)
void SCIPvboundsShrink(SCIP_VBOUNDS **vbounds, BMS_BLKMEM *blkmem, int newnvbds)
#define HASHTABLE_CLIQUETABLE_SIZE
int SCIPcliquetableGetNCliquesCreated(SCIP_CLIQUETABLE *cliquetable)
static SCIP_RETCODE vboundsEnsureSize(SCIP_VBOUNDS **vbounds, BMS_BLKMEM *blkmem, SCIP_SET *set, int num)
static void cliquetableSwapCliques(SCIP_CLIQUETABLE *cliquetable, int first, int second)
SCIP_Bool SCIPcliquetableNeedsComponentUpdate(SCIP_CLIQUETABLE *cliquetable)
SCIP_VAR ** SCIPcliqueGetVars(SCIP_CLIQUE *clique)
SCIP_CLIQUE ** SCIPcliquelistGetCliques(SCIP_CLIQUELIST *cliquelist, SCIP_Bool value)
static SCIP_RETCODE implicsCreate(SCIP_IMPLICS **implics, BMS_BLKMEM *blkmem)
SCIP_Bool SCIPcliquelistsHaveCommonClique(SCIP_CLIQUELIST *cliquelist1, SCIP_Bool value1, SCIP_CLIQUELIST *cliquelist2, SCIP_Bool value2)
SCIP_Real * SCIPimplicsGetBounds(SCIP_IMPLICS *implics, SCIP_Bool varfixing)
SCIP_Longint SCIPcliquetableGetNEntries(SCIP_CLIQUETABLE *cliquetable)
void SCIPcliquelistCheck(SCIP_CLIQUELIST *cliquelist, SCIP_VAR *var)
SCIP_VAR ** SCIPvboundsGetVars(SCIP_VBOUNDS *vbounds)
int SCIPcliqueGetNVars(SCIP_CLIQUE *clique)
static void cliquetableMarkCliqueForCleanup(SCIP_CLIQUETABLE *cliquetable, SCIP_CLIQUE *clique)
SCIP_Bool * SCIPcliqueGetValues(SCIP_CLIQUE *clique)
SCIP_RETCODE SCIPvboundsDel(SCIP_VBOUNDS **vbounds, BMS_BLKMEM *blkmem, SCIP_VAR *vbdvar, SCIP_Bool negativecoef)
int * SCIPimplicsGetIds(SCIP_IMPLICS *implics, SCIP_Bool varfixing)
SCIP_RETCODE SCIPimplicsAdd(SCIP_IMPLICS **implics, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_Bool varfixing, SCIP_VAR *implvar, SCIP_BOUNDTYPE impltype, SCIP_Real implbound, SCIP_Bool isshortcut, SCIP_Bool *conflict, SCIP_Bool *added)
static int cliquesSearchClique(SCIP_CLIQUE **cliques, int ncliques, SCIP_CLIQUE *clique)
int SCIPcliquetableGetNCliqueComponents(SCIP_CLIQUETABLE *cliquetable)
static int cliquetableGetNodeIndexBinvar(SCIP_CLIQUETABLE *cliquetable, SCIP_VAR *binvar)
SCIP_RETCODE SCIPvboundsAdd(SCIP_VBOUNDS **vbounds, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_BOUNDTYPE vboundtype, SCIP_VAR *var, SCIP_Real coef, SCIP_Real constant, SCIP_Bool *added)
void SCIPcliquelistFree(SCIP_CLIQUELIST **cliquelist, BMS_BLKMEM *blkmem)
static SCIP_RETCODE vboundsSearchPos(SCIP_VBOUNDS *vbounds, SCIP_VAR *var, SCIP_Bool negativecoef, int *insertpos, SCIP_Bool *found)
int SCIPimplicsGetNImpls(SCIP_IMPLICS *implics, SCIP_Bool varfixing)
SCIP_RETCODE SCIPcliqueAddVar(SCIP_CLIQUE *clique, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_VAR *var, SCIP_Bool value, SCIP_Bool *doubleentry, SCIP_Bool *oppositeentry)
static void checkImplics(SCIP_IMPLICS *implics)
SCIP_RETCODE SCIPcliquetableCreate(SCIP_CLIQUETABLE **cliquetable, SCIP_SET *set, BMS_BLKMEM *blkmem)
SCIP_BOUNDTYPE * SCIPimplicsGetTypes(SCIP_IMPLICS *implics, SCIP_Bool varfixing)
static void cliqueFree(SCIP_CLIQUE **clique, BMS_BLKMEM *blkmem)
SCIP_Bool SCIPcliqueHasVar(SCIP_CLIQUE *clique, SCIP_VAR *var, SCIP_Bool value)
int SCIPcliquetableGetNCliques(SCIP_CLIQUETABLE *cliquetable)
int SCIPcliquelistGetNCliques(SCIP_CLIQUELIST *cliquelist, SCIP_Bool value)
void SCIPimplicsGetVarImplics(SCIP_IMPLICS *implics, SCIP_Bool varfixing, SCIP_VAR *implvar, SCIP_Bool *haslowerimplic, SCIP_Bool *hasupperimplic)
static SCIP_RETCODE cliquelistCreate(SCIP_CLIQUELIST **cliquelist, BMS_BLKMEM *blkmem)
#define checkNEntries(cliquetable)
static SCIP_RETCODE vboundsCreate(SCIP_VBOUNDS **vbounds, BMS_BLKMEM *blkmem)
static SCIP_RETCODE cliquelistEnsureSize(SCIP_CLIQUELIST *cliquelist, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_Bool value, int num)
static void implicsSearchVar(SCIP_IMPLICS *implics, SCIP_Bool varfixing, SCIP_VAR *implvar, int *poslower, int *posupper, int *posadd)
SCIP_RETCODE SCIPcliquelistDel(SCIP_CLIQUELIST **cliquelist, BMS_BLKMEM *blkmem, SCIP_Bool value, SCIP_CLIQUE *clique)
static SCIP_RETCODE cliqueCreateWithData(SCIP_CLIQUE **clique, BMS_BLKMEM *blkmem, int size, SCIP_VAR **vars, SCIP_Bool *values, int nvars, int id, SCIP_Bool isequation)
#define cliqueCheck(clique)
SCIP_Bool SCIPcliqueIsCleanedUp(SCIP_CLIQUE *clique)
int SCIPcliquetableGetVarComponentIdx(SCIP_CLIQUETABLE *cliquetable, SCIP_VAR *var)
void SCIPimplicsGetVarImplicPoss(SCIP_IMPLICS *implics, SCIP_Bool varfixing, SCIP_VAR *implvar, int *lowerimplicpos, int *upperimplicpos)
static SCIP_RETCODE cliquetableEnsureSize(SCIP_CLIQUETABLE *cliquetable, SCIP_SET *set, int num)
SCIP_RETCODE SCIPimplicsDel(SCIP_IMPLICS **implics, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_Bool varfixing, SCIP_VAR *implvar, SCIP_BOUNDTYPE impltype)
static SCIP_RETCODE cliqueCleanup(SCIP_CLIQUE *clique, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_TREE *tree, SCIP_REOPT *reopt, SCIP_LP *lp, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter, SCIP_CLIQUETABLE *cliquetable, int *nchgbds, SCIP_Bool *infeasible)
SCIP_RETCODE SCIPcliquetableCleanup(SCIP_CLIQUETABLE *cliquetable, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_TREE *tree, SCIP_REOPT *reopt, SCIP_LP *lp, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter, int *nchgbds, SCIP_Bool *infeasible)
SCIP_Real * SCIPvboundsGetConstants(SCIP_VBOUNDS *vbounds)
static SCIP_Bool implicsSearchImplic(SCIP_IMPLICS *implics, SCIP_Bool varfixing, SCIP_VAR *implvar, SCIP_BOUNDTYPE impltype, int *poslower, int *posupper, int *posadd)
static void cliquetableUpdateConnectednessClique(SCIP_CLIQUETABLE *cliquetable, SCIP_CLIQUE *clique)
int SCIPvboundsGetNVbds(SCIP_VBOUNDS *vbounds)
SCIP_RETCODE SCIPcliquetableComputeCliqueComponents(SCIP_CLIQUETABLE *cliquetable, SCIP_SET *set, BMS_BLKMEM *blkmem, SCIP_VAR **vars, int nbinvars, int nintvars, int nimplvars)
static SCIP_RETCODE sortAndMergeClique(SCIP_VAR **clqvars, SCIP_Bool *clqvalues, int *nclqvars, SCIP_Bool *isequation, SCIP_CLIQUE *clique, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_TREE *tree, SCIP_REOPT *reopt, SCIP_LP *lp, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter, SCIP_CLIQUETABLE *cliquetable, int *nbdchgs, SCIP_Bool *infeasible)
SCIP_CLIQUE ** SCIPcliquetableGetCliques(SCIP_CLIQUETABLE *cliquetable)
SCIP_Bool SCIPimplicsContainsImpl(SCIP_IMPLICS *implics, SCIP_Bool varfixing, SCIP_VAR *implvar, SCIP_BOUNDTYPE impltype)
static SCIP_RETCODE implicsEnsureSize(SCIP_IMPLICS **implics, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_Bool varfixing, int num)
void SCIPimplicsFree(SCIP_IMPLICS **implics, BMS_BLKMEM *blkmem)
int SCIPcliqueGetIndex(SCIP_CLIQUE *clique)
int SCIPcliqueSearchVar(SCIP_CLIQUE *clique, SCIP_VAR *var, SCIP_Bool value)
SCIP_Bool SCIPcliqueIsEquation(SCIP_CLIQUE *clique)
unsigned int SCIPcliqueGetId(SCIP_CLIQUE *clique)
static SCIP_RETCODE cliqueEnsureSize(SCIP_CLIQUE *clique, BMS_BLKMEM *blkmem, SCIP_SET *set, int num)
SCIP_RETCODE SCIPcliquelistAdd(SCIP_CLIQUELIST **cliquelist, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_Bool value, SCIP_CLIQUE *clique)
methods for implications, variable bounds, and cliques
#define BMSduplicateBlockMemoryArray(mem, ptr, source, num)
#define BMSfreeMemory(ptr)
#define BMSfreeBlockMemory(mem, ptr)
#define BMSallocBlockMemory(mem, ptr)
#define BMSreallocMemoryArray(ptr, num)
#define BMSfreeBlockMemoryArrayNull(mem, ptr, num)
#define BMSfreeBlockMemoryArray(mem, ptr, num)
#define BMSreallocBlockMemoryArray(mem, ptr, oldnum, newnum)
#define BMSmoveMemoryArray(ptr, source, num)
struct BMS_BlkMem BMS_BLKMEM
#define BMSfreeMemoryArrayNull(ptr)
#define BMSallocMemory(ptr)
void SCIPdisjointsetFree(SCIP_DISJOINTSET **djset, BMS_BLKMEM *blkmem)
SCIP_RETCODE SCIPdisjointsetCreate(SCIP_DISJOINTSET **djset, BMS_BLKMEM *blkmem, int ncomponents)
internal miscellaneous methods
public methods for implications, variable bounds, and cliques
public methods for message output
public data structures and miscellaneous methods
methods for sorting joint arrays of various types
public methods for problem variables
SCIP_Bool SCIPsetIsFeasGT(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPsetIsFeasLE(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
SCIP_STAGE SCIPsetGetStage(SCIP_SET *set)
SCIP_Bool SCIPsetIsFeasLT(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPsetIsInfinity(SCIP_SET *set, SCIP_Real val)
SCIP_Bool SCIPsetIsZero(SCIP_SET *set, SCIP_Real val)
SCIP_Bool SCIPsetIsFeasGE(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
int SCIPsetCalcMemGrowSize(SCIP_SET *set, int num)
internal methods for global SCIP settings
#define SCIPsetFreeBufferArray(set, ptr)
#define SCIPsetAllocBufferArray(set, ptr, num)
#define SCIPsetDuplicateBufferArray(set, ptr, source, num)
SCIP_CLIQUE ** cliques[2]
SCIP_HASHTABLE * hashtable
SCIP_HASHMAP * varidxtable
SCIP_Bool compsfromscratch
SCIP_BOUNDTYPE * types[2]
datastructures for implications, variable bounds, and cliques
datastructures for global SCIP settings
datastructures for problem statistics
struct SCIP_BranchCand SCIP_BRANCHCAND
struct SCIP_EventFilter SCIP_EVENTFILTER
struct SCIP_EventQueue SCIP_EVENTQUEUE
struct SCIP_Event SCIP_EVENT
struct SCIP_CliqueList SCIP_CLIQUELIST
struct SCIP_Implics SCIP_IMPLICS
struct SCIP_Clique SCIP_CLIQUE
struct SCIP_VBounds SCIP_VBOUNDS
struct SCIP_CliqueTable SCIP_CLIQUETABLE
enum SCIP_BoundType SCIP_BOUNDTYPE
#define SCIP_DECL_SORTPTRCOMP(x)
#define SCIP_DECL_HASHKEYEQ(x)
#define SCIP_DECL_HASHGETKEY(x)
#define SCIP_DECL_HASHKEYVAL(x)
struct SCIP_DisjointSet SCIP_DISJOINTSET
struct SCIP_Prob SCIP_PROB
struct SCIP_Reopt SCIP_REOPT
enum SCIP_Retcode SCIP_RETCODE
struct SCIP_Stat SCIP_STAT
struct SCIP_Tree SCIP_TREE
@ SCIP_VARSTATUS_MULTAGGR
@ SCIP_VARSTATUS_AGGREGATED
SCIP_RETCODE SCIPvarFixBinary(SCIP_VAR *var, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_TREE *tree, SCIP_REOPT *reopt, SCIP_LP *lp, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter, SCIP_CLIQUETABLE *cliquetable, SCIP_Bool value, SCIP_Bool *infeasible, int *nbdchgs)
SCIP_RETCODE SCIPvarTryAggregateVars(SCIP_SET *set, BMS_BLKMEM *blkmem, SCIP_STAT *stat, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_PRIMAL *primal, SCIP_TREE *tree, SCIP_REOPT *reopt, SCIP_LP *lp, SCIP_CLIQUETABLE *cliquetable, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter, SCIP_VAR *varx, SCIP_VAR *vary, SCIP_Real scalarx, SCIP_Real scalary, SCIP_Real rhs, SCIP_Bool *infeasible, SCIP_Bool *aggregated)
SCIP_RETCODE SCIPvarAddCliqueToList(SCIP_VAR *var, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_Bool value, SCIP_CLIQUE *clique)
SCIP_Bool SCIPvarIsMarkedDeleteGlobalStructures(SCIP_VAR *var)
SCIP_RETCODE SCIPvarDelCliqueFromList(SCIP_VAR *var, BMS_BLKMEM *blkmem, SCIP_Bool value, SCIP_CLIQUE *clique)
SCIP_RETCODE SCIPvarsAddClique(SCIP_VAR **vars, SCIP_Bool *values, int nvars, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_CLIQUE *clique)
internal methods for problem variables