source: branches/devel/Cbc/src/CbcStatistics.hpp @ 616

Last change on this file since 616 was 310, checked in by andreasw, 14 years ago

first commit for autotools conversion to be able to move more files

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.1 KB
Line 
1// Copyright (C) 2005, International Business Machines
2// Corporation and others.  All Rights Reserved.
3#ifndef CbcStatistics_H
4#define CbcStatistics_H
5
6#include "CbcModel.hpp"
7
8/** For gathering statistics */
9
10class CbcStatistics {
11public:
12  // Default Constructor
13  CbcStatistics ();
14  // Branch
15  CbcStatistics(CbcNode * node);
16
17  ~CbcStatistics();
18  // Copy
19  CbcStatistics(const CbcStatistics & rhs);
20  // Assignment
21  CbcStatistics& operator=(const CbcStatistics & rhs);
22  // Update at end of branch
23  void endOfBranch(int numberIterations, double objectiveValue);
24  // Update number of infeasibilities
25  void updateInfeasibility(int numberInfeasibilities);
26  // Branch found to be infeasible by chooseBranch
27  void sayInfeasible();
28  // Just prints
29  void print(const int * sequenceLookup=NULL) const;
30  // Node number
31  inline int node() const
32  { return id_;};
33  // Parent node number
34  inline int parentNode() const
35  { return parentId_;};
36  // depth
37  inline int depth() const
38  { return depth_;};
39  // way
40  inline int way() const
41  { return way_;};
42  // value
43  inline double value() const
44  { return value_;};
45  // starting objective
46  inline double startingObjective() const
47  { return startingObjective_;};
48  // Unsatisfied at beginning
49  inline int startingInfeasibility() const
50  { return startingInfeasibility_;};
51  // starting objective
52  inline double endingObjective() const
53  { return endingObjective_;};
54  // Unsatisfied at end
55  inline int endingInfeasibility() const
56  { return endingInfeasibility_;};
57  // Number iterations
58  inline int numberIterations() const
59  { return numberIterations_;};
60
61protected:
62  // Data
63  /// Value
64  double value_;
65  /// Starting objective
66  double startingObjective_;
67  /// Ending objective
68  double endingObjective_;
69  /// id
70  int id_;
71  /// parent id
72  int parentId_;
73  /// way -1 or +1 is first branch -10 or +10 is second branch
74  int way_;
75  /// sequence number branched on
76  int sequence_;
77  /// depth
78  int depth_;
79  /// starting number of integer infeasibilities
80  int startingInfeasibility_;
81  /// ending number of integer infeasibilities
82  int endingInfeasibility_;
83  /// number of iterations
84  int numberIterations_;
85};
86
87#endif
Note: See TracBrowser for help on using the repository browser.