Ideas for expiration dates #169
Replies: 3 comments
-
Then, some changes need to be made in Lines 767 to 774 in da7de61
Lines 790 to 799 in da7de61 Line 791 would change to something like for exp in node.state_vars_current.inbound_shipment[p_index][rm_index].keys():
node.state_vars_current.inbound_shipment[p_index][rm_index][exp] = IS[exp] And so on. In Lines 879 to 883 in da7de61 the deductions from Lines 1009 to 1010 in da7de61 the deductions from |
Beta Was this translation helpful? Give feedback.
-
And, at each time period, we need to examine every expiration-date-indexed pile at every level -- in raw material inventory, finished goods inventory, and in-transit inventory, at every node -- and if the expiration date is before or equal to the current period, then it expires. Expiring means that it disappears -- we remove that entry from the nested dict. And we should keep track of expired products, through a new attribute in |
Beta Was this translation helpful? Give feedback.
-
There are a lot of details to work out -- this is just a rough sketch. Let's discuss. |
Beta Was this translation helpful? Give feedback.
-
I'm thinking something roughly like this:
A
Product
will have a new attribute calledshelf_life
. This indicates the number of periods the product can survive before it expires. Ifshelf_life = None
, the product has an infinite shelf life; it never expires.The expiration-date bookkeeping will happen in
NodeStateVars
. Each relevant attribute will have an extra level of nesting that indicates the number of periods until expiration.For example: Currently
inventory_level[prod]
= inventory level of productprod
. Under the new scheme,inventory_level[prod][exp]
= inventory level of productprod
that expires in periodexp
. Ifexp = None
, it refers to items that will never expire.Similarly,
inbound_shipment[p][rm][exp]
= shipment quantity of raw materialrm
that expires in periodexp
that is arriving at the node from predecessor nodep
in the current period.inbound_shipment_pipeline[p][rm][r][exp]
= shipment quantity of raw materialrm
that expires in periodexp
and will arrive from predecessor nodep
inr
periods from the current period. And so on.Beta Was this translation helpful? Give feedback.
All reactions