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); 00052 bool activate(const OsiSolverInterface & si, const double * solution); 00054 00061 bool onOptimalPath(const OsiSolverInterface & si) const; 00063 00066 00067 bool active() const; 00069 00072 00073 OsiRowCutDebugger (); 00074 00078 OsiRowCutDebugger (const OsiSolverInterface & si, const char * model); 00079 00080 // Constructor with full solution (only integers need be correct) 00081 OsiRowCutDebugger (const OsiSolverInterface & si, const double * solution); 00082 00084 OsiRowCutDebugger ( 00085 const OsiRowCutDebugger &); 00086 00088 OsiRowCutDebugger & 00089 operator=( 00090 const OsiRowCutDebugger& rhs); 00091 00093 virtual 00094 ~OsiRowCutDebugger (); 00096 00097 private: 00098 00099 // Private member methods 00100 00101 00104 00106 00107 // Private member data 00108 00111 00112 int numberColumns_; 00114 bool * integerVariable_; 00116 double * optimalSolution_; 00118 }; 00119 00120 //############################################################################# 00126 void 00127 OsiRowCutDebuggerUnitTest(const OsiSolverInterface * siP, 00128 const std::string & mpsDir); 00129 00130 #endif