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 */
56   	SCIP_RETCODE SCIPdispCopyInclude(
57   	   SCIP_DISP*            disp,               /**< display column */
58   	   SCIP_SET*             set                 /**< SCIP_SET of SCIP to copy to */
59   	   );
60   	
61   	/** creates a display column */
62   	SCIP_RETCODE SCIPdispCreate(
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 */
86   	SCIP_RETCODE SCIPdispFree(
87   	   SCIP_DISP**           disp,               /**< pointer to display column data structure */
88   	   SCIP_SET*             set                 /**< global SCIP settings */
89   	   );
90   	
91   	/** initializes display column */
92   	SCIP_RETCODE SCIPdispInit(
93   	   SCIP_DISP*            disp,               /**< display column */
94   	   SCIP_SET*             set                 /**< global SCIP settings */
95   	   );
96   	
97   	/** deinitializes display column */
98   	SCIP_RETCODE SCIPdispExit(
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 */
104  	SCIP_RETCODE SCIPdispInitsol(
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 */
110  	SCIP_RETCODE SCIPdispExitsol(
111  	   SCIP_DISP*            disp,               /**< display column */
112  	   SCIP_SET*             set                 /**< global SCIP settings */
113  	   );
114  	
115  	/** output display column to screen */
116  	SCIP_RETCODE SCIPdispOutput(
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 */
123  	SCIP_RETCODE SCIPdispPrintLine(
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 */
133  	SCIP_RETCODE SCIPdispAutoActivate(
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
148