Scippy

GCG

Branch-and-Price & Column Generation for Everyone

reader_gp.h
Go to the documentation of this file.
1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2 /* */
3 /* This file is part of the program */
4 /* GCG --- Generic Column Generation */
5 /* a Dantzig-Wolfe decomposition based extension */
6 /* of the branch-cut-and-price framework */
7 /* SCIP --- Solving Constraint Integer Programs */
8 /* */
9 /* Copyright (C) 2010-2021 Operations Research, RWTH Aachen University */
10 /* Zuse Institute Berlin (ZIB) */
11 /* */
12 /* This program is free software; you can redistribute it and/or */
13 /* modify it under the terms of the GNU Lesser General Public License */
14 /* as published by the Free Software Foundation; either version 3 */
15 /* of the License, or (at your option) any later version. */
16 /* */
17 /* This program is distributed in the hope that it will be useful, */
18 /* but WITHOUT ANY WARRANTY; without even the implied warranty of */
19 /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
20 /* GNU Lesser General Public License for more details. */
21 /* */
22 /* You should have received a copy of the GNU Lesser General Public License */
23 /* along with this program; if not, write to the Free Software */
24 /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.*/
25 /* */
26 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
27 
28 /**@file reader_gp.h
29  * @brief GP file reader writing decompositions to gnuplot files
30  * @author Martin Bergner
31  * @author Hanna Franzen
32  * @ingroup FILEREADERS
33  *
34  * This reader can write visualizations of partialdecs to a .gp file.
35  */
36 
37 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
38 
39 #ifndef GCG_READER_GP_H__
40 #define GCG_READER_GP_H__
41 
42 #include "scip/scip.h"
43 #include "type_decomp.h"
44 
45 #ifdef __cplusplus
46 extern "C" {
47 #endif
48 
49 
50 /** Output format of gnuplot. Specifies the output format that gnuplot will produce. */
52 {
56 };
58 
59 /** Includes the gp file reader into SCIP
60  * @returns SCIP status */
61 extern
62 SCIP_RETCODE SCIPincludeReaderGp(
63  SCIP* scip /**< SCIP data structure */
64  );
65 
66 /* Writes a visualization for the given partialdec */
67 extern SCIP_RETCODE GCGwriteGpVisualizationFormat(
68  SCIP* scip, /**< SCIP data structure */
69  char* filename, /**< filename (including path) to write to */
70  char* outputname, /**< filename for compiled output file */
71  int partialdecid, /**< id of partialdec to visualize */
72  GP_OUTPUT_FORMAT outputformat /**< the output format which gnuplot should emit */
73  );
74 
75 /** Writes a visualization as .pdf file for the given partialdec
76  * @returns SCIP status */
77 extern
78 SCIP_RETCODE GCGwriteGpVisualization(
79  SCIP* scip, /**< SCIP data structure */
80  char* filename, /**< filename (including path), location of the output*/
81  char* outputname, /**< outputname is the name of the file for the compiled gnuplot output file */
82  int partialdecid /**< id of partialdec to visualize */
83  );
84 
85 /** Creates a block matrix and outputs its visualization as .pdf file
86  * @returns SCIP return code
87  * */
88 extern
89 SCIP_RETCODE GCGWriteGpDecompMatrix(
90  SCIP* scip, /**< scip data structure */
91  const char* filename, /**< filename the output should be written to (including directory) */
92  const char* workfolder, /**< directory in which should be worked */
93  SCIP_Bool originalmatrix /**< should the original (or transformed) matrix be written */
94 );
95 
96 #ifdef __cplusplus
97 }
98 #endif
99 
100 #endif
SCIP_RETCODE GCGWriteGpDecompMatrix(SCIP *scip, const char *filename, const char *workfolder, SCIP_Bool originalmatrix)
Definition: reader_gp.cpp:496
SCIP_RETCODE GCGwriteGpVisualization(SCIP *scip, char *filename, char *outputname, int partialdecid)
Definition: reader_gp.cpp:483
@ GP_OUTPUT_FORMAT_PNG
Definition: reader_gp.h:54
SCIP_RETCODE GCGwriteGpVisualizationFormat(SCIP *scip, char *filename, char *outputname, int partialdecid, GP_OUTPUT_FORMAT outputformat)
Definition: reader_gp.cpp:449
@ GP_OUTPUT_FORMAT_PDF
Definition: reader_gp.h:53
GPOutputFormat
Definition: reader_gp.h:51
enum GPOutputFormat GP_OUTPUT_FORMAT
Definition: reader_gp.h:57
SCIP_RETCODE SCIPincludeReaderGp(SCIP *scip)
Definition: reader_gp.cpp:527
@ GP_OUTPUT_FORMAT_SVG
Definition: reader_gp.h:55
type definitions for decomposition information in GCG projects