Scippy

GCG

Branch-and-Price & Column Generation for Everyone

params_visu.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_tex.h
29  * @brief parameter settings for visualization readers
30  * @author Hanna Franzen
31 
32  * This file provides universally used parameters for visualizations.
33 
34  */
35 
36 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
37 
38 #ifndef GCG_PARAMS_VISU_H__
39 #define GCG_PARAMS_VISU_H__
40 
41 #ifdef __cplusplus
42 extern "C" {
43 #endif
44 
45 #include "type_decomp.h"
46 #include "type_parameter.h"
47 
48 #include "scip/scip.h"
49 
50 /** Colorscheme selection for the visualizations */
52 {
53  COLORSCHEME_DEFAULT = 0, /**< default colors (supposedly eye-friendly) */
54  COLORSCHEME_GREY = 1, /**< on a range from black to white */
55  COLORSCHEME_MANUAL = 2 /**< take user-defined input */
56 };
57 
58 typedef enum Colorscheme VISU_COLORSCHEME; /**< visualization colorscheme type */
59 
60 /** includes the visualization parameters into GCG
61  * @returns SCIP return code */
62 extern SCIP_RETCODE SCIPcreateParamsVisu(
63  SCIP* scip, /**< SCIP data structure */
64  GCG_PARAMDATA** paramdata /**< input empty paramdata, oputput new set of param data */
65  );
66 
67 /** gets whether draftmode is on
68  * draftmode lets visualizations omit nonzeros
69  * @returns true if draftmode is on */
70 extern SCIP_Bool SCIPvisuGetDraftmode(
71  SCIP* scip /**< SCIP data structure */
72  );
73 
74 /** sets draftmode
75  * draftmode lets visualizations omit nonzeros
76  * @returns nothing */
77 extern void SCIPvisuSetDraftmode(
78  SCIP* scip, /**< SCIP data structure */
79  SCIP_Bool setmode /**< true iff draftmode should be on */
80  );
81 
82 /** gets the colorscheme for visualizations
83  * @returns current colorscheme */
85  SCIP* scip /**< SCIP data structure */
86  );
87 
88 /** sets colorscheme for visualizations
89  * @returns nothing */
90 extern void SCIPvisuSetColorscheme(
91  SCIP* scip, /**< SCIP data structure */
92  VISU_COLORSCHEME newscheme /**< new colorscheme */
93  );
94 
95 /** sets color for mastercons block in current color scheme
96  * @returns nothing*/
98  SCIP* scip, /**< SCIP data structure */
99  const char* newcolor /**< new color */
100  );
101 
102 /** sets manual color for mastervar block in current color scheme
103  * @returns nothing */
105  SCIP* scip, /**< SCIP data structure */
106  const char* newcolor /**< new color */
107  );
108 
109 /** sets manual color for linking blocks in current color scheme
110  * @returns nothing */
111 extern void SCIPvisuSetColorManLinking(
112  SCIP* scip, /**< SCIP data structure */
113  const char* newcolor /**< new color */
114  );
115 
116 /** sets manual color for stairlinking blocks in current color scheme
117  * @returns nothing */
119  SCIP* scip, /**< SCIP data structure */
120  const char* newcolor /**< new color */
121  );
122 
123 /** sets manual color for normal decomp blocks in current color scheme
124  * @returns nothing */
125 extern void SCIPvisuSetColorManBlock(
126  SCIP* scip, /**< SCIP data structure */
127  const char* newcolor /**< new color */
128  );
129 
130 /** sets manual color for open blocks in current color scheme
131  * @returns nothing */
132 extern void SCIPvisuSetColorManOpen(
133  SCIP* scip, /**< SCIP data structure */
134  const char* newcolor /**< new color */
135  );
136 
137 /** sets manual color for non-zero points in current color scheme
138  * @returns nothing */
139 extern void SCIPvisuSetColorManNonzero(
140  SCIP* scip, /**< SCIP data structure */
141  const char* newcolor /**< new color */
142  );
143 
144 /** sets manual color for lines in current color scheme
145  * @returns nothing */
146 extern void SCIPvisuSetColorManLine(
147  SCIP* scip, /**< SCIP data structure */
148  const char* newcolor /**< new color */
149  );
150 
151 /** gets color for mastercons block in current color scheme
152  * @returns mastercons color */
153 extern const char* SCIPvisuGetColorMasterconss(
154  SCIP* scip /**< SCIP data structure */
155  );
156 
157 /** gets color for mastervar block in current color scheme
158  * @returns mastervar color */
159 extern const char* SCIPvisuGetColorMastervars(
160  SCIP* scip /**< SCIP data structure */
161  );
162 
163 /** gets color for linking blocks in current color scheme
164  * @returns linking color */
165 extern const char* SCIPvisuGetColorLinking(
166  SCIP* scip /**< SCIP data structure */
167  );
168 
169 /** gets color for stairlinking blocks in current color scheme
170  * @returns stairlinking color */
171 extern const char* SCIPvisuGetColorStairlinking(
172  SCIP* scip /**< SCIP data structure */
173  );
174 
175 /** gets color for normal decomp blocks in current color scheme
176  * @returns block color */
177 extern const char* SCIPvisuGetColorBlock(
178  SCIP* scip /**< SCIP data structure */
179  );
180 
181 /** gets color for open blocks in current color scheme
182  * @returns open color */
183 extern const char* SCIPvisuGetColorOpen(
184  SCIP* scip /**< SCIP data structure */
185  );
186 
187 /** gets color for non-zero points in current color scheme
188  * @returns non-zero color */
189 extern const char* SCIPvisuGetColorNonzero(
190  SCIP* scip /**< SCIP data structure */
191  );
192 
193 /** gets color for lines in current color scheme
194  * @returns line color */
195 extern const char* SCIPvisuGetColorLine(
196  SCIP* scip /**< SCIP data structure */
197  );
198 
199 /** gets appropriate radius for nonzeros
200  * needs highest indices of both axes for scaling
201  * @returns radius */
202 extern float SCIPvisuGetNonzeroRadius(
203  SCIP* scip, /**< SCIP data structure */
204  int maxindx, /**< highest index x-axis */
205  int maxindy, /**< highest index y-axis */
206  float scalingfactor /**< percentage to scale radius, 1 if no scaling */
207  );
208 
209 
210 /** if true gp reader should be used for sub-visualizations, otherwise tex reader
211  * @returns true if gp reader should be used, false if tex reader should be used */
212 extern SCIP_Bool GCGgetUseGp(
213  SCIP* scip /**< SCIP data structure */
214  );
215 
216 /** gets the name of the pdf reader that should be used
217  * @returns name of pdf reader */
218 extern const char* GCGVisuGetPdfReader(
219  SCIP* scip /**< SCIP data structure */
220  );
221 
222 /** gets the max number of decomps to be included in reports
223  * @returns max number of decomps */
224 extern int GCGreportGetMaxNDecomps(
225  SCIP* scip /**< SCIP data structure */
226  );
227 
228 /** gets what type of decomps to show in reports (where 0 corresponds to 'show all')
229  * @returns type of decomps */
231  SCIP* scip /**< SCIP data structure */
232  );
233 
234 /** gets whether a titlepage should be included in reports
235  * @returns true iff title page should be generated */
236 extern SCIP_Bool GCGreportGetShowTitlepage(
237  SCIP* scip /**< SCIP data structure */
238  );
239 
240 /** gets whether a table of contents should be included in reports
241  * @returns true iff table of contents should be generated */
242 extern SCIP_Bool GCGreportGetShowToc(
243  SCIP* scip /**< SCIP data structure */
244  );
245 
246 /** gets whether statistics should be included for each decomp in reports
247  * @returns true iff statistics for each decomp should be generated */
248 extern SCIP_Bool GCGreportGetShowStatistics(
249  SCIP* scip /**< SCIP data structure */
250  );
251 
252 /** frees all visualization parameters
253  * @returns nothing */
254 extern void GCGVisuFreeParams(
255  SCIP* scip, /**< SCIP data structure */
256  GCG_PARAMDATA* paramdata /**< input empty paramdata, oputput new set of param data */
257  );
258 
259 #ifdef __cplusplus
260 }
261 #endif
262 
263 #endif
const char * SCIPvisuGetColorMastervars(SCIP *scip)
Definition: params_visu.c:246
void SCIPvisuSetDraftmode(SCIP *scip, SCIP_Bool setmode)
Definition: params_visu.c:172
const char * SCIPvisuGetColorStairlinking(SCIP *scip)
Definition: params_visu.c:300
const char * GCGVisuGetPdfReader(SCIP *scip)
Definition: params_visu.c:609
@ COLORSCHEME_MANUAL
Definition: params_visu.h:55
Colorscheme
Definition: params_visu.h:51
const char * SCIPvisuGetColorLine(SCIP *scip)
Definition: params_visu.c:408
SCIP_Bool SCIPvisuGetDraftmode(SCIP *scip)
Definition: params_visu.c:155
VISU_COLORSCHEME SCIPvisuGetColorscheme(SCIP *scip)
Definition: params_visu.c:187
const char * SCIPvisuGetColorNonzero(SCIP *scip)
Definition: params_visu.c:381
SCIP_Bool GCGreportGetShowTitlepage(SCIP *scip)
Definition: params_visu.c:643
void SCIPvisuSetColorManMasterconss(SCIP *scip, const char *newcolor)
Definition: params_visu.c:434
SCIP_Bool GCGgetUseGp(SCIP *scip)
Definition: params_visu.c:592
const char * SCIPvisuGetColorMasterconss(SCIP *scip)
Definition: params_visu.c:219
void SCIPvisuSetColorManLine(SCIP *scip, const char *newcolor)
Definition: params_visu.c:538
const char * SCIPvisuGetColorBlock(SCIP *scip)
Definition: params_visu.c:327
float SCIPvisuGetNonzeroRadius(SCIP *scip, int maxindx, int maxindy, float scalingfactor)
Definition: params_visu.c:554
enum Colorscheme VISU_COLORSCHEME
Definition: params_visu.h:58
type definitions for parameters in GCG project
@ COLORSCHEME_GREY
Definition: params_visu.h:54
void SCIPvisuSetColorManOpen(SCIP *scip, const char *newcolor)
Definition: params_visu.c:509
void SCIPvisuSetColorscheme(SCIP *scip, VISU_COLORSCHEME newscheme)
Definition: params_visu.c:203
void GCGVisuFreeParams(SCIP *scip, GCG_PARAMDATA *paramdata)
Definition: params_visu.c:695
void SCIPvisuSetColorManMastervars(SCIP *scip, const char *newcolor)
Definition: params_visu.c:449
void SCIPvisuSetColorManBlock(SCIP *scip, const char *newcolor)
Definition: params_visu.c:494
int GCGreportGetMaxNDecomps(SCIP *scip)
Definition: params_visu.c:626
enum Dectype DEC_DECTYPE
Definition: type_decomp.h:56
DEC_DECTYPE GCGreportGetDecompTypeToShow(SCIP *scip)
const char * SCIPvisuGetColorOpen(SCIP *scip)
Definition: params_visu.c:354
void SCIPvisuSetColorManLinking(SCIP *scip, const char *newcolor)
Definition: params_visu.c:464
@ COLORSCHEME_DEFAULT
Definition: params_visu.h:53
SCIP_RETCODE SCIPcreateParamsVisu(SCIP *scip, GCG_PARAMDATA **paramdata)
Definition: params_visu.c:716
SCIP_Bool GCGreportGetShowToc(SCIP *scip)
Definition: params_visu.c:660
SCIP_Bool GCGreportGetShowStatistics(SCIP *scip)
Definition: params_visu.c:677
const char * SCIPvisuGetColorLinking(SCIP *scip)
Definition: params_visu.c:273
void SCIPvisuSetColorManNonzero(SCIP *scip, const char *newcolor)
Definition: params_visu.c:523
type definitions for decomposition information in GCG projects
void SCIPvisuSetColorManStairlinking(SCIP *scip, const char *newcolor)
Definition: params_visu.c:479