Scippy

SCIP

Solving Constraint Integer Programs

disp.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-2023 Zuse Institute Berlin (ZIB) */
7 /* */
8 /* Licensed under the Apache License, Version 2.0 (the "License"); */
9 /* you may not use this file except in compliance with the License. */
10 /* You may obtain a copy of the License at */
11 /* */
12 /* http://www.apache.org/licenses/LICENSE-2.0 */
13 /* */
14 /* Unless required by applicable law or agreed to in writing, software */
15 /* distributed under the License is distributed on an "AS IS" BASIS, */
16 /* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
17 /* See the License for the specific language governing permissions and */
18 /* limitations under the License. */
19 /* */
20 /* You should have received a copy of the Apache-2.0 license */
21 /* along with SCIP; see the file LICENSE. If not visit scipopt.org. */
22 /* */
23 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
24 
25 /**@file disp.h
26  * @ingroup INTERNALAPI
27  * @brief internal methods for displaying runtime statistics
28  * @author Tobias Achterberg
29  */
30 
31 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
32 
33 #ifndef __SCIP_DISP_H__
34 #define __SCIP_DISP_H__
35 
36 
37 #include <stdio.h>
38 
39 #include "scip/def.h"
40 #include "blockmemshell/memory.h"
41 #include "scip/type_retcode.h"
42 #include "scip/type_set.h"
43 #include "scip/type_stat.h"
44 #include "scip/type_disp.h"
45 #include "scip/type_paramset.h"
46 #include "scip/pub_disp.h"
47 
48 #ifdef __cplusplus
49 extern "C" {
50 #endif
51 
52 /** parameter change information method to autoselect display columns again */
53 SCIP_DECL_PARAMCHGD(SCIPparamChgdDispActive);
54 
55 /** copies the given display to a new scip */
57  SCIP_DISP* disp, /**< display column */
58  SCIP_SET* set /**< SCIP_SET of SCIP to copy to */
59  );
60 
61 /** creates a display column */
63  SCIP_DISP** disp, /**< pointer to store display column */
64  SCIP_SET* set, /**< global SCIP settings */
65  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
66  BMS_BLKMEM* blkmem, /**< block memory for parameter settings */
67  const char* name, /**< name of display column */
68  const char* desc, /**< description of display column */
69  const char* header, /**< head line of display column */
70  SCIP_DISPSTATUS dispstatus, /**< display activation status of display column */
71  SCIP_DECL_DISPCOPY ((*dispcopy)), /**< copy method of display column or NULL if you don't want to copy your plugin into sub-SCIPs */
72  SCIP_DECL_DISPFREE ((*dispfree)), /**< destructor of display column */
73  SCIP_DECL_DISPINIT ((*dispinit)), /**< initialize display column */
74  SCIP_DECL_DISPEXIT ((*dispexit)), /**< deinitialize display column */
75  SCIP_DECL_DISPINITSOL ((*dispinitsol)), /**< solving process initialization method of display column */
76  SCIP_DECL_DISPEXITSOL ((*dispexitsol)), /**< solving process deinitialization method of display column */
77  SCIP_DECL_DISPOUTPUT ((*dispoutput)), /**< output method */
78  SCIP_DISPDATA* dispdata, /**< display column data */
79  int width, /**< width of display column (no. of chars used) */
80  int priority, /**< priority of display column */
81  int position, /**< relative position of display column */
82  SCIP_Bool stripline /**< should the column be separated with a line from its right neighbor? */
83  );
84 
85 /** frees memory of display column */
87  SCIP_DISP** disp, /**< pointer to display column data structure */
88  SCIP_SET* set /**< global SCIP settings */
89  );
90 
91 /** initializes display column */
93  SCIP_DISP* disp, /**< display column */
94  SCIP_SET* set /**< global SCIP settings */
95  );
96 
97 /** deinitializes display column */
99  SCIP_DISP* disp, /**< display column */
100  SCIP_SET* set /**< global SCIP settings */
101  );
102 
103 /** informs display column that the branch and bound process is being started */
105  SCIP_DISP* disp, /**< display column */
106  SCIP_SET* set /**< global SCIP settings */
107  );
108 
109 /** informs display column that the branch and bound process data is being freed */
111  SCIP_DISP* disp, /**< display column */
112  SCIP_SET* set /**< global SCIP settings */
113  );
114 
115 /** output display column to screen */
117  SCIP_DISP* disp, /**< display column */
118  SCIP_SET* set, /**< global SCIP settings */
119  FILE* file /**< output file (or NULL for standard output) */
120  );
121 
122 /** prints one line of output with the active display columns */
124  SCIP_SET* set, /**< global SCIP settings */
125  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
126  SCIP_STAT* stat, /**< problem statistics data */
127  FILE* file, /**< output file (or NULL for standard output) */
128  SCIP_Bool forcedisplay, /**< should the line be printed without regarding frequency? */
129  SCIP_Bool endline /**< should the line be terminated with a newline symbol? */
130  );
131 
132 /** activates all display lines fitting in the display w.r. to priority */
134  SCIP_SET* set /**< global SCIP settings */
135  );
136 
137 /** changes the display column mode */
138 void SCIPdispChgMode(
139  SCIP_DISP* disp, /**< display column */
140  SCIP_DISPMODE mode /**< the display column mode */
141  );
142 
143 #ifdef __cplusplus
144 }
145 #endif
146 
147 #endif
SCIP_RETCODE SCIPdispAutoActivate(SCIP_SET *set)
Definition: disp.c:501
#define SCIP_DECL_DISPINITSOL(x)
Definition: type_disp.h:120
struct SCIP_DispData SCIP_DISPDATA
Definition: type_disp.h:76
SCIP_RETCODE SCIPdispPrintLine(SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, SCIP_STAT *stat, FILE *file, SCIP_Bool forcedisplay, SCIP_Bool endline)
Definition: disp.c:415
void SCIPdispChgMode(SCIP_DISP *disp, SCIP_DISPMODE mode)
Definition: disp.c:568
SCIP_RETCODE SCIPdispInitsol(SCIP_DISP *disp, SCIP_SET *set)
Definition: disp.c:262
SCIP_RETCODE SCIPdispExit(SCIP_DISP *disp, SCIP_SET *set)
Definition: disp.c:238
enum SCIP_DispMode SCIP_DISPMODE
Definition: type_disp.h:73
SCIP_RETCODE SCIPdispOutput(SCIP_DISP *disp, SCIP_SET *set, FILE *file)
Definition: disp.c:298
SCIP_RETCODE SCIPdispFree(SCIP_DISP **disp, SCIP_SET *set)
Definition: disp.c:188
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:63
type definitions for global SCIP settings
public methods for displaying runtime statistics
type definitions for return codes for SCIP methods
#define SCIP_DECL_DISPCOPY(x)
Definition: type_disp.h:85
type definitions for problem statistics
SCIP_RETCODE SCIPdispCreate(SCIP_DISP **disp, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, BMS_BLKMEM *blkmem, const char *name, const char *desc, const char *header, SCIP_DISPSTATUS dispstatus, SCIP_DECL_DISPCOPY((*dispcopy)), SCIP_DECL_DISPFREE((*dispfree)), SCIP_DECL_DISPINIT((*dispinit)), SCIP_DECL_DISPEXIT((*dispexit)), SCIP_DECL_DISPINITSOL((*dispinitsol)), SCIP_DECL_DISPEXITSOL((*dispexitsol)), SCIP_DECL_DISPOUTPUT((*dispoutput)), SCIP_DISPDATA *dispdata, int width, int priority, int position, SCIP_Bool stripline)
Definition: disp.c:150
SCIP_RETCODE SCIPdispCopyInclude(SCIP_DISP *disp, SCIP_SET *set)
Definition: disp.c:65
#define SCIP_DECL_DISPINIT(x)
Definition: type_disp.h:101
SCIP_RETCODE SCIPdispExitsol(SCIP_DISP *disp, SCIP_SET *set)
Definition: disp.c:280
#define SCIP_Bool
Definition: def.h:93
#define SCIP_DECL_DISPFREE(x)
Definition: type_disp.h:93
SCIP_DECL_PARAMCHGD(SCIPparamChgdDispActive)
Definition: disp.c:56
#define SCIP_DECL_DISPEXITSOL(x)
Definition: type_disp.h:131
#define SCIP_DECL_DISPEXIT(x)
Definition: type_disp.h:109
type definitions for handling parameter settings
enum SCIP_DispStatus SCIP_DISPSTATUS
Definition: type_disp.h:64
common defines and data types used in all packages of SCIP
#define SCIP_DECL_DISPOUTPUT(x)
Definition: type_disp.h:140
struct BMS_BlkMem BMS_BLKMEM
Definition: memory.h:439
SCIP_RETCODE SCIPdispInit(SCIP_DISP *disp, SCIP_SET *set)
Definition: disp.c:214
type definitions for displaying runtime statistics
memory allocation routines