source: branches/sandbox/Cbc/src/CbcStatistics.hpp @ 1273

Last change on this file since 1273 was 1271, checked in by forrest, 10 years ago

Creating new stable branch 2.4 from trunk (rev 1270)

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