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

#include <rmol/bom/BucketHolder.hpp>

Inheritance diagram for RMOL::BucketHolder:
RMOL::BomAbstract

List of all members.

Public Member Functions

const double getCabinCapacity () const
const double getTotalMeanDemand () const
const double getDemandFactor () const
const double getOptimalRevenue () const
const short getSize () const
const double getPreviousCumulatedProtection () const
void fillup (BookingLimitVector_T &) const
BucketgetCurrentBucket () const
BucketgetNextBucket () const
BucketgetTaggedBucket () const
void begin ()
void iterate ()
bool hasNotReachedEnd () const
void tag ()
void recalculate ()
const double getLowestAverageYield ()
void toStream (std::ostream &) const
void fromStream (std::istream &)
std::string toString () const
const std::string describeKey () const
const std::string describeShortKey () const
const std::string display () const
const std::string shortDisplay () const

Protected Member Functions

void calculateProtectionAndBookingLimits ()
void calculateMeanDemandAndOptimalRevenue ()

Friends

class FacBucketHolder

Detailed Description

Holder of a BucketList object (for memory allocation and recollection purposes).

Definition at line 18 of file BucketHolder.hpp.


Member Function Documentation

const double RMOL::BucketHolder::getCabinCapacity ( ) const [inline]

Get the cabin capacity.

Definition at line 27 of file BucketHolder.hpp.

const double RMOL::BucketHolder::getTotalMeanDemand ( ) const [inline]

Get the total mean demand.

Definition at line 31 of file BucketHolder.hpp.

const double RMOL::BucketHolder::getDemandFactor ( ) const [inline]

Get the demand factor.

Definition at line 35 of file BucketHolder.hpp.

const double RMOL::BucketHolder::getOptimalRevenue ( ) const [inline]

Get the optimal revenue.

Definition at line 39 of file BucketHolder.hpp.

const double RMOL::BucketHolder::getPreviousCumulatedProtection ( ) const

Get the cumulated protection of the previous bucket. If the current bucket is the first one, the function returns 0.0.

Definition at line 156 of file BucketHolder.cpp.

References RMOL::Bucket::getCumulatedProtection().

Referenced by RMOL::MCOptimiser::optimalOptimisationByMCIntegration().

Bucket & RMOL::BucketHolder::getTaggedBucket ( ) const

Get the tagged element (bucket/class).

Definition at line 118 of file BucketHolder.cpp.

bool RMOL::BucketHolder::hasNotReachedEnd ( ) const

States whether or not the end of the (bucket/class) list has been reached.

Definition at line 140 of file BucketHolder.cpp.

Referenced by RMOL::SellupProbabilityCalculator::calculateSellupProbability(), and RMOL::RMOL_Service::heuristicOptimisationByEmsr().

void RMOL::BucketHolder::tag ( )

Tag one element (bucket/class) for later direct access.

Definition at line 135 of file BucketHolder.cpp.

void RMOL::BucketHolder::recalculate ( )

Re-calculate the following values for the buckets/classes:

  • the optimal revenue (from the prices and protections);
  • the protections;
  • the booking limits and cumulated booking limits.

Definition at line 258 of file BucketHolder.cpp.

References calculateMeanDemandAndOptimalRevenue(), and calculateProtectionAndBookingLimits().

Referenced by RMOL::MCOptimiser::legOptimisationByMC(), and RMOL::MCOptimiser::optimalOptimisationByMCIntegration().

const double RMOL::BucketHolder::getLowestAverageYield ( )
void RMOL::BucketHolder::toStream ( std::ostream &  ioOut) const [virtual]

Dump a Business Object into an output stream.

Parameters:
ostream&the output stream.

Implements RMOL::BomAbstract.

Definition at line 62 of file BucketHolder.cpp.

References toString().

void RMOL::BucketHolder::fromStream ( std::istream &  ioIn) [virtual]

Read a Business Object from an input stream.

Parameters:
istream&the input stream.

Implements RMOL::BomAbstract.

Definition at line 67 of file BucketHolder.cpp.

std::string RMOL::BucketHolder::toString ( ) const [virtual]

Get the serialised version of the Place object.

Implements RMOL::BomAbstract.

Definition at line 50 of file BucketHolder.cpp.

References describeShortKey().

Referenced by toStream().

const std::string RMOL::BucketHolder::describeKey ( ) const [virtual]

Get a string describing the whole key (differentiating two objects at any level).

Implements RMOL::BomAbstract.

Definition at line 45 of file BucketHolder.cpp.

References describeShortKey().

Referenced by shortDisplay().

const std::string RMOL::BucketHolder::describeShortKey ( ) const [virtual]

Get a string describing the short key (differentiating two objects at the same level).

Implements RMOL::BomAbstract.

Definition at line 38 of file BucketHolder.cpp.

Referenced by describeKey(), and toString().

const std::string RMOL::BucketHolder::shortDisplay ( ) const

Display a short Place context.

Definition at line 71 of file BucketHolder.cpp.

References describeKey().

Referenced by display().

void RMOL::BucketHolder::calculateProtectionAndBookingLimits ( ) [protected]

Re-calculate the protections and booking limits (from cumulated protections).

Definition at line 198 of file BucketHolder.cpp.

References begin(), RMOL::Bucket::getCumulatedProtection(), getCurrentBucket(), getNextBucket(), getSize(), iterate(), RMOL::Bucket::setCumulatedBookingLimit(), and RMOL::Bucket::setProtection().

Referenced by recalculate().

void RMOL::BucketHolder::calculateMeanDemandAndOptimalRevenue ( ) [protected]

Re-calculate the total mean demand and optimal revenue (from the demand, prices and protections).

Definition at line 172 of file BucketHolder.cpp.

References RMOL::Bucket::getAverageYield(), RMOL::Bucket::getMean(), and RMOL::Bucket::getProtection().

Referenced by recalculate().


Friends And Related Function Documentation

friend class FacBucketHolder [friend]

Friend Classes
Those classes need to access the internal attributes of this object in order to construct and initialise it.

Definition at line 22 of file BucketHolder.hpp.


The documentation for this class was generated from the following files: