RMOL Logo Get Revenue Management Optimisation Library at SourceForge.net. Fast, secure and Free Open Source software downloads

RMOL_Service.hpp

Go to the documentation of this file.
00001 #ifndef __RMOL_SVC_RMOL_SERVICE_HPP
00002 #define __RMOL_SVC_RMOL_SERVICE_HPP
00003 
00004 // //////////////////////////////////////////////////////////////////////
00005 // Import section
00006 // //////////////////////////////////////////////////////////////////////
00007 // STL
00008 #include <string>
00009 // RMOL
00010 #include <rmol/RMOL_Types.hpp>
00011 
00012 namespace RMOL {
00013 
00015   class RMOL_ServiceContext;
00016 
00018   class RMOL_Service {
00019   public:
00021     RMOL_Service (std::ostream& ioLogStream,
00022                   const ResourceCapacity_T iResourceCapacity);
00024     ~RMOL_Service();
00025 
00027     void setUpStudyStatManager ();
00028 
00030     void setResourceCapacity (const ResourceCapacity_T iResourceCapacity);
00031 
00033     void addBucket (const double iYieldRange, const double iDemandMean,
00034                     const double iDemandStandardDev);
00035 
00037     void addBucket (const double iYieldRange, const double iDemandMean,
00038                     const double iDemandStandardDev,
00039                     GeneratedDemandVector_T* ioGeneratedDemandVector);
00040 
00042     GeneratedDemandVector_T* generateDemand (const int K,
00043                                              const double& iMean,
00044                                              const double& iDeviation);
00045 
00047     GeneratedDemandVector_T* generateDemand (GeneratedDemandVector_T*,
00048                                              GeneratedDemandVector_T*);
00049 
00051     void readFromInputFile (const std::string& iInputFileName);
00052 
00055     void buildContextForMC (const int K);
00056 
00058     void reset ();
00059 
00061     void optimalOptimisationByMCIntegration (const int K);
00062 
00065     void optimalOptimisationByMCIntegration (const int K,
00066                                              BidPriceVector_T&,
00067                                              BookingLimitVector_T&);
00068 
00070     void optimalOptimisationByDP ();
00071 
00074     void optimalOptimisationByDP (BookingLimitVector_T&);
00075 
00077     void heuristicOptimisationByEmsr ();
00078 
00081     void heuristicOptimisationByEmsr (BidPriceVector_T&, BookingLimitVector_T&);
00082     
00084     void heuristicOptimisationByEmsrA ();
00085 
00088     void heuristicOptimisationByEmsrA (BidPriceVector_T&, BookingLimitVector_T&);
00089 
00091     void heuristicOptimisationByEmsrAwithSellup (SellupProbabilityVector_T&);
00092 
00095     void heuristicOptimisationByEmsrAwithSellup (SellupProbabilityVector_T&,
00096                                                  BidPriceVector_T&, 
00097                                                  BookingLimitVector_T&);
00098     
00100     void heuristicOptimisationByEmsrB ();
00101 
00104     void heuristicOptimisationByEmsrB (BidPriceVector_T&, BookingLimitVector_T&);
00105 
00108     void legOptimisationByMC ();
00109     
00112     void legOptimisationByMC (BidPriceVector_T&, BookingLimitVector_T&);
00113 
00114   private:
00116     RMOL_Service ();
00117     RMOL_Service (const RMOL_Service&);
00118 
00120     void init (std::ostream& ioLogStream,
00121                const ResourceCapacity_T iResourceCapacity);
00122     
00124     void logInit (const LOG::EN_LogLevel iLogLevel, std::ostream& ioLogStream);
00125 
00127     void finalise ();
00128 
00129   private:
00130     // ////////// Service Context //////////
00132     RMOL_ServiceContext* _rmolServiceContext;
00133   };
00134 }
00135 #endif // __RMOL_SVC_RMOL_SERVICE_HPP
SourceForge Logo

Generated on Sat Jun 6 13:48:35 2009 for RMOL by Doxygen 1.5.7.1