で与えられる.ZIOと発注量一定の2つの性質から,在庫量の時間的変化は 図 17.1 のような鋸歯状になる.在庫量は発注直後に Q となり,需要率 d で直線的に減少し,0になった時点で次の発注が届く.
コード
import matplotlib.pyplot as plt# Parametersd =250# Demand rateQ =500# Order quantityT = Q / d # Cycle lengthn_cycles =3# Inventory level over time: each cycle falls from Q to 0 at rate d,# then the next order arrives instantaneously.t = [0.0]inventory = [Q]for i inrange(n_cycles): t += [(i +1) * T, (i +1) * T] inventory += [0, Q]t, inventory = t[:-1], inventory[:-1] # drop the trailing jump back to Q# Plotting the inventory levelplt.plot(t, inventory, color="#16212d", linewidth=2) # brand: inkplt.axhline(Q /2, color="#5b6b7c", linestyle="--", linewidth=1) # brand: slateplt.xlabel("Time")plt.ylabel("Inventory Level")plt.xticks([i * T for i inrange(n_cycles +1)], ["$0$", "$T$", "$2T$", "$3T$"])plt.yticks([0, Q /2, Q], ["$0$", "$Q/2$", "$Q$"])plt.xlim(0, n_cycles * T)plt.ylim(0, Q *1.15)plt.tight_layout()plt.show()
import matplotlib.pyplot as pltimport numpy as np# ParametersK =40# Order costh =10# Holding costd =5# Demand rateQ = np.linspace(1, 40, 400) # Order quantity from 1 to 40# Cost calculationsorder_cost = K * d / Qholding_cost = (h * Q) /2average_cost = order_cost + holding_costoptimal_Q = np.sqrt(2* K * d / h)# Plotting the costs# Brand palette, spread over L* = 46 / 58 / 32 so the curves stay apart# in grayscale and under colour-vision deficiencyplt.plot(Q, order_cost, label=r"$Kd/Q$", color="#137a72")plt.plot(Q, holding_cost, label=r"$hQ/2$", color="#c17c18")plt.plot(Q, average_cost, label=r"$g(Q)$", color="#144f78", linewidth=2)plt.axvline(optimal_Q, color="#b03535", linestyle="--", label=r"$Q^*$")# The two cost curves cross exactly at Q*plt.plot(optimal_Q, K * d / optimal_Q, "o", color="#16212d", alpha=0.5, zorder=5)plt.xlabel("Order Quantity Q")plt.ylabel("Cost")plt.ylim(bottom=0)plt.legend()plt.tight_layout()plt.show()
import numpy as npdef eoq(K, d, h):""" Calculate the Economic Order Quantity (EOQ). Parameters: K (float): Order cost d (float): Demand rate h (float): Holding cost Returns: float: Optimal order quantity Q* """return np.sqrt(2* K * d / h)if__name__=="__main__": K =5000# Order cost d =250# Demand rate h =150# Holding cost Q_star = eoq(K, d, h) T_star = Q_star / dprint(f"Optimal Order Quantity (Q*): {Q_star:.2f} units")print(f"Optimal Cycle Time (T*): {T_star:.2f}")
Optimal Order Quantity (Q*): 129.10 units
Optimal Cycle Time (T*): 0.52
17.9 リードタイム(発展)
EOQモデルでは,リードタイムは0と仮定している.リードタイムが L > 0 の場合でも最適発注量 Q^* は変わらず,納品してほしい時点の L 期間前に発注すればよい.変わるのは発注量ではなく,発注のタイミングだけである.
在庫量がある水準 r に達した時点で発注することにし,この r を発注点(reorder point)と呼ぶ.リードタイム L の間に需要は dL 個発生するため,発注点は次のように表される.
r = dL
警告r = dL が使えるのは L < T^* のときだけ
r = dL は,発注してから納品されるまでに,未納品の発注が高々1件しかないことを前提としている.L \geq T^* の場合は,前の発注が届く前に次の発注時点が来るため,発注点は r = dL - \lfloor L / T^* \rfloor Q^* とする必要がある.
練習 17.5 (EOQ for Steel) ある工場は,鋼材を毎日16トン消費し,年間250日稼働している.鋼材の購入単価は1トンあたり1100ドル,1回の発注にかかる固定費は5500ドル,保管費は鋼材1トンあたり年間275ドルである.EOQモデルを用いて,次の問いに答えよ.
最適な発注量を求めよ.
最適なサイクル期間を求めよ.
購入費用を含む年間の平均費用を求めよ.
練習 17.6 (EOQ for Smartphones) ある家電量販店では,あるスマートフォンを毎週50台販売している.店舗はスマートフォンをメーカーから1台あたり10万円で購入している.毎回の発注には発注処理や配送などで5000円の固定費がかかる.また,スマートフォン1台あたりの保管費用は1週間で100円である.EOQモデルを用いて,次の問いに答えよ.
最適な発注量を求めよ.
最適なサイクル期間を求めよ.
Camm, Jeffrey, James Cochran, Michael Fry, ほか. 2022年. An introduction to management science: Quantitative approaches to decision making. 16番目 版. South-Western College Publishing.
Harris, Ford W. 1990年. 「How many parts to make at once」. Oper. Res. 38 (6): 947–50.
Hillier, Frederick, と Gerald Lieberman. 2025年. ISE introduction to operations research. 11番目 版. McGraw-Hill Education.
Snyder, Lawrence V, と Zuo-Jun Max Shen. 2019年. Fundamentals of supply chain theory. 2番目 版. John Wiley & Sons.