1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2 /*                                                                           */
3 /*                  This file is part of the program and library             */
4 /*         SCIP --- Solving Constraint Integer Programs                      */
5 /*                                                                           */
6 /*    Copyright (C) 2002-2021 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 scipopt.org.         */
13 /*                                                                           */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file   type_disp.h
17  * @ingroup TYPEDEFINITIONS
18  * @brief  type definitions for displaying runtime statistics
19  * @author Tobias Achterberg
20  *
21  *  This file defines the interface for display columns implemented in C.
22  *
23  * - \ref DISP "Instructions for implementing a display column"
24  * - \ref DISPLAYS "List of available display columns"
25  * - \ref scip::ObjDisp "C++ wrapper class
26  */
27 
28 /** @defgroup DEFPLUGINS_DISP Default display columns
29  *  @ingroup DEFPLUGINS
30  *  @brief implementation files (.c files) of the default display columns of SCIP
31  */
32 
33 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
34 
35 #ifndef __SCIP_TYPE_DISP_H__
36 #define __SCIP_TYPE_DISP_H__
37 
38 #include <stdio.h>
39 
40 #include "scip/def.h"
41 #include "scip/type_retcode.h"
42 #include "scip/type_scip.h"
43 
44 #ifdef __cplusplus
45 extern "C" {
46 #endif
47 
48 /** display activation status of display column */
49 enum SCIP_DispStatus
50 {
51    SCIP_DISPSTATUS_OFF  = 0,            /**< display column is not displayed */
52    SCIP_DISPSTATUS_AUTO = 1,            /**< display column is switched on and off automatically */
53    SCIP_DISPSTATUS_ON   = 2             /**< display column is displayed */
54 };
55 typedef enum SCIP_DispStatus SCIP_DISPSTATUS;
56 
57 /** display activation status of display column */
58 enum SCIP_DispMode
59 {
60    SCIP_DISPMODE_DEFAULT    = 0x00000001u,        /**< display column is displayed only in sequential mode */
61    SCIP_DISPMODE_CONCURRENT = 0x00000002u,        /**< display column is displayed only in concurrent mode */
62    SCIP_DISPMODE_ALL        = 0x00000003u         /**< display column is displayed in concurrent and sequential mode*/
63 };
64 typedef enum SCIP_DispMode SCIP_DISPMODE;
65 
66 typedef struct SCIP_Disp SCIP_DISP;               /**< display column data structure */
67 typedef struct SCIP_DispData SCIP_DISPDATA;       /**< display column specific data */
68 
69 
70 /**  copy method for display plugins (called when SCIP copies plugins)
71  *
72  *  input:
73  *  - scip            : SCIP main data structure
74  *  - disp            : the display column itself
75  */
76 #define SCIP_DECL_DISPCOPY(x) SCIP_RETCODE x (SCIP* scip, SCIP_DISP* disp)
77 
78 /** destructor of display column to free user data (called when SCIP is exiting)
79  *
80  *  input:
81  *  - scip            : SCIP main data structure
82  *  - disp            : the display column itself
83  */
84 #define SCIP_DECL_DISPFREE(x) SCIP_RETCODE x (SCIP* scip, SCIP_DISP* disp)
85 
86 /** initialization method of display column (called after problem was transformed)
87  *
88  *  input:
89  *  - scip            : SCIP main data structure
90  *  - disp            : the display column itself
91  */
92 #define SCIP_DECL_DISPINIT(x) SCIP_RETCODE x (SCIP* scip, SCIP_DISP* disp)
93 
94 /** deinitialization method of display column (called before transformed problem is freed)
95  *
96  *  input:
97  *  - scip            : SCIP main data structure
98  *  - disp            : the display column itself
99  */
100 #define SCIP_DECL_DISPEXIT(x) SCIP_RETCODE x (SCIP* scip, SCIP_DISP* disp)
101 
102 /** solving process initialization method of display column (called when branch and bound process is about to begin)
103  *
104  *  This method is called when the presolving was finished and the branch and bound process is about to begin.
105  *  The display column may use this call to initialize its branch and bound specific data.
106  *
107  *  input:
108  *  - scip            : SCIP main data structure
109  *  - disp            : the display column itself
110  */
111 #define SCIP_DECL_DISPINITSOL(x) SCIP_RETCODE x (SCIP* scip, SCIP_DISP* disp)
112 
113 /** solving process deinitialization method of display column (called before branch and bound process data is freed)
114  *
115  *  This method is called before the branch and bound process is freed.
116  *  The display column should use this call to clean up its branch and bound data.
117  *
118  *  input:
119  *  - scip            : SCIP main data structure
120  *  - disp            : the display column itself
121  */
122 #define SCIP_DECL_DISPEXITSOL(x) SCIP_RETCODE x (SCIP* scip, SCIP_DISP* disp)
123 
124 /** output method of display column to output file stream 'file'
125  *
126  *  input:
127  *  - scip            : SCIP main data structure
128  *  - disp            : the display column itself
129  *  - file            : file stream for output
130  */
131 #define SCIP_DECL_DISPOUTPUT(x) SCIP_RETCODE x (SCIP* scip, SCIP_DISP* disp, FILE* file)
132 
133 #ifdef __cplusplus
134 }
135 #endif
136 
137 #endif
138