Scippy

SoPlex

Sequential object-oriented simPlex

statistics.h
Go to the documentation of this file.
1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2 /* */
3 /* This file is part of the class library */
4 /* SoPlex --- the Sequential object-oriented simPlex. */
5 /* */
6 /* Copyright (C) 1996-2015 Konrad-Zuse-Zentrum */
7 /* fuer Informationstechnik Berlin */
8 /* */
9 /* SoPlex is distributed under the terms of the ZIB Academic Licence. */
10 /* */
11 /* You should have received a copy of the ZIB Academic License */
12 /* along with SoPlex; see the file COPYING. If not email to soplex@zib.de. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file statistics.h
17  * @brief Class for collecting statistical information
18  */
19 #ifndef _STATISTICS_H_
20 #define _STATISTICS_H_
21 
22 #ifndef SOPLEX_LEGACY
23 #include <iostream>
24 
25 #include "soplex.h"
26 #include "timer.h"
27 
28 namespace soplex
29 {
30  /**@class Statistics
31  * @brief Class for collecting statistical information
32  * @ingroup Algo
33  */
35  {
36 
37  public:
38 
39  //**@name Construction, resetting, printing */
40  //@{
41 
42  /// default constructor
44 
45  /// copy constructor
46  Statistics(const Statistics& base);
47 
48  /// assignment operator
49  Statistics& operator=(const Statistics& rhs);
50 
51  /// destructor
53  {
54  // we need to free all timers again (allocation happens in constructor)
59  syncTime->~Timer();
71  }
72 
73  /// clears all statistics
74  void clearAllData();
75 
76  /// clears statistics on solving process
77  void clearSolvingData();
78 
79  /// prints statistics
80  void print(std::ostream& os);
81 
82  //@}
83 
84 
85  //**@name Data */
86  //@{
87 
88  Timer* readingTime; ///< reading time not included in solving time
89  Timer* solvingTime; ///< solving time
90  Timer* preprocessingTime; ///< preprocessing time
91  Timer* simplexTime; ///< simplex time
92  Timer* syncTime; ///< time for synchronization between real and rational LP (included in solving time)
93  Timer* transformTime; ///< time for transforming LPs (included in solving time)
94  Timer* rationalTime; ///< time for rational LP solving (included in solving time)
95  Timer* reconstructionTime; ///< time for rational reconstructions
96  Timer::TYPE timerType; ///< type of timer (user or wallclock)
97  Real luFactorizationTimeReal; ///< time for factorizing bases matrices in real precision
98  Real luSolveTimeReal; ///< time for solving linear systems in real precision
99  Real luFactorizationTimeRational; ///< time for factorizing bases matrices in rational precision
100  Real luSolveTimeRational; ///< time for solving linear systems in rational precision
101  int iterations; ///< number of iterations/pivots
102  int iterationsPrimal; ///< number of iterations with Primal
103  int iterationsFromBasis; ///< number of iterations from Basis
104  int boundflips; ///< number of dual bound flips
105  int luFactorizationsReal; ///< number of basis matrix factorizations in real precision
106  int luSolvesReal; ///< number of (forward and backward) solves with basis matrix in real precision
107  int luFactorizationsRational; ///< number of basis matrix factorizations in rational precision
108  int rationalReconstructions; ///< number of rational reconstructions performed
109  int refinements; ///< number of refinement steps
110  int stallRefinements; ///< number of refinement steps without pivots
111  int pivotRefinements; ///< number of refinement steps until final basis is reached
112  int feasRefinements; ///< number of refinement steps during infeasibility test
113  int unbdRefinements; ///< number of refinement steps during undboundedness test
114 
115  //@}
116  };
117 } // namespace soplex
118 #endif
119 #endif // _STATISTICS_H_