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
Couenne::CouenneBTPerfIndicator::shrunkInf_
double shrunkInf_
average bound width shrinkage
Definition: CouenneBTPerfIndicator.hpp:31
Couenne::CouenneBTPerfIndicator::~CouenneBTPerfIndicator
~CouenneBTPerfIndicator()
Couenne::CouenneBTPerfIndicator::setOldBounds
void setOldBounds(const CouNumber *lb, const CouNumber *ub) const
Couenne::CouenneBTPerfIndicator::problem_
CouenneProblem * problem_
number of runs
Definition: CouenneBTPerfIndicator.hpp:44
Couenne::CouenneBTPerfIndicator::weightSum_
double weightSum_
average # proofs of infeasibility
Definition: CouenneBTPerfIndicator.hpp:35
Couenne::CouenneBTPerfIndicator::stats_
bool stats_
Couenne problem info.
Definition: CouenneBTPerfIndicator.hpp:46
Couenne::CouenneBTPerfIndicator::CouenneBTPerfIndicator
CouenneBTPerfIndicator(CouenneProblem *p, const std::string &name)
Should stats be printed at the end? Copied from problem_ -> Jnlst () -> ProduceOutput (ERROR,...
Couenne::CouenneBTPerfIndicator::oldLB_
double * oldLB_
total weight (used to give an average indicator at the end of Couenne)
Definition: CouenneBTPerfIndicator.hpp:37
Couenne
general include file for different compilers
Definition: CouenneAggrProbing.hpp:24
Couenne::CouenneBTPerfIndicator::boundRatio_
double boundRatio_
number of fixed variables
Definition: CouenneBTPerfIndicator.hpp:30
Couenne::CouenneBTPerfIndicator::update
void update(const CouNumber *lb, const CouNumber *ub, int depth) const
Couenne::CouNumber
double CouNumber
main number type in Couenne
Definition: CouenneTypes.hpp:100
Couenne::CouenneBTPerfIndicator::nRuns_
int nRuns_
CPU time spent on this.
Definition: CouenneBTPerfIndicator.hpp:42
Couenne::CouenneBTPerfIndicator
Definition: CouenneBTPerfIndicator.hpp:23
CouenneTypes.hpp
Couenne::CouenneBTPerfIndicator::name_
std::string name_
Definition: CouenneBTPerfIndicator.hpp:27
Couenne::CouenneBTPerfIndicator::shrunkDoubleInf_
double shrunkDoubleInf_
average # bounds that went from infinite to finite (counts twice if [-inf,inf] to [a,...
Definition: CouenneBTPerfIndicator.hpp:32
CoinHelperFunctions.hpp
Couenne::CouenneBTPerfIndicator::addToTimer
void addToTimer(double time) const
add to timer
Couenne::CouenneBTPerfIndicator::operator=
CouenneBTPerfIndicator & operator=(const CouenneBTPerfIndicator &rhs)
Couenne::CouenneProblem
Class for MINLP problems with symbolic information.
Definition: CouenneProblem.hpp:169
Couenne::CouenneBTPerfIndicator::nProvedInfeas_
double nProvedInfeas_
average # bounds that went from doubly infinite to infinite
Definition: CouenneBTPerfIndicator.hpp:33
Couenne::CouenneBTPerfIndicator::oldUB_
double * oldUB_
old lower bounds (initial, i.e. before BT)
Definition: CouenneBTPerfIndicator.hpp:38
Couenne::CouenneBTPerfIndicator::totalTime_
double totalTime_
old upper bounds
Definition: CouenneBTPerfIndicator.hpp:40
Couenne::CouenneBTPerfIndicator::nFixed_
double nFixed_
Whose performance is this?
Definition: CouenneBTPerfIndicator.hpp:29