refactor(topics): 멀티 에이전트용 지식 재편 — _Common(공통 기본기) + Domain_* 구조
에이전트 8종(대화형/프로그래머 C·S/디자이너/설계자/기획자/QA/PD/PM)에게 [공통 기본 능력 + 롤별 Specialty] 2층으로 지식을 주입하기 위한 재분류. 문서 내용·포맷은 무수정, 폴더 이동만 (6,372개 문서 수 보존 확인). - Topic_Programming → Domain_Programming (내부 구조 보존) - Topic_Graphic → Domain_Design - Topic_Business → Domain_Product - Topic_General → Domain_General - _Common 신설: Math(구 Topic_Math_Specialty), Reasoning(구 General/From_Thinking & Reasoning), Reasoning_Creativity(구 General/From_창의성), Communication(Poetic_Blog_Writing + From_writing) - 타 도메인의 From_* 폴더는 유지 (출처 표기일 뿐, 이미 도메인에 맞게 분류된 문서) - 빈 폴더 정리 (memory/procedures) - 에이전트→폴더 매핑은 workspace의 .astra/agent-knowledge-map.json (9개 에이전트) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,173 @@
|
||||
---
|
||||
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 |
|
||||
Reference in New Issue
Block a user