00001 // Copyright (C) 2000, International Business Machines 00002 // Corporation and others. All Rights Reserved. 00003 00004 #ifndef CglTreeInfo_H 00005 #define CglTreeInfo_H 00006 00007 #include "OsiCuts.hpp" 00008 #include "OsiSolverInterface.hpp" 00009 00012 class CglTreeInfo { 00013 public: 00015 int level; 00018 int pass; 00021 int formulation_rows; 00023 bool inTree; 00033 OsiRowCut ** strengthenRow; 00035 CglTreeInfo (); 00036 00038 CglTreeInfo ( 00039 const CglTreeInfo &); 00041 virtual CglTreeInfo * clone() const; 00042 00044 CglTreeInfo & 00045 operator=( 00046 const CglTreeInfo& rhs); 00047 00049 virtual 00050 ~CglTreeInfo (); 00052 virtual void fixes(int variable, int toValue, int fixedVariable,double fixedToValue) {} 00054 virtual bool initializeFixing() {return false;} 00055 00056 }; 00057 00059 typedef struct { 00060 unsigned int oneFixed:1; // nonzero if variable fixed to 1 00061 unsigned int sequence:31; // variable (in matrix) 00062 } fixEntry; 00063 00064 class CglTreeProbingInfo : public CglTreeInfo { 00065 public: 00067 CglTreeProbingInfo (); 00069 CglTreeProbingInfo (const OsiSolverInterface * model); 00070 00072 CglTreeProbingInfo ( 00073 const CglTreeProbingInfo &); 00075 virtual CglTreeInfo * clone() const; 00076 00078 CglTreeProbingInfo & 00079 operator=( 00080 const CglTreeProbingInfo& rhs); 00081 00083 virtual 00084 ~CglTreeProbingInfo (); 00086 virtual void fixes(int variable, int toValue, int fixedVariable,double fixedToValue); 00088 virtual bool initializeFixing() ; 00090 inline fixEntry * fixEntries() const 00091 { return fixEntry_;} 00093 inline int * toZero() const 00094 { return toZero_;} 00096 inline int * toOne() const 00097 { return toOne_;} 00099 inline int * integerVariable() const 00100 { return integerVariable_;} 00102 inline int * backward() const 00103 { return backward_;} 00105 inline int numberVariables() const 00106 { return numberVariables_;} 00108 inline int numberIntegers() const 00109 { return numberIntegers_;} 00110 protected: 00112 fixEntry * fixEntry_; 00114 int * toZero_; 00116 int * toOne_; 00118 int * integerVariable_; 00120 int * backward_; 00122 int numberVariables_; 00124 int numberIntegers_; 00126 int maximumEntries_; 00128 int lastInteger_; 00129 }; 00130 00131 #endif