Assume Graphene Sheet Demand for last 100 days as Table 1 below.
Demand analysis and forecast for the graphene sheet based on the last 100 days of data:
🔹 Given:
Mean daily demand,
-
Standard deviation,
-
Desired service level = 95%
→ which means the warehouse wants only a 5% risk of shortage.
🔹 Formula:
For a normal demand distribution, the required stock (safety stock included) for a given service level is:
Q = μ + z × σ
Where:
-
= z-score corresponding to the desired service level
-
For 95% service level → (one-sided)
🔹 Calculation:
✅ Answer:
The warehouse should prepare ≈ 133 graphene sheets to achieve a 95% service level (only 5% chance of shortage).
Table 1: Graphene Sheet Demand for last 100 days
Code from ChatGPT
import numpy as np
import matplotlib.pyplot as plt
from scipy.stats import norm
# Given parameters
mean_demand = 100.01
std_demand = 20.01
service_level = 0.95
z_value = 1.645 # z-score for 95% service level
# Calculate the stock level for 95% service level
Q = mean_demand + z_value * std_demand
# Create range of possible demand values
x = np.linspace(mean_demand - 4*std_demand, mean_demand + 4*std_demand, 500)
y = norm.pdf(x, mean_demand, std_demand)
# Plot the normal distribution
plt.figure(figsize=(8, 5))
plt.plot(x, y, label='Demand Distribution', linewidth=2)
plt.fill_between(x, y, 0, where=(x <= Q), color='skyblue', alpha=0.4, label='95% Service Area')
plt.axvline(Q, color='red', linestyle='--', linewidth=2, label=f'95% Service Level = {Q:.1f} sheets')
# Labels and title
plt.title("Graphene Sheet Demand Forecast (95% Service Level)")
plt.xlabel("Daily Demand (Sheets)")
plt.ylabel("Probability Density")
plt.legend()
plt.grid(alpha=0.3)
# Show plot
plt.show()
No comments:
Post a Comment