Scippy

SCIP

Solving Constraint Integer Programs

grphpath.c File Reference

Detailed Description

Shortest path based graph algorithms for Steiner problems.

Author
Thorsten Koch
Daniel Rehfeldt

This file encompasses various (heap-based) shortest path based algorithms inluding Dijkstra's algorithm and Voronoi diagram algorithms

The underlying heap routines can be found in Jon Bentley, Programming Pearls, Addison-Wesley 1989

The heap array is initialized with n elements (nodes), but only at most n-1 nodes can be included in the array, since element 0 is not used for storing.

Definition in file grphpath.c.

#include <stdlib.h>
#include <stdio.h>
#include <stddef.h>
#include <assert.h>
#include "portab.h"
#include "grph.h"

Go to the source code of this file.

Functions

static int nearest (int *heap, int *state, int *count, const PATH *path)
 
static int nearestX (int *heap, int *state, int *count, const SCIP_Real *pathdist)
 
static void correct (SCIP *scip, int *heap, int *state, int *count, PATH *path, int l, int k, int e, SCIP_Real cost, int mode)
 
static void correctX (SCIP *scip, int *heap, int *state, int *count, SCIP_Real *pathdist, int *pathedge, int l, int k, int e, SCIP_Real cost)
 
void heap_add (int *heap, int *state, int *count, int node, PATH *path)
 
static void resetX (SCIP *scip, SCIP_Real *pathdist, int *heap, int *state, int *count, int node)
 
static void utdist (SCIP *scip, const GRAPH *g, PATH *path, SCIP_Real ecost, int *vbase, int k, int l, int k2, int shift, int nnodes)
 
SCIP_RETCODE graph_path_init (SCIP *scip, GRAPH *g)
 
void graph_path_exit (SCIP *scip, GRAPH *g)
 
void graph_path_exec (SCIP *scip, const GRAPH *p, int mode, int start, SCIP_Real *cost, PATH *path)
 
void sdpaths (SCIP *scip, const GRAPH *g, PATH *path, SCIP_Real *cost, SCIP_Real distlimit, int *heap, int *state, int *memlbl, int *nlbl, int tail, int head, int limit)
 
void graph_path_execX (SCIP *scip, const GRAPH *g, int start, SCIP_Real *cost, SCIP_Real *pathdist, int *pathedge)
 
void graph_path_st (SCIP *scip, const GRAPH *g, SCIP_Real *cost, SCIP_Real *pathdist, int *pathedge, int start, unsigned int *randseed, char *connected)
 
SCIP_RETCODE voronoi_extend (SCIP *scip, const GRAPH *g, SCIP_Real *cost, PATH *path, VLIST **adjterms, char *termsmark, int *reachednodes, int *nreachednodes, int *nodenterms, int nneighbterms, int base, int countex)
 
SCIP_RETCODE voronoi_extend2 (SCIP *scip, const GRAPH *g, SCIP_Real *cost, PATH *path, SCIP_Real **distarr, int **basearr, int **edgearr, char *termsmark, int *reachednodes, int *nreachednodes, int *nodenterms, int nneighbterms, int base, int countex)
 
void voronoi (SCIP *scip, const GRAPH *g, SCIP_Real *cost, SCIP_Real *costrev, char *base, int *vbase, PATH *path)
 
void voronoiSteinerTreeExt (SCIP *scip, const GRAPH *g, SCIP_Real *costrev, int *vbase, char *stvertex, PATH *path)
 
void get2next (SCIP *scip, const GRAPH *g, SCIP_Real *cost, SCIP_Real *costrev, PATH *path, int *vbase, int *heap, int *state)
 
void get3next (SCIP *scip, const GRAPH *g, SCIP_Real *cost, SCIP_Real *costrev, PATH *path, int *vbase, int *heap, int *state)
 
void get4next (SCIP *scip, const GRAPH *g, SCIP_Real *cost, SCIP_Real *costrev, PATH *path, int *vbase, int *heap, int *state)
 
void getnext3terms (SCIP *scip, const GRAPH *g, SCIP_Real *cost, SCIP_Real *costrev, PATH *path3, int *vbase, int *heap, int *state)
 
