70#define SEPA_NAME "oddcycle"
71#define SEPA_DESC "odd cycle separator"
72#define SEPA_PRIORITY -15000
74#define SEPA_MAXBOUNDDIST 1.0
75#define SEPA_USESSUBSCIP FALSE
76#define SEPA_DELAY FALSE
80#define DEFAULT_SCALEFACTOR 1000
81#define DEFAULT_USEGLS TRUE
82#define DEFAULT_LIFTODDCYCLES FALSE
83#define DEFAULT_REPAIRCYCLES TRUE
84#define DEFAULT_ADDSELFARCS TRUE
85#define DEFAULT_INCLUDETRIANGLES TRUE
86#define DEFAULT_MULTIPLECUTS FALSE
87#define DEFAULT_ALLOWMULTIPLECUTS TRUE
88#define DEFAULT_LPLIFTCOEF FALSE
90#define DEFAULT_RECALCLIFTCOEF TRUE
91#define DEFAULT_MAXSEPACUTS 5000
92#define DEFAULT_MAXSEPACUTSROOT 5000
93#define DEFAULT_PERCENTTESTVARS 0
94#define DEFAULT_OFFSETTESTVARS 100
95#define DEFAULT_MAXCUTSROOT 1
96#define DEFAULT_SORTSWITCH 3
97#define DEFAULT_MAXREFERENCE 0
98#define DEFAULT_MAXROUNDS 10
99#define DEFAULT_MAXROUNDSROOT 10
100#define DEFAULT_MAXNLEVELS 20
101#define DEFAULT_MAXPERNODESLEVEL 100
102#define DEFAULT_OFFSETNODESLEVEL 10
103#define DEFAULT_SORTROOTNEIGHBORS TRUE
104#define DEFAULT_MAXCUTSLEVEL 50
105#define DEFAULT_MAXUNSUCESSFULL 3
106#define DEFAULT_CUTTHRESHOLD -1
130 unsigned int maxnodes;
131 unsigned int maxarcs;
132 unsigned int nlevels;
140 unsigned int* weightForward;
141 unsigned int* weightBackward;
142 unsigned int sizeForward;
143 unsigned int sizeBackward;
146 unsigned int* sourceAdj;
147 unsigned int* targetAdj;
148 unsigned int* weightAdj;
149 unsigned int* levelAdj;
150 unsigned int sizeAdj;
187 unsigned int oldncuts;
199 unsigned int* mapping;
205 int maxsepacutsround;
211 int maxpernodeslevel;
212 int offsetnodeslevel;
213 unsigned int maxlevelsize;
240 unsigned int nbinvars,
241 unsigned int startnode
244 unsigned int varsindex;
245 unsigned int counter;
250 assert(startnode < 4*nbinvars);
253 varsindex = startnode;
256 if( varsindex < nbinvars || ( varsindex >= 2*nbinvars && varsindex < 3*nbinvars ) )
266 for( varsindex = pred[startnode]; varsindex != startnode; varsindex = pred[varsindex] )
268 if( varsindex < nbinvars || ( varsindex >= 2*nbinvars && varsindex < 3*nbinvars ) )
280 if( varsindex < nbinvars || ( varsindex >= 2*nbinvars && varsindex < 3*nbinvars ) )
305 unsigned int nbinvars,
326 if( dijkstragraph->
outcnt[
a] == 0 || dijkstragraph->
outcnt[
b] == 0 )
332 if( dijkstragraph->
head[
i] ==
b + 2*nbinvars )
341 if( (levelgraph->beginForward[
a] != -1 || levelgraph->beginBackward[
a] != -1)
342 && (levelgraph->beginForward[
b] != -1 || levelgraph->beginBackward[
b] != -1) )
344 assert(levelgraph->level[
a] <= levelgraph->nlevels);
345 assert(levelgraph->level[
b] <= levelgraph->nlevels);
348 if( levelgraph->level[
a] > levelgraph->level[
b] + 1
349 || levelgraph->level[
b] > levelgraph->level[
a] + 1 )
352 assert(levelgraph->level[
a] == levelgraph->level[
b]
353 || levelgraph->level[
a]+1 == levelgraph->level[
b]
354 || levelgraph->level[
a] == levelgraph->level[
b]+1);
357 if( levelgraph->level[
a] == levelgraph->level[
b]+1 )
359 if( levelgraph->beginBackward[
a] >= 0 )
361 i = (
unsigned int) levelgraph->beginBackward[
a];
362 while( levelgraph->targetBackward[
i] != -1 )
364 if( levelgraph->targetBackward[
i] == (
int)
b )
370 else if( levelgraph->level[
a] == levelgraph->level[
b]-1 )
372 if( levelgraph->beginForward[
a] >= 0 )
374 i = (
unsigned int) levelgraph->beginForward[
a];
375 while( levelgraph->targetForward[
i] != -1 )
377 if( levelgraph->targetForward[
i] == (
int)
b )
385 assert(levelgraph->level[
a] == levelgraph->level[
b]);
386 assert(levelgraph->level[
a] > 0);
390 i = (
unsigned int) levelgraph->beginAdj[
a];
391 assert(
i >= levelgraph->levelAdj[levelgraph->level[
a]]);
395 if( levelgraph->targetAdj[
i] ==
b )
399 if( levelgraph->sourceAdj[
i] == 0 && levelgraph->targetAdj[
i] == 0 )
402 assert(levelgraph->sourceAdj[
i] < levelgraph->targetAdj[
i]);
408 i = (
unsigned int) levelgraph->beginAdj[
b];
409 assert(
i >= levelgraph->levelAdj[levelgraph->level[
b]]);
413 if( levelgraph->targetAdj[
i] ==
a )
417 if( levelgraph->sourceAdj[
i] == 0 && levelgraph->targetAdj[
i] == 0 )
420 assert(levelgraph->sourceAdj[
i] < levelgraph->targetAdj[
i]);
436 unsigned int ncliques;
437 unsigned int ncliquevars;
469 varfixingtemp = originalb;
471 originalb = originala;
473 originala = varfixingtemp;
482 for(
i = 0;
i < ncliques; ++
i )
489 assert(cliquevars !=
NULL || ncliquevars == 0);
490 assert(cliquevals !=
NULL || ncliquevars == 0);
492 for( j = 0; j < ncliquevars; ++j )
497 if( (cliquevals[j] ==
FALSE && originalb ==
TRUE) || ( cliquevals[j] ==
TRUE && originalb ==
FALSE ) )
522 unsigned int ncyclevars,
524 unsigned int nbinvars,
525 unsigned int* lifted,
526 unsigned int* nlifted,
537 assert(ncyclevars % 2 == 1);
539 assert(ncyclevars <= nbinvars);
547 while( (myi[
a] || myi[
b] || myi[
c]) && k < *nlifted )
573 unsigned int ncyclevars,
575 unsigned int nbinvars,
576 unsigned int* lifted,
577 unsigned int* nlifted,
590 assert(ncyclevars % 2 == 1);
592 assert(ncyclevars <= 2*nbinvars);
601 for( j = 1; j < (int)ncyclevars-1; ++j )
611 myi[ncyclevars-1] =
isNeighbor(
vars, nbinvars, graphdata,
i, cycle[ncyclevars-2])
618 for( j = 1; j < (int)ncyclevars-1; ++j )
620 checkBlocking((
unsigned int) (j-1), (
unsigned int) j, (
unsigned int) (j+1),
i, cycle, ncyclevars,
vars, nbinvars, lifted, nlifted, graphdata, myi);
622 checkBlocking(ncyclevars-2, ncyclevars-1, 0,
i, cycle, ncyclevars,
vars, nbinvars, lifted, nlifted, graphdata, myi);
623 checkBlocking(ncyclevars-1, 0, 1,
i, cycle, ncyclevars,
vars, nbinvars, lifted, nlifted, graphdata, myi);
633 while( myi[end] && end > 0 )
638 assert(k == ncyclevars || end > 0);
643 assert(ncyclevars % 2 == 1);
644 coef = (ncyclevars-1)/2;
653 assert(coef <= (ncyclevars-1)/2);
662 while( j < (
int)end )
665 while( j<(
int)end && ! myi[j] )
669 while( j<(
int)end && myi[j] )
679 assert(coef <= (ncyclevars-1)/2);
708 unsigned int* nlifted,
709 unsigned int* lifted,
710 unsigned int* liftcoef,
714 unsigned int nbinvars,
715 unsigned int startnode,
717 unsigned int ncyclevars,
727 unsigned int negated;
729 unsigned int liftround;
738 assert(startnode < 2*nbinvars);
740 assert(ncyclevars % 2 == 1);
742 assert(ncyclevars <= nbinvars);
752 cycle[0] = startnode;
755 while(
i != startnode )
776 for(
i = 0;
i < 2*nbinvars; ++
i )
780 for(
i = 0;
i < ncyclevars; ++
i )
782 candList[cycle[
i]] =
FALSE;
783 if( cycle[
i] >= nbinvars )
784 negated = cycle[
i] - nbinvars;
786 negated = cycle[
i] + nbinvars;
787 assert(negated < 2*nbinvars);
788 candList[negated] =
FALSE;
800 if(
sepadata->recalcliftcoef || liftround == 0 )
802 for(
i = 0;
i < 2*nbinvars; ++
i )
806 coef[
i] =
getCoef(
scip,
i, cycle, ncyclevars,
vars, nbinvars, lifted, nlifted, graphdata, myi);
807 assert(coef[
i] <= (ncyclevars-1)/2);
815 for(
i = 0;
i < 2*nbinvars; ++
i )
838 coef[
i] =
getCoef(
scip, (
unsigned int)
bestcand, cycle, ncyclevars,
vars, nbinvars, lifted, nlifted, graphdata, myi);
844 negated = (
unsigned int)
bestcand - nbinvars;
846 negated = (
unsigned int)
bestcand + nbinvars;
847 assert(negated < 2*nbinvars);
849 candList[negated] =
FALSE;
851 assert(*nlifted < nbinvars-ncyclevars);
852 lifted[*nlifted] = (
unsigned int)
bestcand;
853 liftcoef[*nlifted] = coef[
bestcand];
883 unsigned int nbinvars,
884 unsigned int startnode,
886 unsigned int ncyclevars,
895 unsigned int negatedcount;
896 unsigned int negated;
899 unsigned int nlifted;
900 unsigned int* lifted;
901 unsigned int* liftcoef;
909 assert(startnode < 2*nbinvars);
911 assert(ncyclevars % 2 == 1);
912 assert(ncyclevars <= nbinvars);
921 printCycle(
vars, pred, nbinvars, startnode);
929 if( startnode < nbinvars )
935 negated = startnode - nbinvars;
936 assert(negated < nbinvars);
944 if( ncyclevars < 5 && ! sepadata->includetriangles )
958 SCIP_CALL(
liftOddCycleCut(
scip, &nlifted, lifted, liftcoef,
sepadata, graphdata,
vars, nbinvars, startnode, pred, ncyclevars, vals,
result) );
970 while(
i != startnode )
981 negated =
i - nbinvars;
982 assert(negated < nbinvars);
987 incut[negated] =
TRUE;
994 if( startnode < nbinvars )
998 incut[startnode] =
TRUE;
1002 negated = startnode - nbinvars;
1003 assert(negated < nbinvars);
1008 incut[negated] =
TRUE;
1012 for(
i = 0;
i < nlifted; ++
i)
1016 if( lifted[
i] < nbinvars )
1023 negated = lifted[
i] - nbinvars;
1024 assert(negated < nbinvars);
1027 negatedcount += liftcoef[
i];
1083 unsigned int* incut,
1085 unsigned int startnode,
1086 unsigned int nbinvars,
1087 unsigned int* ncyclevars,
1100 assert(*ncyclevars <= nbinvars);
1107 if( incut[
x] && !allowmultiplecuts )
1115 negx =
x + nbinvars;
1117 negx =
x - nbinvars;
1118 assert(negx < 2*nbinvars);
1123 if( incycle[
x] || (incycle[negx] && !repaircycles) )
1130 if( !incycle[negx] )
1156 if( negx == startnode )
1166 if( pred[negx] ==
x )
1172 while( pred[
a] != negx )
1185 unsigned int* chain;
1186 unsigned int nchain;
1195 while( pred[
a] != negx )
1213 pred[
a] = chain[nchain-1];
1219 for(
i = nchain-1;
i > 0; --
i )
1220 pred[chain[
i]] = chain[
i-1];
1227 assert(!incycle[
x] && incycle[negx]);
1228 incycle[negx] =
FALSE;
1252 unsigned int** weightArray,
1253 unsigned int** sourceAdjArray,
1254 unsigned int** targetAdjArray,
1259 unsigned int additional;
1271 additional =
MIN(graph->maxarcs + graph->maxnodes - *size, *size) * ((int)
sizeof(**weightArray));
1272 if( targetArray !=
NULL )
1274 additional +=
MIN(graph->maxarcs + graph->maxnodes - *size, *size) * ((int)
sizeof(**targetArray));
1278 additional +=
MIN(graph->maxarcs + graph->maxnodes - *size, *size) * ((int)
sizeof(**sourceAdjArray));
1279 additional +=
MIN(graph->maxarcs + graph->maxnodes - *size, *size) * ((int)
sizeof(**targetAdjArray));
1291 if( (avoidmemout && memorylimit <= additional/1048576.0) ||
SCIPisStopped(
scip) )
1298 *size = 2 * (*size);
1301 if( targetArray !=
NULL )
1341 unsigned int weight,
1347 if( graph->level[v] == level+1 )
1349 graph->targetForward[graph->lastF] = (int) v;
1350 graph->weightForward[graph->lastF] = weight;
1353 if( graph->lastF == graph->sizeForward )
1356 &(graph->weightForward),
NULL,
NULL, success) );
1363 assert(graph->level[v] == level || graph->level[v] == level-1);
1366 if( graph->level[v] == level-1 )
1368 graph->targetBackward[graph->lastB] = (int) v;
1369 graph->weightBackward[graph->lastB] = weight;
1373 if( graph->lastB == graph->sizeBackward )
1376 &(graph->weightBackward),
NULL,
NULL, success) );
1383 assert(graph->level[v] == level);
1388 graph->sourceAdj[graph->levelAdj[level+1]+*nAdj] = u;
1389 graph->targetAdj[graph->levelAdj[level+1]+*nAdj] = v;
1390 graph->weightAdj[graph->levelAdj[level+1]+*nAdj] = weight;
1394 if( graph->levelAdj[level+1]+*nAdj == graph->sizeAdj )
1397 &(graph->sourceAdj), &(graph->targetAdj), success) );
1421 unsigned int* newlevel,
1422 unsigned int* nnewlevel,
1428 unsigned int ncliques;
1429 unsigned int nbinvars;
1430 unsigned int varsidx;
1432 unsigned int ncliquevars;
1455 assert(u < graph->maxnodes);
1457 nbinvars = (graph->maxnodes)/2;
1469 varsidx = u - nbinvars;
1471 assert(varsidx < nbinvars);
1482 for( j = 0; j < ncliques; ++j )
1488 assert(cliquevars !=
NULL || ncliquevars == 0);
1489 assert(cliquevals !=
NULL || ncliquevars == 0);
1491 for( k = 0; k < ncliquevars; ++k )
1495 unsigned int weight;
1507 if( cliquevals[k] ==
FALSE )
1512 assert(v < graph->maxnodes);
1519 if( !inlevelgraph[v] && (*nnewlevel) <=
sepadata->maxlevelsize )
1522 graph->level[v] = level+1;
1523 inlevelgraph[v] =
TRUE;
1524 newlevel[*nnewlevel] = v;
1530 if( inlevelgraph[v] && (graph->level[v] == level+1 || graph->level[v] == level || graph->level[v] == level-1))
1540 weight = (
unsigned int)
MAX(tmp,
sepadata->maxreference);
1546 weight = (
unsigned int)
MAX(tmp,
sepadata->maxreference);
1580 unsigned int nbinvars,
1581 unsigned int ncurlevel,
1586 unsigned int* nnewlevel,
1589 unsigned int* newlevel,
1595 unsigned int nneighbors;
1601 unsigned int varsidx;
1604 unsigned int ncliques;
1606 unsigned int ncliquevars;
1618 nbinvars = (graph->maxnodes)/2;
1624 if( root < nbinvars )
1633 varsidx = root - nbinvars;
1635 assert(varsidx < nbinvars);
1646 for( j = 0; j < ncliques; ++j )
1652 assert(cliquevars !=
NULL || ncliquevars == 0);
1653 assert(cliquevals !=
NULL || ncliquevars == 0);
1655 for( k = 0; k < ncliquevars; ++k )
1665 if( kidx == varsidx )
1672 if( cliquevals[k] ==
TRUE )
1674 if ( ! isneighbor[kidx] )
1677 isneighbor[kidx] =
TRUE;
1683 if ( ! isneighbor[kidx + nbinvars] )
1686 isneighbor[kidx+nbinvars] =
TRUE;
1694 assert(! isneighbor[root]);
1701 for( j = 0; j < graph->maxnodes; ++j )
1708 neighbors[k] = (int) j;
1709 sortvals[k] =
MIN(1.0 - vals[j], vals[j]);
1722 for( j = 0; j < nneighbors && (*nnewlevel) <=
sepadata->maxlevelsize; ++j )
1726 v = (
unsigned int) neighbors[j];
1727 assert( v < 2 * nbinvars );
1730 assert(! inlevelgraph[v] || v == root+nbinvars || v == root-nbinvars);
1734 graph->level[v] = level + 1;
1735 inlevelgraph[v] =
TRUE;
1736 newlevel[*nnewlevel] = v;
1742 graph->targetForward[graph->lastF] = (int) v;
1747 graph->weightForward[graph->lastF] = (
unsigned int)
MAX(tmp,
sepadata->maxreference);
1753 graph->weightForward[graph->lastF] = (
unsigned int)
MAX(tmp,
sepadata->maxreference);
1757 if( graph->lastF == graph->sizeForward )
1760 &(graph->weightForward),
NULL,
NULL, success) );
1784 unsigned int startnode,
1785 unsigned int* distance,
1786 unsigned int* queue,
1810 for(
i = 0;
i < graph->maxnodes; ++
i )
1812 distance[
i] = 2 * (graph->nnodes) * (
unsigned) scale;
1816 distance[startnode] = 0;
1821 queue[0] = startnode;
1824 while( startQueue <= endQueue )
1827 u = queue[startQueue];
1831 assert(graph->beginBackward[u] >= 0);
1832 i = (
unsigned int) graph->beginBackward[u];
1833 for( v = graph->targetBackward[
i]; v >= 0; v = graph->targetBackward[++
i] )
1836 d = distance[u] + graph->weightBackward[
i];
1839 if( d < distance[v] )
1842 parentTree[v] = (int) u;
1848 queue[endQueue] = (
unsigned int) v;
1855 assert(parentTree[u] != -1);
1874 unsigned int startnode,
1898 assert(parentTree[root] >= 0);
1901 u = (
unsigned int) parentTree[root];
1902 while( u != startnode )
1905 i = (
unsigned int) graph->beginForward[u];
1906 for( v = graph->targetForward[
i]; v >= 0; v = graph->targetForward[++
i] )
1913 i = (
unsigned int) graph->beginBackward[u];
1914 for( v = graph->targetBackward[
i]; v >= 0; v = graph->targetBackward[++
i] )
1921 assert(graph->level[u] > 0);
1922 for(
i = graph->levelAdj[graph->level[u]];
i < graph->levelAdj[graph->level[u]+1]; ++
i )
1924 assert(graph->sourceAdj[
i] < graph->targetAdj[
i]);
1925 assert(graph->level[graph->sourceAdj[
i]] == graph->level[graph->targetAdj[
i]]);
1928 if( graph->sourceAdj[
i] == u )
1930 blocked[graph->targetAdj[
i]] =
TRUE;
1932 if( graph->targetAdj[
i] == u )
1934 blocked[graph->sourceAdj[
i]] =
TRUE;
1939 u = (
unsigned int) parentTree[u];
1944 assert(graph->beginBackward[u] > 0);
1945 i = (
unsigned int) graph->beginBackward[u];
1946 for( v = graph->targetBackward[
i]; v >= 0; v = graph->targetBackward[++
i] )
1964 unsigned int startnode,
1965 unsigned int* distance,
1966 unsigned int* queue,
1968 int* parentTreeBackward,
2000 for(
i = 0;
i < graph->maxnodes; ++
i )
2002 distance[
i] = 2 * (graph->nnodes) * (
unsigned)scale;
2004 parentTreeBackward[
i] = -1;
2008 distance[startnode] = 0;
2013 queue[0] = startnode;
2016 while( startQueue <= endQueue )
2019 u = queue[startQueue];
2023 assert(graph->beginBackward[u] >= 0);
2024 i = (
unsigned int) graph->beginBackward[u];
2025 for( v = graph->targetBackward[
i]; v >= 0; v = graph->targetBackward[++
i] )
2027 if( blocked[v] && v != (
int) root)
2031 d = distance[u] + graph->weightBackward[
i];
2034 if( d < distance[v] )
2037 parentTree[v] = (int) u;
2043 queue[endQueue] = (
unsigned int) v;
2053 transform[0] = (int) root;
2055 while(parentTree[v] >= 0)
2057 transform[
i] = parentTree[v];
2064 parentTreeBackward[transform[
i]] = transform[
i-1];
2088 unsigned int* curlevel,
2089 unsigned int ncurlevel,
2090 unsigned int* newlevel,
2091 unsigned int* nnewlevel,
2096 unsigned int nbinvars;
2122 assert(graph->maxnodes % 2 == 0);
2123 nbinvars = (graph->maxnodes)/2;
2128 for(
i = 0;
i < ncurlevel; ++
i )
2130 unsigned int negated;
2135 assert(u < graph->maxnodes);
2136 assert(graph->level[u] == level);
2137 assert(graph->beginForward[u] < 0);
2138 assert(graph->beginBackward[u] < 0);
2139 assert(graph->beginAdj[u] < 0);
2144 negated = u + nbinvars;
2146 negated = u - nbinvars;
2147 assert(negated < graph->maxnodes);
2148 assert(negated < nbinvars || u < nbinvars);
2149 assert(negated >= nbinvars || u >= nbinvars);
2152 graph->beginForward[u] = (int) graph->lastF;
2153 graph->beginBackward[u] = (int) graph->lastB;
2154 graph->beginAdj[u] = (int) (graph->levelAdj[level+1] + nAdj);
2164 if( !inlevelgraph[negated] && (*nnewlevel) <=
sepadata->maxlevelsize )
2167 graph->level[negated] = level+1;
2168 inlevelgraph[negated] =
TRUE;
2169 newlevel[*nnewlevel] = negated;
2172 assert( *nnewlevel >
sepadata->maxlevelsize || inlevelgraph[negated] );
2175 if( inlevelgraph[negated] && ((graph->level[negated] == level - 1)
2176 || (graph->level[negated] == level) || (graph->level[negated] == level + 1)) )
2186 if( graph->nlevels == 0 &&
sepadata->sortrootneighbors )
2189 sepadata, nnewlevel, inlevelgraph, level, newlevel, success) );
2194 newlevel, nnewlevel, &nAdj, success) );
2200 assert(graph->lastB > (
unsigned int) graph->beginBackward[u] || graph->nlevels == 0 );
2203 assert(graph->lastF > 0);
2206 graph->targetForward[graph->lastF] = -1;
2208 if( graph->lastF == graph->sizeForward )
2211 &(graph->weightForward),
NULL,
NULL, success) );
2216 graph->targetBackward[graph->lastB] = -1;
2218 if( graph->lastB == graph->sizeBackward )
2221 &(graph->weightBackward),
NULL,
NULL, success) );
2228 graph->sourceAdj[graph->levelAdj[level+1]+nAdj] = 0;
2229 graph->targetAdj[graph->levelAdj[level+1]+nAdj] = 0;
2231 graph->levelAdj[level+2] = graph->levelAdj[level+1]+nAdj;
2269 unsigned int nbinvars;
2270 unsigned int* incut;
2274 unsigned int* curlevel;
2275 unsigned int* newlevel;
2276 unsigned int ncurlevel;
2277 unsigned int nnewlevel;
2281 unsigned int* queue;
2284 int* parentTreeBackward;
2285 unsigned int* distance;
2289 unsigned int maxroots;
2290 unsigned int rootcounter;
2291 unsigned int ncutsroot;
2292 unsigned int ncutslevel;
2309 assert(nscipbinvars >= 0);
2310 assert(nscipintvars >= 0);
2311 assert(nscipimplvars >= 0);
2313 nintegral = nscipbinvars + nscipintvars + nscipimplvars;
2314 assert(scipvars !=
NULL || ((nscipbinvars == 0) && (nscipintvars == 0) && (nscipimplvars == 0) && (nintegral == 0)));
2318 for (l = 0; l < nscipbinvars; ++l)
2319 vars[l] = scipvars[l];
2321 nbinvars = (
unsigned int) nscipbinvars;
2322 for (l = nscipbinvars; l < nintegral; ++l)
2326 vars[nbinvars++] = scipvars[l];
2348 for(
i = 0;
i < nbinvars; ++
i )
2357 for(
i = 0;
i < nbinvars; ++
i )
2366 for(
i = 0;
i < nbinvars; ++
i )
2369 vals[
i] =
MIN(1.0 - vals[
i], vals[
i]);
2378 for(
i = 0;
i < nbinvars; ++
i )
2381 vals[
i] =
MIN(1.0 - vals[
i], vals[
i]);
2399 for(
i = 0;
i < nbinvars; ++
i )
2406 for(
i = nbinvars;
i < 2*nbinvars; ++
i )
2407 vals[
i] = 1.0 - vals[
i - nbinvars];
2410 graph.maxnodes = 2 * nbinvars;
2416 graph.maxarcs = UINT_MAX;
2419 graph.sizeForward = 100 * graph.maxnodes;
2420 graph.sizeBackward = 100 * graph.maxnodes;
2421 graph.sizeAdj = 100 * graph.maxnodes;
2459 for(
i = (
unsigned int)
sepadata->lastroot;
i < graph.maxnodes && rootcounter < maxroots
2465 if( incut[
i] && !
sepadata->multiplecuts )
2498 for( j = 0; j < graph.maxnodes; ++j)
2500 graph.beginForward[j] = -1;
2501 graph.beginBackward[j] = -1;
2502 graph.beginAdj[j] = -1;
2503 inlevelgraph[j] =
FALSE;
2512 inlevelgraph[
i] =
TRUE;
2514 graph.levelAdj[0] = 0;
2520 graph.levelAdj[graph.nlevels+1] = 0;
2531 curlevel, ncurlevel, newlevel, &nnewlevel, &success) );
2537 if( graph.nlevels > 0 && (
sepadata->includetriangles || graph.nlevels > 1) )
2539 unsigned int maxcutslevel;
2544 maxcutslevel = (
unsigned int)
sepadata->maxcutslevel;
2545 maxcutslevel = (
unsigned int)
MIN((
int) maxcutslevel, (
int) ncutsroot -
sepadata->maxcutsroot);
2546 maxcutslevel = (
unsigned int)
MIN((
int) maxcutslevel,
sepadata->maxsepacutsround + (
int)
sepadata->oldncuts - (
int)
sepadata->ncuts);
2549 for( j = graph.levelAdj[graph.nlevels+1]; j < graph.levelAdj[graph.nlevels+2]
2552 unsigned int ncyclevars;
2559 assert(graph.sourceAdj[j] < graph.targetAdj[j]);
2568 while( u != graph.sourceAdj[j] )
2570 assert(parentTree[u] != -1 && k <= graph.maxnodes);
2571 u = (
unsigned int) parentTree[u];
2577 for( k = 0; k < graph.nnodes; ++k )
2582 if( blocked[graph.targetAdj[j]] )
2587 graph.targetAdj[j], distance, queue, inQueue, parentTreeBackward,
i, blocked) );
2590 if( parentTreeBackward[graph.targetAdj[j]] < 0 )
2596 for( k = 0; k < 2 * nbinvars; ++k )
2608 u = graph.targetAdj[j];
2611 while( success && u !=
i )
2614 pred[u] = (
unsigned int) parentTreeBackward[u];
2620 assert(parentTreeBackward[u] >= 0 || u ==
i);
2623 u = (
unsigned int) parentTreeBackward[u];
2627 while( success && u != graph.sourceAdj[j] )
2630 pred[u] = (
unsigned int) parentTree[u];
2637 u = (
unsigned int) parentTree[u];
2639 assert(!success || u == graph.sourceAdj[j]);
2644 pred[u] = graph.targetAdj[j];
2655 unsigned int oldncuts;
2666 if(oldncuts < sepadata->ncuts)
2687 for( j = 0; j < nnewlevel; ++j )
2688 curlevel[j] = newlevel[j];
2689 ncurlevel = nnewlevel;
2693 && graph.nlevels < (
unsigned int)
sepadata->maxnlevels
2694 && ncutsroot < (
unsigned int)
sepadata->maxcutsroot
2703 if(
i == graph.maxnodes )
2751 unsigned int maxarcs,
2752 unsigned int* arraysize,
2758 unsigned int additional;
2760 unsigned int oldarraysize;
2771 additional = (
MIN(maxarcs, 2 * (*arraysize)) - (*arraysize)) * ((
int)
sizeof(*(graph->
head)));
2772 additional += (
MIN(maxarcs, 2 * (*arraysize)) - (*arraysize)) * ((
int)
sizeof(*(graph->
weight)));
2789 oldarraysize = *arraysize;
2790 *arraysize = 2*(*arraysize);
2812 for( j = oldarraysize; j <
MIN(maxarcs,(*arraysize)); ++j )
2829 unsigned int varsidx,
2830 unsigned int dijkindex,
2832 unsigned int nbinvars,
2833 unsigned int ncliques,
2835 unsigned int*
narcs,
2836 unsigned int maxarcs,
2839 unsigned int* arraysize,
2844 unsigned int neighindex;
2846 unsigned int ncliquevars;
2867 for( k = 0; k < ncliques; ++k )
2876 assert(cliquevars !=
NULL || ncliquevars == 0);
2877 assert(cliquevals !=
NULL || ncliquevars == 0);
2880 for( m = 0; m < ncliquevars; ++m )
2885 neighbor = cliquevars[m];
2888 assert(neighindex < nbinvars);
2891 if( neighindex == varsidx )
2907 graph->
head[*
narcs] = neighindex + 2 * nbinvars;
2914 graph->
head[*
narcs] = neighindex + 3 * nbinvars;
2925 graph->
head[*
narcs] = neighindex + 2 * nbinvars;
2932 graph->
head[*
narcs] = neighindex + 3 * nbinvars;
2944 if( *arraysize == *
narcs )
2952 ++(graph->
outcnt[dijkindex]);
2954 *emptygraph =
FALSE;
2995 unsigned int* incut;
3002 unsigned int nbinvars;
3005 unsigned int ncliques;
3008 unsigned int arraysize;
3010 unsigned int maxarcs;
3011 unsigned int maxstarts;
3012 unsigned int startcounter;
3013 unsigned long long cutoff;
3015 unsigned int startnode;
3016 unsigned int endnode;
3017 unsigned long long* dist;
3019 unsigned int* entry;
3020 unsigned int* order;
3021 unsigned int dijkindex;
3025 unsigned int* pred2;
3041 assert(nscipbinvars >= 0);
3042 assert(nscipintvars >= 0);
3043 assert(nscipimplvars >= 0);
3045 nintegral = nscipbinvars + nscipintvars + nscipimplvars;
3046 assert(scipvars !=
NULL || ((nscipbinvars == 0) && (nscipintvars == 0) && (nscipimplvars == 0) && (nintegral == 0)));
3050 for (k = 0; k < nscipbinvars; ++k)
3051 vars[k] = scipvars[k];
3053 nbinvars = (
unsigned int) nscipbinvars;
3054 for (k = nscipbinvars; k < nintegral; ++k)
3058 vars[nbinvars++] = scipvars[k];
3080 for(
i = 0;
i < nbinvars; ++
i )
3089 for(
i = 0;
i < nbinvars; ++
i )
3098 for(
i = 0;
i < nbinvars; ++
i )
3101 vals[
i] =
MIN(1.0 - vals[
i], vals[
i]);
3110 for(
i = 0;
i < nbinvars; ++
i )
3113 vals[
i] =
MIN(1.0 - vals[
i], vals[
i]);
3133 for(
i = 0;
i < nbinvars; ++
i )
3140 for(
i = nbinvars;
i < 2*nbinvars; ++
i )
3141 vals[
i] = 1 - vals[
i - nbinvars];
3144 graph.
nodes = 4 * nbinvars;
3166 arraysize = 100 * graph.
nodes;
3177 for(
i = 0;
i <
MIN(arraysize, maxarcs); ++
i )
3195 for( dijkindex = 0; dijkindex < 2 * nbinvars; ++dijkindex )
3198 graph.
outcnt[dijkindex] = 0;
3201 if( dijkindex < nbinvars )
3208 i = dijkindex - nbinvars;
3224 &
narcs, maxarcs, original, &emptygraph, &arraysize, &success) );
3237 assert(dijkindex < nbinvars);
3238 graph.
head[
narcs] = dijkindex + 3*nbinvars;
3243 assert(dijkindex >= nbinvars && dijkindex < 2*nbinvars);
3244 graph.
head[
narcs] = dijkindex + nbinvars;
3256 if( arraysize ==
narcs )
3263 ++(graph.
outcnt[dijkindex]);
3270 if( arraysize ==
narcs )
3284 for(
i = 0;
i < 2*nbinvars; ++
i )
3287 graph.
outcnt[2 * nbinvars +
i] = 0;
3293 assert(graph.
head[j] >= 2*nbinvars && graph.
head[j] < 4*nbinvars);
3299 if( arraysize ==
narcs )
3307 ++(graph.
outcnt[2*nbinvars+
i]);
3315 if( arraysize ==
narcs )
3333#ifdef SCIP_ODDCYCLE_WRITEGRAPH
3357 for(
i = (
unsigned int)
sepadata->lastroot;
i < 2 * nbinvars
3358 && startcounter < maxstarts
3362 unsigned int ncyclevars;
3378 endnode =
i + 2 * nbinvars;
3383 if( incut[startnode] && !
sepadata->multiplecuts )
3398 if ( dist[endnode] >=
cutoff )
3406 for( j = 0; j < 2 * nbinvars; ++j )
3413 edgedirection =
TRUE;
3417 for( dijkindex = endnode; dijkindex != startnode && success; dijkindex = pred[dijkindex], edgedirection = !edgedirection )
3422 assert(dijkindex >= 2 * nbinvars && dijkindex < 4 * nbinvars);
3423 assert(pred[dijkindex] < 2*nbinvars);
3425 pred2[dijkindex - 2 * nbinvars] = pred[dijkindex];
3432 &ncyclevars,
sepadata->repaircycles,
sepadata->allowmultiplecuts, &success) );
3437 assert(dijkindex < 2 * nbinvars);
3438 assert(pred[dijkindex] >= 2 * nbinvars && pred[dijkindex] < 4 * nbinvars);
3440 pred2[dijkindex] = pred[dijkindex] - 2 * nbinvars;
3460 SCIP_CALL(
generateOddCycleCut(
scip, sepa,
sol,
vars, nbinvars, startnode, pred2, ncyclevars, incut, vals,
sepadata, &graphdata,
result) );
3473 if(
i == 2 * nbinvars )
3544 for( v = 0; v <
nvars; ++v )
3557 SCIPdebugMsg(
scip,
"skipping separator: not enough fractional variables\n");
3564 SCIPdebugMsg(
scip,
"skipping separator: not enough implications present\n");
3604 SCIPdebugMsg(
scip,
"using level graph heuristic for finding odd cycles\n");
3748 sepaExeclpOddcycle, sepaExecsolOddcycle,
3761 "Should the search method by Groetschel, Lovasz, Schrijver be used? Otherwise use levelgraph method by Hoffman, Padberg.",
3765 "Should odd cycle cuts be lifted?",
3769 "maximal number of oddcycle cuts separated per separation round",
3773 "maximal number of oddcycle cuts separated per separation round in the root node",
3778 "maximal number of oddcycle separation rounds per node (-1: unlimited)",
3782 "maximal number of oddcycle separation rounds in the root node (-1: unlimited)",
3786 "factor for scaling of the arc-weights",
3790 "add links between a variable and its negated",
3794 "try to repair violated cycles with double appearance of a variable",
3798 "separate triangles found as 3-cycles or repaired larger cycles",
3802 "Even if a variable is already covered by a cut, still try it as start node for a cycle search?",
3806 "Even if a variable is already covered by a cut, still allow another cut to cover it too?",
3810 "Choose lifting candidate by coef*lpvalue or only by coef?",
3814 "Calculate lifting coefficient of every candidate in every step (or only if its chosen)?",
3818 "use sorted variable array (unsorted(0), maxlp(1), minlp(2), maxfrac(3), minfrac(4))",
3822 "sort level of the root neighbors by fractionality (maxfrac)",
3826 "percentage of variables to try the chosen method on [0-100]",
3830 "offset of variables to try the chosen method on (additional to the percentage of testvars)",
3834 "percentage of nodes allowed in the same level of the level graph [0-100]",
3838 "offset of nodes allowed in the same level of the level graph (additional to the percentage of levelnodes)",
3842 "maximal number of levels in level graph",
3846 "maximal number of oddcycle cuts generated per chosen variable as root of the level graph",
3850 "maximal number of oddcycle cuts generated in every level of the level graph",
3854 "minimal weight on an edge (in level graph or bipartite graph)",
3858 "number of unsuccessful calls at current node",
3862 "maximal number of other cuts s.t. separation is applied (-1 for direct call)",
#define DEFAULT_MAXROUNDSROOT
#define DEFAULT_MAXSEPACUTSROOT
#define DEFAULT_MAXSEPACUTS
#define DEFAULT_MAXROUNDS
#define SCIP_STRINGEQ(name, reference, retcode)
unsigned int dijkstraPairCutoffIgnore(const DIJKSTRA_GRAPH *G, unsigned int source, unsigned int target, unsigned int *ignore, unsigned long long cutoff, unsigned long long *dist, unsigned int *pred, unsigned int *entry, unsigned int *order)
DIJKSTRA_Bool dijkstraGraphIsValid(const DIJKSTRA_GRAPH *G)
unsigned int dijkstraPairCutoff(const DIJKSTRA_GRAPH *G, unsigned int source, unsigned int target, unsigned long long cutoff, unsigned long long *dist, unsigned int *pred, unsigned int *entry, unsigned int *order)
Definitions for Disjkstra's shortest path algorithm.
struct DIJKSTRA_Graph DIJKSTRA_GRAPH
void SCIPsplitFilename(char *filename, char **path, char **name, char **extension, char **compression)
SCIP_Bool SCIPisStopped(SCIP *scip)
const char * SCIPgetProbName(SCIP *scip)
SCIP_RETCODE SCIPgetVarsData(SCIP *scip, SCIP_VAR ***vars, int *nvars, int *nbinvars, int *nintvars, int *nimplvars, int *ncontvars)
int SCIPgetNBinVars(SCIP *scip)
void SCIPverbMessage(SCIP *scip, SCIP_VERBLEVEL msgverblevel, FILE *file, const char *formatstr,...)
SCIP_RETCODE SCIPgetBoolParam(SCIP *scip, const char *name, SCIP_Bool *value)
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 SCIPgetRealParam(SCIP *scip, const char *name, SCIP_Real *value)
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)
int SCIPgetNLPBranchCands(SCIP *scip)
SCIP_RETCODE SCIPaddPoolCut(SCIP *scip, SCIP_ROW *row)
SCIP_Bool SCIPisCutEfficacious(SCIP *scip, SCIP_SOL *sol, SCIP_ROW *cut)
SCIP_RETCODE SCIPaddRow(SCIP *scip, SCIP_ROW *row, SCIP_Bool forcecut, SCIP_Bool *infeasible)
SCIP_Longint SCIPgetMemExternEstim(SCIP *scip)
SCIP_Longint SCIPgetMemUsed(SCIP *scip)
#define SCIPallocBufferArray(scip, ptr, num)
#define SCIPreallocBufferArray(scip, ptr, num)
#define SCIPfreeBufferArray(scip, ptr)
#define SCIPfreeBlockMemory(scip, ptr)
#define SCIPallocBlockMemory(scip, ptr)
SCIP_Longint SCIPnodeGetNumber(SCIP_NODE *node)
SCIP_RETCODE SCIPcacheRowExtensions(SCIP *scip, SCIP_ROW *row)
SCIP_Real SCIProwGetRhs(SCIP_ROW *row)
SCIP_RETCODE SCIPflushRowExtensions(SCIP *scip, SCIP_ROW *row)
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_RETCODE SCIPcreateEmptyRowSepa(SCIP *scip, SCIP_ROW **row, SCIP_SEPA *sepa, const char *name, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool removable)
void SCIProwChgRank(SCIP_ROW *row, int rank)
SCIP_RETCODE SCIPchgRowRhs(SCIP *scip, SCIP_ROW *row, SCIP_Real rhs)
SCIP_RETCODE SCIPincludeSepaBasic(SCIP *scip, SCIP_SEPA **sepa, const char *name, const char *desc, int priority, int freq, SCIP_Real maxbounddist, SCIP_Bool usessubscip, SCIP_Bool delay, SCIP_DECL_SEPAEXECLP((*sepaexeclp)), SCIP_DECL_SEPAEXECSOL((*sepaexecsol)), SCIP_SEPADATA *sepadata)
SCIP_RETCODE SCIPsetSepaFree(SCIP *scip, SCIP_SEPA *sepa,)
const char * SCIPsepaGetName(SCIP_SEPA *sepa)
int SCIPsepaGetNCallsAtNode(SCIP_SEPA *sepa)
SCIP_Real SCIPsepaGetTime(SCIP_SEPA *sepa)
SCIP_RETCODE SCIPsetSepaInit(SCIP *scip, SCIP_SEPA *sepa,)
SCIP_RETCODE SCIPsetSepaInitsol(SCIP *scip, SCIP_SEPA *sepa,)
SCIP_SEPADATA * SCIPsepaGetData(SCIP_SEPA *sepa)
void SCIPsepaSetData(SCIP_SEPA *sepa, SCIP_SEPADATA *sepadata)
SCIP_RETCODE SCIPsetSepaCopy(SCIP *scip, SCIP_SEPA *sepa,)
SCIP_Real SCIPgetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var)
int SCIPgetNImplications(SCIP *scip)
int SCIPgetNCutsFoundRound(SCIP *scip)
SCIP_Longint SCIPgetNLPs(SCIP *scip)
SCIP_Real SCIPinfinity(SCIP *scip)
SCIP_Real SCIPfeasCeil(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPfloor(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisFeasIntegral(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPceil(SCIP *scip, SCIP_Real val)
SCIP_NODE * SCIPgetCurrentNode(SCIP *scip)
SCIP_Bool SCIPvarIsBinary(SCIP_VAR *var)
SCIP_RETCODE SCIPchgVarLb(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound)
SCIP_RETCODE SCIPwriteCliqueGraph(SCIP *scip, const char *fname, SCIP_Bool writenodeweights)
SCIP_RETCODE SCIPchgVarUb(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound)
int SCIPvarGetProbindex(SCIP_VAR *var)
const char * SCIPvarGetName(SCIP_VAR *var)
SCIP_Bool SCIPvarIsIntegral(SCIP_VAR *var)
int SCIPvarGetNCliques(SCIP_VAR *var, SCIP_Bool varfixing)
int SCIPgetNCliques(SCIP *scip)
SCIP_CLIQUE ** SCIPvarGetCliques(SCIP_VAR *var, SCIP_Bool varfixing)
SCIP_RETCODE SCIPincludeSepaOddcycle(SCIP *scip)
void SCIPsortRealPtr(SCIP_Real *realarray, void **ptrarray, int len)
void SCIPsortDownRealPtr(SCIP_Real *realarray, void **ptrarray, int len)
void SCIPsortDownRealInt(SCIP_Real *realarray, int *intarray, int len)
int SCIPsnprintf(char *t, int len, const char *s,...)
assert(minobj< SCIPgetCutoffbound(scip))
SCIP_VAR ** SCIPcliqueGetVars(SCIP_CLIQUE *clique)
int SCIPcliqueGetNVars(SCIP_CLIQUE *clique)
SCIP_Bool * SCIPcliqueGetValues(SCIP_CLIQUE *clique)
memory allocation routines
#define BMSclearMemoryArray(ptr, num)
public methods for implications, variable bounds, and cliques
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 separators
public methods for branch and bound tree
public methods for problem variables
public methods for branching rule plugins and branching
public methods for cuts and aggregation rows
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 separator plugins
public methods for solutions
public methods for querying solving statistics
public methods for the branch-and-bound tree
public methods for SCIP variables
#define SEPA_MAXBOUNDDIST
static SCIP_RETCODE blockRootPath(SCIP *scip, LEVELGRAPH *graph, unsigned int startnode, SCIP_Bool *inlevelgraph, SCIP_Bool *blocked, int *parentTree, unsigned int root)
#define DEFAULT_SORTROOTNEIGHBORS
static SCIP_Bool isNeighbor(SCIP_VAR **vars, unsigned int nbinvars, GRAPHDATA *graphdata, unsigned int a, unsigned int b)
static SCIP_RETCODE separateOddCycles(SCIP *scip, SCIP_SEPA *sepa, SCIP_SOL *sol, int depth, SCIP_RESULT *result)
static SCIP_RETCODE addNextLevelCliques(SCIP *scip, SCIP_SEPADATA *sepadata, SCIP_VAR **vars, SCIP_Real *vals, unsigned int u, LEVELGRAPH *graph, unsigned int level, SCIP_Bool *inlevelgraph, unsigned int *newlevel, unsigned int *nnewlevel, unsigned int *nAdj, SCIP_Bool *success)
static SCIP_RETCODE findUnblockedShortestPathToRoot(SCIP *scip, int scale, LEVELGRAPH *graph, unsigned int startnode, unsigned int *distance, unsigned int *queue, SCIP_Bool *inQueue, int *parentTreeBackward, unsigned int root, SCIP_Bool *blocked)
static void checkBlocking(unsigned int a, unsigned int b, unsigned int c, unsigned int i, unsigned int *cycle, unsigned int ncyclevars, SCIP_VAR **vars, unsigned int nbinvars, unsigned int *lifted, unsigned int *nlifted, GRAPHDATA *graphdata, SCIP_Bool *myi)
#define DEFAULT_REPAIRCYCLES
static SCIP_RETCODE addArc(SCIP *scip, LEVELGRAPH *graph, unsigned int u, unsigned int v, unsigned int level, unsigned int weight, unsigned int *nAdj, SCIP_Bool *success)
#define DEFAULT_MAXCUTSROOT
static unsigned int getCoef(SCIP *scip, unsigned int i, unsigned int *cycle, unsigned int ncyclevars, SCIP_VAR **vars, unsigned int nbinvars, unsigned int *lifted, unsigned int *nlifted, GRAPHDATA *graphdata, SCIP_Bool *myi)
static SCIP_RETCODE checkArraySizesHeur(SCIP *scip, LEVELGRAPH *graph, unsigned int *size, int **targetArray, unsigned int **weightArray, unsigned int **sourceAdjArray, unsigned int **targetAdjArray, SCIP_Bool *success)
static SCIP_RETCODE separateHeur(SCIP *scip, SCIP_SEPA *sepa, SCIP_SEPADATA *sepadata, SCIP_SOL *sol, SCIP_RESULT *result)
static SCIP_RETCODE liftOddCycleCut(SCIP *scip, unsigned int *nlifted, unsigned int *lifted, unsigned int *liftcoef, SCIP_SEPADATA *sepadata, GRAPHDATA *graphdata, SCIP_VAR **vars, unsigned int nbinvars, unsigned int startnode, unsigned int *pred, unsigned int ncyclevars, SCIP_Real *vals, SCIP_RESULT *result)
static SCIP_RETCODE findShortestPathToRoot(SCIP *scip, int scale, LEVELGRAPH *graph, unsigned int startnode, unsigned int *distance, unsigned int *queue, SCIP_Bool *inQueue, int *parentTree)
static SCIP_RETCODE createNextLevel(SCIP *scip, SCIP_SEPADATA *sepadata, SCIP_VAR **vars, SCIP_Real *vals, LEVELGRAPH *graph, unsigned int level, SCIP_Bool *inlevelgraph, unsigned int *curlevel, unsigned int ncurlevel, unsigned int *newlevel, unsigned int *nnewlevel, SCIP_Bool *success)
#define DEFAULT_SCALEFACTOR
#define DEFAULT_MAXNLEVELS
static SCIP_RETCODE addGLSCliques(SCIP *scip, SCIP_SEPADATA *sepadata, SCIP_VAR **vars, unsigned int varsidx, unsigned int dijkindex, SCIP_Real *vals, unsigned int nbinvars, unsigned int ncliques, DIJKSTRA_GRAPH *graph, unsigned int *narcs, unsigned int maxarcs, SCIP_Bool original, SCIP_Bool *emptygraph, unsigned int *arraysize, SCIP_Bool *success)
static SCIP_RETCODE insertSortedRootNeighbors(SCIP *scip, LEVELGRAPH *graph, unsigned int nbinvars, unsigned int ncurlevel, unsigned int u, SCIP_Real *vals, SCIP_VAR **vars, SCIP_SEPADATA *sepadata, unsigned int *nnewlevel, SCIP_Bool *inlevelgraph, unsigned int level, unsigned int *newlevel, SCIP_Bool *success)
#define DEFAULT_ALLOWMULTIPLECUTS
#define DEFAULT_RECALCLIFTCOEF
#define DEFAULT_MAXCUTSLEVEL
#define DEFAULT_LPLIFTCOEF
#define DEFAULT_MAXPERNODESLEVEL
static SCIP_RETCODE generateOddCycleCut(SCIP *scip, SCIP_SEPA *sepa, SCIP_SOL *sol, SCIP_VAR **vars, unsigned int nbinvars, unsigned int startnode, unsigned int *pred, unsigned int ncyclevars, unsigned int *incut, SCIP_Real *vals, SCIP_SEPADATA *sepadata, GRAPHDATA *graphdata, SCIP_RESULT *result)
#define DEFAULT_INCLUDETRIANGLES
#define DEFAULT_MULTIPLECUTS
#define DEFAULT_SORTSWITCH
#define DEFAULT_MAXUNSUCESSFULL
#define DEFAULT_OFFSETTESTVARS
static SCIP_RETCODE separateGLS(SCIP *scip, SCIP_SEPA *sepa, SCIP_SEPADATA *sepadata, SCIP_SOL *sol, SCIP_RESULT *result)
struct levelGraph LEVELGRAPH
static SCIP_RETCODE checkArraySizesGLS(SCIP *scip, unsigned int maxarcs, unsigned int *arraysize, DIJKSTRA_GRAPH *graph, SCIP_Bool *success)
#define DEFAULT_PERCENTTESTVARS
struct GraphData GRAPHDATA
#define DEFAULT_ADDSELFARCS
#define DEFAULT_OFFSETNODESLEVEL
static SCIP_RETCODE cleanCycle(SCIP *scip, unsigned int *pred, SCIP_Bool *incycle, unsigned int *incut, unsigned int x, unsigned int startnode, unsigned int nbinvars, unsigned int *ncyclevars, SCIP_Bool repaircycles, SCIP_Bool allowmultiplecuts, SCIP_Bool *success)
#define DEFAULT_MAXREFERENCE
#define DEFAULT_CUTTHRESHOLD
#define DEFAULT_LIFTODDCYCLES
DIJKSTRA_GRAPH * dijkstragraph
struct SCIP_Clique SCIP_CLIQUE
enum SCIP_Result SCIP_RESULT
enum SCIP_Retcode SCIP_RETCODE
struct SCIP_SepaData SCIP_SEPADATA
#define SCIP_DECL_SEPAINITSOL(x)
#define SCIP_DECL_SEPAEXECSOL(x)
#define SCIP_DECL_SEPAEXECLP(x)
#define SCIP_DECL_SEPAFREE(x)
struct SCIP_Sepa SCIP_SEPA
#define SCIP_DECL_SEPACOPY(x)
#define SCIP_DECL_SEPAINIT(x)