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);