/build/buildd/coinor-cbc-2.5.0/Cbc/src/CbcStatistics.hpp
Go to the documentation of this file.
00001 /* $Id: CbcStatistics.hpp 1432 2010-02-07 19:33:53Z bjarni $ */
00002 // Copyright (C) 2005, International Business Machines
00003 // Corporation and others.  All Rights Reserved.
00004 #ifndef CbcStatistics_H
00005 #define CbcStatistics_H
00006 
00007 #include "CbcModel.hpp"
00008 
00011 class CbcStatistics {
00012 public:
00013     // Default Constructor
00014     CbcStatistics ();
00015     // Branch
00016     CbcStatistics(CbcNode * node, CbcModel * model);
00017 
00018     ~CbcStatistics();
00019     // Copy
00020     CbcStatistics(const CbcStatistics & rhs);
00021     // Assignment
00022     CbcStatistics& operator=(const CbcStatistics & rhs);
00023     // Update at end of branch
00024     void endOfBranch(int numberIterations, double objectiveValue);
00025     // Update number of infeasibilities
00026     void updateInfeasibility(int numberInfeasibilities);
00027     // Branch found to be infeasible by chooseBranch
00028     void sayInfeasible();
00029     // Just prints
00030     void print(const int * sequenceLookup = NULL) const;
00031     // Node number
00032     inline int node() const {
00033         return id_;
00034     }
00035     // Parent node number
00036     inline int parentNode() const {
00037         return parentId_;
00038     }
00039     // depth
00040     inline int depth() const {
00041         return depth_;
00042     }
00043     // way
00044     inline int way() const {
00045         return way_;
00046     }
00047     // value
00048     inline double value() const {
00049         return value_;
00050     }
00051     // starting objective
00052     inline double startingObjective() const {
00053         return startingObjective_;
00054     }
00055     // Unsatisfied at beginning
00056     inline int startingInfeasibility() const {
00057         return startingInfeasibility_;
00058     }
00059     // starting objective
00060     inline double endingObjective() const {
00061         return endingObjective_;
00062     }
00063     // Unsatisfied at end
00064     inline int endingInfeasibility() const {
00065         return endingInfeasibility_;
00066     }
00067     // Number iterations
00068     inline int numberIterations() const {
00069         return numberIterations_;
00070     }
00071 
00072 protected:
00073     // Data
00075     double value_;
00077     double startingObjective_;
00079     double endingObjective_;
00081     int id_;
00083     int parentId_;
00085     int way_;
00087     int sequence_;
00089     int depth_;
00091     int startingInfeasibility_;
00093     int endingInfeasibility_;
00095     int numberIterations_;
00096 };
00097 
00098 #endif
00099