Couenne  0.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
CouenneBTPerfIndicator.hpp
Go to the documentation of this file.
1 /* $Id: CouenneBTPerfIndicator.hpp 1004 2013-10-13 16:04:19Z pbelotti $
2  *
3  * Name: CouenneBTPerfIndicator.hpp
4  * Author: Pietro Belotti
5  * Purpose: Measures performance of BT in terms of shrunken bounds
6  *
7  * (C) Pietro Belotti, 2011.
8  * This file is licensed under the Eclipse Public License (EPL)
9  */
10 
11 #ifndef COUENNEBTPERFINDICATOR_HPP
12 #define COUENNEBTPERFINDICATOR_HPP
13 
14 #include "CoinHelperFunctions.hpp"
15 #include <string.h>
16 
17 #include "CouenneTypes.hpp"
18 
19 namespace Couenne {
20 
21  class CouenneProblem;
22 
24 
25  protected:
26 
27  std::string name_;
28 
29  mutable double nFixed_;
30  mutable double boundRatio_;
31  mutable double shrunkInf_;
32  mutable double shrunkDoubleInf_;
33  mutable double nProvedInfeas_;
34 
35  mutable double weightSum_;
36 
37  mutable double *oldLB_;
38  mutable double *oldUB_;
39 
40  mutable double totalTime_;
41 
42  mutable int nRuns_;
43 
45 
46  bool stats_;
47 
48  public:
49 
50 
52  CouenneBTPerfIndicator (CouenneProblem *p, const std::string &name);
53 
56 
59 
62 
64  void setOldBounds (const CouNumber *lb, const CouNumber *ub) const;
65 
67  void addToTimer (double time) const;
68 
70  void update (const CouNumber *lb, const CouNumber *ub, int depth) const;
71  };
72 }
73 
74 #endif
CouenneBTPerfIndicator(CouenneProblem *p, const std::string &name)
Should stats be printed at the end? Copied from problem_ -&gt; Jnlst () -&gt; ProduceOutput (ERROR...
double nFixed_
Whose performance is this?
CouenneBTPerfIndicator & operator=(const CouenneBTPerfIndicator &rhs)
void addToTimer(double time) const
add to timer
double * oldLB_
total weight (used to give an average indicator at the end of Couenne)
double boundRatio_
number of fixed variables
double shrunkInf_
average bound width shrinkage
int nRuns_
CPU time spent on this.
void update(const CouNumber *lb, const CouNumber *ub, int depth) const
Class for MINLP problems with symbolic information.
double nProvedInfeas_
average # bounds that went from doubly infinite to infinite
void setOldBounds(const CouNumber *lb, const CouNumber *ub) const
double * oldUB_
old lower bounds (initial, i.e. before BT)
double shrunkDoubleInf_
average # bounds that went from infinite to finite (counts twice if [-inf,inf] to [a...
double CouNumber
main number type in Couenne
CouenneProblem * problem_
number of runs
double weightSum_
average # proofs of infeasibility