From: <den...@us...> - 2010-12-03 19:49:59
|
Revision: 349 http://rmol.svn.sourceforge.net/rmol/?rev=349&view=rev Author: denis_arnaud Date: 2010-12-03 19:49:52 +0000 (Fri, 03 Dec 2010) Log Message: ----------- [StdAir API] Adapted the code to the new StdAir API. Modified Paths: -------------- trunk/rmol/rmol/RMOL_Service.hpp trunk/rmol/rmol/basic/BasConst_RMOL_Service.hpp trunk/rmol/rmol/factory/FacRmolServiceContext.hpp trunk/rmol/rmol/service/RMOL_ServiceContext.cpp trunk/rmol/rmol/service/RMOL_ServiceContext.hpp trunk/rmol/test/rmol/bomsforforecaster.cpp Modified: trunk/rmol/rmol/RMOL_Service.hpp =================================================================== --- trunk/rmol/rmol/RMOL_Service.hpp 2010-11-21 14:00:45 UTC (rev 348) +++ trunk/rmol/rmol/RMOL_Service.hpp 2010-12-03 19:49:52 UTC (rev 349) @@ -7,7 +7,7 @@ // STL #include <string> // StdAir -#include <stdair/STDAIR_Types.hpp> +#include <stdair/stdair_basic_types.hpp> #include <stdair/basic/BasLogParams.hpp> // RMOL #include <rmol/RMOL_Types.hpp> Modified: trunk/rmol/rmol/basic/BasConst_RMOL_Service.hpp =================================================================== --- trunk/rmol/rmol/basic/BasConst_RMOL_Service.hpp 2010-11-21 14:00:45 UTC (rev 348) +++ trunk/rmol/rmol/basic/BasConst_RMOL_Service.hpp 2010-12-03 19:49:52 UTC (rev 349) @@ -7,7 +7,7 @@ // STL #include <vector> // StdAir -#include <stdair/STDAIR_Types.hpp> +#include <stdair/stdair_basic_types.hpp> // RMOL #include <rmol/RMOL_Types.hpp> Modified: trunk/rmol/rmol/factory/FacRmolServiceContext.hpp =================================================================== --- trunk/rmol/rmol/factory/FacRmolServiceContext.hpp 2010-11-21 14:00:45 UTC (rev 348) +++ trunk/rmol/rmol/factory/FacRmolServiceContext.hpp 2010-12-03 19:49:52 UTC (rev 349) @@ -5,7 +5,7 @@ // Import section // ////////////////////////////////////////////////////////////////////// // StdAir -#include <stdair/STDAIR_Types.hpp> +#include <stdair/stdair_basic_types.hpp> // RMOL #include <rmol/RMOL_Types.hpp> #include <rmol/factory/FacServiceAbstract.hpp> Modified: trunk/rmol/rmol/service/RMOL_ServiceContext.cpp =================================================================== --- trunk/rmol/rmol/service/RMOL_ServiceContext.cpp 2010-11-21 14:00:45 UTC (rev 348) +++ trunk/rmol/rmol/service/RMOL_ServiceContext.cpp 2010-12-03 19:49:52 UTC (rev 349) @@ -109,7 +109,8 @@ // ////////////////////////////////////////////////////////////////////// GeneratedDemandVector_T* RMOL_ServiceContext:: - generateDemand (const int K, const double& iMean, const double& iDeviation) { + generateDemand (const int K, const stdair::MeanValue_T& iMean, + const stdair::StdDevValue_T& iDeviation) { // Build a vector of K generated numbers from the given distribution // N(iMean, iDeviation) and add this vector to the // GeneratedDemandVector holder. Modified: trunk/rmol/rmol/service/RMOL_ServiceContext.hpp =================================================================== --- trunk/rmol/rmol/service/RMOL_ServiceContext.hpp 2010-11-21 14:00:45 UTC (rev 348) +++ trunk/rmol/rmol/service/RMOL_ServiceContext.hpp 2010-12-03 19:49:52 UTC (rev 349) @@ -9,7 +9,8 @@ // Boost #include <boost/shared_ptr.hpp> // StdAir -#include <stdair/STDAIR_Types.hpp> +#include <stdair/stdair_basic_types.hpp> +#include <stdair/stdair_maths_types.hpp> // RMOL #include <rmol/RMOL_Types.hpp> #include <rmol/service/ServiceAbstract.hpp> @@ -55,15 +56,16 @@ public: /** Set up the StudyStatManager. */ void setUpStudyStatManager (); + - private: // /////// Construction / initialisation //////// /** Constructors. */ RMOL_ServiceContext (); RMOL_ServiceContext (const RMOL_ServiceContext&); RMOL_ServiceContext (const stdair::AirlineCode_T&); - RMOL_ServiceContext (const stdair::AirlineCode_T&, const ResourceCapacity_T); + RMOL_ServiceContext (const stdair::AirlineCode_T&, + const ResourceCapacity_T); void init (const ResourceCapacity_T); /** Initialise the StudyStatManager. */ @@ -97,8 +99,8 @@ /** Generate demand for a given (Gaussian) distribution. */ GeneratedDemandVector_T* generateDemand (const int K, - const double& iMean, - const double& iDeviation); + const stdair::MeanValue_T&, + const stdair::StdDevValue_T&); /** Sum the two generated demand vectors . */ GeneratedDemandVector_T* generateDemand (GeneratedDemandVector_T*, Modified: trunk/rmol/test/rmol/bomsforforecaster.cpp =================================================================== --- trunk/rmol/test/rmol/bomsforforecaster.cpp 2010-11-21 14:00:45 UTC (rev 348) +++ trunk/rmol/test/rmol/bomsforforecaster.cpp 2010-12-03 19:49:52 UTC (rev 349) @@ -4,6 +4,7 @@ // STL #include <cassert> #include <fstream> +#include <limits> // StdAir #include <stdair/service/Logger.hpp> // RMOL @@ -12,43 +13,43 @@ namespace RMOL { /**-------------- BOM: Booking class/bucket data ----------------------- */ - struct BookingClassData { + struct BookingClassData { - // Attributes - double _bookingCount; - double _fare; - double _sellupFactor; - bool _censorshipFlag; + // Attributes + double _bookingCount; + double _fare; + double _sellupFactor; + bool _censorshipFlag; - // Constructer - BookingClassData (const double iBookingCount, const double iFare, - const double iSellupFactor, const bool iCensorshipFlag) - : _bookingCount(iBookingCount), _fare(iFare), + // Constructer + BookingClassData (const double iBookingCount, const double iFare, + const double iSellupFactor, const bool iCensorshipFlag) + : _bookingCount(iBookingCount), _fare(iFare), _sellupFactor(iSellupFactor), _censorshipFlag(iCensorshipFlag) { - } + } - // Getters - double getFare () const { - return _fare; - } + // Getters + double getFare () const { + return _fare; + } - bool getCensorshipFlag () const { - return _censorshipFlag; - } + bool getCensorshipFlag () const { + return _censorshipFlag; + } - // Display - std::string toString() const { - std::ostringstream oStr; - oStr << std::endl - << "[Booking class data information]" << std::endl - << "Booking counter: " << _bookingCount << std::endl - << "Fare: " << _fare << std::endl - << "Sell-up Factor: " << _sellupFactor << std::endl - << "censorshipFlag: " << _censorshipFlag << std::endl; - return oStr.str(); - } + // Display + std::string toString() const { + std::ostringstream oStr; + oStr << std::endl + << "[Booking class data information]" << std::endl + << "Booking counter: " << _bookingCount << std::endl + << "Fare: " << _fare << std::endl + << "Sell-up Factor: " << _sellupFactor << std::endl + << "censorshipFlag: " << _censorshipFlag << std::endl; + return oStr.str(); + } - }; + }; /**-------------- BOM: Set of BookingClassData ----------------------- */ struct BookingClassDataSet { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |