Scippy

SCIP

Solving Constraint Integer Programs

grph.h
Go to the documentation of this file.
1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2 /* */
3 /* This file is part of the program and library */
4 /* SCIP --- Solving Constraint Integer Programs */
5 /* */
6 /* Copyright (C) 2002-2015 Konrad-Zuse-Zentrum */
7 /* fuer Informationstechnik Berlin */
8 /* */
9 /* SCIP is distributed under the terms of the ZIB Academic License. */
10 /* */
11 /* You should have received a copy of the ZIB Academic License */
12 /* along with SCIP; see the file COPYING. If not email to scip@zib.de. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file grph.h
17  * @brief includes various files containing graph methods used for Steiner problems
18  * @author Gerald Gamrath
19  * @author Thorsten Koch
20  * @author Daniel Rehfeldt
21  *
22  *
23  */
24 
25 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
26 
27 #ifndef _GRAPH_H_
28 #define _GRAPH_H_
29 
30 #define EAT_FREE -1
31 #define EAT_LAST -2
32 #define EAT_HIDE -3
33 
34 #define GRAPH_HAS_COORDINATES 1
35 #define GRAPH_IS_GRIDGRAPH 2
36 #define GRAPH_IS_DIRECTED 4
37 
38 #define STP_UNDIRECTED 0
39 #define STP_DIRECTED 1
40 #define STP_PRIZE_COLLECTING 2
41 #define STP_ROOTED_PRIZE_COLLECTING 3
42 #define STP_NODE_WEIGHTS 4
43 #define STP_DEG_CONS 5
44 #define STP_REVENUES_BUDGET_HOPCONS 6
45 #define STP_GRID 7
46 #define STP_OBSTACLES_GRID 8
47 #define STP_MAX_NODE_WEIGHT 9
48 #define STP_HOP_CONS 10
49 #define GSTP 11
50 #define PRIZE 12
51 
52 #include "scip/scip.h"
53 #include "misc_stp.h"
54 
55 typedef struct
56 {
57  /* Nodes */
58  int norgmodelknots; /**< Number of nodes in the original model */
59  int flags; /**< To store attributes */
60  int ksize; /**< Count of allocated knot slots */
61  int knots; /**< Count of nodes in graph */
62  int orgknots; /**< Count of nodes prior to graph reduction */
63  int terms; /**< Count of terminals */
64  int layers; /**< Count of different networks */
65  int* locals; /**< Array [0..layers-1] of count of terminals */
66  /**< in network [i] */
67  int* source; /**< Array [0..layers-1] of knot number of the */
68  /**< root of network [i], -1 if unknown */
69  int* term; /**< Array [0..nodes-1] of networknumber for */
70  /**< knot [i], -1 if [i] is never a terminal */
71  int* mark; /**< Array [0..nodes-1], normaly TRUE or FALSE */
72  /**< to mark nodes for inclusion in the shortest */
73  /**< path / minimum spanning tree routine */
74  int* grad; /**< Array [0..nodes-1] with degree of knot [i] */
75  int* inpbeg; /**< Array [0..nodes-1] with starting slot index */
76  /**< for the ieat array, -1 if not used */
77  int* outbeg; /**< Array [0..nodes-1] with starting slot index */
78  /**< for the oeat array, -1 if not used */
79  int* maxdeg; /**< Array [0..nodes-1] containing the maximal degrees
80  of all nodes (only used for HCDSTPs) */
81  /* Edges */
82  IDX* fixedges; /**< list of fixed edges*/
83  IDX** ancestors; /**< list of ancestor edges to each edge (to keep track of reductions) */
84  IDX** pcancestors; /**< list of ancestor edges to each node (to keep track of PC/MW reductions ) */
85  int norgmodeledges; /**< Count of eges prior to graph transformation */
86  int hoplimit; /**< maximal number of edges allowed for a solution to be feasible
87  (only used for HCDSTPs) */
88  int esize; /**< Count of allocated edge slots */
89  int edges; /**< Count of edges in the graph */
90  int orgedges;
91  SCIP_Real* cost; /**< Array [0..edges-1] of positiv edge costs */
92  SCIP_Real* prize; /**< Array [0..edges-1] of positiv node costs */
93  int* tail; /**< Array [0..edges-1] of node-number of tail of edge [i] */
94  int* head; /**< Array [0..edges-1] of node-number of head of edge [i] */
95  int* orgtail; /**< Array [0..edges-1] of node-number of tail of edge [i] prior to reduction */
96  int* orghead; /**< Array [0..edges-1] of node-number of head of edge [i] prior to reduction */
97 
98  /* Nodes/Edges */
99  int* ieat; /**< Array [0..edges-1], incoming edge allocation table */
100  int* oeat; /**< Array [0..edges-1], outgoing edge allocation table */
101 
102  /* Data for min cut computation */
103  int* mincut_dist; /**< dist[i] : Distance-label of Knot i */
104  int* mincut_head; /**< head[i] : Head of Active Queue with Label i */
105  int* mincut_numb; /**< numb[i] : numb[i] Knots with Label i */
109  int* mincut_e; /**< e[i] : Excess of Knot i */
110  int* mincut_x; /**< x[k] : Actual Flow on Arc k */
111  int* mincut_r; /**< r[k] : Capacity of Arc k */
112 
113  /* data for math and mst computation */
114  int* path_heap;
116 
117  /* Data for grid problems */
118  int grid_dim;
121 
122  /* Steiner problem variant */
123  int stp_type;
124 
125 } GRAPH;
126 
127 typedef struct presolve_info
128 {
129  double fixed;
130  double upper;
131  double lower;
132  int time;
133 } PRESOL;
134 
135 /* ONE segment of a path
136  */
137 typedef struct shortest_path
138 {
139  double dist; /* Distance to the end of the path */
140  signed int edge; /* Incoming edge to go along */
141 } PATH;
142 
143 #define flipedge(edge) (((edge % 2) == 0) ? edge + 1 : edge - 1)
144 
145 #define PATH_NIL ((PATH*)0)
146 
147 #define CONNECT 0
148 #define UNKNOWN (-1)
149 #define FARAWAY 1e15
150 #define BLOCKED 1e10
151 
152 #define MST_MODE 0
153 #define FSP_MODE 1
154 #define BSP_MODE 2
155 
156 #define NO_CHANGE -10
157 
158 #define Is_term(a) ((a) >= 0)
159 #define Is_pterm(a) ((a) == -2)
160 #define Is_gterm(a) ((a) == -2 || (a) >= 0 )
161 #define Edge_anti(a) ((((a) % 2) > 0) ? (a) - 1 : (a) + 1)
162 
163 #define STP_MAGIC 0x33d32945
164 #define VERSION_MAJOR 1
165 #define VERSION_MINOR 0
166 
167 typedef enum { FF_BEA, FF_STP, FF_PRB, FF_GRD } FILETYPE;
168 
169 /* grphbase.c
170  */
171 extern void graph_flags(GRAPH*, int);
172 extern void graph_show(const GRAPH*);
173 extern void graph_ident(const GRAPH*);
174 extern void graph_knot_add(GRAPH*, int);
175 extern void graph_knot_chg(GRAPH*, int, int);
176 extern void graph_knot_contract_dir(GRAPH*, int, int);
177 extern void graph_edge_add(SCIP*, GRAPH*, int, int, double, double);
178 extern void graph_edge_del(SCIP*, GRAPH*, int, SCIP_Bool);
179 extern void graph_edge_hide(GRAPH*, int);
180 extern void graph_uncover(GRAPH*);
181 extern void prize_subtract(SCIP*, GRAPH*, SCIP_Real, int);
182 extern void graph_trail(const GRAPH*, int);
183 extern void graph_free(SCIP*, GRAPH*, SCIP_Bool);
184 extern SCIP_RETCODE graph_init(SCIP*, GRAPH**, int, int, int, int);
185 extern SCIP_RETCODE pcgraphorg(SCIP*, GRAPH*);
186 extern SCIP_RETCODE pcgraphtrans(SCIP*, GRAPH*);
187 extern SCIP_RETCODE graph_init_history(SCIP*, GRAPH*);
188 extern SCIP_RETCODE graph_resize(SCIP*, GRAPH*, int, int, int);
189 extern SCIP_RETCODE graph_knot_contract(SCIP*, GRAPH*, int, int);
190 extern SCIP_RETCODE graph_knot_contractpc(SCIP*, GRAPH*, int, int, int);
191 extern SCIP_RETCODE graph_PcToSap(SCIP*, GRAPH*);
192 extern SCIP_RETCODE graph_PcSapCopy(SCIP*, GRAPH*, GRAPH**, SCIP_Real*);
193 extern SCIP_RETCODE graph_edge_reinsert(SCIP*, GRAPH*, int, int, int, SCIP_Real, IDX*, IDX*, IDX*, IDX*);
194 extern SCIP_RETCODE graph_MwcsToSap(SCIP*, GRAPH*, SCIP_Real*);
195 extern SCIP_RETCODE graph_prize_transform(SCIP*, GRAPH*);
196 extern SCIP_RETCODE graph_rootprize_transform(SCIP*, GRAPH*);
197 extern SCIP_RETCODE graph_maxweight_transform(SCIP*, GRAPH*, SCIP_Real*);
198 extern SCIP_RETCODE graph_grid_create(SCIP*, GRAPH**, int**, int, int, int);
199 extern SCIP_RETCODE graph_obstgrid_create(SCIP*, GRAPH**, int**, int**, int, int, int, int);
200 extern SCIP_RETCODE graph_grid_coordinates(SCIP*, int**, int**, int*, int, int);
201 extern SCIP_RETCODE graph_copy(SCIP*, GRAPH*, GRAPH**);
202 extern SCIP_RETCODE graph_pack(SCIP*, GRAPH*, GRAPH**, SCIP_Bool);
203 extern int graph_edge_redirect(SCIP*, GRAPH*, int, int, int, SCIP_Real);
204 extern int graph_valid(const GRAPH*);
205 extern char graph_valid2(SCIP*, const GRAPH*, SCIP_Real*);
206 extern SCIP_Bool graph_sol_valid(SCIP*, const GRAPH*, int*);
207 
208 /* grphpath.c
209  */
210 extern void graph_path_exit(SCIP*, GRAPH*);
211 extern void graph_path_exec(SCIP*, const GRAPH*, int, int, SCIP_Real*, PATH*);
212 extern void graph_path_execX(SCIP*, const GRAPH*, int, SCIP_Real*, SCIP_Real*, int*);
213 extern void graph_path_st(SCIP*, const GRAPH*, SCIP_Real*, SCIP_Real*, int*, int, unsigned int*, char*);
214 extern void voronoi(SCIP* scip, const GRAPH*, SCIP_Real*, SCIP_Real*, char*, int*, PATH*);
215 extern void get2next(SCIP*, const GRAPH*, SCIP_Real*, SCIP_Real*, PATH*, int*, int*, int*);
216 extern void get3next(SCIP*, const GRAPH*, SCIP_Real*, SCIP_Real*, PATH*, int*, int*, int*);
217 extern void get4next(SCIP*, const GRAPH*, SCIP_Real*, SCIP_Real*, PATH*, int*, int*, int*);
218 extern void getnext3terms(SCIP*, const GRAPH*, SCIP_Real*, SCIP_Real*, PATH*, int*, int*, int*);
219 extern void getnext4terms(SCIP*, const GRAPH*, SCIP_Real*, SCIP_Real*, PATH*, int*, int*, int*);
220 extern void getnext4tterms(SCIP*, const GRAPH*, SCIP_Real*, SCIP_Real*, PATH*, int*, int*, int*);
221 extern void voronoi_terms(SCIP*, const GRAPH*, SCIP_Real*, PATH*, int*, int*, int*);
222 extern void voronoi_inout(const GRAPH*);
223 extern void voronoi_term(const GRAPH*, double*, double*, double*, PATH*, int*, int*, int*, int*, int);
224 extern void voronoi_hop(const GRAPH*, double*, double*, double*, PATH*, int*, int*, int*, int*, int*);
225 extern void heap_add(int*, int*, int*, int, PATH*);
226 extern void voronoi_repair(SCIP*, const GRAPH*, SCIP_Real*, int*, int*, PATH*, int*, int, UF*);
227 extern void voronoi_repair_mult(SCIP*, const GRAPH*, SCIP_Real*, int*, int*, int*, int*, char*, UF*, PATH*);
228 extern void voronoi_slrepair(SCIP*, const GRAPH*, SCIP_Real*, PATH*, int*, int*, int*, int, int);
229 extern void voronoiSteinerTreeExt(SCIP*, const GRAPH*, SCIP_Real*, int*, char*, PATH*);
230 extern void sdpaths(SCIP*, const GRAPH*, PATH*, SCIP_Real*, SCIP_Real, int*, int*, int*, int*, int, int, int);
231 extern void graph_path_length(const GRAPH*, const PATH*);
232 extern SCIP_RETCODE voronoi_extend(SCIP*, const GRAPH*, SCIP_Real*, PATH*, VLIST**, char*, int*, int*, int*, int, int, int);
233 extern SCIP_RETCODE voronoi_extend2(SCIP*, const GRAPH*, SCIP_Real*, PATH*, SCIP_Real**, int**, int**, char*, int*, int*, int*, int, int, int);
234 extern SCIP_RETCODE graph_path_init(SCIP*, GRAPH*);
235 extern SCIP_RETCODE voronoi_dist(SCIP*, const GRAPH*, SCIP_Real*, double*, int*, int*, int*, int*, int*, int*, PATH*);
236 extern SCIP_RETCODE voronoi_radius(SCIP* scip, const GRAPH*, GRAPH*, PATH*, SCIP_Real*, SCIP_Real*, SCIP_Real*, int*, int*, int*);
237 
238 /* grphmcut.c
239  */
240 extern void graph_mincut_exit(SCIP*, GRAPH*);
241 extern void graph_mincut_exec(GRAPH*, int, int, const int*, int*, int);
242 extern SCIP_RETCODE graph_mincut_init(SCIP*, GRAPH*);
243 
244 /* grphload.c
245  */
246 extern SCIP_RETCODE graph_load(SCIP*, GRAPH**, const char*, PRESOL*);
247 
248 /* grphsave.c
249  */
250 extern void graph_save(const GRAPH*, const char*, FILETYPE);
251 extern void SCIPwriteStp(SCIP*, const GRAPH*, FILE*, SCIP_Real);
252 
253 /* grph2fig.c
254  */
255 extern void graph_writefig(const GRAPH*, const char*, const double *, int);
256 extern void graph_bfscoord(GRAPH* g);
257 extern void graph_boxcoord(GRAPH* g);
258 
259 /* reduce.c
260  */
261 extern void level0(SCIP*, GRAPH*);
262 extern SCIP_RETCODE reduce(SCIP*, GRAPH**, SCIP_Real*, int, int);
263 
264 /* reduce_alt.c
265  */
266 extern SCIP_RETCODE sd_reduction(SCIP*, GRAPH*, SCIP_Real*, SCIP_Real*, SCIP_Real*, SCIP_Real*, SCIP_Real*, int*, int*, int*, int*, int, unsigned int*);
267 extern SCIP_RETCODE sdsp_reduction(SCIP*, GRAPH*, PATH*, PATH*, int*, int*, int*, int*, int*, int*, int);
268 extern SCIP_RETCODE sdsp_sap_reduction(SCIP*, GRAPH*, PATH*, PATH*, int*, int*, int*, int*, int*, int*, int);
269 extern SCIP_RETCODE sd_red(SCIP*, GRAPH*, PATH*, SCIP_Real*, SCIP_Real*, int*, int*, int*, int*, int*, int*, int*);
270 extern SCIP_RETCODE sdpc_reduction(SCIP*, GRAPH*, PATH*, SCIP_Real*, int*, int*, int*, int*, int*, int*);
271 extern SCIP_RETCODE sd2_reduction(SCIP*, GRAPH*, SCIP_Real*, int*, int*);
272 extern SCIP_RETCODE getSD(SCIP*, GRAPH*, PATH*, PATH*, SCIP_Real*, SCIP_Real, int*, int*, int*, int*, int*, int, int, int, SCIP_Bool, SCIP_Bool);
273 extern SCIP_RETCODE bd3_reduction(SCIP*, GRAPH*, PATH*, PATH*, int*, int*, int*, int*, int*, int*, int);
274 extern SCIP_RETCODE bdr_reduction(SCIP*, GRAPH*, GRAPH*, PATH*, PATH*, SCIP_Real*, SCIP_Real*, SCIP_Real*, int*, int*, int*, int*, int*);
275 extern SCIP_RETCODE nv_reduction(SCIP*, GRAPH*, PATH*, double*, int*, int*, int*, int*, int*);
276 extern SCIP_RETCODE nv_reductionAdv(SCIP*, GRAPH*, PATH*, SCIP_Real*, double*, int*, int*, int*, int*, int*, int*, int*);
277 extern SCIP_RETCODE sl_reduction(SCIP*, GRAPH*, PATH*, double*, int*, int*, int*, int*, char*, int*);
278 extern SCIP_RETCODE ledge_reduction(SCIP*, GRAPH*, PATH*, int*, int*, int*, int*);
279 extern SCIP_RETCODE ansReduction(SCIP*, GRAPH*, SCIP_Real*, int*, int*);
280 extern SCIP_RETCODE ansadvReduction(SCIP*, GRAPH*, SCIP_Real*, int*, int*);
281 extern SCIP_RETCODE ansadv2Reduction(SCIP*, GRAPH*, SCIP_Real*, int*, int*);
282 extern SCIP_RETCODE cnsAdvReduction(SCIP*, GRAPH*, int*, int*);
283 extern SCIP_RETCODE nnpReduction(SCIP*, GRAPH*, SCIP_Real*, int*, int*, int*, int*, int, char*);
284 extern SCIP_RETCODE npvReduction(SCIP*, GRAPH*, PATH*, PATH*, int*, int*, int*, int*, int*, int*, int);
285 extern SCIP_RETCODE chain2Reduction(SCIP*, GRAPH*, PATH*, PATH*, int*, int*, int*, int*, int*, int*, int);
286 
287 /* reduce_bnd.c
288  */
289 extern SCIP_RETCODE da_reduce(SCIP*, GRAPH*, PATH*, GNODE**, SCIP_Real*, SCIP_Real*, SCIP_Real*, int*, int*, int*, int*, int*, char*, int*);
290 extern SCIP_RETCODE daPc_reduce(SCIP*, GRAPH*, PATH*, GNODE**, SCIP_Real*, SCIP_Real*, SCIP_Real*, int*, int*, int*, int*, char*, int*);
291 extern SCIP_RETCODE bound_reduce(SCIP*, GRAPH*, PATH*, SCIP_Real*, SCIP_Real*, SCIP_Real*, SCIP_Real*, SCIP_Real*, SCIP_Real*, int*, int*, int*, int*);
292 extern SCIP_RETCODE hopbound_reduce(SCIP*, GRAPH*, PATH*, SCIP_Real*, SCIP_Real*, SCIP_Real*, int*, int*, int*, int*);
293 extern SCIP_RETCODE hcrbound_reduce(SCIP*, GRAPH*, PATH*, SCIP_Real*, SCIP_Real*, SCIP_Real*, int*, int*, int*, int*, int*);
294 extern SCIP_RETCODE hcrcbound_reduce(SCIP*, GRAPH*, PATH*, SCIP_Real*, SCIP_Real*, SCIP_Real*, SCIP_Real, int*, int*, int*, int*, int*, SCIP_Bool);
295 
296 /* reduce_simple.c
297  */
298 extern SCIP_RETCODE degree_test(SCIP*, GRAPH*, SCIP_Real*, int*);
299 extern SCIP_RETCODE degree_test_hc(SCIP*, GRAPH*, SCIP_Real*, int*);
300 extern SCIP_RETCODE degree_test_mw(SCIP*, GRAPH*, SCIP_Real*, int*);
301 extern SCIP_RETCODE degree_test_pc(SCIP*, GRAPH*, SCIP_Real*, int*);
302 extern SCIP_RETCODE degree_test_sap(SCIP*, GRAPH*, SCIP_Real*, int*);
303 extern SCIP_RETCODE rptReduction(SCIP*, GRAPH*, SCIP_Real*, int*);
304 extern int deleteterm(SCIP*, GRAPH*, int);
305 
306 /* validate.c
307  */
308 extern SCIP_RETCODE SCIPvalidateStpSol(SCIP*, const GRAPH*, const double*, SCIP_Bool*);
309 
310 #endif /* !_GRAPH_H_ */
SCIP_RETCODE graph_path_init(SCIP *, GRAPH *)
Definition: grphpath.c:407
void get3next(SCIP *, const GRAPH *, SCIP_Real *, SCIP_Real *, PATH *, int *, int *, int *)
Definition: grphpath.c:1310
void SCIPwriteStp(SCIP *, const GRAPH *, FILE *, SCIP_Real)
Definition: grphsave.c:38
void graph_path_length(const GRAPH *, const PATH *)
Definition: grphpath.c:2359
int graph_valid(const GRAPH *)
Definition: grphbase.c:2532
struct presolve_info PRESOL
SCIP_RETCODE hcrcbound_reduce(SCIP *, GRAPH *, PATH *, SCIP_Real *, SCIP_Real *, SCIP_Real *, SCIP_Real, int *, int *, int *, int *, int *, SCIP_Bool)
Definition: reduce_bnd.c:1878
SCIP_RETCODE sd2_reduction(SCIP *, GRAPH *, SCIP_Real *, int *, int *)
Definition: reduce_alt.c:1799
int * orgtail
Definition: grph.h:95
Definition: grph.h:55
Definition: grph.h:167
void graph_edge_hide(GRAPH *, int)
Definition: grphbase.c:2015
void graph_writefig(const GRAPH *, const char *, const double *, int)
signed int edge
Definition: grph.h:140
SCIP_RETCODE nnpReduction(SCIP *, GRAPH *, SCIP_Real *, int *, int *, int *, int *, int, char *)
Definition: reduce_alt.c:5564
void getnext4tterms(SCIP *, const GRAPH *, SCIP_Real *, SCIP_Real *, PATH *, int *, int *, int *)
Definition: grphpath.c:1603
int * path_heap
Definition: grph.h:114
void voronoi_hop(const GRAPH *, double *, double *, double *, PATH *, int *, int *, int *, int *, int *)
SCIP_RETCODE voronoi_extend(SCIP *, const GRAPH *, SCIP_Real *, PATH *, VLIST **, char *, int *, int *, int *, int, int, int)
Definition: grphpath.c:862
Definition: grph.h:167
int terms
Definition: grph.h:63
SCIP_RETCODE SCIPvalidateStpSol(SCIP *, const GRAPH *, const double *, SCIP_Bool *)
Definition: validate.c:206
int * mincut_r
Definition: grph.h:111
SCIP_RETCODE graph_PcSapCopy(SCIP *, GRAPH *, GRAPH **, SCIP_Real *)
Definition: grphbase.c:792
SCIP_RETCODE sdpc_reduction(SCIP *, GRAPH *, PATH *, SCIP_Real *, int *, int *, int *, int *, int *, int *)
Definition: reduce_alt.c:1144
SCIP_RETCODE graph_init_history(SCIP *, GRAPH *)
Definition: grphbase.c:128
void get4next(SCIP *, const GRAPH *, SCIP_Real *, SCIP_Real *, PATH *, int *, int *, int *)
Definition: grphpath.c:1417
SCIP_RETCODE graph_obstgrid_create(SCIP *, GRAPH **, int **, int **, int, int, int, int)
Definition: grphbase.c:374
int norgmodeledges
Definition: grph.h:85
SCIP_RETCODE graph_edge_reinsert(SCIP *, GRAPH *, int, int, int, SCIP_Real, IDX *, IDX *, IDX *, IDX *)
Definition: grphbase.c:1846
double upper
Definition: grph.h:130
SCIP_RETCODE graph_rootprize_transform(SCIP *, GRAPH *)
Definition: grphbase.c:955
SCIP_RETCODE pcgraphtrans(SCIP *, GRAPH *)
Definition: grphbase.c:2142
FILETYPE
Definition: grph.h:167
void sdpaths(SCIP *, const GRAPH *, PATH *, SCIP_Real *, SCIP_Real, int *, int *, int *, int *, int, int, int)
Definition: grphpath.c:542
Definition: grph.h:167
int * path_state
Definition: grph.h:115
SCIP_RETCODE graph_mincut_init(SCIP *, GRAPH *)
Definition: grphmcut.c:80
struct shortest_path PATH
void voronoi_repair(SCIP *, const GRAPH *, SCIP_Real *, int *, int *, PATH *, int *, int, UF *)
Definition: grphpath.c:2211
SCIP_RETCODE graph_knot_contract(SCIP *, GRAPH *, int, int)
Definition: grphbase.c:1415
void graph_path_exit(SCIP *, GRAPH *)
Definition: grphpath.c:429
char graph_valid2(SCIP *, const GRAPH *, SCIP_Real *)
Definition: grphbase.c:2706
SCIP_RETCODE npvReduction(SCIP *, GRAPH *, PATH *, PATH *, int *, int *, int *, int *, int *, int *, int)
Definition: reduce_alt.c:5146
int flags
Definition: grph.h:59
int * oeat
Definition: grph.h:100
void get2next(SCIP *, const GRAPH *, SCIP_Real *, SCIP_Real *, PATH *, int *, int *, int *)
Definition: grphpath.c:1214
SCIP_RETCODE graph_resize(SCIP *, GRAPH *, int, int, int)
Definition: grphbase.c:186
void graph_free(SCIP *, GRAPH *, SCIP_Bool)
Definition: grphbase.c:1137
void graph_boxcoord(GRAPH *g)
SCIP_RETCODE degree_test(SCIP *, GRAPH *, SCIP_Real *, int *)
int graph_edge_redirect(SCIP *, GRAPH *, int, int, int, SCIP_Real)
Definition: grphbase.c:1783
void graph_knot_chg(GRAPH *, int, int)
Definition: grphbase.c:1386
SCIP_RETCODE getSD(SCIP *, GRAPH *, PATH *, PATH *, SCIP_Real *, SCIP_Real, int *, int *, int *, int *, int *, int, int, int, SCIP_Bool, SCIP_Bool)
Definition: reduce_alt.c:1658
int * head
Definition: grph.h:94
IDX * fixedges
Definition: grph.h:82
int deleteterm(SCIP *, GRAPH *, int)
void voronoi(SCIP *scip, const GRAPH *, SCIP_Real *, SCIP_Real *, char *, int *, PATH *)
Definition: grphpath.c:1034
SCIP_RETCODE graph_pack(SCIP *, GRAPH *, GRAPH **, SCIP_Bool)
Definition: grphbase.c:2342
SCIP_RETCODE pcgraphorg(SCIP *, GRAPH *)
Definition: grphbase.c:2104
SCIP_RETCODE ansadvReduction(SCIP *, GRAPH *, SCIP_Real *, int *, int *)
Definition: reduce_alt.c:4867
int * mark
Definition: grph.h:71
void graph_path_execX(SCIP *, const GRAPH *, int, SCIP_Real *, SCIP_Real *, int *)
Definition: grphpath.c:639
SCIP_RETCODE voronoi_extend2(SCIP *, const GRAPH *, SCIP_Real *, PATH *, SCIP_Real **, int **, int **, char *, int *, int *, int *, int, int, int)
Definition: grphpath.c:954
SCIP_RETCODE hopbound_reduce(SCIP *, GRAPH *, PATH *, SCIP_Real *, SCIP_Real *, SCIP_Real *, int *, int *, int *, int *)
Definition: reduce_bnd.c:1552
void graph_knot_contract_dir(GRAPH *, int, int)
miscellaneous methods used for solving Steiner problems
int * mincut_prev
Definition: grph.h:106
int stp_type
Definition: grph.h:123
IDX ** ancestors
Definition: grph.h:83
int orgedges
Definition: grph.h:90
void heap_add(int *, int *, int *, int, PATH *)
Definition: grphpath.c:241
int * outbeg
Definition: grph.h:77
int * locals
Definition: grph.h:65
SCIP_Real * prize
Definition: grph.h:92
void graph_bfscoord(GRAPH *g)
SCIP_RETCODE sd_red(SCIP *, GRAPH *, PATH *, SCIP_Real *, SCIP_Real *, int *, int *, int *, int *, int *, int *, int *)
Definition: reduce_alt.c:598
SCIP_RETCODE voronoi_radius(SCIP *scip, const GRAPH *, GRAPH *, PATH *, SCIP_Real *, SCIP_Real *, SCIP_Real *, int *, int *, int *)
Definition: grphpath.c:1912
SCIP_RETCODE sdsp_sap_reduction(SCIP *, GRAPH *, PATH *, PATH *, int *, int *, int *, int *, int *, int *, int)
Definition: reduce_alt.c:1900
int * maxdeg
Definition: grph.h:79
int * tail
Definition: grph.h:93
SCIP_RETCODE reduce(SCIP *, GRAPH **, SCIP_Real *, int, int)
Definition: reduce.c:1886
SCIP_RETCODE graph_grid_coordinates(SCIP *, int **, int **, int *, int, int)
Definition: grphbase.c:691
SCIP_RETCODE graph_MwcsToSap(SCIP *, GRAPH *, SCIP_Real *)
Definition: grphbase.c:1079
int * term
Definition: grph.h:69
int knots
Definition: grph.h:61
IDX ** pcancestors
Definition: grph.h:84
SCIP_RETCODE rptReduction(SCIP *, GRAPH *, SCIP_Real *, int *)
void voronoi_terms(SCIP *, const GRAPH *, SCIP_Real *, PATH *, int *, int *, int *)
Definition: grphpath.c:1679
int orgknots
Definition: grph.h:62
void getnext4terms(SCIP *, const GRAPH *, SCIP_Real *, SCIP_Real *, PATH *, int *, int *, int *)
Definition: grphpath.c:1562
int * inpbeg
Definition: grph.h:75
int * mincut_temp
Definition: grph.h:108
void voronoi_term(const GRAPH *, double *, double *, double *, PATH *, int *, int *, int *, int *, int)
SCIP_RETCODE graph_PcToSap(SCIP *, GRAPH *)
Definition: grphbase.c:880
SCIP_Bool graph_sol_valid(SCIP *, const GRAPH *, int *)
Definition: grphbase.c:2639
SCIP_RETCODE degree_test_mw(SCIP *, GRAPH *, SCIP_Real *, int *)
SCIP_RETCODE sd_reduction(SCIP *, GRAPH *, SCIP_Real *, SCIP_Real *, SCIP_Real *, SCIP_Real *, SCIP_Real *, int *, int *, int *, int *, int, unsigned int *)
Definition: reduce_alt.c:2227
SCIP_RETCODE degree_test_pc(SCIP *, GRAPH *, SCIP_Real *, int *)
void graph_save(const GRAPH *, const char *, FILETYPE)
Definition: grphsave.c:309
int time
Definition: grph.h:132
void graph_show(const GRAPH *)
Definition: grphbase.c:1318
void graph_uncover(GRAPH *)
Definition: grphbase.c:2058
void graph_path_st(SCIP *, const GRAPH *, SCIP_Real *, SCIP_Real *, int *, int, unsigned int *, char *)
Definition: grphpath.c:707
void graph_mincut_exit(SCIP *, GRAPH *)
Definition: grphmcut.c:115
SCIP_RETCODE chain2Reduction(SCIP *, GRAPH *, PATH *, PATH *, int *, int *, int *, int *, int *, int *, int)
Definition: reduce_alt.c:5484
int * mincut_e
Definition: grph.h:109
SCIP_RETCODE graph_init(SCIP *, GRAPH **, int, int, int, int)
Definition: grphbase.c:44
void graph_edge_del(SCIP *, GRAPH *, int, SCIP_Bool)
Definition: grphbase.c:1965
SCIP_RETCODE graph_maxweight_transform(SCIP *, GRAPH *, SCIP_Real *)
Definition: grphbase.c:1020
void getnext3terms(SCIP *, const GRAPH *, SCIP_Real *, SCIP_Real *, PATH *, int *, int *, int *)
Definition: grphpath.c:1526
SCIP_RETCODE degree_test_hc(SCIP *, GRAPH *, SCIP_Real *, int *)
void level0(SCIP *, GRAPH *)
Definition: reduce.c:791
SCIP_RETCODE ledge_reduction(SCIP *, GRAPH *, PATH *, int *, int *, int *, int *)
Definition: reduce_alt.c:4372
void graph_flags(GRAPH *, int)
Definition: grphbase.c:1307
int grid_dim
Definition: grph.h:118
SCIP_RETCODE daPc_reduce(SCIP *, GRAPH *, PATH *, GNODE **, SCIP_Real *, SCIP_Real *, SCIP_Real *, int *, int *, int *, int *, char *, int *)
Definition: reduce_bnd.c:577
int ** grid_coordinates
Definition: grph.h:120
SCIP_RETCODE graph_prize_transform(SCIP *, GRAPH *)
Definition: grphbase.c:726
int layers
Definition: grph.h:64
void voronoi_slrepair(SCIP *, const GRAPH *, SCIP_Real *, PATH *, int *, int *, int *, int, int)
Definition: grphpath.c:2136
SCIP_RETCODE bd3_reduction(SCIP *, GRAPH *, PATH *, PATH *, int *, int *, int *, int *, int *, int *, int)
Definition: reduce_alt.c:2817
int * grad
Definition: grph.h:74
void voronoi_repair_mult(SCIP *, const GRAPH *, SCIP_Real *, int *, int *, int *, int *, char *, UF *, PATH *)
Definition: grphpath.c:2289
SCIP_RETCODE bdr_reduction(SCIP *, GRAPH *, GRAPH *, PATH *, PATH *, SCIP_Real *, SCIP_Real *, SCIP_Real *, int *, int *, int *, int *, int *)
Definition: reduce_alt.c:2538
SCIP_Real * cost
Definition: grph.h:91
int * mincut_dist
Definition: grph.h:103
SCIP_RETCODE graph_load(SCIP *, GRAPH **, const char *, PRESOL *)
Definition: grphload.c:780
int * mincut_x
Definition: grph.h:110
int esize
Definition: grph.h:88
int * source
Definition: grph.h:67
double fixed
Definition: grph.h:129
SCIP_RETCODE graph_knot_contractpc(SCIP *, GRAPH *, int, int, int)
Definition: grphbase.c:1679
int * mincut_next
Definition: grph.h:107
SCIP_RETCODE ansadv2Reduction(SCIP *, GRAPH *, SCIP_Real *, int *, int *)
Definition: reduce_alt.c:4991
void prize_subtract(SCIP *, GRAPH *, SCIP_Real, int)
Definition: grphbase.c:1637
int edges
Definition: grph.h:89
int * grid_ncoords
Definition: grph.h:119
SCIP_RETCODE sl_reduction(SCIP *, GRAPH *, PATH *, double *, int *, int *, int *, int *, char *, int *)
Definition: reduce_alt.c:3656
void graph_knot_add(GRAPH *, int)
Definition: grphbase.c:1362
int * ieat
Definition: grph.h:99
void voronoi_inout(const GRAPH *)
int * orghead
Definition: grph.h:96
SCIP_RETCODE degree_test_sap(SCIP *, GRAPH *, SCIP_Real *, int *)
int ksize
Definition: grph.h:60
SCIP_RETCODE bound_reduce(SCIP *, GRAPH *, PATH *, SCIP_Real *, SCIP_Real *, SCIP_Real *, SCIP_Real *, SCIP_Real *, SCIP_Real *, int *, int *, int *, int *)
Definition: reduce_bnd.c:845
SCIP_RETCODE cnsAdvReduction(SCIP *, GRAPH *, int *, int *)
Definition: reduce_alt.c:4675
SCIP_RETCODE nv_reduction(SCIP *, GRAPH *, PATH *, double *, int *, int *, int *, int *, int *)
Definition: reduce_alt.c:3892
void graph_ident(const GRAPH *)
Definition: grphbase.c:1341
SCIP_RETCODE hcrbound_reduce(SCIP *, GRAPH *, PATH *, SCIP_Real *, SCIP_Real *, SCIP_Real *, int *, int *, int *, int *, int *)
Definition: reduce_bnd.c:1750
SCIP_RETCODE ansReduction(SCIP *, GRAPH *, SCIP_Real *, int *, int *)
Definition: reduce_alt.c:4579
void voronoiSteinerTreeExt(SCIP *, const GRAPH *, SCIP_Real *, int *, char *, PATH *)
Definition: grphpath.c:1121
Definition: grph.h:167
SCIP_RETCODE da_reduce(SCIP *, GRAPH *, PATH *, GNODE **, SCIP_Real *, SCIP_Real *, SCIP_Real *, int *, int *, int *, int *, int *, char *, int *)
Definition: reduce_bnd.c:202
SCIP_RETCODE graph_copy(SCIP *, GRAPH *, GRAPH **)
Definition: grphbase.c:1228
SCIP_RETCODE sdsp_reduction(SCIP *, GRAPH *, PATH *, PATH *, int *, int *, int *, int *, int *, int *, int)
Definition: reduce_alt.c:2058
int hoplimit
Definition: grph.h:86
double dist
Definition: grph.h:139
void graph_edge_add(SCIP *, GRAPH *, int, int, double, double)
int * mincut_head
Definition: grph.h:104
SCIP_RETCODE graph_grid_create(SCIP *, GRAPH **, int **, int, int, int)
Definition: grphbase.c:535
void graph_trail(const GRAPH *, int)
Definition: grphbase.c:2510
double lower
Definition: grph.h:131
void graph_path_exec(SCIP *, const GRAPH *, int, int, SCIP_Real *, PATH *)
Definition: grphpath.c:453
int * mincut_numb
Definition: grph.h:105
SCIP_RETCODE nv_reductionAdv(SCIP *, GRAPH *, PATH *, SCIP_Real *, double *, int *, int *, int *, int *, int *, int *, int *)
Definition: reduce_alt.c:4083
SCIP_RETCODE voronoi_dist(SCIP *, const GRAPH *, SCIP_Real *, double *, int *, int *, int *, int *, int *, int *, PATH *)
int norgmodelknots
Definition: grph.h:58
void graph_mincut_exec(GRAPH *, int, int, const int *, int *, int)
Definition: grphmcut.c:568