24 LegCabin::LegCabin (
const LegCabin& iLegCabin)
25 : _key (iLegCabin._key), _parent (NULL),
26 _offeredCapacity (iLegCabin._offeredCapacity),
27 _physicalCapacity (iLegCabin._physicalCapacity),
28 _soldSeat (iLegCabin._soldSeat),
29 _committedSpace (iLegCabin._committedSpace),
30 _availabilityPool (iLegCabin._availabilityPool),
31 _availability (iLegCabin._availability),
32 _currentBidPrice (iLegCabin._currentBidPrice),
33 _dcsRegrade (iLegCabin._dcsRegrade),
35 _upr (iLegCabin._upr),
36 _nav (iLegCabin._nav),
37 _gav (iLegCabin._gav),
38 _acp (iLegCabin._acp),
39 _etb (iLegCabin._etb),
40 _staffNbOfBookings (iLegCabin._staffNbOfBookings),
41 _wlNbOfBookings (iLegCabin._wlNbOfBookings),
42 _groupNbOfBookings (iLegCabin._groupNbOfBookings) {
46 LegCabin::LegCabin (
const Key_T& iKey)
47 : _key (iKey), _parent (NULL),
81 const LegDate& lLegDate = BomManager::getParent<LegDate> (*this);
90 std::ostringstream oStr;
97 std::ostringstream oStr;
102 oStr << std::endl <<
"Yield: " << std::fixed << std::setprecision (2)
104 <<
", Protection: " << std::fixed << std::setprecision (2)
106 <<
", Booking limit: " << std::fixed << std::setprecision (2)
121 const unsigned short lAvailabilityPool =
124 if (lAvailabilityPool >= 1) {
126 if (lBidPriceVectorSize >= lAvailabilityPool) {
137 const int lYieldLevel =
138 static_cast<int> (std::floor (iYield + 0.5));
141 YieldLevelDemandMap_T::iterator itDemand =
147 insert (YieldLevelDemandMap_T::value_type (lYieldLevel,
148 lMeanStdDevPair)).second;
149 assert (hasInsertBeenSuccessful ==
true);
154 MeanValue_T lMeanValue = iMeanValue + lMeanStdDevPair.first;
155 StdDevValue_T lStdDevValue = iStdDevValue * iStdDevValue + lMeanStdDevPair.second * lMeanStdDevPair.second;
156 lStdDevValue = std::sqrt (lStdDevValue);
BidPrice_T _currentBidPrice
void updateFromReservation(const NbOfBookings_T &)
const BidPriceVector_T DEFAULT_BID_PRICE_VECTOR
const BookingLimit_T & getCumulatedBookingLimit() const
void updateCurrentBidPrice()
BidPriceVector_T _bidPriceVector
Handle on the StdAir library context.
const CabinCapacity_T DEFAULT_CABIN_CAPACITY
const std::string describeKey() const
const std::string DEFAULT_KEY_FLD_DELIMITER
const MapKey_T getFullerKey() const
YieldLevelDemandMap_T _yieldLevelDemandMap
NbOfRequests_T NbOfBookings_T
const std::string displayVirtualClassList() const
Availability_T _availabilityPool
const NbOfBookings_T DEFAULT_CLASS_NB_OF_BOOKINGS
const BidPrice_T DEFAULT_BID_PRICE
const Availability_T DEFAULT_AVAILABILITY
std::string toString() const
CabinCapacity_T _physicalCapacity
const CabinCode_T DEFAULT_CABIN_CODE
void setCapacities(const CabinCapacity_T &iCapacity)
const CapacityAdjustment_T DEFAULT_NULL_CAPACITY_ADJUSTMENT
const CommittedSpace_T DEFAULT_COMMITTED_SPACE
CommittedSpace_T _committedSpace
void setAvailabilityPool(const Availability_T &iAvailabilityPool)
const ProtectionLevel_T & getCumulatedProtection() const
VirtualClassList_T _virtualClassList
const std::string describeKey() const
const NbOfSeats_T DEFAULT_NULL_BOOKING_NUMBER
void addDemandInformation(const YieldValue_T &, const MeanValue_T &, const StdDevValue_T &)
CabinCapacity_T _offeredCapacity
const CabinCode_T & getCabinCode() const
std::pair< MeanValue_T, StdDevValue_T > MeanStdDevPair_T
const AuthorizationLevel_T DEFAULT_CLASS_AUTHORIZATION_LEVEL
const Yield_T & getYield() const
Key of a given leg-cabin, made of a cabin code (only).
const OverbookingRate_T DEFAULT_CLASS_OVERBOOKING_RATE
const UPR_T DEFAULT_NULL_UPR