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

Bucket.hpp

Go to the documentation of this file.
00001 #ifndef __RMOL_BOM_BUCKET_HPP
00002 #define __RMOL_BOM_BUCKET_HPP
00003 
00004 // //////////////////////////////////////////////////////////////////////
00005 // Import section
00006 // //////////////////////////////////////////////////////////////////////
00007 // RMOL
00008 #include <rmol/RMOL_Types.hpp>
00009 #include <rmol/field/FldYieldRange.hpp>
00010 #include <rmol/field/FldDistributionParameters.hpp>
00011 #include <rmol/bom/BomAbstract.hpp>
00012 
00013 namespace RMOL {
00014 
00016   class Demand;
00017 
00048   class Bucket : public BomAbstract {
00052     friend class FacBucket;
00053     friend class FacBucketHolder;
00054     
00055   public:
00056     // ///////// Getters ////////
00058     const FldYieldRange& getYieldRange() const {
00059       return _yieldRange;
00060     }
00062     double getProtection() const {
00063       return _protection;
00064     }
00066     double getCumulatedProtection() const {
00067       return _cumulatedProtection;
00068     }
00070     double getCumulatedBookingLimit() const {
00071       return _cumulatedBookingLimit;
00072     }
00074     double getBookingLimit() const {
00075       return _bookingLimit;
00076     }
00077 
00079     const FldDistributionParameters& getDistributionParameters() const;
00080     
00082     const double getMean() const;
00083     
00085     const double getStandardDeviation() const;
00086     
00088     const double getUpperYield() const;
00089     
00091     const double getAverageYield() const;
00092     
00094     const double getLowerYield() const;
00095 
00097     const GeneratedDemandVector_T& getGeneratedDemandVector () const {
00098       return *_generatedDemandVector;
00099     }
00100 
00101 
00102     // ///////// Setters ////////
00104     void setProtection (const double iProtection) {
00105       _protection = iProtection;
00106     }
00107     
00109     void setCumulatedProtection (const double iProtection) {
00110       _cumulatedProtection = iProtection;
00111     }
00112     
00114     void setBookingLimit (const double iBookingLimit) {
00115       _bookingLimit = iBookingLimit;
00116     }
00117     
00119     void setCumulatedBookingLimit (const double iBookingLimit) {
00120       _cumulatedBookingLimit = iBookingLimit;
00121     }
00122 
00124     void setDemand (Demand& iDemand);
00125 
00127     void setYieldRange (const double iYield);
00128 
00130     void setDemandParameters (const double, const double);
00131 
00133     void setGeneratedDemandVector (GeneratedDemandVector_T*);
00134 
00135   public:
00136     // ///////// Display methods ////////
00139     void toStream (std::ostream&) const;
00140 
00143     void fromStream (std::istream&);
00144 
00146     std::string toString() const;
00147 
00150     const std::string describeKey() const;
00151 
00154     const std::string describeShortKey() const;
00155     
00157     const std::string display() const;
00158 
00160     const std::string shortDisplay() const;
00161 
00162     
00163   private:
00166     Bucket ();
00167     Bucket (const Bucket&);
00168     Bucket (const FldYieldRange&);
00170     virtual ~Bucket();
00171 
00173     Demand& getDemand() const;
00174 
00175   private:
00177     Demand* _demand;
00178 
00180     FldYieldRange _yieldRange;
00181     
00183     double _protection;
00184 
00186     double _cumulatedProtection;
00187 
00189     double _bookingLimit;
00190 
00192     double _cumulatedBookingLimit;
00193 
00195     GeneratedDemandVector_T* _generatedDemandVector;
00196   };
00197 }
00198 #endif // __RMOL_BOM_BUCKET_HPP
SourceForge Logo

Generated on Fri Jul 30 21:53:39 2010 for RMOL by Doxygen 1.6.1