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 disp.h 17 * @ingroup INTERNALAPI 18 * @brief internal methods for displaying runtime statistics 19 * @author Tobias Achterberg 20 */ 21 22 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/ 23 24 #ifndef __SCIP_DISP_H__ 25 #define __SCIP_DISP_H__ 26 27 28 #include <stdio.h> 29 30 #include "scip/def.h" 31 #include "blockmemshell/memory.h" 32 #include "scip/type_retcode.h" 33 #include "scip/type_set.h" 34 #include "scip/type_stat.h" 35 #include "scip/type_disp.h" 36 #include "scip/type_paramset.h" 37 #include "scip/pub_disp.h" 38 39 #ifdef __cplusplus 40 extern "C" { 41 #endif 42 43 /** parameter change information method to autoselect display columns again */ 44 SCIP_DECL_PARAMCHGD(SCIPparamChgdDispActive); 45 46 /** copies the given display to a new scip */ 47 SCIP_RETCODE SCIPdispCopyInclude( 48 SCIP_DISP* disp, /**< display column */ 49 SCIP_SET* set /**< SCIP_SET of SCIP to copy to */ 50 ); 51 52 /** creates a display column */ 53 SCIP_RETCODE SCIPdispCreate( 54 SCIP_DISP** disp, /**< pointer to store display column */ 55 SCIP_SET* set, /**< global SCIP settings */ 56 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */ 57 BMS_BLKMEM* blkmem, /**< block memory for parameter settings */ 58 const char* name, /**< name of display column */ 59 const char* desc, /**< description of display column */ 60 const char* header, /**< head line of display column */ 61 SCIP_DISPSTATUS dispstatus, /**< display activation status of display column */ 62 SCIP_DECL_DISPCOPY ((*dispcopy)), /**< copy method of display column or NULL if you don't want to copy your plugin into sub-SCIPs */ 63 SCIP_DECL_DISPFREE ((*dispfree)), /**< destructor of display column */ 64 SCIP_DECL_DISPINIT ((*dispinit)), /**< initialize display column */ 65 SCIP_DECL_DISPEXIT ((*dispexit)), /**< deinitialize display column */ 66 SCIP_DECL_DISPINITSOL ((*dispinitsol)), /**< solving process initialization method of display column */ 67 SCIP_DECL_DISPEXITSOL ((*dispexitsol)), /**< solving process deinitialization method of display column */ 68 SCIP_DECL_DISPOUTPUT ((*dispoutput)), /**< output method */ 69 SCIP_DISPDATA* dispdata, /**< display column data */ 70 int width, /**< width of display column (no. of chars used) */ 71 int priority, /**< priority of display column */ 72 int position, /**< relative position of display column */ 73 SCIP_Bool stripline /**< should the column be separated with a line from its right neighbor? */ 74 ); 75 76 /** frees memory of display column */ 77 SCIP_RETCODE SCIPdispFree( 78 SCIP_DISP** disp, /**< pointer to display column data structure */ 79 SCIP_SET* set /**< global SCIP settings */ 80 ); 81 82 /** initializes display column */ 83 SCIP_RETCODE SCIPdispInit( 84 SCIP_DISP* disp, /**< display column */ 85 SCIP_SET* set /**< global SCIP settings */ 86 ); 87 88 /** deinitializes display column */ 89 SCIP_RETCODE SCIPdispExit( 90 SCIP_DISP* disp, /**< display column */ 91 SCIP_SET* set /**< global SCIP settings */ 92 ); 93 94 /** informs display column that the branch and bound process is being started */ 95 SCIP_RETCODE SCIPdispInitsol( 96 SCIP_DISP* disp, /**< display column */ 97 SCIP_SET* set /**< global SCIP settings */ 98 ); 99 100 /** informs display column that the branch and bound process data is being freed */ 101 SCIP_RETCODE SCIPdispExitsol( 102 SCIP_DISP* disp, /**< display column */ 103 SCIP_SET* set /**< global SCIP settings */ 104 ); 105 106 /** output display column to screen */ 107 SCIP_RETCODE SCIPdispOutput( 108 SCIP_DISP* disp, /**< display column */ 109 SCIP_SET* set, /**< global SCIP settings */ 110 FILE* file /**< output file (or NULL for standard output) */ 111 ); 112 113 /** prints one line of output with the active display columns */ 114 SCIP_RETCODE SCIPdispPrintLine( 115 SCIP_SET* set, /**< global SCIP settings */ 116 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */ 117 SCIP_STAT* stat, /**< problem statistics data */ 118 FILE* file, /**< output file (or NULL for standard output) */ 119 SCIP_Bool forcedisplay, /**< should the line be printed without regarding frequency? */ 120 SCIP_Bool endline /**< should the line be terminated with a newline symbol? */ 121 ); 122 123 /** activates all display lines fitting in the display w.r. to priority */ 124 SCIP_RETCODE SCIPdispAutoActivate( 125 SCIP_SET* set /**< global SCIP settings */ 126 ); 127 128 /** changes the display column mode */ 129 void SCIPdispChgMode( 130 SCIP_DISP* disp, /**< display column */ 131 SCIP_DISPMODE mode /**< the display column mode */ 132 ); 133 134 #ifdef __cplusplus 135 } 136 #endif 137 138 #endif 139