From: <qua...@us...> - 2010-05-03 08:42:06
|
Revision: 186 http://stdair.svn.sourceforge.net/stdair/?rev=186&view=rev Author: quannaus Date: 2010-05-03 08:42:00 +0000 (Mon, 03 May 2010) Log Message: ----------- [dev] Removed some getters and setters from the structures. Modified Paths: -------------- trunk/stdair/stdair/basic/BasConst.cpp trunk/stdair/stdair/basic/BasConst_BookingClass.hpp trunk/stdair/stdair/basic/BasConst_General.hpp trunk/stdair/stdair/basic/BasConst_TravelSolution.hpp trunk/stdair/stdair/basic/DemandCharacteristics.hpp trunk/stdair/stdair/basic/DemandDistribution.hpp trunk/stdair/stdair/basic/RandomGeneration.hpp trunk/stdair/stdair/basic/RandomGenerationContext.hpp trunk/stdair/stdair/bom/BookingClassContent.cpp trunk/stdair/stdair/bom/BookingClassContent.hpp trunk/stdair/stdair/bom/DemandStreamContent.cpp trunk/stdair/stdair/bom/DemandStreamContent.hpp trunk/stdair/stdair/bom/FlightDateContent.cpp trunk/stdair/stdair/bom/LegCabinContent.cpp trunk/stdair/stdair/bom/SegmentCabinContent.cpp trunk/stdair/stdair/bom/SegmentDateContent.cpp trunk/stdair/stdair/bom/TravelSolutionStruct.cpp trunk/stdair/stdair/bom/TravelSolutionStruct.hpp trunk/stdair/stdair/bom/TravelSolutionTypes.hpp Modified: trunk/stdair/stdair/basic/BasConst.cpp =================================================================== --- trunk/stdair/stdair/basic/BasConst.cpp 2010-05-01 17:32:23 UTC (rev 185) +++ trunk/stdair/stdair/basic/BasConst.cpp 2010-05-03 08:42:00 UTC (rev 186) @@ -136,8 +136,8 @@ /** Default commited space value for Leg cabins. */ const BlockSpace_T DEFAULT_BLOCK_SPACE = 0.0; - /** Default availability for BookingClass. */ - const Availability_T DEFAULT_CLASS_AVAILABILITY = 0.0; + /** Default availability. */ + const Availability_T DEFAULT_AVAILABILITY = 0.0; /** Default boolean for censorship flag given the status of availability for BookingClass. */ @@ -168,8 +168,8 @@ /** Default closed class code. */ const ClassCode_T DEFAULT_CLOSED_CLASS_CODE = "CC"; - /** Default Fare value for BookingClass. */ - const Fare_T DEFAULT_CLASS_FARE_VALUE = 0.0; + /** Default Fare value. */ + const Fare_T DEFAULT_FARE_VALUE = 0.0; /** Default yield value for a virtual class. */ const Yield_T DEFAULT_CLASS_YIELD_VALUE = 0.0; Modified: trunk/stdair/stdair/basic/BasConst_BookingClass.hpp =================================================================== --- trunk/stdair/stdair/basic/BasConst_BookingClass.hpp 2010-05-01 17:32:23 UTC (rev 185) +++ trunk/stdair/stdair/basic/BasConst_BookingClass.hpp 2010-05-03 08:42:00 UTC (rev 186) @@ -48,8 +48,8 @@ /** Default commited space value for Leg cabins. */ extern const BlockSpace_T DEFAULT_BLOCK_SPACE; - /** Default availability for BookingClass. */ - extern const Availability_T DEFAULT_CLASS_AVAILABILITY; + /** Default availability. */ + extern const Availability_T DEFAULT_AVAILABILITY; /** Default boolean for censorship flag given the status of availability for BookingClass. */ @@ -74,8 +74,8 @@ /** Default over-booking rate for BookingClass. */ extern const OverbookingRate_T DEFAULT_CLASS_OVERBOOKING_RATE; - /** Default over-booking rate for BookingClass. */ - extern const Fare_T DEFAULT_CLASS_FARE_VALUE; + /** Default fare. */ + extern const Fare_T DEFAULT_FARE_VALUE; /** Default revenue value for BookingClass. */ extern const Revenue_T DEFAULT_REVENUE_VALUE; Modified: trunk/stdair/stdair/basic/BasConst_General.hpp =================================================================== --- trunk/stdair/stdair/basic/BasConst_General.hpp 2010-05-01 17:32:23 UTC (rev 185) +++ trunk/stdair/stdair/basic/BasConst_General.hpp 2010-05-03 08:42:00 UTC (rev 186) @@ -28,7 +28,7 @@ extern const Distance_T DEFAULT_DISTANCE_VALUE; /** Default value of Fare. */ - extern const Fare_T DEFAULT_CLASS_FARE_VALUE; + extern const Fare_T DEFAULT_FARE_VALUE; /** Default revenue value. */ extern const Revenue_T DEFAULT_REVENUE_VALUE; Modified: trunk/stdair/stdair/basic/BasConst_TravelSolution.hpp =================================================================== --- trunk/stdair/stdair/basic/BasConst_TravelSolution.hpp 2010-05-01 17:32:23 UTC (rev 185) +++ trunk/stdair/stdair/basic/BasConst_TravelSolution.hpp 2010-05-03 08:42:00 UTC (rev 186) @@ -44,7 +44,7 @@ extern const NbOfBookings_T DEFAULT_CLASS_NB_OF_BOOKINGS; /** Default value of Fare. */ - extern const Fare_T DEFAULT_CLASS_FARE_VALUE; + extern const Fare_T DEFAULT_FARE_VALUE; /** Default nember of required seats by the demand. */ extern const unsigned short DEFAULT_NUMBER_OF_REQUIRED_SEATS; Modified: trunk/stdair/stdair/basic/DemandCharacteristics.hpp =================================================================== --- trunk/stdair/stdair/basic/DemandCharacteristics.hpp 2010-05-01 17:32:23 UTC (rev 185) +++ trunk/stdair/stdair/basic/DemandCharacteristics.hpp 2010-05-03 08:42:00 UTC (rev 186) @@ -15,55 +15,8 @@ /** Class modeling the characteristics of a demand type. */ struct DemandCharacteristics { - + public: - // ///////////// Getters /////////// - /** Get the arrival pattern. */ - const ContinuousFloatDuration_T& getArrivalPattern() const { - return _arrivalPattern; - } - - /** Get the point-of-sale probability mass. */ - const POSProbabilityMass_T& getPOSProbabilityMass() const { - return _posProbabilityMass; - } - - /** Get the channel probability mass. */ - const ChannelProbabilityMass_T& getChannelProbabilityMass() const { - return _channelProbabilityMass; - } - - /** Get the trip type probability mass. */ - const TripTypeProbabilityMass_T& getTripTypeProbabilityMass() const { - return _tripTypeProbabilityMass; - } - - /** Get the stay duration probability mass. */ - const StayDurationProbabilityMass_T& getStayDurationProbabilityMass() const { - return _stayDurationProbabilityMass; - } - - /** Get the frequent flyer probability mass. */ - const FrequentFlyerProbabilityMass_T& getFrequentFlyerProbabilityMass() const { - return _frequentFlyerProbabilityMass; - } - - /** Get the preferred departure time cumulative distribution. */ - const PreferredDepartureTimeCumulativeDistribution_T& getPreferredDepartureTimeCumulativeDistribution () const { - return _preferredDepartureTimeCumulativeDistribution; - } - - /** Get the WTP cumulative distribution. */ - const WTPCumulativeDistribution_T& getWTPCumulativeDistribution() const { - return _wtpCumulativeDistribution; - } - - /** Get the value of time cumulative distribution. */ - const ValueOfTimeCumulativeDistribution_T& getValueOfTimeCumulativeDistribution () const { - return _valueOfTimeCumulativeDistribution; - } - - public: // ////////////// Display Support Methods ////////// /** Display demand characteristics */ std::string display() const; @@ -90,7 +43,7 @@ /** Copy constructor. */ DemandCharacteristics (const DemandCharacteristics&); - private: + public: // //////////////////// Attributes ///////////////////// /** Arrival pattern (cumulative distribution of timing of arrival of requests (negative number of days between departure date Modified: trunk/stdair/stdair/basic/DemandDistribution.hpp =================================================================== --- trunk/stdair/stdair/basic/DemandDistribution.hpp 2010-05-01 17:32:23 UTC (rev 185) +++ trunk/stdair/stdair/basic/DemandDistribution.hpp 2010-05-03 08:42:00 UTC (rev 186) @@ -14,56 +14,24 @@ /** Class modeling the distribution of a demand type. */ struct DemandDistribution { - public: - // ///////////// Getters /////////// - /** Get the mean number of requests. */ - const NbOfRequests_T& getMeanNumberOfRequests() const { - return _meanNumberOfRequests; - } - - /** Get the standard deviation of number of requests. */ - const StandardDeviationValue_T& getStandardDeviationNumberOfRequests() const { - return _standardDeviationNumberOfRequests; - } - - public: - // ///////////// Setters /////////// - /** Set the mean number of requests. */ - void setMeanNumberOfRequests (const NbOfRequests_T& iMean) { - _meanNumberOfRequests = iMean; - } - - /** Set the standard deviation of number of requests. */ - void setStandardDeviationNumberOfRequests (const StandardDeviationValue_T& iStandardDeviation) { - _standardDeviationNumberOfRequests = iStandardDeviation; - } - - public: // ////////////// Display Support Methods ////////// /** Display demand distribution */ std::string display() const; - public: // ////////// Constructors and destructors ///////// /** Constructor. */ DemandDistribution (const NbOfRequests_T& iMean, const StandardDeviationValue_T& iStandardDeviation); - /** Default constructor. */ - // TODO: That constructor should be private DemandDistribution (); - /** Copy constructor. */ - // TODO: That constructor should be private DemandDistribution (const DemandDistribution&); - /** Destructor. */ - virtual ~DemandDistribution (); + ~DemandDistribution (); - private: // ////////// Attributes ////////// /** Mean number of requests */ NbOfRequests_T _meanNumberOfRequests; Modified: trunk/stdair/stdair/basic/RandomGeneration.hpp =================================================================== --- trunk/stdair/stdair/basic/RandomGeneration.hpp 2010-05-01 17:32:23 UTC (rev 185) +++ trunk/stdair/stdair/basic/RandomGeneration.hpp 2010-05-03 08:42:00 UTC (rev 186) @@ -14,13 +14,6 @@ /** Random generator. */ struct RandomGeneration { - public: - // ///////////// Getters /////////// - /** Get the seed of the random generator. */ - const RandomSeed_T& getSeed () const { - return _seed; - } - // //////////// Business Methods ///////////// /** Generate a randomized number following a uniform distribution between 0 (included) and 1 (excluded). */ @@ -35,25 +28,20 @@ specified by a mean and a standard deviation. */ RealNumber_T generateNormal (const RealNumber_T&, const RealNumber_T&); - public: // ////////// Constructors and destructors ///////// /** Constructor. */ RandomGeneration (const RandomSeed_T&); /** Default constructors. */ RandomGeneration (); RandomGeneration (const RandomGeneration&); - /** Destructor. */ - virtual ~RandomGeneration (); - + ~RandomGeneration (); /** Initialize the random generator. <br>A uniform random number distribution is defined, which produces "real" values between 0 and 1 (0 inclusive, 1 exclusive). */ void init (); - - private: // ////////// Attributes ////////// /** The seed of the random generator. <br>The seed is unsigned, otherwise the wrong overload may be Modified: trunk/stdair/stdair/basic/RandomGenerationContext.hpp =================================================================== --- trunk/stdair/stdair/basic/RandomGenerationContext.hpp 2010-05-01 17:32:23 UTC (rev 185) +++ trunk/stdair/stdair/basic/RandomGenerationContext.hpp 2010-05-03 08:42:00 UTC (rev 186) @@ -13,49 +13,20 @@ /** Structure holding the context necessary for demand random generation. */ struct RandomGenerationContext { - - public: - // ///////////// Getters /////////// - /** Get the cumulative probability of arrival pattern for last - request generated so far. */ - const Probability_T& getCumulativeProbabilitySoFar () const { - return _cumulativeProbabilitySoFar; - } - /** Get the number of requests generated so far. */ - const Count_T& getNumberOfRequestsGeneratedSoFar () const { - return _numberOfRequestsGeneratedSoFar; - } - - /** Set the cumulative probability of arrival pattern for last - request generated so far. */ - void setCumulativeProbabilitySoFar (const Probability_T& iCumulativeProbability) { - _cumulativeProbabilitySoFar = iCumulativeProbability; - } - - /** Set the number of requests generated so far. */ - void setNumberOfRequestsGeneratedSoFar (const Count_T& iNumberOfRequests) { - _numberOfRequestsGeneratedSoFar = iNumberOfRequests; - } - - public: // ////////// Constructors and destructors ///////// /** Constructor by default */ RandomGenerationContext (); /** Default constructors. */ RandomGenerationContext (const RandomGenerationContext&); - /** Destructor */ - virtual ~RandomGenerationContext (); + ~RandomGenerationContext (); - public: // /////////////// Business Methods ////////// /** Increment counter of requests generated so far */ void incrementGeneratedRequestsCounter (); - - - private: - // ////////// Attributes ////////// + + // ////////// Attributes ////////// /** Cumulative probability in arrival pattern for last request generated so far (needed for sequential generation)*/ Probability_T _cumulativeProbabilitySoFar; Modified: trunk/stdair/stdair/bom/BookingClassContent.cpp =================================================================== --- trunk/stdair/stdair/bom/BookingClassContent.cpp 2010-05-01 17:32:23 UTC (rev 185) +++ trunk/stdair/stdair/bom/BookingClassContent.cpp 2010-05-03 08:42:00 UTC (rev 186) @@ -11,47 +11,12 @@ namespace stdair { // //////////////////////////////////////////////////////////////////// - BookingClassContent::BookingClassContent (const Key_T& iKey) - : _key (iKey), - _nbOfBookings (DEFAULT_CLASS_NB_OF_BOOKINGS), - _totalNbOfBookings (DEFAULT_CLASS_TOTAL_NB_OF_BOOKINGS), - _lastDCPTotalNbOfBookings (DEFAULT_CLASS_TOTAL_NB_OF_BOOKINGS), - _unconstrainedDemand (DEFAULT_CLASS_UNCONSTRAINED_DEMAND), - _nbOfCancellations (DEFAULT_CLASS_NB_OF_CANCELLATIONS), - _nbOfNoShows (DEFAULT_CLASS_NB_OF_NOSHOWS), - _availability (DEFAULT_CLASS_AVAILABILITY), - _classRevenue (DEFAULT_REVENUE_VALUE), - _currentCensorshipFlag (DEFAULT_CLASS_CENSORSHIPFLAG), - _censorshipFlagList (DEFAULT_CLASS_CENSORSHIPFLAG_LIST), - _bookingLimit (DEFAULT_CLASS_BOOKING_LIMIT), - _authorizationLevel(DEFAULT_CLASS_AUTHORIZATION_LEVEL), - _MAX (DEFAULT_CLASS_MAX_AUTHORIZATION_LEVEL), - _MIN (DEFAULT_CLASS_MIN_AUTHORIZATION_LEVEL), - _overbookingRate (1 + DEFAULT_CLASS_OVERBOOKING_RATE), - _fare (DEFAULT_CLASS_FARE_VALUE), - _adjustedYield (DEFAULT_YIELD_VALUE), - _yield (DEFAULT_YIELD_VALUE), - _remainingDemandMean (DEFAULT_CLASS_REMAINING_DEMAND_MEAN), - _remainingProductDemandMean (DEFAULT_CLASS_REMAINING_DEMAND_MEAN), - _remainingDemandSD (DEFAULT_CLASS_REMAINING_DEMAND_STANDARD_DEVIATION), - _remainingProductDemandSD (DEFAULT_CLASS_REMAINING_DEMAND_STANDARD_DEVIATION) { + BookingClassContent::BookingClassContent (const Key_T& iKey) : _key (iKey) { } // //////////////////////////////////////////////////////////////////// BookingClassContent::~BookingClassContent () { } - // //////////////////////////////////////////////////////////////////// - void BookingClassContent::setRemainingDemandMean(NbOfBookings_T& iMean) { - _remainingDemandMean = iMean; - _remainingProductDemandMean = iMean; - } - - // //////////////////////////////////////////////////////////////////// - void BookingClassContent::setRemainingDemandSD(NbOfBookings_T& iSD) { - _remainingDemandSD = iSD; - _remainingProductDemandSD = iSD; - } - } Modified: trunk/stdair/stdair/bom/BookingClassContent.hpp =================================================================== --- trunk/stdair/stdair/bom/BookingClassContent.hpp 2010-05-01 17:32:23 UTC (rev 185) +++ trunk/stdair/stdair/bom/BookingClassContent.hpp 2010-05-03 08:42:00 UTC (rev 186) @@ -29,193 +29,7 @@ return _key.getClassCode(); } - /** Get the number of bookings of the bookingClass. */ - const NbOfBookings_T& getNbOfBookings() const { - return _nbOfBookings; - } - - /** Get the number of bookings (without cancellation counted) - of the bookingClass. */ - const NbOfBookings_T& getTotalNbOfBookings() const { - return _totalNbOfBookings; - } - - /** Get the number of bookings at the last DCP(without - cancellation counted) of the bookingClass. */ - const NbOfBookings_T& getLastDCPTotalNbOfBookings() const { - return _lastDCPTotalNbOfBookings; - } - - /** Get the unconstrained demand (last DCP) of the bookingClass. */ - const NbOfBookings_T& getUnconstrainedDemand () const { - return _unconstrainedDemand; - } - - /** Get the number of cancellations of the bookingClass. */ - const NbOfCancellations_T& getNbOfCancellations() const { - return _nbOfCancellations; - } - - /** Get the number of no-shows of the bookingClass. */ - const NbOfNoShows_T& getNbOfNoShows() const { - return _nbOfNoShows; - } - - /** Get the overbooking rate dedicated to the booking. */ - const OverbookingRate_T& getOverbookingRate() const { - return _overbookingRate; - } - - /** Get the list of censorship flags. */ - const CensorshipFlagList_T& getCensorshipFlagList() const { - return _censorshipFlagList; - } - - /** Get the current censorship flag. */ - const CensorshipFlag_T& getCurrentCensorshipFlag() const { - return _currentCensorshipFlag; - } - - /** Get the protection value. */ - const BookingLimit_T& getBookingLimit() const { - return _bookingLimit; - } - - /** Get the authorisation level value. */ - const AuthorizationLevel_T& getAuthorizationLevel () const { - return _authorizationLevel; - } - - /** Get the MAX value of AU. */ - const AuthorizationLevel_T& getMAX () const { - return _MAX; - } - - /** Get the MIN value of AU. */ - const AuthorizationLevel_T& getMIN () const { - return _MIN; - } - - /** Get the availability number. */ - const Availability_T& getAvailability() const { - return _availability; - } - - /** Get the revenue amount. */ - const Revenue_T& getRevenue() const { - return _classRevenue; - } - - /** Get the fare current value. */ - const Fare_T& getFare() const { - return _fare; - } - - /** Get the adjusted yield current value. */ - const Yield_T& getAdjustedYield() const { - return _adjustedYield; - } - - /** Get the yield current value. */ - const Yield_T& getYield() const { - return _yield; - } - - /** Get the remaining demand mean. */ - const NbOfBookings_T& getRemainingDemandMean() const { - return _remainingDemandMean; - } - - /** Get the remaining demand mean for the net booking product. */ - const NbOfBookings_T& getRemainingProductDemandMean() const { - return _remainingProductDemandMean; - } - - /** Get the remaining demand standard deviation. */ - const NbOfBookings_T& getRemainingDemandSD() const { - return _remainingDemandSD; - } - - /** Get the remaining demand standard deviation - for the net booking product. */ - const NbOfBookings_T& getRemainingProductDemandSD() const { - return _remainingProductDemandSD; - } - public: - // /////////// Setters //////////// - /** Set the booking limit. */ - void setBookingLimit (BookingLimit_T& iBookingLimit) { - _bookingLimit = iBookingLimit; - } - - /** Set the authorization level. */ - void setAuthorizationLevel (AuthorizationLevel_T& iAuthorizationLevel) { - _authorizationLevel = iAuthorizationLevel; - } - - /** Set the MAX value of AU. */ - void setMAX (const AuthorizationLevel_T& iMAX) { - _MAX = iMAX; - } - - /** Set the MIN value of AU. */ - void setMIN (const AuthorizationLevel_T& iMIN) { - _MIN = iMIN; - } - - /** Set the Availability number. */ - void setAvailability (Availability_T& iAvailability) { - _availability = iAvailability; - } - - /** Set the censorship flag status. */ - void setCensorshipFlagStatus (bool iFlagStatus) { - _currentCensorshipFlag = iFlagStatus; - } - - /** Set the fare value. */ - void setFare(Fare_T& iFare) { - _fare = iFare; - } - - /** Set the adjusted fare value. */ - void setAdjustedYield(Yield_T& iYield) { - _adjustedYield = iYield; - } - - /** Set the yield value. */ - void setYield(Yield_T& iYield) { - _yield = iYield; - } - - /** Set the unconstrained demand. */ - void setUnconstrainedDemand (NbOfBookings_T& iDemand) { - _unconstrainedDemand = iDemand; - } - - /** Set the total bookings for the DCP. */ - void setDCPTotalNbOfBookings (NbOfBookings_T& iBookings) { - _lastDCPTotalNbOfBookings = iBookings; - } - - /** Set the remaining demand mean. */ - void setRemainingDemandMean (NbOfBookings_T&); - - /** Set the remaining demand mean for the net booking product. */ - void setRemainingProductDemandMean (NbOfBookings_T& iMean) { - _remainingProductDemandMean = iMean; - } - - /** Set the remaining demand standard deviation. */ - void setRemainingDemandSD (NbOfBookings_T&); - - /** Set the remaining demand standard deviation. */ - void setRemainingProductDemandSD (NbOfBookings_T& iSD) { - _remainingProductDemandSD = iSD; - } - - public: // /////////// Display support methods ///////// /** Dump a Business Object into an output stream. @param ostream& the output stream. */ @@ -241,98 +55,24 @@ ~BookingClassContent(); public: - // for AIRINV Test - stdair::SubclassCode_T _subclassCode; - stdair::AuthorizationLevel_T _cumulatedProtection; - stdair::AuthorizationLevel_T _protection; - stdair::OverbookingRate_T _noShowPercentage; - stdair::OverbookingRate_T _overbookingPercentage; - stdair::NbOfBookings_T _groupNbOfBookings; - stdair::NbOfBookings_T _groupPendingNbOfBookings; - stdair::NbOfBookings_T _staffNbOfBookings; - stdair::NbOfBookings_T _wlNbOfBookings; - stdair::NbOfBookings_T _etb; - stdair::Availability_T _netClassAvailability; - stdair::Availability_T _segmentAvailability; - stdair::Availability_T _netRevenueAvailability; - - protected: // Attributes - /** The key of both structure and content objects. */ Key_T _key; - - /** Number of current bookings in the booking. */ + SubclassCode_T _subclassCode; + AuthorizationLevel_T _cumulatedProtection; + AuthorizationLevel_T _protection; + NbOfSeats_T _nego; + OverbookingRate_T _noShowPercentage; + OverbookingRate_T _overbookingPercentage; NbOfBookings_T _nbOfBookings; - - /** Total number of bookings (without substraction of cancellation). */ - NbOfBookings_T _totalNbOfBookings; - - /** Total number of bookings at the last DCP (without - substraction of cancellation). */ - NbOfBookings_T _lastDCPTotalNbOfBookings; - - /** Unconstraining demnd value (last RMS Computation).*/ - NbOfBookings_T _unconstrainedDemand; - - /** Number of cancelled demands. */ - NbOfCancellations_T _nbOfCancellations; - - /** Number of no-shows. */ - NbOfNoShows_T _nbOfNoShows; - - /** Number of available seats. */ - Availability_T _availability; - - /** Total Revenue of the booking. */ - Revenue_T _classRevenue; - - /** Current Censorship flag which indicates whether the demand - is censored. */ - CensorshipFlag_T _currentCensorshipFlag; - - /** List of censorship flags which indicates whether the demand - is censored (one flag per DCP). */ - CensorshipFlagList_T _censorshipFlagList; - - /** Value of the booking limit of the booking. */ - BookingLimit_T _bookingLimit; - - /** Value of the authorization level of the booking. */ - AuthorizationLevel_T _authorizationLevel; - - /** MAX of Authorization Level (AU). */ - AuthorizationLevel_T _MAX; - - /** MIN of Authorization Level (AU). */ - AuthorizationLevel_T _MIN; - - /** Rate of allowed overbooking. */ - OverbookingRate_T _overbookingRate; - - /** Current Fare value of the booking. */ - Fare_T _fare; - - /** Current Adjusted Fare value of the booking. */ - Yield_T _adjustedYield; - - /** Current Yield value of the booking. */ - Yield_T _yield; - - /** Temporary attributes just for the forecaster prototype. */ - /** Remaining demand mean for the whole booking. */ - NbOfBookings_T _remainingDemandMean; - - /** Remaining demand mean for the product corresponding to this booking - (excluding (OnDs)). */ - NbOfBookings_T _remainingProductDemandMean; - - /** Remaining demand standrad deviation for the whole booking. */ - NbOfBookings_T _remainingDemandSD; - - /** Remaining demand standard deviation for the product - corresponding to this booking (excluding (OnDs)). */ - NbOfBookings_T _remainingProductDemandSD; - + NbOfBookings_T _groupNbOfBookings; + NbOfBookings_T _groupPendingNbOfBookings; + NbOfBookings_T _staffNbOfBookings; + NbOfBookings_T _wlNbOfBookings; + NbOfBookings_T _etb; + Availability_T _netClassAvailability; + Availability_T _segmentAvailability; + Availability_T _netRevenueAvailability; + }; } Modified: trunk/stdair/stdair/bom/DemandStreamContent.cpp =================================================================== --- trunk/stdair/stdair/bom/DemandStreamContent.cpp 2010-05-01 17:32:23 UTC (rev 185) +++ trunk/stdair/stdair/bom/DemandStreamContent.cpp 2010-05-03 08:42:00 UTC (rev 186) @@ -56,9 +56,9 @@ // //////////////////////////////////////////////////////////////////// void DemandStreamContent::init() { // Generate the number of requests - const RealNumber_T lMu = _demandDistribution.getMeanNumberOfRequests (); + const RealNumber_T lMu = _demandDistribution._meanNumberOfRequests; const RealNumber_T lSigma = - _demandDistribution.getStandardDeviationNumberOfRequests (); + _demandDistribution._standardDeviationNumberOfRequests; const RealNumber_T lRealNumberOfRequestsToBeGenerated = _numberOfRequestsRandomGenerator.generateNormal (lMu, lSigma); Modified: trunk/stdair/stdair/bom/DemandStreamContent.hpp =================================================================== --- trunk/stdair/stdair/bom/DemandStreamContent.hpp 2010-05-01 17:32:23 UTC (rev 185) +++ trunk/stdair/stdair/bom/DemandStreamContent.hpp 2010-05-03 08:42:00 UTC (rev 186) @@ -56,83 +56,83 @@ /** Get the arrival pattern. */ const ContinuousFloatDuration_T& getArrivalPattern() const { - return _demandCharacteristics.getArrivalPattern(); + return _demandCharacteristics._arrivalPattern; } /** Get the POS probability mass. */ const POSProbabilityMass_T& getPOSProbabilityMass() const { - return _demandCharacteristics.getPOSProbabilityMass(); + return _demandCharacteristics._posProbabilityMass; } /** Get the channel probability mass. */ const ChannelProbabilityMass_T& getChannelProbabilityMass() const { - return _demandCharacteristics.getChannelProbabilityMass(); + return _demandCharacteristics._channelProbabilityMass; } /** Get the trip type probability mass. */ const TripTypeProbabilityMass_T& getTripTypeProbabilityMass() const { - return _demandCharacteristics.getTripTypeProbabilityMass(); + return _demandCharacteristics._tripTypeProbabilityMass; } /** Get the stay duration probability mass. */ const StayDurationProbabilityMass_T& getStayDurationProbabilityMass() const { - return _demandCharacteristics.getStayDurationProbabilityMass(); + return _demandCharacteristics._stayDurationProbabilityMass; } /** Get the frequent flyer probability mass. */ const FrequentFlyerProbabilityMass_T& getFrequentFlyerProbabilityMass() const { - return _demandCharacteristics.getFrequentFlyerProbabilityMass(); + return _demandCharacteristics._frequentFlyerProbabilityMass; } /** Get the preferred departure time cumulative distribution. */ const PreferredDepartureTimeCumulativeDistribution_T& getPreferredDepartureTimeCumulativeDistribution () const { - return _demandCharacteristics.getPreferredDepartureTimeCumulativeDistribution(); + return _demandCharacteristics._preferredDepartureTimeCumulativeDistribution; } /** Get the WTP cumulative distribution. */ const WTPCumulativeDistribution_T& getWTPCumulativeDistribution() const { - return _demandCharacteristics.getWTPCumulativeDistribution(); + return _demandCharacteristics._wtpCumulativeDistribution; } /** Get the value of time cumulative distribution. */ const ValueOfTimeCumulativeDistribution_T& getValueOfTimeCumulativeDistribution() const { - return _demandCharacteristics.getValueOfTimeCumulativeDistribution(); + return _demandCharacteristics._valueOfTimeCumulativeDistribution; } /** Get the mean number of requests. */ const NbOfRequests_T& getMeanNumberOfRequests() const { - return _demandDistribution.getMeanNumberOfRequests(); + return _demandDistribution._meanNumberOfRequests; } /** Get the standard deviation of number of requests. */ const StandardDeviationValue_T& getStandardDeviationNumberOfRequests() const { - return _demandDistribution.getStandardDeviationNumberOfRequests(); + return _demandDistribution._standardDeviationNumberOfRequests; } /** Get the cumulative probability of arrival pattern for last request generated so far. */ const Probability_T& getCumulativeProbabilitySoFar () const { - return _randomGenerationContext.getCumulativeProbabilitySoFar(); + return _randomGenerationContext._cumulativeProbabilitySoFar; } /** Get the number of requests generated so far. */ const Count_T& getNumberOfRequestsGeneratedSoFar() const { - return _randomGenerationContext.getNumberOfRequestsGeneratedSoFar(); + return _randomGenerationContext._numberOfRequestsGeneratedSoFar; } /** Get the seed of the random generator for the number of requests. */ const RandomSeed_T& getNumberOfRequestsRandomGeneratorSeed () const { - return _numberOfRequestsRandomGenerator.getSeed(); + return _numberOfRequestsRandomGenerator._seed; } /** Get the seed of the random generator for the request datetime. */ const RandomSeed_T& getRequestDateTimeRandomGeneratorSeed () const { - return _requestDateTimeRandomGenerator.getSeed(); + return _requestDateTimeRandomGenerator._seed; } /** Get the seed of the random generator for the demand characteristics. */ const RandomSeed_T& getDemandCharacteristicsRandomGeneratorSeed () const { - return _demandCharacteristicsRandomGenerator.getSeed(); + return _demandCharacteristicsRandomGenerator._seed; } /** Get the demand characteristics. */ @@ -150,14 +150,14 @@ /** Set the cumulative probability of arrival pattern for last request generated so far. */ void setCumulativeProbabilitySoFar (const Probability_T& iCumulativeProbability) { - _randomGenerationContext. - setCumulativeProbabilitySoFar (iCumulativeProbability); + _randomGenerationContext._cumulativeProbabilitySoFar = + iCumulativeProbability; } /** Set the number of requests generated so far. */ void setNumberOfRequestsGeneratedSoFar (const Count_T& iNumberOfRequests) { - _randomGenerationContext. - setNumberOfRequestsGeneratedSoFar (iNumberOfRequests); + _randomGenerationContext._numberOfRequestsGeneratedSoFar = + iNumberOfRequests; } public: Modified: trunk/stdair/stdair/bom/FlightDateContent.cpp =================================================================== --- trunk/stdair/stdair/bom/FlightDateContent.cpp 2010-05-01 17:32:23 UTC (rev 185) +++ trunk/stdair/stdair/bom/FlightDateContent.cpp 2010-05-03 08:42:00 UTC (rev 186) @@ -14,7 +14,7 @@ : _key (iKey), _bookingCounter (DEFAULT_CLASS_NB_OF_BOOKINGS), _flightRevenue (DEFAULT_REVENUE_VALUE), - _flightAverageFare (DEFAULT_CLASS_FARE_VALUE), + _flightAverageFare (DEFAULT_FARE_VALUE), _flightASK (DEFAULT_DISTANCE_VALUE), _flightYield (DEFAULT_REVENUE_VALUE), _flightRPK (DEFAULT_DISTANCE_VALUE), Modified: trunk/stdair/stdair/bom/LegCabinContent.cpp =================================================================== --- trunk/stdair/stdair/bom/LegCabinContent.cpp 2010-05-01 17:32:23 UTC (rev 185) +++ trunk/stdair/stdair/bom/LegCabinContent.cpp 2010-05-03 08:42:00 UTC (rev 186) @@ -16,8 +16,8 @@ _capacity (DEFAULT_CABIN_CAPACITY), _soldSeat (DEFAULT_CLASS_NB_OF_BOOKINGS), _commitedSpace (DEFAULT_COMMITED_SPACE), - _availabilityPool (DEFAULT_CLASS_AVAILABILITY), - _availability (DEFAULT_CLASS_AVAILABILITY), + _availabilityPool (DEFAULT_AVAILABILITY), + _availability (DEFAULT_AVAILABILITY), _bidPriceVector (DEFAULT_BID_PRICE_VECTOR), _currentBidPrice (DEFAULT_BID_PRICE) { } Modified: trunk/stdair/stdair/bom/SegmentCabinContent.cpp =================================================================== --- trunk/stdair/stdair/bom/SegmentCabinContent.cpp 2010-05-01 17:32:23 UTC (rev 185) +++ trunk/stdair/stdair/bom/SegmentCabinContent.cpp 2010-05-03 08:42:00 UTC (rev 186) @@ -17,11 +17,11 @@ _blockSpace (DEFAULT_BLOCK_SPACE), _bookingCounter (DEFAULT_CLASS_NB_OF_BOOKINGS), _commitedSpace (DEFAULT_COMMITED_SPACE), - _availabilityPool (DEFAULT_CLASS_AVAILABILITY), + _availabilityPool (DEFAULT_AVAILABILITY), _bidPriceVector (DEFAULT_BID_PRICE_VECTOR), _currentBidPrice (DEFAULT_BID_PRICE), _cabinRevenue (DEFAULT_REVENUE_VALUE), - _cabinAverageFare (DEFAULT_CLASS_FARE_VALUE), + _cabinAverageFare (DEFAULT_FARE_VALUE), _cabinUnitRevenue (DEFAULT_REVENUE_VALUE), _cabinRPK (DEFAULT_DISTANCE_VALUE) { } Modified: trunk/stdair/stdair/bom/SegmentDateContent.cpp =================================================================== --- trunk/stdair/stdair/bom/SegmentDateContent.cpp 2010-05-01 17:32:23 UTC (rev 185) +++ trunk/stdair/stdair/bom/SegmentDateContent.cpp 2010-05-03 08:42:00 UTC (rev 186) @@ -14,7 +14,7 @@ : _key (iKey), _bookingCounter (DEFAULT_CLASS_NB_OF_BOOKINGS), _segmentRevenue (DEFAULT_REVENUE_VALUE), - _segmentAverageFare (DEFAULT_CLASS_FARE_VALUE), + _segmentAverageFare (DEFAULT_FARE_VALUE), _segmentUnitRevenue (DEFAULT_REVENUE_VALUE), _segmentRPK (DEFAULT_DISTANCE_VALUE) { } Modified: trunk/stdair/stdair/bom/TravelSolutionStruct.cpp =================================================================== --- trunk/stdair/stdair/bom/TravelSolutionStruct.cpp 2010-05-01 17:32:23 UTC (rev 185) +++ trunk/stdair/stdair/bom/TravelSolutionStruct.cpp 2010-05-03 08:42:00 UTC (rev 186) @@ -7,6 +7,7 @@ #include <ostream> #include <sstream> // StdAir +#include <stdair/basic/BasConst_BookingClass.hpp> #include <stdair/bom/OutboundPath.hpp> #include <stdair/bom/TravelSolutionStruct.hpp> @@ -22,26 +23,22 @@ TravelSolutionStruct:: TravelSolutionStruct (const TravelSolutionStruct& iTravelSolutionStruct) : _outboundPath_ptr (iTravelSolutionStruct._outboundPath_ptr), - _bookingClassList (iTravelSolutionStruct._bookingClassList) { + _bookingClassList (iTravelSolutionStruct._bookingClassList), + _fare (iTravelSolutionStruct._fare), + _availability (iTravelSolutionStruct._availability) { } // //////////////////////////////////////////////////////////////////// TravelSolutionStruct:: TravelSolutionStruct (OutboundPath& ioOutboundPath, const BookingClassSTLList_T& iBookingClassList) - : _outboundPath_ptr (&ioOutboundPath), - _bookingClassList (iBookingClassList) { + : _outboundPath_ptr (&ioOutboundPath), _bookingClassList (iBookingClassList), + _fare (DEFAULT_FARE_VALUE), _availability (DEFAULT_AVAILABILITY) { } // //////////////////////////////////////////////////////////////////// TravelSolutionStruct::~TravelSolutionStruct () { } - - // ////////////////////////////////////////////////////////////////////// - OutboundPath& TravelSolutionStruct::getOutboundPath() const { - assert (_outboundPath_ptr != NULL); - return *_outboundPath_ptr; - } // ////////////////////////////////////////////////////////////////////// void TravelSolutionStruct::toStream (std::ostream& ioOut) const { Modified: trunk/stdair/stdair/bom/TravelSolutionStruct.hpp =================================================================== --- trunk/stdair/stdair/bom/TravelSolutionStruct.hpp 2010-05-01 17:32:23 UTC (rev 185) +++ trunk/stdair/stdair/bom/TravelSolutionStruct.hpp 2010-05-03 08:42:00 UTC (rev 186) @@ -9,6 +9,7 @@ #include <string> #include <vector> // StdAir +#include <stdair/STDAIR_Types.hpp> #include <stdair/basic/StructAbstract.hpp> #include <stdair/bom/BookingClassTypes.hpp> @@ -21,15 +22,24 @@ struct TravelSolutionStruct : public StructAbstract { public: // /////////// Getters /////////////// - /** Get the OutboundPath. */ - OutboundPath& getOutboundPath() const; - - /** Get the list of booking classes. */ + /** Retrieve the attributes of the object. */ + OutboundPath& getOutboundPath() const { + assert (_outboundPath_ptr != NULL); + return *_outboundPath_ptr; + } const BookingClassSTLList_T& getBookingClassList () const { return _bookingClassList; } + const Fare_T getFare() const { return _fare; } + const Availability_T getAvailability() const { return _availability; } public: + // /////////// Setters /////////////// + /** Setter for some attributes. */ + void setFare (const Fare_T& iFare) { _fare = iFare; } + void setAvailability (const Availability_T& iAvail) { _availability=iAvail; } + + public: // /////////// Display support method ///////////// /** Dump a Business Object into an output stream. @param ostream& the output stream. */ @@ -69,6 +79,12 @@ /** The list of booking classes which make the travel solution. */ BookingClassSTLList_T _bookingClassList; + + /** The fare of the travel solution. */ + Fare_T _fare; + + /** The availability of the travel solution. */ + Availability_T _availability; }; } Modified: trunk/stdair/stdair/bom/TravelSolutionTypes.hpp =================================================================== --- trunk/stdair/stdair/bom/TravelSolutionTypes.hpp 2010-05-01 17:32:23 UTC (rev 185) +++ trunk/stdair/stdair/bom/TravelSolutionTypes.hpp 2010-05-03 08:42:00 UTC (rev 186) @@ -6,8 +6,7 @@ // Import section // ////////////////////////////////////////////////////////////////////// // STL -#include <map> -#include <vector> +#include <list> namespace stdair { @@ -15,7 +14,7 @@ struct TravelSolutionStruct; /** Define the booking class list. */ - typedef std::vector<TravelSolutionStruct> TravelSolutionList_T; + typedef std::list<TravelSolutionStruct> TravelSolutionList_T; } #endif // __STDAIR_BOM_TRAVELSOLUTIONTYPES_HPP This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |