Scippy

SCIP

Solving Constraint Integer Programs

cons_stp.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-2019 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 scip.zib.de. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file cons_stp.h
17  * @brief Constraint handler for Steiner problems
18  * @author Gerald Gamrath
19  * @author Daniel Rehfeldt
20  * @author Michael Winkler
21  *
22  * This file checks solutions for feasibility and separates violated model constraints. For more details see \ref STP_CONS page.
23  */
24 
25 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
26 
27 #ifndef __SCIP_CONS_STP_H__
28 #define __SCIP_CONS_STP_H__
29 
30 
31 #include "scip/scip.h"
32 #include "grph.h"
33 
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37 
38 
39 #ifndef RESTRICT
40 #define RESTRICT restrict
41 #endif
42 
43 /** creates the handler for element constraints and includes it in SCIP */
45  SCIP* scip /**< SCIP data structure */
46  );
47 
48 /** creates and captures a stp constraint */
50  SCIP* scip, /**< SCIP data structure */
51  SCIP_CONS** cons, /**< pointer to hold the created constraint */
52  const char* name, /**< name of constraint */
53  GRAPH* graph /**< graph data structure */
54  );
55 
56 /** sets graph */
58  SCIP* scip, /**< SCIP data structure */
59  const GRAPH* g /**< graph data structure */
60  );
61 
62 /** dual ascent heuristic */
64  SCIP* scip, /**< SCIP data structure */
65  const GRAPH* g, /**< graph data structure */
66  SCIP_Real* RESTRICT redcost, /**< array to store reduced costs or NULL */
67  SCIP_Real* RESTRICT nodearrreal, /**< real vertices array for internal computations or NULL */
68  SCIP_Real* objval, /**< pointer to store objective value */
69  SCIP_Bool addcuts, /**< should dual ascent add Steiner cuts? */
70  SCIP_Bool ascendandprune, /**< should the ascent-and-prune heuristic be executed? */
71  GNODE** gnodearrterms, /**< gnode terminals array for internal computations or NULL */
72  const int* result, /**< solution array (solution needs to be provided) */
73  int* RESTRICT edgearrint, /**< int edges array for internal computations or NULL */
74  int* RESTRICT nodearrint, /**< int vertices array for internal computations or NULL */
75  int root, /**< the root */
76  SCIP_Bool is_pseudoroot, /**< is the root a pseudo root? */
77  SCIP_Real damaxdeviation, /**< number of dual ascent runs */
78  STP_Bool* RESTRICT nodearrchar /**< char vertices array for internal computations or NULL */
79  );
80 
81 /** dual ascent heuristic for the PCSPG and the MWCSP */
83  SCIP* scip, /**< SCIP data structure */
84  GRAPH* g, /**< graph data structure */
85  SCIP_Real* redcost, /**< array to store reduced costs or NULL */
86  SCIP_Real* objval, /**< pointer to store objective value */
87  SCIP_Bool addcuts, /**< should dual ascent add Steiner cuts? */
88  SCIP_Bool ascendandprune, /**< perform ascend-and-prune and add solution? */
89  int nruns /**< number of dual ascent runs */
90  );
91 
92 
93 #ifdef __cplusplus
94 }
95 #endif
96 
97 #endif
Definition: grph.h:57
SCIP_RETCODE SCIPStpDualAscentPcMw(SCIP *scip, GRAPH *g, SCIP_Real *redcost, SCIP_Real *objval, SCIP_Bool addcuts, SCIP_Bool ascendandprune, int nruns)
Definition: cons_stp.c:2266
#define RESTRICT
Definition: def.h:265
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:53
SCIP_RETCODE SCIPStpDualAscent(SCIP *scip, const GRAPH *g, SCIP_Real *RESTRICT redcost, SCIP_Real *RESTRICT nodearrreal, SCIP_Real *objval, SCIP_Bool addcuts, SCIP_Bool ascendandprune, GNODE **gnodearrterms, const int *result, int *RESTRICT edgearrint, int *RESTRICT nodearrint, int root, SCIP_Bool is_pseudoroot, SCIP_Real damaxdeviation, STP_Bool *RESTRICT nodearrchar)
Definition: cons_stp.c:1685
unsigned char STP_Bool
Definition: grph.h:52
SCIP_RETCODE SCIPincludeConshdlrStp(SCIP *scip)
Definition: cons_stp.c:1573
#define SCIP_Bool
Definition: def.h:70
includes various files containing graph methods used for Steiner tree problems
SCIP_RETCODE SCIPcreateConsStp(SCIP *scip, SCIP_CONS **cons, const char *name, GRAPH *graph)
Definition: cons_stp.c:1634
#define SCIP_Real
Definition: def.h:164
void SCIPStpConshdlrSetGraph(SCIP *scip, const GRAPH *g)
Definition: cons_stp.c:1664
SCIP callable library.