source: stable/2.5/Cbc/src/CbcStatistics.hpp @ 1510

Last change on this file since 1510 was 1432, checked in by bjarni, 10 years ago

Added extra return at end of each source file where needed, to remove possible linefeed conflicts (NightlyBuild? errors)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.4 KB
Line 
1/* $Id: CbcStatistics.hpp 1432 2010-02-07 19:33:53Z 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    }
35    // Parent node number
36    inline int parentNode() const {
37        return parentId_;
38    }
39    // depth
40    inline int depth() const {
41        return depth_;
42    }
43    // way
44    inline int way() const {
45        return way_;
46    }
47    // value
48    inline double value() const {
49        return value_;
50    }
51    // starting objective
52    inline double startingObjective() const {
53        return startingObjective_;
54    }
55    // Unsatisfied at beginning
56    inline int startingInfeasibility() const {
57        return startingInfeasibility_;
58    }
59    // starting objective
60    inline double endingObjective() const {
61        return endingObjective_;
62    }
63    // Unsatisfied at end
64    inline int endingInfeasibility() const {
65        return endingInfeasibility_;
66    }
67    // Number iterations
68    inline int numberIterations() const {
69        return numberIterations_;
70    }
71
72protected:
73    // Data
74    /// Value
75    double value_;
76    /// Starting objective
77    double startingObjective_;
78    /// Ending objective
79    double endingObjective_;
80    /// id
81    int id_;
82    /// parent id
83    int parentId_;
84    /// way -1 or +1 is first branch -10 or +10 is second branch
85    int way_;
86    /// sequence number branched on
87    int sequence_;
88    /// depth
89    int depth_;
90    /// starting number of integer infeasibilities
91    int startingInfeasibility_;
92    /// ending number of integer infeasibilities
93    int endingInfeasibility_;
94    /// number of iterations
95    int numberIterations_;
96};
97
98#endif
99
Note: See TracBrowser for help on using the repository browser.