void getnext4terms (SCIP *scip, const GRAPH *g, SCIP_Real *cost, SCIP_Real *costrev, PATH *path, int *vbase, int *heap, int *state)
 
void getnext4tterms (SCIP *scip, const GRAPH *g, SCIP_Real *cost, SCIP_Real *boundedges, PATH *path, int *vbase, int *heap, int *state)
 
void voronoi_terms (SCIP *scip, const GRAPH *g, SCIP_Real *cost, PATH *path, int *vbase, int *heap, int *state)
 
SCIP_RETCODE voronoi_dist (SCIP *scip, const GRAPH *g, SCIP_Real *cost, SCIP_Real *distance, int *minedgepred, int *vbase, int *minarc, int *heap, int *state, int *distnode, PATH *path)
 
SCIP_RETCODE voronoi_radius (SCIP *scip, const GRAPH *graph, GRAPH *adjgraph, PATH *path, SCIP_Real *rad, SCIP_Real *cost, SCIP_Real *costrev, int *vbase, int *heap, int *state)
 
void voronoi_slrepair (SCIP *scip, const GRAPH *g, SCIP_Real *cost, PATH *path, int *vbase, int *heap, int *state, int start, int adjnode)
 
void voronoi_repair (SCIP *scip, const GRAPH *g, SCIP_Real *cost, int *count, int *vbase, PATH *path, int *newedge, int crucnode, UF *uf)
 
void voronoi_repair_mult (SCIP *scip, const GRAPH *g, SCIP_Real *cost, int *count, int *vbase, int *boundedges, int *nboundedges, char *nodesmark, UF *uf, PATH *path)
 
void graph_path_length (const GRAPH *g, const PATH *p)
 

Function Documentation

static void correct ( SCIP *  scip,
int *  heap,
int *  state,
int *  count,
PATH path,
int  l,
int  k,
int  e,
SCIP_Real  cost,
int  mode 
)
inlinestatic
static void correctX ( SCIP *  scip,
int *  heap,
int *  state,
int *  count,
SCIP_Real *  pathdist,
int *  pathedge,
int  l,
int  k,
int  e,
SCIP_Real  cost 
)
inlinestatic

Definition at line 196 of file grphpath.c.

References UNKNOWN.

Referenced by graph_path_execX(), and graph_path_st().

void get2next ( SCIP *  scip,
const GRAPH g,
SCIP_Real *  cost,
SCIP_Real *  costrev,
PATH path,
int *  vbase,
int *  heap,
int *  state 
)

2th next terminal to all non terminal nodes

Parameters
scipSCIP data structure
ggraph data structure
costedge costs
costrevreversed edge costs
pathpath data struture (leading to first and second nearest terminal)
vbasefirst and second nearest terminal to each non terminal
heaparray representing a heap
statearray to mark the state of each node during calculation

Definition at line 1214 of file grphpath.c.

References CONNECT, correct(), shortest_path::dist, EAT_LAST, shortest_path::edge, FARAWAY, FSP_MODE, GRAPH::head, Is_term, GRAPH::knots, GRAPH::mark, nearest(), GRAPH::oeat, GRAPH::outbeg, GRAPH::source, GRAPH::term, and UNKNOWN.

Referenced by bound_reduce(), getnext3terms(), getnext4terms(), and hopbound_reduce().

void get3next ( SCIP *  scip,
const GRAPH g,
SCIP_Real *  cost,
SCIP_Real *  costrev,
PATH path,
int *  vbase,
int *  heap,
int *  state 
)
Parameters
scipSCIP data structure
ggraph data structure
costedge costs
costrevreversed edge costs
pathpath data struture (leading to first, second and third nearest terminal)
vbasefirst, second and third nearest terminal to each non terminal
heaparray representing a heap
statearray to mark the state of each node during calculation

Definition at line 1310 of file grphpath.c.

References CONNECT, correct(), shortest_path::dist, EAT_LAST, shortest_path::edge, FARAWAY, FSP_MODE, GRAPH::head, Is_term, GRAPH::knots, GRAPH::mark, nearest(), GRAPH::oeat, GRAPH::outbeg, GRAPH::source, GRAPH::term, and UNKNOWN.

Referenced by bound_reduce(), getnext3terms(), and getnext4terms().

void get4next ( SCIP *  scip,
const GRAPH g,
SCIP_Real *  cost,
SCIP_Real *  costrev,
PATH path,
int *  vbase,
int *  heap,
int *  state 
)
Parameters
scipSCIP data structure
ggraph data structure
costedge costs
costrevreversed edge costs
pathpath data struture (leading to first, second and third nearest terminal)
vbasefirst, second and third nearest terminal to each non terminal
heaparray representing a heap
statearray to mark the state of each node during calculation

Definition at line 1417 of file grphpath.c.

References CONNECT, correct(), shortest_path::dist, EAT_LAST, shortest_path::edge, FARAWAY, FSP_MODE, GRAPH::head, Is_term, GRAPH::knots, GRAPH::mark, nearest(), GRAPH::oeat, GRAPH::outbeg, GRAPH::source, GRAPH::term, and UNKNOWN.

Referenced by bound_reduce(), and getnext4terms().

void getnext3terms ( SCIP *  scip,
const GRAPH g,
SCIP_Real *  cost,
SCIP_Real *  costrev,
PATH path3,
int *  vbase,
int *  heap,
int *  state 
)

build a voronoi region in presolving, w.r.t. shortest paths, for all terminals

Parameters
scipSCIP data structure
ggraph data structure
costedge costs
costrevreversed edge costs
path3path data struture (leading to first, second and third nearest terminal)
vbasefirst, second and third nearest terminal to each non terminal
heaparray representing a heap
statearray to mark the state of each node during calculation

Definition at line 1526 of file grphpath.c.

References get2next(), get3next(), GRAPH::grad, GRAPH::knots, GRAPH::mark, STP_PRIZE_COLLECTING, STP_ROOTED_PRIZE_COLLECTING, GRAPH::stp_type, and voronoi_terms().

void getnext4terms ( SCIP *  scip,
const GRAPH g,
SCIP_Real *  cost,
SCIP_Real *  costrev,
PATH path,
int *  vbase,
int *  heap,
int *  state 
)

build a voronoi region in presolving, w.r.t. shortest paths, for all terminals

Parameters
scipSCIP data structure
ggraph data structure
costedge costs
costrevreversed edge costs
pathpath data struture (leading to first, second, third and fouth nearest terminal)
vbasefirst, second and third nearest terminal to each non terminal
heaparray representing a heap
statearray to mark the state of each node during calculation

Definition at line 1562 of file grphpath.c.

References get2next(), get3next(), get4next(), GRAPH::grad, GRAPH::knots, GRAPH::mark, STP_PRIZE_COLLECTING, STP_ROOTED_PRIZE_COLLECTING, GRAPH::stp_type, and voronoi_terms().

Referenced by da_reduce(), sd_red(), and sdpc_reduction().

void getnext4tterms ( SCIP *  scip,
const GRAPH g,
SCIP_Real *  cost,
SCIP_Real *  boundedges,
PATH path,
int *  vbase,
int *  heap,
int *  state 
)

get 4 close terminals to each terminal

Parameters
scipSCIP data structure
ggraph data structure
costedge costs
boundedgesarray to store boundary edges
pathpath data struture (leading to first, second, third and fouth nearest terminal)
vbasefirst, second and third nearest terminal to each non terminal
heaparray representing a heap
statearray to mark the state of each node during calculation

Definition at line 1603 of file grphpath.c.

References shortest_path::dist, EAT_LAST, FARAWAY, GRAPH::grad, GRAPH::head, Is_term, GRAPH::knots, GRAPH::mark, GRAPH::oeat, GRAPH::outbeg, STP_PRIZE_COLLECTING, STP_ROOTED_PRIZE_COLLECTING, GRAPH::stp_type, GRAPH::tail, GRAPH::term, UNKNOWN, and utdist().

Referenced by bound_reduce(), and sdpc_reduction().

void graph_path_exec ( SCIP *  scip,
const GRAPH p,
int  mode,
int  start,
SCIP_Real *  cost,
PATH path 
)
void graph_path_execX ( SCIP *  scip,
const GRAPH g,
int  start,
SCIP_Real *  cost,
SCIP_Real *  pathdist,
int *  pathedge 
)

Dijkstra's algorithm starting from node 'start'

Parameters
scipSCIP data structure
ggraph data structure
startstart vertex
costedgecosts
pathdistdistance array (on vertices)
pathedgepredecessor edge array (on vertices)

Definition at line 639 of file grphpath.c.

References CONNECT, correctX(), EAT_LAST, FARAWAY, GRAPH::head, Is_term, GRAPH::knots, GRAPH::mark, nearestX(), GRAPH::oeat, GRAPH::outbeg, GRAPH::path_heap, GRAPH::path_state, GRAPH::term, and UNKNOWN.

Referenced by da_reduce(), daPc_reduce(), hcrbound_reduce(), hcrcbound_reduce(), rptReduction(), SCIP_DECL_PROPEXEC(), SCIPheurComputeSteinerTree(), and sd_red().

void graph_path_exit ( SCIP *  scip,
GRAPH g 
)
SCIP_RETCODE graph_path_init ( SCIP *  scip,
GRAPH g 
)
void graph_path_length ( const GRAPH g,
const PATH p 
)
Parameters
ggraph data structure
ppath data structure

Definition at line 2359 of file grphpath.c.

References GRAPH::cost, and GRAPH::knots.

void graph_path_st ( SCIP *  scip,
const GRAPH g,
SCIP_Real *  cost,
SCIP_Real *  pathdist,
int *  pathedge,
int  start,
unsigned int *  randseed,
char *  connected 
)

Find a directed tree rooted in node 'start' and spanning all terminals

Parameters
scipSCIP data structure
ggraph data structure
costedgecosts
pathdistdistance array (on vertices)
pathedgepredecessor edge array (on vertices)
startstart vertex
randseedrandom seed
connectedarray to mark whether a vertex is part of computed Steiner tree

Definition at line 707 of file grphpath.c.

References BSP_MODE, correctX(), EAT_LAST, FALSE, FARAWAY, FSP_MODE, GRAPH::grad, graph_path_exec(), GRAPH::head, Is_term, GRAPH::knots, GRAPH::mark, nearestX(), GRAPH::oeat, GRAPH::outbeg, GRAPH::path_heap, GRAPH::path_state, resetX(), GRAPH::tail, GRAPH::term, GRAPH::terms, TRUE, and UNKNOWN.

Referenced by computeSteinerTreeDijk().

void heap_add ( int *  heap,
int *  state,
int *  count,
int  node,
PATH path 
)

Definition at line 241 of file grphpath.c.

References GT.

Referenced by computeSteinerTreeVnoi(), and SCIPheurImproveSteinerTree().

static int nearest ( int *  heap,
int *  state,
int *  count,
const PATH path 
)
inlinestatic
static int nearestX ( int *  heap,
int *  state,
int *  count,
const SCIP_Real *  pathdist 
)
inlinestatic

Definition at line 92 of file grphpath.c.

References GT, and LT.

Referenced by graph_path_execX(), and graph_path_st().

static void resetX ( SCIP *  scip,
SCIP_Real *  pathdist,
int *  heap,
int *  state,
int *  count,
int  node 
)
inlinestatic

Definition at line 272 of file grphpath.c.

Referenced by graph_path_st().

void sdpaths ( SCIP *  scip,
const GRAPH g,
PATH path,
SCIP_Real *  cost,
SCIP_Real  distlimit,
int *  heap,
int *  state,
int *  memlbl,
int *  nlbl,
int  tail,
int  head,
int  limit 
)

limited Dijkstra, stopping at terminals

Parameters
scipSCIP data structure
ggraph data structure
pathshortest paths data structure
costedge costs
distlimitdistance limit of the search
heaparray representing a heap
statearray to indicate whether a node has been scanned during SP calculation
memlblarray to save labelled nodes
nlblnumber of labelled nodes
tailtail of the edge
headhead of the edge
limitmaximum number of edges to consider during execution

