Skip to content

Commit

Permalink
test whether dormant_ is greater than 0 before testing the rest of th…
Browse files Browse the repository at this point in the history
…e conditionsUpdate src/toolkit/matl_buy_policy.cc

Co-authored-by: Paul Wilson <[email protected]>
Signed-off-by: Katie Mummah <[email protected]>
  • Loading branch information
nuclearkatie and gonuke committed Nov 20, 2023
1 parent c8410d6 commit a6549f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/toolkit/matl_buy_policy.cc
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ std::set<RequestPortfolio<Material>::Ptr> MatlBuyPolicy::GetMatlRequests() {
bool make_req = buf_->quantity() < req_when_under_ * buf_->capacity();
double amt;

if (manager()->context()->time() % (active_ + dormant_) < active_) {
if (dormant_ > 0 && manager()->context()->time() % (active_ + dormant_) < active_) {
amt = TotalQty();
}
else {
Expand Down

0 comments on commit a6549f7

Please sign in to comment.