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. |