Scippy

SCIP

Solving Constraint Integer Programs

heur_tm.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 heur_tm.h
17  * @brief shortest paths based primal heuristics for Steiner problems
18  * @author Gerald Gamrath
19  * @author Thorsten Koch
20  * @author Daniel Rehfeldt
21  * @author Michael Winkler
22  *
23  * This file implements several shortest paths based primal heuristics for Steiner problems, see
24  * "SCIP-Jack - A solver for STP and variants with parallelization extensions" by
25  * Gamrath, Koch, Maher, Rehfeldt and Shinano
26  *
27  */
28 
29 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
30 
31 #ifndef __SCIP_HEUR_TM_H__
32 #define __SCIP_HEUR_TM_H__
33 
34 #include "scip/scip.h"
35 #include "grph.h"
36 
37 #define DEFAULT_HOPFACTOR 0.33
38 
39 #ifdef __cplusplus
40 extern "C" {
41 #endif
42 
43  /** creates the TM primal heuristic and includes it in SCIP */
44  extern
45  SCIP_RETCODE SCIPincludeHeurTM(
46  SCIP* scip /**< SCIP data structure */
47  );
48 
49  /** execute shortest paths heuristic to obtain a Steiner tree */
50  extern
51  SCIP_RETCODE SCIPheurComputeSteinerTree(
52  SCIP* scip, /**< SCIP data structure */
53  SCIP_HEURDATA* heurdata, /**< SCIP data structure */
54  const GRAPH* graph, /**< graph data structure */
55  int* starts, /**< array containing start vertices (NULL to not provide any) */
56  int* bestnewstart, /**< pointer to the start vertex resulting in the best soluton */
57  int* best_result, /**< array indicating whether an arc is part of the solution (CONNECTED/UNKNOWN) */
58  int runs, /**< number of runs */
59  int bestincstart, /**< best incumbent start vertex */
60  SCIP_Real* cost, /**< arc costs */
61  SCIP_Real* costrev, /**< reversed arc costs */
62  SCIP_Real* hopfactor, /**< edge cost multiplicator for HC problems */
63  SCIP_Real* nodepriority, /**< vertex priorities for vertices to be starting points (NULL for no priorities) */
64  SCIP_Real maxcost, /**< maximal edge cost (only for HC) */
65  SCIP_Bool* success /**< pointer to store whether a solution could be found */
66  );
67 
68  /** prune a Steiner tree in such a way that all leaves are terminals */
69  extern
70  SCIP_RETCODE SCIPheurPruneSteinerTree(
71  SCIP* scip, /**< SCIP data structure */
72  const GRAPH* g, /**< graph structure */
73  SCIP_Real* cost, /**< edge costs */
74  int layer, /**< layer, @note: should be set to 0 */
75  int* result, /**< ST edges */
76  char* connected /**< ST nodes */
77  );
78 
79  /** prune the (rooted) prize collecting Steiner tree in such a way that all leaves are terminals */
80  extern
81  SCIP_RETCODE SCIPheurPrunePCSteinerTree(
82  SCIP* scip, /**< SCIP data structure */
83  const GRAPH* g, /**< graph structure */
84  SCIP_Real* cost, /**< edge costs */
85  int* result, /**< ST edges */
86  char* connected /**< ST nodes */
87  );
88 
89  /** prune a degree constrained Steiner tree in such a way that all leaves are terminals */
90  extern
92  SCIP* scip, /**< SCIP data structure */
93  const GRAPH* g, /**< graph structure */
94  int* result, /**< ST edges */
95  char* connected /**< ST nodes */
96  );
97 
98 #ifdef __cplusplus
99 }
100 #endif
101 
102 #endif
SCIP_RETCODE SCIPheurPrunePCSteinerTree(SCIP *scip, const GRAPH *g, SCIP_Real *cost, int *result, char *connected)
Definition: heur_tm.c:197
Definition: grph.h:55
SCIP_RETCODE SCIPheurPruneSteinerTree(SCIP *scip, const GRAPH *g, SCIP_Real *cost, int layer, int *result, char *connected)
Definition: heur_tm.c:381
SCIP_RETCODE SCIPincludeHeurTM(SCIP *scip)
Definition: heur_tm.c:2687
SCIP_RETCODE SCIPheurPruneDegConsSteinerTree(SCIP *scip, const GRAPH *g, int *result, char *connected)
Definition: heur_tm.c:527
SCIP_RETCODE SCIPheurComputeSteinerTree(SCIP *scip, SCIP_HEURDATA *heurdata, const GRAPH *graph, int *starts, int *bestnewstart, int *best_result, int runs, int bestincstart, SCIP_Real *cost, SCIP_Real *costrev, SCIP_Real *hopfactor, SCIP_Real *nodepriority, SCIP_Real maxcost, SCIP_Bool *success)
Definition: heur_tm.c:1419
includes various files containing graph methods used for Steiner problems