Skip to content

Commit

Permalink
need RNG in header and >= rather than >
Browse files Browse the repository at this point in the history
  • Loading branch information
nuclearkatie committed Sep 30, 2024
1 parent adbb059 commit 8db2507
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/package.cc
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,14 @@ std::vector<double> Package::GetFillMass(double qty) {
if (strategy_ == "uniform" || strategy_ == "normal") {
// only use random if a full package amount is available. if less than one
// full amount is available, below will fill a partial package (no random).
while ( qty > std::max(0,fill_max_) ) {
while ( qty >= std::max(eps_rsrc(), fill_max_) ) {
fill_mass = dist_->sample();
packages.push_back(fill_mass);
qty -= fill_mass;
}
}

if (qty > std::max(eps_rsrc(),fill_min_) ) {
if (qty >= std::max(eps_rsrc(),fill_min_) ) {
// leftover material is enough to fill one more partial package.
packages.push_back(qty);
}
Expand Down
3 changes: 1 addition & 2 deletions src/package.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@

#include "error.h"
#include "logger.h"
class DoubleDistribution;
class DoubleDistribution::Ptr;
#include "random_number_generator.h"

namespace cyclus {

Expand Down

0 comments on commit 8db2507

Please sign in to comment.