Skip to content

Commit

Permalink
use number of bids from package GetFillMass
Browse files Browse the repository at this point in the history
  • Loading branch information
nuclearkatie committed Aug 28, 2024
1 parent c5d8732 commit f3637af
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/source.cc
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,9 @@ std::set<cyclus::BidPortfolio<cyclus::Material>::Ptr> Source::GetMatlBids(
double qty = std::min(target->quantity(), max_qty);

// calculate packaging
double bid_qty = context()->GetPackage(package)->GetFillMass(qty);
int n_full_bids = 0;
if (bid_qty >= context()->GetPackage(package)->fill_min()) {
n_full_bids = static_cast<int>(std::floor(qty / bid_qty));
}
std::pair<double, int> fill = context()->GetPackage(package)->GetFillMass(qty);
double bid_qty = fill.first;
int n_full_bids = fill.second;
Package::ExceedsSplitLimits(n_full_bids);

std::vector<double> bids;
Expand Down

0 comments on commit f3637af

Please sign in to comment.