Skip to content

Conversation

@nuclearkatie
Copy link
Contributor

@nuclearkatie nuclearkatie commented Jan 30, 2024

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 TotalInvTracker from 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_size is applied to the whole facility through the use of TotalInvTracker. Closes #554, Storage no longer needs to change the capacity of Resource Buffers ever time step

This also adds two variables

  • reorder_point when total facility inventory is above this point, no new demands will be made. At or below this point, the agent will request material
  • reorder_quantity when applicable, agent will request exactly this amount. It will make an exclusive demand for exactly this value

When reorder_point is used alone, it results in a (s,S) or min/max inventory policy. When the buffer inventory is below reorder_point, buypol tries to buy up to a full facility (max_inv_size, which is facility-wide). When used with reorder_quantity, this is a (R,Q) buy pol where the facility makes a single exclusive request of size reorder_quantity once below reorder_point. In both cases, when the inventory is above reorder_point, no requests are made

Closes #577, closes #578

@nuclearkatie nuclearkatie changed the title Applies TotalInvTracker and (R,Q) inventory policy to storage Applies TotalInvTracker and (R,Q)/(s,S) inventory policies to storage Jan 31, 2024
@gonuke gonuke added this to the Active-Dormant Buy Policy milestone Feb 5, 2024
Copy link
Member

@gonuke gonuke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks pretty clean - looking forward to reviewing it with a working kernel.

Copy link
Member

@gonuke gonuke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @nuclearkatie - nice to see this implemented

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

(s,S) inventory policy in Storage Implement (R,Q) inventory policy in Storage Fix Storage archetype buy policy

2 participants