From: <qua...@us...> - 2008-08-28 13:14:59
|
Revision: 159 http://rmol.svn.sourceforge.net/rmol/?rev=159&view=rev Author: quannaus Date: 2008-08-28 13:14:55 +0000 (Thu, 28 Aug 2008) Log Message: ----------- Added Monte-Carlo method for SIM. Modified Paths: -------------- trunk/rmol/rmol/RMOL.hpp trunk/rmol/rmol/bom/Emsr.cpp trunk/rmol/test/sample4.csv Modified: trunk/rmol/rmol/RMOL.hpp =================================================================== --- trunk/rmol/rmol/RMOL.hpp 2008-08-27 08:40:35 UTC (rev 158) +++ trunk/rmol/rmol/RMOL.hpp 2008-08-28 13:14:55 UTC (rev 159) @@ -35,7 +35,7 @@ /** Single resource optimization that uses Monte-Carlo algorithm and returns a vector of cumulated booking limits. */ void optimalOptimisationByMCIntegration (const int K, - BookingLimitVector_T&); + BookingLimitVector_T&); /** Single resource optimization using dynamic programming. */ void optimalOptimisationByDP (); Modified: trunk/rmol/rmol/bom/Emsr.cpp =================================================================== --- trunk/rmol/rmol/bom/Emsr.cpp 2008-08-27 08:40:35 UTC (rev 158) +++ trunk/rmol/rmol/bom/Emsr.cpp 2008-08-28 13:14:55 UTC (rev 159) @@ -90,6 +90,8 @@ i.e., n corresponds to the number of classes/buckets. */ ioBucketHolder.begin(); + Bucket& firstBucket = ioBucketHolder.getCurrentBucket(); + firstBucket.setCumulatedBookingLimit (iCabinCapacity); for (short j = 1; j <= nbOfClasses - 1; j++, ioBucketHolder.iterate()) { Bucket& nextBucket = ioBucketHolder.getNextBucket(); @@ -160,6 +162,8 @@ i.e., n corresponds to the number of classes/buckets. */ ioBucketHolder.begin(); + Bucket& firstBucket = ioBucketHolder.getCurrentBucket(); + firstBucket.setCumulatedBookingLimit (iCabinCapacity); for (short j = 1; j <= nbOfClasses - 1; j++, ioBucketHolder.iterate()) { Bucket& currentBucket = ioBucketHolder.getCurrentBucket(); Bucket& nextBucket = ioBucketHolder.getNextBucket(); Modified: trunk/rmol/test/sample4.csv =================================================================== --- trunk/rmol/test/sample4.csv 2008-08-27 08:40:35 UTC (rev 158) +++ trunk/rmol/test/sample4.csv 2008-08-28 13:14:55 UTC (rev 159) @@ -1,5 +1,4 @@ price; mean; standard deviation; -1050; 17.3; 5.8; -567; 45.1; 15.0; -527; 73.6; 17.4; -350; 19.8; 6.6; +1295; 0; 1; +1250; 8; 2.82843; +1205; 4; 2.82843; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <den...@us...> - 2009-01-13 15:17:39
|
Revision: 161 http://rmol.svn.sourceforge.net/rmol/?rev=161&view=rev Author: denis_arnaud Date: 2009-01-13 15:17:29 +0000 (Tue, 13 Jan 2009) Log Message: ----------- [Release 0-15] The RMOL class has been renamed into RMOL_Service. Modified Paths: -------------- trunk/rmol/README trunk/rmol/configure.ac trunk/rmol/rmol/basic/BasConst.cpp trunk/rmol/rmol/bom/DPOptimiser.cpp trunk/rmol/rmol/service/ServiceContext.hpp trunk/rmol/rmol/sources.mk trunk/rmol/rmol.m4.in Added Paths: ----------- trunk/rmol/rmol/RMOL_Service.cpp trunk/rmol/rmol/RMOL_Service.hpp Removed Paths: ------------- trunk/rmol/rmol/RMOL.cpp trunk/rmol/rmol/RMOL.hpp Modified: trunk/rmol/README =================================================================== --- trunk/rmol/README 2008-12-02 17:21:37 UTC (rev 160) +++ trunk/rmol/README 2009-01-13 15:17:29 UTC (rev 161) @@ -21,7 +21,7 @@ http://sourceforge.net/project/showfiles.php?group_id=177703 Then, as usual, you can just type the following sequence: -"./configure --prefix=~/dev/deliveries/rmol-0.14.0 && make && make check && cd test && ./testLibsh" +"./configure --prefix=~/dev/deliveries/rmol-0.15 && make && make check && cd test && ./testLibsh" Of course, if you want to install the library (librmol*.so*), just type: "make install". Modified: trunk/rmol/configure.ac =================================================================== --- trunk/rmol/configure.ac 2008-12-02 17:21:37 UTC (rev 160) +++ trunk/rmol/configure.ac 2009-01-13 15:17:29 UTC (rev 161) @@ -2,7 +2,7 @@ #------------------------------------------------------------------- AC_PREREQ(2.59) AC_COPYRIGHT([Copyright (C) 2007-2008 Denis Arnaud <den...@us...>]) -AC_INIT([RMOL],[0.14.0],[den...@us...],[rmol]) +AC_INIT([RMOL],[0.15.0],[den...@us...],[rmol]) AC_CONFIG_HEADER([rmol/config.h]) AC_CONFIG_SRCDIR([rmol/basic/BasConst.cpp]) AC_CONFIG_AUX_DIR([config]) @@ -13,7 +13,7 @@ AC_SUBST(RPM_RELEASE) # Shared library versioning -GENERIC_LIBRARY_VERSION="0:14:0" +GENERIC_LIBRARY_VERSION="0:15:0" # | | | # +------+ | +---+ # | | | Deleted: trunk/rmol/rmol/RMOL.cpp =================================================================== --- trunk/rmol/rmol/RMOL.cpp 2008-12-02 17:21:37 UTC (rev 160) +++ trunk/rmol/rmol/RMOL.cpp 2009-01-13 15:17:29 UTC (rev 161) @@ -1,200 +0,0 @@ -// ////////////////////////////////////////////////////////////////////// -// Import section -// ////////////////////////////////////////////////////////////////////// -// C -#include <assert.h> -// RMOL -#include <rmol/basic/BasConst_RMOL_Service.hpp> -#include <rmol/field/FldYieldRange.hpp> -#include <rmol/field/FldDistributionParameters.hpp> -#include <rmol/bom/Demand.hpp> -#include <rmol/bom/Bucket.hpp> -#include <rmol/bom/BucketHolder.hpp> -#include <rmol/factory/FacServiceContext.hpp> -#include <rmol/command/Optimiser.hpp> -#include <rmol/service/ServiceContext.hpp> -#include <rmol/RMOL.hpp> - -namespace RMOL { - - // ////////////////////////////////////////////////////////////////////// - RMOL::RMOL () : - _context (NULL) { - } - - // ////////////////////////////////////////////////////////////////////// - RMOL::RMOL (const RMOL& iService) : - _context (NULL) { - } - - // ////////////////////////////////////////////////////////////////////// - RMOL::RMOL (const ResourceCapacity_T iResourceCapacity) { - // Initialise the context - initContext (iResourceCapacity); - } - - // ////////////////////////////////////////////////////////////////////// - RMOL::~RMOL () { - } - - // ////////////////////////////////////////////////////////////////////// - void RMOL::initContext (const ResourceCapacity_T iResourceCapacity) { - _context = &FacServiceContext::instance().create (iResourceCapacity); - } - - // ////////////////////////////////////////////////////////////////////// - void RMOL::addBucket (const double iYieldRange, - const double iDemandMean, - const double iDemandStandardDev) { - assert (_context != NULL); - _context->addBucket (iYieldRange, iDemandMean, iDemandStandardDev); - } - - // ////////////////////////////////////////////////////////////////////// - void RMOL::readFromInputFile (const std::string& iInputFileName) { - assert (_context != NULL); - _context->readFromInputFile (iInputFileName); - } - - // ////////////////////////////////////////////////////////////////////// - void RMOL:: - optimalOptimisationByMCIntegration (const int K) { - - assert (_context != NULL); - const double iCapacity = _context->getCapacity(); - BucketHolder* ioBucketHolder_ptr = _context->getBucketHolder(); - assert (ioBucketHolder_ptr != NULL); - - Optimiser::optimalOptimisationByMCIntegration (K, iCapacity, - *ioBucketHolder_ptr); - - // Display - ioBucketHolder_ptr->display(); - } - - // ////////////////////////////////////////////////////////////////////// - void RMOL:: - optimalOptimisationByMCIntegration (const int K, - BookingLimitVector_T& ioBookingLimitVector) { - - assert (_context != NULL); - const double iCapacity = _context->getCapacity(); - BucketHolder* ioBucketHolder_ptr = _context->getBucketHolder(); - assert (ioBucketHolder_ptr != NULL); - - Optimiser::optimalOptimisationByMCIntegration (K, iCapacity, - *ioBucketHolder_ptr); - - // Fill up booking vector - ioBucketHolder_ptr->fillup(ioBookingLimitVector); - } - - // ////////////////////////////////////////////////////////////////////// - void RMOL:: - optimalOptimisationByDP () { - - assert (_context != NULL); - const double iCapacity = _context->getCapacity(); - BucketHolder* ioBucketHolder_ptr = _context->getBucketHolder(); - assert (ioBucketHolder_ptr != NULL); - - Optimiser::optimalOptimisationByDP (iCapacity, *ioBucketHolder_ptr); - - // Display - ioBucketHolder_ptr->display(); - } - - // ////////////////////////////////////////////////////////////////////// - void RMOL:: - optimalOptimisationByDP (BookingLimitVector_T& ioBookingLimitVector) { - - assert (_context != NULL); - const double iCapacity = _context->getCapacity(); - BucketHolder* ioBucketHolder_ptr = _context->getBucketHolder(); - assert (ioBucketHolder_ptr != NULL); - - Optimiser::optimalOptimisationByDP (iCapacity, *ioBucketHolder_ptr); - - // Fill up booking vector - ioBucketHolder_ptr->fillup(ioBookingLimitVector); - } - - // ////////////////////////////////////////////////////////////////////// - void RMOL::heuristicOptimisationByEmsr () { - assert (_context != NULL); - const double iCapacity = _context->getCapacity(); - BucketHolder* ioBucketHolder_ptr = _context->getBucketHolder(); - assert (ioBucketHolder_ptr != NULL); - - Optimiser::heuristicOptimisationByEmsr (iCapacity, *ioBucketHolder_ptr); - - // Display - ioBucketHolder_ptr->display(); - } - - // ////////////////////////////////////////////////////////////////////// - void RMOL::heuristicOptimisationByEmsr (BookingLimitVector_T& ioBookingLimitVector) { - assert (_context != NULL); - const double iCapacity = _context->getCapacity(); - BucketHolder* ioBucketHolder_ptr = _context->getBucketHolder(); - assert (ioBucketHolder_ptr != NULL); - - Optimiser::heuristicOptimisationByEmsr (iCapacity, *ioBucketHolder_ptr); - - // Fill up booking vector - ioBucketHolder_ptr->fillup(ioBookingLimitVector); - } - - // ////////////////////////////////////////////////////////////////////// - void RMOL::heuristicOptimisationByEmsrA () { - assert (_context != NULL); - const double iCapacity = _context->getCapacity(); - BucketHolder* ioBucketHolder_ptr = _context->getBucketHolder(); - assert (ioBucketHolder_ptr != NULL); - - Optimiser::heuristicOptimisationByEmsrA (iCapacity, *ioBucketHolder_ptr); - - // Display - ioBucketHolder_ptr->display(); - } - - // ////////////////////////////////////////////////////////////////////// - void RMOL::heuristicOptimisationByEmsrA (BookingLimitVector_T& ioBookingLimitVector) { - assert (_context != NULL); - const double iCapacity = _context->getCapacity(); - BucketHolder* ioBucketHolder_ptr = _context->getBucketHolder(); - assert (ioBucketHolder_ptr != NULL); - - Optimiser::heuristicOptimisationByEmsrA (iCapacity, *ioBucketHolder_ptr); - - // Fill up booking vector - ioBucketHolder_ptr->fillup(ioBookingLimitVector); - } - - // ////////////////////////////////////////////////////////////////////// - void RMOL::heuristicOptimisationByEmsrB () { - assert (_context != NULL); - const double iCapacity = _context->getCapacity(); - BucketHolder* ioBucketHolder_ptr = _context->getBucketHolder(); - assert (ioBucketHolder_ptr != NULL); - - Optimiser::heuristicOptimisationByEmsrB (iCapacity, *ioBucketHolder_ptr); - - // Display - ioBucketHolder_ptr->display(); - } - - // ////////////////////////////////////////////////////////////////////// - void RMOL::heuristicOptimisationByEmsrB (BookingLimitVector_T& ioBookingLimitVector) { - assert (_context != NULL); - const double iCapacity = _context->getCapacity(); - BucketHolder* ioBucketHolder_ptr = _context->getBucketHolder(); - assert (ioBucketHolder_ptr != NULL); - - Optimiser::heuristicOptimisationByEmsrB (iCapacity, *ioBucketHolder_ptr); - - // Fill up booking vector - ioBucketHolder_ptr->fillup(ioBookingLimitVector); - } - -} Deleted: trunk/rmol/rmol/RMOL.hpp =================================================================== --- trunk/rmol/rmol/RMOL.hpp 2008-12-02 17:21:37 UTC (rev 160) +++ trunk/rmol/rmol/RMOL.hpp 2009-01-13 15:17:29 UTC (rev 161) @@ -1,80 +0,0 @@ -#ifndef __RMOL_SVC_RMOL_SERVICE_HPP -#define __RMOL_SVC_RMOL_SERVICE_HPP - -// ////////////////////////////////////////////////////////////////////// -// Import section -// ////////////////////////////////////////////////////////////////////// -// STL -#include <string> -// RMOL -#include <rmol/RmolTypes.hpp> - -namespace RMOL { - - /** Forward declaration. */ - class ServiceContext; - - /** Interface for the RMOL Services. */ - class RMOL { - public: - /** Constructor. */ - RMOL (const ResourceCapacity_T iResourceCapacity); - /** Destructor. */ - ~RMOL(); - - /** Add a bucket to the context. */ - void addBucket (const double iYieldRange, const double iDemandMean, - const double iDemandStandardDev); - - /** Read the input data from a file. */ - void readFromInputFile (const std::string& iInputFileName); - - /** Single resource optimization using the Monte Carlo algorithm. */ - void optimalOptimisationByMCIntegration (const int K); - - /** Single resource optimization that uses Monte-Carlo algorithm and - returns a vector of cumulated booking limits. */ - void optimalOptimisationByMCIntegration (const int K, - BookingLimitVector_T&); - - /** Single resource optimization using dynamic programming. */ - void optimalOptimisationByDP (); - - /** Single resource optimization that uses dynamic programming and - returns a vector of cumulated booking limits. */ - void optimalOptimisationByDP (BookingLimitVector_T&); - - /** Single resource optimization using EMSR heuristic. */ - void heuristicOptimisationByEmsr (); - - /** Single resource optimization that uses EMSR heuristic and - returns a vector of cumulated booking limits. */ - void heuristicOptimisationByEmsr (BookingLimitVector_T&); - - /** Single resource optimization using EMSR-a heuristic. */ - void heuristicOptimisationByEmsrA (); - - /** Single resource optimization that uses EMSR-a heuristic and - returns a vector of cumulated booking limits. */ - void heuristicOptimisationByEmsrA (BookingLimitVector_T&); - - /** Single resource optimization using EMSR-b heuristic. */ - void heuristicOptimisationByEmsrB (); - - /** Single resource optimization that uses EMSR-b heuristic and - returns a vector of cumulated booking limits. */ - void heuristicOptimisationByEmsrB (BookingLimitVector_T&); - - private: - /** Default Constructors. */ - RMOL (); - RMOL (const RMOL&); - - /** Initialiser. */ - void initContext (const ResourceCapacity_T iResourceCapacity); - - /** Service Context. */ - ServiceContext* _context; - }; -} -#endif // __RMOL_SVC_RMOL_SERVICE_HPP Copied: trunk/rmol/rmol/RMOL_Service.cpp (from rev 160, trunk/rmol/rmol/RMOL.cpp) =================================================================== --- trunk/rmol/rmol/RMOL_Service.cpp (rev 0) +++ trunk/rmol/rmol/RMOL_Service.cpp 2009-01-13 15:17:29 UTC (rev 161) @@ -0,0 +1,203 @@ +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// C +#include <assert.h> +// RMOL +#include <rmol/basic/BasConst_RMOL_Service.hpp> +#include <rmol/field/FldYieldRange.hpp> +#include <rmol/field/FldDistributionParameters.hpp> +#include <rmol/bom/Demand.hpp> +#include <rmol/bom/Bucket.hpp> +#include <rmol/bom/BucketHolder.hpp> +#include <rmol/factory/FacServiceContext.hpp> +#include <rmol/command/Optimiser.hpp> +#include <rmol/service/ServiceContext.hpp> +#include <rmol/RMOL_Service.hpp> + +namespace RMOL { + + // ////////////////////////////////////////////////////////////////////// + RMOL_Service::RMOL_Service () : + _context (NULL) { + } + + // ////////////////////////////////////////////////////////////////////// + RMOL_Service::RMOL_Service (const RMOL_Service& iService) : + _context (NULL) { + } + + // ////////////////////////////////////////////////////////////////////// + RMOL_Service::RMOL_Service (const ResourceCapacity_T iResourceCapacity) { + // Initialise the context + initContext (iResourceCapacity); + } + + // ////////////////////////////////////////////////////////////////////// + RMOL_Service::~RMOL_Service () { + } + + // ////////////////////////////////////////////////////////////////////// + void RMOL_Service::initContext (const ResourceCapacity_T iResourceCapacity) { + _context = &FacServiceContext::instance().create (iResourceCapacity); + } + + // ////////////////////////////////////////////////////////////////////// + void RMOL_Service::addBucket (const double iYieldRange, + const double iDemandMean, + const double iDemandStandardDev) { + assert (_context != NULL); + _context->addBucket (iYieldRange, iDemandMean, iDemandStandardDev); + } + + // ////////////////////////////////////////////////////////////////////// + void RMOL_Service::readFromInputFile (const std::string& iInputFileName) { + assert (_context != NULL); + _context->readFromInputFile (iInputFileName); + } + + // ////////////////////////////////////////////////////////////////////// + void RMOL_Service:: + optimalOptimisationByMCIntegration (const int K) { + + assert (_context != NULL); + const double iCapacity = _context->getCapacity(); + BucketHolder* ioBucketHolder_ptr = _context->getBucketHolder(); + assert (ioBucketHolder_ptr != NULL); + + Optimiser::optimalOptimisationByMCIntegration (K, iCapacity, + *ioBucketHolder_ptr); + + // Display + ioBucketHolder_ptr->display(); + } + + // ////////////////////////////////////////////////////////////////////// + void RMOL_Service:: + optimalOptimisationByMCIntegration (const int K, + BookingLimitVector_T& ioBookingLimitVector) { + + assert (_context != NULL); + const double iCapacity = _context->getCapacity(); + BucketHolder* ioBucketHolder_ptr = _context->getBucketHolder(); + assert (ioBucketHolder_ptr != NULL); + + Optimiser::optimalOptimisationByMCIntegration (K, iCapacity, + *ioBucketHolder_ptr); + + // Fill up booking vector + ioBucketHolder_ptr->fillup(ioBookingLimitVector); + } + + // ////////////////////////////////////////////////////////////////////// + void RMOL_Service:: + optimalOptimisationByDP () { + + assert (_context != NULL); + const double iCapacity = _context->getCapacity(); + BucketHolder* ioBucketHolder_ptr = _context->getBucketHolder(); + assert (ioBucketHolder_ptr != NULL); + + Optimiser::optimalOptimisationByDP (iCapacity, *ioBucketHolder_ptr); + + // Display + ioBucketHolder_ptr->display(); + } + + // ////////////////////////////////////////////////////////////////////// + void RMOL_Service:: + optimalOptimisationByDP (BookingLimitVector_T& ioBookingLimitVector) { + + assert (_context != NULL); + const double iCapacity = _context->getCapacity(); + BucketHolder* ioBucketHolder_ptr = _context->getBucketHolder(); + assert (ioBucketHolder_ptr != NULL); + + Optimiser::optimalOptimisationByDP (iCapacity, *ioBucketHolder_ptr); + + // Fill up booking vector + ioBucketHolder_ptr->fillup(ioBookingLimitVector); + } + + // ////////////////////////////////////////////////////////////////////// + void RMOL_Service::heuristicOptimisationByEmsr () { + assert (_context != NULL); + const double iCapacity = _context->getCapacity(); + BucketHolder* ioBucketHolder_ptr = _context->getBucketHolder(); + assert (ioBucketHolder_ptr != NULL); + + Optimiser::heuristicOptimisationByEmsr (iCapacity, *ioBucketHolder_ptr); + + // Display + ioBucketHolder_ptr->display(); + } + + // ////////////////////////////////////////////////////////////////////// + void RMOL_Service:: + heuristicOptimisationByEmsr (BookingLimitVector_T& ioBookingLimitVector) { + assert (_context != NULL); + const double iCapacity = _context->getCapacity(); + BucketHolder* ioBucketHolder_ptr = _context->getBucketHolder(); + assert (ioBucketHolder_ptr != NULL); + + Optimiser::heuristicOptimisationByEmsr (iCapacity, *ioBucketHolder_ptr); + + // Fill up booking vector + ioBucketHolder_ptr->fillup(ioBookingLimitVector); + } + + // ////////////////////////////////////////////////////////////////////// + void RMOL_Service::heuristicOptimisationByEmsrA () { + assert (_context != NULL); + const double iCapacity = _context->getCapacity(); + BucketHolder* ioBucketHolder_ptr = _context->getBucketHolder(); + assert (ioBucketHolder_ptr != NULL); + + Optimiser::heuristicOptimisationByEmsrA (iCapacity, *ioBucketHolder_ptr); + + // Display + ioBucketHolder_ptr->display(); + } + + // ////////////////////////////////////////////////////////////////////// + void RMOL_Service:: + heuristicOptimisationByEmsrA (BookingLimitVector_T& ioBookingLimitVector) { + assert (_context != NULL); + const double iCapacity = _context->getCapacity(); + BucketHolder* ioBucketHolder_ptr = _context->getBucketHolder(); + assert (ioBucketHolder_ptr != NULL); + + Optimiser::heuristicOptimisationByEmsrA (iCapacity, *ioBucketHolder_ptr); + + // Fill up booking vector + ioBucketHolder_ptr->fillup(ioBookingLimitVector); + } + + // ////////////////////////////////////////////////////////////////////// + void RMOL_Service::heuristicOptimisationByEmsrB () { + assert (_context != NULL); + const double iCapacity = _context->getCapacity(); + BucketHolder* ioBucketHolder_ptr = _context->getBucketHolder(); + assert (ioBucketHolder_ptr != NULL); + + Optimiser::heuristicOptimisationByEmsrB (iCapacity, *ioBucketHolder_ptr); + + // Display + ioBucketHolder_ptr->display(); + } + + // ////////////////////////////////////////////////////////////////////// + void RMOL_Service:: + heuristicOptimisationByEmsrB (BookingLimitVector_T& ioBookingLimitVector) { + assert (_context != NULL); + const double iCapacity = _context->getCapacity(); + BucketHolder* ioBucketHolder_ptr = _context->getBucketHolder(); + assert (ioBucketHolder_ptr != NULL); + + Optimiser::heuristicOptimisationByEmsrB (iCapacity, *ioBucketHolder_ptr); + + // Fill up booking vector + ioBucketHolder_ptr->fillup(ioBookingLimitVector); + } + +} Property changes on: trunk/rmol/rmol/RMOL_Service.cpp ___________________________________________________________________ Added: svn:mergeinfo + Copied: trunk/rmol/rmol/RMOL_Service.hpp (from rev 160, trunk/rmol/rmol/RMOL.hpp) =================================================================== --- trunk/rmol/rmol/RMOL_Service.hpp (rev 0) +++ trunk/rmol/rmol/RMOL_Service.hpp 2009-01-13 15:17:29 UTC (rev 161) @@ -0,0 +1,80 @@ +#ifndef __RMOL_SVC_RMOL_SERVICE_HPP +#define __RMOL_SVC_RMOL_SERVICE_HPP + +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// STL +#include <string> +// RMOL +#include <rmol/RmolTypes.hpp> + +namespace RMOL { + + /** Forward declaration. */ + class ServiceContext; + + /** Interface for the RMOL Services. */ + class RMOL_Service { + public: + /** Constructor. */ + RMOL_Service (const ResourceCapacity_T iResourceCapacity); + /** Destructor. */ + ~RMOL_Service(); + + /** Add a bucket to the context. */ + void addBucket (const double iYieldRange, const double iDemandMean, + const double iDemandStandardDev); + + /** Read the input data from a file. */ + void readFromInputFile (const std::string& iInputFileName); + + /** Single resource optimization using the Monte Carlo algorithm. */ + void optimalOptimisationByMCIntegration (const int K); + + /** Single resource optimization that uses Monte-Carlo algorithm and + returns a vector of cumulated booking limits. */ + void optimalOptimisationByMCIntegration (const int K, + BookingLimitVector_T&); + + /** Single resource optimization using dynamic programming. */ + void optimalOptimisationByDP (); + + /** Single resource optimization that uses dynamic programming and + returns a vector of cumulated booking limits. */ + void optimalOptimisationByDP (BookingLimitVector_T&); + + /** Single resource optimization using EMSR heuristic. */ + void heuristicOptimisationByEmsr (); + + /** Single resource optimization that uses EMSR heuristic and + returns a vector of cumulated booking limits. */ + void heuristicOptimisationByEmsr (BookingLimitVector_T&); + + /** Single resource optimization using EMSR-a heuristic. */ + void heuristicOptimisationByEmsrA (); + + /** Single resource optimization that uses EMSR-a heuristic and + returns a vector of cumulated booking limits. */ + void heuristicOptimisationByEmsrA (BookingLimitVector_T&); + + /** Single resource optimization using EMSR-b heuristic. */ + void heuristicOptimisationByEmsrB (); + + /** Single resource optimization that uses EMSR-b heuristic and + returns a vector of cumulated booking limits. */ + void heuristicOptimisationByEmsrB (BookingLimitVector_T&); + + private: + /** Default Constructors. */ + RMOL_Service (); + RMOL_Service (const RMOL_Service&); + + /** Initialiser. */ + void initContext (const ResourceCapacity_T iResourceCapacity); + + /** Service Context. */ + ServiceContext* _context; + }; +} +#endif // __RMOL_SVC_RMOL_SERVICE_HPP Property changes on: trunk/rmol/rmol/RMOL_Service.hpp ___________________________________________________________________ Added: svn:mergeinfo + Modified: trunk/rmol/rmol/basic/BasConst.cpp =================================================================== --- trunk/rmol/rmol/basic/BasConst.cpp 2008-12-02 17:21:37 UTC (rev 160) +++ trunk/rmol/rmol/basic/BasConst.cpp 2009-01-13 15:17:29 UTC (rev 161) @@ -14,7 +14,7 @@ /** Default value for the precision of the integral computation in the Dynamic Programming algorithm (100 means that the precision will be 0.01). */ - const int DEFAULT_PRECISION = 100; + const int DEFAULT_PRECISION = 10; /** Default value for the load factor used for overbooking calculation. */ const double DEFAULT_OVERBOOKING_LOAD_FACTOR = 0.0; Modified: trunk/rmol/rmol/bom/DPOptimiser.cpp =================================================================== --- trunk/rmol/rmol/bom/DPOptimiser.cpp 2008-12-02 17:21:37 UTC (rev 160) +++ trunk/rmol/rmol/bom/DPOptimiser.cpp 2009-01-13 15:17:29 UTC (rev 161) @@ -188,7 +188,7 @@ currentBucket.setCumulatedProtection (realProtection); nextBucket.setCumulatedBookingLimit (bookingLimit); - currentProtection = nextProtection; + currentProtection = static_cast<int> (std::floor (nextProtection)); ioBucketHolder.iterate(); ++currentBucketIndex; Modified: trunk/rmol/rmol/service/ServiceContext.hpp =================================================================== --- trunk/rmol/rmol/service/ServiceContext.hpp 2008-12-02 17:21:37 UTC (rev 160) +++ trunk/rmol/rmol/service/ServiceContext.hpp 2009-01-13 15:17:29 UTC (rev 161) @@ -20,7 +20,7 @@ /** The RMOL_Service class should be the sole class to get access to ServiceContext content: general users do not want to bother with a context interface. */ - friend class RMOL; + friend class RMOL_Service; friend class FacServiceContext; private: Modified: trunk/rmol/rmol/sources.mk =================================================================== --- trunk/rmol/rmol/sources.mk 2008-12-02 17:21:37 UTC (rev 160) +++ trunk/rmol/rmol/sources.mk 2009-01-13 15:17:29 UTC (rev 161) @@ -1,3 +1,3 @@ service_h_sources = $(top_srcdir)/rmol/RmolTypes.hpp \ - $(top_srcdir)/rmol/RMOL.hpp -service_cc_sources = $(top_srcdir)/rmol/RMOL.cpp + $(top_srcdir)/rmol/RMOL_Service.hpp +service_cc_sources = $(top_srcdir)/rmol/RMOL_Service.cpp Modified: trunk/rmol/rmol.m4.in =================================================================== --- trunk/rmol/rmol.m4.in 2008-12-02 17:21:37 UTC (rev 160) +++ trunk/rmol/rmol.m4.in 2009-01-13 15:17:29 UTC (rev 161) @@ -50,6 +50,7 @@ # AC_MSG_RESULT([ok (set to ${BOOST_CFLAGS})]) # fi +# AC_MSG_CHECKING(for BOOST_DATE_TIME_LIB environment variable) # if test x"${BOOST_DATE_TIME_LIB}" = x; then # AC_MSG_RESULT([Warning: @PACKAGE_NAME@ needs Boost Date-Time library, and the BOOST_DATE_TIME_LIB environment variable does not appears to be set. The @PACKAGE_NAME@ may fail to link.]) # else This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <den...@us...> - 2009-03-05 00:50:38
|
Revision: 166 http://rmol.svn.sourceforge.net/rmol/?rev=166&view=rev Author: denis_arnaud Date: 2009-03-05 00:50:26 +0000 (Thu, 05 Mar 2009) Log Message: ----------- [Release 0.17.0] Fixed a few warnings, and re-wrote the RPM specification file, so that it can be delivered (at least) on Fedora Linux distributions. Modified Paths: -------------- trunk/rmol/configure.ac trunk/rmol/po/fr.po trunk/rmol/rmol/bom/DPOptimiser.cpp trunk/rmol/rmol/bom/Demand.cpp trunk/rmol/rmol/bom/Emsr.cpp trunk/rmol/rmol.spec.in Property Changed: ---------------- trunk/rmol/ Property changes on: trunk/rmol ___________________________________________________________________ Modified: svn:ignore - autom4te.cache INSTALL Makefile Makefile.in aclocal.m4 config.log config.status configure libtool rmol-config rmol-html-doc-0.12.0.tar.bz2 rmol-html-doc-0.12.0.tar.gz rmol.pc rmol.m4 rmol.spec config.guess config.h config.h.in config.sub configure.log rmol-0.12.0.tar.bz2 rmol-0.12.0.tar.gz stamp-h1 + autom4te.cache INSTALL Makefile Makefile.in aclocal.m4 config.log config.status configure libtool rmol-config rmol-html-doc-0.*.0.tar.bz2 rmol-html-doc-0.*.0.tar.gz rmol.pc rmol.m4 rmol.spec config.guess config.h config.h.in config.sub configure.log rmol-0.*.0.tar.bz2 rmol-0.*.0.tar.gz stamp-h1 Modified: trunk/rmol/configure.ac =================================================================== --- trunk/rmol/configure.ac 2009-02-15 11:33:58 UTC (rev 165) +++ trunk/rmol/configure.ac 2009-03-05 00:50:26 UTC (rev 166) @@ -1,7 +1,7 @@ # Process this file with autoconf to produce a configure script #------------------------------------------------------------------- AC_PREREQ(2.59) -AC_COPYRIGHT([Copyright (C) 2007-2008 Denis Arnaud <den...@us...>]) +AC_COPYRIGHT([Copyright (C) 2007-2009 Denis Arnaud <den...@us...>]) AC_INIT([RMOL],[0.17.0],[den...@us...],[rmol]) AC_CONFIG_HEADER([rmol/config.h]) AC_CONFIG_SRCDIR([rmol/basic/BasConst.cpp]) Modified: trunk/rmol/po/fr.po =================================================================== --- trunk/rmol/po/fr.po 2009-02-15 11:33:58 UTC (rev 165) +++ trunk/rmol/po/fr.po 2009-03-05 00:50:26 UTC (rev 166) @@ -1261,8 +1261,8 @@ "\n" "Le propri\xE9taire n'est pas modifi\xE9 si manquant. Le groupe n'est pas modifi\xE9 " "si manquant,\n" -"mais modifi\xE9 au groupe de login implicite si \xAB : \xBB en suivant le " -"PROPRI\xC9TAIRE symbolique.\n" +"mais modifi\xE9 au groupe de login implicite si \xAB : \xBB en suivant le PROPRI\xC9TAIRE " +"symbolique.\n" "Le PROPRI\xC9TAIRE et le GROUPE peuvent \xEAtre num\xE9rique ou symbolique.\n" #: src/chown.c:150 @@ -2038,8 +2038,8 @@ "\n" msgstr "" "Produire des morceaux du FICHIER s\xE9par\xE9s par MOD\xC8LE(s) vers les fichiers\n" -"\xAB xx01 \xBB, \xAB xx02 \xBB, ... et le nombre d'octets de chaque morceau sur la " -"sortie standard.\n" +"\xAB xx01 \xBB, \xAB xx02 \xBB, ... et le nombre d'octets de chaque morceau sur la sortie " +"standard.\n" "\n" #: src/csplit.c:1467 @@ -4930,8 +4930,8 @@ "s'applique aux\n" " fichiers non r\xE9cents et FORMAT2 aux fichiers " "r\xE9cents;\n" -" si le STYLE est pr\xE9fix\xE9 par \xAB posix- \xBB, " -"STYLE prend effet\n" +" si le STYLE est pr\xE9fix\xE9 par \xAB posix- \xBB, STYLE " +"prend effet\n" " seulement en dehors de la locale POSIX\n" " -t trier selon la date de modification:\n" " -T, --tabsize=TAILLE utiliser la tabulation selon la TAILLE\n" @@ -6556,8 +6556,7 @@ " -C, --copyright afficher les Droits d'auteur et les " "conditions\n" " de recopie\n" -" -G, --traditional faire fonctionner \xAB ptx \xBB comme en System " -"V\n" +" -G, --traditional faire fonctionner \xAB ptx \xBB comme en System V\n" " -F, --flag-truncation=CHA\xCENE utiliser la CHA\xCENE pour indiquer la " "troncation\n" " des lignes\n" @@ -7471,8 +7470,7 @@ " ou: %s OPTION\n" "Effectuer une pause de NOMBRE de secondes. Le SUFFIXE peut \xEAtre \xAB s \xBB pour " "des\n" -"secondes (par d\xE9faut), \xAB m \xBB pour des minutes, \xAB h \xBB pour des heures ou \xAB d " -"\xBB\n" +"secondes (par d\xE9faut), \xAB m \xBB pour des minutes, \xAB h \xBB pour des heures ou \xAB d \xBB\n" "pour des jours. Contrairement \xE0 la plupart des implantations qui requierent " "un\n" "nombre entier, ici le NOMBRE peut \xEAtre un nombre arbitraire en virgule " @@ -8812,8 +8810,7 @@ "\n" msgstr "" "\n" -"Si le premier caract\xE8re de N (le nombre d'octets ou de lignes) est un \xAB + " -"\xBB,\n" +"Si le premier caract\xE8re de N (le nombre d'octets ou de lignes) est un \xAB + \xBB,\n" "afficher \xE0 partir du Ni\xE8me items depuis le d\xE9but de chaque fichier,\n" "autrement, afficher les derniers N items du fichier.\n" "N peut avoir un suffixe multiplicateur:\n" @@ -10119,8 +10116,7 @@ #~ "warning: unportable BRE: %s: using `^' as the first character\n" #~ "of the basic regular expression is not portable; it is being ignored" #~ msgstr "" -#~ "AVERTISSEMENT: BRE non portable: %s: l'utilisation de \xAB ^ \xBB comme " -#~ "premier\n" +#~ "AVERTISSEMENT: BRE non portable: %s: l'utilisation de \xAB ^ \xBB comme premier\n" #~ "caract\xE8re d'une expression r\xE9guli\xE8re de base n'est pas portable; cela a " #~ "\xE9t\xE9 ignor\xE9." @@ -10689,8 +10685,8 @@ #~ msgid "starting page number larger than total number of pages: `%d'" #~ msgstr "" -#~ "Le num\xE9ro de page de d\xE9part est plus grand que le nombre total de pages: " -#~ "\xAB %d \xBB" +#~ "Le num\xE9ro de page de d\xE9part est plus grand que le nombre total de pages: \xAB " +#~ "%d \xBB" #~ msgid "Page %d" #~ msgstr "Page %d" @@ -12932,8 +12928,7 @@ #~ " -S FICHIER FICHIER existe et est de type \xAB socket \xBB\n" #~ " -t [DF] descripteur de fichier DF (sortie standard par d\xE9faut)\n" #~ " est ouvert sur le terminal\n" -#~ " -u FICHIER FICHIER existe et le bit \xAB set-user-ID \xBB, est " -#~ "initialis\xE9\n" +#~ " -u FICHIER FICHIER existe et le bit \xAB set-user-ID \xBB, est initialis\xE9\n" #~ " -w FICHIER FICHIER existe et l'\xE9criture y est permise\n" #~ " -x FICHIER FICHIER existe et ex\xE9cutable\n" Modified: trunk/rmol/rmol/bom/DPOptimiser.cpp =================================================================== --- trunk/rmol/rmol/bom/DPOptimiser.cpp 2009-02-15 11:33:58 UTC (rev 165) +++ trunk/rmol/rmol/bom/DPOptimiser.cpp 2009-03-05 00:50:26 UTC (rev 166) @@ -48,7 +48,7 @@ bool protectionChanged = false; double nextProtection = 0.0; std::vector<double> currentMERVector; - double testGradient = 10000; + // double testGradient = 10000; Bucket& currentBucket = ioBucketHolder.getCurrentBucket(); const double meanDemand = currentBucket.getMean(); Modified: trunk/rmol/rmol/bom/Demand.cpp =================================================================== --- trunk/rmol/rmol/bom/Demand.cpp 2009-02-15 11:33:58 UTC (rev 165) +++ trunk/rmol/rmol/bom/Demand.cpp 2009-03-05 00:50:26 UTC (rev 166) @@ -7,27 +7,26 @@ // ////////////////////////////////////////////////////////////////////// Demand::Demand () : - _distributionParameters (FldDistributionParameters()), - _yieldRange (FldYieldRange()) { + _yieldRange (FldYieldRange()), + _distributionParameters (FldDistributionParameters()) { } // ////////////////////////////////////////////////////////////////////// Demand::Demand (const Demand& iDemand) : - _distributionParameters (iDemand.getDistributionParameters()), - _yieldRange (iDemand.getYieldRange()) { + _yieldRange (iDemand.getYieldRange()), + _distributionParameters (iDemand.getDistributionParameters()) { } // ////////////////////////////////////////////////////////////////////// Demand::Demand (const FldDistributionParameters& iDistributionParameters, const FldYieldRange& iYieldRange) : - _distributionParameters (iDistributionParameters), - _yieldRange (iYieldRange) { + _yieldRange (iYieldRange), + _distributionParameters (iDistributionParameters) { } // ////////////////////////////////////////////////////////////////////// Demand::~Demand() { } - // ////////////////////////////////////////////////////////////////////// double Demand::getUpperYield() const { Modified: trunk/rmol/rmol/bom/Emsr.cpp =================================================================== --- trunk/rmol/rmol/bom/Emsr.cpp 2009-02-15 11:33:58 UTC (rev 165) +++ trunk/rmol/rmol/bom/Emsr.cpp 2009-03-05 00:50:26 UTC (rev 166) @@ -49,7 +49,9 @@ lEmsrValueList.sort(); lEmsrValueList.reverse(); - assert (lEmsrValueList.size() >= lCabinCapacity); + // Sanity check + const int lEmsrValueListSize = lEmsrValueList.size(); + assert (lEmsrValueListSize >= lCabinCapacity); // Copy the EMSR sorted values to the BPV. EmsrValueList_T::iterator currentValue = lEmsrValueList.begin(); Modified: trunk/rmol/rmol.spec.in =================================================================== --- trunk/rmol/rmol.spec.in 2009-02-15 11:33:58 UTC (rev 165) +++ trunk/rmol/rmol.spec.in 2009-03-05 00:50:26 UTC (rev 166) @@ -1,30 +1,21 @@ -Name: @PACKAGE@ -Summary: @PACKAGE_NAME@ is a C++ library of Revenue Management and Optimisation classes and functions. Typically, the service providers (like, e.g., airlines, hotels or car rental companies) may use that library to help them optimise their revenues from their seat capacities. -Packager: Denis Arnaud <den...@us...> -%define version @VERSION@ -%define release @RPM_RELEASE@ -Version: %{version} -Release: %{release} -License: LGPL -Vendor: The RMOL Team -Distribution: Research Software -Source: http://download.sourceforge.net/%{name}/%{name}-%{version}.tar.gz -Group: System Environment/Libraries -URL: http://%{name}.sourceforge.net/ -Requires: gsl-devel >= 1.8 -#Requires: gsl >= 1.8 +Name: @PACKAGE@ +Version: 0.17.0 +Release: 0.dev.1 +Summary: @PACKAGE_NAME@ is a C++ library of Revenue Management and Optimisation classes and functions. Typically, the service providers (like, e.g., airlines, hotels or car rental companies) may use that library to help them optimise their revenues from their seat capacities. -Prefix: %{_prefix} +Group: System Environment/Libraries +License: LGPL +URL: http://%{name}.sourceforge.net +Source0: http://download.sourceforge.net/%{name}/%{name}-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot -BuildRequires: gsl-devel >= 1.8 -BuildRequires: gettext, autoconf >= 2.58, automake >= 1.8 +BuildRequires: gsl-devel >= 1.8 +BuildRequires: boost-devel >= 1.34 +#Requires: -Prereq: /sbin/install-info - -%description -RMOL is a C++ library of Revenue Management and Optimisation classes and -functions. Typically, that library may be used by service providers +%description +@PACKAGE_NAME@ is a C++ library of Revenue Management and Optimisation classes +and functions. Typically, that library may be used by service providers (e.g., airlines offering flight seats, hotels offering rooms, rental car companies offering rental days, broadcasting company offering advertisement slots, theaters offering seats, etc.). @@ -33,60 +24,46 @@ The Theory and practice of Revenue Management, by Kalyan T. Talluri and Garrett J. van Ryzin, Kluwer Academic Publishers, 2004, ISBN 1-4020-7701-7 -Install the rmol package if you need a library for high-level +Install the @PACKAGE@ package if you need a library for high-level revenue management functionality. -%package devel -Summary: Static libraries and header files for RMOL development. -Group: Development/Libraries -Requires: %{name} = %{version} +%package devel +Summary: Headers and libraries for building apps that use @PACKAGE_NAME@ +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} -%description devel +%description devel +This package contains headers and libraries required to build applications that +use @PACKAGE_NAME@. -The rmol-devel package contains the header files and static libraries -necessary for developing programs using the GSL (GNU Scientific -Library). - %package html-doc Summary: HTML documentation for the @PACKAGE_NAME@ library Group: System Environment/Libraries %description html-doc -This package contains the documentation in the HTML format of the RMOL -library. The documentation is the same as at the RMOL web page. +This package contains the documentation in the HTML format of the @PACKAGE_NAME@ +library. The documentation is the same as at the @PACKAGE_NAME@ web page. + %prep %setup -q + %build -%configure --enable-static --with-gsl-prefix=/nastools/gsl --with-docdir=%{_docdir}/%{name}-html-doc -make +%configure --enable-static --with-docdir=%{_docdir}/%{name}-%{version}-html-doc +make %{?_smp_mflags} -%install -[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT -make DESTDIR=$RPM_BUILD_ROOT install -%find_lang %{name} +%install +rm -rf $RPM_BUILD_ROOT +make install DESTDIR=$RPM_BUILD_ROOT +#%find_lang %{name} # remove unpackaged files from the buildroot rm -f $RPM_BUILD_ROOT%{_infodir}/dir -rm -rf $RPM_BUILD_ROOT%{_mandir} -rm -rf $RPM_BUILD_ROOT%{_sysconfdir} -rm -rf $RPM_BUILD_ROOT%{_libdir}/pkgconfig -rmolcsuffix=`echo "%{_libdir}" | sed s,/usr/,,` -mv $RPM_BUILD_ROOT%{_bindir}/%{name}-config $RPM_BUILD_ROOT%{_bindir}/%{name}-config-$rmolcsuffix -cat > $RPM_BUILD_ROOT%{_bindir}/%{name}-config << EOF -#!/bin/sh -if [ -e %{_bindir}/%{name}-config-lib64 ]; then - exec %{_bindir}/%{name}-config-lib64 "\$@" -elif [ -e %{_bindir}/%{name}-config-* ]; then - rmolcfile="\`ls %{_bindir}/%{name}-config-* | head -n1\`" - exec \$rmolcfile "\$@" -fi -EOF -chmod 755 $RPM_BUILD_ROOT%{_bindir}/%{name}-config +%clean +rm -rf $RPM_BUILD_ROOT - %post -p /sbin/ldconfig %postun -p /sbin/ldconfig @@ -96,37 +73,35 @@ %preun devel if [ "$1" = 0 ]; then - /sbin/install-info --delete %{_infodir}/%{name}-ref.info.gz %{_infodir}/dir + /sbin/install-info --delete %{_infodir}/%{name}-ref.info.gz %{_infodir}/dir fi -%clean -rm -rf $RPM_BUILD_ROOT +%files +#-f %{name}.lang +%defattr(-,root,root,-) +%doc AUTHORS ChangeLog COPYING INSTALL NEWS README +%{_bindir}/* +%{_libdir}/lib*.so.* +#%{_docdir}/%{name}-%{version}/html +#%{_datadir}/info/dir +%{_datadir}/man/man3/%{name}.3.gz -%files -f %{name}.lang -%defattr(-,root,root) -%doc ABOUT-NLS AUTHORS COPYING ChangeLog INSTALL NEWS README TODO -%{_libdir}/*so.* -#%{_datadir}/locale/*/LC_*/*.mo - %files devel -%defattr(-,root,root) -%doc AUTHORS COPYING -%{_libdir}/*.la -%{_libdir}/*.a -%{_libdir}/*.so -%{_bindir}/%{name}-config* -%{_datadir}/aclocal/* +%defattr(-,root,root,-) +%doc %{_includedir}/%{name} -%{_infodir}/*info* -# The pkgconfig file cannot be installed. I don't understand why. Help needed! -#%{_libdir}/pkgconfig/%{name}.pc -# If you find a way to install the man pages from within rpmbuild, don't -# hesitate! -#%{_mandir}/man*/* +%{_libdir}/lib*.a +%{_libdir}/lib*.la +%{_libdir}/lib*.so +%{_libdir}/pkgconfig/%{name}.pc +%{_datadir}/aclocal/%{name}.m4 +%{_datadir}/info/%{name}-ref.info.gz +%{_datadir}/man/man1/%{name}-config.1.gz %files html-doc -%doc %{_docdir}/%{name}-html-doc +%doc %{_docdir}/%{name}-%{version}-html-doc %changelog -* Sat Jan 27 2007 Denis Arnaud <den...@us...> -- Initial spec file prepared + * Wed Mar 4 2009 Denis Arnaud <den...@m4...> %{version}.dev.1 + - Second RPM release + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <den...@us...> - 2009-03-07 23:59:02
|
Revision: 170 http://rmol.svn.sourceforge.net/rmol/?rev=170&view=rev Author: denis_arnaud Date: 2009-03-07 23:58:58 +0000 (Sat, 07 Mar 2009) Log Message: ----------- [Build] Removed the i18n feature (as it was not working properly... and still not used). Modified Paths: -------------- trunk/rmol/Makefile.am trunk/rmol/configure.ac trunk/rmol/rmol.spec.in Removed Paths: ------------- trunk/rmol/po/create_po_file.sh.in Modified: trunk/rmol/Makefile.am =================================================================== --- trunk/rmol/Makefile.am 2009-03-07 22:50:43 UTC (rev 169) +++ trunk/rmol/Makefile.am 2009-03-07 23:58:58 UTC (rev 170) @@ -24,7 +24,7 @@ EXTRA_DIST = @PACKAGE@.spec @PACKAGE@.m4 @PACKAGE@.pc Makefile.common # Build in these directories: -SUBDIRS = rmol win32 po man $(INFO_DOC_DIR) $(HTML_DOC_DIR) $(TEST_DIR) +SUBDIRS = rmol win32 man $(INFO_DOC_DIR) $(HTML_DOC_DIR) $(TEST_DIR) # Configuration helpers Modified: trunk/rmol/configure.ac =================================================================== --- trunk/rmol/configure.ac 2009-03-07 22:50:43 UTC (rev 169) +++ trunk/rmol/configure.ac 2009-03-07 23:58:58 UTC (rev 170) @@ -287,10 +287,6 @@ ]) -# I18n -AM_GNU_GETTEXT([external], [need-formatstring-macros]) -AM_GNU_GETTEXT_VERSION([0.14]) - # Define configured files AC_CONFIG_FILES( Makefile @@ -316,7 +312,6 @@ doc/doxygen_html.cfg doc/sourceforge/howto_release_rmol.html po/Makefile.in - po/create_po_file.sh test/Makefile win32/Makefile) AC_OUTPUT Deleted: trunk/rmol/po/create_po_file.sh.in =================================================================== --- trunk/rmol/po/create_po_file.sh.in 2009-03-07 22:50:43 UTC (rev 169) +++ trunk/rmol/po/create_po_file.sh.in 2009-03-07 23:58:58 UTC (rev 170) @@ -1,5 +0,0 @@ -#!/bin/sh - -find ../rmol -name '*.[ch]pp' > sources_for_po.txt -xgettext -d rmol -a -f sources_for_po.txt - Modified: trunk/rmol/rmol.spec.in =================================================================== --- trunk/rmol/rmol.spec.in 2009-03-07 22:50:43 UTC (rev 169) +++ trunk/rmol/rmol.spec.in 2009-03-07 23:58:58 UTC (rev 170) @@ -1,7 +1,7 @@ Name: @PACKAGE@ Version: 0.17.0 Release: 0.dev.1 -Summary: @PACKAGE_NAME@ is a C++ library of Revenue Management and Optimisation classes and functions. Typically, the service providers (like, e.g., airlines, hotels or car rental companies) may use that library to help them optimise their revenues from their seat capacities. +Summary: @PACKAGE_NAME@ is a C++ library of Revenue Management and Optimisation classes and functions. Group: System Environment/Libraries License: LGPL @@ -11,16 +11,17 @@ BuildRequires: gsl-devel >= 1.8 BuildRequires: boost-devel >= 1.34 -BuildRequires: gettext >= 0.14 -BuildRequires: gettext-devel >= 0.14 #Requires: + Typically, the service providers (like, e.g., airlines, hotels or car rental companies) may use that library to help them + %description @PACKAGE_NAME@ is a C++ library of Revenue Management and Optimisation classes and functions. Typically, that library may be used by service providers (e.g., airlines offering flight seats, hotels offering rooms, rental car companies offering rental days, broadcasting company offering advertisement -slots, theaters offering seats, etc.). +slots, theaters offering seats, etc.) to help in optimising their revenues from +seat capacities. Most of the algorithms implemented are public and documented in the following book: The Theory and practice of Revenue Management, by Kalyan T. Talluri and @@ -59,7 +60,7 @@ %install rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT -%find_lang %{name} +#%find_lang %{name} # remove unpackaged files from the buildroot rm -f $RPM_BUILD_ROOT%{_infodir}/dir @@ -78,7 +79,8 @@ /sbin/install-info --delete %{_infodir}/%{name}-ref.info.gz %{_infodir}/dir fi -%files -f %{name}.lang +%files +# -f %{name}.lang %defattr(-,root,root,-) %doc AUTHORS ChangeLog COPYING INSTALL NEWS README %{_bindir}/%{name} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <den...@us...> - 2009-03-07 22:51:07
|
Revision: 169 http://rmol.svn.sourceforge.net/rmol/?rev=169&view=rev Author: denis_arnaud Date: 2009-03-07 22:50:43 +0000 (Sat, 07 Mar 2009) Log Message: ----------- [Build] 1. Improved the translation files. 2. Now delivers a rmol binary. Modified Paths: -------------- trunk/rmol/NEWS trunk/rmol/configure.ac trunk/rmol/po/POTFILES.in trunk/rmol/po/fr.po trunk/rmol/po/rmol.pot trunk/rmol/rmol/Makefile.am trunk/rmol/rmol/service/sources.mk trunk/rmol/rmol/sources.mk trunk/rmol/rmol.spec.in Added Paths: ----------- trunk/rmol/po/create_po_file.sh.in trunk/rmol/rmol/rmol.cpp trunk/rmol/rmol/service/RMOL_Service.cpp Removed Paths: ------------- trunk/rmol/rmol/RMOL_Service.cpp Property Changed: ---------------- trunk/rmol/po/ trunk/rmol/rmol/ Modified: trunk/rmol/NEWS =================================================================== --- trunk/rmol/NEWS 2009-03-05 02:36:56 UTC (rev 168) +++ trunk/rmol/NEWS 2009-03-07 22:50:43 UTC (rev 169) @@ -0,0 +1,3 @@ + +2009-03-07: Release of RPMs for Fedora 10. + Modified: trunk/rmol/configure.ac =================================================================== --- trunk/rmol/configure.ac 2009-03-05 02:36:56 UTC (rev 168) +++ trunk/rmol/configure.ac 2009-03-07 22:50:43 UTC (rev 169) @@ -146,9 +146,12 @@ # Boost (STL Extensions: http://www.boost.org) # -------------------------------------------------------- AX_BOOST([1.33]) +AC_SUBST(BOOST_VERSION) AC_SUBST(BOOST_CFLAGS) AC_SUBST(BOOST_LIBS) AC_SUBST(BOOST_DATE_TIME_LIB) +AC_SUBST(BOOST_PROGRAM_OPTIONS_LIB) +AC_SUBST(BOOST_FILESYSTEM_LIB) # Checks for documentation build tools @@ -313,6 +316,7 @@ doc/doxygen_html.cfg doc/sourceforge/howto_release_rmol.html po/Makefile.in + po/create_po_file.sh test/Makefile win32/Makefile) AC_OUTPUT @@ -323,52 +327,54 @@ ------------------------------------------------------------------------------ Directories: - - prefix ......... : ${prefix} - - exec_prefix .... : ${exec_prefix} - - includedir ..... : ${includedir} - - libdir ......... : ${libdir} - - docdir ......... : ${docdir} - - mandir ......... : ${mandir} - - infodir ........ : ${infodir} + - prefix ............ : ${prefix} + - exec_prefix ....... : ${exec_prefix} + - includedir ........ : ${includedir} + - libdir ............ : ${libdir} + - docdir ............ : ${docdir} + - mandir ............ : ${mandir} + - infodir ........... : ${infodir} Switches: - - debug .......... : ${enable_debug} - - exceptions ..... : ${enable_exceptions} - - info-doc ....... : ${enable_info_doc} - - html-doc ....... : ${enable_html_doc} - - shared ......... : ${enable_shared} - - static ......... : ${enable_static} + - debug ............. : ${enable_debug} + - exceptions ........ : ${enable_exceptions} + - info-doc .......... : ${enable_info_doc} + - html-doc .......... : ${enable_html_doc} + - shared ............ : ${enable_shared} + - static ............ : ${enable_static} Documentation tools: - - texinfo ........ : ${texinfo_ok} - - doxygen ........ : ${doxygen_ok} - - latex .......... : ${latex_ok} - - dvips .......... : ${dvips_ok} - - ghostscript .... : ${gs_ok} + - texinfo ........... : ${texinfo_ok} + - doxygen ........... : ${doxygen_ok} + - latex ............. : ${latex_ok} + - dvips ............. : ${dvips_ok} + - ghostscript ....... : ${gs_ok} Testing tools: - - diff ........... : ${diff_ok} - - sed ............ : ${sed_ok} + - diff .............. : ${diff_ok} + - sed ............... : ${sed_ok} Compiler/linker flags/libs/defs: - - CXX ............ : ${CXX} - - CXXFLAGS ....... : ${CXXFLAGS_OPT} - - CXXFLAGS_DEBUG . : ${CXXFLAGS_DEBUG} - - CPPFLAGS ....... : ${CPPFLAGS} - - LDFLAGS ........ : ${LDFLAGS} - - LIBS ........... : ${LIBS} + - CXX ............... : ${CXX} + - CXXFLAGS .......... : ${CXXFLAGS_OPT} + - CXXFLAGS_DEBUG .... : ${CXXFLAGS_DEBUG} + - CPPFLAGS .......... : ${CPPFLAGS} + - LDFLAGS ........... : ${LDFLAGS} + - LIBS .............. : ${LIBS} External libraries: - - GSL ............ : ${GSL_CONFIG} - o GSL_VERSION .. : ${GSL_VERSION} - o GSL_CFLAGS ... : ${GSL_CFLAGS} - o GSL_LIBS ..... : ${GSL_LIBS} + - GSL ............... : ${GSL_CONFIG} + o GSL_VERSION ..... : ${GSL_VERSION} + o GSL_CFLAGS ...... : ${GSL_CFLAGS} + o GSL_LIBS ........ : ${GSL_LIBS} - - Boost .......... : - o BOOST_VERSION. : ${boost_lib_version_shorten} - o BOOST_CFLAGS . : ${BOOST_CFLAGS} - o BOOST_LIBS ... : ${BOOST_LIBS} - o BOOST_DT_LIB . : ${BOOST_DATE_TIME_LIB} + - Boost ............. : + o BOOST_VERSION ... : ${BOOST_VERSION} + o BOOST_CFLAGS .... : ${BOOST_CFLAGS} + o BOOST_LIBS ...... : ${BOOST_LIBS} + o BOOST_DT_LIB .... : ${BOOST_DATE_TIME_LIB} + o BOOST_PO_LIB .... : ${BOOST_PROGRAM_OPTIONS_LIB} + o BOOST_FS_LIB .... : ${BOOST_FILESYSTEM_LIB} ------------------------------------------------------------------------------ Now type 'make && make install' to build and install $PACKAGE-$VERSION library Property changes on: trunk/rmol/po ___________________________________________________________________ Modified: svn:ignore - Makefile Makefile.in POTFILES @localedir@ Makevars.template fr.gmo remove-potcdate.sed + Makefile Makefile.in POTFILES @localedir@ Makevars.template fr.gmo remove-potcdate.sed create_po_file.sh Modified: trunk/rmol/po/POTFILES.in =================================================================== --- trunk/rmol/po/POTFILES.in 2009-03-05 02:36:56 UTC (rev 168) +++ trunk/rmol/po/POTFILES.in 2009-03-07 22:50:43 UTC (rev 169) @@ -1,64 +1,77 @@ # List of files which contain translatable strings. +rmol/service/RMOL_Service.cpp +rmol/service/ServiceAbstract.hpp +rmol/service/ServiceAbstract.cpp +rmol/service/ServiceContext.cpp +rmol/service/ServiceContext.hpp +rmol/RmolTypes.hpp +rmol/RMOL_Service.hpp +rmol/field/FldYieldRange.hpp rmol/field/FldOverbookingPolicy.hpp -rmol/field/FldYieldRange.hpp -rmol/field/FldOverbookingPolicy.cpp rmol/field/FldYieldRange.cpp rmol/field/FldDistributionParameters.hpp +rmol/field/FldOverbookingPolicy.cpp rmol/field/FldDistributionParameters.cpp +rmol/factory/FacBucket.hpp +rmol/factory/FacOverbooking.cpp +rmol/factory/FacPartialSumHolder.hpp +rmol/factory/FacServiceAbstract.hpp +rmol/factory/FacOverbooking.hpp +rmol/factory/FacSupervisor.cpp +rmol/factory/FacServiceContext.cpp +rmol/factory/FacDemand.hpp +rmol/factory/FacPartialSumHolderHolder.cpp +rmol/factory/FacAbstract.hpp +rmol/factory/FacBucketHolder.cpp +rmol/factory/FacServiceAbstract.cpp +rmol/factory/FacAbstract.cpp +rmol/factory/FacDemand.cpp +rmol/factory/FacBucketHolder.hpp +rmol/factory/FacPartialSumHolderHolder.hpp +rmol/factory/FacPartialSumHolder.cpp +rmol/factory/FacSupervisor.hpp +rmol/factory/FacBucket.cpp +rmol/factory/FacServiceContext.hpp +rmol/basic/BasConst_RMOL_Service.hpp +rmol/basic/BasConst.cpp rmol/basic/BasConst_Overbooking.hpp rmol/basic/BasConst_General.hpp -rmol/basic/BasConst_RMOL_Service.hpp -rmol/basic/BasConst.cpp -rmol/RmolTypes.hpp -rmol/bom/BucketHolder.hpp -rmol/bom/PartialSumHolder.hpp +rmol/bom/Resource.hpp +rmol/bom/BucketList.hpp +rmol/bom/PartialSumHolder.cpp +rmol/bom/PartialSumHolderList.hpp +rmol/bom/Demand.hpp +rmol/bom/VariateList.hpp +rmol/bom/EmsrUtils.hpp +rmol/bom/BomAbstract.hpp +rmol/bom/MCOptimiser.cpp +rmol/bom/Demand.cpp rmol/bom/Emsr.cpp rmol/bom/Bucket.hpp +rmol/bom/Gaussian.cpp +rmol/bom/Bucket.cpp +rmol/bom/EmsrUtils.cpp +rmol/bom/DPOptimiser.hpp rmol/bom/Emsr.hpp +rmol/bom/BomAbstract.cpp +rmol/bom/MAForecast.cpp +rmol/bom/old/DemandGeneratorList.hpp +rmol/bom/old/DemandGeneratorList.cpp +rmol/bom/MCOptimiser.hpp +rmol/bom/PartialSumHolder.hpp +rmol/bom/MAForecast.hpp +rmol/bom/PartialSumHolderHolder.hpp rmol/bom/PartialSumList.hpp -rmol/bom/EmsrUtils.cpp -rmol/bom/Gaussian.cpp -rmol/bom/BomAbstract.hpp -rmol/bom/MCOptimiser.hpp -rmol/bom/BucketHolder.cpp +rmol/bom/DPOptimiser.cpp rmol/bom/Overbooking.hpp -rmol/bom/EmsrUtils.hpp -rmol/bom/PartialSumHolder.cpp -rmol/bom/Demand.hpp -rmol/bom/old/DemandGeneratorList.cpp -rmol/bom/old/DemandGeneratorList.hpp +rmol/bom/BucketHolder.hpp rmol/bom/Overbooking.cpp -rmol/bom/Gaussian.hpp -rmol/bom/BucketList.hpp rmol/bom/PartialSumHolderHolder.cpp +rmol/bom/BucketHolder.cpp rmol/bom/DistributionParameterList.hpp -rmol/bom/Demand.cpp -rmol/bom/Bucket.cpp -rmol/bom/BomAbstract.cpp -rmol/bom/PartialSumHolderList.hpp -rmol/bom/PartialSumHolderHolder.hpp -rmol/bom/MCOptimiser.cpp -rmol/bom/VariateList.hpp +rmol/bom/Gaussian.hpp +rmol/rmol.cpp +rmol/command/Optimiser.hpp +rmol/command/Optimiser.cpp rmol/command/FileMgr.hpp -rmol/command/Optimiser.cpp rmol/command/FileMgr.cpp -rmol/command/Optimiser.hpp -rmol/factory/FacOverbooking.hpp -rmol/factory/FacSupervisor.hpp -rmol/factory/FacAbstract.hpp -rmol/factory/FacBucket.cpp -rmol/factory/FacPartialSumHolderHolder.cpp -rmol/factory/FacDemand.cpp -rmol/factory/FacDemand.hpp -rmol/factory/FacPartialSumHolder.cpp -rmol/factory/FacBucket.hpp -rmol/factory/FacBucketHolder.cpp -rmol/factory/FacBucketHolder.hpp -rmol/factory/FacAbstract.cpp -rmol/factory/FacPartialSumHolderHolder.hpp -rmol/factory/FacPartialSumHolder.hpp -rmol/factory/FacOverbooking.cpp -rmol/factory/FacSupervisor.cpp -rmol/RMOL_Service.hpp -rmol/RMOL_Service.cpp - Added: trunk/rmol/po/create_po_file.sh.in =================================================================== --- trunk/rmol/po/create_po_file.sh.in (rev 0) +++ trunk/rmol/po/create_po_file.sh.in 2009-03-07 22:50:43 UTC (rev 169) @@ -0,0 +1,5 @@ +#!/bin/sh + +find ../rmol -name '*.[ch]pp' > sources_for_po.txt +xgettext -d rmol -a -f sources_for_po.txt + Property changes on: trunk/rmol/po/create_po_file.sh.in ___________________________________________________________________ Added: svn:mergeinfo + Modified: trunk/rmol/po/fr.po =================================================================== --- trunk/rmol/po/fr.po 2009-03-05 02:36:56 UTC (rev 168) +++ trunk/rmol/po/fr.po 2009-03-07 22:50:43 UTC (rev 169) @@ -5,10082 +5,8329 @@ msgid "" msgstr "" "Project-Id-Version: GNU coreutils 5.97\n" -"Report-Msgid-Bugs-To: bug...@gn...\n" -"POT-Creation-Date: 2007-01-28 23:45+0100\n" -"PO-Revision-Date: 2006-07-10 08:00-0500\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-03-07 22:47+0100\n" +"PO-Revision-Date: 2009-03-07 23:24+0100\n" "Last-Translator: Michel Robitaille <robitail@IRO.UMontreal.CA>\n" "Language-Team: French <tr...@tr...>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-1\n" -"Content-Transfer-Encoding: 8-bit\n" +"Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -#: lib/acl.c:254 lib/acl.c:268 lib/acl.c:285 lib/acl.c:297 lib/acl.c:396 -#: src/copy.c:555 src/copy.c:1864 -#, fuzzy, c-format -msgid "preserving permissions for %s" -msgstr "Ne peut changer les permissions de %s" +#: ../rmol/service/RMOL_Service.cpp:138 +msgid "Bid-Price Vector (BPV): " +msgstr "" -#: lib/acl.c:377 lib/acl.c:385 lib/acl.c:404 src/copy.c:1580 src/cp.c:483 -#, c-format -msgid "setting permissions for %s" -msgstr "initialisation des permissions de %s" +#: ../rmol/service/RMOL_Service.cpp:143 ../rmol/command/Optimiser.cpp:74 +msgid " " +msgstr "" -#: lib/argmatch.c:135 -#, c-format -msgid "invalid argument %s for %s" -msgstr "argument %s invalide pour %s" +#: ../rmol/field/FldOverbookingPolicy.cpp:9 +msgid "HEUR" +msgstr "" -#: lib/argmatch.c:136 -#, c-format -msgid "ambiguous argument %s for %s" -msgstr "argument %s ambigu pour %s" +#: ../rmol/field/FldOverbookingPolicy.cpp:9 +msgid "RISK" +msgstr "" -#: lib/argmatch.c:155 -#, c-format -msgid "Valid arguments are:" -msgstr "Arguments valides sont:" +#: ../rmol/field/FldOverbookingPolicy.cpp:9 +msgid "SL1" +msgstr "" -#: lib/closeout.c:74 src/base64.c:115 src/base64.c:127 src/base64.c:133 -#: src/base64.c:174 src/base64.c:218 src/cat.c:193 src/cat.c:209 src/cat.c:293 -#: src/cksum.c:252 src/expand.c:337 src/expand.c:362 src/head.c:300 -#: src/head.c:350 src/head.c:758 src/head.c:799 src/od.c:968 src/paste.c:143 -#: src/shuf.c:409 src/tail.c:305 src/tail.c:1093 src/tr.c:1561 src/tr.c:1784 -#: src/tr.c:1887 src/unexpand.c:434 src/unexpand.c:450 -#, c-format -msgid "write error" -msgstr "Erreur d'\xE9criture." +#: ../rmol/field/FldOverbookingPolicy.cpp:9 +msgid "SL2" +msgstr "" -#: lib/error.c:125 -msgid "Unknown system error" -msgstr "Erreur syst\xE8me inconnue" +#: ../rmol/field/FldOverbookingPolicy.cpp:10 +msgid "HYBRID" +msgstr "" -#: lib/euidaccess-stat.c:137 src/copy.c:1024 src/copy.c:1060 src/copy.c:1568 -#: src/copy.c:1851 src/df.c:512 src/install.c:455 src/stat.c:784 -#, c-format -msgid "cannot stat %s" -msgstr "ne peut \xE9valuer %s" +#: ../rmol/bom/PartialSumHolder.cpp:31 +msgid "Partial Sum (K = " +msgstr "" -#: lib/file-type.c:39 -msgid "regular empty file" -msgstr "fichier r\xE9gulier vide" +#: ../rmol/bom/PartialSumHolder.cpp:31 +msgid "); " +msgstr "" -#: lib/file-type.c:39 -msgid "regular file" -msgstr "fichier r\xE9gulier" +#: ../rmol/bom/PartialSumHolder.cpp:37 ../rmol/bom/Bucket.cpp:51 +#: ../rmol/bom/Bucket.cpp:52 ../rmol/bom/PartialSumHolderHolder.cpp:38 +#: ../rmol/bom/BucketHolder.cpp:48 +msgid "; " +msgstr "" -#: lib/file-type.c:42 -msgid "directory" -msgstr "r\xE9pertoire" +#: ../rmol/bom/DPOptimiser.cpp:158 +msgid "x = " +msgstr "" -#: lib/file-type.c:45 -msgid "block special file" -msgstr "fichier sp\xE9cial de bloc" +#: ../rmol/bom/DPOptimiser.cpp:159 +msgid "class: " +msgstr "" -#: lib/file-type.c:48 -msgid "character special file" -msgstr "fichier sp\xE9cial de caract\xE8res" +#: ../rmol/bom/DPOptimiser.cpp:181 +msgid "Vmaxindex = " +msgstr "" -#: lib/file-type.c:51 -msgid "fifo" -msgstr "PEPS (FIFO)" +#: ../rmol/bom/BucketHolder.cpp:40 +msgid "" +"Class; Price; Mean; Std Dev; Protection; Cum. Protection; Cum. Bkg Limit; " +msgstr "" -#: lib/file-type.c:54 -msgid "symbolic link" -msgstr "lien symbolique" +#: ../rmol/bom/BucketHolder.cpp:51 +msgid "Cabin Capacity = " +msgstr "" -#: lib/file-type.c:57 -msgid "socket" -msgstr "socket" +#: ../rmol/bom/BucketHolder.cpp:52 +msgid "; Total Mean Demand = " +msgstr "" -#: lib/file-type.c:60 -msgid "message queue" -msgstr "queue de messages" +#: ../rmol/bom/BucketHolder.cpp:53 +msgid "; Demand Factor = " +msgstr "" -#: lib/file-type.c:63 -msgid "semaphore" -msgstr "s\xE9maphore" +#: ../rmol/bom/BucketHolder.cpp:54 +msgid "; Optimal Revenue = " +msgstr "" -#: lib/file-type.c:66 -msgid "shared memory object" -msgstr "objet de m\xE9moire partag\xE9e" +#: ../rmol/rmol.cpp:23 +msgid "class.csv" +msgstr "" -#: lib/file-type.c:69 -msgid "typed memory object" -msgstr "objet m\xE9moire typ\xE9e" +#: ../rmol/rmol.cpp:97 +msgid "Standard exception: " +msgstr "" -#: lib/file-type.c:71 -msgid "weird file" -msgstr "fichier bizarre" +#: ../rmol/command/Optimiser.cpp:69 +msgid "BVP: " +msgstr "" -#: lib/gai_strerror.c:44 -msgid "Address family for hostname not supported" -msgstr "La famille d'adresses pour le nom de l'h\xF4te n'est pas support\xE9." +#: ../rmol/command/FileMgr.cpp:29 +#, fuzzy +msgid "Can not open input file \"" +msgstr "fermeture du fichier d'entr\xE9e %s" -#: lib/gai_strerror.c:45 -msgid "Temporary failure in name resolution" -msgstr "\xC9chec temporaire dans la r\xE9solution de nom" +#: ../rmol/command/FileMgr.cpp:29 ../rmol/command/FileMgr.cpp:80 +msgid "\"" +msgstr "" -#: lib/gai_strerror.c:46 -msgid "Bad value for ai_flags" -msgstr "Valeur erron\xE9e pour ai_flags" +#: ../rmol/command/FileMgr.cpp:79 +msgid "Problem when reading input file \"" +msgstr "" -#: lib/gai_strerror.c:47 -msgid "Non-recoverable failure in name resolution" -msgstr "\xC9chec non r\xE9cup\xE9rable dans la r\xE9solution de nom" +#, fuzzy +#~ msgid "preserving permissions for %s" +#~ msgstr "Ne peut changer les permissions de %s" -#: lib/gai_strerror.c:48 -msgid "ai_family not supported" -msgstr "ai_family non support\xE9" +#~ msgid "setting permissions for %s" +#~ msgstr "initialisation des permissions de %s" -#: lib/gai_strerror.c:49 -msgid "Memory allocation failure" -msgstr "\xC9chec d'allocation m\xE9moire" +#~ msgid "invalid argument %s for %s" +#~ msgstr "argument %s invalide pour %s" -#: lib/gai_strerror.c:50 -msgid "No address associated with hostname" -msgstr "Aucune adresse associ\xE9 avec le nom de l'h\xF4te" +#~ msgid "ambiguous argument %s for %s" +#~ msgstr "argument %s ambigu pour %s" -#: lib/gai_strerror.c:51 -msgid "Name or service not known" -msgstr "Nom ou service inconnu" +#~ msgid "Valid arguments are:" +#~ msgstr "Arguments valides sont:" -#: lib/gai_strerror.c:52 -msgid "Servname not supported for ai_socktype" -msgstr "Servname n'est pas support\xE9 avec ai_socktype" +#~ msgid "write error" +#~ msgstr "Erreur d'\xE9criture." -#: lib/gai_strerror.c:53 -msgid "ai_socktype not supported" -msgstr "ai_socktype n'est pas support\xE9." +#~ msgid "Unknown system error" +#~ msgstr "Erreur syst\xE8me inconnue" -#: lib/gai_strerror.c:54 -msgid "System error" -msgstr "Erreur syst\xE8me" +#~ msgid "cannot stat %s" +#~ msgstr "ne peut \xE9valuer %s" -#: lib/gai_strerror.c:56 -msgid "Processing request in progress" -msgstr "Requ\xEAte de traitement en cours" +#~ msgid "regular empty file" +#~ msgstr "fichier r\xE9gulier vide" -#: lib/gai_strerror.c:57 -msgid "Request canceled" -msgstr "Requ\xEAte annul\xE9e" +#~ msgid "regular file" +#~ msgstr "fichier r\xE9gulier" -#: lib/gai_strerror.c:58 -msgid "Request not canceled" -msgstr "Requ\xEAte non annul\xE9e" +#~ msgid "directory" +#~ msgstr "r\xE9pertoire" -#: lib/gai_strerror.c:59 -msgid "All requests done" -msgstr "Toutes les requ\xEAtes ont \xE9t\xE9 trait\xE9es" +#~ msgid "block special file" +#~ msgstr "fichier sp\xE9cial de bloc" -#: lib/gai_strerror.c:60 -msgid "Interrupted by a signal" -msgstr "Interrompu par un signal" +#~ msgid "character special file" +#~ msgstr "fichier sp\xE9cial de caract\xE8res" -#: lib/gai_strerror.c:61 -msgid "Parameter string not correctly encoded" -msgstr "Param\xE8tre de cha\xEEne n'est pas correctement encod\xE9" +#~ msgid "fifo" +#~ msgstr "PEPS (FIFO)" -#: lib/gai_strerror.c:73 -msgid "Unknown error" -msgstr "Erreur inconnue" +#~ msgid "symbolic link" +#~ msgstr "lien symbolique" -#: lib/getopt.c:531 lib/getopt.c:547 -#, c-format -msgid "%s: option `%s' is ambiguous\n" -msgstr "%s: l'option \xAB %s \xBB est ambigu\xEB\n" +#~ msgid "socket" +#~ msgstr "socket" -#: lib/getopt.c:580 lib/getopt.c:584 -#, c-format -msgid "%s: option `--%s' doesn't allow an argument\n" -msgstr "%s: l'option \xAB --%s \xBB ne requiert pas un argument.\n" +#~ msgid "message queue" +#~ msgstr "queue de messages" -#: lib/getopt.c:593 lib/getopt.c:598 -#, c-format -msgid "%s: option `%c%s' doesn't allow an argument\n" -msgstr "%s: l'option \xAB %c%s \xBB ne requiert pas un argument.\n" +#~ msgid "semaphore" +#~ msgstr "s\xE9maphore" -#: lib/getopt.c:641 lib/getopt.c:660 lib/getopt.c:976 lib/getopt.c:995 -#, c-format -msgid "%s: option `%s' requires an argument\n" -msgstr "%s: l'option \xAB %s \xBB requiert un argument.\n" +#~ msgid "shared memory object" +#~ msgstr "objet de m\xE9moire partag\xE9e" -#: lib/getopt.c:698 lib/getopt.c:701 -#, c-format -msgid "%s: unrecognized option `--%s'\n" -msgstr "%s: option non reconnue \xAB --%s \xBB\n" +#~ msgid "typed memory object" +#~ msgstr "objet m\xE9moire typ\xE9e" -#: lib/getopt.c:709 lib/getopt.c:712 -#, c-format -msgid "%s: unrecognized option `%c%s'\n" -msgstr "%s: option non reconnue \xAB %c%s \xBB\n" +#~ msgid "weird file" +#~ msgstr "fichier bizarre" -#: lib/getopt.c:764 lib/getopt.c:767 -#, c-format -msgid "%s: illegal option -- %c\n" -msgstr "%s: option ill\xE9gale --%c\n" +#~ msgid "Address family for hostname not supported" +#~ msgstr "La famille d'adresses pour le nom de l'h\xF4te n'est pas support\xE9." -#: lib/getopt.c:773 lib/getopt.c:776 -#, c-format -msgid "%s: invalid option -- %c\n" -msgstr "%s: option invalide --%c\n" +#~ msgid "Temporary failure in name resolution" +#~ msgstr "\xC9chec temporaire dans la r\xE9solution de nom" -#: lib/getopt.c:828 lib/getopt.c:844 lib/getopt.c:1048 lib/getopt.c:1066 -#, c-format -msgid "%s: option requires an argument -- %c\n" -msgstr "%s: l'option requiert un argument --%c\n" +#~ msgid "Bad value for ai_flags" +#~ msgstr "Valeur erron\xE9e pour ai_flags" -#: lib/getopt.c:897 lib/getopt.c:913 -#, c-format -msgid "%s: option `-W %s' is ambiguous\n" -msgstr "%s: l'option \xAB -W %s \xBB est ambigu\xEB\n" +#~ msgid "Non-recoverable failure in name resolution" +#~ msgstr "\xC9chec non r\xE9cup\xE9rable dans la r\xE9solution de nom" -#: lib/getopt.c:937 lib/getopt.c:955 -#, c-format -msgid "%s: option `-W %s' doesn't allow an argument\n" -msgstr "%s: l'option \xAB -W %s \xBB ne permet pas un argument.\n" +#~ msgid "ai_family not supported" +#~ msgstr "ai_family non support\xE9" -#: lib/human.c:477 -msgid "block size" -msgstr "taille de bloc" +#~ msgid "Memory allocation failure" +#~ msgstr "\xC9chec d'allocation m\xE9moire" -#: lib/mkdir-p.c:192 src/install.c:522 -#, c-format -msgid "cannot change permissions of %s" -msgstr "Ne peut changer les permissions de %s" +#~ msgid "No address associated with hostname" +#~ msgstr "Aucune adresse associ\xE9 avec le nom de l'h\xF4te" -#: lib/mkdir-p.c:202 src/copy.c:1557 src/install.c:423 src/install.c:436 -#, c-format -msgid "cannot create directory %s" -msgstr "ne peut cr\xE9er le r\xE9pertoire %s" +#~ msgid "Name or service not known" +#~ msgstr "Nom ou service inconnu" -#: lib/obstack.c:424 lib/obstack.c:426 lib/xalloc-die.c:35 src/csplit.c:237 -msgid "memory exhausted" -msgstr "M\xE9moire \xE9puis\xE9e" +#~ msgid "Servname not supported for ai_socktype" +#~ msgstr "Servname n'est pas support\xE9 avec ai_socktype" -#: lib/openat-die.c:34 -#, c-format -msgid "unable to record current working directory" -msgstr "incapable d'enregistrer le r\xE9pertoire de travail courant" +#~ msgid "ai_socktype not supported" +#~ msgstr "ai_socktype n'est pas support\xE9." -#: lib/openat-die.c:47 src/df.c:535 -#, c-format -msgid "failed to return to initial working directory" -msgstr "\xE9chec de retour au r\xE9pertoire initial de travail" +#~ msgid "System error" +#~ msgstr "Erreur syst\xE8me" -#. TRANSLATORS: -#. Get translations for open and closing quotation marks. -#. -#. The message catalog should translate "`" to a left -#. quotation mark suitable for the locale, and similarly for -#. "'". If the catalog has no translation, -#. locale_quoting_style quotes `like this', and -#. clocale_quoting_style quotes "like this". -#. -#. For example, an American English Unicode locale should -#. translate "`" to U+201C (LEFT DOUBLE QUOTATION MARK), and -#. should translate "'" to U+201D (RIGHT DOUBLE QUOTATION -#. MARK). A British English Unicode locale should instead -#. translate these to U+2018 (LEFT SINGLE QUOTATION MARK) and -#. U+2019 (RIGHT SINGLE QUOTATION MARK), respectively. -#. -#. If you don't know what to put here, please see -#. <http://en.wikipedia.org/wiki/Quotation_mark#Glyphs> -#. and use glyphs suitable for your language. -#: lib/quotearg.c:245 -msgid "`" -msgstr "`" +#~ msgid "Processing request in progress" +#~ msgstr "Requ\xEAte de traitement en cours" -#: lib/quotearg.c:246 -msgid "'" -msgstr "'" +#~ msgid "Request canceled" +#~ msgstr "Requ\xEAte annul\xE9e" -#: lib/randread.c:125 -#, fuzzy, c-format -msgid "%s: end of file" -msgstr "%s: \xE9chec de rep\xE9rage (seek)" +#~ msgid "Request not canceled" +#~ msgstr "Requ\xEAte non annul\xE9e" -#: lib/regcomp.c:131 -msgid "Success" -msgstr "" +#~ msgid "All requests done" +#~ msgstr "Toutes les requ\xEAtes ont \xE9t\xE9 trait\xE9es" -#: lib/regcomp.c:134 -msgid "No match" -msgstr "" +#~ msgid "Interrupted by a signal" +#~ msgstr "Interrompu par un signal" -#: lib/regcomp.c:137 -#, fuzzy -msgid "Invalid regular expression" -msgstr "%s: expression r\xE9guli\xE8re invalide: %s" +#~ msgid "Parameter string not correctly encoded" +#~ msgstr "Param\xE8tre de cha\xEEne n'est pas correctement encod\xE9" -#: lib/regcomp.c:140 -#, fuzzy -msgid "Invalid collation character" -msgstr "caract\xE8re de classe invalide %s" +#~ msgid "Unknown error" +#~ msgstr "Erreur inconnue" -#: lib/regcomp.c:143 -#, fuzzy -msgid "Invalid character class name" -msgstr "caract\xE8re de classe invalide %s" +#~ msgid "%s: option `%s' is ambiguous\n" +#~ msgstr "%s: l'option \xAB %s \xBB est ambigu\xEB\n" -#: lib/regcomp.c:146 -msgid "Trailing backslash" -msgstr "" +#~ msgid "%s: option `--%s' doesn't allow an argument\n" +#~ msgstr "%s: l'option \xAB --%s \xBB ne requiert pas un argument.\n" -#: lib/regcomp.c:149 -#, fuzzy -msgid "Invalid back reference" -msgstr "bornes de pages invalides %s" +#~ msgid "%s: option `%c%s' doesn't allow an argument\n" +#~ msgstr "%s: l'option \xAB %c%s \xBB ne requiert pas un argument.\n" -#: lib/regcomp.c:152 -msgid "Unmatched [ or [^" -msgstr "" +#~ msgid "%s: option `%s' requires an argument\n" +#~ msgstr "%s: l'option \xAB %s \xBB requiert un argument.\n" -#: lib/regcomp.c:155 -msgid "Unmatched ( or \\(" -msgstr "" +#~ msgid "%s: unrecognized option `--%s'\n" +#~ msgstr "%s: option non reconnue \xAB --%s \xBB\n" -#: lib/regcomp.c:158 -msgid "Unmatched \\{" -msgstr "" +#~ msgid "%s: unrecognized option `%c%s'\n" +#~ msgstr "%s: option non reconnue \xAB %c%s \xBB\n" -#: lib/regcomp.c:161 -msgid "Invalid content of \\{\\}" -msgstr "" +#~ msgid "%s: illegal option -- %c\n" +#~ msgstr "%s: option ill\xE9gale --%c\n" -#: lib/regcomp.c:164 +#~ msgid "%s: invalid option -- %c\n" +#~ msgstr "%s: option invalide --%c\n" + +#~ msgid "%s: option requires an argument -- %c\n" +#~ msgstr "%s: l'option requiert un argument --%c\n" + +#~ msgid "%s: option `-W %s' is ambiguous\n" +#~ msgstr "%s: l'option \xAB -W %s \xBB est ambigu\xEB\n" + +#~ msgid "%s: option `-W %s' doesn't allow an argument\n" +#~ msgstr "%s: l'option \xAB -W %s \xBB ne permet pas un argument.\n" + +#~ msgid "block size" +#~ msgstr "taille de bloc" + +#~ msgid "cannot change permissions of %s" +#~ msgstr "Ne peut changer les permissions de %s" + +#~ msgid "cannot create directory %s" +#~ msgstr "ne peut cr\xE9er le r\xE9pertoire %s" + +#~ msgid "memory exhausted" +#~ msgstr "M\xE9moire \xE9puis\xE9e" + +#~ msgid "unable to record current working directory" +#~ msgstr "incapable d'enregistrer le r\xE9pertoire de travail courant" + +#~ msgid "failed to return to initial working directory" +#~ msgstr "\xE9chec de retour au r\xE9pertoire initial de travail" + +#~ msgid "`" +#~ msgstr "`" + +#~ msgid "'" +#~ msgstr "'" + #, fuzzy -msgid "Invalid range end" -msgstr "bornes de pages invalides %s" +#~ msgid "%s: end of file" +#~ msgstr "%s: \xE9chec de rep\xE9rage (seek)" -#: lib/regcomp.c:167 -msgid "Memory exhausted" -msgstr "M\xE9moire \xE9puis\xE9e" +#, fuzzy +#~ msgid "Invalid regular expression" +#~ msgstr "%s: expression r\xE9guli\xE8re invalide: %s" -#: lib/regcomp.c:170 #, fuzzy -msgid "Invalid preceding regular expression" -msgstr "%s: expression r\xE9guli\xE8re invalide: %s" +#~ msgid "Invalid collation character" +#~ msgstr "caract\xE8re de classe invalide %s" -#: lib/regcomp.c:173 #, fuzzy -msgid "Premature end of regular expression" -msgstr "Erreur dans l'expression r\xE9guli\xE8re recherch\xE9e." +#~ msgid "Invalid character class name" +#~ msgstr "caract\xE8re de classe invalide %s" -#: lib/regcomp.c:176 #, fuzzy -msgid "Regular expression too big" -msgstr "erreur dans l'expression r\xE9guli\xE8re recherch\xE9e." +#~ msgid "Invalid back reference" +#~ msgstr "bornes de pages invalides %s" -#: lib/regcomp.c:179 -msgid "Unmatched ) or \\)" -msgstr "" +#, fuzzy +#~ msgid "Invalid range end" +#~ msgstr "bornes de pages invalides %s" -#: lib/regcomp.c:684 +#~ msgid "Memory exhausted" +#~ msgstr "M\xE9moire \xE9puis\xE9e" + #, fuzzy -msgid "No previous regular expression" -msgstr "Erreur dans l'expression r\xE9guli\xE8re recherch\xE9e." +#~ msgid "Invalid preceding regular expression" +#~ msgstr "%s: expression r\xE9guli\xE8re invalide: %s" -#: lib/root-dev-ino.h:40 -#, c-format -msgid "it is dangerous to operate recursively on %s" -msgstr "il est dangereux d'op\xE9rer r\xE9cursivement sur %s" +#, fuzzy +#~ msgid "Premature end of regular expression" +#~ msgstr "Erreur dans l'expression r\xE9guli\xE8re recherch\xE9e." -#: lib/root-dev-ino.h:44 -#, c-format -msgid "it is dangerous to operate recursively on %s (same as %s)" -msgstr "il est dangereux d'op\xE9rer r\xE9cursivement sur %s (identique \xE0 %s)" +#, fuzzy +#~ msgid "Regular expression too big" +#~ msgstr "erreur dans l'expression r\xE9guli\xE8re recherch\xE9e." -#: lib/root-dev-ino.h:46 -#, c-format -msgid "use --no-preserve-root to override this failsafe" -msgstr "utiliser --no-preserve-root pour \xE9craser cette mesure de s\xFBret\xE9" +#, fuzzy +#~ msgid "No previous regular expression" +#~ msgstr "Erreur dans l'expression r\xE9guli\xE8re recherch\xE9e." -#: lib/rpmatch.c:70 -msgid "^[yY]" -msgstr "^[yY]" +#~ msgid "it is dangerous to operate recursively on %s" +#~ msgstr "il est dangereux d'op\xE9rer r\xE9cursivement sur %s" -#: lib/rpmatch.c:73 -msgid "^[nN]" -msgstr "^[nN]" +#~ msgid "it is dangerous to operate recursively on %s (same as %s)" +#~ msgstr "il est dangereux d'op\xE9rer r\xE9cursivement sur %s (identique \xE0 %s)" -#: lib/unicodeio.c:151 -msgid "iconv function not usable" -msgstr "fonction iconv n'est pas utilisable" +#~ msgid "use --no-preserve-root to override this failsafe" +#~ msgstr "utiliser --no-preserve-root pour \xE9craser cette mesure de s\xFBret\xE9" -#: lib/unicodeio.c:153 -msgid "iconv function not available" -msgstr "fonction iconv n'est pas disponible" +#~ msgid "^[yY]" +#~ msgstr "^[yY]" -#: lib/unicodeio.c:160 -msgid "character out of range" -msgstr "caract\xE8re hors limites" +#~ msgid "^[nN]" +#~ msgstr "^[nN]" -#: lib/unicodeio.c:224 -#, c-format -msgid "cannot convert U+%04X to local character set" -msgstr "ne peut convertir U+%04X \xE0 un jeu local de caract\xE8res" +#~ msgid "iconv function not usable" +#~ msgstr "fonction iconv n'est pas utilisable" -#: lib/unicodeio.c:226 -#, c-format -msgid "cannot convert U+%04X to local character set: %s" -msgstr "ne peut convertir U+%04X au jeu local de caract\xE8res: %s" +#~ msgid "iconv function not available" +#~ msgstr "fonction iconv n'est pas disponible" -#: lib/userspec.c:108 -msgid "invalid user" -msgstr "usager invalide" +#~ msgid "character out of range" +#~ msgstr "caract\xE8re hors limites" -#: lib/userspec.c:109 -msgid "invalid group" -msgstr "groupe invalide" +#~ msgid "cannot convert U+%04X to local character set" +#~ msgstr "ne peut convertir U+%04X \xE0 un jeu local de caract\xE8res" -#: lib/userspec.c:110 -#, fuzzy -msgid "invalid spec" -msgstr "usager invalide" +#~ msgid "cannot convert U+%04X to local character set: %s" +#~ msgstr "ne peut convertir U+%04X au jeu local de caract\xE8res: %s" -#. TRANSLATORS: Translate "(C)" to the copyright symbol -#. (C-in-a-circle), if this symbol is available in the user's -#. locale. Otherwise, do not translate "(C)"; leave it as-is. -#: lib/version-etc.c:66 -msgid "(C)" -msgstr "\xA9" +#~ msgid "invalid user" +#~ msgstr "usager invalide" -#: lib/version-etc.c:68 -msgid "" -"\n" -"This is free software. You may redistribute copies of it under the terms " -"of\n" -"the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.\n" -"There is NO WARRANTY, to the extent permitted by law.\n" -"\n" -msgstr "" -"\n" -"Ce programme est un logiciel libre. Vous pouvez en redistribuer des copies\n" -"selon les termes de la License Publique G\xE9n\xE9rale de GNU, \n" -"<http://www.gnu.org/licenses/gpl.html>.\n" -"AUCUNE GARANTIE n'est fournie tel que permis selon la loi.\n" -"\n" +#~ msgid "invalid group" +#~ msgstr "groupe invalide" -#. TRANSLATORS: %s denotes an author name. -#: lib/version-etc.c:84 -#, c-format -msgid "Written by %s.\n" -msgstr "\xC9crit par %s.\n" +#, fuzzy +#~ msgid "invalid spec" +#~ msgstr "usager invalide" -#. TRANSLATORS: Each %s denotes an author name. -#: lib/version-etc.c:88 -#, c-format -msgid "Written by %s and %s.\n" -msgstr "\xC9crit par %s et %s.\n" +#~ msgid "(C)" +#~ msgstr "\xA9" -#. TRANSLATORS: Each %s denotes an author name. -#: lib/version-etc.c:92 -#, c-format -msgid "Written by %s, %s, and %s.\n" -msgstr "\xC9crit par %s, %s et %s.\n" +#~ msgid "" +#~ "\n" +#~ "This is free software. You may redistribute copies of it under the terms " +#~ "of\n" +#~ "the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.\n" +#~ "There is NO WARRANTY, to the extent permitted by law.\n" +#~ "\n" +#~ msgstr "" +#~ "\n" +#~ "Ce programme est un logiciel libre. Vous pouvez en redistribuer des " +#~ "copies\n" +#~ "selon les termes de la License Publique G\xE9n\xE9rale de GNU, \n" +#~ "<http://www.gnu.org/licenses/gpl.html>.\n" +#~ "AUCUNE GARANTIE n'est fournie tel que permis selon la loi.\n" +#~ "\n" -#. TRANSLATORS: Each %s denotes an author name. -#. You can use line breaks, estimating that each author name occupies -#. ca. 16 screen columns and that a screen line has ca. 80 columns. -#: lib/version-etc.c:98 -#, c-format -msgid "" -"Written by %s, %s, %s,\n" -"and %s.\n" -msgstr "" -"\xC9crit par %s, %s, %s,\n" -"et %s.\n" +#~ msgid "Written by %s.\n" +#~ msgstr "\xC9crit par %s.\n" -#. TRANSLATORS: Each %s denotes an author name. -#. You can use line breaks, estimating that each author name occupies -#. ca. 16 screen columns and that a screen line has ca. 80 columns. -#: lib/version-etc.c:104 -#, c-format -msgid "" -"Written by %s, %s, %s,\n" -"%s, and %s.\n" -msgstr "" -"\xC9crit par %s, %s, %s,\n" -"%s et %s.\n" +#~ msgid "Written by %s and %s.\n" +#~ msgstr "\xC9crit par %s et %s.\n" -#. TRANSLATORS: Each %s denotes an author name. -#. You can use line breaks, estimating that each author name occupies -#. ca. 16 screen columns and that a screen line has ca. 80 columns. -#: lib/version-etc.c:110 -#, c-format -msgid "" -"Written by %s, %s, %s,\n" -"%s, %s, and %s.\n" -msgstr "" -"\xC9crit par %s, %s, %s,\n" -"%s, %s, and %s.\n" +#~ msgid "Written by %s, %s, and %s.\n" +#~ msgstr "\xC9crit par %s, %s et %s.\n" -#. TRANSLATORS: Each %s denotes an author name. -#. You can use line breaks, estimating that each author name occupies -#. ca. 16 screen columns and that a screen line has ca. 80 columns. -#: lib/version-etc.c:117 -#, c-format -msgid "" -"Written by %s, %s, %s,\n" -"%s, %s, %s, and %s.\n" -msgstr "" -"\xC9crit par %s, %s, %s,\n" -"%s, %s, %s, and %s.\n" +#~ msgid "" +#~ "Written by %s, %s, %s,\n" +#~ "and %s.\n" +#~ msgstr "" +#~ "\xC9crit par %s, %s, %s,\n" +#~ "et %s.\n" -#. TRANSLATORS: Each %s denotes an author name. -#. You can use line breaks, estimating that each author name occupies -#. ca. 16 screen columns and that a screen line has ca. 80 columns. -#: lib/version-etc.c:124 -#, c-format -msgid "" -"Written by %s, %s, %s,\n" -"%s, %s, %s, %s,\n" -"and %s.\n" -msgstr "" -"\xC9crit par %s, %s, %s,\n" -"%s, %s, %s, %s,\n" -"et %s.\n" +#~ msgid "" +#~ "Written by %s, %s, %s,\n" +#~ "%s, and %s.\n" +#~ msgstr "" +#~ "\xC9crit par %s, %s, %s,\n" +#~ "%s et %s.\n" -#. TRANSLATORS: Each %s denotes an author name. -#. You can use line breaks, estimating that each author name occupies -#. ca. 16 screen columns and that a screen line has ca. 80 columns. -#: lib/version-etc.c:132 -#, c-format -msgid "" -"Written by %s, %s, %s,\n" -"%s, %s, %s, %s,\n" -"%s, and %s.\n" -msgstr "" -"\xC9crit par %s, %s, %s,\n" -"%s, %s, %s, %s,\n" -"%s et %s.\n" +#~ msgid "" +#~ "Written by %s, %s, %s,\n" +#~ "%s, %s, and %s.\n" +#~ msgstr "" +#~ "\xC9crit par %s, %s, %s,\n" +#~ "%s, %s, and %s.\n" -#. TRANSLATORS: Each %s denotes an author name. -#. You can use line breaks, estimating that each author name occupies -#. ca. 16 screen columns and that a screen line has ca. 80 columns. -#: lib/version-etc.c:142 -#, c-format -msgid "" -"Written by %s, %s, %s,\n" -"%s, %s, %s, %s,\n" -"%s, %s, and others.\n" -msgstr "" -"\xC9crit par %s, %s, %s,\n" -"%s, %s, %s, %s,\n" -"%s, %s et d'autres.\n" +#~ msgid "" +#~ "Written by %s, %s, %s,\n" +#~ "%s, %s, %s, and %s.\n" +#~ msgstr "" +#~ "\xC9crit par %s, %s, %s,\n" +#~ "%s, %s, %s, and %s.\n" -#: lib/xfts.c:58 -#, c-format -msgid "invalid argument: %s" -msgstr "argument invalide: %s" +#~ msgid "" +#~ "Written by %s, %s, %s,\n" +#~ "%s, %s, %s, %s,\n" +#~ "and %s.\n" +#~ msgstr "" +#~ "\xC9crit par %s, %s, %s,\n" +#~ "%s, %s, %s, %s,\n" +#~ "et %s.\n" -#: lib/xmemcoll.c:49 src/expr.c:772 -#, c-format -msgid "string comparison failed" -msgstr "\xE9chec de comparaison de cha\xEEne" +#~ msgid "" +#~ "Written by %s, %s, %s,\n" +#~ "%s, %s, %s, %s,\n" +#~ "%s, and %s.\n" +#~ msgstr "" +#~ "\xC9crit par %s, %s, %s,\n" +#~ "%s, %s, %s, %s,\n" +#~ "%s et %s.\n" -#: lib/xmemcoll.c:50 lib/xmemxfrm.c:56 src/expr.c:773 -#, c-format -msgid "Set LC_ALL='C' to work around the problem." -msgstr "D\xE9finir LC_ALL=\xAB C \xBB pour contourner le probl\xE8me." +#~ msgid "" +#~ "Written by %s, %s, %s,\n" +#~ "%s, %s, %s, %s,\n" +#~ "%s, %s, and others.\n" +#~ msgstr "" +#~ "\xC9crit par %s, %s, %s,\n" +#~ "%s, %s, %s, %s,\n" +#~ "%s, %s et d'autres.\n" -#: lib/xmemcoll.c:52 src/expr.c:775 -#, c-format -msgid "The strings compared were %s and %s." -msgstr "Les cha\xEEnes compar\xE9es \xE9taient %s et %s." +#~ msgid "invalid argument: %s" +#~ msgstr "argument invalide: %s" -#: lib/xmemxfrm.c:55 -#, fuzzy, c-format -msgid "string transformation failed" -msgstr "\xE9chec de comparaison de cha\xEEne" +#~ msgid "string comparison failed" +#~ msgstr "\xE9chec de comparaison de cha\xEEne" -#: lib/xmemxfrm.c:58 -#, c-format -msgid "The untransformed string was %s." -msgstr "" +#~ msgid "Set LC_ALL='C' to work around the problem." +#~ msgstr "D\xE9finir LC_ALL=\xAB C \xBB pour contourner le probl\xE8me." -#: lib/xstrtol.h:62 -#, fuzzy, c-format -msgid "invalid %s `%s'" -msgstr "usager invalide %s" +#~ msgid "The strings compared were %s and %s." +#~ msgstr "Les cha\xEEnes compar\xE9es \xE9taient %s et %s." -#: lib/xstrtol.h:69 -#, fuzzy, c-format -msgid "invalid character following %s in `%s'" -msgstr "caract\xE8re de classe invalide %s" +#, fuzzy +#~ msgid "string transformation failed" +#~ msgstr "\xE9chec de comparaison de cha\xEEne" -#: lib/xstrtol.h:74 -#, fuzzy, c-format -msgid "%s `%s' too large" -msgstr "%s est trop grand" +#, fuzzy +#~ msgid "invalid %s `%s'" +#~ msgstr "usager invalide %s" -#: src/base64.c:61 src/basename.c:50 src/cat.c:91 src/chgrp.c:108 -#: src/chmod.c:337 src/chown.c:89 src/chroot.c:42 src/cksum.c:261 -#: src/comm.c:69 src/cp.c:153 src/csplit.c:1451 src/cut.c:184 src/date.c:128 -#: src/dd.c:400 src/df.c:736 src/dircolors.c:98 src/dirname.c:44 src/du.c:275 -#: src/echo.c:60 src/env.c:114 src/expand.c:107 src/expr.c:98 src/factor.c:70 -#: src/fmt.c:269 src/fold.c:66 src/head.c:105 src/hostid.c:44 -#: src/hostname.c:61 src/id.c:74 src/install.c:648 src/join.c:130 -#: src/kill.c:86 src/link.c:46 src/ln.c:320 src/logname.c:40 src/ls.c:4218 -#: src/md5sum.c:146 src/mkdir.c:55 src/mkfifo.c:50 src/mknod.c:51 src/mv.c:280 -#: src/nice.c:72 src/nl.c:173 src/nohup.c:53 src/od.c:303 src/paste.c:413 -#: src/pathchk.c:95 src/pinky.c:506 src/pr.c:2764 src/printenv.c:57 -#: src/printf.c:89 src/ptx.c:1879 src/pwd.c:50 src/readlink.c:63 src/rm.c:156 -#: src/rmdir.c:136 src/seq.c:70 src/setuidgid.c:47 src/shred.c:161 -#: src/shuf.c:47 src/sleep.c:43 src/sort.c:281 src/split.c:102 src/stat.c:827 -#: src/stty.c:507 src/su.c:381 src/sum.c:55 src/sync.c:41 src/tac.c:129 -#: src/tail.c:212 src/tee.c:58 src/test.c:690 src/touch.c:229 src/tr.c:286 -#: src/tsort.c:82 src/tty.c:65 src/uname.c:113 src/unexpand.c:117 -#: src/uniq.c:131 src/unlink.c:46 src/uptime.c:193 src/users.c:104 -#: src/wc.c:104 src/who.c:629 src/whoami.c:46 src/yes.c:42 -#, c-format -msgid "Try `%s --help' for more information.\n" -msgstr "Pour en savoir davantage, faites: \xAB %s --help \xBB.\n" +#, fuzzy +#~ msgid "invalid character following %s in `%s'" +#~ msgstr "caract\xE8re de classe invalide %s" -#: src/base64.c:65 -#, fuzzy, c-format -msgid "" -"Usage: %s [OPTION] [FILE]\n" -"Base64 encode or decode FILE, or standard input, to standard output.\n" -"\n" -msgstr "" -"Usage: %s [OPTION] [FICHIER]...\n" -"Afficher ou v\xE9rifier les sommes de contr\xF4le %s (%d-bits).\n" -"Sans FICHIER, ou quand FICHIER est -, lire de l'entr\xE9e standard.\n" +#, fuzzy +#~ msgid "%s `%s' too large" +#~ msgstr "%s est trop grand" -#: src/base64.c:69 -msgid "" -" -w, --wrap=COLS Wrap encoded lines after COLS character (default " -"76).\n" -" Use 0 to disable line wrapping.\n" -"\n" -" -d, --decode Decode data.\n" -" -i, --ignore-garbage When decoding, ignore non-alphabet characters.\n" -"\n" -msgstr "" +#~ msgid "Try `%s --help' for more information.\n" +#~ msgstr "Pour en savoir davantage, faites: \xAB %s --help \xBB.\n" -#: src/base64.c:77 #, fuzzy -msgid "" -" --help Display this help and exit.\n" -" --version Output version information and exit.\n" -msgstr "" -"Afficher la somme de contr\xF4le CRC et le d\xE9compte d'octets de chaque " -"FICHIER.\n" -"\n" -" --help afficher l'aide-m\xE9moire\n" -" --version afficher le nom et la version du logiciel\n" +#~ msgid "" +#~ "Usage: %s [OPTION] [FILE]\n" +#~ "Base64 encode or decode FILE, or standard input, to standard output.\n" +#~ "\n" +#~ msgstr "" +#~ "Usage: %s [OPTION] [FICHIER]...\n" +#~ "Afficher ou v\xE9rifier les sommes de contr\xF4le %s (%d-bits).\n" +#~ "Sans FICHIER, ou quand FICHIER est -, lire de l'entr\xE9e standard.\n" -#: src/base64.c:80 src/cat.c:117 src/fmt.c:296 src/shuf.c:74 src/sum.c:71 -msgid "" -"\n" -"With no FILE, or when FILE is -, read standard input.\n" -msgstr "" -"\n" -"Sans FICHIER, ou quand le FICHIER est -, lire de l'entr\xE9e standard.\n" +#, fuzzy +#~ msgid "" +#~ " --help Display this help and exit.\n" +#~ " --version Output version information and exit.\n" +#~ msgstr "" +#~ "Afficher la somme de contr\xF4le CRC et le d\xE9compte d'octets de chaque " +#~ "FICHIER.\n" +#~ "\n" +#~ " --help afficher l'aide-m\xE9moire\n" +#~ " --version afficher le nom et la version du logiciel\n" -#: src/base64.c:83 -msgid "" -"\n" -"The data are encoded as described for the base64 alphabet in RFC 3548.\n" -"Decoding require compliant input by default, use --ignore-garbage to\n" -"attempt to recover from non-alphabet characters (such as newlines) in\n" -"the encoded stream.\n" -msgstr "" +#~ msgid "" +#~ "\n" +#~ "With no FILE, or when FILE is -, read standard input.\n" +#~ msgstr "" +#~ "\n" +#~ "Sans FICHIER, ou quand le FICHIER est -, lire de l'entr\xE9e standard.\n" -#: src/base64.c:89 src/basename.c:73 src/cat.c:128 src/chgrp.c:163 -#: src/chmod.c:368 src/chown.c:158 src/chroot.c:60 src/cksum.c:276 -#: src/comm.c:94 src/cp.c:252 src/csplit.c:1493 src/cut.c:237 src/date.c:243 -#: src/dd.c:510 src/df.c:775 src/dircolors.c:119 src/dirname.c:67 src/du.c:347 -#: src/echo.c:98 src/env.c:133 src/expand.c:132 src/expr.c:166 src/factor.c:90 -#: src/fmt.c:300 src/fold.c:89 src/head.c:140 src/hostid.c:57 -#: src/hostname.c:74 src/id.c:95 src/install.c:706 src/join.c:172 -#: src/kill.c:117 src/link.c:58 src/ln.c:378 src/logname.c:51 src/ls.c:4373 -#: src/md5sum.c:194 src/mkdir.c:74 src/mkfifo.c:67 src/mknod.c:82 src/mv.c:331 -#: src/nice.c:88 src/nl.c:229 src/nohup.c:70 src/od.c:395 src/paste.c:437 -#: src/pathchk.c:109 src/pinky.c:533 src/pr.c:2876 src/printenv.c:71 -#: src/printf.c:138 src/ptx.c:1925 src/pwd.c:62 src/readlink.c:89 src/rm.c:207 -#: src/rmdir.c:155 src/seq.c:101 src/setuidgid.c:67 src/shred.c:239 -#: src/shuf.c:78 src/sleep.c:60 src/sort.c:357 src/split.c:136 src/stat.c:906 -#: src/stty.c:724 src/su.c:402 src/sum.c:75 src/sync.c:52 src/tac.c:152 -#: src/tail.c:283 src/tee.c:75 src/test.c:777 src/touch.c:263 src/tr.c:359 -#: src/true.c:54 src/tsort.c:94 src/tty.c:77 src/uname.c:136 -#: src/unexpand.c:141 src/uniq.c:170 src/unlink.c:57 src/uptime.c:208 -#: src/users.c:117 src/wc.c:129 src/who.c:668 src/whoami.c:58 src/yes.c:58 -#, c-format -msgid "" -"\n" -"Report bugs to <%s>.\n" -msgstr "" -"\n" -"Rapporter toutes anomalies \xE0 <%s>.\n" +#~ msgid "" +#~ "\n" +#~ "Report bugs to <%s>.\n" +#~ msgstr "" +#~ "\n" +#~ "Rapporter toutes anomalies \xE0 <%s>.\n" -#: src/base64.c:177 src/base64.c:210 src/csplit.c:282 src/csplit.c:1440 -#: src/join.c:243 src/shuf.c:402 src/tac-pipe.c:75 src/tee.c:204 src/tr.c:1585 -#, c-format -msgid "read error" -msgstr "Erreur de lecture." +#~ msgid "read error" +#~ msgstr "Erreur de lecture." -#: src/base64.c:221 -#, fuzzy, c-format -msgid "invalid input" -msgstr "fanion d'entr\xE9e invalide: %s" +#, fuzzy +#~ msgid "invalid input" +#~ msgstr "fanion d'entr\xE9e invalide: %s" -#: src/base64.c:257 -#, fuzzy, c-format -msgid "invalid wrap size: %s" -msgstr "taille de tabulation invalide: %s" +#, fuzzy +#~ msgid "invalid wrap size: %s" +#~ msgstr "taille de tabulation invalide: %s" -#: src/base64.c:276 src/basename.c:123 src/comm.c:278 src/cp.c:572 -#: src/date.c:430 src/dircolors.c:452 src/dirname.c:100 src/du.c:947 -#: src/hostid.c:82 src/hostname.c:120 src/id.c:160 src/install.c:352 -#: src/join.c:741 src/link.c:90 src/ln.c:493 src/logname.c:76 src/mknod.c:152 -#: src/mv.c:444 src/od.c:1842 src/ptx.c:2154 src/readlink.c:156 src/seq.c:333 -#: src/shuf.c:382 src/split.c:532 src/tr.c:1738 src/tsort.c:552 src/tty.c:117 -#: src/uname.c:222 src/uniq.c:435 src/uniq.c:452 src/unlink.c:86 -#: src/uptime.c:240 src/users.c:149 src/wc.c:643 src/who.c:822 src/whoami.c:84 -#, c-format -msgid "extra operand %s" -msgstr "op\xE9rande surnum\xE9raire %s" +#~ msgid "extra operand %s" +#~ msgstr "op\xE9rande surnum\xE9raire %s" -#: src/base64.c:302 src/cat.c:785 -#, c-format -msgid "closing standard input" -msgstr "fermeture de l'entr\xE9e standard" +#~ msgid "closing standard input" +#~ msgstr "fermeture de l'entr\xE9e standard" -#: src/basename.c:54 -#, c-format -msgid "" -"Usage: %s NAME [SUFFIX]\n" -" or: %s OPTION\n" -msgstr "" -"Usage: %s NOM [SUFFIXE]...\n" -" ou: %s [OPTION]\n" +#~ msgid "" +#~ "Usage: %s NAME [SUFFIX]\n" +#~ " or: %s OPTION\n" +#~ msgstr "" +#~ "Usage: %s NOM [SUFFIXE]...\n" +#~ " ou: %s [OPTION]\n" -#: src/basename.c:59 -msgid "" -"Print NAME with any leading directory components removed.\n" -"If specified, also remove a trailing SUFFIX.\n" -"\n" -msgstr "" -"Afficher le NOM sans \xEAtre pr\xE9c\xE9d\xE9 des composants des noms de r\xE9pertoires\n" -"Si sp\xE9cifi\xE9 enlever aussi le SUFFIXE.\n" -"\n" +#~ msgid "" +#~ "Print NAME with any leading directory components removed.\n" +#~ "If specified, also remove a trailing SUFFIX.\n" +#~ "\n" +#~ msgstr "" +#~ "Afficher le NOM sans \xEAtre pr\xE9c\xE9d\xE9 des composants des noms de r\xE9pertoires\n" +#~ "Si sp\xE9cifi\xE9 enlever aussi le SUFFIXE.\n" +#~ "\n" -#: src/basename.c:66 -#, c-format -msgid "" -"\n" -"Examples:\n" -" %s /usr/bin/sort Output \"sort\".\n" -" %s include/stdio.h .h Output \"stdio\".\n" -msgstr "" -"\n" -"Exemples:\n" -" %s /usr/bin/sort sortie \"sort\".\n" -" %s include/stdio.h .h sortie \"stdio\".\n" +#~ msgid "" +#~ "\n" +#~ "Examples:\n" +#~ " %s /usr/bin/sort Output \"sort\".\n" +#~ " %s include/stdio.h .h Output \"stdio\".\n" +#~ msgstr "" +#~ "\n" +#~ "Exemples:\n" +#~ " %s /usr/bin/sort sortie \"sort\".\n" +#~ " %s include/stdio.h .h sortie \"stdio\".\n" -#: src/basename.c:117 src/chgrp.c:281 src/chmod.c:488 src/chown.c:294 -#: src/chroot.c:84 src/comm.c:270 src/csplit.c:1388 src/dirname.c:94 -#: src/expr.c:211 src/join.c:907 src/link.c:82 src/mkdir.c:179 -#: src/mkfifo.c:104 src/mknod.c:141 src/nohup.c:101 src/pathchk.c:158 -#: src/printf.c:665 src/readlink.c:148 src/rm.c:344 src/rmdir.c:198 -#: src/seq.c:327 src/setuidgid.c:95 src/sleep.c:122 src/stat.c:969 -#: src/tr.c:1723 src/unlink.c:80 -#, c-format -msgid "missing operand" -msgstr "op\xE9rande manquante" +#~ msgid "missing operand" +#~ msgstr "op\xE9rande manquante" -#: src/cat.c:95 -#, c-format -msgid "Usage: %s [OPTION] [FILE]...\n" -msgstr "Usage: %s [OPTION] [FICHIER]...\n" +#~ msgid "Usage: %s [OPTION] [FILE]...\n" +#~ msgstr "Usage: %s [OPTION] [FICHIER]...\n" -#: src/cat.c:99 -msgid "" -"Concatenate FILE(s), or standard input, to standard output.\n" -"\n" -" -A, --show-all equivalent to -vET\n" -" -b, --number-nonblank number nonblank output lines\n" -" -e equivalent to -vE\n" -" -E, --show-ends display $ at end of each line\n" -" -n, --number number all output lines\n" -" -s, --squeeze-blank never more than one single blank line\n" -msgstr "" -"Concat\xE9ner le(s) FICHIER(s), ou de l'ENTR\xC9E standard, vers la sortie " -"standard.\n" -"\n" -" -A, --show-all \xE9quivalent \xE0 -vET\n" -" -b, --number-nonblank num\xE9roter que les lignes non vides\n" -" -e \xE9quivalent \xE0 -vE\n" -" -E, --show-ends afficher $ \xE0 la fin de chaque ligne\n" -" -n, --number num\xE9roter toutes les lignes\n" -" -s, --squeeze-blank afficher jamais plus qu'une seule ligne vide\n" +#~ msgid "" +#~ "Concatenate FILE(s), or standard input, to standard output.\n" +#~ "\n" +#~ " -A, --show-all equivalent to -vET\n" +#~ " -b, --number-nonblank number nonblank output lines\n" +#~ " -e equivalent to -vE\n" +#~ " -E, --show-ends display $ at end of each line\n" +#~ " -n, --number number all output lines\n" +#~ " -s, --squeeze-blank never more than one single blank line\n" +#~ msgstr "" +#~ "Concat\xE9ner le(s) FICHIER(s), ou de l'ENTR\xC9E standard, vers la sortie " +#~ "standard.\n" +#~ "\n" +#~ " -A, --show-all \xE9quivalent \xE0 -vET\n" +#~ " -b, --number-nonblank num\xE9roter que les lignes non vides\n" +#~ " -e \xE9quivalent \xE0 -vE\n" +#~ " -E, --show-ends afficher $ \xE0 la fin de chaque ligne\n" +#~ " -n, --number num\xE9roter toutes les lignes\n" +#~ " -s, --squeeze-blank afficher jamais plus qu'une seule ligne vide\n" -#: src/cat.c:109 -msgid "" -" -t equivalent to -vT\n" -" -T, --show-tabs display TAB characters as ^I\n" -" -u (ignored)\n" -" -v, --show-nonprinting use ^ and M- notation, except for LFD and TAB\n" -msgstr "" -" -t \xE9quivalent \xE0 -vT\n" -" -T, --show-tabs afficher les caract\xE8res TAB comme ^I\n" -" -u (ignor\xE9)\n" -" -v, --show-nonprinting utiliser la notation ^ et M- ,\n" -" except\xE9 pour LFD et TAB\n" +#~ msgid "" +#~ " -t equivalent to -vT\n" +#~ " -T, --show-tabs display TAB characters as ^I\n" +#~ " -u (ignored)\n" +#~ " -v, --show-nonprinting use ^ and M- notation, except for LFD and TAB\n" +#~ msgstr "" +#~ " -t \xE9quivalent \xE0 -vT\n" +#~ " -T, --show-tabs afficher les caract\xE8res TAB comme ^I\n" +#~ " -u (ignor\xE9)\n" +#~ " -v, --show-nonprinting utiliser la notation ^ et M- ,\n" +#~ " except\xE9 pour LFD et TAB\n" -#: src/cat.c:121 -#, c-format -msgid "" -"\n" -"Examples:\n" -" %s f - g Output f's contents, then standard input, then g's contents.\n" -" %s Copy standard input to standard output.\n" -msgstr "" -"\n" -"Exemples:\n" -" %s f - g sortie du contenu de f, ensuite sur l'entr\xE9e standard, ensuite " -"le contenu de g.\n" -" %s copier l'entr\xE9e standard var la sortie standard.\n" +#~ msgid "" +#~ "\n" +#~ "Examples:\n" +#~ " %s f - g Output f's contents, then standard input, then g's contents.\n" +#~ " %s Copy standard input to standard output.\n" +#~ msgstr "" +#~ "\n" +#~ "Exemples:\n" +#~ " %s f - g sortie du contenu de f, ensuite sur l'entr\xE9e standard, " +#~ "ensuite le contenu de g.\n" +#~ " %s copier l'entr\xE9e standard var la sortie standard.\n" -#: src/cat.c:333 -#, c-format -msgid "cannot do ioctl on %s" -msgstr "ne peut ex\xE9cuter ioctl sur %s" +#~ msgid "cannot do ioctl on %s" +#~ msgstr "ne peut ex\xE9cuter ioctl sur %s" -#: src/cat.c:643 src/dd.c:1676 src/sort.c:273 src/tee.c:163 src/yes.c:92 -#, c-format -msgid "standard output" -msgstr "sortie standard" +#~ msgid "standard output" +#~ msgstr "sortie standard" -#: src/cat.c:720 -#, c-format -msgid "%s: input file is output file" -msgstr "%s: le fichier \xE0 l'entr\xE9e est le m\xEAme qu'\xE0 la sortie." +#~ msgid "%s: input file is output file" +#~ msgstr "%s: le fichier \xE0 l'entr\xE9e est le m\xEAme qu'\xE0 la sortie." -#: src/chgrp.c:95 src/install.c:612 -#, c-format -msgid "invalid group %s" -msgstr "groupe invalide %s" +#~ msgid "invalid group %s" +#~ msgstr "groupe invalide %s" -#: src/chgrp.c:112 -#, c-format -msgid "" -"Usage: %s [OPTION]... GROUP FILE...\n" -" or: %s [OPTION]... --reference=RFILE FILE...\n" -msgstr "" -"Usage: %s [OPTION]... GROUPE FICHIER...\n" -" ou: %s [OPTION]... --reference=FICHIER-R FICHIER...\n" +#~ msgid "" +#~ "Usage: %s [OPTION]... GROUP FILE...\n" +#~ " or: %s [OPTION]... --reference=RFILE FILE...\n" +#~ msgstr "" +#~ "Usage: %s [OPTION]... GROUPE FICHIER...\n" +#~ " ou: %s [OPTION]... --reference=FICHIER-R FICHIER...\n" -#: src/chgrp.c:117 #, fuzzy -msgid "" -"Change the group of each FILE to GROUP.\n" -"With --reference, change the group of each FILE to that of RFILE.\n" -"\n" -" -c, --changes like verbose but report only when a change is made\n" -" --dereference affect the referent of each symbolic link (this is\n" -" the default), rather than the symbolic link itself\n" -msgstr "" -"Changer le groupe d'appartenance de chaque FICHIER au GROUPE.\n" -"Avec l'option --reference, modifier le groupe de chaque fichier pour celui " -"de FICHIER-R.\n" -"\n" -" -c, --changes utiliser le mode bavard mais rapporter " -"seulement\n" -" les modifications lorsqu'elles surviennent\n" -" --dereference affecter le r\xE9f\xE9rent de chaque lien symbolique,\n" -" plut\xF4t que le lien symbolique lui-m\xEAme\n" +#~ msgid "" +#~ "Change the group of each FILE to GROUP.\n" +#~ "With --reference, change the group of each FILE to that of RFILE.\n" +#~ "\n" +#~ " -c, --changes like verbose but report only when a change is " +#~ "made\n" +#~ " --dereference affect the referent of each symbolic link (this " +#~ "is\n" +#~ " the default), rather than the symbolic link " +#~ "itself\n" +#~ msgstr "" +#~ "Changer le groupe d'appartenance de chaque FICHIER au GROUPE.\n" +#~ "Avec l'option --reference, modifier le groupe de chaque fichier pour " +#~ "celui de FICHIER-R.\n" +#~ "\n" +#~ " -c, --changes utiliser le mode bavard mais rapporter " +#~ "seulement\n" +#~ " les modifications lorsqu'elles surviennent\n" +#~ " --dereference affecter le r\xE9f\xE9rent de chaque lien " +#~ "symbolique,\n" +#~ " plut\xF4t que le lien symbolique lui-m\xEAme\n" -#: src/chgrp.c:125 src/chown.c:106 -msgid "" -" -h, --no-dereference affect each symbolic link instead of any " -"referenced\n" -" file (useful only on systems that can change the\n" -" ownership of a symlink)\n" -msgstr "" -" -h, --no-dereference modifier les liens symboliques au lieu des\n" -" fichiers r\xE9f\xE9renc\xE9s (utile seulement\n" -" sur les syst\xE8mes permettant de changer le " -"propri\xE9taire\n" -" d'un lien symbolique)\n" +#~ msgid "" +#~ " -h, --no-dereference affect each symbolic link instead of any " +#~ "referenced\n" +#~ " file (useful only on systems that can change " +#~ "the\n" +#~ " ownership of a symlink)\n" +#~ msgstr "" +#~ " -h, --no-dereference modifier les liens symboliques au lieu des\n" +#~ " fichiers r\xE9f\xE9renc\xE9s (utile seulement\n" +#~ " sur les syst\xE8mes permettant de changer le " +#~ "propri\xE9taire\n" +#~ " d'un lien symbolique)\n" -#: src/chgrp.c:130 src/chown.c:118 #, fuzzy -msgid "" -" --no-preserve-root do not treat `/' specially (the default)\n" -" --preserve-root fail to operate recursively on `/'\n" -msgstr "" -" --no-preserve-root ne pas traiter `/' de mani\xE8re sp\xE9ciale (par " -"d\xE9faut)\n" -" --preserve-root bloquer le traitement r\xE9cursif sur `/'\n" +#~ msgid "" +#~ " --no-preserve-root do not treat `/' specially (the default)\n" +#~ " --preserve-root fail to operate recursively on `/'\n" +#~ msgstr "" +#~ " --no-preserve-root ne pas traiter `/' de mani\xE8re sp\xE9ciale (par " +#~ "d\xE9faut)\n" +#~ " --preserve-root bloquer le traitement r\xE9cursif sur `/'\n" -#: src/chgrp.c:134 #, fuzzy -msgid "" -" -f, --silent, --quiet suppress most error messages\n" -" --reference=RFILE use RFILE's group rather than specifying a\n" -" GROUP value\n" -" -R, --recursive operate on files and directories recursively\n" -" -v, --verbose output a diagnostic for every file processed\n" -"\n" -msgstr "" -" -f, --silent, --quiet supprimer la plupart des messages d'erreur\n" -" --reference=FICHIER utiliser le groupe de r\xE9f\xE9rence du FICHIER\n" -" au lieu d'une valeur de groupe\n" -" -R, --recursive modifier r\xE9cursivement fichiers et r\xE9pertoires\n" -" -v, --verbose produire un diagnostic pour chaque fichier " -"trait\xE9\n" +#~ msgid "" +#~ " -f, --silent, --quiet suppress most error messages\n" +#~ " --reference=RFILE use RFILE's group rather than specifying a\n" +#~ " GROUP value\n" +#~ " -R, --recursive operate on files and directories recursively\n" +#~ " -v, --verbose output a diagnostic for every file processed\n" +#~ "\n" +#~ msgstr "" +#~ " -f, --silent, --quiet supprimer la plupart des messages d'erreur\n" +#~ " --reference=FICHIER utiliser le groupe de r\xE9f\xE9rence du FICHIER\n" +#~ " au lieu d'une valeur de groupe\n" +#~ " -R, --recursive modifier r\xE9cursivement fichiers et " +#~ "r\xE9pertoires\n" +#~ " -v, --verbose produire un diagnostic pour chaque fichier " +#~ "trait\xE9\n" -#: src/chgrp.c:142 src/chown.c:130 -msgid "" -"The following options modify how a hierarchy is traversed when the -R\n" -"option is also specified. If more than one is specified, only the final\n" -"one takes effect.\n" -"\n" -" -H if a command line argument is a symbolic link\n" -" to a directory, traverse it\n" -" -L traverse every symbolic link to a directory\n" -" encountered\n" -" -P do not traverse any symbolic links (default)\n" -"\n" -msgstr "" -"Les options suivantes modifient comment la hi\xE9rarchie est travers\xE9e lors " -"que\n" -"l'option -R est aussi sp\xE9cifi\xE9. Si plus d'une option est sp\xE9cifi\xE9e, seule " -"la derni\xE8re\n" -"prend effet.\n" -"\n" -" -H si l'argument de la ligne de commande est un lien " -"symbolique\n" -" vers un r\xE9pertoire alors le parcourir\n" -" -L parcourir chaque lien symbolique menant \xE0 un " -"r\xE9pertoire\n" -" rencontr\xE9\n" -" -P ne pas parcourir aucun lien symbolique (par " -"d\xE9faut)\n" -"\n" +#~ msgid "" +#~ "The following options modify how a hierarchy is traversed when the -R\n" +#~ "option is also specified. If more than one is specified, only the final\n" +#~ "one takes effect.\n" +#~ "\n" +#~ " -H if a command line argument is a symbolic link\n" +#~ " to a directory, traverse it\n" +#~ " -L traverse every symbolic link ... [truncated message content] |
From: <den...@us...> - 2009-03-08 06:47:22
|
Revision: 173 http://rmol.svn.sourceforge.net/rmol/?rev=173&view=rev Author: denis_arnaud Date: 2009-03-08 06:47:19 +0000 (Sun, 08 Mar 2009) Log Message: ----------- [Build] Now uses the i18n feature (the USE_NLS flag had to be forced to yes). Modified Paths: -------------- trunk/rmol/Makefile.am trunk/rmol/configure.ac trunk/rmol/rmol.spec.in Modified: trunk/rmol/Makefile.am =================================================================== --- trunk/rmol/Makefile.am 2009-03-08 00:06:18 UTC (rev 172) +++ trunk/rmol/Makefile.am 2009-03-08 06:47:19 UTC (rev 173) @@ -24,7 +24,7 @@ EXTRA_DIST = @PACKAGE@.spec @PACKAGE@.m4 @PACKAGE@.pc Makefile.common # Build in these directories: -SUBDIRS = rmol win32 man $(INFO_DOC_DIR) $(HTML_DOC_DIR) $(TEST_DIR) +SUBDIRS = rmol win32 po man $(INFO_DOC_DIR) $(HTML_DOC_DIR) $(TEST_DIR) # Configuration helpers Modified: trunk/rmol/configure.ac =================================================================== --- trunk/rmol/configure.ac 2009-03-08 00:06:18 UTC (rev 172) +++ trunk/rmol/configure.ac 2009-03-08 06:47:19 UTC (rev 173) @@ -286,7 +286,11 @@ #endif /* #ifndef CONFIG_H */ ]) +AM_GNU_GETTEXT([external], [need-formatstring-macros]) +AM_GNU_GETTEXT_VERSION([0.14]) +USE_NLS=yes + # Define configured files AC_CONFIG_FILES( Makefile @@ -311,6 +315,7 @@ doc/local/index.doc doc/doxygen_html.cfg doc/sourceforge/howto_release_rmol.html + po/Makefile.in test/Makefile win32/Makefile) AC_OUTPUT @@ -332,6 +337,7 @@ Switches: - debug ............. : ${enable_debug} - exceptions ........ : ${enable_exceptions} + - use-nls ........... : ${USE_NLS} - info-doc .......... : ${enable_info_doc} - html-doc .......... : ${enable_html_doc} - shared ............ : ${enable_shared} Modified: trunk/rmol/rmol.spec.in =================================================================== --- trunk/rmol/rmol.spec.in 2009-03-08 00:06:18 UTC (rev 172) +++ trunk/rmol/rmol.spec.in 2009-03-08 06:47:19 UTC (rev 173) @@ -58,7 +58,7 @@ %install rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT -#%find_lang %{name} +%find_lang %{name} # remove unpackaged files from the buildroot rm -f $RPM_BUILD_ROOT%{_infodir}/dir @@ -77,8 +77,7 @@ /sbin/install-info --delete %{_infodir}/%{name}-ref.info.gz %{_infodir}/dir fi -%files -# -f %{name}.lang +%files -f %{name}.lang %defattr(-,root,root,-) %doc AUTHORS ChangeLog COPYING INSTALL NEWS README %{_bindir}/%{name} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <den...@us...> - 2009-03-08 17:51:41
|
Revision: 174 http://rmol.svn.sourceforge.net/rmol/?rev=174&view=rev Author: denis_arnaud Date: 2009-03-08 17:51:26 +0000 (Sun, 08 Mar 2009) Log Message: ----------- [Release 0.18.0] Added Logging service. Modified Paths: -------------- trunk/rmol/configure.ac trunk/rmol/po/POTFILES.in trunk/rmol/rmol/RMOL_Service.hpp trunk/rmol/rmol/RmolTypes.hpp trunk/rmol/rmol/bom/BomAbstract.cpp trunk/rmol/rmol/bom/BomAbstract.hpp trunk/rmol/rmol/bom/Bucket.cpp trunk/rmol/rmol/bom/Bucket.hpp trunk/rmol/rmol/bom/BucketHolder.cpp trunk/rmol/rmol/bom/BucketHolder.hpp trunk/rmol/rmol/bom/Demand.cpp trunk/rmol/rmol/bom/Demand.hpp trunk/rmol/rmol/bom/Overbooking.cpp trunk/rmol/rmol/bom/Overbooking.hpp trunk/rmol/rmol/bom/PartialSumHolder.cpp trunk/rmol/rmol/bom/PartialSumHolder.hpp trunk/rmol/rmol/bom/PartialSumHolderHolder.cpp trunk/rmol/rmol/bom/PartialSumHolderHolder.hpp trunk/rmol/rmol/factory/FacBucket.hpp trunk/rmol/rmol/factory/FacBucketHolder.hpp trunk/rmol/rmol/factory/FacDemand.hpp trunk/rmol/rmol/factory/FacOverbooking.hpp trunk/rmol/rmol/factory/FacPartialSumHolder.hpp trunk/rmol/rmol/factory/FacPartialSumHolderHolder.hpp trunk/rmol/rmol/factory/FacSupervisor.cpp trunk/rmol/rmol/factory/FacSupervisor.hpp trunk/rmol/rmol/factory/sources.mk trunk/rmol/rmol/field/FldDistributionParameters.cpp trunk/rmol/rmol/field/FldDistributionParameters.hpp trunk/rmol/rmol/field/FldOverbookingPolicy.cpp trunk/rmol/rmol/field/FldOverbookingPolicy.hpp trunk/rmol/rmol/field/FldYieldRange.cpp trunk/rmol/rmol/field/FldYieldRange.hpp trunk/rmol/rmol/field/sources.mk trunk/rmol/rmol/rmol.cpp trunk/rmol/rmol/service/RMOL_Service.cpp trunk/rmol/rmol/service/sources.mk trunk/rmol/rmol.spec.in trunk/rmol/test/Makefile.am trunk/rmol/test/testLib.sh Added Paths: ----------- trunk/rmol/config/cppunit.m4 trunk/rmol/rmol/factory/FacBomAbstract.cpp trunk/rmol/rmol/factory/FacBomAbstract.hpp trunk/rmol/rmol/factory/FacRmolServiceContext.cpp trunk/rmol/rmol/factory/FacRmolServiceContext.hpp trunk/rmol/rmol/field/FldAbstract.cpp trunk/rmol/rmol/field/FldAbstract.hpp trunk/rmol/rmol/service/Logger.cpp trunk/rmol/rmol/service/Logger.hpp trunk/rmol/rmol/service/RMOL_ServiceContext.cpp trunk/rmol/rmol/service/RMOL_ServiceContext.hpp trunk/rmol/test/OptimiseTestSuite.cpp trunk/rmol/test/OptimiseTestSuite.hpp trunk/rmol/test/SimulateTestSuite.cpp trunk/rmol/test/SimulateTestSuite.hpp trunk/rmol/test/com/ trunk/rmol/test/com/CppUnitCore.cpp trunk/rmol/test/com/CppUnitCore.hpp trunk/rmol/test/com/Makefile.am trunk/rmol/test/com/XmlOutputterHookForCC.cpp trunk/rmol/test/com/XmlOutputterHookForCC.hpp trunk/rmol/test/com/sources.mk Removed Paths: ------------- trunk/rmol/rmol/factory/FacAbstract.cpp trunk/rmol/rmol/factory/FacAbstract.hpp trunk/rmol/rmol/factory/FacServiceContext.cpp trunk/rmol/rmol/factory/FacServiceContext.hpp trunk/rmol/rmol/service/ServiceContext.cpp trunk/rmol/rmol/service/ServiceContext.hpp trunk/rmol/test/optimise.cpp trunk/rmol/test/simulate.cpp Property Changed: ---------------- trunk/rmol/rmol/ trunk/rmol/test/ Added: trunk/rmol/config/cppunit.m4 =================================================================== --- trunk/rmol/config/cppunit.m4 (rev 0) +++ trunk/rmol/config/cppunit.m4 2009-03-08 17:51:26 UTC (rev 174) @@ -0,0 +1,93 @@ +dnl +dnl AM_PATH_CPPUNIT(MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) +dnl +AC_DEFUN([AM_PATH_CPPUNIT], +[ + +AC_ARG_WITH(cppunit-prefix,[ --with-cppunit-prefix=PFX Prefix where CppUnit is installed (optional)], + cppunit_config_prefix="$withval", cppunit_config_prefix="") +AC_ARG_WITH(cppunit-exec-prefix,[ --with-cppunit-exec-prefix=PFX Exec prefix where CppUnit is installed (optional)], + cppunit_config_exec_prefix="$withval", cppunit_config_exec_prefix="") + + if test x$cppunit_config_exec_prefix != x ; then + cppunit_config_args="$cppunit_config_args --exec-prefix=$cppunit_config_exec_prefix" + if test x${CPPUNIT_CONFIG+set} != xset ; then + CPPUNIT_CONFIG=$cppunit_config_exec_prefix/bin/cppunit-config + fi + fi + if test x$cppunit_config_prefix != x ; then + cppunit_config_args="$cppunit_config_args --prefix=$cppunit_config_prefix" + if test x${CPPUNIT_CONFIG+set} != xset ; then + CPPUNIT_CONFIG=$cppunit_config_prefix/bin/cppunit-config + fi + fi + + AC_PATH_PROG(CPPUNIT_CONFIG, cppunit-config, no) + cppunit_version_min=$1 + + AC_MSG_CHECKING(for Cppunit - version >= $cppunit_version_min) + no_cppunit="" + if test "$CPPUNIT_CONFIG" = "no" ; then + AC_MSG_RESULT(no) + no_cppunit=yes + else + CPPUNIT_CFLAGS=`$CPPUNIT_CONFIG --cflags` + CPPUNIT_LIBS=`$CPPUNIT_CONFIG --libs` + CPPUNIT_VERSION=`$CPPUNIT_CONFIG --version` + + cppunit_major_version=`echo $CPPUNIT_VERSION | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` + cppunit_minor_version=`echo $CPPUNIT_VERSION | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` + cppunit_micro_version=`echo $CPPUNIT_VERSION | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` + + cppunit_major_min=`echo $cppunit_version_min | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` + if test "x${cppunit_major_min}" = "x" ; then + cppunit_major_min=0 + fi + + cppunit_minor_min=`echo $cppunit_version_min | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` + if test "x${cppunit_minor_min}" = "x" ; then + cppunit_minor_min=0 + fi + + cppunit_micro_min=`echo $cppunit_version_min | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` + if test "x${cppunit_micro_min}" = "x" ; then + cppunit_micro_min=0 + fi + + cppunit_version_proper=`expr \ + $cppunit_major_version \> $cppunit_major_min \| \ + $cppunit_major_version \= $cppunit_major_min \& \ + $cppunit_minor_version \> $cppunit_minor_min \| \ + $cppunit_major_version \= $cppunit_major_min \& \ + $cppunit_minor_version \= $cppunit_minor_min \& \ + $cppunit_micro_version \>= $cppunit_micro_min ` + + if test "$cppunit_version_proper" = "1" ; then + AC_MSG_RESULT([$cppunit_major_version.$cppunit_minor_version.$cppunit_micro_version]) + else + AC_MSG_RESULT(no) + no_cppunit=yes + fi + fi + + if test "x$no_cppunit" = x ; then + ifelse([$2], , :, [$2]) + else + CPPUNIT_CFLAGS="" + CPPUNIT_LIBS="" + ifelse([$3], , :, [$3]) + fi + + AC_SUBST(CPPUNIT_CFLAGS) + AC_SUBST(CPPUNIT_LIBS) + AC_SUBST(CPPUNIT_VERSION) +]) + + + Modified: trunk/rmol/configure.ac =================================================================== --- trunk/rmol/configure.ac 2009-03-08 06:47:19 UTC (rev 173) +++ trunk/rmol/configure.ac 2009-03-08 17:51:26 UTC (rev 174) @@ -7,6 +7,8 @@ AC_CONFIG_SRCDIR([rmol/basic/BasConst.cpp]) AC_CONFIG_AUX_DIR([config]) AM_INIT_AUTOMAKE +AM_PATH_CPPUNIT(1.10) +AM_CONDITIONAL([HAVE_CPPUNIT], [test "x$CPPUNIT_LIBS" != x]) # RPM release number RPM_RELEASE="1" @@ -286,11 +288,19 @@ #endif /* #ifndef CONFIG_H */ ]) + +# -------------------------------------------------------- +# I18n (internationalisation) with GNU Gettext +# -------------------------------------------------------- AM_GNU_GETTEXT([external], [need-formatstring-macros]) AM_GNU_GETTEXT_VERSION([0.14]) - +# Force the usage of the i18n feature: on 64bit architecture, +# as gettext uses conversions from int to char*, there may be +# some issues. However, for regular translation (e.g., to German +# or French), the PO files are correctly transformed into GMO. USE_NLS=yes + # Define configured files AC_CONFIG_FILES( Makefile @@ -317,6 +327,7 @@ doc/sourceforge/howto_release_rmol.html po/Makefile.in test/Makefile + test/com/Makefile win32/Makefile) AC_OUTPUT @@ -376,6 +387,11 @@ o BOOST_PO_LIB .... : ${BOOST_PROGRAM_OPTIONS_LIB} o BOOST_FS_LIB .... : ${BOOST_FILESYSTEM_LIB} + - CPPUNIT ........... : + o CPPUNIT_VERSION . : ${CPPUNIT_VERSION} + o CPPUNIT_CFLAGS .. : ${CPPUNIT_CFLAGS} + o CPPUNIT_LIBS .... : ${CPPUNIT_LIBS} + ------------------------------------------------------------------------------ Now type 'make && make install' to build and install $PACKAGE-$VERSION library ------------------------------------------------------------------------------ Modified: trunk/rmol/po/POTFILES.in =================================================================== --- trunk/rmol/po/POTFILES.in 2009-03-08 06:47:19 UTC (rev 173) +++ trunk/rmol/po/POTFILES.in 2009-03-08 17:51:26 UTC (rev 174) @@ -1,14 +1,18 @@ # List of files which contain translatable strings. rmol/service/RMOL_Service.cpp +rmol/service/RMOL_ServiceContext.cpp +rmol/service/Logger.cpp rmol/service/ServiceAbstract.hpp rmol/service/ServiceAbstract.cpp -rmol/service/ServiceContext.cpp -rmol/service/ServiceContext.hpp +rmol/service/RMOL_ServiceContext.hpp +rmol/service/Logger.hpp rmol/RmolTypes.hpp rmol/RMOL_Service.hpp rmol/field/FldYieldRange.hpp rmol/field/FldOverbookingPolicy.hpp +rmol/field/FldAbstract.cpp rmol/field/FldYieldRange.cpp +rmol/field/FldAbstract.hpp rmol/field/FldDistributionParameters.hpp rmol/field/FldOverbookingPolicy.cpp rmol/field/FldDistributionParameters.cpp @@ -18,20 +22,20 @@ rmol/factory/FacServiceAbstract.hpp rmol/factory/FacOverbooking.hpp rmol/factory/FacSupervisor.cpp -rmol/factory/FacServiceContext.cpp rmol/factory/FacDemand.hpp rmol/factory/FacPartialSumHolderHolder.cpp -rmol/factory/FacAbstract.hpp rmol/factory/FacBucketHolder.cpp +rmol/factory/FacBomAbstract.hpp +rmol/factory/FacRmolServiceContext.hpp rmol/factory/FacServiceAbstract.cpp -rmol/factory/FacAbstract.cpp rmol/factory/FacDemand.cpp rmol/factory/FacBucketHolder.hpp +rmol/factory/FacRmolServiceContext.cpp +rmol/factory/FacBomAbstract.cpp rmol/factory/FacPartialSumHolderHolder.hpp rmol/factory/FacPartialSumHolder.cpp rmol/factory/FacSupervisor.hpp rmol/factory/FacBucket.cpp -rmol/factory/FacServiceContext.hpp rmol/basic/BasConst_RMOL_Service.hpp rmol/basic/BasConst.cpp rmol/basic/BasConst_Overbooking.hpp Property changes on: trunk/rmol/rmol ___________________________________________________________________ Modified: svn:ignore - .deps .libs Makefile Makefile.in config.h config.h.in stamp-h1 rmol + .deps .libs Makefile Makefile.in config.h config.h.in stamp-h1 rmol rmol.log Modified: trunk/rmol/rmol/RMOL_Service.hpp =================================================================== --- trunk/rmol/rmol/RMOL_Service.hpp 2009-03-08 06:47:19 UTC (rev 173) +++ trunk/rmol/rmol/RMOL_Service.hpp 2009-03-08 17:51:26 UTC (rev 174) @@ -12,13 +12,14 @@ namespace RMOL { /** Forward declaration. */ - class ServiceContext; + class RMOL_ServiceContext; /** Interface for the RMOL Services. */ class RMOL_Service { public: /** Constructor. */ - RMOL_Service (const ResourceCapacity_T iResourceCapacity); + RMOL_Service (std::ostream& ioLogStream, + const ResourceCapacity_T iResourceCapacity); /** Destructor. */ ~RMOL_Service(); @@ -70,11 +71,20 @@ RMOL_Service (); RMOL_Service (const RMOL_Service&); - /** Initialiser. */ - void initContext (const ResourceCapacity_T iResourceCapacity); + /** Initialise. */ + void init (std::ostream& ioLogStream, + const ResourceCapacity_T iResourceCapacity); + /** Initilise the log. */ + void logInit (const LOG::EN_LogLevel iLogLevel, std::ostream& ioLogStream); + + /** Finaliser. */ + void finalise (); + + private: + // ////////// Service Context ////////// /** Service Context. */ - ServiceContext* _context; + RMOL_ServiceContext* _rmolServiceContext; }; } #endif // __RMOL_SVC_RMOL_SERVICE_HPP Modified: trunk/rmol/rmol/RmolTypes.hpp =================================================================== --- trunk/rmol/rmol/RmolTypes.hpp 2009-03-08 06:47:19 UTC (rev 173) +++ trunk/rmol/rmol/RmolTypes.hpp 2009-03-08 17:51:26 UTC (rev 174) @@ -10,6 +10,41 @@ namespace RMOL { + // ///////// Exceptions /////////// + class RootException : public std::exception { + }; + + class FileNotFoundException : public RootException { + }; + + class NonInitialisedServiceException : public RootException { + }; + + class MemoryAllocationException : public RootException { + }; + + class ObjectNotFoundException : public RootException { + }; + + class DocumentNotFoundException : public RootException { + }; + + + // /////////////// Log ///////////// + /** Level of logs. */ + namespace LOG { + typedef enum { + CRITICAL = 0, + ERROR, + NOTIFICATION, + WARNING, + DEBUG, + VERBOSE, + LAST_VALUE + } EN_LogLevel; + } + + // //////// Type definitions ///////// /** Define the capacity. <br>It is a double, as it allows for overbooking. */ typedef double ResourceCapacity_T; Modified: trunk/rmol/rmol/bom/BomAbstract.cpp =================================================================== --- trunk/rmol/rmol/bom/BomAbstract.cpp 2009-03-08 06:47:19 UTC (rev 173) +++ trunk/rmol/rmol/bom/BomAbstract.cpp 2009-03-08 17:51:26 UTC (rev 174) @@ -2,7 +2,7 @@ // Import section // ////////////////////////////////////////////////////////////////////// // RMOL -#include "BomAbstract.hpp" +#include <rmol/bom/BomAbstract.hpp> namespace RMOL { Modified: trunk/rmol/rmol/bom/BomAbstract.hpp =================================================================== --- trunk/rmol/rmol/bom/BomAbstract.hpp 2009-03-08 06:47:19 UTC (rev 173) +++ trunk/rmol/rmol/bom/BomAbstract.hpp 2009-03-08 17:51:26 UTC (rev 174) @@ -1,34 +1,50 @@ -#ifndef __RMOL_BOMABSTRACT_HPP -#define __RMOL_BOMABSTRACT_HPP +#ifndef __RMOL_BOM_BOMABSTRACT_HPP +#define __RMOL_BOM_BOMABSTRACT_HPP // ////////////////////////////////////////////////////////////////////// // Import section // ////////////////////////////////////////////////////////////////////// // STL -#include <iostream> +#include <istream> +#include <ostream> #include <sstream> +#include <string> namespace RMOL { /** Base class for the Business Object Model (BOM) layer. */ class BomAbstract { + friend class FacBomAbstract; public: - - /** Destructor. */ - virtual ~BomAbstract() {} - + // /////////// Display support methods ///////// /** Dump a Business Object into an output stream. @param ostream& the output stream. */ - virtual void toStream (std::ostream& ioOut) const {} + virtual void toStream (std::ostream& ioOut) const = 0; /** Read a Business Object from an input stream. @param istream& the input stream. */ - virtual void fromStream (std::istream& ioIn) {} + virtual void fromStream (std::istream& ioIn) = 0; + /** Get the serialised version of the Business Object. */ + virtual std::string toString() const = 0; + + /** Get a string describing the whole key (differentiating two objects + at any level). */ + virtual const std::string describeKey() const = 0; + + /** Get a string describing the short key (differentiating two objects + at the same level). */ + virtual const std::string describeShortKey() const = 0; + + protected: /** Protected Default Constructor to ensure this class is abtract. */ BomAbstract() {} - }; + BomAbstract(const BomAbstract&) {} + + /** Destructor. */ + virtual ~BomAbstract() {} + }; } /** @@ -74,4 +90,4 @@ return ioIn; } -#endif // __RMOL_BOMABSTRACT_HPP +#endif // __RMOL_BOM_BOMABSTRACT_HPP Modified: trunk/rmol/rmol/bom/Bucket.cpp =================================================================== --- trunk/rmol/rmol/bom/Bucket.cpp 2009-03-08 06:47:19 UTC (rev 173) +++ trunk/rmol/rmol/bom/Bucket.cpp 2009-03-08 17:51:26 UTC (rev 174) @@ -13,15 +13,16 @@ namespace RMOL { // ////////////////////////////////////////////////////////////////////// - Bucket::Bucket () : _yieldRange (), _demand (NULL), - _protection (0.0), _cumulatedProtection (0.0), - _bookingLimit (0.0), _cumulatedBookingLimit (0.0) { + Bucket::Bucket () + : _demand (NULL), + _yieldRange (), _protection (0.0), _cumulatedProtection (0.0), + _bookingLimit (0.0), _cumulatedBookingLimit (0.0) { } // ////////////////////////////////////////////////////////////////////// Bucket::Bucket (const Bucket& iBucket) : + _demand (&iBucket.getDemand()), _yieldRange (iBucket.getYieldRange()), - _demand (&iBucket.getDemand()), _protection (iBucket.getProtection()), _cumulatedProtection (iBucket.getCumulatedProtection()), _bookingLimit (iBucket.getBookingLimit()), @@ -30,8 +31,8 @@ // ////////////////////////////////////////////////////////////////////// Bucket::Bucket (const FldYieldRange& iYieldRange) : - _yieldRange (iYieldRange), _demand (NULL), - _protection (0.0), _cumulatedProtection (0.0), + _demand (NULL), + _yieldRange (iYieldRange), _protection (0.0), _cumulatedProtection (0.0), _bookingLimit (0.0), _cumulatedBookingLimit (0.0) { } @@ -40,21 +41,70 @@ } // ////////////////////////////////////////////////////////////////////// + const std::string Bucket::describeShortKey() const { + std::ostringstream oStr; + oStr << _yieldRange; + return oStr.str(); + } + + // ////////////////////////////////////////////////////////////////////// + const std::string Bucket::describeKey() const { + return describeShortKey(); + } + + // ////////////////////////////////////////////////////////////////////// + std::string Bucket::toString() const { + std::ostringstream oStr; + oStr << describeShortKey() << ", "; + const double pj = getUpperYield(); + const double mj = getMean(); + const double sj = getStandardDeviation(); + const double proj = getProtection(); + const double yj = getCumulatedProtection(); + const double bj = getCumulatedBookingLimit(); + oStr << std::fixed << std::setprecision (2) + << pj << "; " << mj << "; " << sj << "; " << proj << "; " << yj + << "; " << bj << std::endl; + + return oStr.str(); + } + + // ////////////////////////////////////////////////////////////////////// void Bucket::toStream (std::ostream& ioOut) const { + ioOut << toString(); + } + + // ////////////////////////////////////////////////////////////////////// + void Bucket::fromStream (std::istream& ioIn) { + } + + // ////////////////////////////////////////////////////////////////////// + const std::string Bucket::shortDisplay() const { + std::ostringstream oStr; + oStr << describeKey(); const double pj = getUpperYield(); const double mj = getMean(); const double sj = getStandardDeviation(); const double proj = getProtection(); const double yj = getCumulatedProtection(); + const double blj = getBookingLimit(); const double bj = getCumulatedBookingLimit(); - ioOut << std::fixed << std::setprecision (2) - << pj << "; " << mj << "; " << sj << "; " << proj << "; " << yj - << "; " << bj << std::endl; + oStr << std::fixed << std::setprecision (2) + << ", upper yield = " << pj << "; " + << ", mean = " << mj << "; " << ", std_dev = " << sj << "; " + << ", protection = " << proj << "; " + << ", cumulative protection = " << yj << "; " + << ", booking limit = " << blj + << ", cumulative booking limit = " << bj << std::endl; + + return oStr.str(); } // ////////////////////////////////////////////////////////////////////// - void Bucket::display () const { - toStream (std::cout); + const std::string Bucket::display() const { + std::ostringstream oStr; + oStr << shortDisplay(); + return oStr.str(); } // ////////////////////////////////////////////////////////////////////// Modified: trunk/rmol/rmol/bom/Bucket.hpp =================================================================== --- trunk/rmol/rmol/bom/Bucket.hpp 2009-03-08 06:47:19 UTC (rev 173) +++ trunk/rmol/rmol/bom/Bucket.hpp 2009-03-08 17:51:26 UTC (rev 174) @@ -52,7 +52,7 @@ friend class FacBucketHolder; public: - // Getters + // ///////// Getters //////// /** Getter for the yield range. */ const FldYieldRange& getYieldRange() const { return _yieldRange; @@ -73,32 +73,42 @@ double getBookingLimit() const { return _bookingLimit; } + /** Getter for the distribution parameters of the demand. */ const FldDistributionParameters& getDistributionParameters() const; + /** Getter for the demand mean. */ const double getMean() const; + /** Getter for the demand standard deviation. */ const double getStandardDeviation() const; + /** Getter for the upper yield. */ const double getUpperYield() const; + /** Getter for the average yield. */ const double getAverageYield() const; + /** Getter for the lower yield. */ const double getLowerYield() const; - // Setters + + // ///////// Setters //////// /** Setter for the protection. */ void setProtection (const double iProtection) { _protection = iProtection; } + /** Setter for the cumulated protection. */ void setCumulatedProtection (const double iProtection) { _cumulatedProtection = iProtection; } + /** Setter for the booking limit. */ void setBookingLimit (const double iBookingLimit) { _bookingLimit = iBookingLimit; } + /** Setter for the cumulated booking limit. */ void setCumulatedBookingLimit (const double iBookingLimit) { _cumulatedBookingLimit = iBookingLimit; @@ -113,34 +123,53 @@ /** Set the demand mean and standard deviation. */ void setDemandParameters (const double, const double); + public: + // ///////// Display methods //////// /** Dump a Business Object into an output stream. - @param ostream& the output stream - @return ostream& the output stream. */ - void toStream (std::ostream& ioOut) const; + @param ostream& the output stream. */ + void toStream (std::ostream&) const; - /** Display on standard output. */ - void display () const; + /** Read a Business Object from an input stream. + @param istream& the input stream. */ + void fromStream (std::istream&); - /** Destructors. */ - virtual ~Bucket(); + /** Get the serialised version of the Place object. */ + std::string toString() const; + /** Get a string describing the whole key (differentiating two objects + at any level). */ + const std::string describeKey() const; + + /** Get a string describing the short key (differentiating two objects + at the same level). */ + const std::string describeShortKey() const; + + /** Display the full Place context. */ + const std::string display() const; + + /** Display a short Place context. */ + const std::string shortDisplay() const; + + private: /** Constructors. <br>Protected to force the use of the Factory. */ Bucket (); Bucket (const Bucket&); Bucket (const FldYieldRange&); + /** Destructors. */ + virtual ~Bucket(); /** Getter for the demand. */ Demand& getDemand() const; private: - /** Yield range, defined by upper and average yield. */ - FldYieldRange _yieldRange; - /** Demand, defined by (mean, standard deviation) and yield range. */ Demand* _demand; + /** Yield range, defined by upper and average yield. */ + FldYieldRange _yieldRange; + /** Protection. */ double _protection; Modified: trunk/rmol/rmol/bom/BucketHolder.cpp =================================================================== --- trunk/rmol/rmol/bom/BucketHolder.cpp 2009-03-08 06:47:19 UTC (rev 173) +++ trunk/rmol/rmol/bom/BucketHolder.cpp 2009-03-08 17:51:26 UTC (rev 174) @@ -35,9 +35,50 @@ } // ////////////////////////////////////////////////////////////////////// + const std::string BucketHolder::describeShortKey() const { + std::ostringstream oStr; + oStr << _cabinCapacity; + return oStr.str(); + } + + // ////////////////////////////////////////////////////////////////////// + const std::string BucketHolder::describeKey() const { + return describeShortKey(); + } + + // ////////////////////////////////////////////////////////////////////// + std::string BucketHolder::toString() const { + std::ostringstream oStr; + oStr << describeShortKey() + << ", " << _totalMeanDemand + << ", " << _demandFactor << ", " << _optimalRevenue + << std::endl; + + return oStr.str(); + } + + // ////////////////////////////////////////////////////////////////////// void BucketHolder::toStream (std::ostream& ioOut) const { + ioOut << toString(); + } + + // ////////////////////////////////////////////////////////////////////// + void BucketHolder::fromStream (std::istream& ioIn) { + } + + // ////////////////////////////////////////////////////////////////////// + const std::string BucketHolder::shortDisplay() const { + std::ostringstream oStr; + oStr << describeKey(); + return oStr.str(); + } + + // ////////////////////////////////////////////////////////////////////// + const std::string BucketHolder::display() const { + std::ostringstream oStr; + oStr << shortDisplay(); // Generate a CSV (Comma Separated Values) output - ioOut << "Class; Price; Mean; Std Dev; Protection; Cum. Protection; Cum. Bkg Limit; " + oStr << "Class; Price; Mean; Std Dev; Protection; Cum. Protection; Cum. Bkg Limit; " << std::endl; BucketList_T::const_iterator itBucket = _bucketList.begin(); @@ -45,22 +86,17 @@ const Bucket* currentBucket_ptr = *itBucket; assert (currentBucket_ptr != NULL); - ioOut << j << "; " << *currentBucket_ptr; + oStr << j << "; " << currentBucket_ptr->display(); } - ioOut << "Cabin Capacity = " << _cabinCapacity - << "; Total Mean Demand = " << _totalMeanDemand - << "; Demand Factor = " << _demandFactor - << "; Optimal Revenue = " << _optimalRevenue << std::endl; - + oStr << "Cabin Capacity = " << _cabinCapacity + << "; Total Mean Demand = " << _totalMeanDemand + << "; Demand Factor = " << _demandFactor + << "; Optimal Revenue = " << _optimalRevenue << std::endl; + return oStr.str(); } // ////////////////////////////////////////////////////////////////////// - void BucketHolder::display () const { - toStream (std::cout); - } - - // ////////////////////////////////////////////////////////////////////// Bucket& BucketHolder::getCurrentBucket () const { Bucket* resultBucket_ptr = *_itCurrentBucket; assert (resultBucket_ptr != NULL); Modified: trunk/rmol/rmol/bom/BucketHolder.hpp =================================================================== --- trunk/rmol/rmol/bom/BucketHolder.hpp 2009-03-08 06:47:19 UTC (rev 173) +++ trunk/rmol/rmol/bom/BucketHolder.hpp 2009-03-08 17:51:26 UTC (rev 174) @@ -43,20 +43,9 @@ /** Get the size of list of buckets/classes. */ const short getSize () const; - /** Dump a Business Object into an output stream. - @param ostream& the output stream - @return ostream& the output stream. */ - void toStream (std::ostream& ioOut) const; - - /** Display on standard output. */ - void display () const; - /** Fill up the vector of cumulated booking limits. */ void fillup (BookingLimitVector_T&) const; - /** Destructor. */ - virtual ~BucketHolder(); - /** Get the current element (bucket/class). */ Bucket& getCurrentBucket () const; @@ -88,6 +77,34 @@ - the booking limits and cumulated booking limits. */ void recalculate (); + public: + // ///////// Display methods //////// + /** Dump a Business Object into an output stream. + @param ostream& the output stream. */ + void toStream (std::ostream&) const; + + /** Read a Business Object from an input stream. + @param istream& the input stream. */ + void fromStream (std::istream&); + + /** Get the serialised version of the Place object. */ + std::string toString() const; + + /** Get a string describing the whole key (differentiating two objects + at any level). */ + const std::string describeKey() const; + + /** Get a string describing the short key (differentiating two objects + at the same level). */ + const std::string describeShortKey() const; + + /** Display the full Place context. */ + const std::string display() const; + + /** Display a short Place context. */ + const std::string shortDisplay() const; + + private: /** Constructor. <br>Protected to force the use of the Factory. */ @@ -98,6 +115,10 @@ <br>Protected to force the use of the Factory. */ BucketHolder (const double iCabinCapacity); + /** Destructor. */ + virtual ~BucketHolder(); + + private: /** The capacity of the cabin associated to the bucket/class list. */ const double _cabinCapacity; Modified: trunk/rmol/rmol/bom/Demand.cpp =================================================================== --- trunk/rmol/rmol/bom/Demand.cpp 2009-03-08 06:47:19 UTC (rev 173) +++ trunk/rmol/rmol/bom/Demand.cpp 2009-03-08 17:51:26 UTC (rev 174) @@ -29,6 +29,51 @@ } // ////////////////////////////////////////////////////////////////////// + const std::string Demand::describeShortKey() const { + std::ostringstream oStr; + oStr << _yieldRange; + return oStr.str(); + } + + // ////////////////////////////////////////////////////////////////////// + const std::string Demand::describeKey() const { + return describeShortKey(); + } + + // ////////////////////////////////////////////////////////////////////// + std::string Demand::toString() const { + std::ostringstream oStr; + oStr << describeShortKey() << ", "; + oStr << _distributionParameters; + return oStr.str(); + } + + // ////////////////////////////////////////////////////////////////////// + void Demand::toStream (std::ostream& ioOut) const { + ioOut << toString(); + } + + // ////////////////////////////////////////////////////////////////////// + void Demand::fromStream (std::istream& ioIn) { + } + + // ////////////////////////////////////////////////////////////////////// + const std::string Demand::shortDisplay() const { + std::ostringstream oStr; + oStr << describeKey(); + oStr << ", distribution parameters = " << _distributionParameters + << std::endl; + return oStr.str(); + } + + // ////////////////////////////////////////////////////////////////////// + const std::string Demand::display() const { + std::ostringstream oStr; + oStr << shortDisplay(); + return oStr.str(); + } + + // ////////////////////////////////////////////////////////////////////// double Demand::getUpperYield() const { return _yieldRange.getUpperYield(); } Modified: trunk/rmol/rmol/bom/Demand.hpp =================================================================== --- trunk/rmol/rmol/bom/Demand.hpp 2009-03-08 06:47:19 UTC (rev 173) +++ trunk/rmol/rmol/bom/Demand.hpp 2009-03-08 17:51:26 UTC (rev 174) @@ -21,7 +21,7 @@ friend class FacDemand; public: - // Getters + // ///////// Getters //////// /** Getter for the demand distribution parmaters (i.e., mean and standard deviation). */ const FldDistributionParameters& getDistributionParameters() const { @@ -31,35 +31,69 @@ const FldYieldRange& getYieldRange() const { return _yieldRange; } + /** Getter for the upper yield of the range. */ double getUpperYield() const; + /** Getter for the average yield of the range. */ double getAverageYield() const; + /** Getter for the lower yield of the range. */ double getLowerYield(); + /** Getter for the mean value. */ double getMean() const; + /** Getter for the standard deviation value. */ double getStandardDeviation() const; + /** Getter for the variance value. */ double getVariance() const; - // Setters + + // ///////// Setters //////// /** Set the mean value. */ void setMean (const double); /** set the standard deviation. */ void setSD (const double); + - /** Destructors. */ - virtual ~Demand(); + public: + // ///////// Display methods //////// + /** Dump a Business Object into an output stream. + @param ostream& the output stream. */ + void toStream (std::ostream&) const; + + /** Read a Business Object from an input stream. + @param istream& the input stream. */ + void fromStream (std::istream&); + + /** Get the serialised version of the Place object. */ + std::string toString() const; + + /** Get a string describing the whole key (differentiating two objects + at any level). */ + const std::string describeKey() const; + + /** Get a string describing the short key (differentiating two objects + at the same level). */ + const std::string describeShortKey() const; + /** Display the full Place context. */ + const std::string display() const; + + /** Display a short Place context. */ + const std::string shortDisplay() const; + private: /** Constructors. <br>Protected to force the use of the Factory. */ Demand (); Demand (const Demand&); Demand (const FldDistributionParameters&, const FldYieldRange&); + /** Destructors. */ + ~Demand(); private: /** Yield range, i.e., upper and lower yields, as well as average yield Modified: trunk/rmol/rmol/bom/Overbooking.cpp =================================================================== --- trunk/rmol/rmol/bom/Overbooking.cpp 2009-03-08 06:47:19 UTC (rev 173) +++ trunk/rmol/rmol/bom/Overbooking.cpp 2009-03-08 17:51:26 UTC (rev 174) @@ -70,7 +70,68 @@ Overbooking::~Overbooking() { } + // ////////////////////////////////////////////////////////////////////// + const std::string Overbooking::describeShortKey() const { + std::ostringstream oStr; + oStr << _policy; + return oStr.str(); + } + + // ////////////////////////////////////////////////////////////////////// + const std::string Overbooking::describeKey() const { + return describeShortKey(); + } + // ////////////////////////////////////////////////////////////////////// + std::string Overbooking::toString() const { + std::ostringstream oStr; + oStr << describeShortKey() + << ", " << _policy << ", " << _overbookingPercentage + << ", " << _capacity << ", " << _netBookings + << ", " << _loadFactor + << ", " << _noShowDistributionParameters + << ", " << _cancellationDistributionParameters + << ", " << _remainingCancellationDistributionParameters + << ", " << _demandDistributionParameters + << std::endl; + + return oStr.str(); + } + + // ////////////////////////////////////////////////////////////////////// + void Overbooking::toStream (std::ostream& ioOut) const { + ioOut << toString(); + } + + // ////////////////////////////////////////////////////////////////////// + void Overbooking::fromStream (std::istream& ioIn) { + } + + // ////////////////////////////////////////////////////////////////////// + const std::string Overbooking::shortDisplay() const { + std::ostringstream oStr; + oStr << describeKey(); + return oStr.str(); + } + + // ////////////////////////////////////////////////////////////////////// + const std::string Overbooking::display() const { + std::ostringstream oStr; + oStr << shortDisplay(); + oStr << "Policy = " << _policy + << "; OB% = " << _overbookingPercentage + << "; Capacity = " << _capacity + << "; Net Bookings = " << _netBookings + << "; Load Factor (LF) = " << _loadFactor + << "; No-Show Distrib. Params = " << _noShowDistributionParameters + << "; Cx Distrib. Params = " << _cancellationDistributionParameters + << "; Rem. Cx Distrib. Params = " << _remainingCancellationDistributionParameters + << "; Demand Distrib. Params = " << _demandDistributionParameters + << std::endl; + return oStr.str(); + } + + // ////////////// TODO: REMOVE THOSE CONSTANTS ////////// //Parameters given by RMS User , for the prototype we set at //predefined values Modified: trunk/rmol/rmol/bom/Overbooking.hpp =================================================================== --- trunk/rmol/rmol/bom/Overbooking.hpp 2009-03-08 06:47:19 UTC (rev 173) +++ trunk/rmol/rmol/bom/Overbooking.hpp 2009-03-08 17:51:26 UTC (rev 174) @@ -24,9 +24,6 @@ friend class FacOverbooking; public: - /** Destructor. */ - virtual ~Overbooking(); - // ///////// Getters ///////// /** Get the overbooking calculation policy. */ const FldOverbookingPolicy& getPolicy () const { @@ -53,6 +50,7 @@ return _netBookings; } + /** Get the No-Show Distribution Parameters. */ FldDistributionParameters getNoShowDistributionParameters () const { return _noShowDistributionParameters; @@ -116,24 +114,57 @@ } /** Set the net bookings. */ - void getNetBookings (const unsigned int iNetBookings) { + void setNetBookings (const unsigned int iNetBookings) { _netBookings = iNetBookings; } - + // /////////// /** This function return the OB% with its standard deviation following the given choice of method*/ FldDistributionParameters getOverbookingCalculation () const; + /** This function calculates the OB% by the heuristic method */ FldDistributionParameters calculateHeuristic() const; + /** This function calculates the OB% by the cost-based method */ FldDistributionParameters calculateRiskBased() const; + /** This function calculates the OB% by the service level policies */ FldDistributionParameters calculateServiceLevel() const; + /** This function calculates the OB% by the Hybrid policy*/ FldDistributionParameters calculateHybridPolicy() const; + + public: + // ///////// Display methods //////// + /** Dump a Business Object into an output stream. + @param ostream& the output stream. */ + void toStream (std::ostream&) const; + + /** Read a Business Object from an input stream. + @param istream& the input stream. */ + void fromStream (std::istream&); + + /** Get the serialised version of the Place object. */ + std::string toString() const; + + /** Get a string describing the whole key (differentiating two objects + at any level). */ + const std::string describeKey() const; + + /** Get a string describing the short key (differentiating two objects + at the same level). */ + const std::string describeShortKey() const; + + /** Display the full Place context. */ + const std::string display() const; + + /** Display a short Place context. */ + const std::string shortDisplay() const; + + private: /** Constructors. <br>Protected to force the use of the Factory. */ @@ -141,19 +172,29 @@ Overbooking (const Overbooking&); Overbooking (const FldOverbookingPolicy&); - /** */ + /** Destructor. */ + virtual ~Overbooking(); + + + private: + /** Calculate the booking limit. */ double calculateBookingLimit () const; - /** */ + + /** Calculate the normal probability. */ double probabilityNormal (const int, const double, const double) const; - /** */ + + /** Calculate the binomial probability. */ double binomialProbability_F_b_s (const double, const int, const int) const; - /** */ + /** Calculate the first service level. */ double serviceLevel1 (const double, const int, const int) const; - /** */ + + /** Calculate the fraction of service level 2. */ double fractionServiceLevel2 (const double , const int , const int) const; + private: + // /////// Attributes ////////// /** Overbooking Calculation Policy. */ FldOverbookingPolicy _policy; Modified: trunk/rmol/rmol/bom/PartialSumHolder.cpp =================================================================== --- trunk/rmol/rmol/bom/PartialSumHolder.cpp 2009-03-08 06:47:19 UTC (rev 173) +++ trunk/rmol/rmol/bom/PartialSumHolder.cpp 2009-03-08 17:51:26 UTC (rev 174) @@ -26,24 +26,55 @@ } // ////////////////////////////////////////////////////////////////////// + const std::string PartialSumHolder::describeShortKey() const { + std::ostringstream oStr; + return oStr.str(); + } + + // ////////////////////////////////////////////////////////////////////// + const std::string PartialSumHolder::describeKey() const { + return describeShortKey(); + } + + // ////////////////////////////////////////////////////////////////////// + std::string PartialSumHolder::toString() const { + std::ostringstream oStr; + oStr << _partialSumList.size(); + return oStr.str(); + } + + // ////////////////////////////////////////////////////////////////////// void PartialSumHolder::toStream (std::ostream& ioOut) const { + ioOut << toString(); + } + + // ////////////////////////////////////////////////////////////////////// + void PartialSumHolder::fromStream (std::istream& ioIn) { + } + + // ////////////////////////////////////////////////////////////////////// + const std::string PartialSumHolder::shortDisplay() const { + std::ostringstream oStr; + oStr << describeKey(); // Generate a CSV (Comma Separated Values) output - ioOut << "Partial Sum (K = " << _partialSumList.size() << "); " - << std::endl; + oStr << "Partial Sum (K = " << _partialSumList.size() << ")" << std::endl; + return oStr.str(); + } + + // ////////////////////////////////////////////////////////////////////// + const std::string PartialSumHolder::display() const { + std::ostringstream oStr; + oStr << shortDisplay(); PartialSumList_T::const_iterator itPartialSum = _partialSumList.begin(); for (short k=1; itPartialSum != _partialSumList.end(); itPartialSum++,k++){ const double currentPartialSum = *itPartialSum; - ioOut << k << "; " << currentPartialSum; + oStr << k << "; " << currentPartialSum; } + return oStr.str(); } // ////////////////////////////////////////////////////////////////////// - void PartialSumHolder::display () const { - toStream (std::cout); - } - - // ////////////////////////////////////////////////////////////////////// void PartialSumHolder::initSize (const int K) { _partialSumList.reserve (K); } Modified: trunk/rmol/rmol/bom/PartialSumHolder.hpp =================================================================== --- trunk/rmol/rmol/bom/PartialSumHolder.hpp 2009-03-08 06:47:19 UTC (rev 173) +++ trunk/rmol/rmol/bom/PartialSumHolder.hpp 2009-03-08 17:51:26 UTC (rev 174) @@ -21,12 +21,13 @@ friend class FacPartialSumHolder; public: + // ///////// Getters ///////// + /** Get the k-th element (partial sum). */ + const double getPartialSum (const int k) const; + /** Reserve the space for K elements (partial sums). */ void initSize (const int K); - /** Get the k-th element (partial sum). */ - const double getPartialSum (const int k) const; - /** Add an element (partial sum). */ void addPartialSum (const double iPartialSum); @@ -35,22 +36,45 @@ complexity of O (N log N): http://www.sgi.com/tech/stl/sort.html . */ void sort (); + public: + // ///////// Display methods //////// /** Dump a Business Object into an output stream. - @param ostream& the output stream - @return ostream& the output stream. */ - void toStream (std::ostream& ioOut) const; + @param ostream& the output stream. */ + void toStream (std::ostream&) const; - /** Display on standard output. */ - void display () const; + /** Read a Business Object from an input stream. + @param istream& the input stream. */ + void fromStream (std::istream&); - /** Destructor. */ - virtual ~PartialSumHolder(); + /** Get the serialised version of the Place object. */ + std::string toString() const; + /** Get a string describing the whole key (differentiating two objects + at any level). */ + const std::string describeKey() const; + + /** Get a string describing the short key (differentiating two objects + at the same level). */ + const std::string describeShortKey() const; + + /** Display the full Place context. */ + const std::string display() const; + + /** Display a short Place context. */ + const std::string shortDisplay() const; + + private: /** Constructors. */ PartialSumHolder (); PartialSumHolder (const PartialSumHolder&); + /** Destructor. */ + virtual ~PartialSumHolder(); + + + private: + // ///////// Attributes ///////// /** The vector of (K) partial sums. */ PartialSumList_T _partialSumList; }; Modified: trunk/rmol/rmol/bom/PartialSumHolderHolder.cpp =================================================================== --- trunk/rmol/rmol/bom/PartialSumHolderHolder.cpp 2009-03-08 06:47:19 UTC (rev 173) +++ trunk/rmol/rmol/bom/PartialSumHolderHolder.cpp 2009-03-08 17:51:26 UTC (rev 174) @@ -4,7 +4,8 @@ // C #include <assert.h> // STL -#include <iostream> +#include <istream> +#include <ostream> // RMOL #include <rmol/bom/PartialSumHolder.hpp> #include <rmol/bom/PartialSumHolderHolder.hpp> @@ -21,36 +22,65 @@ } // ////////////////////////////////////////////////////////////////////// - const short PartialSumHolderHolder::getSize () const { - return _partialSumHolderList.size(); + const std::string PartialSumHolderHolder::describeShortKey() const { + std::ostringstream oStr; + return oStr.str(); } + + // ////////////////////////////////////////////////////////////////////// + const std::string PartialSumHolderHolder::describeKey() const { + return describeShortKey(); + } // ////////////////////////////////////////////////////////////////////// + std::string PartialSumHolderHolder::toString() const { + std::ostringstream oStr; + return oStr.str(); + } + + // ////////////////////////////////////////////////////////////////////// void PartialSumHolderHolder::toStream (std::ostream& ioOut) const { + ioOut << toString(); + } + + // ////////////////////////////////////////////////////////////////////// + void PartialSumHolderHolder::fromStream (std::istream& ioIn) { + } + + // ////////////////////////////////////////////////////////////////////// + const std::string PartialSumHolderHolder::shortDisplay() const { + std::ostringstream oStr; + oStr << describeKey(); + return oStr.str(); + } + + // ////////////////////////////////////////////////////////////////////// + const std::string PartialSumHolderHolder::display() const { + std::ostringstream oStr; + oStr << shortDisplay(); + PartialSumHolderList_T::const_iterator itPartialSumHolder = _partialSumHolderList.begin(); - for (short j=1; itPartialSumHolder != _partialSumHolderList.end(); - itPartialSumHolder++, j++) { - const PartialSumHolder* currentPartialSumHolder_ptr = - *itPartialSumHolder; + for (short j = 1; itPartialSumHolder != _partialSumHolderList.end(); + itPartialSumHolder++, j++) { + const PartialSumHolder* currentPartialSumHolder_ptr = *itPartialSumHolder; assert (currentPartialSumHolder_ptr != NULL); - - ioOut << j << "; " << (*currentPartialSumHolder_ptr); + + oStr << j << "; " << currentPartialSumHolder_ptr->display(); } + return oStr.str(); } // ////////////////////////////////////////////////////////////////////// - void PartialSumHolderHolder::display () const { - toStream (std::cout); + const short PartialSumHolderHolder::getSize () const { + return _partialSumHolderList.size(); } // ////////////////////////////////////////////////////////////////////// PartialSumHolder& PartialSumHolderHolder:: getPreviousPartialSumHolder () const { - PartialSumHolder* resultPartialSumHolder_ptr = - *_itPreviousPartialSumHolder; + PartialSumHolder* resultPartialSumHolder_ptr= *_itPreviousPartialSumHolder; assert (resultPartialSumHolder_ptr != NULL); - return (*resultPartialSumHolder_ptr); } @@ -59,7 +89,6 @@ getCurrentPartialSumHolder () const { PartialSumHolder* resultPartialSumHolder_ptr = *_itCurrentPartialSumHolder; assert (resultPartialSumHolder_ptr != NULL); - return (*resultPartialSumHolder_ptr); } Modified: trunk/rmol/rmol/bom/PartialSumHolderHolder.hpp =================================================================== --- trunk/rmol/rmol/bom/PartialSumHolderHolder.hpp 2009-03-08 06:47:19 UTC (rev 173) +++ trunk/rmol/rmol/bom/PartialSumHolderHolder.hpp 2009-03-08 17:51:26 UTC (rev 174) @@ -21,21 +21,11 @@ friend class FacPartialSumHolderHolder; public: + // ///////// Getters ///////// /** Get the size of the internal list (i.e., number of partial sum lists). */ const short getSize () const; - /** Dump a Business Object into an output stream. - @param ostream& the output stream - @return ostream& the output stream. */ - void toStream (std::ostream& ioOut) const; - - /** Display on standard output. */ - void display () const; - - /** Destructor. */ - virtual ~PartialSumHolderHolder(); - /** Get the previous element (partial sum holder/list). */ PartialSumHolder& getPreviousPartialSumHolder () const; @@ -55,19 +45,54 @@ list has been reached. */ bool hasNotReachedEnd () const; + public: + // ///////// Display methods //////// + /** Dump a Business Object into an output stream. + @param ostream& the output stream. */ + void toStream (std::ostream&) const; + + /** Read a Business Object from an input stream. + @param istream& the input stream. */ + void fromStream (std::istream&); + + /** Get the serialised version of the Place object. */ + std::string toString() const; + + /** Get a string describing the whole key (differentiating two objects + at any level). */ + const std::string describeKey() const; + + /** Get a string describing the short key (differentiating two objects + at the same level). */ + const std::string describeShortKey() const; + + /** Display the full Place context. */ + const std::string display() const; + + /** Display a short Place context. */ + const std::string shortDisplay() const; + + private: /** Constructors. */ PartialSumHolderHolder(); /** Reserve the space for iSize elements (partial sum holders). */ PartialSumHolderHolder (const int iSize); + /** Destructor. */ + virtual ~PartialSumHolderHolder(); + + + private: /** Add an element (partial sum holder/list). <br>Note that the Bucket object may be altered by subsequent operations. <br>Protected to force the use of the Factory. */ void addPartialSumHolder (PartialSumHolder&); + private: + // //////// Attributes ///////// /** The vector of (K) partial sums. */ PartialSumHolderList_T _partialSumHolderList; Deleted: trunk/rmol/rmol/factory/FacAbstract.cpp =================================================================== --- trunk/rmol/rmol/factory/FacAbstract.cpp 2009-03-08 06:47:19 UTC (rev 173) +++ trunk/rmol/rmol/factory/FacAbstract.cpp 2009-03-08 17:51:26 UTC (rev 174) @@ -1,31 +0,0 @@ -// ////////////////////////////////////////////////////////////////////// -// Import section -// ////////////////////////////////////////////////////////////////////// -// C -#include <assert.h> -// RMOL -#include <rmol/bom/BomAbstract.hpp> -#include <rmol/factory/FacAbstract.hpp> - -namespace RMOL { - - // ////////////////////////////////////////////////////////////////////// - FacAbstract::~FacAbstract() { - clean (); - } - - // ////////////////////////////////////////////////////////////////////// - void FacAbstract::clean() { - for (BomPool_T::iterator itBom = _pool.begin(); - itBom != _pool.end(); itBom++) { - BomAbstract* currentBom_ptr = *itBom; - assert (currentBom_ptr != NULL); - - delete (currentBom_ptr); currentBom_ptr = NULL; - } - - // Empty the pool of Factories - _pool.clear(); - } - -} Deleted: trunk/rmol/rmol/factory/FacAbstract.hpp =================================================================== --- trunk/rmol/rmol/factory/FacAbstract.hpp 2009-03-08 06:47:19 UTC (rev 173) +++ trunk/rmol/rmol/factory/FacAbstract.hpp 2009-03-08 17:51:26 UTC (rev 174) @@ -1,37 +0,0 @@ -#ifndef __RMOL_FAC_FACABSTRACT_HPP -#define __RMOL_FAC_FACABSTRACT_HPP - -// ////////////////////////////////////////////////////////////////////// -// Import section -// ////////////////////////////////////////////////////////////////////// -// STL -#include <vector> - -namespace RMOL { - - // Forward declarations - class BomAbstract; - - /** Base class for Factory layer. */ - class FacAbstract { - public: - - /** Define the list (pool) of Bom objects. */ - typedef std::vector<BomAbstract*> BomPool_T; - - /** Destructor. */ - virtual ~FacAbstract(); - - /** Destroyed all the object instantiated by this factory. */ - void clean(); - - protected: - /** Default Constructor. - <br>This constructor is protected to ensure the class is abstract. */ - FacAbstract() {} - - /** List of instantiated Business Objects*/ - BomPool_T _pool; - }; -} -#endif // __RMOL_FAC_FACABSTRACT_HPP Copied: trunk/rmol/rmol/factory/FacBomAbstract.cpp (from rev 168, trunk/rmol/rmol/factory/FacAbstract.cpp) =================================================================== --- trunk/rmol/rmol/factory/FacBomAbstract.cpp (rev 0) +++ trunk/rmol/rmol/factory/FacBomAbstract.cpp 2009-03-08 17:51:26 UTC (rev 174) @@ -0,0 +1,31 @@ +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// C +#include <assert.h> +// RMOL +#include <rmol/bom/BomAbstract.hpp> +#include <rmol/factory/FacBomAbstract.hpp> + +namespace RMOL { + + // ////////////////////////////////////////////////////////////////////// + FacBomAbstract::~FacBomAbstract() { + clean (); + } + + // ////////////////////////////////////////////////////////////////////// + void FacBomAbstract::clean() { + for (BomPool_T::iterator itBom = _pool.begin(); + itBom != _pool.end(); itBom++) { + BomAbstract* currentBom_ptr = *itBom; + assert (currentBom_ptr != NULL); + + delete (currentBom_ptr); currentBom_ptr = NULL; + } + + // Empty the pool of Factories + _pool.clear(); + } + +} Property changes on: trunk/rmol/rmol/factory/FacBomAbstract.cpp ___________________________________________________________________ Added: svn:mergeinfo + Copied: trunk/rmol/rmol/factory/FacBomAbstract.hpp (from rev 168, trunk/rmol/rmol/factory/FacAbstract.hpp) =================================================================== --- trunk/rmol/rmol/factory/FacBomAbstract.hpp (rev 0) +++ trunk/rmol/rmol/factory/FacBomAbstract.hpp 2009-03-08 17:51:26 UTC (rev 174) @@ -0,0 +1,37 @@ +#ifndef __RMOL_FAC_FACBOMABSTRACT_HPP +#define __RMOL_FAC_FACBOMABSTRACT_HPP + +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// STL +#include <vector> + +namespace RMOL { + + // Forward declarations + class BomAbstract; + + /** Base class for Factory layer. */ + class FacBomAbstract { + public: + + /** Define the list (pool) of Bom objects. */ + typedef std::vector<BomAbstract*> BomPool_T; + + /** Destructor. */ + virtual ~FacBomAbstract(); + + /** Destroyed all the object instantiated by this factory. */ + void clean(); + + protected: + /** Default Constructor. + <br>This constructor is protected to ensure the class is abstract. */ + FacBomAbstract() {} + + /** List of instantiated Business Objects*/ + BomPool_T _pool; + }; +} +#endif // __RMOL_FAC_FACBOMABSTRACT_HPP Property changes on: trunk/rmol/rmol/factory/FacBomAbstract.hpp ___________________________________________________________________ Added: svn:mergeinfo + Modified: trunk/rmol/rmol/factory/FacBucket.hpp =================================================================== --- trunk/rmol/rmol/factory/FacBucket.hpp 2009-03-08 06:47:19 UTC (rev 173) +++ trunk/rmol/rmol/factory/FacBucket.hpp 2009-03-08 17:51:26 UTC (rev 174) @@ -5,7 +5,7 @@ // Import section // ////////////////////////////////////////////////////////////////////// // RMOL -#include <rmol/factory/FacAbstract.hpp> +#include <rmol/factory/FacBomAbstract.hpp> namespace RMOL { @@ -15,7 +15,7 @@ class Demand; /** Factory for Bucket. */ - class FacBucket : public FacAbstract { + class FacBucket : public FacBomAbstract { public: /** Provide the unique instance. Modified: trunk/rmol/rmol/factory/FacBucketHolder.hpp =================================================================== --- trunk/rmol/rmol/factory/FacBucketHolder.hpp 2009-03-08 06:47:19 UTC (rev 173) +++ trunk/rmol/rmol/factory/FacBucketHolder.hpp 2009-03-08 17:51:26 UTC (rev 174) @@ -5,7 +5,7 @@ // Import section // ////////////////////////////////////////////////////////////////////// // RMOL -#include <rmol/factory/FacAbstract.hpp> +#include <rmol/factory/FacBomAbstract.hpp> namespace RMOL { @@ -14,7 +14,7 @@ class Bucket; /** Factory for Bucket. */ - class FacBucketHolder : public FacAbstract { + class FacBucketHolder : public FacBomAbstract { public: /** Provide the unique instance. Modified: trunk/rmol/rmol/factory/FacDemand.hpp =================================================================== --- trunk/rmol/rmol/factory/FacDemand.hpp 2009-03-08 06:47:19 UTC (rev 173) +++ trunk/rmol/rmol/factory/FacDemand.hpp 2009-03-08 17:51:26 UTC (rev 174) @@ -5,7 +5,7 @@ // Import section // ////////////////////////////////////////////////////////////////////// // RMOL -#include <rmol/factory/FacAbstract.hpp> +#include <rmol/factory/FacBomAbstract.hpp> namespace RMOL { @@ -15,7 +15,7 @@ class Demand; /** Factory for Demand. */ - class FacDemand : public FacAbstract { + class FacDemand : public FacBomAbstract { public: /** Provide the unique instance. Modified: trunk/rmol/rmol/factory/FacOverbooking.hpp =================================================================== --- trunk/rmol/rmol/factory/FacOverbooking.hpp 2009-03-08 06:47:19 UTC (rev 173) +++ trunk/rmol/rmol/factory/FacOverbooking.hpp 2009-03-08 17:51:26 UTC (rev 174) @@ -5,7 +5,7 @@ // Import section // ////////////////////////////////////////////////////////////////////// // RMOL -#include <rmol/factory/FacAbstract.hpp> +#include <rmol/factory/FacBomAbstract.hpp> namespace RMOL { @@ -14,7 +14,7 @@ class Overbooking; /** Factory for Overbooking. */ - class FacOverbooking : public FacAbstract { + class FacOverbooking : public FacBomAbstract { public: /** Provide the unique instance. Modified: trunk/rmol/rmol/factory/FacPartialSumHolder.hpp =================================================================== --- trunk/rmol/rmol/factory/FacPartialSumHolder.hpp 2009-03-08 06:47:19 UTC (rev 173) +++ trunk/rmol/rmol/factory/FacPartialSumHolder.hpp 2009-03-08 17:51:26 UTC (rev 174) @@ -5,7 +5,7 @@ // Import section // ////////////////////////////////////////////////////////////////////// // RMOL -#include <rm... [truncated message content] |
From: <den...@us...> - 2009-03-08 23:15:49
|
Revision: 177 http://rmol.svn.sourceforge.net/rmol/?rev=177&view=rev Author: denis_arnaud Date: 2009-03-08 23:15:40 +0000 (Sun, 08 Mar 2009) Log Message: ----------- [Build-RPM-F10] Corrected the RPM specification file according to review request (https://bugzilla.redhat.com/show_bug.cgi?id=489233). Modified Paths: -------------- trunk/rmol/COPYING trunk/rmol/configure.ac trunk/rmol/rmol.spec.in Modified: trunk/rmol/COPYING =================================================================== --- trunk/rmol/COPYING 2009-03-08 21:23:17 UTC (rev 176) +++ trunk/rmol/COPYING 2009-03-08 23:15:40 UTC (rev 177) @@ -501,3 +501,4 @@ That's all there is to it! +Source: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html Modified: trunk/rmol/configure.ac =================================================================== --- trunk/rmol/configure.ac 2009-03-08 21:23:17 UTC (rev 176) +++ trunk/rmol/configure.ac 2009-03-08 23:15:40 UTC (rev 177) @@ -11,7 +11,7 @@ AM_CONDITIONAL([HAVE_CPPUNIT], [test "x$CPPUNIT_LIBS" != x]) # RPM release number -RPM_RELEASE="0.dev.1" +RPM_RELEASE="1" AC_SUBST(RPM_RELEASE) # Shared library versioning Modified: trunk/rmol/rmol.spec.in =================================================================== --- trunk/rmol/rmol.spec.in 2009-03-08 21:23:17 UTC (rev 176) +++ trunk/rmol/rmol.spec.in 2009-03-08 23:15:40 UTC (rev 177) @@ -1,18 +1,12 @@ # -%define version @VERSION@ -%define release @RPM_RELEASE@ - -# Name: @PACKAGE@ -Version: %{version} -Release: %{release} -Vendor: The RMOL Team -Distribution: Research Software +Version: @VERSION@ +Release: @RPM_RELEASE@%{?dist} Summary: @PACKAGE_NAME@ is a C++ library of Revenue Management and Optimisation classes and functions. Group: System Environment/Libraries -License: LGPL +License: LGPLv2 URL: http://%{name}.sourceforge.net Source0: http://download.sourceforge.net/%{name}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -114,5 +108,7 @@ %doc %{_docdir}/%{name}-%{version} %changelog +* Sun Mar 8 2009 Denis Arnaud <den...@m4...> @RPM_RELEASE@ +- RPM release for Fedora 10 * Wed Mar 4 2009 Denis Arnaud <den...@m4...> @RPM_RELEASE@ - Second RPM release This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <qua...@us...> - 2009-03-20 16:09:15
|
Revision: 178 http://rmol.svn.sourceforge.net/rmol/?rev=178&view=rev Author: quannaus Date: 2009-03-20 16:09:10 +0000 (Fri, 20 Mar 2009) Log Message: ----------- Update the booking limit vector for EMSR method. Modified Paths: -------------- trunk/rmol/rmol/RMOL_Service.hpp trunk/rmol/rmol/service/RMOL_Service.cpp trunk/rmol/test/sample2.csv Modified: trunk/rmol/rmol/RMOL_Service.hpp =================================================================== --- trunk/rmol/rmol/RMOL_Service.hpp 2009-03-08 23:15:40 UTC (rev 177) +++ trunk/rmol/rmol/RMOL_Service.hpp 2009-03-20 16:09:10 UTC (rev 178) @@ -49,8 +49,8 @@ void heuristicOptimisationByEmsr (); /** Single resource optimization that uses EMSR heuristic and - returns a vector of cumulated booking limits. */ - void heuristicOptimisationByEmsr (BookingLimitVector_T&); + returns a bid-price vector and a vector of cumulated booking limits. */ + void heuristicOptimisationByEmsr (BidPriceVector_T&, BookingLimitVector_T&); /** Single resource optimization using EMSR-a heuristic. */ void heuristicOptimisationByEmsrA (); Modified: trunk/rmol/rmol/service/RMOL_Service.cpp =================================================================== --- trunk/rmol/rmol/service/RMOL_Service.cpp 2009-03-08 23:15:40 UTC (rev 177) +++ trunk/rmol/rmol/service/RMOL_Service.cpp 2009-03-20 16:09:10 UTC (rev 178) @@ -92,8 +92,8 @@ // ////////////////////////////////////////////////////////////////////// void RMOL_Service:: - optimalOptimisationByMCIntegration (const int K, - BookingLimitVector_T& ioBookingLimitVector) { + optimalOptimisationByMCIntegration(const int K, + BookingLimitVector_T& ioBookingLimitVector){ assert (_rmolServiceContext != NULL); const double iCapacity = _rmolServiceContext->getCapacity(); @@ -163,7 +163,8 @@ // ////////////////////////////////////////////////////////////////////// void RMOL_Service:: - heuristicOptimisationByEmsr (BidPriceVector_T& ioBidPriceVector) { + heuristicOptimisationByEmsr (BidPriceVector_T& ioBidPriceVector, + BookingLimitVector_T& ioBookingLimitVector) { assert (_rmolServiceContext != NULL); const double iCapacity = _rmolServiceContext->getCapacity(); BucketHolder* ioBucketHolder_ptr = _rmolServiceContext->getBucketHolder(); @@ -171,6 +172,15 @@ Optimiser::heuristicOptimisationByEmsr (iCapacity, *ioBucketHolder_ptr, ioBidPriceVector); + + // Update the booking limit vector. + for (ioBucketHolder_ptr->begin(); ioBucketHolder_ptr->hasNotReachedEnd(); + ioBucketHolder_ptr->iterate()) { + Bucket& currentBucket = ioBucketHolder_ptr->getCurrentBucket(); + const double lBookingLimit = currentBucket.getCumulatedBookingLimit(); + ioBookingLimitVector.push_back (lBookingLimit); + } + } // ////////////////////////////////////////////////////////////////////// Modified: trunk/rmol/test/sample2.csv =================================================================== --- trunk/rmol/test/sample2.csv 2009-03-08 23:15:40 UTC (rev 177) +++ trunk/rmol/test/sample2.csv 2009-03-20 16:09:10 UTC (rev 178) @@ -1,5 +1,6 @@ -price; mean; standard deviation; -1050; 17.3; 5.8; -567; 45.1; 15.0; -534; 39.6; 13.2; -520; 34.0; 11.3; +../../rmol/service/RMOL_Service.cpp:90: 500Class; Price; Mean; Std Dev; Protection; Cum. Protection; Cum. Bkg Limit; +1; 100([2.22507e-308, 100]), upper yield = 100.00; , mean = 20.00; , std_dev = 9.00; , protection = 15.23; , cumulative protection = 15.23; , booking limit = 0.00, cumulative booking limit = 500.00 +2; 70([2.22507e-308, 70]), upper yield = 70.00; , mean = 45.00; , std_dev = 12.00; , protection = 50.57; , cumulative protection = 65.80; , booking limit = 0.00, cumulative booking limit = 484.77 +3; 42([2.22507e-308, 42]), upper yield = 42.00; , mean = 0.00; , std_dev = 0.00; , protection = 434.20; , cumulative protection = 500.00; , booking limit = 0.00, cumulative booking limit = 434.20 +Cabin Capacity = 500; Total Mean Demand = 65; Demand Factor = 0.13; Optimal Revenue = 23299.5 + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <den...@us...> - 2009-03-20 17:03:11
|
Revision: 179 http://rmol.svn.sourceforge.net/rmol/?rev=179&view=rev Author: denis_arnaud Date: 2009-03-20 17:03:01 +0000 (Fri, 20 Mar 2009) Log Message: ----------- Update the number of the version and the README. Modified Paths: -------------- trunk/rmol/README trunk/rmol/configure.ac Modified: trunk/rmol/README =================================================================== --- trunk/rmol/README 2009-03-20 16:09:10 UTC (rev 178) +++ trunk/rmol/README 2009-03-20 17:03:01 UTC (rev 179) @@ -21,7 +21,7 @@ http://sourceforge.net/project/showfiles.php?group_id=177703 Then, as usual, you can just type the following sequence: -"./configure --prefix=~/dev/deliveries/rmol-0.15 && make && make check && cd test && ./testLibsh" +"./configure --prefix=/projects/sim/deliveries/rmol-0.19.0 && make && make check && cd test && ./testLibsh" Of course, if you want to install the library (librmol*.so*), just type: "make install". Modified: trunk/rmol/configure.ac =================================================================== --- trunk/rmol/configure.ac 2009-03-20 16:09:10 UTC (rev 178) +++ trunk/rmol/configure.ac 2009-03-20 17:03:01 UTC (rev 179) @@ -2,7 +2,7 @@ #------------------------------------------------------------------- AC_PREREQ(2.59) AC_COPYRIGHT([Copyright (C) 2007-2009 Denis Arnaud <den...@us...>]) -AC_INIT([RMOL],[0.18.0],[den...@us...],[rmol]) +AC_INIT([RMOL],[0.19.0],[den...@us...],[rmol]) AC_CONFIG_HEADER([rmol/config.h]) AC_CONFIG_SRCDIR([rmol/basic/BasConst.cpp]) AC_CONFIG_AUX_DIR([config]) @@ -15,7 +15,7 @@ AC_SUBST(RPM_RELEASE) # Shared library versioning -GENERIC_LIBRARY_VERSION="0:18:0" +GENERIC_LIBRARY_VERSION="0:19:0" # | | | # +------+ | +---+ # | | | This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <den...@us...> - 2009-03-22 17:04:34
|
Revision: 181 http://rmol.svn.sourceforge.net/rmol/?rev=181&view=rev Author: denis_arnaud Date: 2009-03-22 17:04:21 +0000 (Sun, 22 Mar 2009) Log Message: ----------- [Dev] Renamed RmolTypes.hpp into RMOL_Types.hpp, so as to ease standardisation. Modified Paths: -------------- trunk/rmol/Makefile.am trunk/rmol/README trunk/rmol/rmol/RMOL_Service.hpp trunk/rmol/rmol/bom/BucketHolder.hpp trunk/rmol/rmol/bom/DPOptimiser.hpp trunk/rmol/rmol/bom/Emsr.hpp trunk/rmol/rmol/bom/MCOptimiser.hpp trunk/rmol/rmol/command/Optimiser.hpp trunk/rmol/rmol/factory/FacRmolServiceContext.hpp trunk/rmol/rmol/service/Logger.hpp trunk/rmol/rmol/service/RMOL_ServiceContext.hpp trunk/rmol/rmol/sources.mk trunk/rmol/rmol-config.in trunk/rmol/rmol.spec.in Added Paths: ----------- trunk/rmol/rmol/RMOL_Types.hpp Removed Paths: ------------- trunk/rmol/rmol/RmolTypes.hpp Modified: trunk/rmol/Makefile.am =================================================================== --- trunk/rmol/Makefile.am 2009-03-22 16:47:07 UTC (rev 180) +++ trunk/rmol/Makefile.am 2009-03-22 17:04:21 UTC (rev 181) @@ -21,7 +21,8 @@ MAINTAINERCLEANFILES = Makefile.in aclocal.m4 configure \ config-h.in sic/stamp-h.in autogen.sh bootstrap -EXTRA_DIST = @PACKAGE@.spec @PACKAGE@.m4 @PACKAGE@.pc Makefile.common +#EXTRA_DIST = @PACKAGE@.spec @PACKAGE@.m4 @PACKAGE@.pc Makefile.common +EXTRA_DIST = # Build in these directories: SUBDIRS = rmol win32 po man $(INFO_DOC_DIR) $(HTML_DOC_DIR) $(TEST_DIR) Modified: trunk/rmol/README =================================================================== --- trunk/rmol/README 2009-03-22 16:47:07 UTC (rev 180) +++ trunk/rmol/README 2009-03-22 17:04:21 UTC (rev 181) @@ -21,7 +21,7 @@ http://sourceforge.net/project/showfiles.php?group_id=177703 Then, as usual, you can just type the following sequence: -"./configure --prefix=/projects/sim/deliveries/rmol-0.19.0 && make && make check && cd test && ./testLibsh" +"./configure --prefix=/home/latus/dev/deliveries/rmol-0.19.0 && make && make check && cd test && ./testLibsh" Of course, if you want to install the library (librmol*.so*), just type: "make install". Modified: trunk/rmol/rmol/RMOL_Service.hpp =================================================================== --- trunk/rmol/rmol/RMOL_Service.hpp 2009-03-22 16:47:07 UTC (rev 180) +++ trunk/rmol/rmol/RMOL_Service.hpp 2009-03-22 17:04:21 UTC (rev 181) @@ -7,7 +7,7 @@ // STL #include <string> // RMOL -#include <rmol/RmolTypes.hpp> +#include <rmol/RMOL_Types.hpp> namespace RMOL { Copied: trunk/rmol/rmol/RMOL_Types.hpp (from rev 179, trunk/rmol/rmol/RmolTypes.hpp) =================================================================== --- trunk/rmol/rmol/RMOL_Types.hpp (rev 0) +++ trunk/rmol/rmol/RMOL_Types.hpp 2009-03-22 17:04:21 UTC (rev 181) @@ -0,0 +1,68 @@ +#ifndef __RMOL_RMOL_TYPES_HPP +#define __RMOL_RMOL_TYPES_HPP + +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// STL +#include <vector> +#include <list> + +namespace RMOL { + + // ///////// Exceptions /////////// + class RootException : public std::exception { + }; + + class FileNotFoundException : public RootException { + }; + + class NonInitialisedServiceException : public RootException { + }; + + class MemoryAllocationException : public RootException { + }; + + class ObjectNotFoundException : public RootException { + }; + + class DocumentNotFoundException : public RootException { + }; + + + // /////////////// Log ///////////// + /** Level of logs. */ + namespace LOG { + typedef enum { + CRITICAL = 0, + ERROR, + NOTIFICATION, + WARNING, + DEBUG, + VERBOSE, + LAST_VALUE + } EN_LogLevel; + } + + // //////// Type definitions ///////// + /** Define the capacity. + <br>It is a double, as it allows for overbooking. */ + typedef double ResourceCapacity_T; + + /** Define the Booking Limit. + <br>It is a double, as it allows for overbooking. */ + typedef double BookingLimit_T; + + /** Define the Bid-Price Vector. + <br> It is a vector of double. */ + typedef std::vector<double> BidPriceVector_T; + + /** Define the list of EMSR values for the EMSR algorith. */ + typedef std::list<double> EmsrValueList_T; + + /** Define the vector of booking limits. + <br> It is a vector of double. */ + typedef std::vector<double> BookingLimitVector_T; + +} +#endif // __RMOL_RMOL_TYPES_HPP Property changes on: trunk/rmol/rmol/RMOL_Types.hpp ___________________________________________________________________ Added: svn:mergeinfo + Deleted: trunk/rmol/rmol/RmolTypes.hpp =================================================================== --- trunk/rmol/rmol/RmolTypes.hpp 2009-03-22 16:47:07 UTC (rev 180) +++ trunk/rmol/rmol/RmolTypes.hpp 2009-03-22 17:04:21 UTC (rev 181) @@ -1,68 +0,0 @@ -#ifndef __RMOL_RMOLTYPES_HPP -#define __RMOL_RMOLTYPES_HPP - -// ////////////////////////////////////////////////////////////////////// -// Import section -// ////////////////////////////////////////////////////////////////////// -// STL -#include <vector> -#include <list> - -namespace RMOL { - - // ///////// Exceptions /////////// - class RootException : public std::exception { - }; - - class FileNotFoundException : public RootException { - }; - - class NonInitialisedServiceException : public RootException { - }; - - class MemoryAllocationException : public RootException { - }; - - class ObjectNotFoundException : public RootException { - }; - - class DocumentNotFoundException : public RootException { - }; - - - // /////////////// Log ///////////// - /** Level of logs. */ - namespace LOG { - typedef enum { - CRITICAL = 0, - ERROR, - NOTIFICATION, - WARNING, - DEBUG, - VERBOSE, - LAST_VALUE - } EN_LogLevel; - } - - // //////// Type definitions ///////// - /** Define the capacity. - <br>It is a double, as it allows for overbooking. */ - typedef double ResourceCapacity_T; - - /** Define the Booking Limit. - <br>It is a double, as it allows for overbooking. */ - typedef double BookingLimit_T; - - /** Define the Bid-Price Vector. - <br> It is a vector of double. */ - typedef std::vector<double> BidPriceVector_T; - - /** Define the list of EMSR values for the EMSR algorith. */ - typedef std::list<double> EmsrValueList_T; - - /** Define the vector of booking limits. - <br> It is a vector of double. */ - typedef std::vector<double> BookingLimitVector_T; - -} -#endif // __RMOL_RMOLTYPES_HPP Modified: trunk/rmol/rmol/bom/BucketHolder.hpp =================================================================== --- trunk/rmol/rmol/bom/BucketHolder.hpp 2009-03-22 16:47:07 UTC (rev 180) +++ trunk/rmol/rmol/bom/BucketHolder.hpp 2009-03-22 17:04:21 UTC (rev 181) @@ -7,7 +7,7 @@ // STL #include <iostream> // RMOL -#include <rmol/RmolTypes.hpp> +#include <rmol/RMOL_Types.hpp> #include <rmol/bom/BomAbstract.hpp> #include <rmol/bom/BucketList.hpp> Modified: trunk/rmol/rmol/bom/DPOptimiser.hpp =================================================================== --- trunk/rmol/rmol/bom/DPOptimiser.hpp 2009-03-22 16:47:07 UTC (rev 180) +++ trunk/rmol/rmol/bom/DPOptimiser.hpp 2009-03-22 17:04:21 UTC (rev 181) @@ -4,7 +4,8 @@ // ////////////////////////////////////////////////////////////////////// // Import section // ////////////////////////////////////////////////////////////////////// -#include <rmol/RmolTypes.hpp> +// RMOL +#include <rmol/RMOL_Types.hpp> namespace RMOL { Modified: trunk/rmol/rmol/bom/Emsr.hpp =================================================================== --- trunk/rmol/rmol/bom/Emsr.hpp 2009-03-22 16:47:07 UTC (rev 180) +++ trunk/rmol/rmol/bom/Emsr.hpp 2009-03-22 17:04:21 UTC (rev 181) @@ -4,7 +4,8 @@ // ////////////////////////////////////////////////////////////////////// // Import section // ////////////////////////////////////////////////////////////////////// -#include <rmol/RmolTypes.hpp> +// RMOL +#include <rmol/RMOL_Types.hpp> namespace RMOL { Modified: trunk/rmol/rmol/bom/MCOptimiser.hpp =================================================================== --- trunk/rmol/rmol/bom/MCOptimiser.hpp 2009-03-22 16:47:07 UTC (rev 180) +++ trunk/rmol/rmol/bom/MCOptimiser.hpp 2009-03-22 17:04:21 UTC (rev 181) @@ -4,7 +4,8 @@ // ////////////////////////////////////////////////////////////////////// // Import section // ////////////////////////////////////////////////////////////////////// -#include <rmol/RmolTypes.hpp> +// RMOL +#include <rmol/RMOL_Types.hpp> namespace RMOL { Modified: trunk/rmol/rmol/command/Optimiser.hpp =================================================================== --- trunk/rmol/rmol/command/Optimiser.hpp 2009-03-22 16:47:07 UTC (rev 180) +++ trunk/rmol/rmol/command/Optimiser.hpp 2009-03-22 17:04:21 UTC (rev 181) @@ -4,7 +4,8 @@ // ////////////////////////////////////////////////////////////////////// // Import section // ////////////////////////////////////////////////////////////////////// -#include <rmol/RmolTypes.hpp> +// RMOL +#include <rmol/RMOL_Types.hpp> namespace RMOL { Modified: trunk/rmol/rmol/factory/FacRmolServiceContext.hpp =================================================================== --- trunk/rmol/rmol/factory/FacRmolServiceContext.hpp 2009-03-22 16:47:07 UTC (rev 180) +++ trunk/rmol/rmol/factory/FacRmolServiceContext.hpp 2009-03-22 17:04:21 UTC (rev 181) @@ -5,7 +5,7 @@ // Import section // ////////////////////////////////////////////////////////////////////// // RMOL -#include <rmol/RmolTypes.hpp> +#include <rmol/RMOL_Types.hpp> #include <rmol/factory/FacServiceAbstract.hpp> namespace RMOL { Modified: trunk/rmol/rmol/service/Logger.hpp =================================================================== --- trunk/rmol/rmol/service/Logger.hpp 2009-03-22 16:47:07 UTC (rev 180) +++ trunk/rmol/rmol/service/Logger.hpp 2009-03-22 17:04:21 UTC (rev 181) @@ -11,7 +11,7 @@ #include <sstream> #include <string> // RMOL -#include <rmol/RmolTypes.hpp> +#include <rmol/RMOL_Types.hpp> // /////////////// LOG MACROS ///////////////// #define RMOL_LOG_CORE(iLevel, iToBeLogged) \ Modified: trunk/rmol/rmol/service/RMOL_ServiceContext.hpp =================================================================== --- trunk/rmol/rmol/service/RMOL_ServiceContext.hpp 2009-03-22 16:47:07 UTC (rev 180) +++ trunk/rmol/rmol/service/RMOL_ServiceContext.hpp 2009-03-22 17:04:21 UTC (rev 181) @@ -7,7 +7,7 @@ // STL #include <string> // RMOL -#include <rmol/RmolTypes.hpp> +#include <rmol/RMOL_Types.hpp> #include <rmol/service/ServiceAbstract.hpp> namespace RMOL { Modified: trunk/rmol/rmol/sources.mk =================================================================== --- trunk/rmol/rmol/sources.mk 2009-03-22 16:47:07 UTC (rev 180) +++ trunk/rmol/rmol/sources.mk 2009-03-22 17:04:21 UTC (rev 181) @@ -1,3 +1,3 @@ -service_h_sources = $(top_srcdir)/rmol/RmolTypes.hpp \ +service_h_sources = $(top_srcdir)/rmol/RMOL_Types.hpp \ $(top_srcdir)/rmol/RMOL_Service.hpp service_cc_sources = $(top_srcdir)/rmol/rmol.cpp Modified: trunk/rmol/rmol-config.in =================================================================== --- trunk/rmol/rmol-config.in 2009-03-22 16:47:07 UTC (rev 180) +++ trunk/rmol/rmol-config.in 2009-03-22 17:04:21 UTC (rev 181) @@ -1,26 +1,19 @@ #!/bin/sh prefix=@prefix@ -exec_prefix=@exec_prefix@ -exec_prefix_set=no libdir=@libdir@ includedir=@includedir@ usage() { cat <<EOF -Usage: reac-config [OPTION] +Usage: @PACKAGE@-config [OPTION] Known values for OPTION are: - --prefix print libitpp installation prefix - --exec-prefix print libitpp installation exec prefix + --prefix print @PACKAGE_NAME@ installation prefix --libs print library linking information - --libs-opt print optimised library linking information - --libs-debug print debug library linking information --cflags print pre-processor and compiler flags - --cflags-opt print optimised pre-processor and compiler flags - --cflags-debug print debug pre-processor and compiler flags --help display this help and exit --version output version information EOF @@ -31,6 +24,9 @@ usage 1 fi +cflags=false +libs=false + while test $# -gt 0; do case "$1" in -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; @@ -40,46 +36,30 @@ case $1 in --prefix=*) prefix=$optarg - if test $exec_prefix_set = no ; then - exec_prefix=$optarg - fi ;; + --prefix) echo $prefix ;; - --exec-prefix=*) - exec_prefix=$optarg - exec_prefix_set=yes - ;; - --exec-prefix) - echo $exec_prefix - ;; + --version) echo @VERSION@ ;; + --help) usage 0 ;; + --cflags) - echo @GSL_CFLAGS@ -I${includedir} + echo -I${includedir} ;; - --cflags-opt) - echo @GSL_CFLAGS@ -I${includedir} @CXXFLAGS_OPT@ - ;; - --cflags-debug) - echo @GSL_CFLAGS@ -I${includedir} @CXXFLAGS_DEBUG@ - ;; + --libs) - echo @GSL_LIBS@ -L${libdir} -l@PACKAGE@ @LDFLAGS@ @LIBS@ + echo -l@PACKAGE@ ;; - --libs-opt) - echo @GSL_LIBS@ -L${libdir} -l@PACKAGE@ @LDFLAGS@ @LIBS@ - ;; - --libs-debug) - echo @GSL_LIBS@ -L${libdir} -l@PACKAGE_DEBUG@ @LDFLAGS@ @LIBS@ - ;; + *) - echo "${usage}" 1>&2 + usage exit 1 ;; esac Modified: trunk/rmol/rmol.spec.in =================================================================== --- trunk/rmol/rmol.spec.in 2009-03-22 16:47:07 UTC (rev 180) +++ trunk/rmol/rmol.spec.in 2009-03-22 17:04:21 UTC (rev 181) @@ -3,7 +3,7 @@ Version: @VERSION@ Release: @RPM_RELEASE@%{?dist} -Summary: @PACKAGE_NAME@ is a C++ library of Revenue Management and Optimisation classes and functions. +Summary: C++ library of Revenue Management and Optimisation classes and functions Group: System Environment/Libraries License: LGPLv2 @@ -11,7 +11,6 @@ Source0: http://download.sourceforge.net/%{name}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: automake, autoconf, libtool, gettext BuildRequires: gsl-devel >= 1.8 BuildRequires: boost-devel >= 1.34 BuildRequires: cppunit-devel >= 1.10 @@ -29,33 +28,40 @@ The Theory and practice of Revenue Management, by Kalyan T. Talluri and Garrett J. van Ryzin, Kluwer Academic Publishers, 2004, ISBN 1-4020-7701-7 -Install the @PACKAGE@ package if you need a library for high-level +Install the %{name} package if you need a library for high-level revenue management functionality. %package devel -Summary: Headers and libraries for building apps that use @PACKAGE_NAME@ +Summary: Header files, libraries and development documentation for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} +Requires: pkgconfig %description devel -This package contains headers and libraries required to build applications that -use @PACKAGE_NAME@. +This package contains the header files, static libraries and +development documentation for %{name}. If you would like to develop +programs using %{name}, you will need to install %{name}-devel. -%package html-doc +%package doc Summary: HTML documentation for the @PACKAGE_NAME@ library -Group: System Environment/Libraries +Group: Documentation -%description html-doc +%description doc This package contains the documentation in the HTML format of the @PACKAGE_NAME@ library. The documentation is the same as at the @PACKAGE_NAME@ web page. %prep %setup -q +# find ./doc -type f -perm 755 -exec chmod 644 {} \; +# Fix some permissions and formats +rm -f INSTALL +chmod -x ABOUT-NLS AUTHORS ChangeLog COPYING NEWS README TODO +find . -type f -name '*.[hc]pp' -exec chmod 644 {} \; %build -%configure --enable-static --with-docdir=%{_docdir}/%{name}-%{version} +%configure --with-docdir=%{_docdir}/%{name}-%{version} make %{?_smp_mflags} @@ -64,7 +70,9 @@ make install DESTDIR=$RPM_BUILD_ROOT %find_lang %{name} # remove unpackaged files from the buildroot +rm -f $RPM_BUILD_ROOT%{_includedir}/%{name}/config.h rm -f $RPM_BUILD_ROOT%{_infodir}/dir +rm -f $RPM_BUILD_ROOT%{_libdir}/lib%{name}.la %clean rm -rf $RPM_BUILD_ROOT @@ -74,41 +82,40 @@ %postun -p /sbin/ldconfig %post devel -/sbin/install-info %{_infodir}/%{name}-ref.info.gz %{_infodir}/dir +/sbin/install-info %{_infodir}/%{name}-ref.info.* %{_infodir}/dir %preun devel if [ "$1" = 0 ]; then - /sbin/install-info --delete %{_infodir}/%{name}-ref.info.gz %{_infodir}/dir + /sbin/install-info --delete %{_infodir}/%{name}-ref.info.* %{_infodir}/dir fi %files -f %{name}.lang %defattr(-,root,root,-) -%doc AUTHORS ChangeLog COPYING INSTALL NEWS README +%doc AUTHORS ChangeLog COPYING NEWS README %{_bindir}/%{name} %{_libdir}/lib*.so.* #%{_docdir}/%{name}-%{version}/html #%{_datadir}/info/dir -%{_datadir}/man/man3/%{name}.3.gz +%{_mandir}/man3/%{name}.3.* %files devel %defattr(-,root,root,-) -%doc -%{_includedir}/%{name} +%{_includedir}/%{name}/@PACKAGE_NAME@_Service.hpp +%{_includedir}/%{name}/@PACKAGE_NAME@_Types.hpp %{_bindir}/%{name}-config -%{_libdir}/lib*.a -%{_libdir}/lib*.la -%{_libdir}/lib*.so +%{_libdir}/lib%{name}.so %{_libdir}/pkgconfig/%{name}.pc %{_datadir}/aclocal/%{name}.m4 -%{_datadir}/info/%{name}-ref.info.gz -%{_datadir}/man/man1/%{name}-config.1.gz +%{_infodir}/%{name}-ref.info.* +%{_mandir}/man1/%{name}-config.1.* -%files html-doc +%files doc %defattr(-,root,root,-) %doc %{_docdir}/%{name}-%{version} %changelog -* Sun Mar 8 2009 Denis Arnaud <den...@m4...> @RPM_RELEASE@ +* Sun Mar 8 2009 Denis Arnaud <den...@m4...> 0.19.0-1 - RPM release for Fedora 10 -* Wed Mar 4 2009 Denis Arnaud <den...@m4...> @RPM_RELEASE@ + +* Wed Mar 4 2009 Denis Arnaud <den...@m4...> 0.18.0-1 - Second RPM release This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <den...@us...> - 2009-03-22 22:42:18
|
Revision: 183 http://rmol.svn.sourceforge.net/rmol/?rev=183&view=rev Author: denis_arnaud Date: 2009-03-22 22:42:08 +0000 (Sun, 22 Mar 2009) Log Message: ----------- [Dev] Updated the RPM specification file and Doxygen configuration file for documentation generation. Modified Paths: -------------- trunk/rmol/doc/doxygen_html.cfg.in trunk/rmol/rmol.spec.in Modified: trunk/rmol/doc/doxygen_html.cfg.in =================================================================== --- trunk/rmol/doc/doxygen_html.cfg.in 2009-03-22 17:10:18 UTC (rev 182) +++ trunk/rmol/doc/doxygen_html.cfg.in 2009-03-22 22:42:08 UTC (rev 183) @@ -1,4 +1,4 @@ -# Doxyfile 1.5.2 +# Doxyfile 1.5.7.1 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project @@ -14,11 +14,11 @@ # Project related configuration options #--------------------------------------------------------------------------- -# This tag specifies the encoding used for all characters in the config file that -# follow. The default is UTF-8 which is also the encoding used for all text before -# the first occurrence of this tag. Doxygen uses libiconv (or the iconv built into -# libc) for the transcoding. See http://www.gnu.org/software/libiconv for the list of -# possible encodings. +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all +# text before the first occurrence of this tag. Doxygen uses libiconv (or the +# iconv built into libc) for the transcoding. See +# http://www.gnu.org/software/libiconv for the list of possible encodings. DOXYFILE_ENCODING = UTF-8 @@ -54,10 +54,11 @@ # information to generate all constant output in the proper language. # The default language is English, other supported languages are: # Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, -# Croatian, Czech, Danish, Dutch, Finnish, French, German, Greek, Hungarian, -# Italian, Japanese, Japanese-en (Japanese with English messages), Korean, -# Korean-en, Lithuanian, Norwegian, Polish, Portuguese, Romanian, Russian, -# Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian. +# Croatian, Czech, Danish, Dutch, Farsi, Finnish, French, German, Greek, +# Hungarian, Italian, Japanese, Japanese-en (Japanese with English messages), +# Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, Polish, +# Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak, Slovene, +# Spanish, Swedish, and Ukrainian. OUTPUT_LANGUAGE = English @@ -133,11 +134,19 @@ # If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen # will interpret the first line (until the first dot) of a JavaDoc-style # comment as the brief description. If set to NO, the JavaDoc -# comments will behave just like the Qt-style comments (thus requiring an -# explicit @brief command for a brief description. +# comments will behave just like regular Qt-style comments +# (thus requiring an explicit @brief command for a brief description.) JAVADOC_AUTOBRIEF = NO +# If the QT_AUTOBRIEF tag is set to YES then Doxygen will +# interpret the first line (until the first dot) of a Qt-style +# comment as the brief description. If set to NO, the comments +# will behave just like regular Qt-style comments (thus requiring +# an explicit \brief command for a brief description.) + +QT_AUTOBRIEF = NO + # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen # treat a multi-line C++ special comment block (i.e. a block of //! or /// # comments) as a brief description. This used to be the default behaviour. @@ -146,13 +155,6 @@ MULTILINE_CPP_IS_BRIEF = NO -# If the DETAILS_AT_TOP tag is set to YES then Doxygen -# will output the detailed description near the top, like JavaDoc. -# If set to NO, the detailed description appears after the member -# documentation. - -DETAILS_AT_TOP = YES - # If the INHERIT_DOCS tag is set to YES (the default) then an undocumented # member inherits the documentation from any documented member that it # re-implements. @@ -187,14 +189,26 @@ OPTIMIZE_OUTPUT_FOR_C = NO # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java -# sources only. Doxygen will then generate output that is more tailored for Java. -# For instance, namespaces will be presented as packages, qualified scopes -# will look different, etc. +# sources only. Doxygen will then generate output that is more tailored for +# Java. For instance, namespaces will be presented as packages, qualified +# scopes will look different, etc. OPTIMIZE_OUTPUT_JAVA = NO -# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want to -# include (a tag file for) the STL sources as input, then you should +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources only. Doxygen will then generate output that is more tailored for +# Fortran. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for +# VHDL. + +OPTIMIZE_OUTPUT_VHDL = NO + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should # set this tag to YES in order to let doxygen match functions declarations and # definitions whose arguments contain STL classes (e.g. func(std::string); v.s. # func(std::string) {}). This also make the inheritance and collaboration @@ -207,6 +221,21 @@ CPP_CLI_SUPPORT = NO +# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. +# Doxygen will parse them like normal C++ but will assume all classes use public +# instead of private inheritance when no explicit protection keyword is present. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate getter +# and setter methods for a property. Setting this option to YES (the default) +# will make doxygen to replace the get and set methods by a property in the +# documentation. This will only work if the methods are indeed getting or +# setting a simple type. If this is not the case, or you want to show the +# methods anyway, you should set this option to NO. + +IDL_PROPERTY_SUPPORT = YES + # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC # tag is set to YES, then doxygen will reuse the documentation of the first # member in the group (if any) for the other members of the group. By default @@ -222,6 +251,32 @@ SUBGROUPING = YES +# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum +# is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically +# be useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. + +TYPEDEF_HIDES_STRUCT = NO + +# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to +# determine which symbols to keep in memory and which to flush to disk. +# When the cache is full, less often used symbols will be written to disk. +# For small to medium size projects (<1000 input files) the default value is +# probably good enough. For larger projects a too small cache size can cause +# doxygen to be busy swapping symbols to and from disk most of the time +# causing a significant performance penality. +# If the system has enough physical memory increasing the cache will improve the +# performance by keeping more symbols in memory. Note that the value works on +# a logarithmic scale so increasing the size by one will rougly double the +# memory usage. The cache size is given by this formula: +# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, +# corresponding to a cache size of 2^16 = 65536 symbols + +SYMBOL_CACHE_SIZE = 0 + #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- @@ -256,6 +311,14 @@ EXTRACT_LOCAL_METHODS = NO +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base +# name of the file that contains the anonymous namespace. By default +# anonymous namespace are hidden. + +EXTRACT_ANON_NSPACES = NO + # If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all # undocumented members of documented classes, files or namespaces. # If set to NO (the default) these members will be included in the @@ -331,6 +394,12 @@ SORT_BRIEF_DOCS = NO +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the +# hierarchy of group names into alphabetical order. If set to NO (the default) +# the group names will appear in their defined order. + +SORT_GROUP_NAMES = NO + # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be # sorted by fully-qualified names, including namespaces. If set to # NO (the default), the class list will be sorted only by class name, @@ -392,9 +461,21 @@ SHOW_DIRECTORIES = YES +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. +# This will remove the Files entry from the Quick Index and from the +# Folder Tree View (if specified). The default is YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the +# Namespaces page. This will remove the Namespaces entry from the Quick Index +# and from the Folder Tree View (if specified). The default is YES. + +SHOW_NAMESPACES = YES + # The FILE_VERSION_FILTER tag can be used to specify a program or script that -# doxygen should invoke to get the current version for each file (typically from the -# version control system). Doxygen will invoke the program by executing (via +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via # popen()) the command <command> <input-file>, where <command> is the value of # the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file # provided by doxygen. Whatever the program writes to standard output @@ -402,6 +483,15 @@ FILE_VERSION_FILTER = +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed by +# doxygen. The layout file controls the global structure of the generated output files +# in an output format independent way. The create the layout file that represents +# doxygen's defaults, run doxygen with the -l option. You can optionally specify a +# file name after the option, if omitted DoxygenLayout.xml will be used as the name +# of the layout file. + +LAYOUT_FILE = + #--------------------------------------------------------------------------- # configuration options related to warning and progress messages #--------------------------------------------------------------------------- @@ -467,10 +557,11 @@ @top_builddir@/doc/local \ @top_srcdir@/doc/tutorial -# This tag can be used to specify the character encoding of the source files that -# doxygen parses. Internally doxygen uses the UTF-8 encoding, which is also the default -# input encoding. Doxygen uses libiconv (or the iconv built into libc) for the transcoding. -# See http://www.gnu.org/software/libiconv for the list of possible encodings. +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is +# also the default input encoding. Doxygen uses libiconv (or the iconv built +# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for +# the list of possible encodings. INPUT_ENCODING = UTF-8 @@ -479,7 +570,7 @@ # and *.h) to filter out the source-files in the directories. If left # blank the following patterns are tested: # *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx -# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py +# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90 FILE_PATTERNS = *.hpp \ *.cpp \ @@ -513,9 +604,10 @@ EXCLUDE_PATTERNS = # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names -# (namespaces, classes, functions, etc.) that should be excluded from the output. -# The symbol name can be a fully qualified name, a word, or if the wildcard * is used, -# a substring. Examples: ANamespace, AClass, AClass::ANamespace, ANamespace::*Test +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# AClass::ANamespace, ANamespace::*Test EXCLUDE_SYMBOLS = @@ -595,13 +687,13 @@ STRIP_CODE_COMMENTS = YES -# If the REFERENCED_BY_RELATION tag is set to YES (the default) +# If the REFERENCED_BY_RELATION tag is set to YES # then for each documented function all documented # functions referencing it will be listed. REFERENCED_BY_RELATION = YES -# If the REFERENCES_RELATION tag is set to YES (the default) +# If the REFERENCES_RELATION tag is set to YES # then for each documented function all documented entities # called/used by that function will be listed. @@ -699,9 +791,43 @@ HTML_ALIGN_MEMBERS = YES +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. For this to work a browser that supports +# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox +# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). + +HTML_DYNAMIC_SECTIONS = NO + +# If the GENERATE_DOCSET tag is set to YES, additional index files +# will be generated that can be used as input for Apple's Xcode 3 +# integrated development environment, introduced with OSX 10.5 (Leopard). +# To create a documentation set, doxygen will generate a Makefile in the +# HTML output directory. Running make will produce the docset in that +# directory and running "make install" will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find +# it at startup. +# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html for more information. + +GENERATE_DOCSET = NO + +# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the +# feed. A documentation feed provides an umbrella under which multiple +# documentation sets from a single provider (such as a company or product suite) +# can be grouped. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that +# should uniquely identify the documentation set bundle. This should be a +# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen +# will append .docset to the name. + +DOCSET_BUNDLE_ID = org.doxygen.Project + # If the GENERATE_HTMLHELP tag is set to YES, additional index files # will be generated that can be used as input for tools like the -# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) +# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) # of the generated HTML documentation. GENERATE_HTMLHELP = NO @@ -726,6 +852,12 @@ GENERATE_CHI = NO +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING +# is used to encode HtmlHelp index (hhk), content (hhc) and project file +# content. + +CHM_INDEX_ENCODING = + # If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag # controls whether a binary table of contents is generated (YES) or a # normal table of contents (NO) in the .chm file. @@ -737,6 +869,38 @@ TOC_EXPAND = NO +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and QHP_VIRTUAL_FOLDER +# are set, an additional index file will be generated that can be used as input for +# Qt's qhelpgenerator to generate a Qt Compressed Help (.qch) of the generated +# HTML documentation. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can +# be used to specify the file name of the resulting .qch file. +# The path specified is relative to the HTML output folder. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# <a href="http://doc.trolltech.com/qthelpproject.html#namespace">Qt Help Project / Namespace</a>. + +QHP_NAMESPACE = org.doxygen.Project + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# <a href="http://doc.trolltech.com/qthelpproject.html#virtual-folders">Qt Help Project / Virtual Folders</a>. + +QHP_VIRTUAL_FOLDER = doc + +# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can +# be used to specify the location of Qt's qhelpgenerator. +# If non-empty doxygen will try to run qhelpgenerator on the generated +# .qhp file . + +QHG_LOCATION = + # The DISABLE_INDEX tag can be used to turn on/off the condensed index at # top of each HTML page. The value NO (the default) enables the index and # the value YES disables it. @@ -748,12 +912,20 @@ ENUM_VALUES_PER_LINE = 4 -# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be -# generated containing a tree-like index structure (just like the one that +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. +# If the tag value is set to FRAME, a side panel will be generated +# containing a tree-like index structure (just like the one that # is generated for HTML Help). For this to work a browser that supports # JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, # Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are -# probably better off using the HTML help feature. +# probably better off using the HTML help feature. Other possible values +# for this tag are: HIERARCHIES, which will generate the Groups, Directories, +# and Class Hierarchy pages using a tree view instead of an ordered list; +# ALL, which combines the behavior of FRAME and HIERARCHIES; and NONE, which +# disables this behavior completely. For backwards compatibility with previous +# releases of Doxygen, the values YES and NO are equivalent to FRAME and NONE +# respectively. GENERATE_TREEVIEW = YES @@ -763,6 +935,14 @@ TREEVIEW_WIDTH = 250 +# Use this tag to change the font size of Latex formulas included +# as images in the HTML documentation. The default is 10. Note that +# when you change the font size after a successful doxygen run you need +# to manually remove any form_*.png images from the HTML output directory +# to force them to be regenerated. + +FORMULA_FONTSIZE = 10 + #--------------------------------------------------------------------------- # configuration options related to the LaTeX output #--------------------------------------------------------------------------- @@ -781,7 +961,7 @@ # The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be # invoked. If left blank `latex' will be used as the default command name. -LATEX_CMD_NAME = +LATEX_CMD_NAME = # The MAKEINDEX_CMD_NAME tag can be used to specify the command name to # generate index for LaTeX. If left blank `makeindex' will be used as the @@ -1114,10 +1294,11 @@ CLASS_DIAGRAMS = YES # You can define message sequence charts within doxygen comments using the \msc -# command. Doxygen will then run the mscgen tool (see http://www.mcternan.me.uk/mscgen/) to -# produce the chart and insert it in the documentation. The MSCGEN_PATH tag allows you to -# specify the directory where the mscgen tool resides. If left empty the tool is assumed to -# be found in the default search path. +# command. Doxygen will then run the mscgen tool (see +# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the +# documentation. The MSCGEN_PATH tag allows you to specify the directory where +# the mscgen tool resides. If left empty the tool is assumed to be found in the +# default search path. MSCGEN_PATH = @@ -1134,6 +1315,29 @@ HAVE_DOT = NO +# By default doxygen will write a font called FreeSans.ttf to the output +# directory and reference it in all dot files that doxygen generates. This +# font does not include all possible unicode characters however, so when you need +# these (or just want a differently looking font) you can specify the font name +# using DOT_FONTNAME. You need need to make sure dot is able to find the font, +# which can be done by putting it in a standard location or by setting the +# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory +# containing the font. + +DOT_FONTNAME = FreeSans + +# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. +# The default size is 10pt. + +DOT_FONTSIZE = 10 + +# By default doxygen will tell dot to use the output directory to look for the +# FreeSans.ttf font (which doxygen will put there itself). If you specify a +# different font using DOT_FONTNAME you can set the path where dot +# can find it using this tag. + +DOT_FONTPATH = + # If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and # indirect inheritance relations. Setting this tag to YES will force the @@ -1178,19 +1382,19 @@ INCLUDED_BY_GRAPH = YES -# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will -# generate a call dependency graph for every global function or class method. -# Note that enabling this option will significantly increase the time of a run. -# So in most cases it will be better to enable call graphs for selected -# functions only using the \callgraph command. +# If the CALL_GRAPH and HAVE_DOT options are set to YES then +# doxygen will generate a call dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable call graphs +# for selected functions only using the \callgraph command. CALL_GRAPH = NO -# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then doxygen will -# generate a caller dependency graph for every global function or class method. -# Note that enabling this option will significantly increase the time of a run. -# So in most cases it will be better to enable caller graphs for selected -# functions only using the \callergraph command. +# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then +# doxygen will generate a caller dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable caller +# graphs for selected functions only using the \callergraph command. CALLER_GRAPH = NO @@ -1223,19 +1427,31 @@ DOTFILE_DIRS = -# The MAX_DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of +# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of # nodes that will be shown in the graph. If the number of nodes in a graph # becomes larger than this value, doxygen will truncate the graph, which is -# visualized by representing a node as a red box. Note that doxygen will always -# show the root nodes and its direct children regardless of this setting. +# visualized by representing a node as a red box. Note that doxygen if the +# number of direct children of the root node in a graph is already larger than +# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note +# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. DOT_GRAPH_MAX_NODES = 50 +# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the +# graphs generated by dot. A depth value of 3 means that only nodes reachable +# from the root by following a path via at most 3 edges will be shown. Nodes +# that lay further from the root node will be omitted. Note that setting this +# option to 1 or 2 may greatly reduce the computation time needed for large +# code bases. Also note that the size of a graph can be further restricted by +# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. + +MAX_DOT_GRAPH_DEPTH = 0 + # Set the DOT_TRANSPARENT tag to YES to generate images with a transparent -# background. This is disabled by default, which results in a white background. -# Warning: Depending on the platform used, enabling this option may lead to -# badly anti-aliased labels on the edges of a graph (i.e. they become hard to -# read). +# background. This is disabled by default, because dot on Windows does not +# seem to support this out of the box. Warning: Depending on the platform used, +# enabling this option may lead to badly anti-aliased labels on the edges of +# a graph (i.e. they become hard to read). DOT_TRANSPARENT = NO Modified: trunk/rmol/rmol.spec.in =================================================================== --- trunk/rmol/rmol.spec.in 2009-03-22 17:10:18 UTC (rev 182) +++ trunk/rmol/rmol.spec.in 2009-03-22 22:42:08 UTC (rev 183) @@ -36,6 +36,8 @@ Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: pkgconfig +Requires(post): info +Requires(preun): info %description devel This package contains the header files, static libraries and @@ -45,6 +47,7 @@ %package doc Summary: HTML documentation for the @PACKAGE_NAME@ library Group: Documentation +BuildRequires: doxygen, texlive-latex, texlive-dvips, ghostscript %description doc This package contains the documentation in the HTML format of the @PACKAGE_NAME@ @@ -82,11 +85,11 @@ %postun -p /sbin/ldconfig %post devel -/sbin/install-info %{_infodir}/%{name}-ref.info.* %{_infodir}/dir +/sbin/install-info %{_infodir}/%{name}-ref.info.* %{_infodir}/dir || : %preun devel if [ "$1" = 0 ]; then - /sbin/install-info --delete %{_infodir}/%{name}-ref.info.* %{_infodir}/dir + /sbin/install-info --delete %{_infodir}/%{name}-ref.info.* %{_infodir}/dir || : fi %files -f %{name}.lang This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <den...@us...> - 2009-03-23 11:15:22
|
Revision: 186 http://rmol.svn.sourceforge.net/rmol/?rev=186&view=rev Author: denis_arnaud Date: 2009-03-23 11:15:17 +0000 (Mon, 23 Mar 2009) Log Message: ----------- [Dev] The documentation RPM package is now generated with noarch dependency. Modified Paths: -------------- trunk/rmol/doc/local/rmol_header.html trunk/rmol/rmol.spec.in Modified: trunk/rmol/doc/local/rmol_header.html =================================================================== --- trunk/rmol/doc/local/rmol_header.html 2009-03-23 02:17:22 UTC (rev 185) +++ trunk/rmol/doc/local/rmol_header.html 2009-03-23 11:15:17 UTC (rev 186) @@ -12,7 +12,8 @@ <div style="width: 100%; height: 40px; background-color: #ffff00; border: 1px solid #b0b0b0; margin: 5px 5px 5px 0; padding: 2px;"> <a href="http://rmol.sourceforge.net"><img width="150" height="40" src="rmol_logo.png" alt="RMOL Logo" style="float: left; border: 0;"></a> - <a href="http://www.sourceforge.net/projects/rmol"><img width="150" - height="40" src="sfx_logo.png" alt="Sourceforge Logo" - style="float: right; border: 0;"></a> + <a href="http://sourceforge.net/projects/rmol"><img + src="http://sflogo.sourceforge.net/sflogo.php?group_id=177703&type=15" + width="150" height="40" border="0" + alt="Get Revenue Management Optimisation Library at SourceForge.net. Fast, secure and Free Open Source software downloads" /></a> </div> Modified: trunk/rmol/rmol.spec.in =================================================================== --- trunk/rmol/rmol.spec.in 2009-03-23 02:17:22 UTC (rev 185) +++ trunk/rmol/rmol.spec.in 2009-03-23 11:15:17 UTC (rev 186) @@ -47,6 +47,7 @@ %package doc Summary: HTML documentation for the @PACKAGE_NAME@ library Group: Documentation +BuildArch: noarch BuildRequires: doxygen, texlive-latex, texlive-dvips, ghostscript %description doc This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <qua...@us...> - 2009-03-23 16:42:30
|
Revision: 187 http://rmol.svn.sourceforge.net/rmol/?rev=187&view=rev Author: quannaus Date: 2009-03-23 16:42:24 +0000 (Mon, 23 Mar 2009) Log Message: ----------- [Dev] Fixed the rmol-config(.in) script, so that it works when the prefix is not standard (/usr). Modified Paths: -------------- trunk/rmol/AUTHORS trunk/rmol/rmol-config.in Modified: trunk/rmol/AUTHORS =================================================================== --- trunk/rmol/AUTHORS 2009-03-23 11:15:17 UTC (rev 186) +++ trunk/rmol/AUTHORS 2009-03-23 16:42:24 UTC (rev 187) @@ -1 +1,3 @@ -Denis Arnaud <den...@m4...> +Denis Arnaud <denis dot arnaud_rmol at m4x dot org> +Anh Quan Nguyen <aquannguyen at gmail dot com> +Patrick Grandjean <ptgrd at yahoo dot com> Modified: trunk/rmol/rmol-config.in =================================================================== --- trunk/rmol/rmol-config.in 2009-03-23 11:15:17 UTC (rev 186) +++ trunk/rmol/rmol-config.in 2009-03-23 16:42:24 UTC (rev 187) @@ -1,6 +1,7 @@ #!/bin/sh prefix=@prefix@ +exec_prefix=${prefix} libdir=@libdir@ includedir=@includedir@ @@ -51,11 +52,19 @@ ;; --cflags) - echo -I${includedir} + if [ "${prefix}" != "/usr" ]; then + echo -I${includedir} + else + echo + fi ;; --libs) - echo -l@PACKAGE@ + if [ "${prefix}" != "/usr" ]; then + echo -L${libdir} -l@PACKAGE@ + else + echo -l@PACKAGE@ + fi ;; *) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <den...@us...> - 2009-03-25 23:27:08
|
Revision: 192 http://rmol.svn.sourceforge.net/rmol/?rev=192&view=rev Author: denis_arnaud Date: 2009-03-25 23:26:57 +0000 (Wed, 25 Mar 2009) Log Message: ----------- [Packaging] Fixed the RPM specification file according to https://bugzilla.redhat.com/show_bug.cgi?id=489233 Modified Paths: -------------- trunk/rmol/rmol/command/FileMgr.cpp trunk/rmol/rmol/service/RMOL_Service.cpp trunk/rmol/rmol.spec.in Modified: trunk/rmol/rmol/command/FileMgr.cpp =================================================================== --- trunk/rmol/rmol/command/FileMgr.cpp 2009-03-25 17:56:05 UTC (rev 191) +++ trunk/rmol/rmol/command/FileMgr.cpp 2009-03-25 23:26:57 UTC (rev 192) @@ -80,8 +80,8 @@ << "\"" << std::endl; } else { if (i == 2) { - const Demand& aDemand = - FacDemand::instance().create (aDistribParams, aYieldRange); + //const Demand& aDemand = + // FacDemand::instance().create (aDistribParams, aYieldRange); Bucket& aBucket = FacBucket::instance().create (aYieldRange); FacBucketHolder::instance().addBucket (ioBucketHolder, aBucket); } Modified: trunk/rmol/rmol/service/RMOL_Service.cpp =================================================================== --- trunk/rmol/rmol/service/RMOL_Service.cpp 2009-03-25 17:56:05 UTC (rev 191) +++ trunk/rmol/rmol/service/RMOL_Service.cpp 2009-03-25 23:26:57 UTC (rev 192) @@ -154,10 +154,10 @@ // std::cout << "Bid-Price Vector (BPV): "; unsigned int size = lBidPriceVector.size(); - for (unsigned int i = 0; i < size; ++i) { - const double bidPrice = lBidPriceVector.at(i); + // for (unsigned int i = 0; i < size; ++i) { + // const double bidPrice = lBidPriceVector.at(i); // std::cout << std::fixed << std::setprecision (2) << bidPrice << " "; - } + // } // std::cout << std::endl; } Modified: trunk/rmol/rmol.spec.in =================================================================== --- trunk/rmol/rmol.spec.in 2009-03-25 17:56:05 UTC (rev 191) +++ trunk/rmol/rmol.spec.in 2009-03-25 23:26:57 UTC (rev 192) @@ -70,7 +70,6 @@ %configure --disable-static make %{?_smp_mflags} - %install rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT @@ -79,9 +78,9 @@ rm -f $RPM_BUILD_ROOT%{_includedir}/%{name}/config.h rm -f $RPM_BUILD_ROOT%{_infodir}/dir rm -f $RPM_BUILD_ROOT%{_libdir}/lib%{name}.la -chmod 644 doc/html/installdox doc/html/*.png doc/html/*.ico +# chmod 644 doc/html/installdox doc/html/*.png doc/html/*.ico rm -rf %{mydocs} && mkdir -p %{mydocs} -mv $RPM_BUILD_ROOT/%{_docdir}/%{name}-%{version}/* %{mydocs} +mv $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/html %{mydocs} %clean rm -rf $RPM_BUILD_ROOT @@ -107,9 +106,7 @@ %files devel %defattr(-,root,root,-) -%dir %{_includedir}/%{name} -%{_includedir}/%{name}/@PACKAGE_NAME@_Service.hpp -%{_includedir}/%{name}/@PACKAGE_NAME@_Types.hpp +%{_includedir}/%{name} %{_bindir}/%{name}-config %{_libdir}/lib%{name}.so %{_libdir}/pkgconfig/%{name}.pc @@ -119,11 +116,12 @@ %files doc %defattr(-,root,root,-) -%doc %{mydocs}/* -%doc AUTHORS ChangeLog COPYING NEWS README doc/html +%doc %{mydocs}/html +%doc AUTHORS ChangeLog COPYING NEWS README + %changelog -* Sun Mar 8 2009 Denis Arnaud <den...@m4...> 0.19.0-1 +* Sun Mar 25 2009 Denis Arnaud <den...@m4...> 0.19.0-1 - RPM release for Fedora 10 * Wed Mar 4 2009 Denis Arnaud <den...@m4...> 0.18.0-1 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <den...@us...> - 2009-04-02 18:55:33
|
Revision: 193 http://rmol.svn.sourceforge.net/rmol/?rev=193&view=rev Author: denis_arnaud Date: 2009-04-02 18:55:23 +0000 (Thu, 02 Apr 2009) Log Message: ----------- [Doc] Improved the generated documentation. Modified Paths: -------------- trunk/rmol/COPYING trunk/rmol/doc/local/authors.doc trunk/rmol/doc/local/copyright.doc trunk/rmol/doc/local/features.doc trunk/rmol/doc/local/help_wanted.doc trunk/rmol/doc/local/index.doc.in trunk/rmol/doc/local/installation.doc trunk/rmol/doc/local/linking.doc trunk/rmol/doc/local/verification.doc Modified: trunk/rmol/COPYING =================================================================== --- trunk/rmol/COPYING 2009-03-25 23:26:57 UTC (rev 192) +++ trunk/rmol/COPYING 2009-04-02 18:55:23 UTC (rev 193) @@ -55,7 +55,7 @@ that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. - + Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a @@ -111,7 +111,7 @@ "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. - + GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION @@ -158,7 +158,7 @@ You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. - + 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 @@ -216,7 +216,7 @@ ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. - + Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. @@ -267,7 +267,7 @@ distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. - + 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work @@ -329,7 +329,7 @@ accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. - + 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined @@ -370,7 +370,7 @@ restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. - + 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or @@ -422,7 +422,7 @@ the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. - + 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is @@ -456,7 +456,7 @@ DAMAGES. END OF TERMS AND CONDITIONS - + How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest Modified: trunk/rmol/doc/local/authors.doc =================================================================== --- trunk/rmol/doc/local/authors.doc 2009-03-25 23:26:57 UTC (rev 192) +++ trunk/rmol/doc/local/authors.doc 2009-04-02 18:55:23 UTC (rev 193) @@ -10,23 +10,23 @@ \section developers Developers -- Karim Duval <duv...@us...> (\ref N) -- Ngoc-Thach Hoang <hoa...@us...> (\ref N) +- Anh Quan Nguyen <qua...@us...> (\ref N) +- Benoit Lardeux <ben...@us...> (\ref N) \section retired Retired Developers -- Fabrice Bellard +- Karim Duval <duv...@us...> (\ref N) \section contributors Contributors -- Simon Martin (\ref N) +- Ngoc-Thach Hoang <hoa...@us...> (\ref N) \section distributors Distribution Maintainers -- Christopher Gragsone <mae...@us...> +- Denis Arnaud <den...@us...> (\ref N) \note \anchor N Modified: trunk/rmol/doc/local/copyright.doc =================================================================== --- trunk/rmol/doc/local/copyright.doc 2009-03-25 23:26:57 UTC (rev 192) +++ trunk/rmol/doc/local/copyright.doc 2009-04-02 18:55:23 UTC (rev 193) @@ -2,16 +2,20 @@ \page copyright Copyright and License -\section gnugpl GNU GENERAL PUBLIC LICENSE +\section gnugpl GNU LESSER GENERAL PUBLIC LICENSE -\subsection version Version 2, June 1991 +\subsection version Version 2.1, February 1999 \verbatim -Copyright (C) 1989, 1991 Free Software Foundation, Inc. -51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +Copyright (C) 1991, 1999 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts +as the successor of the GNU Library Public License, version 2, hence +the version number 2.1.] \endverbatim @@ -19,212 +23,383 @@ The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + The precise terms and conditions for copying, distribution and -modification follow. +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. - \section terms TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". -Activities other than copying, distribution and modification are not + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: - a) You must cause the modified files to carry prominent notices + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, +identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of +on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. +entire whole, and thus to each and every part regardless of who wrote +it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or -collective works based on the Program. +collective works based on the Library. -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not compelled to copy the source along with the object code. - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. - 5. You are not required to accept this License, since you have not + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are +distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying -the Program or works based on it. +the Library or works based on it. - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to +You are not responsible for enforcing compliance by third parties with this License. - 7. If, as a consequence of a court judgment or allegation of patent + 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. +refrain entirely from distribution of the Library. -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is +integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that @@ -235,122 +410,109 @@ This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. - 8. If the distribution and/or use of the Program is restricted in + 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. \subsection nowarranty NO WARRANTY - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. \subsection endofterms END OF TERMS AND CONDITIONS \section howtoapply How to Apply These Terms to Your New Programs - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. \verbatim - <one line to give the program's name and a brief idea of what it does.> + <one line to give the library's name and a brief idea of what it does.> Copyright (C) <year> <name of author> - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA \endverbatim Also add information on how to contact you by electronic and paper mail. -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - -\verbatim - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. -\endverbatim - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if +school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: \verbatim - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. - <signature of Ty Coon>, 1 April 1989 + <signature of Ty Coon>, 1 April 1990 Ty Coon, President of Vice \endverbatim -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. - +That's all there is to it! + +<a href="http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html">Source</a> + */ Modified: trunk/rmol/doc/local/features.doc =================================================================== --- trunk/rmol/doc/local/features.doc 2009-03-25 23:26:57 UTC (rev 192) +++ trunk/rmol/doc/local/features.doc 2009-04-02 18:55:23 UTC (rev 193) @@ -1,75 +1,33 @@ /*! -\page features Main features of IT++ +\page features Main features of RMOL -A short list of the main features of IT++ is given below sorted in different -categories. Many more features and functions exist and for these we refer to +A short list of the main features of RMOL is given below sorted in different +categories. Some more features and functions exist and for these we refer to the reference documentation. -\section prog_features Programming features -- templated array and stack container classes -- input and file argument parser -- timing functions and classes +\section rmo_features Optimisation features +- Dynamic Programming (DP) +- EMSRa and EMSRb +- Network optimisation with Linear Programming (LP) -\section math_features Basic mathematical features -- templated vector and matrix classes -- sparse vectors and matrix classes -- elementary functions on vectors and matrices -- statistics classes and functions -- matrix decompositions such as eigenvalue, Cholesky, LU, Schur, SVD, and QR -- solving linear system of equations (including over and underdetermined) -- random number generation (Mersenne Twister generator) -- binary and Galois types (both scalar and vector and matrices) -- integration of 1-dimensional functions -- unconditional nonlinear optimization (Quasi-Newton search) +\section rmf_features Forecasting features +- Exponential Smoothing +- Moving Average -\section sigproc_features Signal processing -- filter functions and classes -- frequency domain filtering -- FFT, DFT, DCT, and Hadamard transforms -- time and frequency domain windows -- evaluating and finding roots of polynomials (and inverse operations) -- filter design functions -- fast independent component analysis (fast ICA) +\section rmc_features Overbooking features +- Cancellations and No-Shows +- Cost-based optimisation +- Service-based optimisation -\section comm_features Communications -- modulators (BPSK, PSK, PAM, QAM) -- vector modulators (e.g. for OFDM and MIMO) -- OFDM and CDMA modulators -- pulse shaping filters (including RC and RRC) -- binary symmetric (BSC) and additive white Gaussian Noise (AWGN) channels -- multipath fading channels (both frequency-flat and frequency-selective) -- COST 207, COST 257, and ITU channel models -- Hamming, extended Golay, and CRC codes -- BCH and Reed-Solomon codes -- convolutional and punctured convolutional codes -- recursive convolutional codes -- turbo codes -- interleavers +\section rmu_features Unconstraining +- Inventory censorflag and guillotine +- E-M (Expectation Maximisation) -\section protocol_features Protocol simulation -- event-based simulation classes -- signal and slots for simplified syntax -- TCP clients and servers -- selective repeat ARQ -- queue classes -- packet generators - - -\section srccode_features Source coding -- Scalar Quantizer (SQ) and Vector Quantizer (VQ) classes and functions for - training of these -- LPC, LSF, and cepstrum parameter calculation for speech processing -- Gaussian Mixture Modeling -- reading and saving several different audiofile formats -- reading and saving images in PNM format - - \section other_features Other features -- binary file format for most built in and IT++ types -- fixed-point scalar, vector and matrix types +- CSV input file parsing */ Modified: trunk/rmol/doc/local/help_wanted.doc =================================================================== --- trunk/rmol/doc/local/help_wanted.doc 2009-03-25 23:26:57 UTC (rev 192) +++ trunk/rmol/doc/local/help_wanted.doc 2009-04-02 18:55:23 UTC (rev 193) @@ -1,29 +1,29 @@ /*! \page help_wanted Make a Difference -<b>Do not ask what IT++ can do for you. Ask what you can do for IT++.</b> +<b>Do not ask what RMOL can do for you. Ask what you can do for RMOL.</b> -You can help us to develop the IT++ library. There are always a lot of things +You can help us to develop the RMOL library. There are always a lot of things you can do: -- Start using IT++ -- Tell your friends about IT++ and help them to get started using it +- Start using RMOL +- Tell your friends about RMOL and help them to get started using it - If you find a bug, report it to us. Without your help we can never hope to produce a bug free code. - Help us to improve the documentation by providing information about documentation bugs -- Answer support requests in the IT++ discussion forums on SourceForge. If -you know the answer to a question, help others to overcome their IT++ +- Answer support requests in the RMOL discussion forums on SourceForge. If +you know the answer to a question, help others to overcome their RMOL problems. - Help us to improve our algorithms. If you know of a better way (e.g. that is faster or requires less memory) to implement some of our algorithms, then let us know. -- Help us to port IT++ to new platforms. If you manage to compile IT++ on a +- Help us to port RMOL to new platforms. If you manage to compile RMOL on a new platform, then tell us how you did it. -- Send us your code. If you have a good IT++ compatible code, which you can -release under the GPL, and you think it should be included in IT++, then +- Send us your code. If you have a good RMOL compatible code, which you can +release under the LGPL, and you think it should be included in RMOL, then send it to us. -- Become an IT++ developer. Send us an e-mail and tell what you can do for -IT++. +- Become an RMOL developer. Send us an e-mail and tell what you can do for +RMOL. */ Modified: trunk/rmol/doc/local/index.doc.in =================================================================== --- trunk/rmol/doc/local/index.doc.in 2009-03-25 23:26:57 UTC (rev 192) +++ trunk/rmol/doc/local/index.doc.in 2009-04-02 18:55:23 UTC (rev 193) @@ -45,6 +45,7 @@ <b>External Libraries:</b> <ul> <li><a href="http://www.gnu.org/software/gsl">GSL</a></li> +<li><a href="http://www.boost.org">Boost</a></li> </ul> </div> @@ -59,7 +60,8 @@ RMOL makes an extensive use of existing open-source libraries for increased functionality, speed and accuracy. In particular <a href="http://www.gnu.org/software/gsl">GSL</a> (<em>GNU Scientific -Library</em>) library is used. +Library</em>) and <a href="http://www.boost.org">Boost</a> (<em>C++ +Standard Extensions</em>) libraries are used. The RMOL library originates from the department of Operational Research and Innovation at <a Modified: trunk/rmol/doc/local/installation.doc =================================================================== --- trunk/rmol/doc/local/installation.doc 2009-03-25 23:26:57 UTC (rev 192) +++ trunk/rmol/doc/local/installation.doc 2009-04-02 18:55:23 UTC (rev 193) @@ -1,24 +1,29 @@ /*! -\page installation IT++ Installation +\page installation RMOL Installation \section toc Table of Contents - \ref requirements - \ref download - \ref compilation - \ref macosx -- \ref localinst - \ref msvc -\section requirements IT++ Requirements +\section requirements RMOL Requirements -IT++ should compile without errors or warnings on most GNU/Linux systems, -on UNIX systems like Solaris SunOS, and on POSIX based environments for -Microsoft Windows like Cygwin or MinGW with MSYS. It can be also built on -Microsoft Windows NT/2000/XP using Microsoft's Visual C++ .NET, but our -support for this compiler is limited. For GNU/Linux, SunOS, Cygwin and MinGW -we assume that you have at least the following GNU software installed on -your computer: +If you have a RPM-based Linux distribution, note that RPM packages are +provided for the latest versions of Fedora (e.g., 10) on the <a +href="http://sourceforge.net/project/showfiles.php?group_id=177703">RMOL +project</a> download site. In that case, you do not have to bother +with the installation from source code. + +Otherwise, RMOL should compile without errors or warnings on most +GNU/Linux systems, on UNIX systems like Solaris SunOS, and on POSIX +based environments for Microsoft Windows like Cygwin or MinGW with +MSYS. It can be also built on Microsoft Windows NT/2000/XP using +Microsoft's Visual C++ .NET, but our support for this compiler is +limited. For GNU/Linux, SunOS, Cygwin and MinGW we assume that you +have at least the following GNU software installed on your computer: - <a href="http://www.gnu.org/software/make/">GNU make</a>, version 3.72.1 or later (check version with <tt>`make --version'</tt>) - <a href="http://gcc.gnu.org/">GCC</a> - GNU Compilers Collection (gcc, g++ @@ -36,65 +41,46 @@ We strongly recommend that you use recent stable releases of the GCC, if possible. We do not actively work on supporting older versions of the GCC, and they may therefore (without prior notice) become unsupported in future -releases of IT++. +releases of RMOL. -In order to use all functionality provided by the IT++ library, it is +In order to use all functionality provided by the RMOL library, it is recommended that you have some external libraries compiled and installed in -your computer. The basic set of them is: -<a href="http://www.netlib.org/blas/">BLAS</a>, -<a href="http://www.netlib.org/lapack/">LAPACK</a> and -<a href="http://www.fftw.org/">FFTW</a> (version 3.0.0 or later). To improve -some vector based operations a C interface of BLAS, namely -<a href="http://www.netlib.org/blas/">CBLAS</a>, is also recommended. +your computer, namely: +<a href="http://www.gnu.org/software/gsl">GSL</a> and +<a href="http://www.boost.org">Boost</a>. -Instead of NetLib's reference BLAS, CBLAS and LAPACK implementations, some -optimized platform-specific libraries can be used as well, i.e.: -- <a href="http://math-atlas.sourceforge.net/">ATLAS</a> (<em>Automatically - Tuned Linear Algebra Software</em>) - includes optimised BLAS, CBLAS and a - limited set of LAPACK routines (version 3.6.0 or later) -- <a href="http://www.intel.com/cd/software/products/asmo-na/eng/perflib/mkl/">MKL</a> - (<em>Intel Math Kernel Library</em>) - includes all required BLAS, CBLAS, - LAPACK and FFT routines (version 8.0.0 or later; FFTW not required) -- <a href="http://developer.amd.com/acml.aspx">ACML</a> (<em>AMD Core Math - Library</em>) - includes BLAS, CBLAS, LAPACK and FFT routines (version - 2.5.3 or later; FFTW not required) -It is possible to compile and use IT++ without these libraries, but the -functionality will be reduced. We therefore recommend that you take some -time and effort to provide these external libraries in your system. Please -note, that some of them (FFTW, BLAS and LAPACK) are usually included in -most modern Linux distributions. +\section download Obtaining the RMOL Source Codes - -\section download Obtaining the IT++ Source Codes - -IT++ is released under the GNU General Public License (GPL) and hence the -source code of the IT++ library is available for free download. To obtain -the IT++ source code, visit the project pages on SourceForge: -- <a href="http://itpp.sourceforge.net/">http://itpp.sourceforge.net/</a> +RMOL is released under the Lesser GNU General Public License (LGPL) +and hence the source code of the RMOL library is available for free +download. To obtain the RMOL source code, visit the project pages on +SourceForge: +- <a + href="http://sourceforge.net/projects/rmol">http://sourceforge.net/projects/rmol</a> . -and download the file named \c itpp-\<VERSION\>.tar.gz or -\c itpp-\<VERSION\>.tar.bz2, where \c \<VERSION\> is the latest release -number, e.g. 3.9.0. +and download the file named \c rmol-\<VERSION\>.tar.gz or +\c rmol-\<VERSION\>.tar.bz2, where \c \<VERSION\> is the latest release +number, e.g. 0.19.0. -\section compilation General IT++ Configuration, Compilation and Installation Instructions +\section compilation General RMOL Configuration, Compilation and Installation Instructions -Assuming that you have already downloaded the latest IT++ sources, untar +Assuming that you have already downloaded the latest RMOL sources, untar and unpack the sources, and enter the unpacked directory. Depending on the package type you have downloaded, use the following commands: \verbatim -% gzip -cd itpp-<VERSION>.tar.gz | tar xf - -% cd itpp-<VERSION> +% gzip -cd rmol-<VERSION>.tar.gz | tar xf - +% cd rmol-<VERSION> \endverbatim \verbatim -% bzip2 -cd itpp-<VERSION>.tar.bz2 | tar xf - -% cd itpp-<VERSION> +% bzip2 -cd rmol-<VERSION>.tar.bz2 | tar xf - +% cd rmol-<VERSION> \endverbatim -Since version 3.9.0, the IT++ library uses autoconf, automake and libtool +Since version 0.2.0, the RMOL library uses autoconf, automake and libtool for preparing Makefiles and configuration script, so the compilation procedure resembles a standard, well-known GNU method, i.e. @@ -110,7 +96,7 @@ PREFIX value. By default it is set to \c `/usr/local', so <tt>`make install'</tt> will install appropriate files into \c `/usr/local/include', \c `/usr/local/lib`, etc. -- \c `--enable-debug' - build an extra library named \c `libitpp_debug.*' +- \c `--enable-debug' - build an extra library named \c `librmol_debug.*' using special debugging flags for compiler and linker (disabled by default) - \c `--enable-exceptions' - enable exceptions handling of run-time errors instead of aborting the program (disabled by default) @@ -124,79 +110,21 @@ Plese note that each \c `--enable-\<OPTION\>' switch can be ... [truncated message content] |
From: <qua...@us...> - 2009-04-20 08:41:28
|
Revision: 194 http://rmol.svn.sourceforge.net/rmol/?rev=194&view=rev Author: quannaus Date: 2009-04-20 08:41:24 +0000 (Mon, 20 Apr 2009) Log Message: ----------- Implemented the optimal bid-price vector computation within the Monte-Carlo algorithm. Modified Paths: -------------- trunk/rmol/rmol/RMOL_Service.hpp trunk/rmol/rmol/bom/BucketHolder.cpp trunk/rmol/rmol/bom/BucketHolder.hpp trunk/rmol/rmol/bom/MCOptimiser.cpp trunk/rmol/rmol/bom/MCOptimiser.hpp trunk/rmol/rmol/command/Optimiser.cpp trunk/rmol/rmol/command/Optimiser.hpp trunk/rmol/rmol/service/RMOL_Service.cpp trunk/rmol/test/OptimiseTestSuite.cpp Added Paths: ----------- trunk/rmol/test/samples/ trunk/rmol/test/samples/sample1.csv trunk/rmol/test/samples/sample2.csv trunk/rmol/test/samples/sample3.csv trunk/rmol/test/samples/sample4.csv Removed Paths: ------------- trunk/rmol/test/sample1.csv trunk/rmol/test/sample2.csv trunk/rmol/test/sample3.csv trunk/rmol/test/sample4.csv Property Changed: ---------------- trunk/rmol/ trunk/rmol/config/ Property changes on: trunk/rmol ___________________________________________________________________ Modified: svn:ignore - autom4te.cache INSTALL Makefile Makefile.in aclocal.m4 config.log config.status configure libtool rmol-config rmol-html-doc-0.*.0.tar.bz2 rmol-html-doc-0.*.0.tar.gz rmol.pc rmol.m4 rmol.spec config.guess config.h config.h.in config.sub configure.log rmol-0.*.0.tar.bz2 rmol-0.*.0.tar.gz stamp-h1 + autom4te.cache INSTALL Makefile Makefile.in aclocal.m4 config.log config.status configure libtool rmol-config rmol-html-doc-0.*.0.tar.bz2 rmol-html-doc-0.*.0.tar.gz rmol.pc rmol.m4 rmol.spec config.guess config.h config.h.in config.sub configure.log rmol-0.*.0.tar.bz2 rmol-0.*.0.tar.gz stamp-h1 mytest Property changes on: trunk/rmol/config ___________________________________________________________________ Modified: svn:ignore - config.guess config.sub depcomp install-sh ltmain.sh mdate-sh missing texinfo.tex codeset.m4 gettext.m4 glibc21.m4 iconv.m4 intdiv0.m4 intmax.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4 lcmessage.m4 lib-ld.m4 lib-link.m4 lib-prefix.m4 longdouble.m4 longlong.m4 mkinstalldirs nls.m4 po.m4 printf-posix.m4 progtest.m4 signed.m4 size_max.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4 wchar_t.m4 wint_t.m4 xsize.m4 + config.guess config.sub depcomp install-sh ltmain.sh mdate-sh missing texinfo.tex codeset.m4 gettext.m4 glibc21.m4 iconv.m4 intdiv0.m4 intmax.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4 lcmessage.m4 lib-ld.m4 lib-link.m4 lib-prefix.m4 longdouble.m4 longlong.m4 mkinstalldirs nls.m4 po.m4 printf-posix.m4 progtest.m4 signed.m4 size_max.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4 wchar_t.m4 wint_t.m4 xsize.m4 libtool.m4 lt~obsolete.m4 ltsugar.m4 ltversion.m4 ltoptions.m4 Modified: trunk/rmol/rmol/RMOL_Service.hpp =================================================================== --- trunk/rmol/rmol/RMOL_Service.hpp 2009-04-02 18:55:23 UTC (rev 193) +++ trunk/rmol/rmol/RMOL_Service.hpp 2009-04-20 08:41:24 UTC (rev 194) @@ -36,6 +36,7 @@ /** Single resource optimization that uses Monte-Carlo algorithm and returns a vector of cumulated booking limits. */ void optimalOptimisationByMCIntegration (const int K, + BidPriceVector_T&, BookingLimitVector_T&); /** Single resource optimization using dynamic programming. */ @@ -57,14 +58,14 @@ /** Single resource optimization that uses EMSR-a heuristic and returns a vector of cumulated booking limits. */ - void heuristicOptimisationByEmsrA (BookingLimitVector_T&); + void heuristicOptimisationByEmsrA (BidPriceVector_T&, BookingLimitVector_T&); /** Single resource optimization using EMSR-b heuristic. */ void heuristicOptimisationByEmsrB (); /** Single resource optimization that uses EMSR-b heuristic and returns a vector of cumulated booking limits. */ - void heuristicOptimisationByEmsrB (BookingLimitVector_T&); + void heuristicOptimisationByEmsrB (BidPriceVector_T&, BookingLimitVector_T&); private: /** Default Constructors. */ Modified: trunk/rmol/rmol/bom/BucketHolder.cpp =================================================================== --- trunk/rmol/rmol/bom/BucketHolder.cpp 2009-04-02 18:55:23 UTC (rev 193) +++ trunk/rmol/rmol/bom/BucketHolder.cpp 2009-04-20 08:41:24 UTC (rev 194) @@ -151,6 +151,22 @@ } // ////////////////////////////////////////////////////////////////////// + const double BucketHolder::getPreviousCumulatedProtection () const { + // Get the cumulated protection of the previous bucket. If the + // current bucket is the first one, the function returns 0.0 + if (_itCurrentBucket == _bucketList.begin()) { + return 0.0; + } else { + BucketList_T::iterator itPreviousBucket = _itCurrentBucket; + --itPreviousBucket; + Bucket* lPreviousBucket_ptr = *itPreviousBucket; + const double oPreviousCumulatedProtection = + lPreviousBucket_ptr->getCumulatedProtection(); + return oPreviousCumulatedProtection; + } + } + + // ////////////////////////////////////////////////////////////////////// void BucketHolder::calculateMeanDemandAndOptimalRevenue () { _totalMeanDemand = 0.0; _optimalRevenue = 0.0; Modified: trunk/rmol/rmol/bom/BucketHolder.hpp =================================================================== --- trunk/rmol/rmol/bom/BucketHolder.hpp 2009-04-02 18:55:23 UTC (rev 193) +++ trunk/rmol/rmol/bom/BucketHolder.hpp 2009-04-20 08:41:24 UTC (rev 194) @@ -43,6 +43,10 @@ /** Get the size of list of buckets/classes. */ const short getSize () const; + /** Get the cumulated protection of the previous bucket. If the + current bucket is the first one, the function returns 0.0. */ + const double getPreviousCumulatedProtection () const; + /** Fill up the vector of cumulated booking limits. */ void fillup (BookingLimitVector_T&) const; Modified: trunk/rmol/rmol/bom/MCOptimiser.cpp =================================================================== --- trunk/rmol/rmol/bom/MCOptimiser.cpp 2009-04-02 18:55:23 UTC (rev 193) +++ trunk/rmol/rmol/bom/MCOptimiser.cpp 2009-04-20 08:41:24 UTC (rev 194) @@ -21,9 +21,10 @@ // ////////////////////////////////////////////////////////////////////// void MCOptimiser:: optimalOptimisationByMCIntegration(const int K, - const ResourceCapacity_T iCabinCapacity, - BucketHolder& ioBucketHolder, - PartialSumHolderHolder& ioPSHolderHolder){ + const ResourceCapacity_T iCabinCapacity, + BucketHolder& ioBucketHolder, + PartialSumHolderHolder& ioPSHolderHolder, + BidPriceVector_T& ioBidPriceVector){ // Retrieve the BucketHolder // BucketHolder& ioBucketHolder = ioResource.getBucketHolder(); @@ -55,8 +56,9 @@ ioPSHolderHolder.iterate(); int Kj = K; int lj = 0; - for (short j=1 ; j <= nbOfClasses - 1; - j++, ioBucketHolder.iterate(), ioPSHolderHolder.iterate()) { + const int cabinCapacityInt = static_cast<int> (iCabinCapacity); + for (short j = 1 ; j <= nbOfClasses - 1; + ++j, ioBucketHolder.iterate(), ioPSHolderHolder.iterate()) { /** Retrieve Bucket(j) (current) and Bucket(j+1) (next). */ Bucket& currentBucket = ioBucketHolder.getCurrentBucket(); Bucket& nextBucket = ioBucketHolder.getNextBucket(); @@ -83,9 +85,9 @@ VariateList_T aVariateList; PartialSumHolder& previousPartialSumList = - ioPSHolderHolder.getPreviousPartialSumHolder(); + ioPSHolderHolder.getPreviousPartialSumHolder(); PartialSumHolder& currentPartialSumList = - ioPSHolderHolder.getCurrentPartialSumHolder(); + ioPSHolderHolder.getCurrentPartialSumHolder(); currentPartialSumList.initSize (Kj); for (int k=1; k <= Kj; k++) { const double djk = gaussianDemandGenerator.generateVariate(); @@ -142,9 +144,6 @@ /** Consistency check. */ assert (lj >= 1 && lj < Kj); - /** Update Kj for the next loop. */ - Kj = Kj - lj; - /** The optimal protection is defined as: y(j) = 1/2 [S(j,lj) + S(j, lj+1)] @@ -161,6 +160,37 @@ // Set the cumulated protection for Bucket(j) (j ranging from 1 to n-1) currentBucket.setCumulatedProtection (yj); + /** Compute the Bid-Price (Opportunity Cost) at index x + (capacity) for x between y(j-1) et y(j). This OC can be + proven to be equal to p(j)*Proba(D1+...+Dk>=x | D1 > y1, + D1+D2 > y2, ..., D1+...+D(k-1) > y(k-1)). */ + + // Get the previous cumulated protection y(j-1). + const double yjm1 = ioBucketHolder.getPreviousCumulatedProtection (); + const int yjm1int = static_cast<int> (yjm1); + const int yjint = static_cast<int> (yj); + int currentIndex = 0; + double currentPartialSum = + currentPartialSumList.getPartialSum (currentIndex); + int x = 0; + + for (x = yjm1int + 1; x <= yjint && x <= cabinCapacityInt; ++x) { + while (currentPartialSum < x) { + ++currentIndex; + if (currentIndex < Kj) { + currentPartialSum = + currentPartialSumList.getPartialSum (currentIndex); + } else { + currentPartialSum = x; + } + } + const double bidPriceAtX = pj * (Kj - currentIndex) / Kj; + ioBidPriceVector.push_back (bidPriceAtX); + } + + /** Update Kj for the next loop. */ + Kj = Kj - lj; + /** S'(j,k) = S(j,k). <br>The previousPartialSumList (S') now becomes equal to the currentPartialSumList (S) (by iteration on ioPSHolderHolder). */ @@ -170,6 +200,61 @@ Bucket& currentBucket = ioBucketHolder.getCurrentBucket(); currentBucket.setCumulatedProtection (iCabinCapacity); + /** Compute the Bid-Price (Opportunity Cost) at index x + (capacity) for x between y(n-1) et cabin capacity. This OC can be + proven to be equal to p(n)*Proba(D1+...+Dn>=x | D1 > y1, + D1+D2 > y2, ..., D1+...+D(n-1) > y(n-1)). */ + + // Get the previous cumulated protection y(n-1). + const double ynm1 = ioBucketHolder.getPreviousCumulatedProtection (); + + if (ynm1 < iCabinCapacity) { + // STEP 1. + const FldDistributionParameters& aDistribParams = + currentBucket.getDistributionParameters(); + const Gaussian gaussianDemandGenerator (aDistribParams); + + VariateList_T aVariateList; + + PartialSumHolder& previousPartialSumList = + ioPSHolderHolder.getPreviousPartialSumHolder(); + PartialSumHolder& currentPartialSumList = + ioPSHolderHolder.getCurrentPartialSumHolder(); + currentPartialSumList.initSize (Kj); + + for (int k = 1; k <= Kj; ++k) { + const double djk = gaussianDemandGenerator.generateVariate(); + aVariateList.push_back (djk); + + const double spjm1lpk = + previousPartialSumList.getPartialSum (lj + k - 1); + const double sjk = spjm1lpk + djk; + currentPartialSumList.addPartialSum (sjk); + } + + // STEP 2. + currentPartialSumList.sort (); + + const int ynm1int = static_cast<int> (ynm1); + const double pn = currentBucket.getAverageYield(); + int currentIndex = 0; + double currentPartialSum = + currentPartialSumList.getPartialSum (currentIndex); + for (int x = ynm1int + 1; x <= cabinCapacityInt; ++x) { + while (currentPartialSum < x) { + ++currentIndex; + if (currentIndex < Kj) { + currentPartialSum = + currentPartialSumList.getPartialSum (currentIndex); + } else { + currentPartialSum = x; + } + } + const double bidPriceAtX = pn * (Kj - currentIndex) / Kj; + ioBidPriceVector.push_back (bidPriceAtX); + } + } + /** Re-calculate the values (protections, bkg limits and cumulated booking limits, the optimal revenue. Modified: trunk/rmol/rmol/bom/MCOptimiser.hpp =================================================================== --- trunk/rmol/rmol/bom/MCOptimiser.hpp 2009-04-02 18:55:23 UTC (rev 193) +++ trunk/rmol/rmol/bom/MCOptimiser.hpp 2009-04-20 08:41:24 UTC (rev 194) @@ -31,9 +31,10 @@ overbooking. */ static void optimalOptimisationByMCIntegration (const int K, - const ResourceCapacity_T, - BucketHolder&, - PartialSumHolderHolder&); + const ResourceCapacity_T, + BucketHolder&, + PartialSumHolderHolder&, + BidPriceVector_T&); }; } #endif // __RMOL_BOM_MCUTILS_HPP Modified: trunk/rmol/rmol/command/Optimiser.cpp =================================================================== --- trunk/rmol/rmol/command/Optimiser.cpp 2009-04-02 18:55:23 UTC (rev 193) +++ trunk/rmol/rmol/command/Optimiser.cpp 2009-04-20 08:41:24 UTC (rev 194) @@ -26,8 +26,9 @@ // ////////////////////////////////////////////////////////////////////// void Optimiser:: optimalOptimisationByMCIntegration (const int K, - const ResourceCapacity_T iCabinCapacity, - BucketHolder& ioBucketHolder) { + const ResourceCapacity_T iCabinCapacity, + BucketHolder& ioBucketHolder, + BidPriceVector_T& ioBidPriceVector) { // Retrieve the BucketHolder // BucketHolder& ioBucketHolder = ioResource.getBucketHolder(); @@ -44,7 +45,7 @@ Note that n-1 corresponds to the size of the parameter list, i.e., n corresponds to the number of classes/buckets. */ - for (short j=0 ; j <= nbOfClasses - 1; j++) { + for (short j = 0 ; j <= nbOfClasses; ++j) { PartialSumHolder& aPartialSumList = FacPartialSumHolder::instance().create (); @@ -54,8 +55,9 @@ // Call the class performing the actual algorithm MCOptimiser::optimalOptimisationByMCIntegration (K, iCabinCapacity, - ioBucketHolder, - aPartialSumHolderHolder); + ioBucketHolder, + aPartialSumHolderHolder, + ioBidPriceVector); } // ////////////////////////////////////////////////////////////////////// Modified: trunk/rmol/rmol/command/Optimiser.hpp =================================================================== --- trunk/rmol/rmol/command/Optimiser.hpp 2009-04-02 18:55:23 UTC (rev 193) +++ trunk/rmol/rmol/command/Optimiser.hpp 2009-04-20 08:41:24 UTC (rev 194) @@ -31,8 +31,9 @@ overbooking. */ static void optimalOptimisationByMCIntegration (const int K, - const ResourceCapacity_T, - BucketHolder&); + const ResourceCapacity_T, + BucketHolder&, + BidPriceVector_T&); /** Dynamic Programming. Modified: trunk/rmol/rmol/service/RMOL_Service.cpp =================================================================== --- trunk/rmol/rmol/service/RMOL_Service.cpp 2009-04-02 18:55:23 UTC (rev 193) +++ trunk/rmol/rmol/service/RMOL_Service.cpp 2009-04-20 08:41:24 UTC (rev 194) @@ -82,17 +82,30 @@ const double iCapacity = _rmolServiceContext->getCapacity(); BucketHolder* ioBucketHolder_ptr = _rmolServiceContext->getBucketHolder(); assert (ioBucketHolder_ptr != NULL); + BidPriceVector_T lBidPriceVector; Optimiser::optimalOptimisationByMCIntegration (K, iCapacity, - *ioBucketHolder_ptr); + *ioBucketHolder_ptr, + lBidPriceVector); // DEBUG RMOL_LOG_DEBUG (ioBucketHolder_ptr->display()); + /* + std::cout << "Bid-Price Vector (BPV): "; + unsigned int size = lBidPriceVector.size(); + + for (unsigned int i = 0; i < size; ++i) { + const double bidPrice = lBidPriceVector.at(i); + std::cout << std::fixed << std::setprecision (2) << bidPrice << " "; + } + std::cout << std::endl; + */ } // ////////////////////////////////////////////////////////////////////// void RMOL_Service:: optimalOptimisationByMCIntegration(const int K, + BidPriceVector_T& ioBidPriceVector, BookingLimitVector_T& ioBookingLimitVector){ assert (_rmolServiceContext != NULL); @@ -101,7 +114,8 @@ assert (ioBucketHolder_ptr != NULL); Optimiser::optimalOptimisationByMCIntegration (K, iCapacity, - *ioBucketHolder_ptr); + *ioBucketHolder_ptr, + ioBidPriceVector); // Fill up booking vector ioBucketHolder_ptr->fillup (ioBookingLimitVector); @@ -152,7 +166,7 @@ RMOL_LOG_DEBUG (ioBucketHolder_ptr->display()); // std::cout << "Bid-Price Vector (BPV): "; - unsigned int size = lBidPriceVector.size(); + // unsigned int size = lBidPriceVector.size(); // for (unsigned int i = 0; i < size; ++i) { // const double bidPrice = lBidPriceVector.at(i); @@ -198,7 +212,8 @@ // ////////////////////////////////////////////////////////////////////// void RMOL_Service:: - heuristicOptimisationByEmsrA (BookingLimitVector_T& ioBookingLimitVector) { + heuristicOptimisationByEmsrA (BidPriceVector_T& ioBidPriceVector, + BookingLimitVector_T& ioBookingLimitVector) { assert (_rmolServiceContext != NULL); const double iCapacity = _rmolServiceContext->getCapacity(); BucketHolder* ioBucketHolder_ptr = _rmolServiceContext->getBucketHolder(); @@ -225,7 +240,8 @@ // ////////////////////////////////////////////////////////////////////// void RMOL_Service:: - heuristicOptimisationByEmsrB (BookingLimitVector_T& ioBookingLimitVector) { + heuristicOptimisationByEmsrB (BidPriceVector_T& ioBidPriceVector, + BookingLimitVector_T& ioBookingLimitVector) { assert (_rmolServiceContext != NULL); const double iCapacity = _rmolServiceContext->getCapacity(); BucketHolder* ioBucketHolder_ptr = _rmolServiceContext->getBucketHolder(); Modified: trunk/rmol/test/OptimiseTestSuite.cpp =================================================================== --- trunk/rmol/test/OptimiseTestSuite.cpp 2009-04-02 18:55:23 UTC (rev 193) +++ trunk/rmol/test/OptimiseTestSuite.cpp 2009-04-20 08:41:24 UTC (rev 194) @@ -24,11 +24,11 @@ const short METHOD_FLAG = 0; // Cabin Capacity (it must be greater then 100 here) - const double cabinCapacity = 500.0; + const double cabinCapacity = 100.0; // Input file name - const std::string inputFileName ("class.csv"); - const bool hasInputFile = false; + const std::string inputFileName ("samples/sample2.csv"); + const bool hasInputFile = true; // Set the log parameters std::ofstream logOutputFile; Deleted: trunk/rmol/test/sample1.csv =================================================================== --- trunk/rmol/test/sample1.csv 2009-04-02 18:55:23 UTC (rev 193) +++ trunk/rmol/test/sample1.csv 2009-04-20 08:41:24 UTC (rev 194) @@ -1,4 +0,0 @@ -price; mean; standard deviation; -100; 20; 9; -70; 45; 12; -42; 80; 16; Deleted: trunk/rmol/test/sample2.csv =================================================================== --- trunk/rmol/test/sample2.csv 2009-04-02 18:55:23 UTC (rev 193) +++ trunk/rmol/test/sample2.csv 2009-04-20 08:41:24 UTC (rev 194) @@ -1,6 +0,0 @@ -../../rmol/service/RMOL_Service.cpp:90: 500Class; Price; Mean; Std Dev; Protection; Cum. Protection; Cum. Bkg Limit; -1; 100([2.22507e-308, 100]), upper yield = 100.00; , mean = 20.00; , std_dev = 9.00; , protection = 15.23; , cumulative protection = 15.23; , booking limit = 0.00, cumulative booking limit = 500.00 -2; 70([2.22507e-308, 70]), upper yield = 70.00; , mean = 45.00; , std_dev = 12.00; , protection = 50.57; , cumulative protection = 65.80; , booking limit = 0.00, cumulative booking limit = 484.77 -3; 42([2.22507e-308, 42]), upper yield = 42.00; , mean = 0.00; , std_dev = 0.00; , protection = 434.20; , cumulative protection = 500.00; , booking limit = 0.00, cumulative booking limit = 434.20 -Cabin Capacity = 500; Total Mean Demand = 65; Demand Factor = 0.13; Optimal Revenue = 23299.5 - Deleted: trunk/rmol/test/sample3.csv =================================================================== --- trunk/rmol/test/sample3.csv 2009-04-02 18:55:23 UTC (rev 193) +++ trunk/rmol/test/sample3.csv 2009-04-20 08:41:24 UTC (rev 194) @@ -1,5 +0,0 @@ -price; mean; standard deviation; -1050; 17.3; 5.8; -950; 45.1; 15.0; -699; 39.6; 13.2; -520; 34.0; 11.3; Deleted: trunk/rmol/test/sample4.csv =================================================================== --- trunk/rmol/test/sample4.csv 2009-04-02 18:55:23 UTC (rev 193) +++ trunk/rmol/test/sample4.csv 2009-04-20 08:41:24 UTC (rev 194) @@ -1,4 +0,0 @@ -price; mean; standard deviation; -1295; 0; 1; -1250; 8; 2.82843; -1205; 4; 2.82843; Copied: trunk/rmol/test/samples/sample1.csv (from rev 193, trunk/rmol/test/sample1.csv) =================================================================== --- trunk/rmol/test/samples/sample1.csv (rev 0) +++ trunk/rmol/test/samples/sample1.csv 2009-04-20 08:41:24 UTC (rev 194) @@ -0,0 +1,4 @@ +price; mean; standard deviation; +100; 20; 9; +70; 45; 12; +42; 80; 16; Copied: trunk/rmol/test/samples/sample2.csv (from rev 193, trunk/rmol/test/sample2.csv) =================================================================== --- trunk/rmol/test/samples/sample2.csv (rev 0) +++ trunk/rmol/test/samples/sample2.csv 2009-04-20 08:41:24 UTC (rev 194) @@ -0,0 +1,5 @@ +price; mean; standard deviation; +1050; 17.3; 5.8; +567; 45.1; 15.0; +534; 39.6; 13.2; +520; 34.0; 11.3; Copied: trunk/rmol/test/samples/sample3.csv (from rev 193, trunk/rmol/test/sample3.csv) =================================================================== --- trunk/rmol/test/samples/sample3.csv (rev 0) +++ trunk/rmol/test/samples/sample3.csv 2009-04-20 08:41:24 UTC (rev 194) @@ -0,0 +1,5 @@ +price; mean; standard deviation; +1050; 17.3; 5.8; +950; 45.1; 15.0; +699; 39.6; 13.2; +520; 34.0; 11.3; Copied: trunk/rmol/test/samples/sample4.csv (from rev 193, trunk/rmol/test/sample4.csv) =================================================================== --- trunk/rmol/test/samples/sample4.csv (rev 0) +++ trunk/rmol/test/samples/sample4.csv 2009-04-20 08:41:24 UTC (rev 194) @@ -0,0 +1,4 @@ +price; mean; standard deviation; +1295; 0; 1; +1250; 8; 2.82843; +1205; 4; 2.82843; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <qua...@us...> - 2009-04-23 17:25:51
|
Revision: 196 http://rmol.svn.sourceforge.net/rmol/?rev=196&view=rev Author: quannaus Date: 2009-04-23 17:25:20 +0000 (Thu, 23 Apr 2009) Log Message: ----------- Added the BasChoronoter service. Modified Paths: -------------- trunk/rmol/rmol/RMOL_Service.hpp trunk/rmol/rmol/basic/sources.mk trunk/rmol/rmol/bom/MCOptimiser.cpp trunk/rmol/rmol/bom/MCOptimiser.hpp trunk/rmol/rmol/bom/Makefile.am trunk/rmol/rmol/bom/PartialSumHolder.cpp trunk/rmol/rmol/bom/PartialSumHolder.hpp trunk/rmol/rmol/bom/sources.mk trunk/rmol/rmol/command/Optimiser.cpp trunk/rmol/rmol/command/Optimiser.hpp trunk/rmol/rmol/factory/sources.mk trunk/rmol/rmol/rmol.cpp trunk/rmol/rmol/service/RMOL_Service.cpp trunk/rmol/rmol/service/RMOL_ServiceContext.cpp trunk/rmol/rmol/service/RMOL_ServiceContext.hpp trunk/rmol/test/samples/sample4.csv Added Paths: ----------- trunk/rmol/rmol/basic/BasChronometer.cpp trunk/rmol/rmol/basic/BasChronometer.hpp trunk/rmol/rmol/bom/StatAggregatorStruct.cpp trunk/rmol/rmol/bom/StatAggregatorStruct.hpp trunk/rmol/rmol/bom/StatAggregatorStructList.hpp trunk/rmol/rmol/bom/StudyStatManager.cpp trunk/rmol/rmol/bom/StudyStatManager.hpp trunk/rmol/rmol/factory/FacStudyStatManager.cpp trunk/rmol/rmol/factory/FacStudyStatManager.hpp Modified: trunk/rmol/rmol/RMOL_Service.hpp =================================================================== --- trunk/rmol/rmol/RMOL_Service.hpp 2009-04-20 08:51:11 UTC (rev 195) +++ trunk/rmol/rmol/RMOL_Service.hpp 2009-04-23 17:25:20 UTC (rev 196) @@ -23,6 +23,9 @@ /** Destructor. */ ~RMOL_Service(); + /** Set up the StudyStatManager. */ + void setUpStudyStatManager (); + /** Add a bucket to the context. */ void addBucket (const double iYieldRange, const double iDemandMean, const double iDemandStandardDev); Added: trunk/rmol/rmol/basic/BasChronometer.cpp =================================================================== --- trunk/rmol/rmol/basic/BasChronometer.cpp (rev 0) +++ trunk/rmol/rmol/basic/BasChronometer.cpp 2009-04-23 17:25:20 UTC (rev 196) @@ -0,0 +1,50 @@ +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// C +#include <assert.h> +// Rmol +#include <rmol/basic/BasChronometer.hpp> +#include <rmol/service/Logger.hpp> + +namespace RMOL { + + // ////////////////////////////////////////////////////////////////////// + BasChronometer::BasChronometer () : _startTimeLaunched (false) { + } + + // ////////////////////////////////////////////////////////////////////// + void BasChronometer::start () { + // Get the time-stamp of now, and store it for later use + _startTime = boost::posix_time::microsec_clock::local_time(); + + // Update the boolean which states whether the chronometer + // is launched + _startTimeLaunched = true; + } + + // ////////////////////////////////////////////////////////////////////// + double BasChronometer::elapsed () const { + assert (_startTimeLaunched == true); + + // Get the time-stamp of now + const boost::posix_time::ptime lStopTime = + boost::posix_time::microsec_clock::local_time(); + + // Calculate the time elapsed since the last time-stamp + const boost::posix_time::time_duration lElapsedTime = + lStopTime - _startTime; + + // Derived the corresponding number of milliseconds + const double lElapsedTimeInMicroSeconds = + static_cast<const double> (lElapsedTime.total_microseconds()); + + /*RMOL_LOG_DEBUG ("Elapsed: " << lElapsedTime + << "; (micros): " + << lElapsedTimeInMicroSeconds / 1e6);*/ + + // The elapsed time given in return is expressed in seconds + return (lElapsedTimeInMicroSeconds / 1e6); + } + +} Added: trunk/rmol/rmol/basic/BasChronometer.hpp =================================================================== --- trunk/rmol/rmol/basic/BasChronometer.hpp (rev 0) +++ trunk/rmol/rmol/basic/BasChronometer.hpp 2009-04-23 17:25:20 UTC (rev 196) @@ -0,0 +1,40 @@ +#ifndef __RMOL_COM_BAS_BASCHRONOMETER_HPP +#define __RMOL_COM_BAS_BASCHRONOMETER_HPP + +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// Boost Date-Time (http://boost.org/doc/html/date_time/posix_time.html) +#include <boost/date_time/posix_time/posix_time.hpp> + +namespace RMOL { + + /** Structure allowing measuring the time elapsed between two events. */ + struct BasChronometer { + /** Constructor. */ + BasChronometer(); + + /** Start the chronometer from the local time + <br>The elapsed time given is the one elapsed since the start + is launched. */ + void start (); + + /** Get the start time. */ + std::string getStart () const { + return boost::posix_time::to_simple_string (_startTime); + } + + /** Return the time elapsed since the structure has been instanciated. + <br>That elapsed time is expressed in seconds. */ + double elapsed () const; + + private: + /** Start time. */ + boost::posix_time::ptime _startTime; + + /** Boolean which states whether the chronometer is started or not.*/ + bool _startTimeLaunched; + }; + +} +#endif // __RMOL_COM_BAS_BASCHRONOMETER_HPP Modified: trunk/rmol/rmol/basic/sources.mk =================================================================== --- trunk/rmol/rmol/basic/sources.mk 2009-04-20 08:51:11 UTC (rev 195) +++ trunk/rmol/rmol/basic/sources.mk 2009-04-23 17:25:20 UTC (rev 196) @@ -1,4 +1,6 @@ bas_h_sources = $(top_srcdir)/rmol/basic/BasConst_General.hpp \ $(top_srcdir)/rmol/basic/BasConst_Overbooking.hpp \ - $(top_srcdir)/rmol/basic/BasConst_RMOL_Service.hpp -bas_cc_sources = $(top_srcdir)/rmol/basic/BasConst.cpp + $(top_srcdir)/rmol/basic/BasConst_RMOL_Service.hpp \ + $(top_srcdir)/rmol/basic/BasChronometer.hpp +bas_cc_sources = $(top_srcdir)/rmol/basic/BasConst.cpp \ + $(top_srcdir)/rmol/basic/BasChronometer.cpp Modified: trunk/rmol/rmol/bom/MCOptimiser.cpp =================================================================== --- trunk/rmol/rmol/bom/MCOptimiser.cpp 2009-04-20 08:51:11 UTC (rev 195) +++ trunk/rmol/rmol/bom/MCOptimiser.cpp 2009-04-23 17:25:20 UTC (rev 196) @@ -4,9 +4,13 @@ // C #include <assert.h> // STL +#include <string> +#include <fstream> #include <iostream> #include <cmath> // RMOL +#include <rmol/basic/BasChronometer.hpp> +#include <rmol/bom/StudyStatManager.hpp> #include <rmol/bom/VariateList.hpp> #include <rmol/bom/Gaussian.hpp> #include <rmol/bom/Bucket.hpp> @@ -163,27 +167,18 @@ /** Compute the Bid-Price (Opportunity Cost) at index x (capacity) for x between y(j-1) et y(j). This OC can be proven to be equal to p(j)*Proba(D1+...+Dk>=x | D1 > y1, - D1+D2 > y2, ..., D1+...+D(k-1) > y(k-1)). */ + D1+D2 > y2, ..., D1+...+D(k-1) > y(k-1)). + */ // Get the previous cumulated protection y(j-1). const double yjm1 = ioBucketHolder.getPreviousCumulatedProtection (); const int yjm1int = static_cast<int> (yjm1); const int yjint = static_cast<int> (yj); int currentIndex = 0; - double currentPartialSum = - currentPartialSumList.getPartialSum (currentIndex); - int x = 0; - - for (x = yjm1int + 1; x <= yjint && x <= cabinCapacityInt; ++x) { - while (currentPartialSum < x) { - ++currentIndex; - if (currentIndex < Kj) { - currentPartialSum = - currentPartialSumList.getPartialSum (currentIndex); - } else { - currentPartialSum = x; - } - } + + for (int x = yjm1int + 1; + x <= yjint && x <= cabinCapacityInt; ++x) { + currentIndex = currentPartialSumList.getLowerBound (x); const double bidPriceAtX = pj * (Kj - currentIndex) / Kj; ioBidPriceVector.push_back (bidPriceAtX); } @@ -238,18 +233,8 @@ const int ynm1int = static_cast<int> (ynm1); const double pn = currentBucket.getAverageYield(); int currentIndex = 0; - double currentPartialSum = - currentPartialSumList.getPartialSum (currentIndex); for (int x = ynm1int + 1; x <= cabinCapacityInt; ++x) { - while (currentPartialSum < x) { - ++currentIndex; - if (currentIndex < Kj) { - currentPartialSum = - currentPartialSumList.getPartialSum (currentIndex); - } else { - currentPartialSum = x; - } - } + currentIndex = currentPartialSumList.getLowerBound (x); const double bidPriceAtX = pn * (Kj - currentIndex) / Kj; ioBidPriceVector.push_back (bidPriceAtX); } @@ -262,4 +247,259 @@ ioBucketHolder.recalculate (); } + // ////////////////////////////////////////////////////////////////////// + void MCOptimiser:: + optimalOptimisationByMCIntegration(const int K, + const ResourceCapacity_T iCabinCapacity, + BucketHolder& ioBucketHolder, + PartialSumHolderHolder& ioPSHolderHolder, + BidPriceVector_T& ioBidPriceVector, + StudyStatManager& ioStudyStatManager){ + // Retrieve the BucketHolder + // BucketHolder& ioBucketHolder = ioResource.getBucketHolder(); + + BasChronometer lWithdrawBasChronometer; + BasChronometer lSortBasChronometer; + BasChronometer lBVPCalculationBasChronometer; + + // Number of classes/buckets: n + const short nbOfClasses = ioBucketHolder.getSize(); + + /** + Initialise the partial sum vector representing the last step within + the algorithm below. + <br>At the beginning of the algorithm, the partial sums need to be + null. Then, the generated demand (variates) will be added + incrementally. + */ + ioPSHolderHolder.begin(); + PartialSumHolder& firstPartialSumHolder = + ioPSHolderHolder.getCurrentPartialSumHolder(); + firstPartialSumHolder.initSize (K); + + for (int k=1 ; k <= K; k++) { + firstPartialSumHolder.addPartialSum (0.0); + } + + /** + Iterate on the classes/buckets, from 1 to n-1. + Note that n-1 corresponds to the size of the parameter list, + i.e., n corresponds to the number of classes/buckets. + */ + ioBucketHolder.begin(); + ioPSHolderHolder.iterate(); + int Kj = K; + int lj = 0; + const int cabinCapacityInt = static_cast<int> (iCabinCapacity); + for (short j = 1 ; j <= nbOfClasses - 1; + ++j, ioBucketHolder.iterate(), ioPSHolderHolder.iterate()) { + /** Retrieve Bucket(j) (current) and Bucket(j+1) (next). */ + Bucket& currentBucket = ioBucketHolder.getCurrentBucket(); + Bucket& nextBucket = ioBucketHolder.getNextBucket(); + + // STEP 1. + /** + Initialise the random generator with the distribution parameters of + the demand for the current class/bucket, j. + */ + const FldDistributionParameters& aDistribParams = + currentBucket.getDistributionParameters(); + const Gaussian gaussianDemandGenerator (aDistribParams); + + /** DEBUG + std::cout << "[" << j << "]: " << Kj << " values with N ( " + << aDistribParams.getMean() << ", " + << aDistribParams.getStandardDeviation() << ")." << std::endl; + */ + + /** + Iterate on the random draws: generate random variates, d(j,k) + for the current class/bucket demand, j, and for k=1 to Kj. + */ + VariateList_T aVariateList; + + PartialSumHolder& previousPartialSumList = + ioPSHolderHolder.getPreviousPartialSumHolder(); + PartialSumHolder& currentPartialSumList = + ioPSHolderHolder.getCurrentPartialSumHolder(); + currentPartialSumList.initSize (Kj); + lWithdrawBasChronometer.start(); + for (int k=1; k <= Kj; k++) { + const double djk = gaussianDemandGenerator.generateVariate(); + aVariateList.push_back (djk); + + /** + Calculate the partial sums: + <br> + S(j,k)= d(1,k) + d(2,k) + ... + d(j,k),for a given k and j=1 to n-1 + Note that n-1 corresponds to the size of the parameter list, + i.e., n corresponds to the number of classes/buckets. + <br> + Hence: S(j,k) = S'(j-1, l+k) + d(j,k). + */ + const double spjm1lpk = + previousPartialSumList.getPartialSum (lj + k - 1); + const double sjk = spjm1lpk + djk; + currentPartialSumList.addPartialSum (sjk); + + /* DEBUG + std::cout << "d(" << j << ", " << k << "); " << djk + << "; S'(" << j-1 << ", " << lj+k << "); " << spjm1lpk + << "; S(" << j << ", " << k << "); " << sjk << std::endl; + */ + } + + const double lWithdrawTimeValue = lWithdrawBasChronometer.elapsed(); + ioStudyStatManager.addMeasure ("WithdrawTime", lWithdrawTimeValue); + + // STEP 2. + /** + Sort the partial sum vectors S(j,k) on k, for the current j. + */ + lSortBasChronometer.start(); + currentPartialSumList.sort (); + const double lSortTimeValue = lSortBasChronometer.elapsed(); + ioStudyStatManager.addMeasure ("SortTime", lSortTimeValue); + + /** Retrieve the prices for Bucket(j) and Bucket(j+1). */ + const double pj = currentBucket.getAverageYield(); + const double pj1 = nextBucket.getAverageYield(); + + /** Consistency check: the yield/price of a higher class/bucket + (with the j index lower) must be higher. */ + assert (pj > pj1); + + /** + The optimal index is defined as: + lj = floor {[p(j)-p(j+1)]/p(j) . K} + */ + const double ljdouble = std::floor (Kj * (pj - pj1) / pj); + lj = static_cast<int> (ljdouble); + + /** DEBUG + std::cout << "p(j+1)/p(j) = " << pj1 / pj << ", lj = " << lj + << ", Kj = " << Kj << " => " << Kj - lj << " points above y(j)" + << std::endl; + */ + + /** Consistency check. */ + assert (lj >= 1 && lj < Kj); + + /** + The optimal protection is defined as: + y(j) = 1/2 [S(j,lj) + S(j, lj+1)] + */ + const double sjl = currentPartialSumList.getPartialSum (lj - 1); + const double sjlp1 = currentPartialSumList.getPartialSum (lj + 1 - 1); + const double yj = (sjl + sjlp1) / 2; + + /** DEBUG + std::cout << "S(j,l) = " << sjl << ", S(j,l+1) = " << sjlp1 + << ", y(j) = " << yj << std::endl; + */ + + // Set the cumulated protection for Bucket(j) (j ranging from 1 to n-1) + currentBucket.setCumulatedProtection (yj); + + /** Compute the Bid-Price (Opportunity Cost) at index x + (capacity) for x between y(j-1) et y(j). This OC can be + proven to be equal to p(j)*Proba(D1+...+Dk>=x | D1 > y1, + D1+D2 > y2, ..., D1+...+D(k-1) > y(k-1)). + */ + + // Get the previous cumulated protection y(j-1). + const double yjm1 = ioBucketHolder.getPreviousCumulatedProtection (); + const int yjm1int = static_cast<int> (yjm1); + const int yjint = static_cast<int> (yj); + int currentIndex = 0; + + lBVPCalculationBasChronometer.start(); + for (int x = yjm1int + 1; + x <= yjint && x <= cabinCapacityInt; ++x) { + currentIndex = currentPartialSumList.getLowerBound (x); + const double bidPriceAtX = pj * (Kj - currentIndex) / Kj; + ioBidPriceVector.push_back (bidPriceAtX); + } + const double lBVPCalculationTimeValue = + lBVPCalculationBasChronometer.elapsed(); + ioStudyStatManager.addMeasure ("BVPCalculationTime", + lBVPCalculationTimeValue); + + /** Update Kj for the next loop. */ + Kj = Kj - lj; + + /** S'(j,k) = S(j,k). + <br>The previousPartialSumList (S') now becomes equal to the + currentPartialSumList (S) (by iteration on ioPSHolderHolder). */ + } + + // Set the protection of Bucket(n) to be equal to the capacity + Bucket& currentBucket = ioBucketHolder.getCurrentBucket(); + currentBucket.setCumulatedProtection (iCabinCapacity); + + /** Compute the Bid-Price (Opportunity Cost) at index x + (capacity) for x between y(n-1) et cabin capacity. This OC can be + proven to be equal to p(n)*Proba(D1+...+Dn>=x | D1 > y1, + D1+D2 > y2, ..., D1+...+D(n-1) > y(n-1)). */ + + // Get the previous cumulated protection y(n-1). + const double ynm1 = ioBucketHolder.getPreviousCumulatedProtection (); + + if (ynm1 < iCabinCapacity) { + // STEP 1. + const FldDistributionParameters& aDistribParams = + currentBucket.getDistributionParameters(); + const Gaussian gaussianDemandGenerator (aDistribParams); + + VariateList_T aVariateList; + + PartialSumHolder& previousPartialSumList = + ioPSHolderHolder.getPreviousPartialSumHolder(); + PartialSumHolder& currentPartialSumList = + ioPSHolderHolder.getCurrentPartialSumHolder(); + currentPartialSumList.initSize (Kj); + + lWithdrawBasChronometer.start(); + for (int k = 1; k <= Kj; ++k) { + const double djk = gaussianDemandGenerator.generateVariate(); + aVariateList.push_back (djk); + + const double spjm1lpk = + previousPartialSumList.getPartialSum (lj + k - 1); + const double sjk = spjm1lpk + djk; + currentPartialSumList.addPartialSum (sjk); + } + + const double lWithdrawTimeValue = lWithdrawBasChronometer.elapsed(); + ioStudyStatManager.addMeasure ("WithdrawTime", lWithdrawTimeValue); + + // STEP 2. + lSortBasChronometer.start(); + currentPartialSumList.sort (); + const double lSortTimeValue = lSortBasChronometer.elapsed(); + ioStudyStatManager.addMeasure ("SortTime", lSortTimeValue); + + const int ynm1int = static_cast<int> (ynm1); + const double pn = currentBucket.getAverageYield(); + int currentIndex = 0; + + lBVPCalculationBasChronometer.start(); + for (int x = ynm1int + 1; x <= cabinCapacityInt; ++x) { + currentIndex = currentPartialSumList.getLowerBound (x); + const double bidPriceAtX = pn * (Kj - currentIndex) / Kj; + ioBidPriceVector.push_back (bidPriceAtX); + } + const double lBVPCalculationTimeValue = + lBVPCalculationBasChronometer.elapsed(); + ioStudyStatManager.addMeasure ("BVPCalculationTime", + lBVPCalculationTimeValue); + } + + /** + Re-calculate the values (protections, bkg limits and cumulated + booking limits, the optimal revenue. + */ + ioBucketHolder.recalculate (); + } + } Modified: trunk/rmol/rmol/bom/MCOptimiser.hpp =================================================================== --- trunk/rmol/rmol/bom/MCOptimiser.hpp 2009-04-20 08:51:11 UTC (rev 195) +++ trunk/rmol/rmol/bom/MCOptimiser.hpp 2009-04-23 17:25:20 UTC (rev 196) @@ -13,7 +13,8 @@ //class Resource; class BucketHolder; class PartialSumHolderHolder; - + class StudyStatManager; + /** Utility methods for the Monte-Carlo algorithms. */ class MCOptimiser { public: @@ -35,6 +36,15 @@ BucketHolder&, PartialSumHolderHolder&, BidPriceVector_T&); + /** + Monte Carlo algorithm with StudyStatManager. + */ + static void optimalOptimisationByMCIntegration (const int K, + const ResourceCapacity_T, + BucketHolder&, + PartialSumHolderHolder&, + BidPriceVector_T&, + StudyStatManager&); }; } #endif // __RMOL_BOM_MCUTILS_HPP Modified: trunk/rmol/rmol/bom/Makefile.am =================================================================== --- trunk/rmol/rmol/bom/Makefile.am 2009-04-20 08:51:11 UTC (rev 195) +++ trunk/rmol/rmol/bom/Makefile.am 2009-04-23 17:25:20 UTC (rev 196) @@ -7,11 +7,11 @@ noinst_LTLIBRARIES += libbom_debug.la endif libbom_la_SOURCES= $(bom_h_sources) $(bom_cc_sources) -libbom_la_CXXFLAGS = $(CXXFLAGS_OPT) $(GSL_CFLAGS) +libbom_la_CXXFLAGS = $(CXXFLAGS_OPT) $(GSL_CFLAGS) $(BOOST_CFLAGS) libbom_la_LIBADD = $(GSL_LIBS) libbom_debug_la_SOURCES = $(bom_h_sources) $(bom_cc_sources) -libbom_debug_la_CXXFLAGS = $(CXXFLAGS_DEBUG) $(GSL_CFLAGS) +libbom_debug_la_CXXFLAGS = $(CXXFLAGS_DEBUG) $(GSL_CFLAGS) $(BOOST_CFLAGS) libbom_debug_la_LIBADD = $(GSL_LIBS) #pkgincludedir = $(includedir)/@PACKAGE@/bom Modified: trunk/rmol/rmol/bom/PartialSumHolder.cpp =================================================================== --- trunk/rmol/rmol/bom/PartialSumHolder.cpp 2009-04-20 08:51:11 UTC (rev 195) +++ trunk/rmol/rmol/bom/PartialSumHolder.cpp 2009-04-23 17:25:20 UTC (rev 196) @@ -94,4 +94,12 @@ std::sort (_partialSumList.begin(), _partialSumList.end()); } + // ////////////////////////////////////////////////////////////////////// + const int PartialSumHolder::getLowerBound (const double& value) const { + PartialSumList_T::const_iterator itLowerBound = + std::lower_bound (_partialSumList.begin(), _partialSumList.end() , value); + const int position = itLowerBound - _partialSumList.begin(); + return position; + } + } Modified: trunk/rmol/rmol/bom/PartialSumHolder.hpp =================================================================== --- trunk/rmol/rmol/bom/PartialSumHolder.hpp 2009-04-20 08:51:11 UTC (rev 195) +++ trunk/rmol/rmol/bom/PartialSumHolder.hpp 2009-04-23 17:25:20 UTC (rev 196) @@ -25,6 +25,10 @@ /** Get the k-th element (partial sum). */ const double getPartialSum (const int k) const; + /** Get the position of the first element that is equal or greater + than the given value. */ + const int getLowerBound (const double& value) const; + /** Reserve the space for K elements (partial sums). */ void initSize (const int K); Added: trunk/rmol/rmol/bom/StatAggregatorStruct.cpp =================================================================== --- trunk/rmol/rmol/bom/StatAggregatorStruct.cpp (rev 0) +++ trunk/rmol/rmol/bom/StatAggregatorStruct.cpp 2009-04-23 17:25:20 UTC (rev 196) @@ -0,0 +1,89 @@ +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// C +#include <assert.h> +// STL +#include <limits> +#include <stdexcept> +// RMOL +#include <rmol/service/Logger.hpp> +#include <rmol/bom/StatAggregatorStruct.hpp> + +namespace RMOL { + + // ////////////////////////////////////////////////////////////////////// + StatAggregatorStruct_T:: + StatAggregatorStruct_T (const StudyStatManager& iStudyStatMgr, + const std::string& iKey) : + _studyStatMgr (iStudyStatMgr), _key (iKey), + _nbOfEvents (0), + _minimal (std::numeric_limits<int>::max()), + _maximal (std::numeric_limits<int>::min()), + _average (0.0), + _totalTime (0.0){ + } + + // ////////////////////////////////////////////////////////////////////// + StatAggregatorStruct_T::StatAggregatorStruct_T + (const StatAggregatorStruct_T& iStatAggregatorStruct) + : _studyStatMgr (iStatAggregatorStruct.getStudyStatMgr()), + _key (iStatAggregatorStruct.getPrimaryKey()), + _nbOfEvents (iStatAggregatorStruct.getNumberOfEvents()), + _minimal (iStatAggregatorStruct.getMinimum()), + _maximal (iStatAggregatorStruct.getMaximum()), + _average (iStatAggregatorStruct.getAverage()), + _totalTime (iStatAggregatorStruct.getTotalTime()){ + } + + // ////////////////////////////////////////////////////////////////////// + const std::string StatAggregatorStruct_T::describeCurrentSimu() const { + std::ostringstream ostr; + ostr << describeKey() << " - nb of events: " << _nbOfEvents << ", min: " + << _minimal << ", max: " << _maximal << ", average :" << _average + << ", total time: " << _totalTime; + return ostr.str(); + } + + // ////////////////////////////////////////////////////////////////////// + const std::string StatAggregatorStruct_T::describe() const { + std::ostringstream ostr; + ostr << describeKey() << " - nb of events: " << _nbOfEvents << ", min: " + << _minimal << ", max: " << _maximal << ", average :" << _average + << ", average total time: " << _totalTime; + return ostr.str(); + } + + // ////////////////////////////////////////////////////////////////////// + const std::string StatAggregatorStruct_T::describeKey() const { + return _key; + } + + // ////////////////////////////////////////////////////////////////////// + void StatAggregatorStruct_T::display() const { + std::cout << describe() << std::endl; + } + + // ////////////////////////////////////////////////////////////////////// + void StatAggregatorStruct_T::addMeasure(const double iMeasure) { + // Set a new minimal value if the measure is lower than the minimum + if (iMeasure < _minimal) { + _minimal = iMeasure; + } + + // Set a new maximal value if the measure is greater than the maximum + if (iMeasure > _maximal) { + _maximal = iMeasure; + } + + // adding up the new measure to the average + _average = (_average * _nbOfEvents + iMeasure ) / (_nbOfEvents+1); + + // Increment the total time spent + _totalTime += iMeasure; + + // increment the number of event + _nbOfEvents++; + } + +} Added: trunk/rmol/rmol/bom/StatAggregatorStruct.hpp =================================================================== --- trunk/rmol/rmol/bom/StatAggregatorStruct.hpp (rev 0) +++ trunk/rmol/rmol/bom/StatAggregatorStruct.hpp 2009-04-23 17:25:20 UTC (rev 196) @@ -0,0 +1,110 @@ +#ifndef __RMOL_BOM_STATAGGREGATORSTRUCT_HPP +#define __RMOL_BOM_STATAGGREGATORSTRUCT_HPP + +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// STL +#include <iostream> +#include <string> + +namespace RMOL { + + // Forward declarations + class StudyStatManager; + + /** Utility Structure for the aggregator of statistic values. */ + struct StatAggregatorStruct_T { + /** Constructors. */ + StatAggregatorStruct_T (const StudyStatManager&, + const std::string&); + + StatAggregatorStruct_T (const StatAggregatorStruct_T&); + + // /////////// Getters ////////////// + /** Get the parent class. */ + const StudyStatManager& getParent() const { + return getStudyStatMgr(); + } + + /** Get the StudyStatManager (parent class). */ + const StudyStatManager& getStudyStatMgr() const { + return _studyStatMgr; + } + + /** Get the primary key. */ + const std::string getPrimaryKey() const { + return getStatAggregatorStructKey(); + } + + /** Get the StatAggregatorStruct key. */ + const std::string getStatAggregatorStructKey() const { + return _key; + } + + /** Get the number of events. */ + const unsigned int getNumberOfEvents() const { + return _nbOfEvents; + } + + /** Get the minimal value. */ + const double getMinimum() const { + return _minimal; + } + + /** Get the maximal value. */ + const double getMaximum() const { + return _maximal; + } + + /** Get the average value. */ + const double getAverage() const { + return _average; + } + + /** Get the total time value (in seconds). */ + const double getTotalTime() const { + return _totalTime; + } + + // ///////// Setters ////////// + + // ///////// Display Methods ////////// + /** Give a description of the structure for the current simulation. */ + const std::string describeCurrentSimu() const; + + /** Give a description of the structure (which is a resume of statistics + from all simulation runs). */ + const std::string describe() const; + + /** Get a string describing the key. */ + const std::string describeKey() const; + + /** Display the StatAggregatorStruct context. */ + void display() const; + + // ///////// Business Methods ////////// + /** add meassure. */ + void addMeasure (const double); + + private: + // /////////////// Attributes ////////// + // Parent + /** Parent class: StudyStatManager. */ + const StudyStatManager& _studyStatMgr; + + // Primary Key + /** StatAggregatorStruct Key is composed of a dedicated string. */ + std::string _key; + + // Attributes + unsigned int _nbOfEvents; + double _minimal; + double _maximal; + double _average; + double _totalTime; + + }; + +} +#endif // __RMOL_BOM_STATAGGREGATORSTRUCT_HPP Added: trunk/rmol/rmol/bom/StatAggregatorStructList.hpp =================================================================== --- trunk/rmol/rmol/bom/StatAggregatorStructList.hpp (rev 0) +++ trunk/rmol/rmol/bom/StatAggregatorStructList.hpp 2009-04-23 17:25:20 UTC (rev 196) @@ -0,0 +1,19 @@ +#ifndef __RMOL_BOM_STATAGGREGATORSTRUCTLIST_HPP +#define __RMOL_BOM_STATAGGREGATORSTRUCTLIST_HPP + +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// STL +#include <string> +#include <map> + +namespace RMOL { + + /** Forward declarations. */ + struct StatAggregatorStruct_T; + + /** Define list of statistic aggregators. */ + typedef std::map<std::string, StatAggregatorStruct_T> StatAggregatorStructList_T; +} +#endif // __RMOL_BOM_STATAGGREGATORSTRUCTLIST_HPP Added: trunk/rmol/rmol/bom/StudyStatManager.cpp =================================================================== --- trunk/rmol/rmol/bom/StudyStatManager.cpp (rev 0) +++ trunk/rmol/rmol/bom/StudyStatManager.cpp 2009-04-23 17:25:20 UTC (rev 196) @@ -0,0 +1,119 @@ +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// C +#include <assert.h> +// STL +#include <limits> +// RMOL Common +#include <rmol/service/Logger.hpp> +#include <rmol/bom/StatAggregatorStruct.hpp> +#include <rmol/bom/StudyStatManager.hpp> + +namespace RMOL { + + // ////////////////////////////////////////////////////////////////////// + StudyStatManager::StudyStatManager () { + } + + // ////////////////////////////////////////////////////////////////////// + StudyStatManager::~StudyStatManager () { + } + + // ////////////////////////////////////////////////////////////////////// + const std::string StudyStatManager::describe() const { + std::ostringstream ostr; + + for (StatAggregatorStructList_T::const_iterator itStatAggregatorStruct = + _statAggregatorStructList.begin(); + itStatAggregatorStruct != _statAggregatorStructList.end(); + ++itStatAggregatorStruct) { + const StatAggregatorStruct_T& lStatAggregatorStruct = + itStatAggregatorStruct->second; + + ostr << lStatAggregatorStruct.describeCurrentSimu() << std::endl; + } + + return ostr.str(); + } + + // ////////////////////////////////////////////////////////////////////// + void StudyStatManager::display() const { + + // Store current formatting flags of std::cout + std::ios::fmtflags oldFlags = std::cout.flags(); + + for (StatAggregatorStructList_T::const_iterator itStatAggregatorStruct = + _statAggregatorStructList.begin(); + itStatAggregatorStruct != _statAggregatorStructList.end(); + ++itStatAggregatorStruct) { + const StatAggregatorStruct_T& lStatAggregatorStruct = + itStatAggregatorStruct->second; + + std::cout << lStatAggregatorStruct.describeCurrentSimu() << std::endl; + } + + // Reset formatting flags of std::cout + std::cout.flags (oldFlags); + } + + // ////////////////////////////////////////////////////////////////////// + StatAggregatorStruct_T& StudyStatManager:: + getStatAggregator(const std::string& iStatAggregatorName) { + StatAggregatorStructList_T::iterator itAggregatorStruct = + _statAggregatorStructList.find (iStatAggregatorName); + + // If the StatAggregatorStruct does not exist, it is created + if (itAggregatorStruct == _statAggregatorStructList.end()) { + StatAggregatorStruct_T lStatAggregatorStruct (*this, iStatAggregatorName); + _statAggregatorStructList. + insert (StatAggregatorStructList_T:: + value_type (lStatAggregatorStruct.describeKey(), + lStatAggregatorStruct)); + itAggregatorStruct = + _statAggregatorStructList.find (iStatAggregatorName); + } + + return itAggregatorStruct->second; + } + + // ////////////////////////////////////////////////////////////////////// + void StudyStatManager::addMeasure (const std::string iStatAggregatorName, + const double iMeasureValue) { + // retrieve the corresponding statAggregator or create it + StatAggregatorStruct_T& lStatAggregator = + getStatAggregator(iStatAggregatorName); + + // add new measure + lStatAggregator.addMeasure(iMeasureValue); + } + + + // ////////////////////////////////////////////////////////////////////// + const std::string StudyStatManager::describeShortKey() const { + std::ostringstream oStr; + return oStr.str(); + } + + // ////////////////////////////////////////////////////////////////////// + const std::string StudyStatManager::describeKey() const { + return describeShortKey(); + } + + // ////////////////////////////////////////////////////////////////////// + std::string StudyStatManager::toString() const { + std::ostringstream oStr; + return oStr.str(); + } + + // ////////////////////////////////////////////////////////////////////// + void StudyStatManager::toStream (std::ostream& ioOut) const { + ioOut << toString(); + } + + // ////////////////////////////////////////////////////////////////////// + void StudyStatManager::fromStream (std::istream& ioIn) { + } + + +} Added: trunk/rmol/rmol/bom/StudyStatManager.hpp =================================================================== --- trunk/rmol/rmol/bom/StudyStatManager.hpp (rev 0) +++ trunk/rmol/rmol/bom/StudyStatManager.hpp 2009-04-23 17:25:20 UTC (rev 196) @@ -0,0 +1,77 @@ +#ifndef __RMOL_BOM_STUDYSTATMANAGER_HPP +#define __RMOL_BOM_STUDYSTATMANAGER_HPP + +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// RMOL +#include <rmol/bom/BomAbstract.hpp> +#include <rmol/bom/StatAggregatorStructList.hpp> + +namespace RMOL { + + /** Class managing all the statistics in the process. */ + class StudyStatManager : public BomAbstract { + friend class FacStudyStatManager; + public: + // /////////// Getters ////////////// + /** Function which returns the statAggregatorStruct corresponding + to the string given in parameter. + If it does not exist, it is created.*/ + StatAggregatorStruct_T& getStatAggregator(const std::string&); + + // ///////// Busines methods ////////// + /** Dump a Business Object into an output stream. + @param ostream& the output stream. */ + void toStream (std::ostream&) const; + + /** Read a Business Object from an input stream. + @param istream& the input stream. */ + void fromStream (std::istream&); + + /** Get the serialised version of the Place object. */ + std::string toString() const; + + /** Get a string describing the whole key (differentiating two objects + at any level). */ + const std::string describeKey() const; + + /** Get a string describing the short key (differentiating two objects + at the same level). */ + const std::string describeShortKey() const; + + /** Setting up a measure. */ + void addMeasure (const std::string, const double); + + // ///////// Display Methods ////////// + /** Give a description of the statistics (for display purposes). */ + const std::string describe() const; + + /** Display the full StudyStatManager context. */ + void display() const; + + private: + /** Constructors are private so as to force the usage of the Factory + layer. */ + /** Default constructors. */ + StudyStatManager (); + StudyStatManager (const StudyStatManager&); + + /** Destructor. */ + virtual ~StudyStatManager(); + + /** Get the list of stat aggregators for the current simulation. */ + StatAggregatorStructList_T& getStatAggregatorStructList() { + return _statAggregatorStructList; + } + + private: + + /** StatAggregatorStructList_T which is a STL map linking + StatAggregatorStruct Keys and StatAggregatorStruct for the + current simulation. */ + StatAggregatorStructList_T _statAggregatorStructList; + }; + +} +#endif // __RMOL_BOM_STUDYSTATMANAGER_HPP Modified: trunk/rmol/rmol/bom/sources.mk =================================================================== --- trunk/rmol/rmol/bom/sources.mk 2009-04-20 08:51:11 UTC (rev 195) +++ trunk/rmol/rmol/bom/sources.mk 2009-04-23 17:25:20 UTC (rev 196) @@ -15,7 +15,10 @@ $(top_srcdir)/rmol/bom/Overbooking.hpp \ $(top_srcdir)/rmol/bom/MCOptimiser.hpp \ $(top_srcdir)/rmol/bom/DPOptimiser.hpp \ - $(top_srcdir)/rmol/bom/MAForecast.hpp + $(top_srcdir)/rmol/bom/MAForecast.hpp \ + $(top_srcdir)/rmol/bom/StatAggregatorStruct.hpp \ + $(top_srcdir)/rmol/bom/StatAggregatorStructList.hpp \ + $(top_srcdir)/rmol/bom/StudyStatManager.hpp bom_cc_sources = $(top_srcdir)/rmol/bom/BomAbstract.cpp \ $(top_srcdir)/rmol/bom/Bucket.cpp \ $(top_srcdir)/rmol/bom/BucketHolder.cpp \ @@ -28,5 +31,7 @@ $(top_srcdir)/rmol/bom/Overbooking.cpp \ $(top_srcdir)/rmol/bom/MCOptimiser.cpp \ $(top_srcdir)/rmol/bom/DPOptimiser.cpp \ - $(top_srcdir)/rmol/bom/MAForecast.cpp + $(top_srcdir)/rmol/bom/MAForecast.cpp \ + $(top_srcdir)/rmol/bom/StatAggregatorStruct.cpp \ + $(top_srcdir)/rmol/bom/StudyStatManager.cpp Modified: trunk/rmol/rmol/command/Optimiser.cpp =================================================================== --- trunk/rmol/rmol/command/Optimiser.cpp 2009-04-20 08:51:11 UTC (rev 195) +++ trunk/rmol/rmol/command/Optimiser.cpp 2009-04-23 17:25:20 UTC (rev 196) @@ -62,6 +62,45 @@ // ////////////////////////////////////////////////////////////////////// void Optimiser:: + optimalOptimisationByMCIntegration (const int K, + const ResourceCapacity_T iCabinCapacity, + BucketHolder& ioBucketHolder, + BidPriceVector_T& ioBidPriceVector, + StudyStatManager& ioStudyStatManager) { + // Retrieve the BucketHolder + // BucketHolder& ioBucketHolder = ioResource.getBucketHolder(); + + // Number of classes/buckets: n + const short nbOfClasses = ioBucketHolder.getSize(); + + // Create a holder for the list of Partial Sum Lists + PartialSumHolderHolder& aPartialSumHolderHolder = + FacPartialSumHolderHolder::instance().create(); + + /** + Instanciate the list of PartialSumHolder objects. + Iterate on the classes/buckets, from 1 to n-1. + Note that n-1 corresponds to the size of the parameter list, + i.e., n corresponds to the number of classes/buckets. + */ + for (short j = 0 ; j <= nbOfClasses; ++j) { + PartialSumHolder& aPartialSumList = + FacPartialSumHolder::instance().create (); + + FacPartialSumHolderHolder::instance(). + addPartialSumHolder (aPartialSumHolderHolder, aPartialSumList); + } + + // Call the class performing the actual algorithm + MCOptimiser::optimalOptimisationByMCIntegration (K, iCabinCapacity, + ioBucketHolder, + aPartialSumHolderHolder, + ioBidPriceVector, + ioStudyStatManager); + } + + // ////////////////////////////////////////////////////////////////////// + void Optimiser:: optimalOptimisationByDP (const ResourceCapacity_T iCabinCapacity, BucketHolder& ioBucketHolder) { BidPriceVector_T lBidPriceVector; Modified: trunk/rmol/rmol/command/Optimiser.hpp =================================================================== --- trunk/rmol/rmol/command/Optimiser.hpp 2009-04-20 08:51:11 UTC (rev 195) +++ trunk/rmol/rmol/command/Optimiser.hpp 2009-04-23 17:25:20 UTC (rev 196) @@ -12,6 +12,7 @@ /** Forward declarations. */ //class Resource; class BucketHolder; + class StudyStatManager; /** Class wrapping the optimisation algorithms. */ class Optimiser { @@ -34,6 +35,15 @@ const ResourceCapacity_T, BucketHolder&, BidPriceVector_T&); + + /** + Monte Carlo Integartion algorithm with StudyStatManager. + */ + static void optimalOptimisationByMCIntegration (const int K, + const ResourceCapacity_T, + BucketHolder&, + BidPriceVector_T&, + StudyStatManager&); /** Dynamic Programming. Added: trunk/rmol/rmol/factory/FacStudyStatManager.cpp =================================================================== --- trunk/rmol/rmol/factory/FacStudyStatManager.cpp (rev 0) +++ trunk/rmol/rmol/factory/FacStudyStatManager.cpp 2009-04-23 17:25:20 UTC (rev 196) @@ -0,0 +1,45 @@ +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// C +#include <assert.h> +// RMOL +#include <rmol/bom/StudyStatManager.hpp> +#include <rmol/factory/FacSupervisor.hpp> +#include <rmol/factory/FacStudyStatManager.hpp> +#include <rmol/service/Logger.hpp> + +namespace RMOL { + + FacStudyStatManager* FacStudyStatManager::_instance = NULL; + + // ////////////////////////////////////////////////////////////////////// + FacStudyStatManager::~FacStudyStatManager () { + _instance = NULL; + } + + // ////////////////////////////////////////////////////////////////////// + FacStudyStatManager& FacStudyStatManager::instance () { + + if (_instance == NULL) { + _instance = new FacStudyStatManager(); + assert (_instance != NULL); + + FacSupervisor::instance().registerBomFactory (_instance); + } + return *_instance; + } + + // ////////////////////////////////////////////////////////////////////// + StudyStatManager& FacStudyStatManager::create () { + StudyStatManager* aStudyStatManager_ptr = NULL; + aStudyStatManager_ptr = new StudyStatManager (); + assert (aStudyStatManager_ptr != NULL); + + // The new object is added to the Bom pool + _pool.push_back (aStudyStatManager_ptr); + + return *aStudyStatManager_ptr; + } + +} Added: trunk/rmol/rmol/factory/FacStudyStatManager.hpp =================================================================== --- trunk/rmol/rmol/factory/FacStudyStatManager.hpp (rev 0) +++ trunk/rmol/rmol/factory/FacStudyStatManager.hpp 2009-04-23 17:25:20 UTC (rev 196) @@ -0,0 +1,42 @@ +#ifndef __RMOL_FAC_FACSTUDYSTATMANAGER_HPP +#define __RMOL_FAC_FACSTUDYSTATMANAGER_HPP + +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// RMOL +#include <rmol/factory/FacBomAbstract.hpp> + +namespace RMOL { + + /** Factory for StudyStatManager objects. */ + class FacStudyStatManager : public FacBomAbstract { + public: + /** Provide the unique instance. + <br>The singleton is instantiated when first used + @return FacStudyStatManager& */ + static FacStudyStatManager& instance(); + + /** Destructor. + <br>The Destruction put the _instance to NULL + in order to be clean for the next FacStudyStatManager::instance() */ + virtual ~FacStudyStatManager(); + + /** Create a new FacStudyStatManager object. + <br>This new object is added to the list of instantiated objects. + @return StudyStatManager& The newly created object. */ + StudyStatManager& create (); + + protected: + /** Default Constructor. + <br>This constructor is protected in order to ensure the singleton + pattern.*/ + FacStudyStatManager () {} + + private: + /** The unique instance.*/ + static FacStudyStatManager* _instance; + }; + +} +#endif // __RMOL_FAC_FACSTUDYSTATMANAGER_HPP Modified: trunk/rmol/rmol/factory/sources.mk =================================================================== --- trunk/rmol/rmol/factory/sources.mk 2009-04-20 08:51:11 UTC (rev 195) +++ trunk/rmol/rmol/factory/sources.mk 2009-04-23 17:25:20 UTC (rev 196) @@ -7,7 +7,8 @@ $(top_srcdir)/rmol/factory/FacBucketHolder.hpp \ $(top_srcdir)/rmol/factory/FacOverbooking.hpp \ $(top_srcdir)/rmol/factory/FacPartialSumHolderHolder.hpp \ - $(top_srcdir)/rmol/factory/FacPartialSumHolder.hpp + $(top_srcdir)/rmol/factory/FacPartialSumHolder.hpp \ + $(top_srcdir)/rmol/factory/FacStudyStatManager.hpp fac_cc_sources = $(top_srcdir)/rmol/factory/FacSupervisor.cpp \ $(top_srcdir)/rmol/factory/FacBomAbstract.cpp \ $(top_srcdir)/rmol/factory/FacServiceAbstract.cpp \ @@ -17,4 +18,5 @@ $(top_srcdir)/rmol/factory/FacBucketHolder.cpp \ $(top_srcdir)/rmol/factory/FacOverbooking.cpp \ $(top_srcdir)/rmol/factory/FacPartialSumHolderHolder.cpp \ - $(top_srcdir)/rmol/factory/FacPartialSumHolder.cpp + $(top_srcdir)/rmol/factory/FacPartialSumHolder.cpp \ + $(top_srcdir)/rmol/factory/FacStudyStatManager.cpp Modified: trunk/rmol/rmol/rmol.cpp =================================================================== --- trunk/rmol/rmol/rmol.cpp 2009-04-20 08:51:11 UTC (rev 195) +++ trunk/rmol/rmol/rmol.cpp 2009-04-23 17:25:20 UTC (rev 196) @@ -61,6 +61,7 @@ // Initialise the list of classes/buckets RMOL::RMOL_Service rmolService (logOutputFile, cabinCapacity); + rmolService.setUpStudyStatManager(); if (hasInputFile) { // Read the input file Modified: trunk/rmol/rmol/service/RMOL_Service.cpp =================================================================== --- trunk/rmol/rmol/service/RMOL_Service.cpp 2009-04-20 08:51:11 UTC (rev 195) +++ trunk/rmol/rmol/service/RMOL_Service.cpp 2009-04-23 17:25:20 UTC (rev 196) @@ -5,6 +5,8 @@ #include <assert.h> // STL #include <iomanip> +#include <sstream> +#include <iostream> // RMOL #include <rmol/basic/BasConst_RMOL_Service.hpp> #include <rmol/field/FldYieldRange.hpp> @@ -12,6 +14,7 @@ #include <rmol/bom/Demand.hpp> #include <rmol/bom/Bucket.hpp> #include <rmol/bom/BucketHolder.hpp> +#include <rmol/bom/StudyStatManager.hpp> #include <rmol/factory/FacRmolServiceContext.hpp> #include <rmol/command/Optimiser.hpp> #include <rmol/service/RMOL_ServiceContext.hpp> @@ -60,6 +63,12 @@ } // ////////////////////////////////////////////////////////////////////// + void RMOL_Service::setUpStudyStatManager () { + assert (_rmolServiceContext != NULL); + _rmolServiceContext->setUpStudyStatManager (); + } + + // ////////////////////////////////////////////////////////////////////// void RMOL_Service::addBucket (const double iYieldRange, const double iDemandMean, const double iDemandStandardDev) { @@ -84,22 +93,35 @@ assert (ioBucketHolder_ptr != NULL); BidPriceVector_T lBidPriceVector; - Optimiser::optimalOptimisationByMCIntegration (K, iCapacity, - *ioBucketHolder_ptr, - lBidPriceVector); + StudyStatManager* lStudyStatManager_ptr = + _rmolServiceContext->getStudyStatManager(); + if (lStudyStatManager_ptr == NULL) { + Optimiser::optimalOptimisationByMCIntegration (K, iCapacity, + *ioBucketHolder_ptr, + lBidPriceVector); + } else { + Optimiser::optimalOptimisationByMCIntegration (K, iCapacity, + *ioBucketHolder_ptr, + lBidPriceVector, + *lStudyStatManager_ptr); + } // DEBUG RMOL_LOG_DEBUG (ioBucketHolder_ptr->display()); - /* - std::cout << "Bid-Price Vector (BPV): "; + + std::ostringstream logStream; + logStream << "Bid-Price Vector (BPV): "; unsigned int size = lBidPriceVector.size(); for (unsigned int i = 0; i < size; ++i) { const double bidPrice = lBidPriceVector.at(i); - std::cout << std::fixed << std::setprecision (2) << bidPrice << " "; + logStream << std::fixed << std::setprecision (2) << bidPrice << " "; } - std::cout << std::endl; - */ + RMOL_LOG_DEBUG (logStream.str()); + + if (lStudyStatManager_ptr != NULL) { + RMOL_LOG_DEBUG (lStudyStatManager_ptr->describe()); + } } // ////////////////////////////////////////////////////////////////////// Modified: trunk/rmol/rmol/service/RMOL_ServiceContext.cpp =================================================================== --- trunk/rmol/rmol/service/RMOL_ServiceContext.cpp 2009-04-20 08:51:11 UTC (rev 195) +++ trunk/rmol/rmol/service/RMOL_ServiceContext.cpp 2009-04-23 17:25:20 UTC (rev 196) @@ -10,10 +10,12 @@ #include <rmol/bom/Demand.hpp> #include <rmol/bom/Bucket.hpp> #include <rmol/bom/BucketHolder.hpp> +#include <rmol/bom/StudyStatManager.hpp> #include <rmol/factory/FacSupervisor.hpp> #include <rmol/factory/FacDemand.hpp> #include <rmol/factory/FacBucket.hpp> #include <rmol/factory/FacBucketHolder.hpp> +#include <rmol/factory/FacStudyStatManager.hpp> #include <rmol/command/FileMgr.hpp> #include <rmol/service/RMOL_ServiceContext.hpp> @@ -22,19 +24,22 @@ // ////////////////////////////////////////////////////////////////////// RMOL_ServiceContext:: RMOL_ServiceContext (const ResourceCapacity_T iResourceCapacity) : - _bucketHolder (NULL), _capacity (iResourceCapacity) { + _bucketHolder (NULL), _capacity (iResourceCapacity), + _studyStatManager (NULL) { init (iResourceCapacity); } // ////////////////////////////////////////////////////////////////////// RMOL_ServiceContext::RMOL_ServiceContext () : - _bucketHolder (NULL), _capacity (DEFAULT_RMOL_SERVICE_CAPACITY) { + _bucketHolder (NULL), _capacity (DEFAULT_RMOL_SERVICE_CAPACITY), + _studyStatManager (NULL) { init (DEFAULT_RMOL_SERVICE_CAPACITY); } // ////////////////////////////////////////////////////////////////////// RMOL_ServiceContext::RMOL_ServiceContext (const RMOL_ServiceContext&) : - _bucketHolder (NULL), _capacity (DEFAULT_RMOL_SERVICE_CAPACITY) { + _bucketHolder (NULL), _capacity (DEFAULT_RMOL_SERVICE_CAPACITY), + _studyStatManager (NULL) { init (DEFAULT_RMOL_SERVICE_CAPACITY); } @@ -48,6 +53,11 @@ } // ////////////////////////////////////////////////////////////////////// + void RMOL_ServiceContext::setUpStudyStatManager () { + _studyStatManager = &FacStudyStatManager::instance().create(); + } + + // ////////////////////////////////////////////////////////////////////// void RMOL_ServiceContext::addBucket (const double iYieldRange, const double iDemandMean, const double iDemandStandardDev) { Modified: trunk/rmol/rmol/service/RMOL_ServiceContext.hpp =================================================================== --- trunk/rmol/rmol/service/RMOL_ServiceContext.hpp 2009-04-20 08:51:11 UTC (rev 195) +++ trunk/rmol/rmol/service/RMOL_ServiceContext.hpp 2009-04-23 17:25:20 UTC (rev 196) @@ -14,6 +14,7 @@ /** Forward declaration. */ class BucketHolder; + class StudyStatManager; /** Inner class holding the context for the RMOL Service object. */ class RMOL_ServiceContext : public ServiceAbstract { @@ -29,6 +30,8 @@ RMOL_ServiceContext (const RMOL_ServiceContext&); RMOL_ServiceContext (const ResourceCapacity_T iResourceCapacity); void init (const ResourceCapacity_T iResourceCapacity); + /** Initialise the StudyStatManager. */ + void initStudyStatManager (); /** Destructor. */ ~RMOL_ServiceContext(); @@ -49,17 +52,29 @@ return _bucketHolder; } + /** Get the StudyStatManager. */ + StudyStatManager* getStudyStatManager () const { + return _studyStatManager; + } + /** Get the capacity. */ ResourceCapacity_T getCapacity() const { return _capacity; } + public: + /** Set up the StudyStatManager. */ + void setUpStudyStatManager (); + private: /** Internal pointer on BucketHolder. */ BucketHolder* _bucketHolder; /** Resource Capacity. */ ResourceCapacity_T _capacity; + + /** Statistic Manager. */ + StudyStatManager* _studyStatManager; }; } Modified: trunk/rmol/test/samples/sample4.csv =================================================================== --- trunk/rmol/test/samples/sample4.csv 2009-04-20 08:51:11 UTC (rev 195) +++ trunk/rmol/test/samples/sample4.csv 2009-04-23 17:25:20 UTC (rev 196) @@ -1,4 +1,17 @@ price; mean; standard deviation; -1295; 0; 1; -1250; 8; 2.82843; -1205; 4; 2.82843; +2000; 7.3; 2.8; +1850; 15.1; 5.0; +1800; 19.6; 5.2; +1623; 24.0; 6.3; +1511; 27.3; 5.8; +1430; 25.1; 7.0; +1290; 29.6; 7.2; +1100; 24.0; 6.3; +1050; 17.3; 5.8; +950; 25.1; 5.0; +799; 29.6; 10.2; +750; 24.0; 11.3; +700; 27.3; 5.8; +655; 25.1; 7.0; +599; 39.6; 13.2; +520; 44.0; 15.3; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <den...@us...> - 2009-05-03 12:54:12
|
Revision: 202 http://rmol.svn.sourceforge.net/rmol/?rev=202&view=rev Author: denis_arnaud Date: 2009-05-03 12:54:10 +0000 (Sun, 03 May 2009) Log Message: ----------- [R] Added the RM2 (RM for R) project. Added Paths: ----------- trunk/rmol/R/ trunk/rmol/R/README trunk/rmol/R/RM2/ trunk/rmol/R/RM2/DESCRIPTION trunk/rmol/R/RM2/NAMESPACE trunk/rmol/R/RM2/R/ trunk/rmol/R/RM2/R/EM.R trunk/rmol/R/RM2/R/EMSRb.R trunk/rmol/R/RM2/R/EMSRb_internal.R trunk/rmol/R/RM2/R/EM_internal.R trunk/rmol/R/RM2/R/PD.R trunk/rmol/R/RM2/R/PD_internal.R trunk/rmol/R/RM2/RM2.pdf trunk/rmol/R/RM2/man/ trunk/rmol/R/RM2/man/EM.Rd trunk/rmol/R/RM2/man/EMSRb.Rd trunk/rmol/R/RM2/man/EMSRb_internal.Rd trunk/rmol/R/RM2/man/EM_internal.Rd trunk/rmol/R/RM2/man/PD.Rd trunk/rmol/R/RM2/man/PD_internal.Rd Added: trunk/rmol/R/README =================================================================== --- trunk/rmol/R/README (rev 0) +++ trunk/rmol/R/README 2009-05-03 12:54:10 UTC (rev 202) @@ -0,0 +1,9 @@ + +This directory contains the contribution, for the R platform +(http://www.r-project.org), from Tudor Bodea (tud...@ih...), +Dev Koushik (dev...@ih...) and Mark +Ferguson (mar...@mg...). + +The original documentation and source tar-ball can be retrieved on +the CRAN-R dedicated site: http://cran.r-project.org/src/contrib. + Added: trunk/rmol/R/RM2/DESCRIPTION =================================================================== --- trunk/rmol/R/RM2/DESCRIPTION (rev 0) +++ trunk/rmol/R/RM2/DESCRIPTION 2009-05-03 12:54:10 UTC (rev 202) @@ -0,0 +1,11 @@ +Package: RM2 +Version: 0.0 +Date: 2008-07-16 +Title: Revenue Management and Pricing Package +Author: Tudor Bodea <tud...@ih...> & Dev Koushik <dev...@ih...> & Mark Ferguson <mar...@mg...>. +Maintainer: Tudor Bodea <tud...@ih...> +Depends: R (>= 2.7.1), msm +Description: RM2 is a simple package that implements functions + used in revenue management and pricing environments. +License: GPL (version 3 or later) +Packaged: Wed Aug 13 07:58:00 2008; BodeaTu Added: trunk/rmol/R/RM2/NAMESPACE =================================================================== --- trunk/rmol/R/RM2/NAMESPACE (rev 0) +++ trunk/rmol/R/RM2/NAMESPACE 2009-05-03 12:54:10 UTC (rev 202) @@ -0,0 +1 @@ +export(EMSRb, EM, PD) Added: trunk/rmol/R/RM2/R/EM.R =================================================================== --- trunk/rmol/R/RM2/R/EM.R (rev 0) +++ trunk/rmol/R/RM2/R/EM.R 2009-05-03 12:54:10 UTC (rev 202) @@ -0,0 +1,4 @@ +EM = function (demand = demand, eps = 0.005) { + res <- try(RM2:::EM_internal(demand, eps), silent = TRUE) + if (class(res) == 'try-error') {print("Warning: All demand instances are unconstrained")} else {return(res)} +} # end EM function Added: trunk/rmol/R/RM2/R/EMSRb.R =================================================================== --- trunk/rmol/R/RM2/R/EMSRb.R (rev 0) +++ trunk/rmol/R/RM2/R/EMSRb.R 2009-05-03 12:54:10 UTC (rev 202) @@ -0,0 +1,3 @@ +EMSRb = function(Fare = Fare, Mean = Mean, Var = Var, p_up = numeric(length(Fare)), cap = cap) { + return(RM2:::EMSRb_internal(Fare, Mean, Var, p_up, cap)) +} # end function Added: trunk/rmol/R/RM2/R/EMSRb_internal.R =================================================================== --- trunk/rmol/R/RM2/R/EMSRb_internal.R (rev 0) +++ trunk/rmol/R/RM2/R/EMSRb_internal.R 2009-05-03 12:54:10 UTC (rev 202) @@ -0,0 +1,28 @@ +EMSRb_internal = function (Fare = Fare, Mean = Mean, Var = Var, p_up = numeric(length(Fare)), cap = cap) { + N_FProd <- length(Fare) + # ASSURE CONSISTENCY OF THE INPUTS + tmp <- sort.int(Fare, decreasing=T, method = "sh", index.return=TRUE) + Fare <- tmp$x + ind <- tmp$ix + Mean <- Mean[ind] + Var <- Var[ind] + p_up <- p_up[ind] + # INITIALIZE PROTECTION LEVELS + p <- vector(mode="numeric", length(Fare)) + for (i in 1:(length(Fare)-1)) { + # WEIGHTED AVERAGE REVENUE: wr + wr <- sum(Fare[1:i]*Mean[1:i])/sum(Mean[1:i]) + # MEAN AGGREGATE DEMAND + X <- sum(Mean[1:i]) + # STANDARD DEVIATION AGGREGATE DEMAND + Sigma <- sqrt(sum(Var[1:i])) + # COMPUTE CURRENT PROTECTION LEVEL + p[i] <- qnorm((1 / (1 - p_up[i+1])) * (1 - Fare[i+1]/wr), mean=X, sd=Sigma) + } # end for i + p[length(Fare)] <- cap + # INTEGER PROTECTION LEVELS + p <- ceiling(p) + p <- p * (p < cap) + cap * (p >= cap) + names(p) <- as.character(Fare) + return(p) +} # end function Added: trunk/rmol/R/RM2/R/EM_internal.R =================================================================== --- trunk/rmol/R/RM2/R/EM_internal.R (rev 0) +++ trunk/rmol/R/RM2/R/EM_internal.R 2009-05-03 12:54:10 UTC (rev 202) @@ -0,0 +1,40 @@ +EM_internal = function(demand = demand, eps = 0.005) { + # M - NUMBER OF CONSTRAINED DEMAND INSTANCES; N - NUMBER OF UNCONSTRAINED DEMAND INSTANCES + M <- length(demand[names(demand) == "1"]) + if (M == 0) {stop("Warning: All demand instances are unconstrained")} + else { + N <- length(demand[names(demand) == "0"]) + # INITIALIZATION: COMPUTE THE MEAN AND THE STANDARD DEVIATION USING THE UNCONSTRAINED DEMAND VALUES + mean_v <- sum(demand[names(demand) == "0"])/N + sd_v <- sqrt(sum((demand[names(demand) == "0"] - mean_v)^2)/N) + history <- as.data.frame(matrix(c(mean_v, sd_v), 1,2)) + # SPECIFY WHERE THE DISTRIBUTIONS ARE LEFT TRUNCATED + bl_const <- demand[names(demand) == "1"] + # INITIALIZE NUMBER OF ITERATIONS + niter <- 1 + repeat { + # EXPECTATION: COMPUTE EXPECTED VALUES OF THE TRUNCATED NORMAL DISTRIBUTIONS + tmp <- (bl_const - mean_v)/sd_v + hazard <- dnorm(tmp) / (1 - pnorm(tmp)) + exp.trunc <- mean_v + hazard * sd_v + exp.trunc2 <- mean_v^2 + sd_v^2 + sd_v^2 * hazard * tmp + 2 * mean_v * sd_v * hazard + demand[names(demand) == "1"] <- exp.trunc + # MAXIMIZATION: COMPUTE THE NEW VALUES FOR THE MEAN AND THE STANDARD DEVIATION + new_mean_v <- sum(demand) / (N + M) + new_sd_v <- sqrt(1 / (N+M) * (sum(exp.trunc2) - 2 * mean_v * sum(exp.trunc) + M * mean_v^2 + sum((demand[names(demand) == "0"] - mean_v)^2))) + if (sum(c(abs(new_mean_v - mean_v), abs(new_sd_v - sd_v)) > eps) == 0 ){ + niter <- niter + 1 + history <- rbind(history, c(new_mean_v, new_sd_v)) + break + } + else { + niter <- niter + 1 + history <- rbind(history, c(new_mean_v, new_sd_v)) + mean_v <- new_mean_v + sd_v <- new_sd_v + } + } # end repeat + names(history) <- c("Mean", "StDev") + return(list(param = round(c(new_mean_v, new_sd_v), 2), niter = niter, demand = round(demand, 2), history = round(history, 2))) + } # end if +} # end EM_internal function Added: trunk/rmol/R/RM2/R/PD.R =================================================================== --- trunk/rmol/R/RM2/R/PD.R (rev 0) +++ trunk/rmol/R/RM2/R/PD.R 2009-05-03 12:54:10 UTC (rev 202) @@ -0,0 +1,4 @@ +PD = function (demand = demand, tau = 0.5, eps = 0.005) { + res <- try(RM2:::PD_internal(demand, tau, eps), silent = TRUE) + if (class(res) == 'try-error') {print("Warning: All demand instances are unconstrained")} else {return(res)} +} # end PD function Added: trunk/rmol/R/RM2/R/PD_internal.R =================================================================== --- trunk/rmol/R/RM2/R/PD_internal.R (rev 0) +++ trunk/rmol/R/RM2/R/PD_internal.R 2009-05-03 12:54:10 UTC (rev 202) @@ -0,0 +1,42 @@ +PD_internal = function(demand = demand, tau = 0.5, eps = 0.005) { + # CHECK IF msm LIBRARY EXISTS + # library(msm) + # M - NUMBER OF CONSTRAINED DEMAND INSTANCES; N - NUMBER OF UNCONSTRAINED DEMAND INSTANCES + M <- length(demand[names(demand) == "1"]) + if (M == 0) {stop("Warning: All demand instances are unconstrained")} + else { + N <- length(demand[names(demand) == "0"]) + # INITIALIZATION: COMPUTE THE MEAN AND THE STANDARD DEVIATION USING THE UNCONSTRAINED DEMAND VALUES + mean_v <- sum(demand[names(demand) == "0"])/N + sd_v <- sqrt(sum((demand[names(demand) == "0"] - mean_v)^2)/N) + history <- as.data.frame(matrix(c(mean_v, sd_v), 1,2)) + # SPECIFY WHERE THE DISTRIBUTIONS ARE LEFT TRUNCATED + bl_const <- demand[names(demand) == "1"] + # INITIALIZE NUMBER OF ITERATIONS + niter <- 1 + repeat { + # EXPECTATION: COMPUTE EXPECTED VALUES OF THE TRUNCATED NORMAL DISTRIBUTIONS + tmp <- numeric() + for (ind_constr in 1:length(bl_const)) { + tmp <- c(tmp, qtnorm(tau, mean = mean_v, sd = sd_v, lower = bl_const[ind_constr], upper = Inf, lower.tail = F)) + } # end for ind_constr + demand[names(demand) == "1"] <- tmp + # MAXIMIZATION: COMPUTE THE NEW VALUES FOR THE MEAN AND THE STANDARD DEVIATION + new_mean_v <- mean(demand) + new_sd_v <- sd(demand) + if (sum(c(abs(new_mean_v - mean_v), abs(new_sd_v - sd_v)) > eps) == 0 ){ + niter <- niter + 1 + history <- rbind(history, c(new_mean_v, new_sd_v)) + break + } + else { + niter <- niter + 1 + history <- rbind(history, c(new_mean_v, new_sd_v)) + mean_v <- new_mean_v + sd_v <- new_sd_v + } + } # end repeat + names(history) <- c("Mean", "StDev") + return(list(param = round(c(new_mean_v, new_sd_v), 2), niter = niter, demand = round(demand, 2), history = round(history, 2))) + } # end if +} # end PD_internal function Added: trunk/rmol/R/RM2/RM2.pdf =================================================================== (Binary files differ) Property changes on: trunk/rmol/R/RM2/RM2.pdf ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/rmol/R/RM2/man/EM.Rd =================================================================== --- trunk/rmol/R/RM2/man/EM.Rd (rev 0) +++ trunk/rmol/R/RM2/man/EM.Rd 2009-05-03 12:54:10 UTC (rev 202) @@ -0,0 +1,54 @@ +\name{EM} +\alias{EM} +\title{ Unconstrain the demand using the Expectation-Maximization algorithm } +\description{ + \code{EM} unconstrains demand data in quantity-based revenue management. +} +\usage{ +EM(demand = demand, eps = 0.005) +} +\arguments{ + \item{demand}{ demand vector with constrained and unconstrained entries. A 0 in the name of an entry means that the corresponding demand is unconstrained. Conversely, a 1 in the name of an entry suggests that the corresponding demand is constrained. } + \item{eps}{ small number used as the stopping criterion. The default value is 0.005.} +} +\details{ + \code{EM} unconstrains demand data in quantity-based revenue management. The observed demand entries, some of which are constrained because the product class was closed, are assumed to be realizations from an underlying normal distribution with mean \eqn{\mu} and standard deviation \eqn{\sigma}. The objective is to find the parameters \eqn{\mu} and \eqn{\sigma} of this underlying demand distribution. +} +\value{ + \item{param}{ parameters of demand distribution } + \item{niter}{ number of iterations } + \item{demand}{ unconstrained demand vector} + \item{history}{ parameter convergence history } +} +\references{ Talluri, K. T. and Van Ryzin, G. (2004) \emph{The Theory and Practice of Revenue Management}. New York, NY: Springer Science + Business Media, Inc. (Pages 474--477).} +\author{ +Tudor Bodea \email{tud...@ih...} \cr +Dev Koushik \email{dev...@ih...} \cr +Mark Ferguson \email{mar...@mg...} +} +\examples{ +# SPECIFY THE SEED +set.seed(333) +# SPECIFY REAL PARAMETERS OF THE DEMAND DISTRIBUTION +rmean <- 20 +rsd <- 4 +nrn <- 20 +# GENERATE REAL DEMAND +rdemand <- round(rnorm(nrn, rmean, rsd)) +# GENERATE BOOKING LIMITS +bl <- round(rnorm(nrn, rmean, rsd)) +# GENERATE OBSERVED DEMAND +demand <- rdemand * (rdemand <= bl) + bl * (rdemand > bl) +# IDENTIFIED PERIODS WITH CONSTRAINED DEMAND: 1 - CONSTRAINED DEMAND +names(demand) <- as.character(as.numeric(rdemand>bl)) +demand +# UNTRUNCATE DEMAND +EM(demand) +EM(demand, eps=0.005) +EM(demand, eps=0.00005) +# MODIFY DEMAND VECTOR - NO CONSTRAINED INSTANCES ARE OBSERVED +names(demand) <- rep(0, length(demand)) +# ATTEMPT TO UNTRUNCATE THE DEMAND +EM(demand, eps=0.005) +} +\keyword{ optimize } Property changes on: trunk/rmol/R/RM2/man/EM.Rd ___________________________________________________________________ Added: svn:executable + * Added: trunk/rmol/R/RM2/man/EMSRb.Rd =================================================================== --- trunk/rmol/R/RM2/man/EMSRb.Rd (rev 0) +++ trunk/rmol/R/RM2/man/EMSRb.Rd 2009-05-03 12:54:10 UTC (rev 202) @@ -0,0 +1,37 @@ +\name{EMSRb} +\alias{EMSRb} +\title{ Perform EMSR-b with Buy-up Heuristic for the Single-Resource Problem } +\description{ + \code{EMSRb} heuristic sets the protection levels for multiple fare classes. +} +\usage{ +EMSRb(Fare = Fare, Mean = Mean, Var = Var, p_up = numeric(length(Fare)), cap = cap) +} +\arguments{ + \item{Fare}{ revenue vector associated with selling the offered products } + \item{Mean}{ mean product demand } + \item{Var}{ product demand variance } + \item{p_up}{ buy-up probabilities. The default entails no buy-up probabilities. } + \item{cap}{ available capacity } +} +\details{ + \code{EMSRb} sorts internally the \code{Fare} vector together with all other input vectors in descending order of the revenues. If \code{p_up} is missing, \code{EMSRb} performs the classical EMSRb heuristic. +} +\value{ + \item{p}{ protection levels } +} +\author{ +Tudor Bodea \email{tud...@ih...} \cr +Dev Koushik \email{dev...@ih...} \cr +Mark Ferguson \email{mar...@mg...} +} +\examples{ +## Run a simple EMRSb instance +Fare <- c(150, 100, 50, 250) +Mean <- c(75, 125, 500, 50) +Var <- c(75, 125, 500, 50) +cap <- 400 +p <- EMSRb(Fare = Fare, Mean = Mean, Var = Var, cap = cap) +p +} +\keyword{ optimize } Property changes on: trunk/rmol/R/RM2/man/EMSRb.Rd ___________________________________________________________________ Added: svn:executable + * Added: trunk/rmol/R/RM2/man/EMSRb_internal.Rd =================================================================== --- trunk/rmol/R/RM2/man/EMSRb_internal.Rd (rev 0) +++ trunk/rmol/R/RM2/man/EMSRb_internal.Rd 2009-05-03 12:54:10 UTC (rev 202) @@ -0,0 +1,28 @@ +\name{EMSRb_internal} +\alias{EMSRb_internal} +\title{ Perform EMSR-b with Buy-up Heuristic for the Single-Resource Problem } +\description{ + \code{EMSRb_internal} is called by \code{EMRSb} and sets the protection levels for multiple fare classes. +} +\usage{ +EMSRb_internal(Fare = Fare, Mean = Mean, Var = Var, p_up = numeric(length(Fare)), cap = cap) +} +\arguments{ + \item{Fare}{ revenue vector associated with selling the offered products } + \item{Mean}{ mean product demand } + \item{Var}{ product demand variance } + \item{p_up}{ buy-up probabilities. The default entails no buy-up probabilities. } + \item{cap}{ available capacity } +} +\details{ + \code{EMSRb_internal} sorts internally the \code{Fare} vector together with all other input vectors in descending order of the revenues. If \code{p_up} is missing, \code{EMSRb_internal} performs the classical EMSRb heuristic. +} +\value{ + \item{p}{ protection levels } +} +\author{ +Tudor Bodea \email{tud...@ih...} \cr +Dev Koushik \email{dev...@ih...} \cr +Mark Ferguson \email{mar...@mg...} +} +\keyword{ internal } Property changes on: trunk/rmol/R/RM2/man/EMSRb_internal.Rd ___________________________________________________________________ Added: svn:executable + * Added: trunk/rmol/R/RM2/man/EM_internal.Rd =================================================================== --- trunk/rmol/R/RM2/man/EM_internal.Rd (rev 0) +++ trunk/rmol/R/RM2/man/EM_internal.Rd 2009-05-03 12:54:10 UTC (rev 202) @@ -0,0 +1,29 @@ +\name{EM_internal} +\alias{EM_internal} +\title{ Unconstrain the demand using the Expectation-Maximization algorithm } +\description{ + \code{EM_internal} is the internal function called by \code{EM} . +} +\usage{ +EM_internal(demand = demand, eps = 0.005) +} +\arguments{ + \item{demand}{ demand vector with constrained and unconstrained entries. A 0 in the name of an entry means that the corresponding demand is unconstrained. Conversely, a 1 in the name of an entry suggests that the corresponding demand is constrained. } + \item{eps}{ small number used as the stopping criterion. The default value is 0.005.} +} +\details{ + \code{EM_internal} unconstrains demand data in quantity-based revenue management. +} +\value{ + \item{param}{ parameters of demand distribution } + \item{niter}{ number of iterations } + \item{demand}{ unconstrained demand } + \item{history}{ convergence history } +} +\references{ Talluri, K. T. and Van Ryzin, G. (2004) \emph{The Theory and Practice of Revenue Management}. New York, NY: Springer Science + Business Media, Inc. (Pages 474-477).} +\author{ +Tudor Bodea \email{tud...@ih...} \cr +Dev Koushik \email{dev...@ih...} \cr +Mark Ferguson \email{mar...@mg...} +} +\keyword{ internal } Property changes on: trunk/rmol/R/RM2/man/EM_internal.Rd ___________________________________________________________________ Added: svn:executable + * Added: trunk/rmol/R/RM2/man/PD.Rd =================================================================== --- trunk/rmol/R/RM2/man/PD.Rd (rev 0) +++ trunk/rmol/R/RM2/man/PD.Rd 2009-05-03 12:54:10 UTC (rev 202) @@ -0,0 +1,55 @@ +\name{PD} +\alias{PD} +\title{ Unconstrain the demand using the Projection-Detruncation algorithm } +\description{ + \code{PD} unconstrains demand data in quantity-based revenue management. +} +\usage{ +PD(demand = demand, tau = 0.5, eps = 0.005) +} +\arguments{ + \item{demand}{ demand vector with constrained and unconstrained entries. A 0 in the name of an entry means that the corresponding demand is unconstrained. Conversely, a 1 in the name of an entry suggests that the corresponding demand is constrained. } + \item{tau}{ fixed constant that reflects how aggresive the unconstrainig is. The default value is 0.5.} + \item{eps}{ small number used as the stopping criterion. The default value is 0.005.} +} +\details{ + \code{PD} unconstrains demand data in quantity-based revenue management. The observed demand entries, some of which are constrained because the product class was closed, are assumed to be realizations from an underlying normal distribution with mean \eqn{\mu} and standard deviation \eqn{\sigma}. The objective is to find the parameters \eqn{\mu} and \eqn{\sigma} of this underlying demand distribution. +} +\value{ + \item{param}{ parameters of demand distribution } + \item{niter}{ number of iterations } + \item{demand}{ unconstrained demand vector} + \item{history}{ parameter convergence history } +} +\references{ Talluri, K. T. and Van Ryzin, G. (2004) \emph{The Theory and Practice of Revenue Management}. New York, NY: Springer Science + Business Media, Inc. (Pages 485--486).} +\author{ +Tudor Bodea \email{tud...@ih...} \cr +Dev Koushik \email{dev...@ih...} \cr +Mark Ferguson \email{mar...@mg...} +} +\examples{ +# SPECIFY THE SEED +set.seed(333) +# SPECIFY REAL PARAMETERS OF THE DEMAND DISTRIBUTION +rmean <- 20 +rsd <- 4 +nrn <- 20 +# GENERATE REAL DEMAND +rdemand <- round(rnorm(nrn, rmean, rsd)) +# GENERATE BOOKING LIMITS +bl <- round(rnorm(nrn, rmean, rsd)) +# GENERATE OBSERVED DEMAND +demand <- rdemand * (rdemand <= bl) + bl * (rdemand > bl) +# IDENTIFIED PERIODS WITH CONSTRAINED DEMAND: 1 - CONSTRAINED DEMAND +names(demand) <- as.character(as.numeric(rdemand>bl)) +demand +# UNTRUNCATE DEMAND +PD(demand) +PD(demand, tau=0.5, eps=0.005) +PD(demand, tau=0.5, eps=0.00005) +# MODIFY DEMAND VECTOR - NO CONSTRAINED INSTANCES ARE OBSERVED +names(demand) <- rep(0, length(demand)) +# ATTEMPT TO UNTRUNCATE THE DEMAND +PD(demand, tau=0.5, eps=0.005) +} +\keyword{ optimize } Property changes on: trunk/rmol/R/RM2/man/PD.Rd ___________________________________________________________________ Added: svn:executable + * Added: trunk/rmol/R/RM2/man/PD_internal.Rd =================================================================== --- trunk/rmol/R/RM2/man/PD_internal.Rd (rev 0) +++ trunk/rmol/R/RM2/man/PD_internal.Rd 2009-05-03 12:54:10 UTC (rev 202) @@ -0,0 +1,30 @@ +\name{PD_internal} +\alias{PD_internal} +\title{ Unconstrain the demand using the Projection-Detruncation algorithm } +\description{ + \code{PD_internal} is the internal function called by \code{PD} . +} +\usage{ +PD_internal(demand = demand, tau = 0.5, eps = 0.005) +} +\arguments{ + \item{demand}{ demand vector with constrained and unconstrained entries. A 0 in the name of an entry means that the corresponding demand is unconstrained. Conversely, a 1 in the name of an entry suggests that the corresponding demand is constrained. } + \item{tau}{ fixed constant that reflects how aggresive the unconstrainig is. The default value is 0.5.} + \item{eps}{ small number used as the stopping criterion. The default value is 0.005.} +} +\details{ + \code{PD_internal} unconstrains demand data in quantity-based revenue management. +} +\value{ + \item{param}{ parameters of demand distribution } + \item{niter}{ number of iterations } + \item{demand}{ unconstrained demand } + \item{history}{ convergence history } +} +\references{ Talluri, K. T. and Van Ryzin, G. (2004) \emph{The Theory and Practice of Revenue Management}. New York, NY: Springer Science + Business Media, Inc. (Pages 485-486).} +\author{ +Tudor Bodea \email{tud...@ih...} \cr +Dev Koushik \email{dev...@ih...} \cr +Mark Ferguson \email{mar...@mg...} +} +\keyword{ internal } Property changes on: trunk/rmol/R/RM2/man/PD_internal.Rd ___________________________________________________________________ Added: svn:executable + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <den...@us...> - 2009-05-03 16:45:25
|
Revision: 203 http://rmol.svn.sourceforge.net/rmol/?rev=203&view=rev Author: denis_arnaud Date: 2009-05-03 16:45:21 +0000 (Sun, 03 May 2009) Log Message: ----------- [Building] 1. Better structured the source code for the batch generation. 2. The batch now reads options from the command-line. Modified Paths: -------------- trunk/rmol/configure.ac trunk/rmol/doc/Makefile.am trunk/rmol/po/Makefile.in.in trunk/rmol/po/POTFILES.in trunk/rmol/rmol/Makefile.am trunk/rmol/rmol/basic/Makefile.am trunk/rmol/rmol/bom/Makefile.am trunk/rmol/rmol/command/Makefile.am trunk/rmol/rmol/factory/Makefile.am trunk/rmol/rmol/field/Makefile.am trunk/rmol/rmol/service/Makefile.am trunk/rmol/rmol.spec.in trunk/rmol/test/Makefile.am trunk/rmol/test/SimulateTestSuite.cpp trunk/rmol/test/com/Makefile.am Added Paths: ----------- trunk/rmol/rmol/batches/ trunk/rmol/rmol/batches/Makefile.am trunk/rmol/rmol/batches/rmol.cpp trunk/rmol/rmol/batches/sources.mk trunk/rmol/rmol/config/ trunk/rmol/rmol/config/Makefile.am trunk/rmol/rmol/core/ trunk/rmol/rmol/core/Makefile.am trunk/rmol/rmol/core/sources.mk trunk/rmol/test/samples/Makefile.am trunk/rmol/test/samples/sources.mk Removed Paths: ------------- trunk/rmol/rmol/rmol.cpp trunk/rmol/rmol/sources.mk Property Changed: ---------------- trunk/rmol/rmol/ trunk/rmol/test/samples/ Modified: trunk/rmol/configure.ac =================================================================== --- trunk/rmol/configure.ac 2009-05-03 12:54:10 UTC (rev 202) +++ trunk/rmol/configure.ac 2009-05-03 16:45:21 UTC (rev 203) @@ -60,13 +60,6 @@ # Set default language to C++ AC_LANG([C++]) -# Check for debug switch -AC_ARG_ENABLE(debug, - [AS_HELP_STRING([--enable-debug], - [build additional debugging library])]) -test "x$enable_debug" != xyes && enable_debug=no -AM_CONDITIONAL([ENABLE_DEBUG], [test "x$enable_debug" = xyes]) - # Check for exceptions switch AC_ARG_ENABLE(exceptions, [AS_HELP_STRING([--enable-exceptions], @@ -103,37 +96,11 @@ AC_SUBST(docdir) -PACKAGE_DEBUG="$PACKAGE" -# Set debug flags -if test "x$enable_debug" = xyes; then - PACKAGE_DEBUG="$PACKAGE"_debug - CXXFLAGS_DEBUG="-DASSERT_LEVEL=2 -g" - # Only for GCC compiler - if test "x$GXX" = xyes; then - if test "x$enable_exceptions" = xno; then - CXXFLAGS_DEBUG="$CXXFLAGS_DEBUG -fno-exceptions" - fi - CXXFLAGS_DEBUG="$CXXFLAGS_DEBUG -Wall -pipe" - fi +# Default compilation flags +if test -z "${CXXFLAGS}"; then + CXXFLAGS="-g -Wall" fi -AC_SUBST(CXXFLAGS_DEBUG) -AC_SUBST(PACKAGE_DEBUG) -# Set optimised flags -if test "x$CXXFLAGS" = x; then - CXXFLAGS_OPT="-DASSERT_LEVEL=1 -O3" - # Only for GCC compiler - if test "x$GXX" = xyes; then - if test "x$enable_exceptions" = xno; then - CXXFLAGS_OPT="$CXXFLAGS_OPT -fno-exceptions" - fi - CXXFLAGS_OPT="$CXXFLAGS_OPT -pipe" - fi -else - CXXFLAGS_OPT="$CXXFLAGS" - CXXFLAGS="" -fi -AC_SUBST(CXXFLAGS_OPT) # --------------------------------------------------------- # GSL (GNU Scientific Library: http://gnu.org/projects/gsl) @@ -156,6 +123,9 @@ AC_SUBST(BOOST_FILESYSTEM_LIB) +# ------------------------------------------------------------------- +# Support for documentation +# ------------------------------------------------------------------- # Checks for documentation build tools #AC_CHECK_PROG([texinfo_ok], [texinfo], [yes], [no]) #if test "x$enable_info_doc" != xno; then @@ -315,6 +285,9 @@ rmol/factory/Makefile rmol/command/Makefile rmol/service/Makefile + rmol/core/Makefile + rmol/config/Makefile + rmol/batches/Makefile man/Makefile info/Makefile doc/Makefile @@ -327,6 +300,7 @@ doc/sourceforge/howto_release_rmol.html po/Makefile.in test/Makefile + test/samples/Makefile test/com/Makefile win32/Makefile) AC_OUTPUT @@ -346,7 +320,6 @@ - infodir ........... : ${infodir} Switches: - - debug ............. : ${enable_debug} - exceptions ........ : ${enable_exceptions} - use-nls ........... : ${USE_NLS} - info-doc .......... : ${enable_info_doc} @@ -367,8 +340,7 @@ Compiler/linker flags/libs/defs: - CXX ............... : ${CXX} - - CXXFLAGS .......... : ${CXXFLAGS_OPT} - - CXXFLAGS_DEBUG .... : ${CXXFLAGS_DEBUG} + - CXXFLAGS .......... : ${CXXFLAGS} - CPPFLAGS .......... : ${CPPFLAGS} - LDFLAGS ........... : ${LDFLAGS} - LIBS .............. : ${LIBS} Modified: trunk/rmol/doc/Makefile.am =================================================================== --- trunk/rmol/doc/Makefile.am 2009-05-03 12:54:10 UTC (rev 202) +++ trunk/rmol/doc/Makefile.am 2009-05-03 16:45:21 UTC (rev 203) @@ -1,13 +1,14 @@ include $(top_srcdir)/doc/local/sources.mk include $(top_srcdir)/doc/tutorial/sources.mk include $(top_srcdir)/doc/tutorial/src/sources.mk -include $(top_srcdir)/@PACKAGE@/sources.mk include $(top_srcdir)/@PACKAGE@/basic/sources.mk include $(top_srcdir)/@PACKAGE@/field/sources.mk include $(top_srcdir)/@PACKAGE@/bom/sources.mk include $(top_srcdir)/@PACKAGE@/factory/sources.mk include $(top_srcdir)/@PACKAGE@/command/sources.mk include $(top_srcdir)/@PACKAGE@/service/sources.mk +include $(top_srcdir)/@PACKAGE@/core/sources.mk +include $(top_srcdir)/@PACKAGE@/batches/sources.mk SUBDIRS = images tutorial local Modified: trunk/rmol/po/Makefile.in.in =================================================================== --- trunk/rmol/po/Makefile.in.in 2009-05-03 12:54:10 UTC (rev 202) +++ trunk/rmol/po/Makefile.in.in 2009-05-03 16:45:21 UTC (rev 203) @@ -22,7 +22,6 @@ prefix = @prefix@ exec_prefix = @exec_prefix@ -datarootdir = @datarootdir@ datadir = @datadir@ localedir = $(datadir)/locale gettextsrcdir = $(datadir)/gettext/po Modified: trunk/rmol/po/POTFILES.in =================================================================== --- trunk/rmol/po/POTFILES.in 2009-05-03 12:54:10 UTC (rev 202) +++ trunk/rmol/po/POTFILES.in 2009-05-03 16:45:21 UTC (rev 203) @@ -74,7 +74,8 @@ rmol/bom/BucketHolder.cpp rmol/bom/DistributionParameterList.hpp rmol/bom/Gaussian.hpp -rmol/rmol.cpp +rmol/config/rmol-paths.hpp +rmol/batches/rmol.cpp rmol/command/Optimiser.hpp rmol/command/Optimiser.cpp rmol/command/FileMgr.hpp Property changes on: trunk/rmol/rmol ___________________________________________________________________ Modified: svn:ignore - .deps .libs Makefile Makefile.in config.h config.h.in stamp-h1 rmol rmol.log + .deps .libs Makefile Makefile.in config.h config.h.in stamp-h1 Modified: trunk/rmol/rmol/Makefile.am =================================================================== --- trunk/rmol/rmol/Makefile.am 2009-05-03 12:54:10 UTC (rev 202) +++ trunk/rmol/rmol/Makefile.am 2009-05-03 16:45:21 UTC (rev 203) @@ -1,54 +1,15 @@ include $(top_srcdir)/Makefile.common -include $(srcdir)/sources.mk +include $(srcdir)/core/sources.mk ## Source directory MAINTAINERCLEANFILES = Makefile.in -SUBDIRS = basic field bom factory command service +SUBDIRS = basic field bom factory command service core config batches EXTRA_DIST = config_msvc.h -lib_LTLIBRARIES = lib@PACKAGE@.la -if ENABLE_DEBUG - lib_LTLIBRARIES += lib@PACKAGE@_debug.la -endif -lib@PACKAGE@_la_SOURCES = $(service_h_sources) $(service_cc_sources) -lib@PACKAGE@_la_LIBADD = $(top_builddir)/@PACKAGE@/basic/libbas.la \ - $(top_builddir)/@PACKAGE@/field/libfld.la \ - $(top_builddir)/@PACKAGE@/bom/libbom.la \ - $(top_builddir)/@PACKAGE@/factory/libfac.la \ - $(top_builddir)/@PACKAGE@/command/libcmd.la \ - $(top_builddir)/@PACKAGE@/service/libsvc.la -lib@PACKAGE@_la_LDFLAGS = \ - $(BOOST_LIBS) $(BOOST_DATE_TIME_LIB) $(BOOST_PROGRAM_OPTIONS_LIB) \ - $(GSL_LIBS) -version-info $(GENERIC_LIBRARY_VERSION) -lib@PACKAGE@_debug_la_SOURCES = $(service_h_sources) $(service_cc_sources) -lib@PACKAGE@_debug_la_LIBADD =$(top_builddir)/@PACKAGE@/basic/libbas_debug.la \ - $(top_builddir)/@PACKAGE@/field/libfld_debug.la \ - $(top_builddir)/@PACKAGE@/bom/libbom_debug.la \ - $(top_builddir)/@PACKAGE@/factory/libfac_debug.la \ - $(top_builddir)/@PACKAGE@/command/libcmd_debug.la \ - $(top_builddir)/@PACKAGE@/service/libsvc_debug.la -lib@PACKAGE@_debug_la_LDFLAGS = \ - $(BOOST_LIBS) $(BOOST_DATE_TIME_LIB) $(BOOST_PROGRAM_OPTIONS_LIB) \ - $(GSL_LIBS) -version-info $(GENERIC_LIBRARY_VERSION) - -bin_PROGRAMS = rmol -if ENABLE_DEBUG - bin_PROGRAMS += rmol_debug -endif - -rmol_SOURCES = $(bin_h_sources) $(bin_cc_sources) -rmol_CXXFLAGS = $(BOOST_CFLAGS) -rmol_LDADD = lib@PACKAGE@.la -rmol_LDFLAGS = $(BOOST_PROGRAM_OPTIONS_LIB) - -rmol_debug_SOURCES = $(rmol_SOURCES) -rmol_debug_CXXFLAGS = $(BOOST_CFLAGS) -rmol_debug_LDFLAGS = $(rmol_LDFLAGS) -rmol_debug_LDADD = lib@PACKAGE@_debug.la - +# Header files nobase_pkginclude_HEADERS = $(service_h_sources) nobase_nodist_pkginclude_HEADERS = $(top_builddir)/@PACKAGE@/config.h Modified: trunk/rmol/rmol/basic/Makefile.am =================================================================== --- trunk/rmol/rmol/basic/Makefile.am 2009-05-03 12:54:10 UTC (rev 202) +++ trunk/rmol/rmol/basic/Makefile.am 2009-05-03 16:45:21 UTC (rev 203) @@ -3,14 +3,9 @@ include $(srcdir)/sources.mk noinst_LTLIBRARIES= libbas.la -if ENABLE_DEBUG -noinst_LTLIBRARIES += libbas_debug.la -endif + libbas_la_SOURCES= $(bas_h_sources) $(bas_cc_sources) -libbas_la_CXXFLAGS = $(CXXFLAGS_OPT) $(BOOST_CFLAGS) +libbas_la_CXXFLAGS = $(BOOST_CFLAGS) -libbas_debug_la_SOURCES = $(bas_h_sources) $(bas_cc_sources) -libbas_debug_la_CXXFLAGS = $(CXXFLAGS_DEBUG) $(BOOST_CFLAGS) - #pkgincludedir = $(includedir)/@PACKAGE@/basic #pkginclude_HEADERS = $(bas_h_sources) Property changes on: trunk/rmol/rmol/batches ___________________________________________________________________ Added: svn:ignore + .deps .libs Makefile.in Makefile rmol rmol.log Added: trunk/rmol/rmol/batches/Makefile.am =================================================================== --- trunk/rmol/rmol/batches/Makefile.am (rev 0) +++ trunk/rmol/rmol/batches/Makefile.am 2009-05-03 16:45:21 UTC (rev 203) @@ -0,0 +1,16 @@ +include $(top_srcdir)/Makefile.common +include $(srcdir)/sources.mk + +## Source directory + +MAINTAINERCLEANFILES = Makefile.in + + +# Binaries (batches) +bin_PROGRAMS = rmol + +rmol_SOURCES = $(batches_h_sources) $(batches_cc_sources) +rmol_CXXFLAGS = $(BOOST_CFLAGS) +#rmol_LDADD = +rmol_LDFLAGS = $(BOOST_PROGRAM_OPTIONS_LIB) \ + $(top_builddir)/@PACKAGE@/core/lib@PACKAGE@.la Copied: trunk/rmol/rmol/batches/rmol.cpp (from rev 201, trunk/rmol/rmol/rmol.cpp) =================================================================== --- trunk/rmol/rmol/batches/rmol.cpp (rev 0) +++ trunk/rmol/rmol/batches/rmol.cpp 2009-05-03 16:45:21 UTC (rev 203) @@ -0,0 +1,256 @@ +// C +#include <assert.h> +// STL +#include <iostream> +#include <sstream> +#include <fstream> +#include <string> +// Boost (Extended STL) +#include <boost/date_time/posix_time/posix_time.hpp> +#include <boost/date_time/gregorian/gregorian.hpp> +#include <boost/program_options.hpp> +// RMOL +#include <rmol/RMOL_Service.hpp> +#include <rmol/config/rmol-paths.hpp> + + +// //////// Constants ////// +/** Default name and location for the log file. */ +const std::string K_RMOL_DEFAULT_LOG_FILENAME ("rmol.log"); + +/** Default name and location for the (CSV) input file. */ +const std::string K_RMOL_DEFAULT_INPUT_FILENAME ("class.csv"); + +/** Default number of random draws to be generated (best if over 100). */ +const int K_RMOL_DEFAULT_RANDOM_DRAWS = 100000; + +/** Default value for the capacity of the resource (e.g., a flight cabin). */ +const double K_RMOL_DEFAULT_CAPACITY = 500.0; + +/** Default name and location for the Revenue Management method to be used. + <br> + <ul> + <li>0 = Monte-Carlo</li> + <li>1 = Dynamic Programming</li> + <li>2 = EMSR</li> + <li>3 = EMSR-a</li> + <li>4 = EMSR-b</li> + </ul> */ +const short K_RMOL_DEFAULT_METHOD = 0; + + +// ///////// Parsing of Options & Configuration ///////// +// A helper function to simplify the main part. +template<class T> std::ostream& operator<< (std::ostream& os, + const std::vector<T>& v) { + std::copy (v.begin(), v.end(), std::ostream_iterator<T> (std::cout, " ")); + return os; +} + +/** Early return status (so that it can be differentiated from an error). */ +const int K_RMOL_EARLY_RETURN_STATUS = 99; + +/** Read and parse the command line options. */ +int readConfiguration (int argc, char* argv[], int& lRandomDraws, + double& lCapacity, short& lMethod, + std::string& lInputFilename, std::string& lLogFilename) { + + + // Declare a group of options that will be allowed only on command line + boost::program_options::options_description generic ("Generic options"); + generic.add_options() + ("prefix", "print installation prefix") + ("version,v", "print version string") + ("help,h", "produce help message"); + + // Declare a group of options that will be allowed both on command + // line and in config file + boost::program_options::options_description config ("Configuration"); + config.add_options() + ("draws,d", + boost::program_options::value<int>(&lRandomDraws)->default_value(K_RMOL_DEFAULT_RANDOM_DRAWS), + "Number of to-be-generated random draws") + ("capacity,c", + boost::program_options::value<double>(&lCapacity)->default_value(K_RMOL_DEFAULT_CAPACITY), + "Resource capacity (e.g., for a flight leg)") + ("method,m", + boost::program_options::value<short>(&lMethod)->default_value(K_RMOL_DEFAULT_METHOD), + "Revenue Management method to be used (0 = Monte-Carlo, 1 = Dynamic Programming, 2 = EMSR, 3 = EMSR-a, 4 = EMSR-b)") + ("input,i", + boost::program_options::value< std::string >(&lInputFilename)->default_value(K_RMOL_DEFAULT_INPUT_FILENAME), + "(CVS) input file for the demand distributions") + ("log,l", + boost::program_options::value< std::string >(&lLogFilename)->default_value(K_RMOL_DEFAULT_LOG_FILENAME), + "Filename for the logs") + ; + + // Hidden options, will be allowed both on command line and + // in config file, but will not be shown to the user. + boost::program_options::options_description hidden ("Hidden options"); + hidden.add_options() + ("copyright", + boost::program_options::value< std::vector<std::string> >(), + "Show the copyright (license)"); + + boost::program_options::options_description cmdline_options; + cmdline_options.add(generic).add(config).add(hidden); + + boost::program_options::options_description config_file_options; + config_file_options.add(config).add(hidden); + + boost::program_options::options_description visible ("Allowed options"); + visible.add(generic).add(config); + + boost::program_options::positional_options_description p; + p.add ("copyright", -1); + + boost::program_options::variables_map vm; + boost::program_options:: + store (boost::program_options::command_line_parser (argc, argv). + options (cmdline_options).positional(p).run(), vm); + + std::ifstream ifs ("rmol.cfg"); + boost::program_options::store (parse_config_file (ifs, config_file_options), + vm); + boost::program_options::notify (vm); + + if (vm.count ("help")) { + std::cout << visible << std::endl; + return K_RMOL_EARLY_RETURN_STATUS; + } + + if (vm.count ("version")) { + std::cout << PACKAGE_NAME << ", version " << PACKAGE_VERSION << std::endl; + return K_RMOL_EARLY_RETURN_STATUS; + } + + if (vm.count ("prefix")) { + std::cout << "Installation prefix: " << PREFIXDIR << std::endl; + return K_RMOL_EARLY_RETURN_STATUS; + } + + if (vm.count ("input")) { + lInputFilename = vm["input"].as< std::string >(); + std::cout << "Input filename is: " << lInputFilename << std::endl; + } + + if (vm.count ("log")) { + lLogFilename = vm["log"].as< std::string >(); + std::cout << "Log filename is: " << lLogFilename << std::endl; + } + + std::cout << "The number of random draws is: " << lRandomDraws << std::endl; + std::cout << "The resource capacity is: " << lCapacity << std::endl; + std::cout << "The Revenue Management method is: " << lMethod << std::endl; + + return 0; +} + + +// ///////// M A I N //////////// +int main (int argc, char* argv[]) { + try { + + // Number of random draws to be generated (best if greater than 100) + int lRandomDraws = 0; + + // Methods of optimisation (0 = Monte-Carlo, 1 = Dynamic Programming, + // 2 = EMSR, 3 = EMSR-a, 4 = EMSR-b) + short lMethod = 0; + + // Cabin Capacity (it must be greater then 100 here) + double lCapacity = 0.0; + + // Input file name + std::string lInputFilename; + + // Output log File + std::string lLogFilename; + + // Call the command-line option parser + const int lOptionParserStatus = + readConfiguration (argc, argv, lRandomDraws, lCapacity, lMethod, + lInputFilename, lLogFilename); + + if (lOptionParserStatus == K_RMOL_EARLY_RETURN_STATUS) { + return 0; + } + + // Check wether or not a (CSV) input file should be read + bool hasInputFile = false; + if (lInputFilename.empty() == false) { + hasInputFile = true; + } + + // Set the log parameters + std::ofstream logOutputFile; + // Open and clean the log outputfile + logOutputFile.open (lLogFilename.c_str()); + logOutputFile.clear(); + + // Initialise the list of classes/buckets + RMOL::RMOL_Service rmolService (logOutputFile, lCapacity); + rmolService.setUpStudyStatManager(); + + if (hasInputFile) { + // Read the input file + rmolService.readFromInputFile (lInputFilename); + + } else { + // No input file has been provided. So, process a sample. + + // STEP 0. + // List of demand distribution parameters (mean and standard deviation) + + // Class/bucket 1: N (20, 9), p1 = 100 + rmolService.addBucket (100.0, 20, 9); + + // Class/bucket 2: N (45, 12), p2 = 70 + rmolService.addBucket (70.0, 45, 12); + + // Class/bucket 3: no need to define a demand distribution, p3 = 42 + rmolService.addBucket (42.0, 0, 0); + } + + switch (lMethod) { + case 0: { + // Calculate the optimal protections by the Monte Carlo + // Integration approach + rmolService.optimalOptimisationByMCIntegration (lRandomDraws); + break; + } + case 1: { + // Calculate the optimal protections by DP. + rmolService.optimalOptimisationByDP (); + break; + } + case 2: { + // Calculate the Bid-Price Vector by EMSR + rmolService.heuristicOptimisationByEmsr (); + break; + } + case 3: { + // Calculate the protections by EMSR-a + rmolService.heuristicOptimisationByEmsrA (); + break; + } + case 4: { + // Calculate the protections by EMSR-b + rmolService.heuristicOptimisationByEmsrB (); + break; + } + default: { + rmolService.optimalOptimisationByMCIntegration (lRandomDraws); + } + } + + } catch (const std::exception& stde) { + std::cerr << "Standard exception: " << stde.what() << std::endl; + return -1; + + } catch (...) { + return -1; + } + + return 0; +} Property changes on: trunk/rmol/rmol/batches/rmol.cpp ___________________________________________________________________ Added: svn:mergeinfo + Added: trunk/rmol/rmol/batches/sources.mk =================================================================== --- trunk/rmol/rmol/batches/sources.mk (rev 0) +++ trunk/rmol/rmol/batches/sources.mk 2009-05-03 16:45:21 UTC (rev 203) @@ -0,0 +1,2 @@ +batches_h_sources = +batches_cc_sources = $(top_srcdir)/rmol/batches/rmol.cpp Modified: trunk/rmol/rmol/bom/Makefile.am =================================================================== --- trunk/rmol/rmol/bom/Makefile.am 2009-05-03 12:54:10 UTC (rev 202) +++ trunk/rmol/rmol/bom/Makefile.am 2009-05-03 16:45:21 UTC (rev 203) @@ -3,16 +3,10 @@ include $(srcdir)/sources.mk noinst_LTLIBRARIES= libbom.la -if ENABLE_DEBUG -noinst_LTLIBRARIES += libbom_debug.la -endif + libbom_la_SOURCES= $(bom_h_sources) $(bom_cc_sources) -libbom_la_CXXFLAGS = $(CXXFLAGS_OPT) $(GSL_CFLAGS) $(BOOST_CFLAGS) -libbom_la_LIBADD = $(GSL_LIBS) +libbom_la_CXXFLAGS = $(GSL_CFLAGS) $(BOOST_CFLAGS) +libbom_la_LDFLAGS = $(GSL_LIBS) -libbom_debug_la_SOURCES = $(bom_h_sources) $(bom_cc_sources) -libbom_debug_la_CXXFLAGS = $(CXXFLAGS_DEBUG) $(GSL_CFLAGS) $(BOOST_CFLAGS) -libbom_debug_la_LIBADD = $(GSL_LIBS) - #pkgincludedir = $(includedir)/@PACKAGE@/bom #pkginclude_HEADERS = $(bom_h_sources) Modified: trunk/rmol/rmol/command/Makefile.am =================================================================== --- trunk/rmol/rmol/command/Makefile.am 2009-05-03 12:54:10 UTC (rev 202) +++ trunk/rmol/rmol/command/Makefile.am 2009-05-03 16:45:21 UTC (rev 203) @@ -3,14 +3,9 @@ include $(srcdir)/sources.mk noinst_LTLIBRARIES= libcmd.la -if ENABLE_DEBUG -noinst_LTLIBRARIES += libcmd_debug.la -endif + libcmd_la_SOURCES= $(cmd_h_sources) $(cmd_cc_sources) -libcmd_la_CXXFLAGS = $(CXXFLAGS_OPT) $(BOOST_CFLAGS) +libcmd_la_CXXFLAGS = $(BOOST_CFLAGS) -libcmd_debug_la_SOURCES = $(cmd_h_sources) $(cmd_cc_sources) -libcmd_debug_la_CXXFLAGS = $(CXXFLAGS_DEBUG) $(BOOST_CFLAGS) - #pkgincludedir = $(includedir)/@PACKAGE@/command #pkginclude_HEADERS = $(cmd_h_sources) Property changes on: trunk/rmol/rmol/config ___________________________________________________________________ Added: svn:ignore + .deps .libs Makefile.in Makefile rmol-paths.hpp Added: trunk/rmol/rmol/config/Makefile.am =================================================================== --- trunk/rmol/rmol/config/Makefile.am (rev 0) +++ trunk/rmol/rmol/config/Makefile.am 2009-05-03 16:45:21 UTC (rev 203) @@ -0,0 +1,25 @@ +include $(top_srcdir)/Makefile.common + +## Source directory + +DISTCLEANFILES = @PACKAGE@-paths.hpp + +MAINTAINERCLEANFILES = Makefile.in + +EXTRA_DIST = @PACKAGE@-paths.hpp + +# Targets +all-local: @PACKAGE@-paths.hpp + +@PACKAGE@-paths.hpp: Makefile + @echo '#ifndef __OPENTREP_PATHS_HPP' > $@ + @echo '#define __OPENTREP_PATHS_HPP' >> $@ + @echo '#define PACKAGE "@PACKAGE@"' >> $@ + @echo '#define PACKAGE_NAME "@PACKAGE_NAME@"' >> $@ + @echo '#define PACKAGE_VERSION "@VERSION@"' >> $@ + @echo '#define PREFIXDIR "$(prefix)"' >> $@ + @echo '#define BINDIR "$(bindir)"' >> $@ + @echo '#define LIBEXECDIR "$(libexecdir)"' >> $@ + @echo '#define DATADIR "$(datadir)"' >> $@ + @echo '#define DOCDIR "$(docdir)"' >> $@ + @echo '#endif // __OPENTREP_PATHS_HPP' >> $@ Property changes on: trunk/rmol/rmol/core ___________________________________________________________________ Added: svn:ignore + .deps .libs Makefile Makefile.in Added: trunk/rmol/rmol/core/Makefile.am =================================================================== --- trunk/rmol/rmol/core/Makefile.am (rev 0) +++ trunk/rmol/rmol/core/Makefile.am 2009-05-03 16:45:21 UTC (rev 203) @@ -0,0 +1,24 @@ +include $(top_srcdir)/Makefile.common +include $(srcdir)/sources.mk + +## Source directory + +MAINTAINERCLEANFILES = Makefile.in + +SUBDIRS = + + +# Library +lib_LTLIBRARIES = lib@PACKAGE@.la + +lib@PACKAGE@_la_SOURCES = $(service_h_sources) $(service_cc_sources) +lib@PACKAGE@_la_LIBADD = \ + $(top_builddir)/@PACKAGE@/basic/libbas.la \ + $(top_builddir)/@PACKAGE@/field/libfld.la \ + $(top_builddir)/@PACKAGE@/bom/libbom.la \ + $(top_builddir)/@PACKAGE@/factory/libfac.la \ + $(top_builddir)/@PACKAGE@/command/libcmd.la \ + $(top_builddir)/@PACKAGE@/service/libsvc.la +lib@PACKAGE@_la_LDFLAGS = \ + $(BOOST_DATE_TIME_LIB) $(BOOST_PROGRAM_OPTIONS_LIB) \ + $(GSL_LIBS) -version-info $(GENERIC_LIBRARY_VERSION) Copied: trunk/rmol/rmol/core/sources.mk (from rev 201, trunk/rmol/rmol/sources.mk) =================================================================== --- trunk/rmol/rmol/core/sources.mk (rev 0) +++ trunk/rmol/rmol/core/sources.mk 2009-05-03 16:45:21 UTC (rev 203) @@ -0,0 +1,3 @@ +service_h_sources = $(top_srcdir)/rmol/RMOL_Types.hpp \ + $(top_srcdir)/rmol/RMOL_Service.hpp +service_cc_sources = Property changes on: trunk/rmol/rmol/core/sources.mk ___________________________________________________________________ Added: svn:mergeinfo + Modified: trunk/rmol/rmol/factory/Makefile.am =================================================================== --- trunk/rmol/rmol/factory/Makefile.am 2009-05-03 12:54:10 UTC (rev 202) +++ trunk/rmol/rmol/factory/Makefile.am 2009-05-03 16:45:21 UTC (rev 203) @@ -3,14 +3,9 @@ include $(srcdir)/sources.mk noinst_LTLIBRARIES= libfac.la -if ENABLE_DEBUG -noinst_LTLIBRARIES += libfac_debug.la -endif + libfac_la_SOURCES= $(fac_h_sources) $(fac_cc_sources) -libfac_la_CXXFLAGS = $(CXXFLAGS_OPT) +libfac_la_CXXFLAGS = -libfac_debug_la_SOURCES = $(fac_h_sources) $(fac_cc_sources) -libfac_debug_la_CXXFLAGS = $(CXXFLAGS_DEBUG) - #pkgincludedir = $(includedir)/@PACKAGE@/factory #pkginclude_HEADERS = $(fac_h_sources) Modified: trunk/rmol/rmol/field/Makefile.am =================================================================== --- trunk/rmol/rmol/field/Makefile.am 2009-05-03 12:54:10 UTC (rev 202) +++ trunk/rmol/rmol/field/Makefile.am 2009-05-03 16:45:21 UTC (rev 203) @@ -3,14 +3,9 @@ include $(srcdir)/sources.mk noinst_LTLIBRARIES= libfld.la -if ENABLE_DEBUG -noinst_LTLIBRARIES += libfld_debug.la -endif + libfld_la_SOURCES= $(fld_h_sources) $(fld_cc_sources) -libfld_la_CXXFLAGS = $(CXXFLAGS_OPT) +libfld_la_CXXFLAGS = -libfld_debug_la_SOURCES = $(fld_h_sources) $(fld_cc_sources) -libfld_debug_la_CXXFLAGS = $(CXXFLAGS_DEBUG) - #pkgincludedir = $(includedir)/@PACKAGE@/field #pkginclude_HEADERS = $(fld_h_sources) Deleted: trunk/rmol/rmol/rmol.cpp =================================================================== --- trunk/rmol/rmol/rmol.cpp 2009-05-03 12:54:10 UTC (rev 202) +++ trunk/rmol/rmol/rmol.cpp 2009-05-03 16:45:21 UTC (rev 203) @@ -1,121 +0,0 @@ -// STL -#include <iostream> -#include <sstream> -#include <fstream> -// RMOL -#include <rmol/RMOL_Service.hpp> - - -// ///////// M A I N //////////// -int main (int argc, char* argv[]) { - try { - - // Output log File - std::string lLogFilename ("rmol.log"); - - // Number of random draws to be generated (best if greater than 100) - int K = 100000; - - // Methods of optimisation (0 = Monte-Carlo, 1 = Dynamic Programming, - // 2 = EMSR, 3 = EMSR-a, 4 = EMSR-b) - short METHOD_FLAG = 0; - - // Cabin Capacity (it must be greater then 100 here) - double cabinCapacity = 500.0; - - // Input file name - std::string inputFileName ("class.csv"); - bool hasInputFile = false; - - if (argc >= 1 && argv[1] != NULL) { - std::istringstream istr (argv[1]); - istr >> lLogFilename; - } - - if (argc >= 2 && argv[2] != NULL) { - std::istringstream istr (argv[2]); - istr >> K; - } - - if (argc >= 3 && argv[3] != NULL) { - std::istringstream istr (argv[3]); - istr >> cabinCapacity; - } - - if (argc >= 4 && argv[4] != NULL) { - std::istringstream istr (argv[4]); - istr >> inputFileName; - hasInputFile = true; - } - - if (argc >= 5 && argv[5] != NULL) { - std::istringstream istr (argv[5]); - istr >> METHOD_FLAG; - } - - // Set the log parameters - std::ofstream logOutputFile; - // open and clean the log outputfile - logOutputFile.open (lLogFilename.c_str()); - logOutputFile.clear(); - - // Initialise the list of classes/buckets - RMOL::RMOL_Service rmolService (logOutputFile, cabinCapacity); - rmolService.setUpStudyStatManager(); - - if (hasInputFile) { - // Read the input file - rmolService.readFromInputFile (inputFileName); - - } else { - // No input file has been provided. So, process a sample. - - // STEP 0. - // List of demand distribution parameters (mean and standard deviation) - - // Class/bucket 1: N (20, 9), p1 = 100 - rmolService.addBucket (100.0, 20, 9); - - // Class/bucket 2: N (45, 12), p2 = 70 - rmolService.addBucket (70.0, 45, 12); - - // Class/bucket 3: no need to define a demand distribution, p3 = 42 - rmolService.addBucket (42.0, 0, 0); - } - - switch (METHOD_FLAG) { - - case 0 : // Calculate the optimal protections by the Monte Carlo - // Integration approach - rmolService.optimalOptimisationByMCIntegration (K); - break; - - case 1 : // Calculate the optimal protections by DP. - rmolService.optimalOptimisationByDP (); - break; - - case 2 : // Calculate the Bid-Price Vector by EMSR - rmolService.heuristicOptimisationByEmsr (); - break; - - case 3 : // Calculate the protections by EMSR-a - rmolService.heuristicOptimisationByEmsrA (); - break; - - case 4 : // Calculate the protections by EMSR-b - rmolService.heuristicOptimisationByEmsrB (); - break; - - default : rmolService.optimalOptimisationByMCIntegration (K); - } - - } catch (const std::exception& stde) { - std::cerr << "Standard exception: " << stde.what() << std::endl; - return -1; - - } catch (...) { - return -1; - } - - return 0; -} Modified: trunk/rmol/rmol/service/Makefile.am =================================================================== --- trunk/rmol/rmol/service/Makefile.am 2009-05-03 12:54:10 UTC (rev 202) +++ trunk/rmol/rmol/service/Makefile.am 2009-05-03 16:45:21 UTC (rev 203) @@ -3,14 +3,9 @@ include $(srcdir)/sources.mk noinst_LTLIBRARIES= libsvc.la -if ENABLE_DEBUG -noinst_LTLIBRARIES += libsvc_debug.la -endif + libsvc_la_SOURCES= $(svc_h_sources) $(svc_cc_sources) -libsvc_la_CXXFLAGS = $(CXXFLAGS_OPT) +libsvc_la_CXXFLAGS = -libsvc_debug_la_SOURCES = $(svc_h_sources) $(svc_cc_sources) -libsvc_debug_la_CXXFLAGS = $(CXXFLAGS_DEBUG) - #pkgincludedir = $(includedir)/@PACKAGE@/service #pkginclude_HEADERS = $(cmd_h_sources) Deleted: trunk/rmol/rmol/sources.mk =================================================================== --- trunk/rmol/rmol/sources.mk 2009-05-03 12:54:10 UTC (rev 202) +++ trunk/rmol/rmol/sources.mk 2009-05-03 16:45:21 UTC (rev 203) @@ -1,3 +0,0 @@ -service_h_sources = $(top_srcdir)/rmol/RMOL_Types.hpp \ - $(top_srcdir)/rmol/RMOL_Service.hpp -service_cc_sources = $(top_srcdir)/rmol/rmol.cpp Modified: trunk/rmol/rmol.spec.in =================================================================== --- trunk/rmol/rmol.spec.in 2009-05-03 12:54:10 UTC (rev 202) +++ trunk/rmol/rmol.spec.in 2009-05-03 16:45:21 UTC (rev 203) @@ -121,6 +121,9 @@ %changelog +* Sun May 03 2009 Denis Arnaud <den...@m4...> 0.20.0-1 +- Upstream integration + * Sun Mar 25 2009 Denis Arnaud <den...@m4...> 0.19.0-1 - RPM release for Fedora 10 Modified: trunk/rmol/test/Makefile.am =================================================================== --- trunk/rmol/test/Makefile.am 2009-05-03 12:54:10 UTC (rev 202) +++ trunk/rmol/test/Makefile.am 2009-05-03 16:45:21 UTC (rev 203) @@ -1,26 +1,27 @@ -## command sub-directory +## test sub-directory include $(top_srcdir)/Makefile.common MAINTAINERCLEANFILES = Makefile.in ## -SUBDIRS = com +SUBDIRS = samples com +EXTRA_DIST = testLib.sh ## + check_PROGRAMS = OptimiseTestSuite SimulateTestSuite TESTS = $(check_PROGRAMS) XFAIL_TESTS = #IndexBuildingTestSuite OptimiseTestSuite_SOURCES = OptimiseTestSuite.hpp OptimiseTestSuite.cpp OptimiseTestSuite_CXXFLAGS= $(BOOST_CFLAGS) $(CPPUNIT_CFLAGS) -OptimiseTestSuite_LDFLAGS = $(BOOST_LIBS) $(CPPUNIT_LIBS) -OptimiseTestSuite_LDADD = $(top_builddir)/test/com/libcppunitcore.la \ - $(top_builddir)/@PACKAGE@/lib@PACKAGE@.la +OptimiseTestSuite_LDADD = +OptimiseTestSuite_LDFLAGS = $(BOOST_LIBS) $(CPPUNIT_LIBS) \ + $(top_builddir)/test/com/libcppunitcore.la \ + $(top_builddir)/@PACKAGE@/core/lib@PACKAGE@.la SimulateTestSuite_SOURCES = SimulateTestSuite.hpp SimulateTestSuite.cpp SimulateTestSuite_CXXFLAGS = $(BOOST_CFLAGS) $(GSL_CFLAGS) $(CPPUNIT_CFLAGS) -SimulateTestSuite_LDFLAGS = $(BOOST_LIBS) $(GSL_LIBS) $(CPPUNIT_LIBS) -SimulateTestSuite_LDADD = $(top_builddir)/test/com/libcppunitcore.la - - -EXTRA_DIST = sample1.csv sample2.csv sample3.csv sample4.csv testLib.sh +SimulateTestSuite_LDADD = +SimulateTestSuite_LDFLAGS = $(BOOST_LIBS) $(GSL_LIBS) $(CPPUNIT_LIBS) \ + $(top_builddir)/test/com/libcppunitcore.la Modified: trunk/rmol/test/SimulateTestSuite.cpp =================================================================== --- trunk/rmol/test/SimulateTestSuite.cpp 2009-05-03 12:54:10 UTC (rev 202) +++ trunk/rmol/test/SimulateTestSuite.cpp 2009-05-03 16:45:21 UTC (rev 203) @@ -66,9 +66,6 @@ // Length of the Simulation (time-length) const int kSimulationLength = 365; - // Number of draws - const int K = 1000; - // Rate, expressed as a number of events per day // (lambda => mu = 1/ lambda) const double lambda = 10.0; Modified: trunk/rmol/test/com/Makefile.am =================================================================== --- trunk/rmol/test/com/Makefile.am 2009-05-03 12:54:10 UTC (rev 202) +++ trunk/rmol/test/com/Makefile.am 2009-05-03 16:45:21 UTC (rev 203) @@ -1,18 +1,12 @@ -## command sub-directory +## test/com sub-directory include $(top_srcdir)/Makefile.common include $(srcdir)/sources.mk MAINTAINERCLEANFILES = Makefile.in +EXTRA_DIST = + noinst_LTLIBRARIES= libcppunitcore.la -if ENABLE_DEBUG -noinst_LTLIBRARIES += libcppunitcore_debug.la -endif libcppunitcore_la_SOURCES = $(test_com_h_sources) $(test_com_cc_sources) -libcppunitcore_la_CXXFLAGS = $(CXXFLAGS_OPT) $(CPPUNIT_CFLAGS) - -libcppunitcore_debug_la_SOURCES = $(test_com_h_sources) $(test_com_cc_sources) -libcppunitcore_debug_la_CXXFLAGS = $(CXXFLAGS_DEBUG) $(CPPUNIT_CFLAGS) - -EXTRA_DIST = +libcppunitcore_la_CXXFLAGS = $(CPPUNIT_CFLAGS) Property changes on: trunk/rmol/test/samples ___________________________________________________________________ Added: svn:ignore + .deps .libs Makefile.in Makefile Added: trunk/rmol/test/samples/Makefile.am =================================================================== --- trunk/rmol/test/samples/Makefile.am (rev 0) +++ trunk/rmol/test/samples/Makefile.am 2009-05-03 16:45:21 UTC (rev 203) @@ -0,0 +1,7 @@ +## test/samples sub-directory +include $(top_srcdir)/Makefile.common +include $(srcdir)/sources.mk + +MAINTAINERCLEANFILES = Makefile.in + +EXTRA_DIST = sample1.csv sample2.csv sample3.csv sample4.csv Added: trunk/rmol/test/samples/sources.mk =================================================================== --- trunk/rmol/test/samples/sources.mk (rev 0) +++ trunk/rmol/test/samples/sources.mk 2009-05-03 16:45:21 UTC (rev 203) @@ -0,0 +1,4 @@ +test_com_h_sources = $(top_srcdir)/test/com/CppUnitCore.hpp \ + $(top_srcdir)/test/com/XmlOutputterHookForCC.hpp +test_com_cc_sources = $(top_srcdir)/test/com/CppUnitCore.cpp \ + $(top_srcdir)/test/com/XmlOutputterHookForCC.cpp This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <den...@us...> - 2009-05-03 21:46:37
|
Revision: 204 http://rmol.svn.sourceforge.net/rmol/?rev=204&view=rev Author: denis_arnaud Date: 2009-05-03 21:46:25 +0000 (Sun, 03 May 2009) Log Message: ----------- 1. Moved the samples directory in a dedicated, installable, directory. 2. Added the R-msm package. Modified Paths: -------------- trunk/rmol/Makefile.am trunk/rmol/configure.ac trunk/rmol/samples/Makefile.am trunk/rmol/samples/sources.mk trunk/rmol/test/Makefile.am Added Paths: ----------- trunk/rmol/R/R-RM2.spec trunk/rmol/R/R-msm.spec trunk/rmol/R/msm/ trunk/rmol/R/msm/ChangeLog trunk/rmol/R/msm/DESCRIPTION trunk/rmol/R/msm/NAMESPACE trunk/rmol/R/msm/R/ trunk/rmol/R/msm/R/boot.R trunk/rmol/R/msm/R/constants.R trunk/rmol/R/msm/R/hmm-dists.R trunk/rmol/R/msm/R/hmm.R trunk/rmol/R/msm/R/msm.R trunk/rmol/R/msm/R/outputs.R trunk/rmol/R/msm/R/pearson.R trunk/rmol/R/msm/R/simul.R trunk/rmol/R/msm/R/utils.R trunk/rmol/R/msm/data/ trunk/rmol/R/msm/data/aneur.txt trunk/rmol/R/msm/data/bos.txt trunk/rmol/R/msm/data/cav.txt trunk/rmol/R/msm/data/fev.txt trunk/rmol/R/msm/data/psor.txt trunk/rmol/R/msm/inst/ trunk/rmol/R/msm/inst/NEWS trunk/rmol/R/msm/inst/doc/ trunk/rmol/R/msm/inst/doc/Rplots.pdf trunk/rmol/R/msm/inst/doc/msm-manual.pdf trunk/rmol/R/msm/man/ trunk/rmol/R/msm/man/MatrixExp.Rd trunk/rmol/R/msm/man/aneur.Rd trunk/rmol/R/msm/man/boot.msm.Rd trunk/rmol/R/msm/man/bos.Rd trunk/rmol/R/msm/man/cav.Rd trunk/rmol/R/msm/man/coef.msm.Rd trunk/rmol/R/msm/man/crudeinits.msm.Rd trunk/rmol/R/msm/man/deltamethod.Rd trunk/rmol/R/msm/man/ematrix.msm.Rd trunk/rmol/R/msm/man/fev.Rd trunk/rmol/R/msm/man/hazard.msm.Rd trunk/rmol/R/msm/man/hmm-dists.Rd trunk/rmol/R/msm/man/logLik.msm.Rd trunk/rmol/R/msm/man/lrtest.msm.Rd trunk/rmol/R/msm/man/medists.Rd trunk/rmol/R/msm/man/msm.Rd trunk/rmol/R/msm/man/odds.msm.Rd trunk/rmol/R/msm/man/pearson.msm.Rd trunk/rmol/R/msm/man/pexp.Rd trunk/rmol/R/msm/man/plot.msm.Rd trunk/rmol/R/msm/man/plot.prevalence.msm.Rd trunk/rmol/R/msm/man/plot.survfit.msm.Rd trunk/rmol/R/msm/man/plotprog.msm.Rd trunk/rmol/R/msm/man/pmatrix.msm.Rd trunk/rmol/R/msm/man/pmatrix.piecewise.msm.Rd trunk/rmol/R/msm/man/prevalence.msm.Rd trunk/rmol/R/msm/man/psor.Rd trunk/rmol/R/msm/man/qmatrix.msm.Rd trunk/rmol/R/msm/man/qratio.msm.Rd trunk/rmol/R/msm/man/scoreresid.msm.Rd trunk/rmol/R/msm/man/sim.msm.Rd trunk/rmol/R/msm/man/simmulti.msm.Rd trunk/rmol/R/msm/man/sojourn.msm.Rd trunk/rmol/R/msm/man/statetable.msm.Rd trunk/rmol/R/msm/man/summary.msm.Rd trunk/rmol/R/msm/man/surface.msm.Rd trunk/rmol/R/msm/man/tnorm.Rd trunk/rmol/R/msm/man/totlos.msm.Rd trunk/rmol/R/msm/man/transient.msm.Rd trunk/rmol/R/msm/man/viterbi.msm.Rd trunk/rmol/R/msm/src/ trunk/rmol/R/msm/src/Makevars trunk/rmol/R/msm/src/analyticp.c trunk/rmol/R/msm/src/doc/ trunk/rmol/R/msm/src/doc/Makefile trunk/rmol/R/msm/src/doc/Sweave-local.sty trunk/rmol/R/msm/src/doc/figures/ trunk/rmol/R/msm/src/doc/figures/general.pdf trunk/rmol/R/msm/src/doc/figures/hidden.pdf trunk/rmol/R/msm/src/doc/figures/illdeath.pdf trunk/rmol/R/msm/src/doc/figures/multistate.pdf trunk/rmol/R/msm/src/doc/figures/p2q1.pdf trunk/rmol/R/msm/src/doc/figures/p2q12.pdf trunk/rmol/R/msm/src/doc/figures/p3q12.pdf trunk/rmol/R/msm/src/doc/figures/p3q124.pdf trunk/rmol/R/msm/src/doc/figures/p3q1246.pdf trunk/rmol/R/msm/src/doc/figures/p3q135.pdf trunk/rmol/R/msm/src/doc/figures/p3q14.pdf trunk/rmol/R/msm/src/doc/figures/p3q16.pdf trunk/rmol/R/msm/src/doc/figures/p4q13569.pdf trunk/rmol/R/msm/src/doc/figures/p4q159.pdf trunk/rmol/R/msm/src/doc/figures/p5q1_4_6_8_11_12_16.pdf trunk/rmol/R/msm/src/doc/figures/p5q1_6_11_16.pdf trunk/rmol/R/msm/src/doc/figures/p5q1_6_7_11_12.pdf trunk/rmol/R/msm/src/doc/figures/sampling.pdf trunk/rmol/R/msm/src/doc/msm-manual.Rnw trunk/rmol/R/msm/src/doc/msm.bib trunk/rmol/R/msm/src/hmm.c trunk/rmol/R/msm/src/hmm.h trunk/rmol/R/msm/src/lik.c trunk/rmol/R/msm/src/msm.h trunk/rmol/R/msm/src/pijt.c trunk/rmol/R/msm/tests/ trunk/rmol/R/msm/tests/analyticp.R trunk/rmol/R/msm/tests/boot.R trunk/rmol/R/msm/tests/debug.dat trunk/rmol/R/msm/tests/deriv-test.R trunk/rmol/R/msm/tests/deriv.R trunk/rmol/R/msm/tests/errors.R trunk/rmol/R/msm/tests/fev.R trunk/rmol/R/msm/tests/herrors.R trunk/rmol/R/msm/tests/hsim.R trunk/rmol/R/msm/tests/local.R trunk/rmol/R/msm/tests/misc.R trunk/rmol/R/msm/tests/miscnew.R trunk/rmol/R/msm/tests/pci.R trunk/rmol/R/msm/tests/pearson.R trunk/rmol/R/msm/tests/sim.R trunk/rmol/R/msm/tests/simple.R trunk/rmol/R/msm/tests/utils.R trunk/rmol/samples/ trunk/rmol/samples/sample1.csv trunk/rmol/samples/sample2.csv trunk/rmol/samples/sample3.csv trunk/rmol/samples/sample4.csv Removed Paths: ------------- trunk/rmol/samples/sample1.csv trunk/rmol/samples/sample2.csv trunk/rmol/samples/sample3.csv trunk/rmol/samples/sample4.csv trunk/rmol/test/samples/ Modified: trunk/rmol/Makefile.am =================================================================== --- trunk/rmol/Makefile.am 2009-05-03 16:45:21 UTC (rev 203) +++ trunk/rmol/Makefile.am 2009-05-03 21:46:25 UTC (rev 204) @@ -25,7 +25,7 @@ EXTRA_DIST = # Build in these directories: -SUBDIRS = rmol win32 po man $(INFO_DOC_DIR) $(HTML_DOC_DIR) $(TEST_DIR) +SUBDIRS = rmol win32 po man $(INFO_DOC_DIR) $(HTML_DOC_DIR) samples $(TEST_DIR) # Configuration helpers Added: trunk/rmol/R/R-RM2.spec =================================================================== --- trunk/rmol/R/R-RM2.spec (rev 0) +++ trunk/rmol/R/R-RM2.spec 2009-05-03 21:46:25 UTC (rev 204) @@ -0,0 +1,66 @@ +%global packname RM2 +%global packrel 1 + +Name: R-%{packname} +Version: 0.0 +Release: 1%{?dist} +Source0: ftp://cran.r-project.org/pub/R/contrib/main/%{packname}_%{version}.tar.gz +License: GPL +URL: http://cran.r-project.org/src/contrib +Group: Applications/Engineering +Summary: Revenue Management and Pricing for R +BuildRequires: R-devel, tetex-latex +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildArch: noarch +Requires(post): R +Requires(postun): R +Requires: R + +%description +RM2 is a simple package that implements functions +used in revenue management and pricing environments. + +%prep +%setup -q -c -n %{packname} + +%build + +%install +rm -rf $RPM_BUILD_ROOT +mkdir -p $RPM_BUILD_ROOT%{_datadir}/R/library +%{_bindir}/R CMD INSTALL -l $RPM_BUILD_ROOT%{_datadir}/R/library %{packname} +test -d %{packname}/src && (cd %{packname}/src; rm -f *.o *.so) +rm -rf $RPM_BUILD_ROOT%{_datadir}/R/library/R.css + +%check +%{_bindir}/R CMD check %{packname} + +%clean +rm -rf $RPM_BUILD_ROOT + +%post +%{_R_make_search_index} + +%postun +%{_R_make_search_index} + +%files +%defattr(-, root, root, -) +%dir %{_datadir}/R/library/%{packname} +#%%doc %{_datadir}/R/library/%{packname}/latex +#%%doc %{_datadir}/R/library/%{packname}/doc +#%%doc %{_datadir}/R/library/%{packname}/html +%doc %{_datadir}/R/library/%{packname}/man +%doc %{_datadir}/R/library/%{packname}/DESCRIPTION +#%%doc %{_datadir}/R/library/%{packname}/NEWS +#%%{_datadir}/R/library/%{packname}/CONTENTS +#%%{_datadir}/R/library/%{packname}/INDEX +%{_datadir}/R/library/%{packname}/NAMESPACE +#%%{_datadir}/R/library/%{packname}/Meta +%{_datadir}/R/library/%{packname}/R +#%%{_datadir}/R/library/%{packname}/R-ex +#%%{_datadir}/R/library/%{packname}/help + +%changelog +* Sun May 03 2009 Denis Arnaud <den...@m4...> 0.0-1 +- Initial package creation Added: trunk/rmol/R/R-msm.spec =================================================================== --- trunk/rmol/R/R-msm.spec (rev 0) +++ trunk/rmol/R/R-msm.spec 2009-05-03 21:46:25 UTC (rev 204) @@ -0,0 +1,70 @@ +%global packname msm +%global packrel 1 + +Name: R-%{packname} +Version: 0.8.2 +Release: 1%{?dist} +Source0: ftp://cran.r-project.org/pub/R/contrib/main/%{packname}_%{version}.tar.gz +License: GPLv2 +URL: http://cran.r-project.org/src/contrib +Group: Applications/Engineering +Summary: Multi-state Markov and hidden Markov models in continuous time +BuildRequires: R-devel, tetex-latex, R-mvtnorm +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildArch: noarch +Requires(post): R +Requires(postun): R +Requires: R + +%description +Functions for fitting general continuous-time Markov and hidden Markov +multi-state models to longitudinal data. Both Markov transition rates +and the hidden Markov output process can be modelled in terms of +covariates. A variety of observation schemes are supported, including +processes observed at arbitrary times, completely-observed processes, +and censored states. + +%prep +%setup -q -c -n %{packname} + +%build + +%install +rm -rf $RPM_BUILD_ROOT +mkdir -p $RPM_BUILD_ROOT%{_datadir}/R/library +%{_bindir}/R CMD INSTALL -l $RPM_BUILD_ROOT%{_datadir}/R/library %{packname} +test -d %{packname}/src && (cd %{packname}/src; rm -f *.o *.so) +rm -rf $RPM_BUILD_ROOT%{_datadir}/R/library/R.css + +%check +%{_bindir}/R CMD check %{packname} + +%clean +rm -rf $RPM_BUILD_ROOT + +%post +%{_R_make_search_index} + +%postun +%{_R_make_search_index} + +%files +%defattr(-, root, root, -) +%dir %{_datadir}/R/library/%{packname} +#%%doc %{_datadir}/R/library/%{packname}/latex +#%%doc %{_datadir}/R/library/%{packname}/doc +#%%doc %{_datadir}/R/library/%{packname}/html +%doc %{_datadir}/R/library/%{packname}/man +%doc %{_datadir}/R/library/%{packname}/DESCRIPTION +#%%doc %{_datadir}/R/library/%{packname}/NEWS +#%%{_datadir}/R/library/%{packname}/CONTENTS +#%%{_datadir}/R/library/%{packname}/INDEX +%{_datadir}/R/library/%{packname}/NAMESPACE +#%%{_datadir}/R/library/%{packname}/Meta +%{_datadir}/R/library/%{packname}/R +#%%{_datadir}/R/library/%{packname}/R-ex +#%%{_datadir}/R/library/%{packname}/help + +%changelog +* Sun May 03 2009 Denis Arnaud <den...@m4...> 0.0-1 +- Initial package creation Added: trunk/rmol/R/msm/ChangeLog =================================================================== --- trunk/rmol/R/msm/ChangeLog (rev 0) +++ trunk/rmol/R/msm/ChangeLog 2009-05-03 21:46:25 UTC (rev 204) @@ -0,0 +1,1095 @@ +2009-04-08 Chris Jackson <chr...@mr...> + + * man/msm.Rd: Documentation for qconstraint clarified. + + * R/outputs.R: Bug fix - interactions now expanded properly when + calling extractor functions for models with interactions between + covariates. + + * R/msm.R: Bug fix which affected bootstrap refitting in + pearson.msm, giving "Error in `$<-.data.frame`(`*tmp*`, + "pci.imp"..." + + * DESCRIPTION: Version 0.8.2 released. + +2009-04-03 Chris Jackson <chr...@mr...> + + * LaTeX sources for PDF manual included in src/doc to enable + msm to be approved as a Debian package. + +2008-07-25 Chris Jackson <chr...@mr...> + + * R/pearson.R: Bug fix, maxtimes was producing negative censoring + times. + + * DESCRIPTION: Version 0.8.1 released. + +2008-07-23 Chris Jackson <chr...@mr...> + + * R/msm.R: New option "pci" to msm, which automatically constructs + a model with piecewise-constant transition intensities which + change at the supplied times. + + * R/boot.R: Give an informative error in normal theory CIs when + SEs not available from fitted model. + +2008-07-22 Chris Jackson <chr...@mr...> + + * src/lik.c (GetOutcomeProb): HMM now applies to censored + outcomes, unless obstrue = 1. Thanks to Norm Good for the + suggestion. + +2008-04-15 Chris Jackson <chr...@mr...> + + * R/msm.R: deriv.test argument to msm removed. + + * src/lik.c: Bug fix in liksimple/derivsimple - the P matrix was + not being recalculated when the obstype changed between 1 and 2. + Thanks to Peter Jepsen for uncovering this. + +2008-03-31 Chris Jackson <chr...@mr...> + + * R/outputs.R: totlos.msm now computes total length of stay for + all states, not just transient states. New argument "end" added. + + * R/outputs.R: xlim argument added to plotprog.msm. + + * R/outputs.R: legend added to plot.prevalence.msm. + +2008-03-28 Chris Jackson <chr...@mr...> + + * DESCRIPTION: Version 0.8 released. + +2008-03-18 Chris Jackson <chr...@mr...> + + * R/pearson.R: New file for the Pearson-type goodness-of-fit test. + + * data/heart.txt: Data "heart" renamed to "cav". + + * R/simul.R: any() bugs in simmisc.msm for simulating + misclassification models fixed + +2008-03-11 Chris Jackson <chr...@mr...> + + * R/outputs.R: logLik.msm degrees of freedom corrected for models + with parameter constraints. + + * R/outputs.R: New function "plot.survfit.msm" to plot + Kaplan-Meier estimate of survival probabilty compared with the + fitted survival probability from a model. + + * R/outputs.R: Allow customisable axis titles and line widths in + all plot functions. + +2008-03-03 Chris Jackson <chr...@mr...> + + * R/outputs.R: New function "plotprog.msm" to plot Kaplan-Meier + estimates of time to first occurrence of each state. Added + "survfit" and "Surv" imports from the "survival" package. + + * R/outputs.R: New likelihood ratio test function + "lrtest.msm". + +2008-03-03 Chris Jackson <chr...@mr...> + + * R/outputs.R: logLik method returns the log-likelihood, not the + minus log-likelihood. Thanks to Jay Rotella for the report. + +2008-02-27 Chris Jackson <chr...@mr...> + + * R/utils.R: Transformation bug fixed which caused rtnorm to hang + for extreme means. Thanks to Bj\xF6rn Bornkamp. + +2008-02-18 Chris Jackson <chr...@mr...> + + * R/boot.R: Simulate normal CIs using unreplicated parameters, so + that they work with the new release of mvtnorm. Thanks to Peter + Jepsen for the report. + +2007-12-12 Chris Jackson <chr...@mr...> + + * R/msm.R,src/lik.c: Score residuals implemented. + +2007-12-10 Chris Jackson <chr...@mr...> + + * R/utils.R: Quantile functions: uniroot() convergence tolerance + tightened to solve problems with obtaining quantiles for small + arguments. Thanks to Barbara Bredner for the report. + + * DESCRIPTION: Version 0.7.6 released. + +2007-11-21 Chris Jackson <chr...@mr...> + + * R/simul.R: Bug fix, "cur.t not found" error. + + * R/simul.R: Allow covariates on misclassification probabilities + in simulations + +2007-11-20 Chris Jackson <chr...@mr...> + + * R/msm.R: Don't give no-SEs warning when hessian=FALSE + + * R/simul.R: Handle only one observation per subject. + + * R/outputs.R: New internal function intervaltrans.msm to + determine set of allowed transitions in an interval. + + * DESCRIPTION: Version 0.7.5 released. + +2007-11-08 Chris Jackson <chr...@mr...> + + * R/outputs.R(qratio.se.msm): Bug fix for factor + covariates. Thanks to Peter Jepsen. + +2007-11-05 Chris Jackson <chr...@mr...> + + * R/boot.R (bootdata.trans.msm,bootdata.subject.msm), R/msm.R + (msm.form.data,msm.form.covdata): Handle factor covariates + properly when bootstrap refitting, by retaining the original + covariates (not the numeric contrasts) in the data. Thanks to + Peter Jepsen. + + * R/outputs.R: qmatrix.msm, ematrix.msm, sojourn.msm and + qratio.msm can now be called with ci="none", returning just the + matrix of estimates, with no CI. + +2007-11-02 Chris Jackson <chr...@mr...> + + * R/utils.R: MatrixExp now accepts a vector of t, in which case it + only needs to calculate the eigensystem once. + +2007-10-30 Chris Jackson <chr...@mr...> + + * R/utils.R: Bug fix in ppexp. Thanks to Mike Murphy. + + * msm-manual: More explanation of censored states versus censored + event times. + +2007-10-25 Chris Jackson <chr...@mr...> + + * src/hmm.c: New beta HMM outcome distribution. + + * src/lik.c: Ignore initprobs in HMMs if the true state is known + at the initial observation. + +2007-10-24 Chris Jackson <chr...@mr...> + + * src/lik.c: Handle censoring properly in Viterbi algorithm. + +2007-10-22 Chris Jackson <chr...@mr...> + + * R/boot.R(bootdata.subject.msm): Bug fix, wrong covariate matrix + was being read. Thanks to Peter Jepsen for the report. + + * msm-manual.pdf: Correction of algebraic typos in Viterbi + algorithm. + + * src/lik.c: Account for obstrue in Viterbi algorithm. + + * R/outputs.R: Allow Viterbi algorithm to be used to impute + censored states in data with censored states but no HMM. + +2007-10-18 Chris Jackson <chr...@mr...> + + * R/outputs.R(prevalence.msm,plot.prevalence.msm): Account for + arguments supplied to prevalence.msm when doing the plot. Thanks + to Peter Jepsen for the report. + +2007-10-01 Chris Jackson <chr...@mr...> + + * src/Makevars: CR endings removed to satisfy R CMD CHECK in R 2.6.0 + + * R/outputs.R(print.msm.est): test for CI using is.list(), since $ + on an atomic object fails in R 2.7.0 instead of returning NULL. + + * DESCRIPTION: Version 0.7.4 released. Use standardised license string. + +2007-08-15 Chris Jackson <chr...@mr...> + + * DESCRIPTION: Version 0.7.3 released. + +2007-08-14 Chris Jackson <chr...@mr...> + + * R/boot.R: Handle obstype and obsmisc in bootstrap refitting, and + handle refitting of msm models where obstype, obsmisc and subject + vectors are calculated within the argument to msm. Thanks to + Peter Jepsen for the report. + + * R/boot.R, R/outputs.R: Add bootstrap handlers (both + nonparametric and normal-theory) for qmatrix.msm, ematrix.msm, + sojourn.msm, qratio.msm, pmatrix.piecewise.msm, totlos.msm, + prevalence.msm. + +2007-07-27 Chris Jackson <chr...@mr...> + + * src/analyticp.c: Bug fix: exponential of certain degenerate 5 + state intensity matrices was not being calculated properly. Thanks + to Ross Boylan for the report. + + * man/msm.Rd: Make clear that the initial values for constrained + parameters are taken from the first of the multiple initial values + supplied. Thanks to Ross Boylan. + +2007-06-30 Chris Jackson <chr...@mr...> + + * R/outputs.R(surface.msm): Bug fix: don't include auxiliary + parameters in HMMs. Thanks to Michael Sweeting. + +2007-06-29 Chris Jackson <chr...@mr...> + + * R/utils.R(MatrixExp), src/pijt.c(MatrixExp): Bug fix. When there + are complex eigenvalues, don't use the eigensystem method of + calculating the matrix exponential. Thanks to V\xE9ronique Bouchard. + +2007-06-05 Chris Jackson <chr...@mr...> + + * R/outputs.R(expected.msm): Bug fix, wrong risk set was being + calculated for user-specified "times". + + * R/outputs.R(observed.msm): Allow interpolation of observed + states using the midpoint of an interval. + + * R/outputs.R(pmatrix.msm), R/boot.R: Confidence intervals for P + matrix can now be calculated by simulating from multivariate + normal distribution of MLEs. + + * R/outputs.R(plot.prevalence.msm),man/plot.prevalence.msm.Rd: new + function for prevalence plots. + + * man/pmatrix.piecewise.msm.Rd: Example corrected to use four sets + of covariates. Thanks to Qing Wang. + + * DESCRIPTION,NAMESPACE: Added rmvnorm import from "mvtnorm" package. + +2007-05-31 Chris Jackson <chr...@mr...> + + * DESCRIPTION: Version 0.7.2 released. + +2007-05-29 Chris Jackson <chr...@mr...> + + * R/outputs.R: Functions to calculate SEs and CIs for ematrix.msm + adapted to deal with multinomial logistic regression. CIs for + probabilities are calculated using delta method approximation to + variance of logit p, instead of log p as previously. + +2007-05-26 Chris Jackson <chr...@mr...> + + * R/utils.R: Truncated normal random sampling algorithm + improved to use the rejection method by Christian Robert. + Thanks to Vivek Roy for the suggestion. + +2007-05-25 Chris Jackson <chr...@mr...> + + * R/msm.R: Constraints on intensity covariate effects that some + effects are equal to other effects multiplied by -1 are now + allowed. + + * R/msm.R: Structural zeroes are allowed for initial state + occupancy probabilities. + + * inst/doc/msm-manual.pdf: Misclassification examples on heart + data changed so that individuals' first observations are not + misclassified. + +2007-05-21 Chris Jackson <chr...@mr...> + + * R/lik.c: Serious bug fix. Effects of covariates on outcome + probabilities in misclassification models (categorical HMMs) are + now estimated using multinomial logistic regressions, instead of + (incorrectly) independent univariate logistic regressions for each + probability. + + * R/msm.R, R/lik.c: Effects of covariates on initial state + probabilities in HMMs can now be estimated through multinomial + logistic regression. + +2007-05-13 Chris Jackson <chr...@mr...> + + * R/outputs.R, R/boot.R: New option "ci.boot" to prevalence.msm, a + helper to calculate bootstrap confidence limits for the expected + prevalences using "boot.msm". + + * R/msm.R, src/lik.c: New argument "obstrue" to msm, to allow some + observations to be observed without error in misclassification models. + +2007-05-11 Chris Jackson <chr...@mr...> + + * R/msm.R: Return derivatives in $deriv component of the msm + object after optimisation. Thanks to Ole Rummel. + +2007-04-18 Chris Jackson <chr...@mr...> + + * R/msm.R: Don't drop covariates on transition process which are + missing at the last observation for a patient, because they are + not used in the analysis. This has the consequences that output + from prevalence.msm may be different from earlier versions (0.7 or + earlier) if there are missing values in the data. Users are + advised to drop missing values from their data (if statistically + appropriate!) before using msm. + + * DESCRIPTION: Maintainer email address changed. + + * DESCRIPTION: Version 0.7.1 released. + +2007-04-05 Chris Jackson <chr...@im...> + + * R/outputs.R(viterbi.msm): Bug fix for models with + covariates. Thanks to Hongjie Wang. + + * R/outputs.R(prevalence.msm): Can now calculate expected + prevalences for models with piecewise-constant intensities, in the + same manner as pmatrix.piecewise.msm. + +2007-04-04 Chris Jackson <chr...@im...> + + * R/outputs.R(prevalence.msm): Bug fix, initstates was being + ignored. Thanks to Peter Jensen. + + * R/msm.R: Give a warning when the standard errors cannot be + calculated. + + * R/msm.R(msm.form.houtput): Bug fix for initprobs display with + only two states. + +2007-03-02 Chris Jackson <chr...@im...> + + * R/outputs.R(print.msm, qematrix.msm): Bug fix: When + center=FALSE, reported baseline intensity matrix should be + labelled as with covariates set to zero, not at their means. + Thanks to Ross Boylan. + +2007-02-09 Chris Jackson <chr...@im...> + + * src/lik.c: Return likelihood of zero for individuals with only + one observation in censoring and hidden models. Thanks to Jonathan + Williams for discovering the bug. + + * data/heart.txt: Age at transplant date corrected. Thanks to + Jonathan Williams. + +2006-11-21 Chris Jackson <chr...@im...> + + * R/msm.R: Initial state occupancy probabilities can now be + estimated. See new argument "est.initprobs" to msm. + + * DESCRIPTION: Version 0.7 released. + +2006-11-20 Chris Jackson <chr...@im...> + + * R/simul.R(sim.msm): Transpose error in bug fix from 0.6.4 + corrected. + + * R/outputs.R: Values of factor covariates are now supplied to + extractor functions in a sensible way, at last. Reordering bug + fixed with named covariate lists. + +2006-11-19 Chris Jackson <chr...@im...> + + * R/boot.R: New file. Implements bootstrap resampling for fitted + msm models. + + * R/outputs.R: Bootstrap confidence intervals available for + pmatrix.msm and totlos.msm. + + * R/outputs.R: pmatrix.msm now defaults to one time unit, instead + of forcing time unit to be explicitly given. + + * R/outputs.R: observed.msm function rewritten. Fixes bug in + calculating observed prevalence for state at maximum observed + time, reported by Jeremy Penn. It is also now much faster. + + * R/outputs.R: prevalence.msm is also adapted sensibly to handle + data where not all individuals start at a common time. + +2006-09-29 Chris Jackson <chr...@im...> + + * man/deltamethod.Rd: Example fixed to use correct covariance + matrix. Thanks to Andreas Beyerlein. + +2006-09-21 Chris Jackson <chr...@im...> + + * src/Makevars: PKG_LIBS fix to pass R CMD CHECK in R 2.4.0 + + * DESCRIPTION: Version 0.6.4 released. + +2006-09-12 Chris Jackson <chr...@im...> + + * R/simul.R(sim.msm) Bug fix: multiply covariates by baseline + intensities in the correct order. Also convert vector beta to + matrix. Thanks to Stephan Lenz for the report. + +2006-09-08 Chris Jackson <chr...@im...> + + * R/utils.R(rtnorm) Bug fix: use the correct components of + parameters which are vectors. Thanks to Jean-Baptiste Denis + for the report. + +2006-07-16 Chris Jackson <chr...@im...> + + * Rd/msm.Rd, inst/doc/msm-manual.pdf: Documentation correction - + the initial values of the qmatrix are with covariates at their + means in the data, not with the covariates at zero. This bug + has existed since version 0.5. + +2006-07-16 Chris Jackson <chr...@im...> + + * R/msm.R: Row and column names of crudeinits output retained from + qmatrix input. + +2006-06-29 Chris Jackson <chr...@im...> + + * Definition of initprobs corrected on manual p31. + +2006-06-28 Chris Jackson <chr...@im...> + + * References reinstated in the PDF manual. + + * DESCRIPTION: Version 0.6.3 released. + +2006-06-23 Chris Jackson <chr...@im...> + + * DESCRIPTION: Version 0.6.2 released. + +2006-06-21 Chris Jackson <chr...@im...> + + * msm.obs.to.fromto,msm.check.times: Support character subject + variables. Thanks to Danstan Bagenda for the report. + +2006-06-21 Chris Jackson <chr...@im...> + + * Analytically-calculated transition probability matrices + implemented for selected 3, 4 and 5 state models. These are + calculated in new file src/analyticp.c. New option "analyticp" in + msm() to revert to the old matrix exponential method. + Update to msm-manual.pdf describing this method. + +2006-06-20 Chris Jackson <chr...@im...> + + * R/simul.R(getobs.msm): Bug fix - Keep only one observation in + the absorbing state when absorbing state is not the highest state. + +2006-05-29 Chris Jackson <chr...@im...> + + * man/logLik.Rd: help page fixed to explain that this returns the + minus log likelihood. Thanks to Ole Rummel. + + * msm.R (likderiv.msm): bug fix - transformation of the + derivatives when all parameters are fixed was returning all NAs. + +2006-03-26 Chris Jackson <chr...@im...> + + * lik.c(Viterbi): Bug fix - don't ignore initprobs. Thanks to + Melanie Wall for reporting this. + + * DESCRIPTION: Version 0.6.1 released. + +2006-03-15 Chris Jackson <chr...@im...> + + * NAMESPACE: Import persp, plot and contour in from graphics. + + * msm.R (msm.check.times): Bug fix for factor subjects with empty + levels. Thanks to Jacques Gautrais. + +2006-01-04 Chris Jackson <chr...@im...> + + * msm.R (msm.form.data): use match(, unique()) to convert subject + to ordinal, not factor. Also do msm.check.times after dropping + missing data. Plus fix for missing obstime. + +2005-11-25 Chris Jackson <chr...@im...> + + * DESCRIPTION: Version 0.6 released. + +2005-11-17 Chris Jackson <chr...@im...> + + * R/outputs.R: New function surface.msm for surface plots of + likelihoods. + +2005-11-16 Chris Jackson <chr...@im...> + + * lik.c,pijt.c, etc.: Analytic derivatives of the likelihood + implemented for all models, apart from hidden Markov models or + models with censoring. New argument "use.deriv" to tell msm to + use these where appropriate. Thanks to Andrew Titman for the + debugging help. + + * The Dennis and Schnabel algorithm in the R function "nlm" can + now also be used to maximise the likelihood, as an alternative to + the algorithms in "optim". + +2005-11-11 Chris Jackson <chr...@im...> + + * msm-manual.pdf: definition of initial state probability f + corrected in hidden likelihood, equation 13. Thanks to Andrew + Titman. + +2005-11-08 Chris Jackson <chr...@im...> + + * man/deltamethod.Rd: Documentation of deltamethod clarified to + explain how to use user-defined variables within the formula. + +2005-10-11 Chris Jackson <chr...@im...> + + * Negative binomial hidden Markov model output distribution added. + + * DESCRIPTION: Version 0.5.2 released. + +2005-10-10 Chris Jackson <chr...@im...> + + * lik.c(Viterbi): Bug fix, wasn't handling Markov chains with + progressive and regressive states properly. Thanks to Rochelle + Watkins. + + * msm.R(msm.form.covdata): further fix for missing data. + +2005-10-1 Chris Jackson <chr...@im...> + + * msm.form.qmodel: Bug fix with gen.inits==TRUE and + censoring. Thanks to Jacques Gautrais. + +2005-07-27 Chris Jackson <chr...@im...> + + * sim.msm: collapse.covs fixed to handle covariate matrices with + one observation time. + + * msm.R(msm.form.covdata): bug fix for covariates in global + environment, not a data frame. This bug produced the error "Error + in 1:n : NA/NaN argument". + +2005-05-27 Chris Jackson <chr...@im...> + + * sim.msm: sample replaced by resample as in ?sample, to fix + simulations with small models. + + * msm.R: Fix for one-parameter models. (drop=FALSE in subsetting covmat) + +2005-05-25 Chris Jackson <chr...@im...> + + * utils.R: New functions (dpqr)pexp for the exponential + distribution with piecewise-constant rate. + + * utils.R: Bug fix: arguments lower.tail and log.p implemented for + truncated normal and measurement error distributions. + + * DESCRIPTION: Version 0.5.1 released. + +2005-05-23 Chris Jackson <chr...@im...> + + * tests/*: Tests are now fully automated. Outputs are compared + against known results using stopifnot(). + + * outputs.R(hazard.msm, odds.msm) Names "L95", "U95" changed to + "L","U" for generality. + +2005-05-20 Chris Jackson <chr...@im...> + + * msm.R: Data reorganised so that covariates are stored in a + matrix throughout. These are available from the model output as + cov for one per observation time, and covmat for one per time + difference. This fixes a bug which prevented covariates with + names such as "state", "time", "subject", among others, from being + used. + +2005-05-16 Chris Jackson <chr...@im...> + + * simul.R(sim.msm) Re-written. Fixes a bug in simulating from + models with time-dependent covariates, where not every covariate + change was accounted for. Uses new function rpexp to simulate + from the exponential distribution with piecewise-constant rate. + Thanks to Mike Sweeting for the bug report. + + * simul.R(sim.msm) Simulations now contain a censoring time at + maxtime, instead of the future absorption time. + + * simul.R(getobs.msm) Re-written, replacing ugly loops with + vectorised code. + +2005-04-11 Chris Jackson <chr...@im...> + + * man/simul.Rd: clarified that qmatrix is with covariates set to + zero. Thanks to Anne Presanis. + +2005-04-11 Chris Jackson <chr...@im...> + + * outputs.R(pmatrix.piecewise.msm): Bug fix for times of length 1. + Thanks to Anne Presanis. + +2005-03-09 Chris Jackson <chr...@im...> + + * pijt.c(Pmat): Don't recalculate pii within j loop. + +2005-03-08 Chris Jackson <chr...@im...> + + * pijt.c: New function Eigen. MatrixExp merged into one function. + +2005-03-07 Chris Jackson <chr...@im...> + + * msm.R(msm): Argument "hessian" added to msm. Covariance matrix + is set to NULL instead of a string when SEs not available. + + * msm.R(msm): Confidence limits of fixed parameters set to NA, not + zero width. + +2005-03-06 Chris Jackson <chr...@im...> + + * DESCRIPTION: Version 0.5 released. This is a major re-write, so + instead of a detailed change log, the NEWS entry is reproduced + below. + +Version 0.5 (2005-03-06) +----------- + +* Major update. Much of the internal R and C code has been re-written. + +* General continuous-time hidden Markov models can now be fitted with + msm, as well as misclassification models. Allowed response + distributions conditionally on the hidden state include categorical, + normal, Poisson, exponential and others. See the new "hmodel" + argument. Misclassification models can either be fitted in the old + style using an ematrix, or using a general HMM with a categorical + response distribution. Covariates can be fitted to many of the new + hidden response processes via generalized regressions. See + "hcovariates", "hcovinits" arguments. + +* Per-observation observation schemes, generalising the "exacttimes" + and "death" concepts. An optional new variable in the data can + specify whether each observation is a snapshot of the process, an + exactly-observed transition time, or a death state. Observations + are allowed to be at identical times, for example, a snapshot + followed instantly by an exact transition time. + +* Various syntax changes for cleaner moder specification. + + - Instead of 0/1 indicators, qmatrix and ematrix should contain the + initial values for the transition intensity / misclassification + matrix. These matrices can be named with names for the states of + the Markov chain. + + - The inits argument is abolished. Initial values are estimated + automatically if the new argument to msm "gen.inits = TRUE" is + supplied. This uses the initial values calculated by + crudeinits.msm. + + - misc no longer needs to be specified if an ematrix is supplied. + + - fixedpars=TRUE fixes all parameters, or specific parameters can + be fixed as before. + + - crudeinits.msm takes a state ~ time formula instead of two + separate state, time arguments, for consistency with the msm + function. + + - Initial values for covariate effects on transition rates / + misclassification probabilities are assumed to be zero unless + otherwise specified by the new "covinits" / "misccovinits" argument. + +* Support for 'from-to' style data has been withdrawn. Storing data in + this format is inadvisable as it destroys the longitudinal nature of + the data. + +* Speed improvements. The algorithm for calculating the likelihood + for non-hidden multi-state models has changed so that the matrix + exponential of the Q matrix is only calculated once for each time + difference / covariate combination. Therefore, users should see + speed improvements for data where the same from-state, to-state, + time difference, covariates combination appears many times. + +* Confidence intervals are now presented instead of standard errors + for uncertainty in parameter estimates. + +* New method of calculating matrix exponentials when the eigenvector + matrix is not invertible. It now uses the more robust method of + Pade approximants with scaling and squaring, instead of power + series. Faster LAPACK routines are now used for matrix inversion. + +* covmatch argument to msm has been abolished. To take a + time-dependent covariate value from the end of the relevant + transition instead of the default start, users are expected to + manipulate their data accordingly before calling msm, shifting the + positions of the covariate back by one within each subject. + +* Syntax changes for simmulti.msm. + +Bug fixes +--------- + +* The likelihood is now calculated correctly for individuals with + censored intermediate states, as well as censored initial and final states. + Thanks to Michael Sweeting for reporting this. + +* hazard.scale and odds.scale were interpreted wrongly in hazard.msm + and odds.msm respectively. + +* time-dependent covariate values now taken from the start instead of + end of the transition under hidden Markov models. + + +2005-01-28 Chris Jackson <chr...@im...> + + * src/lik.c (GetCensoredPObsTrue): Censored outcomes are now + assumed to be not misclassified. + + * msm.R(msm.form.censor): Bug fix - transient states were detected + incorrectly. + + * src/pijt.c: Bug fix. P matrix calculation for misclassification + models was ignoring exacttimes. + + * src/lik.c: Bug fix. Ignore death when exacttimes = TRUE. + + * DESCRIPTION: Version 0.4.1 released. + +2005-01-07 Chris Jackson <chr...@im...> + + * DESCRIPTION: Version 0.4 released. + +2005-01-06 Chris Jackson <chr...@im...> + + * msm/R/msm.process.covs: Bug fix - covariates were not being + centered. Thanks to Andrew Titman. + +2004-12-29 Chris Jackson <chr...@im...> + + Support added for censored observations. + + * src/lik.c: Bug fix. Don't ignore exacttimes for + misclassification models. + + Fixes in documentation. Thanks to Ross Boylan. + +2004-09-18 Chris Jackson <chr...@im...> + + * man: Rd syntax errors fixed to pass R CMD CHECK under 2.0.0 * + + * msm-manual: Reference to the PDF manual for msm made more + prominent. + + * DESCRIPTION: Version 0.3.3 released. + +2004-06-23 Chris Jackson <chr...@im...> + + * msm.R(msm.process.covs): Bug fix, constraints were not being + calculated properly when some covariates were constrained and some + were not. Thanks to Mike Sweeting. + +2004-06-01 Chris Jackson <chr...@im...> + + * msm-manual: Correction - heartmiscsex.msm is actually run using + default Nelder-Mead optimization, not BFGS. + +2004-05-13 Chris Jackson <chr...@im...> + + * R/outputs.R: plot.msm now plots survival curves in different + colours as well as different line types. + +2004-05-11 Chris Jackson <chr...@im...> + + * R/simul.R: simmulti.msm now returns a data frame, as it should + do. + +2004-04-23 Chris Jackson <chr...@im...> + + * New argument "start" in simmulti.msm to give the starting state + for each individual. Thanks to Stephan Lenz for the suggestion. + + +2004-03-25 Chris Jackson <chr...@im...> + + * NEWS file moved to inst directory, so that it ends up in the + root directory of binary installs. Leave ChangeLog in the source + package. + + * DESCRIPTION: Version 0.3.2 released. + +2004-03-24 Chris Jackson <chr...@im...> + + * R/outputs.R(print.msm): Bug fix - only say "covariates set to + their means" in the output if there actually are any covariates. + + * msm-manual.pdf: Hidden Markov model theory moved to straight + after general model theory, general cleanups. + +2004-03-23 Chris Jackson <chr...@im...> + + * msm-manual.pdf: R code examples rewritten using Sweave. + Examples run again with different death assumption, most estimates + are negligibly different. Misclassification model examples + corrected to include death. Example of plot.msm added. This is + not distributed as a vignette, as the msm model examples take a + long time to fit. + +2004-03-22 Chris Jackson <chr...@im...> + + * R/simul.R(simmulti.msm, getobs.msm): tunit argument abolished + and death times assumed to be known exactly. + + * src/lik.c(fillparvec): Bug fix. Bounds checking on vector of + indices of fixed parameters. Thanks to Ross Boylan. + +2004-03-21 Chris Jackson <chr...@im...> + + * R/msm.R, src/lik.c: tunit argument is now abolished (with + warning given). Death states are assumed to have exact entry + times, not within one day. This is cleaner and more logical, as + in longitudinal studies all observations are usually accurate to + one basic time unit, not just deaths. + + * R/msm.R, src/lik.c: More than one death state is now supported. + A death state has exact entry time, with an unknown transient + state at the previous instant. Thanks to Jean-Luc Bulliard for + suggesting this. + + * R/msm.R(msm.check.times): Just give a warning if a subject only + has one observation, no need to die. + + * R/msm.R(lik.msm): Bug fix. set diagonal to 0 when calculating + number of misclassified states nms, in case user has given non + zero diagonal entries in ematrix. + + * (various) Changes made so that R CMD CHECK passes with R 1.9.0 + alpha: codoc mismatches and PACKAGE argument in .C() + +2003-10-14 Chris Jackson <chr...@im...> + + * src/pijt.c(MatrixExpSeries): Bug fix. Don't overwrite the matrix + A, as it is needed after the function exits. This had led to wrong + results when exacttimes = TRUE and the intensity matrix had + repeated eigenvalues. + + * src/lik.c(liksimple, liksimple_fromto, UpdateLik): Don't ignore + death argument when exacttimes = TRUE. + + * R/msm.R(msm.check.times): Use table instead of tapply to count + the number of observations per subject. Fixes further problems + with running out of memory. + + * DESCRIPTION: Version 0.3.1 released. + +2003-09-29 Chris Jackson <chr...@im...> + + * R/outputs.R: Debugging print statements removed from + pmatrix.piecewise.msm + + * msm-manual.pdf: Version number added. + + * DESCRIPTION: Version 0.3 released. + +2003-09-26 Chris Jackson <chr...@im...> + + * src/lik.c, src/pijt.c: Allocate memory using S_alloc, not + Calloc. Solves the problem of running out of memory for large + datasets. + + * R/outputs.R(observed.msm): Fixed a bug with looping over a + factor patient ID, which caused prevalence.msm to fail. + +2003-09-25 Chris Jackson <chr...@im...> + + * R/outputs.R(print.msm) Don't draw ASCII underlines under + "Multi-state Markov models" banner - looks ugly in proportional + font. + + * R/msm.R: nmiscs model attribute (number of misclassification + probabilities) changed to nmisc for compatibility with C code. + + * src/lik.c(liksimple, liksimple_fromto): Bug fixed in the + likelhood calculation for non-misclassified reversible models with + death time known within one day. The error assumed the unobserved + states on the day before death could only be states greater or + equal than the previously observed state. This is not true for + reversible models. + + * man/summary.msm.Rd: usage and argument lists made consistent, + satisfying new R CMD CHECK. + +2003-09-24 Chris Jackson <chr...@im...> + + * R/msm.R, R/outputs.R, src/lik.c: A new argument "qconstraint" to + msm now allow equality constraints between baseline transition + intensities. A similar argument "econstraint" allows equality + constraints between misclassification probabilities. Thanks to + Mike Sweeting and Ross Boylan for suggesting this. + +2003-09-23 Chris Jackson <chr...@im...> + + * src/pijt.c(pijt): Bug fixed in the likelihood calculation for + exact transition times with reversible models. The error assumed + Prr(t) was always equal to exp(-qrr t), when this is only + satisfied for a state r which is only visited once. + +2003-06-30 Chris Jackson <chr...@im...> + + * R/outputs.R(qematrix.msm): Didn't work when the baseline rates + or probabilities were fixed to zero, bug fixed (now uses + x$model$qvector to test whether a transition is allowed, not + x$Qmatrices$logbaseline). + + * R/outputs.R: New function - pmatrix.piecewise.msm, for + calculating P-matrices for processes with non-homogeneous but + piecewise-constant intensities. Thanks to Mike Sweeting for + suggesting this. + + * DESCRIPTION: Version 0.2.2 released + +2003-06-25 Chris Jackson <chr...@im...> + + * R/msm.R (msm.check.model): Bug fix - was reporting the wrong + subject numbers when there were disallowed transitions in the + data. Thanks to Stephan Lenz for spotting this. + +2003-06-20 Chris Jackson <chr...@im...> + + * R/outputs.R: Covariates argument is now checked that it is a + list, to avoid ugly warnings in R 1.7.0 + +2003-06-16 Chris Jackson <chr...@im...> + + * R/msm.R (msm.form.output): Died when only one parameter in the + model, fixed by coercing covmat to matrix. + +2003-06-03 Chris Jackson <chr...@im...> + + * inst/doc/msm-manual.pdf: Edits to manual, e.g. correction of + covariates formulae to include baseline intensity, lots of typos + corrected. + + * DESCRIPTION: Version 0.2.1 released + +2003-04-29 Chris Jackson <chr...@im...> + + * R/simul.R: Bug fix in simmulti.msm: didn't work for one + covariate. Thanks to Mike Sweeting for spotting this. + + * R/msm.R: Subject identification variable is now allowed to be + factor or character. Thanks to Pablo Emilio Verde for the + suggestion. + + * R/msm.R: msm.check.times also checks whether all the + observations on a subject are adjacent in the data set. + +2003-03-20 Chris Jackson <chr...@im...> + + * R/R: Bug fix in msm.check.times. Thanks to Pablo Emilio Verde + for helping to find this. + +2003-02-20 Chris Jackson <chr...@im...> + + * R/simul.R: Bug fix in getobs.msm: exact death times were + ignored. (obstimes[i] replaced by sim$times[j+1]). + +2003-01-05 Chris Jackson <chr...@ic...> + + * DESCRIPTION: Version 0.2 released. + + * inst/doc/msm-manual.pdf: PDF manual completed. + +2003-01-03 Chris Jackson <chr...@ic...> + + * man: Heart transplant data added as an example data set + + * man: Aesthetic cleanups of all help pages + + * R/msm.R: New function crudeinits.msm to estimate a set of + initial values for transition rates by assuming data represent + the only transition times. + + * R/msm.R: New function statetable.msm to calculate frequencies of + successive state pairs in data. + + * R/outputs.R: Methodology changed for prevalencemisc.msm to make + it more similar to prevalence.msm, avoiding confusion. Observed + counts now common to both, and separated out into a new function + observed.msm. Then prevalencemisc.msm (and the internal C onestep) + was removed and prevalence.msm was made general to both + misclassification and non-misclassification models. + +2002-12-18 Chris Jackson <chr...@ic...> + + * src/lik.c: Bugfix. nms changed to nst in likelihood-calculating + functions. Fixes failure to calculate the likelihood where some + states where some states are observed without error, but are not + death states (Thanks to Martyn Plummer). + + * R/simul.R: Bugfix in getobs.msm, which led to the entrance to + not being observed for models with absorbing states. + +2002-12-09 Chris Jackson <chr...@ic...> + + * R/outputs.R: new function odds.msm to calculate odds ratios for + misclassification probabilities. + + * R/outputs.R: new function ematrix.msm. Calls new internal + functions, including qematrix.msm. + +2002-12-03 Chris Jackson <chr...@ic...> + + * R/outputs.R: new function qratio.msm for estimating ratios of + intensities and (via new function qratio.se.msm) their standard + errors. Documentation in man/qratio.msm.Rd. + +2002-12-02 Chris Jackson <chr...@ic...> + + * R/outputs.R: new internal function qmatrix.diagse.msm + + * R/msm.R Null components of msm objects removed, e.g. + misclassification parameters for non-misclassification models. + +2002-11-27 Chris Jackson <chr...@ic...> + + * R: File msm.R split into msm.R, outputs.R and utils.R. + + * R/msm.R. New functions absorbing.msm and transient.msm which + give the indices of the absorbing or transient states of the model. + + * R/msm.R. (plot.msm) Now accepts a "covariates" argument for + covariates at which to evaluate the survival probabilities. + + * R/msm.R. Functions which operate on msm objects now have the + msm object argument named "x", instead of "msm", for consistency. + + * man/qmatrix.msm.Rd, man/pmatrix.msm.Rd, man/sojourn.msm.Rd. Updated + documentation. + + * R/msm.R (msm). The contents of msm objects has been + reorganised. The first component of Qmatrices is now called + "logbaseline" and gives the estimates of the log intensites as + returned from the optimisation. Components "qcenter" and + "ecenter" are removed, as they were named confusingly. The + component 'Pmatrix' is also removed, as it is obsoleted by the + function 'pmatrix.msm'. New component 'foundse' is a logical + indicating whether the Hessian is positive definite, i.e. whether + standard errors are available. + + * R/msm.R (sojourn.msm) Function rewritten to allow a given set of + covariate values, using the new qmatrix.msm. Now takes a fitted + msm model as its argument, and the component "mean" in the return + is changed to "estimate". + + * R/msm.R (qmatrix.msm). New function to compute transition + intensity matrix at given covariate values. + + * R/msm.R (pmatrix.msm). New function to compute transition + probability matrix at given covariate values. + + * R/simul.R (simmulti.msm): Check for ordered patient IDs, and + sort input data if not ordered. Also check for duplicated + observation times and remove them. Default for 'death' argument + changed to FALSE for consistency with msm(). Give column names to + the simulated data. + +2002-11-13 Chris Jackson <chr...@ic...> + + * R/msm.R: New function msm.check.qmatrix to test for consistency + of Markov chain intensity matrices. + + * R/msm.R, man/totlos.Rd: New function totlos.msm to estimate total length of stay in a + state, with documentation. + + * src/lik.c, src/pijt.c: Unused and uninitialised variables fixed so the library builds + cleanly with -Wall. + +2002-11-08 Chris Jackson <chr...@ic...> + + * src/lik.c: Debugging print statements removed from onestep + + * msm_0.1.tar.gz: First release Added: trunk/rmol/R/msm/DESCRIPTION =================================================================== --- trunk/rmol/R/msm/DESCRIPTION (rev 0) +++ trunk/rmol/R/msm/DESCRIPTION 2009-05-03 21:46:25 UTC (rev 204) @@ -0,0 +1,18 @@ +Package: msm +Version: 0.8.2 +Date: 2009-04-08 +Title: Multi-state Markov and hidden Markov models in continuous time +Author: Christopher Jackson <chr...@mr...> +Maintainer: Christopher Jackson <chr...@mr...> +Description: Functions for fitting general continuous-time Markov and + hidden Markov multi-state models to longitudinal data. Both + Markov transition rates and the hidden Markov output process + can be modelled in terms of covariates. A variety of + observation schemes are supported, including processes observed + at arbitrary times, completely-observed processes, and censored + states. +License: GPL-2 +Imports: survival,mvtnorm +Packaged: 2009-04-08 19:03:15 UTC; chris +Repository: CRAN +Date/Publication: 2009-04-14 17:32:26 Added: trunk/rmol/R/msm/NAMESPACE =================================================================== --- trunk/rmol/R/msm/NAMESPACE (rev 0) +++ trunk/rmol/R/msm/NAMESPACE 2009-05-03 21:46:25 UTC (rev 204) @@ -0,0 +1,92 @@ +useDynLib(msm) + +export( +absorbing.msm, +boot.msm, +coef.msm, +contour.msm, +crudeinits.msm, +deltamethod, +ematrix.msm, +hazard.msm, +image.msm, +MatrixExp, +msm, +logLik.msm, +lrtest.msm, +odds.msm, +pearson.msm, +persp.msm, +plot.msm, +plotprog.msm, +plot.prevalence.msm, +plot.survfit.msm, +pmatrix.msm, +pmatrix.piecewise.msm, +prevalence.msm, +qmatrix.msm, +qratio.msm, +scoreresid.msm, +sim.msm, +simmulti.msm, +sojourn.msm, +statetable.msm, +summary.msm, +surface.msm, +totlos.msm, +transient.msm, +viterbi.msm, +hmmCat, +hmmIdent, +hmmUnif, +hmmNorm, +hmmLNorm, +hmmExp, +hmmGamma, +hmmWeibull, +hmmPois, +hmmBinom, +hmmTNorm, +hmmMETNorm, +hmmMEUnif, +hmmNBinom, +hmmBeta, +dtnorm, +ptnorm, +qtnorm, +rtnorm, +dmenorm, +pmenorm, +qmenorm, +rmenorm, +dmeunif, +pmeunif, +qmeunif, +rmeunif, +dpexp, +ppexp, +qpexp, +rpexp +) + +importFrom(graphics, plot) +importFrom(graphics, persp) +importFrom(graphics, contour) +importFrom(graphics, image) +importFrom(stats, coef) +importFrom(mvtnorm, rmvnorm) +importFrom(survival, Surv) +importFrom(survival, survfit) + +S3method(print, msm) +S3method(summary, msm) +S3method(plot, msm) +S3method(contour, msm) +S3method(persp, msm) +S3method(image, msm) +S3method(coef, msm) +S3method(logLik, msm) +S3method(print, hmodel) +S3method(print, hmmdist) +S3method(print, msm.est) +S3method(print, pearson.msm) Added: trunk/rmol/R/msm/R/boot.R =================================================================== --- trunk/rmol/R/msm/R/boot.R (rev 0) +++ trunk/rmol/R/msm/R/boot.R 2009-05-03 21:46:25 UTC (rev 204) @@ -0,0 +1,247 @@ +### Take a bootstrap sample from the data contained in a fitted msm +### model. Sample pairs of consecutive observations, i.e. independent +### transitions. Not applicable if model is hidden or some states are +### censored. + +bootdata.trans.msm <- function(x) { + dat <- if (!is.null(x$data.orig)) x$data.orig else x$data + subj.num <- match(dat$subject, unique(dat$subject)) + nextsubj <- c(subj.num[2:length(subj.num)], Inf) + lastsubj <- subj.num != nextsubj + inds <- sample(which(!lastsubj), replace=TRUE) + data.boot <- as.data.frame(matrix(nrow=length(inds)*2, ncol=length(dat$covlabels.orig) + 4)) + state.name <- deparse(as.list(x$call$formula)[[2]]) + time.name <- deparse(as.list(x$call$formula)[[3]]) + colnames(data.boot) <- c("subject.name", time.name, state.name, "obstype.name", dat$covlabels.orig) + data.boot[,state.name] <- as.vector(rbind(dat$state[inds], dat$state[inds+1])) + # in the bootstrap data, label each transition as being from a different subject + data.boot[,"subject.name"] <- rep(seq(along=inds), each=2) + data.boot[,time.name] <- as.vector(rbind(dat$time[inds], dat$time[inds+1])) + data.boot[,"obstype.name"] <- as.vector(rbind(dat$obstype.obs[inds], dat$obstype.obs[inds+1])) + for (j in dat$covlabels.orig) { + frominds <- seq(1, 2*length(inds)-1, 2) + data.boot[frominds, j] <- data.boot[frominds+1,j] <- dat$cov.orig[inds, j] + if (dat$covdata$covfactor[j]) + data.boot[,j] <- factor(data.boot[,j], labels=levels(dat$cov.orig[,j])) + } + colnames(data.boot) <- gsub("factor\\((.+)\\)", "\\1", colnames(data.boot)) + data.boot +} + +### Take a bootstrap sample from the data contained in a fitted msm +### model. Sample subjects. Used for hidden models or models with +### censoring, in which the transitions within a subject are not +### independent. + +bootdata.subject.msm <- function(x) { + dat <- if (!is.null(x$data.orig)) x$data.orig else x$data + subj.num <- match(dat$subject, unique(dat$subject)) + subjs <- sample(unique(subj.num), replace=TRUE) + inds <- new.subj <- NULL + for (i in seq(along=subjs)) { + subj.inds <- which(subj.num == subjs[i]) + inds <- c(inds, subj.inds) + new.subj <- c(new.subj, rep(i, length(subj.inds))) + } + data.boot <- as.data.frame(matrix(nrow=length(inds), ncol=length(dat$covlabels.orig) + 5)) + state.name <- deparse(as.list(x$call$formula)[[2]]) + time.name <- deparse(as.list(x$call$formula)[[3]]) + colnames(data.boot) <- c("subject.name", time.name, state.name, "obstype.name", "obstrue.name", dat$covlabels.orig) + data.boot[,"subject.name"] <- new.subj + data.boot[,time.name] <- dat$time[inds] + data.boot[,state.name] <- dat$state[inds] + data.boot[,"obstype.name"] <- dat$obstype[inds] + data.boot[,"obstrue.name"] <- dat$obstrue[inds] + for (j in dat$covlabels.orig) { + data.boot[, j] <- dat$cov.orig[inds, j] + if (dat$covdata$covfactor[j]){ + data.boot[,j] <- factor(data.boot[,j], labels=levels(dat$cov.orig[,j])) + } + } + colnames(data.boot) <- gsub("factor\\((.+)\\)", "\\1", colnames(data.boot)) + data.boot +} + +### Given a fitted msm model, draw a bootstrap dataset, refit the +### model, and optionally compute a statistic on the refitted model. +### Repeat B times, store the results in a list. +### msm objects tend to be large, so it is advised to compute a statistic on them by specifying "stat", instead +### of using this function to return a list of refitted msm objects. +### To compute more than one statistic, specify, e.g. stat=function(x)list(stat1(x),stat2(x)) + +### Some of the arguments to the msm call might be user-defined objects. +### e.g. qmatrix, ematrix, hmodel, ... +### Put in help file that these must be in the working environment. + +### a) if call supplied as factor(), strip factor() from name. + +boot.msm <- function(x, stat=pmatrix.msm, B=1000, file=NULL){ + boot.list <- vector(B, mode="list") + if (!is.null(x$call$subject)) x$call$subject <- substitute(subject.name) + if (!is.null(x$call$obstype)) x$call$obstype <- substitute(obstype.name) + if (!is.null(x$call$obstrue)) x$call$obstrue <- substitute(obstrue.name) + for (i in 1:B) { + boot.data <- if (x$hmodel$hidden || x$cmodel$ncens) bootdata.subject.msm(x) else bootdata.trans.msm(x) + x$call$data <- substitute(boot.data) + boot.list[[i]] <- try(eval(x$call)) + if (!is.null(stat)) + boot.list[[i]] <- stat(boot.list[[i]]) + if (!is.null(file)) save(boot.list, file=file) + } + boot.list +} + +### Utilities for calculating bootstrap CIs for particular statistics + +qematrix.ci.msm <- function(x, covariates="mean", intmisc="intens", sojourn=FALSE, cl=0.95, B=1000) { + q.list <- boot.msm(x, function(x)qematrix.msm(x=x, covariates=covariates, intmisc=intmisc)$estimates, B) + q.array <- array(unlist(q.list), dim=c(dim(q.list[[1]]), length(q.list))) + q.ci <- apply(q.array, c(1,2), function(x)(c(quantile(x, c(0.5 - cl/2, 0.5 + cl/2)), sd(x)))) + q.ci <- aperm(q.ci, c(2,3,1)) + if (sojourn) { + soj.array <- apply(q.array, 3, function(x) -1/diag(x)) + soj.ci <- apply(soj.array, 1, function(x)(c(quantile(x, c(0.5 - cl/2, 0.5 + cl/2)), sd(x)))) + list(q=q.ci, soj=soj.ci) + } + else q.ci +} + +qratio.ci.msm <- function(x, ind1, ind2, covariates="mean", cl=0.95, B=1000) { + q.list <- boot.msm(x, function(x)qratio.msm(x=x, ind1=ind1, ind2=ind2, covariates=covariates)["estimate"], B) + q.vec <- unlist(q.list) + c(quantile(q.vec, c(0.5 - cl/2, 0.5 + cl/2)), sd(q.vec)) +} + +pmatrix.ci.msm <- function(x, t, covariates="mean", cl=0.95, B=1000) { + p.list <- boot.msm(x, function(x)pmatrix.msm(x=x, t=t, covariates=covariates,ci="none"), B) + p.array <- array(unlist(p.list), dim=c(dim(p.list[[1]]), length(p.list))) + p.ci <- apply(p.array, c(1,2), function(x)(quantile(x, c(0.5 - cl/2, 0.5 + cl/2)))) + aperm(p.ci, c(2,3,1)) +} + +pmatrix.piecewise.ci.msm <- function(x, t1, t2, times, covariates="mean", cl=0.95, B=1000) { + p.list <- boot.msm(x, function(x)pmatrix.piecewise.msm(x=x, t1=t1, t2=t2, times=times, covariates=covariates,ci="none"), B) + p.array <- array(unlist(p.list), dim=c(dim(p.list[[1]]), length(p.list))) + p.ci <- apply(p.array, c(... [truncated message content] |
From: <den...@us...> - 2009-05-04 01:09:07
|
Revision: 207 http://rmol.svn.sourceforge.net/rmol/?rev=207&view=rev Author: denis_arnaud Date: 2009-05-04 01:09:01 +0000 (Mon, 04 May 2009) Log Message: ----------- [Conf] (Attempted to) fix an issue with Boost-1.37 on Fedora 11 (requiring libicu). Modified Paths: -------------- trunk/rmol/configure.ac trunk/rmol/rmol/Makefile.am trunk/rmol/rmol/config/Makefile.am trunk/rmol/rmol.spec.in Modified: trunk/rmol/configure.ac =================================================================== --- trunk/rmol/configure.ac 2009-05-03 23:31:04 UTC (rev 206) +++ trunk/rmol/configure.ac 2009-05-04 01:09:01 UTC (rev 207) @@ -11,7 +11,7 @@ AM_CONDITIONAL([HAVE_CPPUNIT], [test "x$CPPUNIT_LIBS" != x]) # RPM release number -RPM_RELEASE="1" +RPM_RELEASE="3" AC_SUBST(RPM_RELEASE) # Shared library versioning Modified: trunk/rmol/rmol/Makefile.am =================================================================== --- trunk/rmol/rmol/Makefile.am 2009-05-03 23:31:04 UTC (rev 206) +++ trunk/rmol/rmol/Makefile.am 2009-05-04 01:09:01 UTC (rev 207) @@ -12,4 +12,4 @@ # Header files nobase_pkginclude_HEADERS = $(service_h_sources) -nobase_nodist_pkginclude_HEADERS = $(top_builddir)/@PACKAGE@/config.h +#nobase_nodist_pkginclude_HEADERS = $(top_builddir)/@PACKAGE@/config.h Modified: trunk/rmol/rmol/config/Makefile.am =================================================================== --- trunk/rmol/rmol/config/Makefile.am 2009-05-03 23:31:04 UTC (rev 206) +++ trunk/rmol/rmol/config/Makefile.am 2009-05-04 01:09:01 UTC (rev 207) @@ -12,8 +12,8 @@ all-local: @PACKAGE@-paths.hpp @PACKAGE@-paths.hpp: Makefile - @echo '#ifndef __OPENTREP_PATHS_HPP' > $@ - @echo '#define __OPENTREP_PATHS_HPP' >> $@ + @echo '#ifndef __@PACKAGE_NAME@_PATHS_HPP' > $@ + @echo '#define __@PACKAGE_NAME@_PATHS_HPP' >> $@ @echo '#define PACKAGE "@PACKAGE@"' >> $@ @echo '#define PACKAGE_NAME "@PACKAGE_NAME@"' >> $@ @echo '#define PACKAGE_VERSION "@VERSION@"' >> $@ @@ -22,4 +22,4 @@ @echo '#define LIBEXECDIR "$(libexecdir)"' >> $@ @echo '#define DATADIR "$(datadir)"' >> $@ @echo '#define DOCDIR "$(docdir)"' >> $@ - @echo '#endif // __OPENTREP_PATHS_HPP' >> $@ + @echo '#endif // __@PACKAGE_NAME@_PATHS_HPP' >> $@ Modified: trunk/rmol/rmol.spec.in =================================================================== --- trunk/rmol/rmol.spec.in 2009-05-03 23:31:04 UTC (rev 206) +++ trunk/rmol/rmol.spec.in 2009-05-04 01:09:01 UTC (rev 207) @@ -16,6 +16,7 @@ BuildRequires: gsl-devel >= 1.8 BuildRequires: boost-devel >= 1.34 BuildRequires: cppunit-devel >= 1.10 +BuildRequires: libicu #Requires: %description @@ -75,7 +76,7 @@ make install DESTDIR=$RPM_BUILD_ROOT %find_lang %{name} # remove unpackaged files from the buildroot -rm -f $RPM_BUILD_ROOT%{_includedir}/%{name}/config.h +#rm -f $RPM_BUILD_ROOT%{_includedir}/%{name}/config.h rm -f $RPM_BUILD_ROOT%{_infodir}/dir rm -f $RPM_BUILD_ROOT%{_libdir}/lib%{name}.la # chmod 644 doc/html/installdox doc/html/*.png doc/html/*.ico @@ -103,6 +104,8 @@ %{_bindir}/%{name} %{_libdir}/lib*.so.* %{_mandir}/man3/%{name}.3.* +%dir %{_datadir}/%{name} +%{_datadir}/%{name}/samples/*.csv %files devel %defattr(-,root,root,-) @@ -121,6 +124,12 @@ %changelog +* Sun May 03 2009 Denis Arnaud <den...@m4...> 0.20.0-3 +- Added dependency on libicu for Boost 1.37 (Fedora 11) + +* Sun May 03 2009 Denis Arnaud <den...@m4...> 0.20.0-2 +- Added dependency on libicu-devel for Boost 1.37 (Fedora 11) + * Sun May 03 2009 Denis Arnaud <den...@m4...> 0.20.0-1 - Upstream integration This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <den...@us...> - 2009-05-04 01:10:55
|
Revision: 208 http://rmol.svn.sourceforge.net/rmol/?rev=208&view=rev Author: denis_arnaud Date: 2009-05-04 01:10:50 +0000 (Mon, 04 May 2009) Log Message: ----------- [Release] New working version (0.21.0). Modified Paths: -------------- trunk/rmol/configure.ac trunk/rmol/rmol.spec.in Modified: trunk/rmol/configure.ac =================================================================== --- trunk/rmol/configure.ac 2009-05-04 01:09:01 UTC (rev 207) +++ trunk/rmol/configure.ac 2009-05-04 01:10:50 UTC (rev 208) @@ -2,7 +2,7 @@ #------------------------------------------------------------------- AC_PREREQ(2.59) AC_COPYRIGHT([Copyright (C) 2007-2009 Denis Arnaud <den...@us...>]) -AC_INIT([RMOL],[0.20.0],[den...@us...],[rmol]) +AC_INIT([RMOL],[0.21.0],[den...@us...],[rmol]) AC_CONFIG_HEADER([rmol/config.h]) AC_CONFIG_SRCDIR([rmol/basic/BasConst.cpp]) AC_CONFIG_AUX_DIR([config]) @@ -11,11 +11,11 @@ AM_CONDITIONAL([HAVE_CPPUNIT], [test "x$CPPUNIT_LIBS" != x]) # RPM release number -RPM_RELEASE="3" +RPM_RELEASE="1" AC_SUBST(RPM_RELEASE) # Shared library versioning -GENERIC_LIBRARY_VERSION="0:20:0" +GENERIC_LIBRARY_VERSION="0:21:0" # | | | # +------+ | +---+ # | | | Modified: trunk/rmol/rmol.spec.in =================================================================== --- trunk/rmol/rmol.spec.in 2009-05-04 01:09:01 UTC (rev 207) +++ trunk/rmol/rmol.spec.in 2009-05-04 01:10:50 UTC (rev 208) @@ -124,6 +124,9 @@ %changelog +* Mon May 04 2009 Denis Arnaud <den...@m4...> 0.21.0-1 +- Upstream integration + * Sun May 03 2009 Denis Arnaud <den...@m4...> 0.20.0-3 - Added dependency on libicu for Boost 1.37 (Fedora 11) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <den...@us...> - 2009-05-10 01:28:57
|
Revision: 213 http://rmol.svn.sourceforge.net/rmol/?rev=213&view=rev Author: denis_arnaud Date: 2009-05-10 01:28:56 +0000 (Sun, 10 May 2009) Log Message: ----------- [Packaging] Removed dependencies on explicit versions of Boost (for EL 5). Now works on all distributions. Modified Paths: -------------- trunk/rmol/configure.ac trunk/rmol/rmol.spec.in Modified: trunk/rmol/configure.ac =================================================================== --- trunk/rmol/configure.ac 2009-05-06 16:46:02 UTC (rev 212) +++ trunk/rmol/configure.ac 2009-05-10 01:28:56 UTC (rev 213) @@ -11,7 +11,7 @@ AM_CONDITIONAL([HAVE_CPPUNIT], [test "x$CPPUNIT_LIBS" != x]) # RPM release number -RPM_RELEASE="1" +RPM_RELEASE="3" AC_SUBST(RPM_RELEASE) # Shared library versioning Modified: trunk/rmol/rmol.spec.in =================================================================== --- trunk/rmol/rmol.spec.in 2009-05-06 16:46:02 UTC (rev 212) +++ trunk/rmol/rmol.spec.in 2009-05-10 01:28:56 UTC (rev 213) @@ -13,10 +13,9 @@ Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: gsl-devel >= 1.8 -BuildRequires: boost-devel >= 1.34 -BuildRequires: cppunit-devel >= 1.10 -BuildRequires: libicu +BuildRequires: gsl-devel +BuildRequires: boost-devel +BuildRequires: cppunit-devel #Requires: %description @@ -50,8 +49,14 @@ %package doc Summary: HTML documentation for the @PACKAGE_NAME@ library Group: Documentation +%if 0%{?fedora} >= 10 BuildArch: noarch -BuildRequires: doxygen, texlive-latex, texlive-dvips, ghostscript +BuildRequires: texlive-latex, texlive-dvips +%endif +%if 0%{?fedora} < 10 +BuildRequires: tetex-latex, tetex-dvips +%endif +BuildRequires: doxygen, ghostscript %description doc This package contains the documentation in the HTML format of the @PACKAGE_NAME@ @@ -124,6 +129,12 @@ %changelog +* Sun May 10 2009 Denis Arnaud <den...@m4...> 0.21.0-3 +- Removed dependencies on specific versions (for EL 5) + +* Sat May 09 2009 Denis Arnaud <den...@m4...> 0.21.0-2 +- Removed dependencies on specific versions (for EL 5) + * Mon May 04 2009 Denis Arnaud <den...@m4...> 0.21.0-1 - Upstream integration This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <den...@us...> - 2009-05-11 06:28:12
|
Revision: 214 http://rmol.svn.sourceforge.net/rmol/?rev=214&view=rev Author: denis_arnaud Date: 2009-05-11 06:28:02 +0000 (Mon, 11 May 2009) Log Message: ----------- [Packaging] New working version. Modified Paths: -------------- trunk/rmol/configure.ac trunk/rmol/rmol.spec.in Modified: trunk/rmol/configure.ac =================================================================== --- trunk/rmol/configure.ac 2009-05-10 01:28:56 UTC (rev 213) +++ trunk/rmol/configure.ac 2009-05-11 06:28:02 UTC (rev 214) @@ -2,7 +2,7 @@ #------------------------------------------------------------------- AC_PREREQ(2.59) AC_COPYRIGHT([Copyright (C) 2007-2009 Denis Arnaud <den...@us...>]) -AC_INIT([RMOL],[0.21.0],[den...@us...],[rmol]) +AC_INIT([RMOL],[0.22.0],[den...@us...],[rmol]) AC_CONFIG_HEADER([rmol/config.h]) AC_CONFIG_SRCDIR([rmol/basic/BasConst.cpp]) AC_CONFIG_AUX_DIR([config]) @@ -11,11 +11,11 @@ AM_CONDITIONAL([HAVE_CPPUNIT], [test "x$CPPUNIT_LIBS" != x]) # RPM release number -RPM_RELEASE="3" +RPM_RELEASE="1" AC_SUBST(RPM_RELEASE) # Shared library versioning -GENERIC_LIBRARY_VERSION="0:21:0" +GENERIC_LIBRARY_VERSION="0:22:0" # | | | # +------+ | +---+ # | | | Modified: trunk/rmol/rmol.spec.in =================================================================== --- trunk/rmol/rmol.spec.in 2009-05-10 01:28:56 UTC (rev 213) +++ trunk/rmol/rmol.spec.in 2009-05-11 06:28:02 UTC (rev 214) @@ -129,6 +129,9 @@ %changelog +* Mon May 11 2009 Denis Arnaud <den...@m4...> 0.22.0-1 +- Upstream integration + * Sun May 10 2009 Denis Arnaud <den...@m4...> 0.21.0-3 - Removed dependencies on specific versions (for EL 5) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |