Scippy

SCIP

Solving Constraint Integer Programs

stat.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-2016 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 email to scip@zib.de. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file stat.h
17  * @brief internal methods for problem statistics
18  * @author Tobias Achterberg
19  */
20 
21 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
22 
23 #ifndef __SCIP_STAT_H__
24 #define __SCIP_STAT_H__
25 
26 
27 #include "scip/def.h"
28 #include "blockmemshell/memory.h"
29 #include "scip/type_prob.h"
30 #include "scip/type_retcode.h"
31 #include "scip/type_set.h"
32 #include "scip/type_stat.h"
33 #include "scip/type_mem.h"
34 #include "scip/pub_message.h"
35 
36 #include "scip/struct_stat.h"
37 
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
41 
42 /** creates problem statistics data */
43 extern
45  SCIP_STAT** stat, /**< pointer to problem statistics data */
46  BMS_BLKMEM* blkmem, /**< block memory */
47  SCIP_SET* set, /**< global SCIP settings */
48  SCIP_MESSAGEHDLR* messagehdlr /**< message handler */
49  );
50 
51 /** frees problem statistics data */
52 extern
54  SCIP_STAT** stat, /**< pointer to problem statistics data */
55  BMS_BLKMEM* blkmem /**< block memory */
56  );
57 
58 /** diables the collection of any statistic for a variable */
59 extern
61  SCIP_STAT* stat /**< problem statistics data */
62  );
63 
64 /** enables the collection of statistics for a variable */
65 extern
67  SCIP_STAT* stat /**< problem statistics data */
68  );
69 
70 /** marks statistics to be able to reset them when solving process is freed */
71 extern
72 void SCIPstatMark(
73  SCIP_STAT* stat /**< problem statistics data */
74  );
75 
76 /** reset statistics to the data before solving started */
77 extern
78 void SCIPstatReset(
79  SCIP_STAT* stat, /**< problem statistics data */
80  SCIP_SET* set /**< global SCIP settings */
81  );
82 
83 /** reset implication counter */
84 extern
86  SCIP_STAT* stat /**< problem statistics data */
87  );
88 
89 /** reset presolving and current run specific statistics */
90 extern
92  SCIP_STAT* stat /**< problem statistics data */
93  );
94 
95 /* reset primal-dual integral */
96 extern
98  SCIP_STAT* stat, /**< problem statistics data */
99  SCIP_SET* set, /**< global SCIP settings */
100  SCIP_Bool partialreset /**< should time and integral value be kept? (in combination with no statistical
101  * reset, integrals are added for each problem to be solved) */
102  );
103 
104 /** update the primal-dual integral statistic. method accepts + and - SCIPsetInfinity() as values for
105  * upper and lower bound, respectively
106  */
107 extern
109  SCIP_STAT* stat, /**< problem statistics data */
110  SCIP_SET* set, /**< global SCIP settings */
111  SCIP_PROB* transprob, /**< transformed problem */
112  SCIP_PROB* origprob, /**< original problem */
113  SCIP_Real primalbound, /**< current primal bound in transformed problem, or infinity */
114  SCIP_Real dualbound /**< current lower bound in transformed space, or -infinity */
115  );
116 
117 /** reset current branch and bound run specific statistics */
118 extern
120  SCIP_STAT* stat, /**< problem statistics data */
121  SCIP_Bool solved /**< is problem already solved? */
122  );
123 
124 /** resets display statistics, such that a new header line is displayed before the next display line */
125 extern
127  SCIP_STAT* stat /**< problem statistics data */
128  );
129 
130 /** increases LP count, such that all lazy updates depending on the LP are enforced again */
131 extern
133  SCIP_STAT* stat /**< problem statistics data */
134  );
135 
136 /** depending on the current memory usage, switches mode flag to standard or memory saving mode */
137 extern
139  SCIP_STAT* stat, /**< problem statistics data */
140  SCIP_SET* set, /**< global SCIP settings */
141  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
142  SCIP_MEM* mem /**< block memory pools */
143  );
144 
145 /** enables or disables all statistic clocks of \p stat concerning LP execution time, strong branching time, etc.
146  *
147  * @note: The (pre-)solving time clocks which are relevant for the output during (pre-)solving
148  * are not affected by this method
149  *
150  * @see: For completely disabling all timing of SCIP, consider setting the parameter timing/enabled to FALSE
151  */
152 extern
154  SCIP_STAT* stat, /**< SCIP statistics */
155  SCIP_Bool enable /**< should the LP clocks be enabled? */
156  );
157 
158 #ifdef __cplusplus
159 }
160 #endif
161 
162 #endif
void SCIPstatEnableOrDisableStatClocks(SCIP_STAT *stat, SCIP_Bool enable)
Definition: stat.c:556
void SCIPstatReset(SCIP_STAT *stat, SCIP_SET *set)
Definition: stat.c:170
void SCIPstatResetImplications(SCIP_STAT *stat)
Definition: stat.c:298
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:53
type definitions for global SCIP settings
void SCIPstatMark(SCIP_STAT *stat)
Definition: stat.c:158
type definitions for return codes for SCIP methods
SCIP_RETCODE SCIPstatCreate(SCIP_STAT **stat, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr)
Definition: stat.c:43
void SCIPstatResetPresolving(SCIP_STAT *stat)
Definition: stat.c:308
type definitions for problem statistics
void SCIPstatResetCurrentRun(SCIP_STAT *stat, SCIP_Bool solved)
Definition: stat.c:450
void SCIPstatEnforceLPUpdates(SCIP_STAT *stat)
Definition: stat.c:501
#define SCIP_Bool
Definition: def.h:53
void SCIPstatResetPrimalDualIntegral(SCIP_STAT *stat, SCIP_SET *set, SCIP_Bool partialreset)
Definition: stat.c:333
datastructures for problem statistics
type definitions for storing and manipulating the main problem
SCIP_RETCODE SCIPstatFree(SCIP_STAT **stat, BMS_BLKMEM *blkmem)
Definition: stat.c:100
void SCIPstatResetDisplay(SCIP_STAT *stat)
Definition: stat.c:490
type definitions for block memory pools and memory buffers
void SCIPstatEnableVarHistory(SCIP_STAT *stat)
Definition: stat.c:148
public methods for message output
#define SCIP_Real
Definition: def.h:127
void SCIPstatUpdatePrimalDualIntegral(SCIP_STAT *stat, SCIP_SET *set, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_Real primalbound, SCIP_Real dualbound)
Definition: stat.c:359
common defines and data types used in all packages of SCIP
struct BMS_BlkMem BMS_BLKMEM
Definition: memory.h:392
void SCIPstatDisableVarHistory(SCIP_STAT *stat)
Definition: stat.c:138
void SCIPstatUpdateMemsaveMode(SCIP_STAT *stat, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, SCIP_MEM *mem)
Definition: stat.c:511
memory allocation routines