Question 1: Economic Order Quantity, varying t (a) In class we showed that the average…
- User
Question 1: Economic Order Quantity, varying t (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 time period from 0 to t for general t can be expressed as:
Average inventory level = (Q/2)*(1 - (t/T - floor(t/T)))
where floor(t/T) is the largest integer less than or equal to t/T.
Explanation: If we look at a time period that is a multiple of T, we can think of the inventory level as a sawtooth wave with period T. The peak of the wave is Q, the trough is 0, and the average level is Q/2. However, if we look at a time period that is not a multiple of T, we will see the same sawtooth wave but with a portion of the last cycle cut off. The fraction of the cycle that is cut off is (t/T - floor(t/T)), so the average inventory level is (Q/2)*(1 - (t/T - floor(t/T))).
(b) Here is the Python code to plot the average inventory level (exact and approximated) versus Q:
import numpy as np import matplotlib.pyplot as plt # Parameters demand_rate = 2 T = 10 t = 100 # Inventory levels to plot Q_values = np.arange(1, 31) # Exact average inventory level ave_inv_exact = Q_values/2 * (1 - (t/T - np.floor(t/T))) # Approximate average inventory level ave_inv_approx = Q_values/2 # Plotting the results plt.plot(Q_values, ave_inv_exact, label='Exact') plt.plot(Q_values, ave_inv_approx, label='Approx.') plt.xlabel('Order Quantity, Q') plt.ylabel('Average Inventory Level') plt.title('EOQ: Comparison of Exact and Approximate Average Inventory Levels') plt.legend() plt.show() - User
Question 2: EOQ, quadratic holding cost [15 points] Recall that in EOQ, we assume that the rate at which cost accrues due to holding inventory amount I(t) at a moment in time t is h I(t).
Calculate what the optimal order quantity would be if this were instead h I(t)^2. Assume, as we do in EOQ, that the time over which we calculate cost is a multiple of T.
Hint: use an integral to calculate the total holding cost over one cycle. Then divide by T to get the average holding cost per unit time.
- Assistant
In EOQ, the total cost per cycle is:
Total cost = ordering cost + holding cost
where the ordering cost is given by:
Ordering cost = (D/Q) S
and the holding cost is given by:
Holding cost = (h/2) * average inventory * T
In this problem, we have a quadratic holding cost, so the holding cost is given by:
Holding cost = (h/2) * integral(I(t)^2 dt, from 0 to T)
To calculate the integral, we need to express I(t) in terms of Q and t. Recall that I(t) is a sawtooth wave with period T and amplitude Q. We can express I(t) as:
I(t) = Q[t/T - floor(t/T)]
where floor(t/T) is the largest integer less than or equal to t/T.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.