00001 /* $Id: OSBlockBearcatSolver.h 3038 2009-11-07 11:43:44Z kmartin $ */ 00016 #ifndef OSDIPBLOCKBEARCATSOLVER_H 00017 #define OSDIPBLOCKBEARCATSOLVER_H 00018 00019 // --------------------------------------------------------------------- // 00020 #include "OSDipBlockSolver.h" 00021 #include "OSDataStructures.h" 00022 #include "OSDefaultSolver.h" 00023 #include "OSrLReader.h" 00024 00025 #include "OSDipBlockSolverFactory.h" 00026 00027 // --------------------------------------------------------------------- // 00035 // --------------------------------------------------------------------- // 00036 class OSDipBlockBearcatSolver : public OSDipBlockSolver { 00037 public: 00038 00039 00040 OSInstance *m_osinstance; 00041 OSOption *m_osoption; 00042 OSResult *m_osresult; 00043 00044 //variables for the dynamic programming solution 00045 int m_numberOfVar; 00046 int m_numHubs; 00047 int m_numNodes; 00048 int m_totalDemand; 00049 int m_minDemand; 00050 int* m_demand; 00051 00052 double** m_u; 00053 double** m_v; 00054 int** m_px; 00055 int** m_tx; 00056 double** m_g; 00057 00058 int* m_varIdx; 00059 //end variables for the dynamic programming solution 00060 00061 std::vector<IndexValuePair*> m_primalVals; 00062 00063 00064 double qrouteCost(const int& k, const int& l, double* c, int* kountVar) ; 00065 00066 00078 virtual void solve(double *cost, std::vector<IndexValuePair*> *solIndexValPair, double *optVal) ; 00079 00080 00091 virtual void solve(double *cost, std::string *osrl) ; 00092 00097 OSDipBlockBearcatSolver(); 00098 00099 00104 OSDipBlockBearcatSolver( OSInstance *osinstance, OSOption *osoption); 00105 00110 ~OSDipBlockBearcatSolver(); 00111 00112 class Factory; 00113 class Factory : public OSDipBlockSolverFactory{ 00114 00115 public: 00116 00117 Factory(){ 00118 00119 } 00120 00121 ~Factory(){ 00122 00123 } 00124 00125 OSDipBlockSolver* create() { return new OSDipBlockBearcatSolver( osinstance, osoption); }; 00126 00127 };// end class OSDipBlockSolverFactory 00128 00129 00130 // 00131 };//end class OSDipBlockBearcatSolver 00132 00133 00134 00135 00136 #endif