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 expression for the average inventory level is given by the following formula:
I(Q, t) = ((Q - λ t mod Q) * (λ t mod Q) / 2 + (Q - (λ t mod Q)) * (λ t mod Q)) / Q
where λ is the demand rate, Q is the order quantity, t is the time interval, and "mod" denotes the modulo operation.
b) Let's plot the average inventory and the approximation Q/2 for the given range of Q from 1 to 30, with t = 100 and λ = 2.
import numpy as np import matplotlib.pyplot as plt def average_inventory(Q, t, demand_rate): mod = (demand_rate * t) % Q return ((Q - mod) * mod / 2 + (Q - mod) * mod) / Q t = 100 demand_rate = 2 Q_range = np.arange(1, 31) avg_inv_exact = [average_inventory(Q, t, demand_rate) for Q in Q_range] approximation = Q_range / 2 plt.plot(Q_range, avg_inv_exact, label="Exact average inventory") plt.plot(Q_range, approximation, label="Q/2 approximation") plt.xlabel("Order Quantity (Q)") plt.ylabel("Average Inventory") plt.legend() plt.show()This code will generate a plot that shows the exact average inventory and the approximation Q/2. You will notice that both curves are quite close to each other, especially for large order quantities. This indicates that the approximation Q/2 is quite accurate for large values of t = 100.
- 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
Let's first calculate the total holding cost for one order cycle with a holding cost function of h * I(t)^2 per unit time.
We know that during one cycle of duration T, the inventory I(t) decreases linearly from Q to 0, and (Q - λ*t) = λ * (T-t), for t ∈ [0, T]. So the inventory I(t) can be expressed as:
I(t) = Q - λt
Now, the holding cost per unit time is h * I(t)^2. Let's find the total holding cost H over one cycle by integrating the holding cost over the time interval [0, T]:
H = ∫[0, T] h * I(t)^2 dt = h * ∫[0, T] (Q - λt)^2 dt
To find the average holding cost per unit time, we need to divide H by T:
Average holding cost = H / T = h/T * ∫[0, T] (Q - λt)^2 dt
To find the optimal order quantity Q that minimizes the average holding cost, we can differentiate the average holding cost with respect to Q and set the derivative equal to 0.
Before that, let's calculate the integral:
∫[0, T] (Q - λt)^2 dt = (Q^3 / 3 * λ - 2 * Q^2 * λ * T / 2 + λ^2 * T^3 / 3) - (Q^3 / 3 * λ)
Now, let's differentiate H / T with respect to Q and set it 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.