00001 // Copyright (C) 2000, International Business Machines 00002 // Corporation and others. All Rights Reserved. 00003 #ifndef OsiRowCutDebugger_H 00004 #define OsiRowCutDebugger_H 00005 00006 #include <string> 00007 00008 #include "OsiCuts.hpp" 00009 #include "OsiSolverInterface.hpp" 00010 00012 class OsiRowCutDebugger { 00013 friend void OsiRowCutDebuggerUnitTest(const OsiSolverInterface * siP, 00014 const std::string & mpsDir); 00015 00016 public: 00017 00030 virtual int validateCuts(const OsiCuts & cs, int first, int last) const; 00031 00033 virtual bool invalidCut(const OsiRowCut & rowcut) const; 00034 00036 const double * optimalSolution() const 00037 { return optimalSolution_;}; 00039 00046 bool activate(const OsiSolverInterface & si, const char * model); 00048 00055 bool onOptimalPath(const OsiSolverInterface & si) const; 00057 00060 00061 bool active() const; 00063 00066 00067 OsiRowCutDebugger (); 00068 00072 OsiRowCutDebugger (const OsiSolverInterface & si, const char * model); 00073 00074 #if 0 00075 // Constructor with integer solution 00076 // Not implemented - would it be useful? 00077 OsiRowCutDebugger (const OsiSolverInterface & si, int numberIntegers, 00078 const int * sequence, const int * values); 00079 #endif 00080 00082 OsiRowCutDebugger ( 00083 const OsiRowCutDebugger &); 00084 00086 OsiRowCutDebugger & 00087 operator=( 00088 const OsiRowCutDebugger& rhs); 00089 00091 virtual 00092 ~OsiRowCutDebugger (); 00094 00095 private: 00096 00097 // Private member methods 00098 00099 00102 00104 00105 // Private member data 00106 00109 00110 int numberColumns_; 00112 bool * integerVariable_; 00114 double * optimalSolution_; 00116 }; 00117 00118 //############################################################################# 00124 void 00125 OsiRowCutDebuggerUnitTest(const OsiSolverInterface * siP, 00126 const std::string & mpsDir); 00127 00128 #endif