00001 00016 #ifndef COINSOLVER_H 00017 #define COINSOLVER_H 00018 00019 #include <CoinPackedMatrix.hpp> 00020 #include <OsiSolverInterface.hpp> 00021 #include <OsiClpSolverInterface.hpp> 00022 #include <OsiCbcSolverInterface.hpp> 00023 00024 #include "OSConfig.h" 00025 #include "DefaultSolver.h" 00026 #include "OSrLWriter.h" 00027 #include "ErrorClass.h" 00028 00029 #ifdef COIN_HAS_CPX 00030 #include <OsiCpxSolverInterface.hpp> 00031 #endif 00032 00033 #ifdef COIN_HAS_GLPK 00034 #include <OsiGlpkSolverInterface.hpp> 00035 #endif 00036 00037 #ifdef COIN_HAS_DYLP 00038 #include <OsiDylpSolverInterface.hpp> 00039 #endif 00040 00041 #ifdef COIN_HAS_SYMPHONY 00042 #include <OsiSymSolverInterface.hpp> 00043 #endif 00044 00045 #ifdef COIN_HAS_VOL 00046 #include <OsiVolSolverInterface.hpp> 00047 #endif 00048 00049 #include <string> 00050 00051 00058 class CoinSolver : public DefaultSolver{ 00059 00060 public: 00061 00065 CoinSolver(); 00066 00070 ~CoinSolver(); 00071 00076 virtual void solve() throw(ErrorClass); 00077 00082 bool optimize(); 00083 00088 bool setCoinPackedMatrix(); 00089 00095 std::string getCoinSolverType(std::string osol_); 00096 00101 void dataEchoCheck(); 00102 00103 00104 00105 private: 00106 00107 00108 00112 OsiSolverInterface *m_OsiSolver; 00113 00117 CoinPackedMatrix *m_CoinPackedMatrix ; 00118 00120 OSrLWriter *osrlwriter; 00121 00122 }; 00123 #endif