f8b21af4be
10_Wiki/Topics 대규모 정리: - 오류 캡처/미완성 stub 문서 227개 제거 - 교차폴더 중복 43클러스터 병합 (63파일 → redirect) - 링크명 정규화: 깨진 링크 수정·redirect 직결·개념 매핑 ~2,400건 - 카테고리 MOC 6개 신규 생성 - Graph 섹션 미해결 related-keyword 링크 10,058건 제거 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
174 lines
6.2 KiB
Markdown
174 lines
6.2 KiB
Markdown
---
|
|
id: wiki-2026-0508-replenishment
|
|
title: Replenishment
|
|
category: 10_Wiki/Topics
|
|
status: verified
|
|
canonical_id: self
|
|
aliases: [Inventory Replenishment, Stock Replenishment, 재고보충]
|
|
duplicate_of: none
|
|
source_trust_level: A
|
|
confidence_score: 0.9
|
|
verification_status: applied
|
|
tags: [supply-chain, inventory, operations, forecasting, optimization]
|
|
raw_sources: []
|
|
last_reinforced: 2026-05-10
|
|
github_commit: pending
|
|
tech_stack:
|
|
language: Python
|
|
framework: pandas/scipy/forecasting
|
|
---
|
|
|
|
# Replenishment
|
|
|
|
## 매 한 줄
|
|
> **"매 right item, right quantity, right time."**. Replenishment 매 inventory 가 demand 의 동안 stockout 의 X 의 process 의 maintaining. 1934 Wilson EOQ 부터 modern AI-driven probabilistic forecasting (Amazon, Walmart 의 LSTM/Transformer demand models) 까지 evolved.
|
|
|
|
## 매 핵심
|
|
|
|
### 매 핵심 levers
|
|
- **Reorder Point (ROP)**: trigger threshold = `lead_time_demand + safety_stock`.
|
|
- **Order Quantity**: how much (EOQ, min-max, fixed).
|
|
- **Review period**: continuous (Q-system) 의 X periodic (P-system).
|
|
- **Safety Stock**: buffer 의 demand/lead-time variability 의.
|
|
|
|
### 매 modern signals
|
|
- Probabilistic demand forecast (quantiles, 의 X point estimate).
|
|
- Lead time variance (supplier reliability score).
|
|
- Cross-location pooling (omnichannel inventory).
|
|
- Substitution + promotion lift modeling.
|
|
|
|
### 매 응용
|
|
1. Retail (Walmart, Costco 의 daily auto-replenishment).
|
|
2. E-commerce FBA (Amazon 의 fulfillment center distribution).
|
|
3. Manufacturing MRP (BOM-driven component replenishment).
|
|
4. Healthcare (vaccine, drug 의 cold-chain replenishment).
|
|
|
|
## 💻 패턴
|
|
|
|
### EOQ (Economic Order Quantity)
|
|
```python
|
|
import math
|
|
|
|
def eoq(annual_demand: float, order_cost: float, holding_cost_per_unit: float) -> float:
|
|
"""Wilson formula. Min total cost = order + holding."""
|
|
return math.sqrt(2 * annual_demand * order_cost / holding_cost_per_unit)
|
|
|
|
# Example: 10K units/yr, $50/order, $2/unit/yr holding
|
|
print(eoq(10_000, 50, 2)) # 707 units per order
|
|
```
|
|
|
|
### Reorder Point with Safety Stock
|
|
```python
|
|
from scipy.stats import norm
|
|
|
|
def reorder_point(daily_demand_mean, daily_demand_std,
|
|
lead_time_days, service_level=0.95):
|
|
z = norm.ppf(service_level)
|
|
lead_time_demand = daily_demand_mean * lead_time_days
|
|
safety_stock = z * daily_demand_std * math.sqrt(lead_time_days)
|
|
return lead_time_demand + safety_stock, safety_stock
|
|
```
|
|
|
|
### Min-Max (s, S) Policy
|
|
```python
|
|
def min_max_order(on_hand: int, on_order: int, s: int, S: int) -> int:
|
|
"""매 inventory_position <= s 일 때 S 까지 order."""
|
|
inv_pos = on_hand + on_order
|
|
return max(0, S - inv_pos) if inv_pos <= s else 0
|
|
```
|
|
|
|
### Probabilistic Forecast → Newsvendor
|
|
```python
|
|
import numpy as np
|
|
|
|
def newsvendor_quantile(unit_cost, sale_price, salvage=0):
|
|
"""Critical ratio = (p - c) / (p - s)."""
|
|
return (sale_price - unit_cost) / (sale_price - salvage)
|
|
|
|
def order_qty_from_forecast(demand_samples: np.ndarray, critical_ratio: float):
|
|
return float(np.quantile(demand_samples, critical_ratio))
|
|
|
|
# 1000 Monte Carlo demand samples → optimal order
|
|
samples = np.random.gamma(shape=4, scale=25, size=1000)
|
|
cr = newsvendor_quantile(unit_cost=10, sale_price=25, salvage=3)
|
|
print(order_qty_from_forecast(samples, cr))
|
|
```
|
|
|
|
### LSTM Demand Forecast (modern)
|
|
```python
|
|
import torch.nn as nn
|
|
|
|
class DemandLSTM(nn.Module):
|
|
def __init__(self, n_features=8, hidden=64):
|
|
super().__init__()
|
|
self.lstm = nn.LSTM(n_features, hidden, num_layers=2,
|
|
dropout=0.2, batch_first=True)
|
|
self.head = nn.Linear(hidden, 3) # P10, P50, P90 quantiles
|
|
|
|
def forward(self, x):
|
|
out, _ = self.lstm(x)
|
|
return self.head(out[:, -1])
|
|
```
|
|
|
|
### Multi-Echelon Allocation
|
|
```python
|
|
def fair_share_allocation(forecasts: dict, total_supply: float) -> dict:
|
|
"""Allocate constrained supply across stores proportional to forecast."""
|
|
total_demand = sum(forecasts.values())
|
|
if total_supply >= total_demand:
|
|
return forecasts.copy()
|
|
ratio = total_supply / total_demand
|
|
return {loc: f * ratio for loc, f in forecasts.items()}
|
|
```
|
|
|
|
### KPI Dashboard
|
|
```python
|
|
def replenishment_kpis(history: list[dict]) -> dict:
|
|
stockouts = sum(1 for d in history if d["on_hand"] == 0)
|
|
fill_rate = sum(d["fulfilled"] for d in history) / sum(d["demanded"] for d in history)
|
|
avg_inv = sum(d["on_hand"] for d in history) / len(history)
|
|
return {
|
|
"service_level": 1 - stockouts / len(history),
|
|
"fill_rate": fill_rate,
|
|
"avg_inventory": avg_inv,
|
|
"inventory_turns": sum(d["demanded"] for d in history) / avg_inv,
|
|
}
|
|
```
|
|
|
|
## 매 결정 기준
|
|
| 상황 | Approach |
|
|
|---|---|
|
|
| Stable demand, known lead time | EOQ + ROP |
|
|
| Highly variable demand | Probabilistic forecast + newsvendor |
|
|
| Many SKUs, low value | Min-Max (s, S) |
|
|
| Perishable / fashion | Newsvendor (single-period) |
|
|
| Multi-location, constrained supply | Fair-share / DRP |
|
|
| Modern e-commerce scale | ML demand model + RL ordering policy |
|
|
|
|
**기본값**: Probabilistic LSTM forecast → newsvendor quantile order. 매 P50 forecast + ROP 의 단순 baseline 의 X.
|
|
|
|
## 🔗 Graph
|
|
- 부모: [[Supply Chain Management]] · [[Operations Research]]
|
|
- Adjacent: [[Reinforcement Learning]] · [[MRP]]
|
|
|
|
## 🤖 LLM 활용
|
|
**언제**: SKU master data 의 cleansing, supplier email parsing, anomaly explanation, what-if scenario 의 narrative.
|
|
**언제 X**: 매 actual demand forecasting 의 LLM 의 X — purpose-built time-series models (Prophet, NeuralForecast, Chronos) 의 use.
|
|
|
|
## ❌ 안티패턴
|
|
- **Point forecast only**: P50 만 사용 의 X — quantiles 의 사용 의 service level tuning 의 가능.
|
|
- **Static safety stock**: lead time 의 variance 의 ignore 의 X.
|
|
- **Local optimization**: 각 store 의 independent ordering — pooling 의 lost.
|
|
- **Bullwhip ignored**: downstream order 의 upstream 의 amplification 의 monitor 의 필요.
|
|
- **Excel-only**: 1000+ SKU 의 manual review 의 scale 의 X.
|
|
|
|
## 🧪 검증 / 중복
|
|
- Verified (Silver/Pyke "Inventory Management" textbook, AWS Forecast docs).
|
|
- 신뢰도 A.
|
|
|
|
## 🕓 Changelog
|
|
| 날짜 | 변경 |
|
|
|---|---|
|
|
| 2026-05-08 | Phase 1 |
|
|
| 2026-05-10 | Manual cleanup — replenishment policy + ML forecasting patterns |
|