Question 1: EOQ, varying t [15 points]
(a) In class we showed that the average inventory level under the EOQ model was Q/2 when we look over a time period that is a multiple of T. What is this average inventory level over the period of time from 0 to t for general t? Provide an exact expression for this.
(b) Using your expression above, plot the average inventory (calculated exactly using your expression from part a) and the approximation Q/2 versus Q over the range of 1 to 30. Use t=100 and λ=2.
Note that lambda is a keyword in python and using it as a variable name will cause problems. Pick a different variable name, like demand_rate.
You should see that the approximation is quite accurate for large t, like 100, and is less accurate for small t.
Assistant
(a)
The average inventory level over the period of time from 0 to t can be calculated as follows:
For the period when the order is received (0 to T), the average inventory level is Q/2.
For the period when the order is being used up (T to 2T), the average inventory level decreases linearly from Q/2 to 0.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
For the next period when the order is received (2T to 3T), the average inventory level increases linearly from 0 to Q/2.
This pattern repeats for each period of length T until we reach a period that includes time t.
Let n be the integer such that nT is the largest multiple of T that is less than or equal to t. Then, the average inventory level from 0 to t can be expressed as:
Average inventory = [(n-1)T to nT] inventory + [nT to t] inventory
From 0 to nT, the inventory level follows the pattern described above and can be calculated as:
Q/2 + (n-1)Q - demand_rate(nT - t + T)^2/(2Q)
From nT to t, the inventory level starts at 0 and increases linearly to Q/2, which can be expressed as: