Scippy

SCIP

Solving Constraint Integer Programs

solstp.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 scip.zib.de. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file solstp.h
17  * @brief includes methods for Steiner tree problem solutions
18  * @author Daniel Rehfeldt
19  *
20  * Methods for manipulating solutions (i.e. trees) to Steiner tree problems, such as pruning.
21  * Also includes methods for obtaining information about solutions.
22  *
23  */
24 
25 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
26 
27 
28 #ifndef APPLICATIONS_STP_SRC_SOLSTP_H_
29 #define APPLICATIONS_STP_SRC_SOLSTP_H_
30 
31 #include "scip/scip.h"
32 #include "graph.h"
33 #include "shortestpath.h"
34 
35 
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39 
40 
41 extern void solstp_pcConnectDummies(const GRAPH*, int, int* RESTRICT, STP_Bool* RESTRICT);
42 extern SCIP_Real solstp_pcGetObjCsr(const GRAPH*, const CSR*, const int*, const STP_Bool*);
43 extern int solstp_pcGetSolRoot(SCIP*, const GRAPH*, const STP_Bool*);
44 
45 extern SCIP_RETCODE solstp_addSolToProb(SCIP*, const GRAPH*, const int*, SCIP_HEUR*, SCIP_Bool*);
46 extern void solstp_setVertexFromEdge(const GRAPH*, const int*, STP_Bool*);
47 extern void solstp_setVertexFromEdgeConn(const GRAPH*, const int*, int*);
48 extern void solstp_print(const GRAPH*, const int*);
49 extern SCIP_RETCODE solstp_markPcancestors(SCIP*, IDX**, const int*, const int*, int, STP_Bool*, STP_Bool*, int*, int*, int*);
50 extern SCIP_Bool solstp_isUnreduced(SCIP*, const GRAPH*, const int*);
51 extern SCIP_Bool solstp_isValid(SCIP*, const GRAPH*, const int*);
52 extern SCIP_Bool solstp_containsNode(const GRAPH*, const int*, int);
53 extern SCIP_Bool stpsol_pruningIsPossible(const GRAPH*, const int*, const STP_Bool*);
54 extern SCIP_Real solstp_getObjBounded(const GRAPH*, const int*, SCIP_Real, int);
55 extern SCIP_Real solstp_getObj(const GRAPH*, const int*, SCIP_Real);
56 extern SCIP_Real solstp_getObjCsr(const GRAPH*, const CSR*, const int*, const STP_Bool*);
57 extern int solstp_getNedges(const GRAPH*, const int*);
58 extern int solstp_getNedgesBounded(const GRAPH*, const int*, int);
59 extern void solstp_getTrivialSol(const GRAPH*, int*);
60 extern void solstp_getStpFromSCIPsol(SCIP*, SCIP_SOL*, const GRAPH*, int*);
61 extern void solstp_convertCsrToGraph(SCIP*, const GRAPH*, const CSR*, const int*, STP_Bool* RESTRICT, int* RESTRICT);
62 extern SCIP_RETCODE solstp_getOrg(SCIP*, const GRAPH*, const GRAPH*, const int*, int*);
63 extern SCIP_RETCODE solstp_reroot(SCIP*, const GRAPH*, int*, int);
64 extern SCIP_RETCODE solstp_rerootInfeas(SCIP*, GRAPH*, int*, int, SCIP_Bool*);
65 SCIP_RETCODE solstp_prune(SCIP*, const GRAPH*, int*, STP_Bool*);
66 SCIP_RETCODE solstp_pruneFromTmHeur(SCIP*, const GRAPH*, const SCIP_Real*, int* RESTRICT, STP_Bool* RESTRICT);
67 SCIP_RETCODE solstp_pruneFromTmHeur_csr(SCIP*, const GRAPH*, SPATHS*, int* RESTRICT);
70 
71 
72 #ifdef __cplusplus
73 }
74 #endif
75 
76 #endif /* APPLICATIONS_STP_SRC_SOLSTP_H_ */
void solstp_convertCsrToGraph(SCIP *, const GRAPH *, const CSR *, const int *, STP_Bool *RESTRICT, int *RESTRICT)
Shortest path based algorithms for Steiner problems.
int solstp_pcGetSolRoot(SCIP *, const GRAPH *, const STP_Bool *)
Definition: solstp.c:1140
SCIP_Real solstp_pcGetObjCsr(const GRAPH *, const CSR *, const int *, const STP_Bool *)
Definition: solstp.c:1872
SCIP_RETCODE solstp_reroot(SCIP *, const GRAPH *, int *, int)
Definition: solstp.c:1559
SCIP_Real solstp_getObj(const GRAPH *, const int *, SCIP_Real)
Definition: solstp.c:1859
void solstp_setVertexFromEdge(const GRAPH *, const int *, STP_Bool *)
Definition: solstp.c:2078
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:54
includes various files containing graph methods used for Steiner tree problems
SCIP_Bool solstp_isUnreduced(SCIP *, const GRAPH *, const int *)
Definition: solstp.c:1596
SCIP_RETCODE solstp_rerootInfeas(SCIP *, GRAPH *, int *, int, SCIP_Bool *)
Definition: solstp.c:1579
void solstp_getStpFromSCIPsol(SCIP *, SCIP_SOL *, const GRAPH *, int *)
Definition: solstp.c:1949
SCIP_Real solstp_getObjCsr(const GRAPH *, const CSR *, const int *, const STP_Bool *)
Definition: solstp.c:1921
void solstp_print(const GRAPH *, const int *)
Definition: solstp.c:1808
SCIP_Bool stpsol_pruningIsPossible(const GRAPH *, const int *, const STP_Bool *)
Definition: solstp.c:1307
void solstp_setVertexFromEdgeConn(const GRAPH *, const int *, int *)
Definition: solstp.c:2114
unsigned char STP_Bool
Definition: portab.h:34
void solstp_pcConnectDummies(const GRAPH *, int, int *RESTRICT, STP_Bool *RESTRICT)
SCIP_RETCODE solstp_pruneFromEdges(SCIP *, const GRAPH *, int *)
Definition: solstp.c:1432
#define SCIP_Bool
Definition: def.h:84
int solstp_getNedgesBounded(const GRAPH *, const int *, int)
Definition: solstp.c:2058
SCIP_RETCODE solstp_pruneFromTmHeur(SCIP *, const GRAPH *, const SCIP_Real *, int *RESTRICT, STP_Bool *RESTRICT)
SCIP_Bool solstp_containsNode(const GRAPH *, const int *, int)
Definition: solstp.c:1628
SCIP_RETCODE solstp_pruneFromNodes(SCIP *, const GRAPH *, int *, STP_Bool *)
Definition: solstp.c:1415
#define SCIP_Real
Definition: def.h:177
int solstp_getNedges(const GRAPH *, const int *)
Definition: solstp.c:2040
SCIP_RETCODE solstp_markPcancestors(SCIP *, IDX **, const int *, const int *, int, STP_Bool *, STP_Bool *, int *, int *, int *)
Definition: solstp.c:2200
SCIP_RETCODE solstp_pruneFromTmHeur_csr(SCIP *, const GRAPH *, SPATHS *, int *RESTRICT)
SCIP_RETCODE solstp_getOrg(SCIP *, const GRAPH *, const GRAPH *, const int *, int *)
Definition: solstp.c:2148
SCIP_Bool solstp_isValid(SCIP *, const GRAPH *, const int *)
Definition: solstp.c:1650
SCIP_RETCODE solstp_prune(SCIP *, const GRAPH *, int *, STP_Bool *)
Definition: solstp.c:1366
SCIP_RETCODE solstp_addSolToProb(SCIP *, const GRAPH *, const int *, SCIP_HEUR *, SCIP_Bool *)
Definition: solstp.c:1279
SCIP_Real solstp_getObjBounded(const GRAPH *, const int *, SCIP_Real, int)
Definition: solstp.c:1833
void solstp_getTrivialSol(const GRAPH *, int *)
Definition: solstp.c:2020
SCIP callable library.