Go to the documentation of this file.00001
00002
00003
00004
00005 #include <cmath>
00006
00007 #include <rmol/bom/Bucket.hpp>
00008 #include <rmol/bom/BucketHolder.hpp>
00009 #include <rmol/bom/SellupProbabilityCalculator.hpp>
00010
00011 namespace RMOL {
00012
00013
00014 void SellupProbabilityCalculator::calculateSellupProbability
00015 (BucketHolder& iBucketHolder,
00016 const double iQYield,
00017 const SellupFactorHolder_T& iSellupFactorHolder,
00018 SellupProbabilityVector_T& ioSellupProbabilityVector) {
00019
00020 short j = 0;
00021 for (iBucketHolder.begin();
00022 iBucketHolder.hasNotReachedEnd();
00023 iBucketHolder.iterate()) {
00024 Bucket& lCurrentBucket = iBucketHolder.getCurrentBucket();
00025 const double lYield = lCurrentBucket.getAverageYield();
00026 const double probSellup =
00027 exp(-iSellupFactorHolder.at(j) *lYield/iQYield);
00028 ioSellupProbabilityVector.push_back(probSellup);
00029 j++;
00030 }
00031 }
00032 }