42 #define STP_BD_MAXDEGREE 4 43 #define STP_BD_MAXDNEDGES 6 44 #define STP_SDWALK_MAXNPREVS 8 58 int*RESTRICT* star_base,
64 int* RESTRICT star_base_d;
70 (*dijkdata)->edgelimit = edgelimit;
74 SCIP_Real* dist = (*dijkdata)->node_distance;
75 STP_Bool* visited = (*dijkdata)->node_visited;
78 for(
int i = 0; i <
nnodes; i++ )
89 edge_deletable_d = *edge_deletable;
90 for(
int e = 0; e < nedges / 2; e++ )
91 edge_deletable_d[e] =
FALSE;
93 star_base_d = *star_base;
94 for(
int i = 0; i <
nnodes; i++ )
107 int*RESTRICT* star_base,
114 SCIP_Bool* RESTRICT edge_deletable_d = *edge_deletable;
116 for(
int e = 0; e < nedges / 2; e++ )
118 if( edge_deletable_d[e] )
138 const int* visitlist,
139 int* RESTRICT star_base,
142 DHEAP* RESTRICT dheap
145 int*
const state = dheap->position;
147 for(
int k = 0; k < nvisits; k++ )
149 const int node = visitlist[k];
150 visited[node] =
FALSE;
159 for(
int k = 0; k <
nnodes; k++ )
162 assert(visited[k] ==
FALSE);
179 int* RESTRICT star_base,
187 RANGE *RESTRICT range_csr;
188 int *RESTRICT head_csr;
189 int *RESTRICT edgeid_csr;
192 range_csr = dcsr->
range;
193 head_csr = dcsr->
head;
194 edgeid_csr = dcsr->
edgeid;
196 assert(g->
mark[node]);
201 const int start = range_csr[node].start;
204 if( range_csr[node].end - start <= 1 )
217 for(
int e = start; e < range_csr[node].end; e = enext )
219 const int starnode = head_csr[e];
220 const int starbase = star_base[starnode];
221 assert(star_base[starnode] >= 0);
223 assert(star_base[starnode] == starnode || star_base[starnode] >= 0);
228 if( starnode != starbase )
236 edge_deletable[edgeid_csr[e] / 2] =
TRUE;
256 const int* visitlist,
262 for(
int k = 0; k < nvisits; k++ )
264 const int node = visitlist[k];
265 visited[node] =
FALSE;
271 for(
int k = 0; k <
nnodes; k++ )
273 assert(visited[k] ==
FALSE);
284 const int* visitlist,
286 int* RESTRICT nprevterms,
291 for(
int k = 0; k < nvisits; k++ )
293 const int node = visitlist[k];
294 visited[node] =
FALSE;
297 nprevterms[node] = 0;
301 for(
int k = 0; k <
nnodes; k++ )
303 assert(visited[k] ==
FALSE);
306 assert(nprevterms[k] == 0);
315 const int* visitlist,
324 for(
int k = 0; k < nvisits; k++ )
326 const int node = visitlist[k];
327 visited[node] =
FALSE;
330 nprevterms[node] = 0;
331 nprevNPterms[node] = 0;
332 nprevedges[node] = 0;
336 for(
int k = 0; k <
nnodes; k++ )
338 assert(visited[k] ==
FALSE);
341 assert(nprevterms[k] == 0);
342 assert(nprevNPterms[k] == 0);
343 assert(nprevedges[k] == 0);
368 assert(path !=
NULL);
369 assert(scip !=
NULL);
370 assert(vbase !=
NULL);
371 assert(forbidden !=
NULL);
385 if( forbidden[edge] )
401 assert(g->
head[e] == tail);
403 if( g->
tail[e] == head )
413 assert(g->
head[e] == head);
415 if( g->
tail[e] == tail )
479 assert(scip !=
NULL);
480 assert(vnoi !=
NULL);
481 assert(vbase !=
NULL);
482 assert(termdist !=
NULL);
483 assert(neighbterms !=
NULL);
485 for( k = 0; k < 4; k++ )
487 if(
SCIPisLT(scip, vnoi[pos].dist, ecost) )
489 neighbterms[nnterms] = vbase[pos];
490 termdist[nnterms++] = vnoi[pos].
dist;
506 const GRAPH* netgraph,
517 for(
int k = 0; k < 4; k++ )
526 int j = nodesorg[netgraph->
head[ne]];
533 for(
int k = 0; k < 4; k++ )
537 for(
int l = 3; l > k; l-- )
539 neighbterms[l] = neighbterms[l - 1];
540 termdist[l] = termdist[l - 1];
543 termdist[k] = necost;
569 assert(scip !=
NULL);
570 assert(vnoi !=
NULL);
571 assert(vbase !=
NULL);
572 assert(termdist !=
NULL);
573 assert(neighbterms !=
NULL);
575 for( k = 0; k < 4; k++ )
577 if(
SCIPisLE(scip, vnoi[pos].dist, ecost) )
579 neighbterms[nnterms] = vbase[pos];
580 termdist[nnterms++] = vnoi[pos].
dist;
613 range_csr = dcsr->
range;
614 head_csr = dcsr->
head;
615 cost_csr = dcsr->
cost;
623 for(
int k = 0; k <
nnodes; k++ )
626 mincost_in[k] = g->
prize[k];
631 for(
int k = 0; k <
nnodes; k++ )
635 const int end = range_csr[k].
end;
637 for(
int e = range_csr[k].start; e < end; e++ )
639 const int head = head_csr[e];
643 assert(g->
mark[head]);
645 assert(
LT(costbiased[e],
FARAWAY) && costbiased[e] > 0.0);
647 if( costbiased[e] < mincost_in[head] )
648 mincost_in[head] = costbiased[e];
658 for(
int k = 0; k <
nnodes; k++ )
662 const int end = range_csr[k].
end;
664 for(
int e = range_csr[k].start; e < end; e++ )
666 assert(g->
mark[head_csr[e]]);
667 costbiased[e] -= mincost_in[k];
677 for(
int k = 0; k <
nnodes; k++ )
681 const int end = range_csr[k].
end;
683 for(
int e = range_csr[k].start; e < end; e++ )
685 const int head = head_csr[e];
689 assert(g->
mark[head]);
690 costbiased[e] -= mincost_in[head];
724 assert(scip !=
NULL);
727 if( sd_initial >= 0.0 )
733 for(
int e = g->
outbeg[i], l = 0; (l <= limit) && (e !=
EAT_LAST); e = g->
oeat[e], l++ )
735 if( g->
head[e] == i2 )
737 if( g->
cost[e] < sd )
752 nnterms1 =
getcloseterms(scip, vnoi, termdist1, sd, vbase, neighbterms1, i, nnodes);
763 neighbterms2[0] = i2;
768 nnterms2 =
getcloseterms(scip, vnoi, termdist2, sd, vbase, neighbterms2, i2, nnodes);
774 for(
int j = 0; j < nnterms1; j++ )
776 const int tj = neighbterms1[j];
779 for(
int k = 0; k < nnterms2; k++ )
782 const int tk = neighbterms2[k];
788 maxdist =
MAX(termdist1[j], termdist2[k]);
794 if(
GE(maxdist, sd) )
800 if(
GT(dist, maxdist) )
804 if(
LT(maxdist, sd) )
833 const SCIP_Bool terminateEarly =
GT(sd_sufficient, 0.0);
842 if( onlyIntermedTerms )
855 for(
int j = 0; j < nnterms1; j++ )
857 const int tj = neighbterms1[j];
860 for(
int k = 0; k < nnterms2; k++ )
863 const int tk = neighbterms2[k];
874 if( onlyIntermedTerms )
876 if( tj == i2 || tk == i )
879 assert(
EQ(termdist1[j], 0.0) ||
EQ(termdist2[k], 0.0));
898 if( terminateEarly &&
LT(sd, sd_sufficient) )
930 const SCIP_Bool terminateEarly =
GT(sd_sufficient, 0.0);
937 assert(sdgraph && sdneighbors);
948 assert(nnterms1 <= 4 && nnterms2 <= 4);
950 for(
int j = 0; j < nnterms1; j++ )
952 const int tj = neighbterms1[j];
955 for(
int k = 0; k < nnterms2; k++ )
958 const int tk = neighbterms2[k];
976 if( terminateEarly &&
LT(sd, sd_sufficient) )
998 assert(scip && g && sdsK3 && edgesK3);
999 assert(costK3 >= 0.0);
1003 if(
SCIPisLE(scip, sdsK3[0] + sdsK3[1], costK3) )
1006 if(
SCIPisLE(scip, sdsK3[0] + sdsK3[2], costK3) )
1009 if(
SCIPisLE(scip, sdsK3[1] + sdsK3[2], costK3) )
1014 if(
SCIPisLT(scip, sdsK3[0] + sdsK3[1], costK3) )
1017 if(
SCIPisLT(scip, sdsK3[0] + sdsK3[2], costK3) )
1020 if(
SCIPisLT(scip, sdsK3[1] + sdsK3[2], costK3) )
1043 const SCIP_Real costsum = ecost[0] + ecost[1] + ecost[2] + ecost[3];
1053 assert(degree == 4);
1064 mstcost += mst[l].dist;
1066 if(
SCIPisGT(scip, mstcost, costsum) )
1077 for(
int k = 0; k < 4; k++ )
1079 const int auxvertex1 = (k + 1) % 4;
1080 const int auxvertex2 = (k + 2) % 4;
1081 const int auxvertex3 = (k + 3) % 4;
1082 const int edgesK3[] = { edges[auxvertex1], edges[auxvertex2], edges[auxvertex3] };
1087 assert(auxvertex1 != k && auxvertex2 != k && auxvertex3 != k);
1091 if( auxg->
head[e] != k )
1093 assert(sdcount < 2);
1094 sdK3[sdcount++] = auxg->
cost[e];
1098 assert(sdcount == 2);
1102 if( auxg->
head[e] == auxvertex3 )
1104 sdK3[sdcount++] = auxg->
cost[e];
1109 assert(sdcount == 3);
1111 assert(success_debug);
1126 const GRAPH* cliquegraph,
1127 const int* cliqueNodeMap,
1135 const int*
const nodemark = cliquegraph->
mark;
1136 int nnodes_clique = 0;
1142 for(
int i = 0; i < nnodes_cliquegraph; ++i )
1145 cliquenodes[nnodes_clique++] = cliqueNodeMap[i];
1149 for(
int i = nnodes_clique; i < nnodes_cliquegraph; ++i )
1150 cliquenodes[i] = -1;
1156 sdclique->
sds = sds_buffer;
1188 const int*
const nodemark = cliquegraph->
mark;
1193 sds_buffer = sdclique->
sds;
1195 for(
int k1 = 0; k1 < nnodes_cliquegraph; k1++ )
1202 const int k2 = cliquegraph->
head[e];
1211 const int v1 = cliqueNodeMap[k1];
1212 const int v2 = cliqueNodeMap[k2];
1213 assert(0 <= v1 && v1 < g->knots);
1215 assert(0 <= v2 && v2 < g->knots);
1219 assert(
GT(sds_buffer[nsds], 0.0));
1220 assert(
LE(sds_buffer[nsds], cliquegraph->
cost[e]));
1223 if( sds_buffer[nsds] < cliquegraph->
cost[e] )
1225 cliquegraph->
cost[e] = sds_buffer[nsds];
1230 assert(nsds <= cliquegraph->edges / 2);
1244 SD* RESTRICT sddata,
1245 GRAPH* RESTRICT cliquegraph,
1251 const int*
const nodemark = cliquegraph->mark;
1252 const int* cliqueNodeMap = sdclique->cliqueToNodeMap;
1253 SCIP_Real* RESTRICT sds_buffer = sdclique->sds;
1256 assert(cliqueNodeMap && sddata);
1257 assert(2 <= nnodes_clique);
1259 for(
int k1 = 0; k1 < nnodes_clique; k1++ )
1266 v1 = cliqueNodeMap[k1];
1267 assert(0 <= v1 && v1 < g->knots);
1269 for(
int e = cliquegraph->outbeg[k1]; e !=
EAT_LAST; e = cliquegraph->oeat[e] )
1271 const int k2 = cliquegraph->head[e];
1278 const int v2 = cliqueNodeMap[k2];
1279 assert(0 <= v2 && v2 < g->knots);
1282 sds_buffer[nsds] =
sdGetSd(g, v1, v2, maxtreecost, 0.0,
FALSE, sddata);
1283 cliquegraph->cost[e] = sds_buffer[nsds];
1284 cliquegraph->cost[
flipedge(e)] = sds_buffer[nsds];
1287 assert(nsds <= cliquegraph->edges / 2);
1293 for(
int k = nsds; k < cliquegraph->edges / 2; k++ )
1303 const GRAPH* netgraph,
1318 assert(*nelims == 0);
1322 for(
int e = 0; e < nedges / 2; e++ )
1328 assert(mst[0].edge == -1);
1330 for(
int k = 1; k < netnnodes; k++ )
1334 const int e = mst[k].
edge;
1338 cost = netgraph->
cost[e];
1340 if(
SCIPisGT(scip, cost, maxcost) )
1344 blocked[ne / 2] =
TRUE;
1345 for(
int v1 = g->
head[ne]; v1 != vbase[v1]; v1 = g->
tail[vnoi[v1].
edge] )
1348 for(
int v1 = g->
tail[ne]; v1 != vbase[v1]; v1 = g->
tail[vnoi[v1].edge] )
1349 blocked[vnoi[v1].edge / 2] =
TRUE;
1352 for(
int k = 0; k <
nnodes; k++ )
1359 if(
SCIPisGE(scip, g->
cost[e], maxcost) && !blocked[e / 2] )
1361 const int nextedge = g->
oeat[e];
1398 const int* cliqueNodeMap,
1406 assert(scip && g && cliqueNodeMap && dijkdata && sddata && cliquegraph);
1407 assert(cliquegraph->
edges == (cliquegraph->
knots) * (cliquegraph->
knots - 1));
1423 const int* edgestate,
1439 assert(scip && nelims);
1440 assert(*nelims >= 0);
1445 withBlockedNodes =
TRUE;
1446 assert(nodes_isBlocked);
1452 allowEquality =
TRUE;
1453 assert(edges_isBlocked);
1457 edges_isBlocked =
FALSE;
1458 allowEquality =
FALSE;
1461 for(
int k = 0; k <
nnodes; k++ )
1465 if( withBlockedNodes && nodes_isBlocked[k] )
1472 (checkstate && edgestate[e] ==
EDGE_BLOCKED) || (withBlockedNodes && nodes_isBlocked[g->
head[e]]);
1474 if( edgeIsForbidden )
1481 deleteEdge =
SCIPisGE(scip, g->
cost[e], maxcost) && !edges_isBlocked[e / 2];
1487 const int enext = g->
oeat[e];
1505 if( nelims_new > 0 )
1510 *nelims += nelims_new;
1529 PATH* RESTRICT vnoi = redbase->
vnoi;
1530 int* RESTRICT state = redbase->
state;
1531 int* RESTRICT vbase = redbase->
vbase;
1534 int* RESTRICT forbidden = redbase->
edgearrint;
1537 int neighbterms1[4];
1538 int neighbterms2[4];
1539 int* RESTRICT edgepreds;
1550 assert(scip !=
NULL);
1551 assert(vnoi !=
NULL);
1552 assert(state !=
NULL);
1553 assert(vbase !=
NULL);
1554 assert(nelims !=
NULL);
1555 assert(nodesid !=
NULL);
1556 assert(nodesorg !=
NULL);
1557 assert(forbidden !=
NULL);
1560 maxnedges = MIN(nedges, (nterms - 1) * nterms);
1577 for(
int k = 0; k <
nnodes; k++ )
1581 assert(g->
grad[k] > 0);
1594 for(
int k = 0; k < nedges; k++ )
1596 forbidden[k] =
FALSE;
1600 assert(netgraph->
knots == j);
1601 assert(netgraph->
knots == nterms);
1603 for(
int k = 0; k <
nnodes; k++ )
1607 if( g->
grad[k] == 0 )
1615 if( i != vbase[g->
head[e]] )
1618 const int i2 = vbase[g->
head[e]];
1619 const int id2 = nodesid[i2];
1627 if( netgraph->
head[ne] == id2 )
1631 ecost = g->
cost[e] + vnoi[g->
head[e]].dist + vnoi[g->
tail[e]].dist;
1637 assert(netgraph->
tail[ne] == id1);
1638 assert(netgraph->
head[ne] == id2);
1641 if(
GT(netgraph->
cost[ne], ecost) )
1643 netgraph->
cost[ne] = ecost;
1649 assert(ne <= maxnedges);
1654 edgepreds[netgraph->
edges] = e;
1659 assert(netgraph->
edges <= maxnedges);
1680 for(
int k = 1; k < netgraph->
knots; k++ )
1683 assert(mst[k].edge != -1);
1684 assert(edgepreds[mst[k].edge] != -1);
1685 assert(edgepreds[
flipedge(mst[k].edge)] != -1);
1687 e = edgepreds[mst[k].
edge];
1689 assert(vbase[g->
tail[e]] == nodesorg[k] || vbase[g->
head[e]] == nodesorg[k]);
1693 forbidden[e] =
TRUE;
1699 for(
int i = 0; i <
nnodes; i++ )
1702 if( g->
grad[i] == 0 )
1709 neighbterms1[0] = i;
1715 const int e = enext;
1716 const int i2 = g->
head[e];
1719 if( i2 < i || !g->mark[i2] )
1727 nnterms1 =
getlecloseterms(scip, vnoi, termdist1, ecost, vbase, neighbterms1, i, nnodes);
1737 neighbterms2[0] = i2;
1742 nnterms2 =
getlecloseterms(scip, vnoi, termdist2, ecost, vbase, neighbterms2, i2, nnodes);
1748 for( j = 0; j < nnterms1; j++ )
1756 tj = neighbterms1[j];
1760 for(
int k = 0; k < nnterms2; k++ )
1762 const int tk = neighbterms2[k];
1770 if(
GE(termdist1[j], termdist2[k] ) )
1771 dist = termdist1[j];
1773 dist = termdist2[k];
1775 assert(
SCIPisGE(scip, ecost, dist));
1779 if( !usestrongreds )
1782 if( !
sddeltable(scip, g, vnoi, vbase, forbidden, j, k, i, i2, e, nnodes ) )
1794 if(
LT(dist, termdist1[j]) )
1795 dist = termdist1[j];
1797 if(
LT(dist, termdist2[k]) )
1798 dist = termdist2[k];
1804 if( !usestrongreds )
1807 if( !(
sddeltable(scip, g, vnoi, vbase, forbidden, j, k, i, i2, e, nnodes)) )
1811 assert(
SCIPisGE(scip, ecost, termdist1[j]));
1812 assert(
SCIPisGE(scip, ecost, termdist2[k]));
1857 assert(scip && nelims);
1858 assert(*nelims >= 0);
1868 for(
int i = 0; i <
nnodes; i++ )
1880 const int e = enext;
1881 const int i2 = g->
head[e];
1886 if( i2 < i || !g->mark[i2] )
1889 sd =
sdGetSd(g, i, i2, maxmstcost, ecost,
FALSE, sdistance);
1891 deleteEdge =
SCIPisLT(scip, sd, ecost);
1893 if( !deleteEdge &&
SCIPisEQ(scip, sd, ecost) )
1898 if(
EQ(profit1, 0.0) &&
EQ(profit2, 0.0) )
1940 assert(scip && nelims);
1941 assert(sdneighbors);
1942 assert(*nelims >= 0);
1943 assert(nodes_isBlocked);
1969 for(
int i = 0; i <
nnodes; i++ )
1973 if( !g->
mark[i] || nodes_isBlocked[i] )
1981 const int e = enext;
1982 const int i2 = g->
head[e];
1986 if( i2 < i || !g->mark[i2] || nodes_isBlocked[i2] )
1989 sd =
sdGetSd(g, i, i2, maxmstcost, ecost,
FALSE, sdistance);
1991 deleteEdge =
SCIPisLT(scip, sd, ecost);
1996 deleteEdge =
SCIPisLT(scip, sd, ecost);
2038 int neighbterms1[4];
2039 int neighbterms2[4];
2043 const int root = g->
source;
2046 const int nedges = g->
edges;
2049 assert(heap !=
NULL);
2050 assert(vnoi !=
NULL);
2051 assert(state !=
NULL);
2052 assert(vbase !=
NULL);
2053 assert(scip !=
NULL);
2054 assert(nelims !=
NULL);
2055 assert(nodesid !=
NULL);
2056 assert(nodesorg !=
NULL);
2070 if( longedges <= longtermsq )
2073 maxnedges = ((nterms - 1) * nterms);
2086 for(
int k = 0; k < 4; k++ )
2093 for(
int k = 0; k <
nnodes; k++ )
2107 assert(netgraph->
knots == j);
2108 assert(netgraph->
knots == nterms);
2111 for(
int k = 0; k <
nnodes; k++ )
2123 if( i != vbase[g->
head[e]] )
2127 const int i2 = vbase[g->
head[e]];
2132 assert(nodesid[i] >= 0);
2133 assert(nodesid[i2] >= 0);
2136 if( netgraph->
head[ne] == nodesid[i2] )
2145 assert(netgraph->
head[ne] == nodesid[i2]);
2146 assert(netgraph->
tail[ne] == nodesid[i]);
2150 netgraph->
cost[ne] = ecost;
2152 assert(ne <= maxnedges);
2157 graph_edge_add(scip, netgraph, nodesid[i], nodesid[i2], ecost, ecost);
2158 assert(netgraph->
edges <= maxnedges);
2168 for(
int i = 0; i <
nnodes; i++ )
2181 const int i2 = g->
head[e];
2191 nnterms1 =
getcloseterms2term(scip, g, netgraph, termdist1, ecost, neighbterms1, nodesid, nodesorg, i);
2193 nnterms1 =
getcloseterms(scip, vnoi, termdist1, ecost, vbase, neighbterms1, i, nnodes);
2198 nnterms1 =
getcloseterms(scip, vnoi, termdist1, ecost, vbase, neighbterms1, i, nnodes);
2207 nnterms2 =
getcloseterms2term(scip, g, netgraph, termdist2, ecost, neighbterms2, nodesid, nodesorg, i2);
2209 nnterms2 =
getcloseterms(scip, vnoi, termdist2, ecost, vbase, neighbterms2, i2, nnodes);
2214 nnterms2 =
getcloseterms(scip, vnoi, termdist2, ecost, vbase, neighbterms2, i2, nnodes);
2221 for( j = 0; j < nnterms1; j++ )
2229 tj = neighbterms1[j];
2234 for(
int k = 0; k < nnterms2; k++ )
2236 const int tk = neighbterms2[k];
2243 if(
SCIPisGT(scip, ecost, termdist1[j] + termdist2[k] - g->
prize[tj]) || tj == root )
2259 if( netgraph->
head[e2] == nodesid[tk] )
2261 necost = netgraph->
cost[e2];
2266 for(
int l = 0; l < 4; l++ )
2270 if( vbase[pos] == tk &&
SCIPisLT(scip, vnoi[pos].dist, necost) )
2272 necost = vnoi[pos].
dist;
2279 &&
SCIPisGT(scip, ecost, necost + termdist1[j] - g->
prize[tj])
2280 &&
SCIPisGT(scip, ecost, necost + termdist2[k] - g->
prize[tk])
2281 &&
SCIPisGT(scip, ecost, necost + termdist1[j] + termdist2[k] - g->
prize[tj] - g->
prize[tk]) )
2334 assert(scip !=
NULL);
2335 assert(pathtail !=
NULL);
2336 assert(pathhead !=
NULL);
2337 assert(heap !=
NULL);
2338 assert(statetail !=
NULL);
2339 assert(statehead !=
NULL);
2340 assert(memlbltail !=
NULL);
2341 assert(memlblhead !=
NULL);
2342 assert(sdist !=
NULL);
2347 graph_sdPaths(g, pathtail, g->
cost, distlimit, heap, statetail, memlbltail, &nlbltail, i, i2, limit);
2350 graph_sdPaths(g, pathhead, g->
cost, distlimit, heap, statehead, memlblhead, &nlblhead, i2, i, limit);
2355 for( k = 0; k < nlbltail; k++ )
2358 assert(statetail[l] !=
UNKNOWN);
2366 if(
SCIPisLT(scip, dist, pathhead[l].dist) )
2367 dist = pathhead[l].
dist;
2368 if(
SCIPisLT(scip, dist, pathtail[l].dist) )
2369 dist = pathtail[l].
dist;
2370 if( pcmw &&
SCIPisLT(scip, dist, pathhead[l].dist + pathtail[l].dist - g->
prize[l]) )
2377 if( mw && l != i && l != i2 )
2382 dist = pathhead[l].
dist + pathtail[l].
dist;
2393 for( k = 0; k < nlblhead; k++ )
2402 for( k = 0; k <
nnodes; k++ )
2404 assert(statetail[k] ==
UNKNOWN);
2405 assert(pathtail[k].dist ==
FARAWAY);
2406 assert(pathtail[k].edge ==
UNKNOWN);
2407 assert(statehead[k] ==
UNKNOWN);
2408 assert(pathhead[k].dist ==
FARAWAY);
2409 assert(pathhead[k].edge ==
UNKNOWN);
2417 if( g->
head[e] == i2 )
2442 assert(g && sddata);
2444 return sdGetSd(g, i, i2, sd_upper, sd_sufficient,
FALSE, sddata);
2458 assert(g && sddata);
2460 return sdGetSd(g, i, i2, sd_upper, sd_sufficient,
TRUE, sddata);
2478 int *heap = sd1pc->
heap;
2493 assert(scip !=
NULL);
2494 assert(pathtail !=
NULL);
2495 assert(pathhead !=
NULL);
2496 assert(heap !=
NULL);
2497 assert(statetail !=
NULL);
2498 assert(statehead !=
NULL);
2499 assert(memlbltail !=
NULL);
2500 assert(memlblhead !=
NULL);
2501 assert(pathmaxnodetail !=
NULL);
2502 assert(pathmaxnodehead !=
NULL);
2504 graph_path_PcMwSd(scip, g, pathtail, g->
cost, distlimit, pathmaxnodetail, heap, statetail,
NULL, memlbltail, &nlbltail, i, i2, edgelimit);
2505 graph_path_PcMwSd(scip, g, pathhead, g->
cost, distlimit, pathmaxnodehead, heap, statehead, statetail, memlblhead, &nlblhead, i2, i, edgelimit);
2510 for(
int k = 0; k < nlbltail; k++ )
2512 const int l = memlbltail[k];
2513 assert(statetail[l] !=
UNKNOWN);
2518 const int tailmaxterm = pathmaxnodetail[l];
2519 const int headmaxterm = pathmaxnodehead[l];
2523 assert(tailmaxterm != i && headmaxterm != i);
2524 assert(tailmaxterm != i2 && headmaxterm != i2);
2527 if( tailmaxterm >= 0 || headmaxterm >= 0 )
2529 if( tailmaxterm == headmaxterm )
2531 assert(tailmaxterm == l);
2535 pathhead[headmaxterm].
dist,
2536 pathtail[tailmaxterm].
dist,
2541 else if( tailmaxterm >= 0 && headmaxterm >= 0 )
2546 assert(tailmaxterm != headmaxterm);
2552 pathhead[headmaxterm].
dist,
2553 pathtail[tailmaxterm].
dist,
2554 distl2tailmax + distl2headmax,
2555 distl2tailmax + pathhead[l].
dist - g->
prize[headmaxterm],
2556 distl2headmax + pathtail[l].
dist - g->
prize[tailmaxterm],
2561 else if( tailmaxterm >= 0 )
2565 assert(headmaxterm < 0);
2569 pathtail[tailmaxterm].
dist,
2570 distl2tailmax + pathhead[l].
dist,
2575 else if( headmaxterm >= 0 )
2579 assert(tailmaxterm < 0);
2583 pathhead[headmaxterm].
dist,
2584 distl2headmax + pathtail[l].
dist,
2592 dist = pathhead[l].
dist + pathtail[l].
dist;
2613 for(
int k = 0; k < nlbltail; k++ )
2615 const int l = memlbltail[k];
2619 pathmaxnodetail[l] = -1;
2622 for(
int k = 0; k < nlblhead; k++ )
2624 const int l = memlblhead[k];
2628 pathmaxnodehead[l] = -1;
2631 for(
int k = 0; k <
nnodes; k++ )
2633 assert(statetail[k] ==
UNKNOWN);
2634 assert(pathtail[k].dist ==
FARAWAY);
2635 assert(pathtail[k].edge ==
UNKNOWN);
2636 assert(statehead[k] ==
UNKNOWN);
2637 assert(pathhead[k].dist ==
FARAWAY);
2638 assert(pathhead[k].edge ==
UNKNOWN);
2639 assert(pathmaxnodehead[k] == -1);
2640 assert(pathmaxnodetail[k] == -1);
2644 for(
int e = g->
outbeg[i], count = 0; (count++ <= edgelimit) && (e !=
EAT_LAST); e = g->
oeat[e] )
2646 if( g->
head[e] == i2 )
2650 else if( sd > g->
cost[e] )
2689 assert(scip !=
NULL);
2690 assert(pathtail !=
NULL);
2691 assert(pathhead !=
NULL);
2692 assert(heap !=
NULL);
2693 assert(statetail !=
NULL);
2694 assert(statehead !=
NULL);
2695 assert(memlbltail !=
NULL);
2696 assert(memlblhead !=
NULL);
2697 assert(nelims !=
NULL);
2703 for( i = 0; i <
nnodes; i++ )
2716 for( e = 0; e < nedges; e++ )
2720 for( i = 0; i <
nnodes; i++ )
2731 assert(g->
mark[i2]);
2734 graph_sdPaths(g, pathtail, g->
cost, g->
cost[e], heap, statetail, memlbltail, &nlbltail, i, i2, limit);
2737 graph_sdPaths(g, pathhead, costrev, g->
cost[e], heap, statehead, memlblhead, &nlblhead, i2, i, limit);
2740 #ifdef SCIP_DISABLED 2741 if( statetail[i2] !=
UNKNOWN )
2743 sdist = pathtail[i2].
dist;
2746 if( statehead[i] !=
UNKNOWN &&
SCIPisGT(scip, sdist, pathhead[i].dist) )
2748 sdist = pathhead[i].
dist;
2753 for( k = 0; k < nlbltail; k++ )
2757 assert(statetail[l] !=
UNKNOWN);
2763 if(
SCIPisGT(scip, sdist, pathhead[l].dist + pathtail[l].dist) )
2764 sdist = pathhead[l].
dist + pathtail[l].
dist;
2772 for( k = 0; k < nlblhead; k++ )
2802 for( k = 0; k <
nnodes; k++ )
2804 assert(statetail[k] ==
UNKNOWN);
2805 assert(pathtail[k].dist ==
FARAWAY);
2806 assert(pathtail[k].edge ==
UNKNOWN);
2807 assert(statehead[k] ==
UNKNOWN);
2808 assert(pathhead[k].dist ==
FARAWAY);
2809 assert(pathhead[k].edge ==
UNKNOWN);
2821 const int* edgestate,
2838 const int nedges = g->
edges;
2841 assert(g && scip && nelims && visited && visitlist && dheap);
2845 if( edgelimit <= 0 )
2848 for(
int i = 0; i <
nnodes; i++ )
2858 range_csr = dcsr->
range;
2859 head_csr = dcsr->
head;
2860 edgeid_csr = dcsr->
edgeid;
2861 cost_csr = dcsr->
cost;
2865 for(
int e = 0; e < nedges / 2; e++ )
2866 edge_deletable[e] =
FALSE;
2868 assert(dcsr && range_csr && edgeid_csr && cost_csr);
2872 for(
int i = 0; i <
nnodes; i++ )
2875 const int start = range_csr[i].
start;
2878 if( range_csr[i].end - start <= 1 )
2882 for(
int e = start; e < range_csr[i].
end; e = enext )
2887 const int i2 = head_csr[e];
2895 const int orgedge = edgeid_csr[e];
2900 success =
graph_sdWalks_csr(scip, g, termmark, ecost, i, i2, edgelimit, dist, visitlist, &nvisits, dheap, visited);
2906 edge_deletable[edgeid_csr[e] / 2] =
TRUE;
2912 if( range_csr[i].end - start <= 1 )
2919 for(
int e = 0; e < nedges / 2; e++ )
2921 if( edge_deletable[e] )
2950 SDCLIQUE cliquedata = { .
dijkdata =
NULL, .cliquenodes = cliquenodes, .ncliquenodes = 2, .sds = &sds };
2962 for(
int i = 0; i <
nnodes; i++ )
2971 const int e = enext;
2972 const int i2 = g->
head[e];
2977 if( i2 < i || !g->mark[i2] )
2982 cliquenodes[1] = i2;
2991 printf(
"SD biased deletes (sd=%f): ", sds);
3036 const int nedges = g->
edges;
3038 assert(g && scip && nelims && visited && visitlist && dheap);
3042 if( edgelimit <= 0 )
3049 range_csr = dcsr->
range;
3050 head_csr = dcsr->
head;
3051 edgeid_csr = dcsr->
edgeid;
3052 cost_csr = dcsr->
cost;
3061 for(
int i = 0; i <
nnodes; i++ )
3064 visited2[i] =
FALSE;
3070 for(
int e = 0; e < nedges / 2; e++ )
3071 edge_deletable[e] =
FALSE;
3073 assert(dcsr && range_csr && edgeid_csr && cost_csr);
3078 for(
int i = 0; i <
nnodes; i++ )
3081 const int start = range_csr[i].
start;
3084 if( range_csr[i].end - start <= 1 )
3088 for(
int e = start; e < range_csr[i].
end; e = enext )
3093 const int i2 = head_csr[e];
3103 success =
graph_sdWalksTriangle(scip, g, termmark,
NULL, ecost, i, i2, edgelimit,
NULL, dist, visitlist, &nvisits, dheap, visited);
3109 int*
const state = dheap->
position;
3115 for(
int k = 0; k <
nnodes; k++ )
3120 success =
graph_sdWalksTriangle(scip, g, termmark, state, ecost, i2, i, edgelimit, prizeoffset, dist2, visitlist2, &nvisits2, dheap, visited2);
3125 assert(nvisits2 > 0 && visitlist2[0] == i2);
3128 for(
int k = 1; k < nvisits2; k++ )
3130 const int node = visitlist2[k];
3133 assert(visited2[node]);
3134 assert(node != i && node != i2);
3136 if( !visited[node] )
3139 dist_combined = dist[node] + dist2[node];
3140 assert(dist_combined <
FARAWAY);
3142 if( termmark[node] != 0 )
3144 dist_combined += prizeoffset[node];
3145 assert(prizeoffset[node] >= 0.0);
3148 if(
SCIPisLE(scip, dist_combined, ecost) )
3157 sdwalkReset(nnodes, nvisits2, visitlist2, dist2, state2, visited2);
3165 edge_deletable[edgeid_csr[e] / 2] =
TRUE;
3171 if( range_csr[i].end - start <= 1 )
3178 for(
int e = 0; e < nedges / 2; e++ )
3180 if( edge_deletable[e] )
3221 const int nedges = g->
edges;
3223 assert(g && scip && nelims && visited && visitlist && dheap && star_base);
3226 if( edgelimit <= 0 )
3233 range_csr = dcsr->
range;
3234 head_csr = dcsr->
head;
3235 edgeid_csr = dcsr->
edgeid;
3239 for(
int e = 0; e < nedges / 2; e++ )
3240 edge_deletable[e] =
FALSE;
3242 assert(dcsr && range_csr && edgeid_csr);
3244 for(
int i = 0; i <
nnodes; i++ )
3251 for(
int i = 0; i <
nnodes; i++ )
3267 const int start = range_csr[i].
start;
3269 if( range_csr[i].end - start <= 1 )
3275 graph_sdStar(scip, g,
FALSE, i, edgelimit, star_base, dist, visitlist, &nvisits, dheap, visited, &success);
3282 for(
int e = start; e < range_csr[i].
end; e = enext )
3284 const int starnode = head_csr[e];
3285 const int starbase = star_base[starnode];
3286 assert(star_base[starnode] >= 0);
3288 assert(star_base[starnode] == starnode || star_base[starnode] >= 0);
3293 if( starnode != starbase )
3298 edge_deletable[edgeid_csr[e] / 2] =
TRUE;
3307 sdStarReset(nnodes, nvisits, visitlist, star_base, dist, visited, dheap);
3312 for(
int e = 0; e < nedges / 2; e++ )
3314 if( edge_deletable[e] )
3342 assert(scip && nelims);
3364 int* RESTRICT star_base;
3368 assert(scip && nelims);
3369 assert(edgelimit > 0);
3375 for(
int i = 0; i <
nnodes; i++ )
3415 const int nedges = g->
edges;
3417 assert(g && scip && nelims && visited && visitlist && dheap && star_base);
3420 if( edgelimit <= 0 )
3428 range_csr = dcsr->
range;
3429 head_csr = dcsr->
head;
3430 edgeid_csr = dcsr->
edgeid;
3431 cost_dcsr_org = dcsr->
cost;
3436 for(
int e = 0; e < nedges / 2; e++ )
3437 edge_deletable[e] =
FALSE;
3439 assert(dcsr && range_csr && edgeid_csr);
3443 dcsr->
cost = cost_dcsr_biased;
3445 for(
int i = 0; i <
nnodes; i++ )
3452 for(
int i = 0; i <
nnodes; i++ )
3468 const int start = range_csr[i].
start;
3470 if( range_csr[i].end - start <= 1 )
3476 graph_sdStar(scip, g,
TRUE, i, 2 * edgelimit, star_base, dist, visitlist, &nvisits, dheap, visited, &success);
3483 for(
int e = start; e < range_csr[i].
end; e = enext )
3485 const int starnode = head_csr[e];
3486 const int starbase = star_base[starnode];
3487 assert(star_base[starnode] >= 0);
3489 assert(star_base[starnode] == starnode || star_base[starnode] >= 0);
3494 if( starnode != starbase )
3498 if( !usestrongreds &&
EQ(dist[starnode], dcsr->
cost[e]) )
3502 edge_deletable[edgeid_csr[e] / 2] =
TRUE;
3504 dcsr->
cost = cost_dcsr_org;
3505 dcsr->
cost2 = cost_dcsr_biased;
3507 dcsr->
cost = cost_dcsr_biased;
3516 sdStarReset(nnodes, nvisits, visitlist, star_base, dist, visited, dheap);
3521 for(
int e = 0; e < nedges / 2; e++ )
3523 if( edge_deletable[e] )
3532 dcsr->
cost = cost_dcsr_org;
3549 const int* edgestate,
3569 const int nedges = g->
edges;
3572 assert(g && scip && nelims && visited && visitlist && dheap && star_base);
3575 if( edgelimit <= 0 )
3582 range_csr = dcsr->
range;
3583 head_csr = dcsr->
head;
3584 edgeid_csr = dcsr->
edgeid;
3585 cost_csr = dcsr->
cost;
3587 assert(dcsr && range_csr && edgeid_csr && cost_csr);
3594 for(
int e = 0; e < nedges / 2; e++ )
3595 edge_deletable[e] =
FALSE;
3600 for(
int i = 0; i <
nnodes; i++ )
3608 for(
int i = 0; i <
nnodes; i++ )
3624 const int start = range_csr[i].
start;
3626 if( range_csr[i].end - start <= 1 )
3633 dcsr->
cost = costbiased_out;
3634 graph_sdStar(scip, g,
TRUE, i, edgelimit, star_base, dist, visitlist, &nvisits, dheap, visited, &success);
3638 for(
int e = start; e < range_csr[i].
end; e++ )
3639 star_base_out[head_csr[e]] = star_base[head_csr[e]];
3642 sdStarReset(nnodes, nvisits, visitlist, star_base, dist, visited, dheap);
3646 dcsr->
cost = costbiased_in;
3647 graph_sdStar(scip, g,
TRUE, i, edgelimit, star_base, dist, visitlist, &nvisits, dheap, visited, &success);
3652 int*
const star_base_in = star_base;
3655 dcsr->
cost = cost_csr;
3656 dcsr->
cost2 = costbiased_in;
3657 dcsr->
cost3 = costbiased_out;
3660 for(
int e = start; e < range_csr[i].
end; e = enext )
3662 const int starnode = head_csr[e];
3663 const int starbase_in = star_base_in[starnode];
3664 const int starbase_out = star_base_out[starnode];
3666 assert(starbase_in >= 0 && starbase_out >= 0);
3668 assert(
SCIPisLE(scip, dist[starnode], costbiased_in[e]));
3674 const int orgedge = edgeid_csr[e];
3680 if( starnode != starbase_in && starnode != starbase_out )
3691 edge_deletable[edgeid_csr[e] / 2] =
TRUE;
3706 for(
int k = 0; k < nvisits; k++ )
3709 sdStarReset(nnodes, nvisits, visitlist, star_base, dist, visited, dheap);
3712 for(
int k = 0; k <
nnodes; k++ )
3719 for(
int e = 0; e < nedges / 2; e++ )
3721 if( edge_deletable[e] )
3735 dcsr->
cost = cost_csr;
3746 const int* edgestate,
3761 assert(scip !=
NULL);
3762 assert(heap !=
NULL);
3763 assert(nelims !=
NULL);
3764 assert(visited !=
NULL);
3765 assert(visitlist !=
NULL);
3769 if( edgelimit <= 0 )
3772 for(
int i = 0; i <
nnodes; i++ )
3781 for(
int i = 0; i <
nnodes; i++ )
3794 const int i2 = g->
head[e];
3795 const int enext = g->
oeat[e];
3809 success =
graph_sdWalks(scip, g, g->
cost, termmark, ecost, i2, i, edgelimit, dist, heap, state, visitlist, &nvisits, visited);
3810 sdwalkReset(nnodes, nvisits, visitlist, dist, state, visited);
3845 assert(scip !=
NULL);
3846 assert(heap !=
NULL);
3847 assert(nelims !=
NULL);
3848 assert(visited !=
NULL);
3849 assert(visitlist !=
NULL);
3853 if( edgelimit <= 0 )
3859 for(
int i = 0; i <
nnodes; i++ )
3867 for(
int i = 0; i <
nnodes; i++ )
3880 const int i2 = g->
head[e];
3881 const int enext = g->
oeat[e];
3890 success =
graph_sdWalksExt(scip, g, g->
cost, ecost, i2, i, edgelimit, STP_SDWALK_MAXNPREVS, dist, prevterms, nprevterms, heap, state, visitlist, &nvisits, visited);
3891 sdwalkResetExt(nnodes, nvisits, visitlist, dist, nprevterms, state, visited);
3913 const int* edgestate,
3934 assert(scip !=
NULL);
3935 assert(heap !=
NULL);
3936 assert(nelims !=
NULL);
3937 assert(visited !=
NULL);
3938 assert(visitlist !=
NULL);
3942 if( edgelimit <= 0 )
3945 assert(0 &&
"triggers bug in STP-DIMACS/PCSPG-hand/HAND_SMALL_ICERM/handsi04.stp");
3954 for(
int i = 0; i <
nnodes; i++ )
3960 nprevNPterms[i] = 0;
3966 for(
int i = 0; i <
nnodes; i++ )
3979 const int i2 = g->
head[e];
3980 const int enext = g->
oeat[e];
3995 success =
graph_sdWalksExt2(scip, g, g->
cost, termmark, ecost, i2, i, edgelimit, STP_SDWALK_MAXNPREVS, dist, prevterms, nprevterms,
3996 prevNPterms, nprevNPterms, prevedges, nprevedges, heap, state, visitlist, &nvisits, visited);
3997 sdwalkResetExt2(nnodes, nvisits, visitlist, dist, nprevterms, nprevNPterms, nprevedges, state, visited);
4035 int* pathmaxnodetail =
NULL;
4036 int* pathmaxnodehead =
NULL;
4040 assert(scip !=
NULL);
4041 assert(pathtail !=
NULL);
4042 assert(heap !=
NULL);
4043 assert(statetail !=
NULL);
4044 assert(statehead !=
NULL);
4045 assert(memlbltail !=
NULL);
4046 assert(memlblhead !=
NULL);
4047 assert(nelims !=
NULL);
4062 for(
int i = 0; i <
nnodes; i++ )
4064 pathmaxnodetail[i] = -1;
4065 pathmaxnodehead[i] = -1;
4070 for(
int i = 0; i <
nnodes; i++ )
4074 for(
int i = 0; i <
nnodes; i++ )
4085 for(
int i = 0; i <
nnodes; i++ )
4096 const int i2 = g->
head[e];
4097 const int enext = g->
oeat[e];
4103 if( i2 < i || !g->mark[i2] )
4113 graph_path_PcMwSd(scip, g, pathtail, g->
cost, ecost, pathmaxnodetail, heap, statetail,
NULL, memlbltail, &nlbltail, i, i2, limit);
4114 graph_path_PcMwSd(scip, g, pathhead, g->
cost, ecost, pathmaxnodehead, heap, statehead, statetail, memlblhead, &nlblhead, i2, i, limit);
4118 graph_sdPaths(g, pathtail, g->
cost, ecost, heap, statetail, memlbltail, &nlbltail, i, i2, limit);
4119 graph_sdPaths(g, pathhead, g->
cost, ecost, heap, statehead, memlblhead, &nlblhead, i2, i, limit);
4125 for(
int k = 0; k < nlbltail && !deletable; k++ )
4127 const int l = memlbltail[k];
4130 assert(statetail[l] !=
UNKNOWN);
4139 const int tailmaxterm = pathmaxnodetail[l];
4140 const int headmaxterm = pathmaxnodehead[l];
4142 assert(tailmaxterm != i && headmaxterm != i);
4143 assert(tailmaxterm != i2 && headmaxterm != i2);
4146 if( tailmaxterm >= 0 || headmaxterm >= 0 )
4148 if( tailmaxterm == headmaxterm )
4150 assert(tailmaxterm == l);
4152 assert(
SCIPisGE(scip, ecost, pathhead[headmaxterm].dist) &&
SCIPisGE(scip, ecost, pathtail[tailmaxterm].dist));
4154 if(
SCIPisGE(scip, ecost, pathhead[l].dist + pathtail[l].dist - g->
prize[l]) )
4160 else if( tailmaxterm >= 0 && headmaxterm >= 0 )
4165 assert(tailmaxterm != headmaxterm);
4169 assert(
SCIPisGE(scip, ecost, pathhead[headmaxterm].dist) &&
SCIPisGE(scip, ecost, pathtail[tailmaxterm].dist));
4171 if(
SCIPisGE(scip, ecost, distl2tailmax + distl2headmax)
4172 &&
SCIPisGE(scip, ecost, distl2tailmax + pathhead[l].dist - g->
prize[headmaxterm])
4173 &&
SCIPisGE(scip, ecost, distl2headmax + pathtail[l].dist - g->
prize[tailmaxterm])
4174 &&
SCIPisGE(scip, ecost, pathhead[l].dist + pathtail[l].dist - g->
prize[tailmaxterm] - g->
prize[headmaxterm]) )
4180 else if( tailmaxterm >= 0 )
4184 assert(headmaxterm < 0);
4185 assert(
SCIPisGE(scip, ecost, pathtail[tailmaxterm].dist));
4188 if(
SCIPisGE(scip, ecost, distl2tailmax + pathhead[l].dist)
4189 &&
SCIPisGE(scip, ecost, pathhead[l].dist + pathtail[l].dist - g->
prize[tailmaxterm]) )
4195 else if( headmaxterm >= 0 )
4199 assert(tailmaxterm < 0);
4200 assert(
SCIPisGE(scip, ecost, pathhead[headmaxterm].dist));
4203 if(
SCIPisGE(scip, ecost, distl2headmax + pathtail[l].dist)
4204 &&
SCIPisGE(scip, ecost, pathhead[l].dist + pathtail[l].dist - g->
prize[headmaxterm]) )
4211 else if(
SCIPisGE(scip, ecost, pathhead[l].dist + pathtail[l].dist) )
4218 if(
SCIPisGE(scip, ecost, pathhead[l].dist) &&
SCIPisGE(scip, ecost, pathtail[l].dist)
4219 &&
SCIPisGE(scip, ecost, pathhead[l].dist + pathtail[l].dist - g->
prize[l]) )
4227 if(
SCIPisGE(scip, ecost, pathhead[l].dist) &&
SCIPisGE(scip, ecost, pathtail[l].dist) )
4231 if( !usestrongreds &&
SCIPisEQ(scip, ecost, pathhead[l].dist) &&
SCIPisEQ(scip, ecost, pathtail[l].dist) )
4237 if(
SCIPisGE(scip, ecost, pathhead[l].dist + pathtail[l].dist) )
4241 if( !usestrongreds &&
SCIPisEQ(scip, ecost, pathhead[l].dist + pathtail[l].dist) )
4251 for(
int k = 0; k < nlbltail; k++ )
4253 const int l = memlbltail[k];
4258 pathmaxnodetail[l] = -1;
4261 for(
int k = 0; k < nlblhead; k++ )
4263 const int l = memlblhead[k];
4268 pathmaxnodehead[l] = -1;
4272 for(
int k = 0; k <
nnodes; k++ )
4274 assert(statetail[k] ==
UNKNOWN);
4275 assert(pathtail[k].dist ==
FARAWAY);
4276 assert(pathtail[k].edge ==
UNKNOWN);
4277 assert(statehead[k] ==
UNKNOWN);
4278 assert(pathhead[k].dist ==
FARAWAY);
4279 assert(pathhead[k].edge ==
UNKNOWN);
4282 assert(pathmaxnodetail[k] == -1);
4283 assert(pathmaxnodehead[k] == -1);
4328 assert(scip && g && vnoi);
4350 for(
int i = 0; i <
nnodes; i++ )
4362 ecost[k] = g->
cost[e];
4363 adjvert[k++] = g->
head[e];
4365 assert(k == degree);
4373 const SCIP_Real costsum = ecost[0] + ecost[1] + ecost[2];
4375 sd[0] =
getSd(scip, g, sdgraph, vnoi, ecost[0] + ecost[1], vbase, adjvert[0], adjvert[1], 300);
4376 sd[1] =
getSd(scip, g, sdgraph, vnoi, ecost[1] + ecost[2], vbase, adjvert[1], adjvert[2], 300);
4377 sd[2] =
getSd(scip, g, sdgraph, vnoi, ecost[2] + ecost[0], vbase, adjvert[2], adjvert[0], 300);
4390 assert(g->
grad[i] == 0);
4392 SCIPdebugMessage(
"BD3-R Reduction: %f %f %f csum: %f\n ", sd[0], sd[1], sd[2], costsum);
4397 else if( degree == 4 )
4404 adjsds[0] =
getSd(scip, g, sdgraph, vnoi, ecost[0] + ecost[1], vbase, adjvert[0], adjvert[1], 200);
4405 adjsds[1] =
getSd(scip, g, sdgraph, vnoi, ecost[0] + ecost[2], vbase, adjvert[0], adjvert[2], 200);
4406 adjsds[3] =
getSd(scip, g, sdgraph, vnoi, ecost[1] + ecost[2], vbase, adjvert[1], adjvert[2], 200);
4409 (
int[3]){ edges[0], edges[1], edges[2]},
4410 ecost[0] + ecost[1] + ecost[2],
TRUE) )
4415 adjsds[2] =
getSd(scip, g, sdgraph, vnoi, ecost[0] + ecost[3], vbase, adjvert[0], adjvert[3], 200);
4416 adjsds[4] =
getSd(scip, g, sdgraph, vnoi, ecost[1] + ecost[3], vbase, adjvert[1], adjvert[3], 200);
4419 (
int[3]){ edges[0], edges[1], edges[3]},
4420 ecost[0] + ecost[1] + ecost[3],
TRUE) )
4425 adjsds[5] =
getSd(scip, g, sdgraph, vnoi, ecost[2] + ecost[3], vbase, adjvert[2], adjvert[3], 200);
4428 (
int[3]){ edges[0], edges[2], edges[3]},
4429 ecost[0] + ecost[2] + ecost[3],
TRUE) )
4435 (
int[3]){ edges[1], edges[2], edges[3]},
4436 ecost[1] + ecost[2] + ecost[3],
TRUE) )
4441 for(
int k = 0; k < 4; k++ )
4444 for(
int k = 0; k < 3; k++ )
4448 const int k2 = auxg->
head[e];
4452 auxg->
cost[e] = adjsds[k2 - 1];
4454 auxg->
cost[e] = adjsds[k + k2];
4456 assert(
EQ(auxg->
cost[e],
getSd(scip, g, sdgraph, vnoi, ecost[k] + ecost[k2], vbase,
4457 adjvert[k], adjvert[k2], 200)));
4469 for(
int k = 0; k < 3; k++ )
4473 const int k2 = auxg->
head[e];
4475 cutoffs[edgecount++] = auxg->
cost[e];
4499 *nelims += nnewelims;
4536 int* pathmaxnodetail =
NULL;
4537 int* pathmaxnodehead =
NULL;
4540 const int limit4 = limit / 3;
4544 assert(scip && g && heap && nelims);
4547 assert(limit > 0 && limit4 > 0);
4561 for(
int i = 0; i <
nnodes; i++ )
4570 pathmaxnodetail[i] = -1;
4571 pathmaxnodehead[i] = -1;
4574 sd1pc = (
SD1PC) { .
pathtail = pathtail, .pathhead = pathhead, .heap = heap,
4575 .statetail = statetail, .statehead = statehead, .memlbltail = memlbltail,
4576 .memlblhead = memlblhead, .pathmaxnodetail = pathmaxnodetail, .pathmaxnodehead = pathmaxnodehead };
4580 for(
int i = 0; i <
nnodes; i++ )
4595 if( pcdegree != degree )
4603 const int head = g->
head[e];
4607 edges[edgecount] = e;
4608 ecost[edgecount] = g->
cost[e];
4609 adjvert[edgecount++] = g->
head[e];
4617 assert(edgecount == degree);
4624 const SCIP_Real csum = ecost[0] + ecost[1] + ecost[2] - iprize;
4626 assert(edgecount == 3);
4627 assert(iprize <= ecost[0] && iprize <= ecost[1] && iprize <= ecost[2]);
4629 sd[0] =
sdGetSdPcMw(scip, g, ecost[0] + ecost[1], adjvert[0], adjvert[1], limit, &sd1pc);
4630 sd[1] =
sdGetSdPcMw(scip, g, ecost[1] + ecost[2], adjvert[1], adjvert[2], limit, &sd1pc);
4631 sd[2] =
sdGetSdPcMw(scip, g, ecost[2] + ecost[0], adjvert[2], adjvert[0], limit, &sd1pc);
4643 assert(offset !=
NULL);
4646 *offset += g->
prize[i];
4651 assert(g->
grad[i] == 0);
4653 SCIPdebugMessage(
"BD3 Reduction: %f %f %f csum: %f\n ", sd[0], sd[1], sd[2], csum);
4664 adjsds[0] =
sdGetSdPcMw(scip, g, ecost[0] + ecost[1], adjvert[0], adjvert[1], limit4, &sd1pc);
4665 adjsds[1] =
sdGetSdPcMw(scip, g, ecost[0] + ecost[2], adjvert[0], adjvert[2], limit4, &sd1pc);
4666 adjsds[3] =
sdGetSdPcMw(scip, g, ecost[1] + ecost[2], adjvert[1], adjvert[2], limit4, &sd1pc);
4669 (
int[3]){ edges[0], edges[1], edges[2]},
4670 ecost[0] + ecost[1] + ecost[2],
TRUE) )
4675 adjsds[2] =
sdGetSdPcMw(scip, g, ecost[0] + ecost[3], adjvert[0], adjvert[3], limit4, &sd1pc);
4676 adjsds[4] =
sdGetSdPcMw(scip, g, ecost[1] + ecost[3], adjvert[1], adjvert[3], limit4, &sd1pc);
4679 (
int[3]){ edges[0], edges[1], edges[3]},
4680 ecost[0] + ecost[1] + ecost[3],
TRUE) )
4685 adjsds[5] =
sdGetSdPcMw(scip, g, ecost[2] + ecost[3], adjvert[2], adjvert[3], limit4, &sd1pc);
4688 (
int[3]){ edges[0], edges[2], edges[3]},
4689 ecost[0] + ecost[2] + ecost[3],
TRUE) )
4695 (
int[3]){ edges[1], edges[2], edges[3]},
4696 ecost[1] + ecost[2] + ecost[3],
TRUE) )
4701 for(
int k = 0; k < 4; k++ )
4704 for(
int k = 0; k < 3; k++ )
4708 const int k2 = auxg->
head[e];
4712 auxg->
cost[e] = adjsds[k2 - 1];
4714 auxg->
cost[e] = adjsds[k + k2];
4716 assert(
EQ(auxg->
cost[e],
sdGetSdPcMw(scip, g, ecost[k] + ecost[k2], adjvert[k], adjvert[k2], limit4, &sd1pc)));
4728 for(
int k = 0; k < 3; k++ )
4732 const int k2 = auxg->
head[e];
4734 cutoffs[edgecount++] = auxg->
cost[e];
int graph_get_nEdges(const GRAPH *)
void graph_knot_chg(GRAPH *, int, int)
static volatile int nterms
int graph_pc_realDegree(const GRAPH *, int, SCIP_Bool)
#define SDSTAR_BASE_KILLED
void graph_edge_del(SCIP *, GRAPH *, int, SCIP_Bool)
SCIP_Bool graph_sdWalksExt(SCIP *, const GRAPH *, const SCIP_Real *, SCIP_Real, int, int, int, int, SCIP_Real *, int *, int *, int *, int *, int *, int *, STP_Bool *)
SCIP_Bool graph_sdWalks_csr(SCIP *, const GRAPH *, const int *, SCIP_Real, int, int, int, SCIP_Real *, int *, int *, DHEAP *, STP_Bool *)
SCIP_Bool graph_valid(SCIP *, const GRAPH *)
static SCIP_Bool sddeltable(SCIP *scip, GRAPH *g, PATH *path, int *vbase, int *forbidden, int tpos, int hpos, int tail, int head, int edge, int nnodes)
static SCIP_Bool isPseudoDeletable(SCIP *scip, const GRAPH *g, const GRAPH *auxg, const SCIP_Real *ecost, const int *edges, int degree)
static void sdwalkResetExt(int nnodes, int nvisits, const int *visitlist, SCIP_Real *RESTRICT dist, int *RESTRICT nprevterms, int *RESTRICT state, STP_Bool *RESTRICT visited)
void graph_pc_termMarkProper(const GRAPH *, int *)
SCIP_RETCODE reduce_sd(SCIP *scip, GRAPH *g, REDBASE *redbase, int *nelims)
SCIP_Bool SCIPisPositive(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
void graph_path_exec(SCIP *, const GRAPH *, int, int, const SCIP_Real *, PATH *)
static void sdwalkReset(int nnodes, int nvisits, const int *visitlist, SCIP_Real *RESTRICT dist, int *RESTRICT state, STP_Bool *RESTRICT visited)
void graph_free_dcsr(SCIP *, GRAPH *)
SCIP_RETCODE reduce_sdWalk(SCIP *scip, int edgelimit, const int *edgestate, GRAPH *g, int *termmark, SCIP_Real *dist, int *heap, int *state, int *visitlist, STP_Bool *visited, int *nelims)
void reduce_sdneighborGetCloseTerms(const GRAPH *, const SDN *, int, SCIP_Real, int *RESTRICT, SCIP_Real *RESTRICT, int *RESTRICT)
SCIP_Real reduce_sdgraphGetSd(int, int, SDGRAPH *)
void graph_free(SCIP *, GRAPH **, SCIP_Bool)
SCIP_RETCODE graph_path_init(SCIP *, GRAPH *)
void graph_dcsr_deleteEdgeBi(SCIP *, DCSR *, int)
#define STP_BD_MAXDNEDGES
#define SDSTAR_BASE_UNSET
SCIP_Bool SCIPisNegative(SCIP *scip, SCIP_Real val)
Problem data for stp problem.
enum SCIP_Retcode SCIP_RETCODE
includes various files containing graph methods used for Steiner tree problems
void graph_heap_clean(SCIP_Bool, DHEAP *)
const int * cliqueToNodeMap
void graph_path_PcMwSd(SCIP *, const GRAPH *, PATH *, SCIP_Real *, SCIP_Real, int *, int *, int *, int *, int *, int *, int, int, int)
SCIP_Bool graph_heap_isClean(const DHEAP *)
SCIP_Bool SCIPisEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_RETCODE reduce_bd34WithSd(SCIP *scip, GRAPH *g, SDGRAPH *sdgraph, PATH *vnoi, int *vbase, int *nelims)
#define SCIPfreeBufferArray(scip, ptr)
SCIP_RETCODE reduce_sdWalkExt2(SCIP *scip, int edgelimit, const int *edgestate, GRAPH *g, int *termmark, SCIP_Real *dist, int *heap, int *state, int *visitlist, STP_Bool *visited, int *nelims)
SCIP_Real reduce_sdGetSdIntermedTerms(const GRAPH *g, int i, int i2, SCIP_Real sd_upper, SCIP_Real sd_sufficient, SD *sddata)
SCIP_Real * node_distance
SCIP_Bool graph_sdWalks(SCIP *, const GRAPH *, const SCIP_Real *, const int *, SCIP_Real, int, int, int, SCIP_Real *, int *, int *, int *, int *, STP_Bool *)
SCIP_Real miscstp_maxReal(const SCIP_Real *realarr, unsigned nreals)
SCIP_RETCODE graph_init_dcsr(SCIP *, GRAPH *)
SCIP_RETCODE reduce_sdImpLongEdge(SCIP *scip, const int *edgestate, GRAPH *g, SD *sdistance, int *nelims)
SCIP_RETCODE reduce_sdWalk_csr(SCIP *scip, int edgelimit, const int *edgestate, GRAPH *g, int *termmark, SCIP_Real *dist, int *visitlist, STP_Bool *visited, DHEAP *dheap, int *nelims)
SCIP_Bool graph_pc_termIsNonLeafTerm(const GRAPH *, int)
SCIP_Bool graph_sdWalksTriangle(SCIP *, const GRAPH *, const int *, const int *, SCIP_Real, int, int, int, SCIP_Real *, SCIP_Real *, int *, int *, DHEAP *, STP_Bool *)
SCIP_RETCODE reduce_sdBiasedNeighbor(SCIP *scip, SD *sdistance, GRAPH *g, int *nelims)
SCIP_RETCODE reduce_sdWalkTriangle(SCIP *scip, int edgelimit, SCIP_Bool usestrongreds, GRAPH *g, int *termmark, SCIP_Real *dist, int *visitlist, STP_Bool *visited, DHEAP *dheap, int *nelims)
static int getcloseterms2term(SCIP *scip, const GRAPH *g, const GRAPH *netgraph, SCIP_Real *termdist, SCIP_Real ecost, int *neighbterms, int *nodesid, int *nodesorg, int i)
static SCIP_RETCODE sdCliqueInitData(SCIP *scip, const GRAPH *g, int centernode, const GRAPH *cliquegraph, const int *cliqueNodeMap, DIJK *dijkdata, SDCLIQUE *sdclique)
static void sdwalkResetExt2(int nnodes, int nvisits, const int *visitlist, SCIP_Real *dist, int *nprevterms, int *nprevNPterms, int *nprevedges, int *state, STP_Bool *visited)
void graph_dijkLimited_reset(const GRAPH *, DIJK *)
static SCIP_Real sdGetSdNeighbor(const GRAPH *g, int i, int i2, SCIP_Real sd_upper, SCIP_Real sd_sufficient, SD *sddata)
SCIP_RETCODE graph_get4nextTTerms(SCIP *, GRAPH *, const SCIP_Real *, PATH *, int *, int *, int *)
static SCIP_Real getSd(SCIP *scip, GRAPH *g, SDGRAPH *sdgraph, PATH *vnoi, SCIP_Real sd_initial, int *vbase, int i, int i2, int limit)
static SCIP_RETCODE sdStarBiasedProcessNode(SCIP *scip, int node, SCIP_Bool usestrongreds, const SDPROFIT *sdprofit, GRAPH *g, DIJK *dijkdata, int *RESTRICT star_base, SCIP_Bool *RESTRICT edge_deletable, int *nelims)
miscellaneous methods used for solving Steiner problems
static SCIP_RETCODE sdStarInit(SCIP *scip, const GRAPH *g, int edgelimit, DIJK **dijkdata, int *RESTRICT *star_base, SCIP_Bool *RESTRICT *edge_deletable)
SCIP_RETCODE reduce_sdPc(SCIP *scip, GRAPH *g, PATH *vnoi, int *heap, int *state, int *vbase, int *nodesid, int *nodesorg, int *nelims)
SCIP_Bool SCIPisLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
static void sdGetSdsCliqueTermWalks(const GRAPH *g, SD *RESTRICT sddata, GRAPH *RESTRICT cliquegraph, SDCLIQUE *RESTRICT sdclique)
#define SCIPfreeBufferArrayNull(scip, ptr)
static int getcloseterms(SCIP *scip, const PATH *vnoi, SCIP_Real *termdist, SCIP_Real ecost, const int *vbase, int *neighbterms, int i, int nnodes)
void graph_edge_add(SCIP *, GRAPH *, int, int, double, double)
static void sdStarReset(int nnodes, int nvisits, const int *visitlist, int *RESTRICT star_base, SCIP_Real *RESTRICT dist, STP_Bool *RESTRICT visited, DHEAP *RESTRICT dheap)
static SCIP_RETCODE ledgeFromNetgraph(SCIP *scip, const GRAPH *netgraph, const PATH *mst, const int *edgeorg, const PATH *vnoi, const int *vbase, GRAPH *g, int *nelims)
SCIP_RETCODE reduce_unconnected(SCIP *, GRAPH *)
void graph_knot_add(GRAPH *, int)
SCIP_Real reduce_sdGetSd(const GRAPH *g, int i, int i2, SCIP_Real sd_upper, SCIP_Real sd_sufficient, SD *sddata)
static int getlecloseterms(SCIP *scip, PATH *vnoi, SCIP_Real *termdist, SCIP_Real ecost, int *vbase, int *neighbterms, int i, int nnodes)
void graph_edge_delBlocked(SCIP *, GRAPH *, const SCIP_Bool *, SCIP_Bool)
SCIP_RETCODE graph_knot_delPseudo(SCIP *, GRAPH *, const SCIP_Real *, const SCIP_Real *, const SCIP_Real *, int, REDCOST *, SCIP_Bool *)
const SCIP_Bool * reduce_sdneighborGetBlocked(const SDN *)
void reduce_sdgraphFreeFromDistGraph(SCIP *, SDGRAPH **)
void reduce_sdprofitFree(SCIP *, SDPROFIT **)
SCIP_Bool graph_pseudoAncestors_edgesInConflict(SCIP *, const GRAPH *, const int *, int)
SCIP_RETCODE graph_sdComputeCliqueStar(SCIP *, const GRAPH *, const SDPROFIT *, SDCLIQUE *)
SCIP_RETCODE reduce_sdEdgeCliqueStar(SCIP *scip, int edgelimit, GRAPH *g, int *nelims)
#define STP_SDWALK_MAXNPREVS
SCIP_Real reduce_sdgraphGetMaxCost(const SDGRAPH *)
struct single_special_distance_pc SD1PC
static SCIP_Real reduce_sdprofitGetProfit(const SDPROFIT *sdprofit, int node, int nonsource1, int nonsource2)
SCIP_RETCODE graph_dijkLimited_init(SCIP *, const GRAPH *, DIJK **)
static SCIP_Real sdGetSd(const GRAPH *g, int i, int i2, SCIP_Real sd_upper, SCIP_Real sd_sufficient, SCIP_Bool onlyIntermedTerms, SD *sddata)
SCIP_RETCODE graph_sdStarBiased(SCIP *, const GRAPH *, const SDPROFIT *, int, int *, DIJK *, SCIP_Bool *)
#define SCIPallocBufferArray(scip, ptr, num)
void graph_dijkLimited_free(SCIP *, DIJK **)
SCIP_Bool graph_isMarked(const GRAPH *)
static void pcBiasCostsDCSR(SCIP *scip, const GRAPH *g, SCIP_Bool biasreversed, SCIP_Real *costbiased, SCIP_Real *mincost_in)
SCIP_RETCODE reduce_sdStarBiasedWithProfit(SCIP *scip, int edgelimit, const SDPROFIT *sdprofit, SCIP_Bool usestrongreds, GRAPH *g, int *nelims)
#define BMScopyMemoryArray(ptr, source, num)
void graph_edge_printInfo(const GRAPH *, int)
void graph_tpathsGet4CloseTerms(const GRAPH *, const TPATHS *, int, SCIP_Real, int *RESTRICT, int *RESTRICT, SCIP_Real *RESTRICT, int *RESTRICT)
SCIP_Bool graph_sdWalksExt2(SCIP *, const GRAPH *, const SCIP_Real *, const int *, SCIP_Real, int, int, int, int, SCIP_Real *, int *, int *, int *, int *, int *, int *, int *, int *, int *, int *, STP_Bool *)
void graph_path_exit(SCIP *, GRAPH *)
SCIP_Bool graph_pc_isPc(const GRAPH *)
void graph_get4nextTermPaths(GRAPH *, const SCIP_Real *, const SCIP_Real *, PATH *, int *, int *)
static SCIP_Bool isPseudoDeletableDeg3(SCIP *scip, const GRAPH *g, const SCIP_Real *sdsK3, const int *edgesK3, SCIP_Real costK3, SCIP_Bool allowEquality)
SCIP_Bool hasNeigborUpdate
static void sdStarFinalize(SCIP *scip, GRAPH *g, DIJK **dijkdata, int *RESTRICT *star_base, SCIP_Bool *RESTRICT *edge_deletable)
static void deleteEdge(SCIP *scip, int edge, GRAPH *g, PR *pr)
SCIP_Bool SCIPisGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_RETCODE reduce_sdBiased(SCIP *scip, SD *sdistance, GRAPH *g, int *nelims)
SCIP_RETCODE reduce_sdgraphInitFromDistGraph(SCIP *, const GRAPH *, GRAPH *, int *, SDGRAPH **)
SCIP_RETCODE reduce_sdspSap(SCIP *scip, GRAPH *g, PATH *pathtail, PATH *pathhead, int *heap, int *statetail, int *statehead, int *memlbltail, int *memlblhead, int *nelims, int limit)
SCIP_Bool graph_pc_knotIsFixedTerm(const GRAPH *, int)
static SCIP_RETCODE sdCliqueUpdateGraphWithStarWalks(SCIP *scip, const GRAPH *g, const SDPROFIT *sdprofit, GRAPH *cliquegraph, SDCLIQUE *sdclique)
SCIP_Bool reduce_sdgraphHasMstHalfMark(const SDGRAPH *)
SCIP_Bool graph_pc_isPcMw(const GRAPH *)
void graph_dijkLimited_clean(const GRAPH *, DIJK *)
SCIP_RETCODE reduce_getSdByPaths(SCIP *scip, GRAPH *g, PATH *pathtail, PATH *pathhead, SCIP_Real *sdist, SCIP_Real distlimit, int *heap, int *statetail, int *statehead, int *memlbltail, int *memlblhead, int i, int i2, int limit, SCIP_Bool pc, SCIP_Bool mw)
static void sdCliqueFreeData(SCIP *scip, SDCLIQUE *sdclique)
SCIP_RETCODE reduce_sdUpdateWithSdNeighbors(SCIP *, GRAPH *, SD *, int *)
void graph_sdStar(SCIP *, const GRAPH *, SCIP_Bool, int, int, int *, SCIP_Real *, int *, int *, DHEAP *, STP_Bool *, SCIP_Bool *)
SCIP_RETCODE reduce_sdStar(SCIP *scip, int edgelimit, SCIP_Bool usestrongreds, GRAPH *g, SCIP_Real *dist, int *star_base, int *visitlist, STP_Bool *visited, DHEAP *dheap, int *nelims)
void graph_sdPaths(const GRAPH *, PATH *, const SCIP_Real *, SCIP_Real, int *, int *, int *, int *, int, int, int)
SCIP_RETCODE reduce_sdprofitInit(SCIP *, const GRAPH *, SDPROFIT **)
int graph_get_nNodes(const GRAPH *)
static SCIP_Real sdGetSdPcMw(SCIP *scip, const GRAPH *g, SCIP_Real distlimit, int i, int i2, int edgelimit, SD1PC *sd1pc)
SCIP_RETCODE reduce_bd34(SCIP *scip, GRAPH *g, PATH *pathtail, PATH *pathhead, int *heap, int *statetail, int *statehead, int *memlbltail, int *memlblhead, int *nelims, int limit, SCIP_Real *offset)
SCIP_RETCODE reduce_sdStarPc(SCIP *scip, int edgelimit, const int *edgestate, GRAPH *g, SCIP_Real *dist, int *star_base, int *visitlist, STP_Bool *visited, DHEAP *dheap, int *nelims)
SCIP_Bool SCIPisLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_RETCODE graph_buildCompleteGraph(SCIP *, GRAPH **, int)
SCIP_RETCODE reduce_sdsp(SCIP *scip, GRAPH *g, PATH *pathtail, int *heap, int *statetail, int *statehead, int *memlbltail, int *memlblhead, int *nelims, int limit, SCIP_Bool usestrongreds)
SCIP_RETCODE graph_init(SCIP *, GRAPH **, int, int, int)
const STP_Bool * reduce_sdgraphGetMstHalfMark(const SDGRAPH *)
includes various reduction methods for Steiner tree problems
SCIP_RETCODE reduce_sdStarPc2(SCIP *scip, int edgelimit, SCIP_Bool usestrongreds, GRAPH *g, SCIP_Real *dist, int *star_base, int *visitlist, STP_Bool *visited, DHEAP *dheap, int *nelims)
SCIP_RETCODE reduce_sdStarBiased(SCIP *scip, int edgelimit, SCIP_Bool usestrongreds, GRAPH *g, int *nelims)
SCIP_RETCODE reduce_sdGetSdsCliquegraph(SCIP *scip, const GRAPH *g, int centernode, const int *cliqueNodeMap, DIJK *dijkdata, SD *sddata, GRAPH *cliquegraph)
SCIP_RETCODE reduce_sdWalkExt(SCIP *scip, int edgelimit, SCIP_Bool usestrongreds, GRAPH *g, SCIP_Real *dist, int *heap, int *state, int *visitlist, STP_Bool *visited, int *nelims)