Definition at line 542 of file grphpath.c.

References CONNECT, correct(), shortest_path::dist, EAT_LAST, FALSE, FSP_MODE, GRAPH::grad, GRAPH::head, Is_term, GRAPH::mark, nearest(), GRAPH::oeat, GRAPH::outbeg, STP_MAX_NODE_WEIGHT, GRAPH::stp_type, GRAPH::term, TRUE, and UNKNOWN.

Referenced by getSD(), sdsp_reduction(), and sdsp_sap_reduction().

static void utdist ( SCIP *  scip,
const GRAPH g,
PATH path,
SCIP_Real  ecost,
int *  vbase,
int  k,
int  l,
int  k2,
int  shift,
int  nnodes 
)
inlinestatic

Definition at line 306 of file grphpath.c.

References shortest_path::dist, Is_term, and GRAPH::term.

Referenced by getnext4tterms().

void voronoi ( SCIP *  scip,
const GRAPH g,
SCIP_Real *  cost,
SCIP_Real *  costrev,
char *  base,
int *  vbase,
PATH path 
)

build a voronoi region, w.r.t. shortest paths, for a given set of bases

Parameters
scipSCIP data structure
ggraph data structure
costedge costs
costrevreversed edge costs
basearray to indicate whether a vertex is a Voronoi base
vbasevoronoi base to each vertex
pathpath data struture (leading to respective Voronoi base)

Definition at line 1034 of file grphpath.c.

References CONNECT, correct(), shortest_path::dist, EAT_LAST, shortest_path::edge, FARAWAY, FSP_MODE, GRAPH::head, GRAPH::knots, nearest(), GRAPH::oeat, GRAPH::outbeg, GRAPH::path_heap, GRAPH::path_state, GRAPH::source, and UNKNOWN.

Referenced by computeSteinerTreeVnoi(), and SCIPheurImproveSteinerTree().

SCIP_RETCODE voronoi_dist ( SCIP *  scip,
const GRAPH g,
SCIP_Real *  cost,
SCIP_Real *  distance,
int *  minedgepred,
int *  vbase,
int *  minarc,
int *  heap,
int *  state,
int *  distnode,
PATH path 
)

build a voronoi region, w.r.t. shortest paths, for all terminal and the distance

Parameters
scipSCIP data structure
ggraph data structure
costedge costs
distancearray storing path from a terminal over shortest incident edge to nearest terminal
minedgepredshortest edge predecessor array
vbasearray containing Voronoi base to each node
minarcarray to mark whether an edge is one a path corresponding to 'distance'
heaparray representing a heap
statearray indicating state of each vertex during calculation of Voronoi regions
distnodearray to store terminal corresponding to distance stored in distance array
patharray containing Voronoi paths data

Definition at line 1755 of file grphpath.c.

References CONNECT, correct(), GRAPH::cost, shortest_path::dist, EAT_LAST, shortest_path::edge, Edge_anti, GRAPH::edges, FALSE, FARAWAY, FSP_MODE, GRAPH::head, Is_term, GRAPH::knots, GRAPH::mark, nearest(), GRAPH::oeat, GRAPH::outbeg, GRAPH::tail, GRAPH::term, TRUE, and UNKNOWN.

SCIP_RETCODE voronoi_extend ( SCIP *  scip,
const GRAPH g,
SCIP_Real *  cost,
PATH path,
VLIST **  adjterms,
char *  termsmark,
int *  reachednodes,
int *  nreachednodes,
int *  nodenterms,
int  nneighbterms,
int  base,
int  countex 
)

extend a voronoi region until all neighbouring terminals are spanned

Parameters
scipSCIP data structure
ggraph data structure
costedgecosts
pathshortest paths data structure
adjtermsstructure for adjacent terminal data
termsmarkarray to mark terminal
reachednodesarray to mark reached nodes
nreachednodespointer to number of reached nodes
nodentermsarray to store number of terimals to each node
nneighbtermsnumber of neighbouring terminals
basevoronoi base
countexnumber of heap elements

Definition at line 862 of file grphpath.c.

References Vnoi_List_Node::base, CONNECT, correct(), Vnoi_List_Node::dist, shortest_path::dist, EAT_LAST, Vnoi_List_Node::edge, shortest_path::edge, FALSE, FSP_MODE, GT, GRAPH::head, GRAPH::knots, GRAPH::mark, nearest(), Vnoi_List_Node::next, GRAPH::oeat, GRAPH::outbeg, GRAPH::path_heap, GRAPH::path_state, and TRUE.

SCIP_RETCODE voronoi_extend2 ( SCIP *  scip,
const GRAPH g,
SCIP_Real *  cost,
PATH path,
SCIP_Real **  distarr,
int **  basearr,
int **  edgearr,
char *  termsmark,
int *  reachednodes,
int *  nreachednodes,
int *  nodenterms,
int  nneighbterms,
int  base,
int  countex 
)

extend a voronoi region until all neighbouring terminals are spanned

Parameters
scipSCIP data structure
ggraph data structure
costedgecosts
pathshortest paths data structure
distarrarray to store distance from each node to its base
basearrarray to store the bases
edgearrarray to store the ancestor edge
termsmarkarray to mark terminal
reachednodesarray to mark reached nodes
nreachednodespointer to number of reached nodes
nodentermsarray to store number of terimals to each node
nneighbtermsnumber of neighbouring terminals
basevoronoi base
countexcount of heap elements

Definition at line 954 of file grphpath.c.

References CONNECT, correct(), shortest_path::dist, EAT_LAST, shortest_path::edge, FALSE, FSP_MODE, GT, GRAPH::head, Is_term, GRAPH::knots, GRAPH::mark, nearest(), GRAPH::oeat, GRAPH::outbeg, GRAPH::path_heap, GRAPH::path_state, GRAPH::term, and TRUE.

Referenced by computeSteinerTreeVnoi().

SCIP_RETCODE voronoi_radius ( SCIP *  scip,
const GRAPH graph,
GRAPH adjgraph,
PATH path,
SCIP_Real *  rad,
SCIP_Real *  cost,
SCIP_Real *  costrev,
int *  vbase,
int *  heap,
int *  state 
)

build voronoi regions, w.r.t. shortest paths, for all terminals and compute the radii

Parameters
scipSCIP data structure
graphgraph data structure
adjgraphgraph data structure
patharray containing Voronoi paths data
radarray storing shortest way from a terminal out of its Voronoi region
costedge costs
costrevreversed edge costs
vbasearray containing Voronoi base of each node
heaparray representing a heap
statearray to mark state of each node during calculation

Definition at line 1912 of file grphpath.c.

References CONNECT, correct(), GRAPH::cost, shortest_path::dist, EAT_LAST, shortest_path::edge, Edge_anti, FARAWAY, FSP_MODE, graph_edge_add(), graph_knot_add(), GRAPH::head, Is_term, GRAPH::knots, GRAPH::mark, nearest(), GRAPH::oeat, GRAPH::outbeg, GRAPH::prize, GRAPH::source, STP_HOP_CONS, STP_MAX_NODE_WEIGHT, STP_PRIZE_COLLECTING, STP_ROOTED_PRIZE_COLLECTING, GRAPH::stp_type, GRAPH::tail, GRAPH::term, GRAPH::terms, TRUE, and UNKNOWN.

Referenced by bound_reduce(), and hopbound_reduce().

void voronoi_repair ( SCIP *  scip,
const GRAPH g,
SCIP_Real *  cost,
int *  count,
int *  vbase,
PATH path,
int *  newedge,
int  crucnode,
UF uf 
)

repair the voronoi diagram for a given set nodes

Parameters
scipSCIP data structure
ggraph data structure
costedge costs
countpointer to number of heap elements
vbasearray containing Voronoi base of each node
pathVoronoi paths data struture
newedgethe new edge
crucnodethe current crucial node
ufunion find data structure

Definition at line 2211 of file grphpath.c.

References CONNECT, correct(), shortest_path::dist, EAT_LAST, FSP_MODE, GRAPH::head, GRAPH::knots, GRAPH::mark, nearest(), GRAPH::oeat, GRAPH::outbeg, GRAPH::path_heap, GRAPH::path_state, SCIPunionfindFind(), GRAPH::tail, and UNKNOWN.

