What does Cross-Border Dual Sourcing and Disruption Options conclude, in numbers, about “The Classics Examined: "Feeding on the Enemy" and Harris's Square Root”?

Answer: Chapter 7 examines "feeding on the enemy" in the Sunzi and Harris's 1913 square-root lot formula, which explains only 0.134 of a single far source's non-purchase cost.

Scope of the numbers: Its prices, lead times, outage frequencies, margins and capacities are illustrative; all calculations are generated by its programs; the book is not individual legal, tax or financial advice. Marked boxes separate published evidence, runnable Python calculations (20 programs), classical sources and the author's hypotheses.

中文版

Data table

The numbers below are printed verbatim by the chapter's Python program and can be reproduced by running it. standard-library Python onlyprinted values that match the answer: 0.134

Harris batch Q* = 591.9 units = 14.8 days of demand
batch/Q*relative_cost
0.501.2500
0.751.0417
1.001.0000
1.501.0833
2.001.2500
far only, passive: Harris terms 14821, other terms 95831, Harris share 0.134
far only, buffer : Harris terms 14821, other terms 94379, Harris share 0.136
Show the full program
# Chapter 7. p72: what Harris's square root sees and what it leaves out.
# Model: Harris (1913) balances a fixed cost K per order against the
# cost of holding the average batch: Q* = sqrt(2 K D / h). Relative cost
# of a batch k times Q* is (k + 1 / k) / 2. The second table splits the
# annual non-purchase cost of the far-only plan of p21 into the part
# Harris's model contains (orders and cycle stock) and the parts it has
# no term for (transit capital, safety stock, recurrent shortage and
# outages). All parameters illustrative.
import math
from statistics import NormalDist

N01 = NormalDist()
YEAR = 365.0
# 基准参数(示意):日需求均值与标准差、年持有率、在途资金率、缺一件毛利;
# 远源到岸价、交期均值与标准差、补货周期、每票固定费;近源同;
# 远源断供年发生率与平均天数、近源产能上限与量弹性
BASE = dict(d=40.0, sd=12.0, h=0.25, i=0.10, p=120.0,
            cF=100.0, LF=40.0, sLF=10.0, TF=14.0, KF=300.0,
            cN=108.0, LN=5.0, sLN=1.0, TN=7.0, KN=200.0,
            lam=0.5, tau=40.0, cap=60.0, flex=1.0)


def loss(z):
    return N01.pdf(z) - z * (1.0 - N01.cdf(z))


def capped_m2(s_l, cap, n=400):
    # E[min(delta+, cap)^2], delta ~ N(0, s_l)
    if s_l <= 0.0:
        return 0.0
    hs = cap / n
    w = [1.0 if k in (0, n) else (4.0 if k % 2 else 2.0)
         for k in range(n + 1)]
    f = [(k * hs) ** 2 * N01.pdf(k * hs / s_l) / s_l for k in range(n + 1)]
    body = math.fsum(a * b for a, b in zip(w, f)) * hs / 3.0
    return body + cap ** 2 * (1.0 - N01.cdf(cap / s_l))


def buffer(q, sp, c, t):
    z = max(0.0, N01.inv_cdf(q["p"] / (q["p"] + q["h"] * c * t / YEAR)))
    return z * sp, q["h"] * c * z * sp, YEAR / t * sp * loss(z) * q["p"]


def outage(q, u, ss, mitigate=True):
    # 断供期缺口速率 u;缓冲 b 按 h*c = lam*p*exp(-(ss+b)/(u*tau)) 取最优
    ut = u * q["tau"]
    if ut <= 0.0 or q["lam"] <= 0.0:
        return 0.0, 0.0
    b = 0.0
    if mitigate and q["lam"] * q["p"] > q["h"] * q["cF"]:
        b = max(0.0, ut * math.log(q["lam"] * q["p"]
                                   / (q["h"] * q["cF"])) - ss)
    return b, q["lam"] * q["p"] * ut * math.exp(-(ss + b) / ut)


