Applies TotalInvTracker and (R,Q)/(s,S) inventory policies to storage #574
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Relies on Cyclus PR cyclus#1646. Until that one is merged, this one cannot be merged. They should be merged together if possible
This PR implements the new
TotalInvTrackerfrom cyclus#1646 into Storage, which provides an agent-wide inventory limitation and is required as part of initializing the buy policy.This fixes the janky way that Storage was previously calculating an agent-wide limitation! Now, the
max_inv_sizeis applied to the whole facility through the use ofTotalInvTracker. Closes #554, Storage no longer needs to change the capacity of Resource Buffers ever time stepThis also adds two variables
reorder_pointwhen total facility inventory is above this point, no new demands will be made. At or below this point, the agent will request materialreorder_quantitywhen applicable, agent will request exactly this amount. It will make an exclusive demand for exactly this valueWhen
reorder_pointis used alone, it results in a (s,S) or min/max inventory policy. When the buffer inventory is belowreorder_point, buypol tries to buy up to a full facility (max_inv_size, which is facility-wide). When used withreorder_quantity, this is a (R,Q) buy pol where the facility makes a single exclusive request of sizereorder_quantityonce belowreorder_point. In both cases, when the inventory is abovereorder_point, no requests are madeCloses #577, closes #578