Go to the documentation of this file.00001 #ifndef __RMOL_SVC_RMOL_SERVICE_HPP
00002 #define __RMOL_SVC_RMOL_SERVICE_HPP
00003
00004
00005
00006
00007
00008 #include <string>
00009
00010 #include <rmol/RMOL_Types.hpp>
00011 #include <rmol/RMOL_FORECASTER_Types.hpp>
00012
00013 namespace RMOL {
00014
00016 class RMOL_ServiceContext;
00017
00019 class RMOL_Service {
00020 public:
00022 RMOL_Service (std::ostream& ioLogStream);
00023
00024 RMOL_Service (std::ostream& ioLogStream,
00025 const ResourceCapacity_T iResourceCapacity);
00027 ~RMOL_Service();
00028
00030 void setUpStudyStatManager ();
00031
00033 void setResourceCapacity (const ResourceCapacity_T iResourceCapacity);
00034
00036 void addBucket (const double iYieldRange, const double iDemandMean,
00037 const double iDemandStandardDev);
00038
00040 void addBucket (const double iYieldRange, const double iDemandMean,
00041 const double iDemandStandardDev,
00042 GeneratedDemandVector_T* ioGeneratedDemandVector);
00043
00045 GeneratedDemandVector_T* generateDemand (const int K,
00046 const double& iMean,
00047 const double& iDeviation);
00048
00050 GeneratedDemandVector_T* generateDemand (GeneratedDemandVector_T*,
00051 GeneratedDemandVector_T*);
00052
00054 void readFromInputFile (const std::string& iInputFileName);
00055
00058 void buildContextForMC (const int K);
00059
00061 void reset ();
00062
00064 void optimalOptimisationByMCIntegration (const int K);
00065
00068 void optimalOptimisationByMCIntegration (const int K,
00069 BidPriceVector_T&,
00070 BookingLimitVector_T&);
00071
00073 void optimalOptimisationByDP ();
00074
00077 void optimalOptimisationByDP (BookingLimitVector_T&);
00078
00080 void heuristicOptimisationByEmsr ();
00081
00084 void heuristicOptimisationByEmsr (BidPriceVector_T&, BookingLimitVector_T&);
00085
00087 void heuristicOptimisationByEmsrA ();
00088
00091 void heuristicOptimisationByEmsrA (BidPriceVector_T&, BookingLimitVector_T&);
00092
00094 void heuristicOptimisationByEmsrAwithSellup (SellupProbabilityVector_T&);
00095
00098 void heuristicOptimisationByEmsrAwithSellup (SellupProbabilityVector_T&,
00099 BidPriceVector_T&,
00100 BookingLimitVector_T&);
00101
00103 void heuristicOptimisationByEmsrB ();
00104
00107 void heuristicOptimisationByEmsrB (BidPriceVector_T&, BookingLimitVector_T&);
00108
00111 void legOptimisationByMC ();
00112
00115 void legOptimisationByMC (BidPriceVector_T&, BookingLimitVector_T&);
00116
00118 void demandUnconstrainingByExpectationMaximization ();
00119
00121 void demandForecastByQForecasting (HistoricalDataHolderHolder_T&,
00122 PriceHolder_T&);
00123
00125 void demandForecastByQForecasting (ForecastedDemandParameterList_T,
00126 HistoricalDataHolderHolder_T&,
00127 PriceHolder_T&);
00128
00129 private:
00131 RMOL_Service ();
00132 RMOL_Service (const RMOL_Service&);
00133
00135 void init (std::ostream& ioLogStream);
00136
00137 void init (std::ostream& ioLogStream,
00138 const ResourceCapacity_T iResourceCapacity);
00139
00141 void logInit (const LOG::EN_LogLevel iLogLevel, std::ostream& ioLogStream);
00142
00144 void finalise ();
00145
00146 private:
00147
00149 RMOL_ServiceContext* _rmolServiceContext;
00150 };
00151 }
00152 #endif // __RMOL_SVC_RMOL_SERVICE_HPP