From: <den...@us...> - 2010-02-15 15:22:22
|
Revision: 139 http://stdair.svn.sourceforge.net/stdair/?rev=139&view=rev Author: denis_arnaud Date: 2010-02-15 15:22:16 +0000 (Mon, 15 Feb 2010) Log Message: ----------- [Dev] The passenger type has become the preferred cabin. Modified Paths: -------------- trunk/stdair/stdair/basic/DemandCharacteristics.cpp trunk/stdair/stdair/basic/DemandCharacteristics.hpp trunk/stdair/stdair/bom/BookingRequestStruct.cpp trunk/stdair/stdair/bom/BookingRequestStruct.hpp trunk/stdair/stdair/bom/DemandStream.cpp trunk/stdair/stdair/bom/DemandStream.hpp trunk/stdair/stdair/bom/DemandStreamKey.cpp trunk/stdair/stdair/bom/DemandStreamKey.hpp Modified: trunk/stdair/stdair/basic/DemandCharacteristics.cpp =================================================================== --- trunk/stdair/stdair/basic/DemandCharacteristics.cpp 2010-02-15 15:20:23 UTC (rev 138) +++ trunk/stdair/stdair/basic/DemandCharacteristics.cpp 2010-02-15 15:22:16 UTC (rev 139) @@ -18,7 +18,7 @@ // ///////////////////////////////////////////////////// DemandCharacteristics::DemandCharacteristics () - : _key (DemandStreamKey_T("", "", DEFAULT_DATE, PassengerType::LAST_VALUE)) { + : _key (DemandStreamKey_T ("", "", DEFAULT_DATE, "")) { } // ///////////////////////////////////////////////////// @@ -48,8 +48,8 @@ } // ///////////////////////////////////////////////////// - const PassengerType& DemandCharacteristics::getPaxType() const { - return _key.getPassengerType(); + const CabinCode_T& DemandCharacteristics::getPreferredCabin() const { + return _key.getPreferredCabin(); } // ///////////////////////////////////////////////////// @@ -65,7 +65,7 @@ << std::endl; oStr << "Preferred departure date ......... : " << _key.getPreferredDepartureDate() << std::endl; - oStr << "Passenger type ................... : " << _key.getPassengerType() + oStr << "Preferred cabin .................. : " << _key.getPreferredCabin() << std::endl; oStr << "Arrival pattern (days from departure, proportion): "; Modified: trunk/stdair/stdair/basic/DemandCharacteristics.hpp =================================================================== --- trunk/stdair/stdair/basic/DemandCharacteristics.hpp 2010-02-15 15:20:23 UTC (rev 138) +++ trunk/stdair/stdair/basic/DemandCharacteristics.hpp 2010-02-15 15:22:16 UTC (rev 139) @@ -32,8 +32,8 @@ /** Get the preferred departure date. */ const Date_T& getPreferredDepartureDate() const; - /** Get the passenger type. */ - const PassengerType& getPaxType() const; + /** Get the preferred cabin. */ + const CabinCode_T& getPreferredCabin() const; /** Get the arrival pattern. */ const ContinuousFloatDuration_T& getArrivalPattern() const { Modified: trunk/stdair/stdair/bom/BookingRequestStruct.cpp =================================================================== --- trunk/stdair/stdair/bom/BookingRequestStruct.cpp 2010-02-15 15:20:23 UTC (rev 138) +++ trunk/stdair/stdair/bom/BookingRequestStruct.cpp 2010-02-15 15:22:16 UTC (rev 139) @@ -16,12 +16,12 @@ const AirportCode_T& iDestination, const Date_T& iDepartureDate, const DateTime_T& iRequestDateTime, - const PassengerType& iPaxType, + const CabinCode_T& iPreferredCabin, const NbOfSeats_T& iPartySize) : _origin (iOrigin), _destination (iDestination), _preferredDepartureDate (iDepartureDate), _requestDateTime (iRequestDateTime), - _paxType (iPaxType), _partySize (iPartySize) { + _preferredCabin (iPreferredCabin), _partySize (iPartySize) { } // ////////////////////////////////////////////////////////////////////// @@ -41,7 +41,8 @@ const std::string BookingRequestStruct::describe() const { std::ostringstream oStr; oStr << _origin << " - " << _destination << " " << _preferredDepartureDate - << " " << _requestDateTime << " " << _paxType << " " << _partySize; + << " " << _requestDateTime << " " << _preferredCabin + << " " << _partySize; return oStr.str(); } Modified: trunk/stdair/stdair/bom/BookingRequestStruct.hpp =================================================================== --- trunk/stdair/stdair/bom/BookingRequestStruct.hpp 2010-02-15 15:20:23 UTC (rev 138) +++ trunk/stdair/stdair/bom/BookingRequestStruct.hpp 2010-02-15 15:22:16 UTC (rev 139) @@ -10,7 +10,6 @@ // StdAir #include <stdair/STDAIR_Types.hpp> #include <stdair/basic/StructAbstract.hpp> -#include <stdair/basic/PassengerType.hpp> namespace stdair { @@ -38,9 +37,9 @@ return _requestDateTime; } - /** Get the passenger type. */ - const PassengerType& getPaxType() const { - return _paxType; + /** Get the preferred cabin. */ + const CabinCode_T& getPreferredCabin() const { + return _preferredCabin; } /** Get the party size. */ @@ -70,9 +69,9 @@ _requestDateTime = iRequestDateTime; } - /** Set the passenger type. */ - void setPaxType (const PassengerType& iPaxType) { - _paxType = iPaxType; + /** Set the preferred cabin. */ + void setPreferredCabin (const CabinCode_T& iPreferredCabin) { + _preferredCabin = iPreferredCabin; } /** Set the party size. */ @@ -99,7 +98,7 @@ /** Constructor. */ BookingRequestStruct (const AirportCode_T&, const AirportCode_T&, const Date_T&, const DateTime_T&, - const PassengerType&, const NbOfSeats_T&); + const CabinCode_T&, const NbOfSeats_T&); public : /** Default constructor. */ BookingRequestStruct (); @@ -121,11 +120,11 @@ /** Departure date. */ Date_T _preferredDepartureDate; - /** Request datetime */ + /** Request date-time */ DateTime_T _requestDateTime; - /** Passenger type. */ - PassengerType _paxType; + /** Preferred cabin. */ + CabinCode_T _preferredCabin; /** Party size. */ NbOfSeats_T _partySize; Modified: trunk/stdair/stdair/bom/DemandStream.cpp =================================================================== --- trunk/stdair/stdair/bom/DemandStream.cpp 2010-02-15 15:20:23 UTC (rev 138) +++ trunk/stdair/stdair/bom/DemandStream.cpp 2010-02-15 15:22:16 UTC (rev 139) @@ -6,11 +6,10 @@ #include <iosfwd> #include <ostream> #include <sstream> +#include <cmath> // Boost #include <boost/math/distributions/normal.hpp> -// Math -#include <math.h> -// STDAIR +// StdAir #include <stdair/basic/BasConst_General.hpp> #include <stdair/basic/DemandCharacteristics.hpp> #include <stdair/basic/RandomGeneration.hpp> Modified: trunk/stdair/stdair/bom/DemandStream.hpp =================================================================== --- trunk/stdair/stdair/bom/DemandStream.hpp 2010-02-15 15:20:23 UTC (rev 138) +++ trunk/stdair/stdair/bom/DemandStream.hpp 2010-02-15 15:22:16 UTC (rev 139) @@ -53,9 +53,9 @@ return _demandCharacteristics.getPreferredDepartureDate(); } - /** Get the passenger type. */ - const PassengerType& getPaxType() const { - return _demandCharacteristics.getPaxType(); + /** Get the preferred cabin. */ + const CabinCode_T& getPreferredCabin() const { + return _demandCharacteristics.getPreferredCabin(); } /** Get the arrival pattern. */ Modified: trunk/stdair/stdair/bom/DemandStreamKey.cpp =================================================================== --- trunk/stdair/stdair/bom/DemandStreamKey.cpp 2010-02-15 15:20:23 UTC (rev 138) +++ trunk/stdair/stdair/bom/DemandStreamKey.cpp 2010-02-15 15:22:16 UTC (rev 139) @@ -7,24 +7,24 @@ namespace stdair { // //////////////////////////////////////////////////////////////////// - DemandStreamKey_T::DemandStreamKey_T () - : _paxType (PassengerType::LAST_VALUE) { + DemandStreamKey_T::DemandStreamKey_T () { } // //////////////////////////////////////////////////////////////////// DemandStreamKey_T::DemandStreamKey_T (const AirportCode_T& iOrigin, const AirportCode_T& iDestination, const Date_T& iPreferredDepartureDate, - const PassengerType& iPaxType) + const CabinCode_T& iPreferredCabin) : _origin (iOrigin), _destination (iDestination), - _preferredDepartureDate (iPreferredDepartureDate), _paxType (iPaxType) { + _preferredDepartureDate (iPreferredDepartureDate), + _preferredCabin (iPreferredCabin) { } // //////////////////////////////////////////////////////////////////// DemandStreamKey_T::DemandStreamKey_T (const DemandStreamKey_T& iKey) : _origin (iKey._origin), _destination (iKey._destination), _preferredDepartureDate (iKey._preferredDepartureDate), - _paxType (iKey._paxType) { + _preferredCabin (iKey._preferredCabin) { } // //////////////////////////////////////////////////////////////////// @@ -44,7 +44,7 @@ const std::string DemandStreamKey_T::toString() const { std::ostringstream oStr; oStr << _origin << "-" << _destination << " " << _preferredDepartureDate - << " " << _paxType; + << " " << _preferredCabin; return oStr.str(); } Modified: trunk/stdair/stdair/bom/DemandStreamKey.hpp =================================================================== --- trunk/stdair/stdair/bom/DemandStreamKey.hpp 2010-02-15 15:20:23 UTC (rev 138) +++ trunk/stdair/stdair/bom/DemandStreamKey.hpp 2010-02-15 15:22:16 UTC (rev 139) @@ -6,7 +6,6 @@ // ////////////////////////////////////////////////////////////////////// // StdAir #include <stdair/STDAIR_Types.hpp> -#include <stdair/basic/PassengerType.hpp> #include <stdair/bom/BomKey.hpp> #include <stdair/bom/BomRootKey.hpp> @@ -25,7 +24,7 @@ DemandStreamKey_T (const AirportCode_T& iOrigin, const AirportCode_T& iDestination, const Date_T& iPreferredDepartureDate, - const PassengerType& iPaxType); + const CabinCode_T& iPreferredCabin); DemandStreamKey_T (const DemandStreamKey_T&); /** Destructor. */ @@ -53,9 +52,9 @@ return _preferredDepartureDate; } - /** Get the passenger type. */ - const PassengerType& getPassengerType() const { - return _paxType; + /** Get the preferred cabin. */ + const CabinCode_T& getPreferredCabin() const { + return _preferredCabin; } @@ -89,8 +88,8 @@ /** Preferred departure date */ Date_T _preferredDepartureDate; - /** Passenger type. */ - PassengerType _paxType; + /** Preferred cabin. */ + CabinCode_T _preferredCabin; }; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |