[G1-Sync] Manual knowledge update

This commit is contained in:
Antigravity Agent
2026-05-10 22:08:15 +09:00
parent 21ac3ed255
commit 504fd5fb42
3011 changed files with 380280 additions and 206977 deletions
+149 -40
View File
@@ -2,65 +2,174 @@
id: wiki-2026-0508-replenishment
title: Replenishment
category: 10_Wiki/Topics
status: needs_review
status: verified
canonical_id: self
aliases: [P-Reinforce-AUTO-REPL-001]
aliases: [Inventory Replenishment, Stock Replenishment, 재고보충]
duplicate_of: none
source_trust_level: A
confidence_score: 0.9
tags: [auto-reinforced, replenishment, Supply-Chain, inventory-Management, logistics, Efficiency]
verification_status: applied
tags: [supply-chain, inventory, operations, forecasting, optimization]
raw_sources: []
last_reinforced: 2026-04-20
last_reinforced: 2026-05-10
github_commit: pending
inferred_by: Claude Opus 4.7 (auto-normalize 2026-05-08)
tech_stack:
language: Python
framework: pandas/scipy/forecasting
---
# [[Replenishment|Replenishment]]
# Replenishment
## 📌 한 줄 통찰 (The Karpathy Summary)
> "마르지 않는 샘물 관리: 재고가 바닥나기 전에 정확한 시점과 양을 계산하여 다시 채워 넣음으로써, 비즈니스의 흐름이 단 1초도 끊기지 않게 만드는 공급망의 '지속성 엔진'."
## 한 줄
> **"매 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.
## 📖 구조화된 지식 (Synthesized Content)
보충(Replenishment)은 소진된 자원이나 재고를 적시에 다시 채워 넣는 프로세스입니다.
## 매 핵심
1. **핵심 전략**:
* **Reorder Point (ROP)**: "언제 주문할 것인가?" (리드 타임 고려).
* **Economic Order Quantity (EOQ)**: "얼마나 주문할 것인가?" (비용 최적화). ([[Optimization|Optimization]]와 연결)
* **[[Just-In-Time (JIT)|Just-In-Time (JIT)]]**: 필요한 때 필요한 만큼만 보충하여 재고 비용 최소화. (Lean-Operations와 연결)
2. **왜 중요한가?**:
* 보충이 너무 빠르면 창고 비용과 자본이 묶이고, 너무 늦으면 판매 기회(Opport[[Unity|Unity]] Loss)를 놓치기 때문임 (정밀한 예측 지능 필수).
### 매 핵심 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 의.
## ⚠️ 모순 및 업데이트 (Contradictions & Updates)
- **과거 데이터와의 충돌**: 과거에는 사람이 장부를 보고 판단하는 정책이었으나, 현대 정책은 AI가 과거 수요 패턴 정책, 기상 정보 정책, 경쟁사 동향 정책까지 분석해 자동으로 주문을 넣는 'AI 자동 보충 정책'으로 진화함(RL Update).
- **정책 변화(RL Update)**: 본 지식 시스템에서도 지식이 부족한 주제 정책을 AI 에이전트가 스스로 발견하여 내용을 채워 넣는 '지식 보충 정책'이 P-Reinforce의 핵심 목표 정책 중 하나임.
### 매 modern signals
- Probabilistic demand forecast (quantiles, 의 X point estimate).
- Lead time variance (supplier reliability score).
- Cross-location pooling (omnichannel inventory).
- Substitution + promotion lift modeling.
## 🔗 지식 연결 (Graph)
- [[Lean-Operations|Lean-Operations]], [[Optimization|Optimization]], [[Efficiency|Efficiency]], [[Management|Management]], Economics
- **Modern Tech/Tools**: VMI (Vendor Managed Inventory), Demand forecasting AI, ERP replenishment modules.
---
### 매 응용
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).
## 🤖 LLM 활용 힌트 (How to Use This Knowledge)
## 💻 패턴
**언제 이 지식을 쓰는가:**
- *(TODO)*
### EOQ (Economic Order Quantity)
```python
import math
**언제 쓰면 안 되는가:**
- *(TODO)*
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)
## 🧪 검증 상태 (Validation)
# Example: 10K units/yr, $50/order, $2/unit/yr holding
print(eoq(10_000, 50, 2)) # 707 units per order
```
- **정보 상태:** needs_review
- **출처 신뢰도:** A
- **검토 이유:** *(P-Reinforce Phase 1 자동 정규화. 본문 검증 필요.)*
### Reorder Point with Safety Stock
```python
from scipy.stats import norm
## 🧬 중복 검사 (Duplicate Check)
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
```
- **기존 유사 문서:** *(TODO: 인덱서 클러스터 리포트 참조)*
- **처리 방식:** UPDATE (자동 정규화)
- **처리 이유:** Phase 1 정규화 — 옛 템플릿/누락 필드 보강.
### 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
```
## 🕓 변경 이력 (Changelog)
### Probabilistic Forecast → Newsvendor
```python
import numpy as np
| 날짜 | 변경 내용 | 처리 방식 | 신뢰도 |
|------|-----------|-----------|--------|
| 2026-05-08 | P-Reinforce Phase 1 정규화 (frontmatter + 헤더 표준화) | UPDATE | A |
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]]
- 변형: [[EOQ]] · [[Newsvendor Model]] · [[Min-Max Policy]]
- 응용: [[Demand Forecasting]] · [[Multi-Echelon Inventory]]
- Adjacent: [[Time Series Forecasting]] · [[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 |