00001 #ifndef __RMOL_SVC_RMOL_SERVICE_CONTEXT_HPP 00002 #define __RMOL_SVC_RMOL_SERVICE_CONTEXT_HPP 00003 00004 // ////////////////////////////////////////////////////////////////////// 00005 // Import section 00006 // ////////////////////////////////////////////////////////////////////// 00007 // STL 00008 #include <string> 00009 // RMOL 00010 #include <rmol/RMOL_Types.hpp> 00011 #include <rmol/service/ServiceAbstract.hpp> 00012 00013 namespace RMOL { 00014 00016 class BucketHolder; 00017 class StudyStatManager; 00018 00020 class RMOL_ServiceContext : public ServiceAbstract { 00024 friend class RMOL_Service; 00025 friend class FacRmolServiceContext; 00026 00027 private: 00029 RMOL_ServiceContext (); 00030 RMOL_ServiceContext (const RMOL_ServiceContext&); 00031 RMOL_ServiceContext (const ResourceCapacity_T iResourceCapacity); 00032 void init (const ResourceCapacity_T iResourceCapacity); 00034 void initStudyStatManager (); 00036 ~RMOL_ServiceContext(); 00037 00039 void setResourceCapacity (const ResourceCapacity_T iResourceCapacity); 00040 00042 void setBucketHolder (BucketHolder* ioBucketHolderPtr) { 00043 _bucketHolder = ioBucketHolderPtr; 00044 } 00045 00047 void addBucket (const double iYieldRange, const double iDemandMean, 00048 const double iDemandStandardDev); 00049 00051 void addBucket (const double iYieldRange, const double iDemandMean, 00052 const double iDemandStandardDev, 00053 GeneratedDemandVector_T* ioGeneratedDemandVector); 00054 00056 GeneratedDemandVector_T* generateDemand (const int K, 00057 const double& iMean, 00058 const double& iDeviation); 00059 00061 GeneratedDemandVector_T* generateDemand (GeneratedDemandVector_T*, 00062 GeneratedDemandVector_T*); 00063 00065 void readFromInputFile (const std::string& iInputFileName); 00066 00069 void buildContextForMC (const int K); 00070 00072 void reset (); 00073 00075 BucketHolder* getBucketHolder() const { 00076 return _bucketHolder; 00077 } 00078 00080 StudyStatManager* getStudyStatManager () const { 00081 return _studyStatManager; 00082 } 00083 00085 ResourceCapacity_T getCapacity() const { 00086 return _capacity; 00087 } 00088 00089 public: 00091 void setUpStudyStatManager (); 00092 00093 private: 00095 BucketHolder* _bucketHolder; 00096 00098 ResourceCapacity_T _capacity; 00099 00101 StudyStatManager* _studyStatManager; 00102 00104 GeneratedDemandVectorHolder_T _generatedDemandVectorHolder; 00105 }; 00106 00107 } 00108 #endif // __RMOL_SVC_RMOL_SERVICE_CONTEXT_HPP
Generated on Sun Mar 7 13:11:11 2010 for RMOL by Doxygen 1.6.1