•All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
solstp.c
Go to the documentation of this file.
27 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
327 const SCIP_Real neighbor_profit = pcsubtreePruneForProfit(g, cost, neighbor, dfspos, result, connected, dfscount);
397 const SCIP_Real neighbor_profit = pcsubtreePruneForProfit_csr(csr_orgcosts, prize, isPc, neighbor, dfspos,
819 profit = pcsubtreePruneForProfit_csr(csr_orgcosts, g->prize, isPc, solroot, dfspos, result, connected, &dfscount);
1039 assert(LE(solstp_getObjBounded(g, result, 0.0, nedges), solstp_getObjBounded(g, result_dbg, 0.0, nedges)));
1052 /* prune the (rooted) prize collecting Steiner tree in such a way that all leaves are terminals
1473 * NOTE: method exists purely for optimization, so that unbiased costs for PC do not have to computed again! */
1507 SCIP_CALL( pruneSteinerTreeStp(scip, g, (g->stp_type != STP_DHCSTP) ? g->cost : cost, result, connected) );
1537 MST mst = { .csr = spaths->csr_orgcosts, .dheap = spaths->dheap, .nodes_dist = spaths->nodes_dist,
1755 (Is_pseudoTerm(graph->term[i]) || graph_pc_knotIsFixedTerm(graph, i)) : Is_term(graph->term[i]);
2180 if( graph_pc_isRootedPcMw(transgraph) && transgraph->terms == 1 && graph_pc_nFixedTerms(orggraph) == 1 )
2183 SCIP_CALL( solstp_markPcancestors(scip, transgraph->pcancestors, orggraph->tail, orggraph->head, orgnnodes,
2219 assert(scip != NULL && tails != NULL && heads != NULL && pcancestors != NULL && solnodemark != NULL);
static SCIP_RETCODE pruneSteinerTreePc_csr(SCIP *scip, const GRAPH *g, MST *mst, int *RESTRICT result, STP_Bool *RESTRICT connected)
Definition: solstp.c:1055
Definition: misc_stp.h:88
static void pcsubtreeDelete(const GRAPH *g, int subtree_root, int dfspos[], int result[], STP_Bool connected[])
Definition: solstp.c:200
SCIP_RETCODE solstp_addSolToProb(SCIP *scip, const GRAPH *g, const int *soledge, SCIP_HEUR *heur, SCIP_Bool *success)
Definition: solstp.c:1279
Definition: graphdefs.h:184
Definition: struct_scip.h:59
SCIP_Bool graph_csr_costsAreInSync(const GRAPH *, const CSR *, const SCIP_Real *)
Definition: graph_util.c:1448
Shortest path based algorithms for Steiner problems.
SCIP_RETCODE solstp_pruneFromNodes(SCIP *scip, const GRAPH *g, int *result, STP_Bool *connected)
Definition: solstp.c:1415
static SCIP_RETCODE pruneSteinerTreeStp(SCIP *scip, const GRAPH *g, const SCIP_Real *cost, int *result, STP_Bool *connected)
Definition: solstp.c:837
static SCIP_RETCODE reroot(SCIP *scip, const GRAPH *g, int *result, int newroot, SCIP_Bool *isInfeasible)
Definition: solstp.c:43
void solstp_pcConnectDummies(const GRAPH *g, int solroot, int *RESTRICT result, STP_Bool *RESTRICT connected)
Definition: solstp.c:1200
void graph_path_exec(SCIP *, const GRAPH *, int, int, const SCIP_Real *, PATH *)
Definition: graph_path.c:541
SCIP_RETCODE solstp_getOrg(SCIP *scip, const GRAPH *transgraph, const GRAPH *orggraph, const int *transsoledge, int *orgsoledge)
Definition: solstp.c:2148
SCIP_RETCODE solstp_markPcancestors(SCIP *scip, IDX **pcancestors, const int *tails, const int *heads, int orgnnodes, STP_Bool *solnodemark, STP_Bool *soledgemark, int *solnodequeue, int *nsolnodes, int *nsoledges)
Definition: solstp.c:2200
includes methods for Steiner tree problem solutions
static SCIP_RETCODE strongPruneSteinerTreePc_csr(SCIP *scip, const GRAPH *g, const CSR *csr_orgcosts, int solroot, int *result, STP_Bool *connected)
Definition: solstp.c:787
static SCIP_Real pcsubtreePruneForProfit_csr(const CSR *csr_orgcosts, const SCIP_Real *prize, SCIP_Bool isPc, int subtree_root, int *RESTRICT dfspos, int *RESTRICT result, STP_Bool *RESTRICT connected, int *RESTRICT dfscount)
Definition: solstp.c:355
SCIP_Bool solstp_isUnreduced(SCIP *scip, const GRAPH *graph, const int *result)
Definition: solstp.c:1596
Problem data for stp problem.
Definition: graphdefs.h:284
void solstp_convertCsrToGraph(SCIP *scip, const GRAPH *g, const CSR *csr, const int *soledge_csr, STP_Bool *RESTRICT solnode, int *RESTRICT soledge_g)
Definition: solstp.c:1976
minimum spanning tree based algorithms for Steiner problems
SCIP_RETCODE solstp_pruneFromTmHeur(SCIP *scip, const GRAPH *g, const SCIP_Real *cost, int *RESTRICT result, STP_Bool *RESTRICT connected)
Definition: solstp.c:1474
static SCIP_RETCODE pcsolGetMstEdges(SCIP *scip, const GRAPH *g, const SCIP_Real *cost, int root, int *result)
Definition: solstp.c:449
SCIP_Real solstp_pcGetObjCsr(const GRAPH *g, const CSR *csr, const int *soledge_csr, const STP_Bool *solnode)
Definition: solstp.c:1872
int solstp_getNedgesBounded(const GRAPH *g, const int *soledge, int nedges)
Definition: solstp.c:2058
static void setNodeList(const GRAPH *g, STP_Bool *RESTRICT solnode, IDX *listnode)
Definition: solstp.c:1109
void solstp_getStpFromSCIPsol(SCIP *scip, SCIP_SOL *scipsol, const GRAPH *g, int *soledges)
Definition: solstp.c:1949
SCIP_Bool graph_pc_termIsNonLeafTerm(const GRAPH *, int)
Definition: graph_pcbase.c:1431
void mst_computeOnMarked(const GRAPH *g, const STP_Bool *nodes_isMarked, int startnode, MST *mst)
Definition: mst.c:223
Definition: struct_sol.h:64
SCIP_RETCODE solstp_rerootInfeas(SCIP *scip, GRAPH *g, int *result, int newroot, SCIP_Bool *isInfeasible)
Definition: solstp.c:1579
static SCIP_RETCODE strongPruneSteinerTreePc(SCIP *scip, const GRAPH *g, const SCIP_Real *cost, int solroot, int *result, STP_Bool *connected)
Definition: solstp.c:730
static void pcsubtreeDelete_csr(const CSR *csr_orgcosts, int subtree_root, int *RESTRICT dfspos, int *RESTRICT result, STP_Bool *RESTRICT connected)
Definition: solstp.c:247
SCIP_RETCODE SCIPprobdataAddNewSol(SCIP *scip, SCIP_Real *nval, SCIP_HEUR *heur, SCIP_Bool *success)
Definition: probdata_stp.c:3693
static void pcsolGetTrivialEdges(const GRAPH *g, const STP_Bool *connected, int *RESTRICT result)
Definition: solstp.c:420
Definition: type_retcode.h:33
static void pcsolMarkGraphNodes(const STP_Bool *connected, const GRAPH *g)
Definition: solstp.c:484
static SCIP_RETCODE pruneSteinerTreePc(SCIP *scip, const GRAPH *g, const SCIP_Real *cost, int *result, STP_Bool *connected)
Definition: solstp.c:970
SCIP_Real solstp_getObjCsr(const GRAPH *g, const CSR *csr, const int *soledge_csr, const STP_Bool *solnode)
Definition: solstp.c:1921
Definition: mst.h:40
Definition: struct_heur.h:88
Definition: type_retcode.h:34
SCIP_RETCODE solstp_pruneFromEdges(SCIP *scip, const GRAPH *g, int *result)
Definition: solstp.c:1432
static void stpsolPrune_csr(const GRAPH *g, const MST *mst, int *RESTRICT result, STP_Bool *RESTRICT connected)
Definition: solstp.c:648
void solstp_getTrivialSol(const GRAPH *g, int *soledge)
Definition: solstp.c:2020
SCIP_Real solstp_getObjBounded(const GRAPH *g, const int *soledge, SCIP_Real offset, int nedges)
Definition: solstp.c:1833
static SCIP_Real pcsubtreePruneForProfit(const GRAPH *g, const SCIP_Real *cost, int subtree_root, int *RESTRICT dfspos, int *RESTRICT result, STP_Bool *RESTRICT connected, int *RESTRICT dfscount)
Definition: solstp.c:289
SCIP_Bool solstp_containsNode(const GRAPH *g, const int *result, int node)
Definition: solstp.c:1628
SCIP_Bool stpsol_pruningIsPossible(const GRAPH *g, const int *result, const STP_Bool *connected)
Definition: solstp.c:1307
int graph_pc_nProperPotentialTerms(const GRAPH *)
Definition: graph_pcbase.c:2582
SCIP_Bool graph_pc_knotIsNonLeafTerm(const GRAPH *, int)
Definition: graph_pcbase.c:1383
Definition: graphdefs.h:138
Portable definitions.
static void solGetMstEdges_csr(const GRAPH *g, const STP_Bool *connected, int root, MST *mst, int *RESTRICT result)
Definition: solstp.c:702
SCIP_Bool graph_pc_knotIsDummyTerm(const GRAPH *, int)
Definition: graph_pcbase.c:1344
SCIP_Bool graph_pc_knotIsFixedTerm(const GRAPH *, int)
Definition: graph_pcbase.c:1257
void solstp_setVertexFromEdgeConn(const GRAPH *g, const int *soledge, int *solnode)
Definition: solstp.c:2114
SCIP_RETCODE solstp_reroot(SCIP *scip, const GRAPH *g, int *result, int newroot)
Definition: solstp.c:1559
static void pcsolMarkGraphNodes_csr(const GRAPH *g, STP_Bool *RESTRICT connected)
Definition: solstp.c:526
int solstp_pcGetSolRoot(SCIP *scip, const GRAPH *g, const STP_Bool *connected)
Definition: solstp.c:1140
SCIP_Real * SCIPprobdataGetXval(SCIP *scip, SCIP_SOL *sol)
Definition: probdata_stp.c:3190
void graph_pc_getOrgCosts(SCIP *, const GRAPH *, SCIP_Real *)
Definition: graph_pcbase.c:1829
void solstp_setVertexFromEdge(const GRAPH *g, const int *result, STP_Bool *solnode)
Definition: solstp.c:2078
SCIP_Bool graph_pc_costsEqualOrgCosts(SCIP *, const GRAPH *, const SCIP_Real *)
Definition: graph_pcbase.c:1913
static SCIP_RETCODE pruneSteinerTreeStp_csr(const GRAPH *g, MST *mst, int *RESTRICT result, STP_Bool *RESTRICT connected)
Definition: solstp.c:940
static void pcsolPrune(const GRAPH *g, int *result, STP_Bool *connected)
Definition: solstp.c:572
int * SCIPprobdataGetPctermsorder(SCIP *scip)
Definition: probdata_stp.c:3262
SCIP_Bool solstp_isValid(SCIP *scip, const GRAPH *graph, const int *result)
Definition: solstp.c:1650
Definition: shortestpath.h:47
Definition: objbenders.h:33
SCIP_RETCODE solstp_prune(SCIP *scip, const GRAPH *g, int *result, STP_Bool *connected)
Definition: solstp.c:1366
SCIP_Real solstp_getObj(const GRAPH *g, const int *soledge, SCIP_Real offset)
Definition: solstp.c:1859
IDX * graph_edge_getAncestors(const GRAPH *, int)
Definition: graph_history.c:1202
SCIP_RETCODE solstp_pruneFromTmHeur_csr(SCIP *scip, const GRAPH *g, SPATHS *spaths, int *RESTRICT result)
Definition: solstp.c:1515