def far_only(q, mitigate=True):
    sp = math.sqrt((q["LF"] + q["TF"]) * q["sd"] ** 2
                   + (q["d"] * q["sLF"]) ** 2)
    ss, c_ss, c_rec = buffer(q, sp, q["cF"], q["TF"])
    b, c_out = outage(q, q["d"], ss, mitigate)
    return {"purchase": q["d"] * YEAR * q["cF"],
            "orders": YEAR / q["TF"] * q["KF"],
            "cycle": q["h"] * q["cF"] * q["d"] * q["TF"] / 2.0,
            "transit": q["i"] * q["cF"] * q["d"] * q["LF"],
            "safety": c_ss + q["h"] * q["cF"] * b, "recurrent": c_rec,
            "outage": c_out, "stock": ss + b}


def dual(q, a):
    pn = q["LN"] + q["TN"]
    sp = math.sqrt(pn * q["sd"] ** 2 + (q["d"] * q["sLN"]) ** 2
                   + (a * q["d"]) ** 2 * capped_m2(q["sLF"], pn))
    ss, c_ss, c_rec = buffer(q, sp, q["cN"], q["TN"])
    base_n = (1.0 - a) * q["d"]
    # 近源断供期可供量:基量乘 (1 + 弹性),且不超过产能上限与日需求
    up = min(q["cap"], base_n * (1.0 + q["flex"]), q["d"])
    b, c_out = outage(q, q["d"] - up, ss)
    days = q["lam"] * q["tau"]
    return {"purchase": q["d"] * YEAR * (a * q["cF"] + (1 - a) * q["cN"])
            + days * (up - base_n) * (q["cN"] - q["cF"]),
            "orders": (YEAR / q["TF"] * q["KF"] if a > 0 else 0.0)
            + YEAR / q["TN"] * q["KN"],
            "cycle": q["h"] * q["d"] / 2.0
            * (a * q["cF"] * q["TF"] + (1 - a) * q["cN"] * q["TN"]),
            "transit": q["i"] * q["d"]
            * (a * q["cF"] * q["LF"] + (1 - a) * q["cN"] * q["LN"]),
            "safety": c_ss + q["h"] * q["cF"] * b, "recurrent": c_rec,
            "outage": c_out, "stock": ss + b}


def total(r):
    return math.fsum(v for k, v in sorted(r.items()) if k != "stock")


def best_dual(q, step=0.05):
    grid = [k * step for k in range(int(round(1 / step)) + 1)]
    return min((total(dual(q, a)), a) for a in grid)


def best_far(q):
    return min(total(far_only(q, False)), total(far_only(q, True)))


# ---- end of shared model ----

q = dict(BASE)
dem = q["d"] * YEAR
h = q["h"] * q["cF"]
qs = math.sqrt(2.0 * q["KF"] * dem / h)
print("Harris batch Q* = %.1f units = %.1f days of demand"
      % (qs, qs / q["d"]))
print("batch/Q*  relative_cost")
for k in (0.5, 0.75, 1.0, 1.5, 2.0):
    print("%8.2f %14.4f" % (k, (k + 1.0 / k) / 2.0))
for mit in (False, True):
    r = far_only(q, mit)
    harris = math.fsum([r["orders"], r["cycle"]])
    other = math.fsum([r["transit"], r["safety"], r["recurrent"],
                       r["outage"]])
    print("far only, %-7s: Harris terms %.0f, other terms %.0f, "
          "Harris share %.3f" % ("buffer" if mit else "passive", harris,
                                 other, harris / (harris + other)))

Single source and citation

Fan, Y. (2026). Dual-Source Redundancy and Supply-Disruption Real Options in Cross-Border Chains: Optimal Safety Stock and Source Splits under Shipping Delays and Customs Variability (Version 1.0.0), Chapter 7: The Classics Examined: "Feeding on the Enemy" and Harris's Square Root. 5D Library. DOI pending

DOI pending · monograph page goes live after publication · 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}
}

Other chapter answers in this book