Detailed DescriptionAltenative based reduction tests for Steiner problems. This file implements alternative-based reduction techniques for several Steiner problems. All tests can be found in "A Generic Approach to Solving the Steiner Tree Problem and Variants" by Daniel Rehfeldt. A list of all interface methods can be found in grph.h. Definition in file reduce_alt.c. #include <stdio.h>#include <stdlib.h>#include <string.h>#include <assert.h>#include "grph.h"#include "probdata_stp.h"#include "scip/scip.h"Go to the source code of this file.
Macro Definition Documentation
Definition at line 39 of file reduce_alt.c. Referenced by ansadv2Reduction(), ansadvReduction(), and cnsAdvReduction().
Definition at line 40 of file reduce_alt.c. Referenced by bd3_reduction(), and sd_reduction().
Definition at line 41 of file reduce_alt.c. Referenced by bd3_reduction(), and sd_reduction(). Function Documentation
alternative advanced adjacent neighbourhood reduction for the MWCSP
Definition at line 4991 of file reduce_alt.c. References CNSNN, EAT_LAST, FALSE, GRAPH::grad, graph_edge_del(), GRAPH::head, Is_term, GRAPH::knots, GRAPH::mark, maxprize(), GRAPH::oeat, GRAPH::outbeg, GRAPH::prize, STP_MAX_NODE_WEIGHT, GRAPH::stp_type, GRAPH::term, TRUE, and UNKNOWN. Referenced by reduceMwcs().
advanced adjacent neighbourhood reduction for the MWCSP
Definition at line 4867 of file reduce_alt.c. References CNSNN, EAT_LAST, FALSE, GRAPH::grad, graph_edge_del(), GRAPH::head, Is_term, GRAPH::knots, GRAPH::mark, GRAPH::oeat, GRAPH::outbeg, GRAPH::prize, STP_MAX_NODE_WEIGHT, GRAPH::stp_type, GRAPH::term, and TRUE. Referenced by reduceMwcs().
adjacent neighbourhood reduction for the MWCSP
Definition at line 4579 of file reduce_alt.c. References EAT_LAST, FALSE, GRAPH::grad, graph_edge_del(), GRAPH::head, GRAPH::knots, GRAPH::mark, GRAPH::oeat, GRAPH::outbeg, GRAPH::prize, STP_MAX_NODE_WEIGHT, GRAPH::stp_type, and TRUE. Referenced by reduceMwcs().
Definition at line 2817 of file reduce_alt.c. References GRAPH::ancestors, GRAPH::cost, shortest_path::dist, EAT_LAST, shortest_path::edge, Edge_anti, GRAPH::edges, EQ, FALSE, FARAWAY, GRAPH::fixedges, flipedge, FSP_MODE, GE, getSD(), GRAPH::grad, graph_edge_add(), graph_edge_del(), graph_edge_redirect(), graph_edge_reinsert(), graph_free(), graph_init(), graph_knot_add(), graph_knot_contract(), graph_path_exec(), graph_path_exit(), graph_path_init(), graph_valid(), GT, GRAPH::head, GRAPH::hoplimit, GRAPH::ieat, GRAPH::inpbeg, Is_term, KNOTFREQ, KNOTLIMIT, GRAPH::knots, LE, LT, GRAPH::mark, MST_MODE, GRAPH::oeat, GRAPH::outbeg, SCIPintListNodeAppendCopy(), SCIPintListNodeFree(), GRAPH::source, STP_DIRECTED, STP_HOP_CONS, STP_MAX_NODE_WEIGHT, STP_PRIZE_COLLECTING, STP_ROOTED_PRIZE_COLLECTING, GRAPH::stp_type, GRAPH::tail, GRAPH::term, GRAPH::terms, TRUE, UNKNOWN, and voronoi_term(). Referenced by reducePc(), and reduceStp().
Definition at line 2538 of file reduce_alt.c. References GRAPH::ancestors, GRAPH::cost, shortest_path::dist, EAT_LAST, Edge_anti, FALSE, flipedge, getRSD(), GRAPH::grad, graph_edge_add(), graph_edge_del(), graph_edge_reinsert(), graph_free(), graph_init(), graph_knot_add(), graph_path_exec(), graph_path_exit(), graph_path_init(), GRAPH::head, Is_term, GRAPH::knots, GRAPH::mark, MST_MODE, GRAPH::oeat, GRAPH::outbeg, SCIPintListNodeAppendCopy(), SCIPintListNodeFree(), STP_PRIZE_COLLECTING, STP_ROOTED_PRIZE_COLLECTING, GRAPH::stp_type, GRAPH::tail, GRAPH::term, TRUE, and UNKNOWN. Referenced by sd_red().
chain reduction (NPV_2) for the MWCSP Definition at line 5484 of file reduce_alt.c. References shortest_path::dist, shortest_path::edge, FALSE, FARAWAY, getSD(), GRAPH::grad, graph_edge_del(), GRAPH::head, Is_term, GRAPH::knots, GRAPH::mark, GRAPH::oeat, GRAPH::outbeg, GRAPH::prize, GRAPH::term, TRUE, and UNKNOWN. Referenced by reduceMwcs().
advanced connected neighbourhood subset reduction test for the MWCSP
Definition at line 4675 of file reduce_alt.c. References CNSNN, EAT_LAST, FALSE, GRAPH::grad, graph_edge_del(), GRAPH::head, Is_term, GRAPH::knots, GRAPH::mark, GRAPH::oeat, GRAPH::outbeg, GRAPH::prize, STP_MAX_NODE_WEIGHT, GRAPH::stp_type, GRAPH::term, TRUE, and UNKNOWN. Referenced by reduceMwcs().
Dijkstra's algorithm for shortest path or minimum spanning tree Definition at line 462 of file reduce_alt.c. References CONNECT, correct(), EAT_LAST, FARAWAY, GRAPH::grad, GRAPH::head, Is_term, GRAPH::knots, GRAPH::mark, nearest(), GRAPH::oeat, GRAPH::outbeg, GRAPH::term, and UNKNOWN. Referenced by sd_reduction().
insert respectively change element in heap Definition at line 420 of file reduce_alt.c. References islarger(), and UNKNOWN. Referenced by compute_sd().
Definition at line 272 of file reduce_alt.c. References shortest_path::dist. Referenced by getRSD(), sd_red(), and sdpc_reduction().
Definition at line 311 of file reduce_alt.c. References shortest_path::dist. Referenced by sd_red().
get RSD to a single edge
Definition at line 1472 of file reduce_alt.c. References GRAPH::cost, EAT_LAST, shortest_path::edge, FARAWAY, getcloseterms(), GRAPH::head, Is_term, GRAPH::knots, GRAPH::oeat, GRAPH::outbeg, GRAPH::tail, and GRAPH::term. Referenced by bdr_reduction().
get SD to a single edge Definition at line 1658 of file reduce_alt.c. References GRAPH::cost, shortest_path::dist, EAT_LAST, shortest_path::edge, FARAWAY, GRAPH::head, Is_term, GRAPH::knots, GRAPH::oeat, GRAPH::outbeg, GRAPH::prize, sdpaths(), GRAPH::term, and UNKNOWN. Referenced by bd3_reduction(), chain2Reduction(), and npvReduction().
Definition at line 359 of file reduce_alt.c.
Definition at line 350 of file reduce_alt.c. Referenced by nearest().
Definition at line 4372 of file reduce_alt.c. References CONNECT, GRAPH::cost, shortest_path::dist, EAT_LAST, shortest_path::edge, Edge_anti, GRAPH::edges, FALSE, GRAPH::grad, graph_edge_add(), graph_edge_del(), graph_free(), graph_init(), graph_knot_add(), graph_path_exec(), graph_path_exit(), graph_path_init(), graph_valid(), GRAPH::head, Is_term, GRAPH::knots, level0(), GRAPH::mark, MST_MODE, GRAPH::oeat, GRAPH::outbeg, GRAPH::path_state, GRAPH::source, GRAPH::tail, GRAPH::term, TRUE, UNKNOWN, and voronoi_terms(). Referenced by reduceStp().
Definition at line 375 of file reduce_alt.c. References islarger(), and issmaller(). Referenced by compute_sd().
non-negative path reduction for the MWCSP
Definition at line 5564 of file reduce_alt.c. References EAT_LAST, FALSE, flipedge, graph_edge_del(), GRAPH::head, GRAPH::inpbeg, GRAPH::knots, GRAPH::mark, GRAPH::oeat, GRAPH::outbeg, GRAPH::prize, STP_MAX_NODE_WEIGHT, GRAPH::stp_type, and TRUE. Referenced by reduceMwcs().
non-positive vertex reduction for the MWCSP Definition at line 5146 of file reduce_alt.c. References GRAPH::cost, shortest_path::dist, EAT_LAST, shortest_path::edge, FALSE, FARAWAY, flipedge, getSD(), GRAPH::grad, graph_edge_add(), graph_edge_del(), graph_free(), graph_init(), graph_knot_add(), graph_path_exec(), graph_path_exit(), graph_path_init(), GRAPH::head, Is_term, GRAPH::knots, GRAPH::mark, MST_MODE, GRAPH::oeat, GRAPH::outbeg, GRAPH::prize, GRAPH::term, TRUE, and UNKNOWN. Referenced by reduceMwcs().
Definition at line 3892 of file reduce_alt.c. References GRAPH::ancestors, GRAPH::cost, shortest_path::dist, EAT_LAST, FARAWAY, GRAPH::fixedges, GRAPH::grad, graph_knot_contract(), graph_knot_contractpc(), GRAPH::head, Is_term, GRAPH::knots, GRAPH::mark, GRAPH::oeat, GRAPH::outbeg, GRAPH::prize, SCIPintListNodeAppendCopy(), GRAPH::source, STP_PRIZE_COLLECTING, STP_ROOTED_PRIZE_COLLECTING, GRAPH::stp_type, GRAPH::tail, GRAPH::term, GRAPH::terms, UNKNOWN, and voronoi_dist().
Definition at line 4083 of file reduce_alt.c. References GRAPH::ancestors, GRAPH::cost, shortest_path::dist, EAT_LAST, FALSE, FARAWAY, GRAPH::fixedges, flipedge, GRAPH::grad, graph_knot_contract(), graph_knot_contractpc(), GRAPH::head, Is_term, GRAPH::knots, GRAPH::mark, GRAPH::oeat, GRAPH::outbeg, GRAPH::prize, SCIPintListNodeAppendCopy(), GRAPH::source, STP_PRIZE_COLLECTING, STP_ROOTED_PRIZE_COLLECTING, GRAPH::stp_type, GRAPH::tail, GRAPH::term, GRAPH::terms, TRUE, UNKNOWN, and voronoi_dist(). Referenced by nvsl_reduction().
SD test using only two edges Definition at line 1799 of file reduce_alt.c. References GRAPH::cost, EAT_LAST, FALSE, GRAPH::grad, graph_edge_del(), GRAPH::head, Is_term, GRAPH::knots, GRAPH::mark, GRAPH::oeat, GRAPH::outbeg, GRAPH::prize, STP_PRIZE_COLLECTING, STP_ROOTED_PRIZE_COLLECTING, GRAPH::stp_type, GRAPH::term, and TRUE.
Special distance test
Definition at line 598 of file reduce_alt.c. References bdr_reduction(), GRAPH::cost, shortest_path::dist, EAT_FREE, EAT_LAST, shortest_path::edge, Edge_anti, GRAPH::edges, FALSE, flipedge, getcloseterms(), getlecloseterms(), getnext4terms(), GRAPH::grad, graph_edge_add(), graph_edge_del(), graph_free(), graph_init(), graph_knot_add(), graph_knot_chg(), graph_path_exec(), graph_path_execX(), graph_path_exit(), graph_path_init(), GRAPH::head, GRAPH::ieat, Is_term, GRAPH::knots, GRAPH::mark, MST_MODE, GRAPH::oeat, GRAPH::outbeg, SCIPprobdataPrintGraph2(), sddeltable(), GRAPH::source, GRAPH::tail, GRAPH::term, GRAPH::terms, TRUE, and UNKNOWN. Referenced by reduceStp().
Definition at line 2227 of file reduce_alt.c. References compute_sd(), GRAPH::cost, EAT_LAST, Edge_anti, GRAPH::edges, FALSE, FARAWAY, GRAPH::grad, graph_edge_del(), graph_valid(), GT, GRAPH::head, Is_term, KNOTFREQ, KNOTLIMIT, GRAPH::knots, LT, GRAPH::mark, GRAPH::oeat, GRAPH::outbeg, GRAPH::source, STP_HOP_CONS, STP_MAX_NODE_WEIGHT, STP_PRIZE_COLLECTING, STP_ROOTED_PRIZE_COLLECTING, GRAPH::stp_type, GRAPH::tail, GRAPH::term, and TRUE. Referenced by reduceStp().
Definition at line 129 of file reduce_alt.c. References GRAPH::cost, EAT_FREE, EAT_LAST, shortest_path::edge, FALSE, flipedge, GRAPH::head, GRAPH::ieat, Is_term, GRAPH::oeat, GRAPH::outbeg, GRAPH::tail, GRAPH::term, and TRUE. Referenced by sd_red().
SD test for PC
Definition at line 1144 of file reduce_alt.c. References GRAPH::cost, shortest_path::dist, EAT_FREE, EAT_LAST, Edge_anti, GRAPH::edges, FARAWAY, getcloseterms(), getnext4terms(), getnext4tterms(), GRAPH::grad, graph_edge_add(), graph_edge_del(), graph_free(), graph_init(), graph_knot_add(), GRAPH::head, Is_term, GRAPH::knots, GRAPH::mark, GRAPH::oeat, GRAPH::outbeg, GRAPH::prize, GRAPH::source, GRAPH::tail, GRAPH::term, GRAPH::terms, TRUE, and UNKNOWN. Referenced by reducePc().
SD test using only limited dijkstra from both endpoints of an edge Definition at line 2058 of file reduce_alt.c. References GRAPH::cost, shortest_path::dist, EAT_LAST, shortest_path::edge, FARAWAY, GRAPH::grad, graph_edge_del(), GRAPH::head, Is_term, GRAPH::knots, GRAPH::mark, GRAPH::oeat, GRAPH::outbeg, GRAPH::prize, sdpaths(), STP_PRIZE_COLLECTING, STP_ROOTED_PRIZE_COLLECTING, GRAPH::stp_type, GRAPH::term, TRUE, and UNKNOWN. Referenced by reducePc(), and reduceStp().
SDC test for the SAP using a limited version of Dijkstra's algorithm from both endpoints of an arc Definition at line 1900 of file reduce_alt.c. References GRAPH::cost, shortest_path::dist, EAT_LAST, shortest_path::edge, GRAPH::edges, FARAWAY, flipedge, GRAPH::grad, graph_edge_del(), GRAPH::head, GRAPH::knots, GRAPH::mark, GRAPH::oeat, GRAPH::outbeg, sdpaths(), TRUE, and UNKNOWN. Referenced by reduceSap().
Definition at line 3656 of file reduce_alt.c. References GRAPH::ancestors, GRAPH::cost, shortest_path::dist, EAT_LAST, FALSE, FARAWAY, GRAPH::fixedges, flipedge, GRAPH::grad, graph_knot_contract(), graph_knot_contractpc(), GRAPH::head, Is_pterm, Is_term, GRAPH::knots, GRAPH::mark, GRAPH::oeat, GRAPH::outbeg, GRAPH::prize, SCIPintListNodeAppendCopy(), GRAPH::source, STP_PRIZE_COLLECTING, STP_ROOTED_PRIZE_COLLECTING, GRAPH::stp_type, GRAPH::tail, GRAPH::term, TRUE, UNKNOWN, and voronoi_terms(). Referenced by nvsl_reduction(). |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||