00001 /* $Id: OSBlockCoinSolver.h 3038 2009-11-07 11:43:44Z Gassmann $ */ 00016 #ifndef OSDIPBLOCKCOINSOLVER_H 00017 #define OSDIPBLOCKCOINSOLVER_H 00018 00019 // --------------------------------------------------------------------- // 00020 #include "OSDipBlockSolver.h" 00021 #include "OSDataStructures.h" 00022 #include "OSDefaultSolver.h" 00023 #include "OSCoinSolver.h" 00024 #include "OSrLReader.h" 00025 00026 #include "OSDipBlockSolverFactory.h" 00027 00028 // --------------------------------------------------------------------- // 00036 // --------------------------------------------------------------------- // 00037 class OSDipBlockCoinSolver : public OSDipBlockSolver { 00038 public: 00039 00040 00041 OSInstance *m_osinstance; 00042 OSResult *m_osresult; 00043 int m_numberOfVar; 00044 // first declare a generic solver 00045 CoinSolver *m_solver ; 00046 00047 00048 00049 00061 virtual void solve(double *cost, std::vector<IndexValuePair*> *solIndexValPair, double *optVal) ; 00062 00063 00074 virtual void solve(double *cost, std::string *osrl) ; 00075 00080 OSDipBlockCoinSolver(); 00081 00082 00087 OSDipBlockCoinSolver( OSInstance *osinstance); 00088 00093 ~OSDipBlockCoinSolver(); 00094 00095 class Factory; 00096 class Factory : public OSDipBlockSolverFactory{ 00097 00098 public: 00099 00100 Factory(){ 00101 00102 } 00103 00104 ~Factory(){ 00105 00106 } 00107 00108 OSDipBlockSolver* create() { return new OSDipBlockCoinSolver( osinstance); }; 00109 00110 };// end class OSDipBlockSolverFactory 00111 00112 00113 // 00114 };//end class OSDipBlockCoinSolver 00115 00116 00117 00118 00119 #endif