Couenne  0.5.8
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 & operator=(const CouenneBTPerfIndicator &rhs)
CouenneBTPerfIndicator(const CouenneBTPerfIndicator &rhs)
void addToTimer(double time) const
add to timer
CouenneProblem * problem_
number of runs
double shrunkDoubleInf_
average # bounds that went from infinite to finite (counts twice if [-inf,inf] to [a,...
void update(const CouNumber *lb, const CouNumber *ub, int depth) const
double nProvedInfeas_
average # bounds that went from doubly infinite to infinite
double shrunkInf_
average bound width shrinkage
CouenneBTPerfIndicator(CouenneProblem *p, const std::string &name)
Should stats be printed at the end? Copied from problem_ -> Jnlst () -> ProduceOutput (ERROR,...
void setOldBounds(const CouNumber *lb, const CouNumber *ub) const
double nFixed_
Whose performance is this?
double boundRatio_
number of fixed variables
double * oldUB_
old lower bounds (initial, i.e. before BT)
double weightSum_
average # proofs of infeasibility
double * oldLB_
total weight (used to give an average indicator at the end of Couenne)
Class for MINLP problems with symbolic information.
general include file for different compilers
double CouNumber
main number type in Couenne