关于「交期方差:安全库存公式里被删掉的那一项」,《跨境双源与断供期权》给出的定量结论是什么?
结论:第一章说明,远源交期标准差 10 天时,按只含需求项的公式备货,名义 95 % 的服务水平实际只有 0.701。
数据口径:书中的价格、交期、断供频率、毛利与产能均为示意;全部计算由书中程序生成;本书是非个人化法律、税务或理财建议;书中每一个到岸价都假定已包含如实申报后应缴的税费,不讨论任何低报、拆单规避或灰色清关手法,海关与关税规则只述大意,以上架前人工复核为准。 书中以标注框区分已发表的证据、可运行的 Python 计算(20 段程序)、原典与作者的假说。
对照数据表
下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库与结论吻合的打印值: 0.701, 95
| simulated lead time: mean 40.05 d, sd 10.03 d | |||||
| rule | safety | reorder | CSL | fill | short/cycle |
| demand-only | 124.9 | 1727.1 | 0.701 | 0.7791 | 123.72 |
| full formula | 671.9 | 2274.1 | 0.919 | 0.9666 | 18.70 |
| exact 95% pct | 787.2 | 2389.4 | 0.950 | 0.9799 | 11.27 |
| share of cycles with lead time >= 55 d: 0.1128 |
查看完整验算程序
# Chapter 1. p12: what service the demand-only formula really delivers.
# Model: 20,000 replenishment cycles. Lead time in whole days = 28 days
# of transit + a gamma delay (mean 8, sd 6) + 20 days with probability
# 0.2 (customs inspection). Daily demand normal(40, 12). Reorder point
# R = 40 * E[L] + SS; a cycle is "covered" if lead-time demand <= R.
# Fill rate uses an order size of 560 units (14 days of demand).
# Fixed seed; all parameters illustrative.
import math
import random
from statistics import NormalDist
rng = random.Random(20261113)
D, SD, Q = 40.0, 12.0, 560.0
K_SHAPE = (8.0 / 6.0) ** 2
THETA = 8.0 / K_SHAPE
N = 20000
def lead_time():
lt = 28.0 + rng.gammavariate(K_SHAPE, THETA)
if rng.random() < 0.2:
lt += 20.0 # step: inspection adds 20 days
return int(round(lt))
ld, lts = [], []
for _ in range(N):
lt = lead_time()
lts.append(lt)
ld.append(math.fsum(rng.gauss(D, SD) for _ in range(lt)))
m_l = math.fsum(lts) / N
s_l = math.sqrt(math.fsum((x - m_l) ** 2 for x in lts) / (N - 1))
z = NormalDist().inv_cdf(0.95)
ss_only = z * SD * math.sqrt(m_l)
ss_full = z * math.sqrt(m_l * SD ** 2 + (D * s_l) ** 2)
srt = sorted(ld)
r_exact = srt[int(0.95 * N)]
print("simulated lead time: mean %.2f d, sd %.2f d" % (m_l, s_l))
print("rule safety reorder CSL fill short/cycle")
for name, r in (("demand-only", D * m_l + ss_only),
("full formula", D * m_l + ss_full),
("exact 95% pct", r_exact)):
covered = len([x for x in ld if x <= r]) / N
short = math.fsum(max(0.0, x - r) for x in ld) / N
print("%-15s %7.1f %8.1f %6.3f %7.4f %8.2f"
% (name, r - D * m_l, r, covered, 1.0 - short / Q, short))
late = len([x for x in lts if x >= 55]) / N
print("share of cycles with lead time >= 55 d: %.4f" % late)唯一数据源与引用
范雅福(Fan, Y.). (2026). 《跨境供应链双源冗余与断供实物期权、物流延误清关波动下的最优安全库存配比母典》第 1 章「交期方差:安全库存公式里被删掉的那一项」(版本 1.0.0). 5D Library. DOI 待发布
DOI 待发布 · 专著页正式发布后上线(本站暂无专著页) · 5DL-B-291 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026291,
author = {Fan, Yafu},
title = {Dual-Source Redundancy and Supply-Disruption Real Options in Cross-Border Chains: Optimal Safety Stock and Source Splits under Shipping Delays and Customs Variability},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
note = {DOI pending}
}