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) Let's derive an exact expression for the average inventory level from 0 to t for general t under the EOQ model. Let Q be the EOQ and assume that we start with a full inventory, and the demand rate is constant at λ.
We want to find the average inventory level during time t. The time it takes to sell Q units is τ = Q/λ. If t is a multiple of τ, then the average inventory during t would be Q/2. However, for a general t, t might not be a multiple of τ.
Let's break this into two cases:
Case 1: If t ≤ τ, then we have sold part of the inventory during time t, but no replenishments have occurred yet. In this case, the inventory level over time follows a straight line, starting from Q and decreasing towards 0, ending at Q - λt at time t. The average inventory level in this case will be the area under this triangle divided by the length of the base, which is:
average_inventory = (Q + (Q - λt))/2 * t / t = (Q + (Q - λt))/2
Case 2: If t > τ, then multiple replenishments have occurred from time 0 to t. In this case, we can split the time into two parts, one part where a full cycle of τ has completed, and a remaining part where the average inventory can be calculated using the formula from Case 1. The number of full cycles would be k = floor(t/τ).
Now, we can calculate the average inventory level as:
average_inventory = (Q/2 * k * τ + (Q + (Q - λr))/2 * r) / t = [Q/2 * (kτ + (Q + (Q - λr))/2 * r)] / t
Where r is the remainder r = t - kτ = t mod τ
(b) Here is Python code to plot the average inventory calculated exactly (from the expression in part a) and the approximation Q/2 versus Q over the range of 1 to 30, using t=100 and λ=2:
import numpy as np import matplotlib.pyplot as plt def average_inventory_exact(Q, t, demand_rate): cycle_time = Q / demand_rate num_full_cycles, remainder = divmod(t, cycle_time) if remainder == 0: return Q / 2 else: return (Q / 2 * num_full_cycles * cycle_time + (Q + (Q - demand_rate * remainder)) / 2 * remainder) / t t = 100 lambda_rate = 2 Q_vals = np.arange(1, 31) average_inventory_exact_vals = [average_inventory_exact(Q, t, lambda_rate) for Q in Q_vals] average_inventory_approximation = Q_vals / 2 plt.plot(Q_vals, average_inventory_exact_vals, label='Exact') plt.plot(Q_vals, average_inventory_approximation, label='Approximation Q/2') plt.xlabel('Q') plt.ylabel('Average Inventory Level') plt.title('Average Inventory Level vs Q (t=100)') plt.legend() plt.show()As we can see from the plot, the approximation Q/2 is quite accurate for large t, and is less accurate for small t.
- 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 the EOQ model, we assume that the rate at which cost accrues due to holding an inventory amount I(t) at a moment in time t is hI(t). However, for this case, we want to find the optimal order quantity when the holding cost is hI(t)^2.
Assume we order Q units at each replenishment, and assume the time period over which we calculate cost is a multiple of T. The time it takes to sell Q units is τ = Q/λ, where λ is the demand rate.
Inventory level changes linearly over time between replenishments, going from Q down to 0. So the inventory level at any time t can be expressed as I(t) = Q - λt. Note that this inventory level is true for any cycle since they are all of equal length τ and equal average inventory Q/2.
To find the total holding cost for one cycle of length τ, we can integrate the holding cost function from 0 to τ and sum these costs for the number of equal cycles.
total_holding_cost = ∫(h * (Q - λt)^2) dt, integrated from 0 to τ = ∫(h * (Q - λt)^2) dt, integrated from 0 to Q/λ
Now, let's find the integral:
total_holding_cost = h ∫(Q^2 - 2Qλt + λ^2t^2) dt, integrated from 0 to Q/λ = h (Q^2t - (2Qλt^2)/2 + λ^2t^3/3) | (from t = 0 to Q/λ) = h (Q^3/λ - (Q^3/λ) + (λQ^3/3λ^3)) = h (Q^3/(3λ^2))
Next, we find the average holding cost per unit time by dividing the total holding cost by the cycle time τ = Q/λ:
average_holding_cost = total_holding_cost / (Q/λ) = h (Q^3/(3λ^2)) / (Q/λ) = hQ^2/(3λ)
Now, we need to minimize this holding cost with respect to Q. However, since holding cost is solely dependant on Q^2, minimizing it corresponds to minimizing Q^2. This means that the optimal order quantity would be to order the smallest possible quantity at every replenishment, i.e., ordering one unit at a time. In this case, holding cost becomes a non-issue because there is almost no inventory held at any given time.
Optimal Order Quantity: Q = 1
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.