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