RMOL Logo Get Revenue Management Optimisation Library at SourceForge.net. Fast, secure and Free Open Source software downloads
HistoricalBookingHolder.hpp
Go to the documentation of this file.
00001 #ifndef __RMOL_BOM_HISTORICALBOOKINGHOLDER_HPP
00002 #define __RMOL_BOM_HISTORICALBOOKINGHOLDER_HPP
00003 
00004 // //////////////////////////////////////////////////////////////////////
00005 // Import section
00006 // //////////////////////////////////////////////////////////////////////
00007 // STL
00008 #include <iostream>
00009 #include <vector>
00010 // RMOL 
00011 #include <rmol/RMOL_Types.hpp>
00012 #include <rmol/bom/StructAbstract.hpp>
00013 
00014 namespace RMOL {
00015 
00017   struct HistoricalBooking;
00018     
00020   typedef std::vector<HistoricalBooking> HistoricalBookingVector_T;
00021     
00024   struct HistoricalBookingHolder : public StructAbstract {
00025       
00026   public:
00027     // ////// Getters //////
00029     const short getNumberOfFlights () const;
00030 
00032     const short getNumberOfUncensoredData () const;
00033 
00035     const double getNumberOfUncensoredBookings () const;
00036 
00038     const double getUncensoredStandardDeviation
00039                              (const double iMeanOfUncensoredBookings,
00040                               const short iNumberOfUncensoredData) const;
00041 
00043     const double getMeanDemand () const;
00044 
00046     const double getStandardDeviation (const double) const;
00047 
00049     const std::vector<bool> getListOfToBeUnconstrainedFlags() const;
00050 
00052     const double getHistoricalBooking (const short i) const;
00053 
00055     const double getUnconstrainedDemand (const short i) const;
00056 
00058     const double getUnconstrainedDemandOnFirstElement () const {
00059       return getUnconstrainedDemand (0);
00060     }
00061 
00063     const double calculateExpectedDemand (const double,
00064                                           const double,
00065                                           const short,
00066                                           const double) const;
00067       
00069     void setUnconstrainedDemand (const double iExpectedDemand,
00070                                  const short i);
00071 
00073     void addHistoricalBooking (const HistoricalBooking iHistoricalBooking);
00074       
00078     void toStream (std::ostream& ioOut) const;
00079 
00080     // ///////// Display Methods //////////
00082     const std::string describe() const;
00083       
00085     void display () const;
00086       
00088     virtual ~HistoricalBookingHolder();
00089       
00090   public:
00093     HistoricalBookingHolder ();
00094 
00095   private:
00096       
00098     HistoricalBookingVector_T _historicalBookingVector;
00099       
00100   };
00101 }
00102 #endif // __RMOL_BOM_HISTORICALBOOKINGHOLDER_HPP
00103