Referenced by SCIPheurImproveSteinerTree().

void voronoi_repair_mult ( SCIP *  scip,
const GRAPH g,
SCIP_Real *  cost,
int *  count,
int *  vbase,
int *  boundedges,
int *  nboundedges,
char *  nodesmark,
UF uf,
PATH path 
)

repair the voronoi diagram for a given set nodes

Parameters
scipSCIP data structure
ggraph data structure
costedge costs
countpointer to number of heap elements
vbasearray containing Voronoi base of each node
boundedgesboundary edges
nboundedgesnumber of boundary edges
nodesmarkarray to mark temporarily discarded nodes
ufunion find data structure
pathVoronoi paths data struture

Definition at line 2289 of file grphpath.c.

References CONNECT, correct(), EAT_LAST, FSP_MODE, GRAPH::head, GRAPH::knots, GRAPH::mark, nearest(), GRAPH::oeat, GRAPH::outbeg, GRAPH::path_heap, GRAPH::path_state, and SCIPunionfindFind().

Referenced by SCIPheurImproveSteinerTree().

void voronoi_slrepair ( SCIP *  scip,
const GRAPH g,
SCIP_Real *  cost,
PATH path,
int *  vbase,
int *  heap,
int *  state,
int  start,
int  adjnode 
)

repair the voronoi diagram for SL reduction

Parameters
scipSCIP data structure
ggraph data structure
costedge costs
patharray to store
vbasearray containing Voronoi base of each node
heaparray representing a heap
statearray indicating state of each vertex during calculation of Voronoi regions
startnode to start repair from
adjnodeadjacent node

Definition at line 2136 of file grphpath.c.

References CONNECT, correct(), shortest_path::dist, EAT_LAST, shortest_path::edge, FSP_MODE, GRAPH::head, Is_term, GRAPH::knots, GRAPH::mark, nearest(), GRAPH::oeat, GRAPH::outbeg, GRAPH::term, and UNKNOWN.

void voronoi_terms ( SCIP *  scip,
const GRAPH g,
SCIP_Real *  cost,
PATH path,
int *  vbase,
int *  heap,
int *  state 
)

build a Voronoi region in presolving, w.r.t. shortest paths, for all terminals

Parameters
scipSCIP data structure
ggraph data structure
costedge costs
pathpath data struture (leading to respective Voronoi base)
vbaseVoronoi base to each vertex
heaparray representing a heap
statearray to mark the state of each node during calculation

Definition at line 1679 of file grphpath.c.

References CONNECT, correct(), shortest_path::dist, EAT_LAST, shortest_path::edge, FARAWAY, FSP_MODE, GRAPH::head, Is_term, GRAPH::knots, GRAPH::mark, nearest(), GRAPH::oeat, GRAPH::outbeg, GRAPH::term, and UNKNOWN.

Referenced by daPc_reduce(), getnext3terms(), getnext4terms(), hcrbound_reduce(), hcrcbound_reduce(), ledge_reduction(), SCIP_DECL_PROPEXEC(), and sl_reduction().

void voronoiSteinerTreeExt ( SCIP *  scip,
const GRAPH g,
SCIP_Real *  costrev,
int *  vbase,
char *  stvertex,
PATH path 
)

Voronoi Steiner tree extension for RPC, PC and MW

Parameters
scipSCIP data structure
ggraph data structure
costrevreversed edge costs
vbasevoronoi base to each vertex
stvertexarray to indicate whether a vertex is a Voronoi base
pathpath data struture (leading to respective Voronoi base)

Definition at line 1121 of file grphpath.c.

References CONNECT, correct(), shortest_path::dist, EAT_LAST, shortest_path::edge, FARAWAY, FSP_MODE, GRAPH::head, Is_pterm, Is_term, GRAPH::knots, nearest(), GRAPH::oeat, GRAPH::outbeg, GRAPH::path_heap, GRAPH::path_state, GRAPH::prize, GRAPH::term, and UNKNOWN.

Referenced by extendSteinerTreePcMw().