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-2016 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_
int unbdRefinements
number of refinement steps during undboundedness test
Definition: statistics.h:113
Timer * syncTime
time for synchronization between real and rational LP (included in solving time)
Definition: statistics.h:92
int feasRefinements
number of refinement steps during infeasibility test
Definition: statistics.h:112
int stallRefinements
number of refinement steps without pivots
Definition: statistics.h:110
virtual ~Timer()
Definition: timer.h:124
Timer * simplexTime
simplex time
Definition: statistics.h:91
int luSolvesReal
number of (forward and backward) solves with basis matrix in real precision
Definition: statistics.h:106
int refinements
number of refinement steps
Definition: statistics.h:109
int luFactorizationsReal
number of basis matrix factorizations in real precision
Definition: statistics.h:105
Real luFactorizationTimeReal
time for factorizing bases matrices in real precision
Definition: statistics.h:97
double Real
SOPLEX_DEBUG.
Definition: spxdefines.h:200
Timer * rationalTime
time for rational LP solving (included in solving time)
Definition: statistics.h:94
Real luSolveTimeRational
time for solving linear systems in rational precision
Definition: statistics.h:100
~Statistics()
destructor
Definition: statistics.h:52
Preconfigured SoPlex LP solver.
int luFactorizationsRational
number of basis matrix factorizations in rational precision
Definition: statistics.h:107
Timer * preprocessingTime
preprocessing time
Definition: statistics.h:90
Real luSolveTimeReal
time for solving linear systems in real precision
Definition: statistics.h:98
Timer * reconstructionTime
time for rational reconstructions
Definition: statistics.h:95
Everything should be within this namespace.
Timer class.
Timer::TYPE timerType
type of timer (user or wallclock)
Definition: statistics.h:96
TYPE
types of timers
Definition: timer.h:99
int iterations
number of iterations/pivots
Definition: statistics.h:101
int boundflips
number of dual bound flips
Definition: statistics.h:104
void clearAllData()
clears all statistics
Definition: statistics.cpp:90
void print(std::ostream &os)
prints statistics
Definition: statistics.cpp:126
void clearSolvingData()
clears statistics on solving process
Definition: statistics.cpp:97
Timer * readingTime
reading time not included in solving time
Definition: statistics.h:88
int iterationsFromBasis
number of iterations from Basis
Definition: statistics.h:103
Statistics & operator=(const Statistics &rhs)
assignment operator
Definition: statistics.cpp:57
Timer * solvingTime
solving time
Definition: statistics.h:89
Statistics(Timer::TYPE ttype=Timer::USER_TIME)
default constructor
Definition: statistics.cpp:27
int iterationsPrimal
number of iterations with Primal
Definition: statistics.h:102
Timer * transformTime
time for transforming LPs (included in solving time)
Definition: statistics.h:93
Real luFactorizationTimeRational
time for factorizing bases matrices in rational precision
Definition: statistics.h:99
Wrapper for the system time query methods.
Definition: timer.h:76
int rationalReconstructions
number of rational reconstructions performed
Definition: statistics.h:108
void spx_free(T &p)
Release memory.
Definition: spxalloc.h:109
int pivotRefinements
number of refinement steps until final basis is reached
Definition: statistics.h:111