Scippy

SCIP

Solving Constraint Integer Programs

heur_prune.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-2022 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 visit scipopt.org. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file heur_prune.h
17  * @ingroup PRIMALHEURISTICS
18  * @brief reduction-based primal heuristic for Steiner problems
19  * @author Daniel Rehfeldt
20  *
21  * This file implements a reducion based heuristic for Steiner problems. It is based on an approach
22  * described in T. Polzin's "Algorithms for the Steiner problem in networks".
23  *
24  */
25 
26 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
27 
28 #ifndef __SCIP_HEUR_PRUNE_H__
29 #define __SCIP_HEUR_PRUNE_H__
30 
31 #include "scip/scip.h"
32 #include "graph.h"
33 
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37 
38 /** updates solutions for pruned graph */
40  SCIP* scip, /**< SCIP data structure */
41  GRAPH* g, /**< graph data structure */
42  GRAPH* prunegraph, /**< pruned graph data structure */
43  int* solnode, /**< array for best solution nodes wrt prunegraph */
44  int* soledge, /**< array for best solution edges wrt prunegraph */
45  int* globalsoledge, /**< array storing best solution wrt g */
46  SCIP_Real* globalobj, /**< pointer to objective value of best solution wrt g */
47  SCIP_Bool incumbentgiven, /**< incumbent solution for pruned graph given? */
48  SCIP_Bool* success /**< pointer to store whether a solution could be found */
49  );
50 
51 /** creates the prune primal heuristic and includes it in SCIP */
53  SCIP* scip /**< SCIP data structure */
54  );
55 
56 /** execute prune heuristic on given graph */
58  SCIP* scip, /**< SCIP data structure */
59  SCIP_VAR** vars, /**< problem variables or NULL */
60  GRAPH* g, /**< the graph */
61  int* soledge, /**< array to store primal solution (if no solution is provided,
62  solgiven must be set to FALSE) */
63  SCIP_Bool* success, /**< feasible solution found? */
64  const SCIP_Bool withinitialsol, /**< solution given? */
65  const SCIP_Bool reducegraph /**< try to reduce graph initially? */
66  );
67 
68 #ifdef __cplusplus
69 }
70 #endif
71 
72 #endif
SCIP_RETCODE SCIPStpHeurPruneUpdateSols(SCIP *scip, GRAPH *g, GRAPH *prunegraph, int *solnode, int *soledge, int *globalsoledge, SCIP_Real *globalobj, SCIP_Bool incumbentgiven, SCIP_Bool *success)
Definition: heur_prune.c:489
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:54
includes various files containing graph methods used for Steiner tree problems
SCIP_RETCODE SCIPStpIncludeHeurPrune(SCIP *scip)
Definition: heur_prune.c:951
#define SCIP_Bool
Definition: def.h:84
#define SCIP_Real
Definition: def.h:177
SCIP_RETCODE SCIPStpHeurPruneRun(SCIP *scip, SCIP_VAR **vars, GRAPH *g, int *soledge, SCIP_Bool *success, const SCIP_Bool withinitialsol, const SCIP_Bool reducegraph)
Definition: heur_prune.c:599
SCIP callable library.