Skip to content

Vol. I, Ch. 15

DCT Laboratory — Volume I, Chapter 15

Mathematical Formulation of Enterprise Optimization

This laboratory demonstrates

Seed 26115 · Companion to Chapter 15 and AXIOM Lab 1.15 (module AXIOM-15) · Mirrored in DCT_V1_Ch15_Lab.xlsx

This laboratory reproduces Worked Example 15.1, What Does the Board's Appetite Cost?, with the book's declarations, and works the five steps of AXIOM Lab 1.15, Pricing Meridian's Commitments: build the General Enterprise Optimization Problem (GEOP) for the digital program's risk levers, audit it, solve a small allocation, trace the risk–cost frontier, and run the certainty-equivalent, robust and stochastic formulations side by side before testing a rule against the committed delay. The worked example's 100,000 paths are Chapter 8's, drawn as in the book with random seed 8 (Volume II, Online Appendix 1.B.4), so its odds and costs come out exactly as printed. Fresh draws use seed 26209, the certificate seed that Lab 1.16 and the DCT Simulator's Certify station share, labelled as such. Every Meridian number below is the book's (Worked Example 15.1, Table 15.5, Figures 15.1–15.2, Propositions 15.5 and 15.9, Online Appendix 15.B.1–15.B.4); the final cell checks them. Money is in $ million.

The declarations (Worked Example 15.1, Step 1; Worked Example 8.1)

The plan and its uncertainty are Worked Example 8.1's. Liquidity follows Chapter 1's digital-program path, read quarterly over the program's three years at $6.2 million an index point: it falls from $620 million to a trough of $482 million in quarter 7, a deepest draw of $138 million, against the board's floor of $350 million. Each quarter brings an execution and market deviation, Ek+1=0.6Ek+wkE_{k+1} = 0.6E_k + w_k with surprises of standard deviation $50 million; funding windows close about once a decade (λ=0.10\lambda = 0.10 a year), each closure removing on average $120 million (standard deviation $50 million, gamma distributed) that does not come back within the program.

The two levers are now decisions with declared prices. The standby line (owned by the CFO) replaces up to its size ℓ\ell of any closure; its fees are about 1 percent of the line a year, so 0.03ℓ0.03\ell over the program. The delay ϕ\phi of the platform (owned by the transformation office) sets the depth of the program's cash draw, D=28−4ϕD = 28 - 4\phi index points: Chapter 8's phased build, depth 20, cuts the deepest draw by $49 million and delays the platform by two quarters, and smaller phasings delay it in proportion. A quarter of delay costs $8 million of Digital Solutions' contribution. The commitments: the board's appetite, at most a 5 percent chance that liquidity falls below the floor in some quarter of the program; the covenant, net leverage at most 4.5× (EBITDA $495.6 million, net debt 3.4× of it); and the capability floor of 55 for the digital build (capability today 58). The horizon is the program's 12 quarters.

Python Code
import numpy as np
import matplotlib.pyplot as plt
from scipy import stats
plt.rcParams.update({"figure.dpi": 110, "axes.spines.top": False, "axes.spines.right": False})
SEED = 26115          # the lab's seed
CERT_SEED = 26209     # fresh paths for the certificate, shared with Lab 1.16 and the DCT Simulator
BOOK_SEED = 8         # Chapter 8's stream, reused by Worked Example 15.1 (Volume II, Online Appendix 1.B.4)

# Worked Example 8.1's digital program, quarterly for three years ($ million)
N, Q = 100_000, 12
LIQ0, FLOOR, POOL = 620.0, 350.0, 270.0          # liquidity today, the board's floor, the cash above it
A_E, SD_W = 0.6, 50.0                            # execution and market deviation: E' = 0.6 E + w, sd(w) = 50
LAM, J_MEAN, J_SD = 0.10, 120.0, 50.0            # closures a year; their size: mean and sd (gamma)
G_SHAPE, G_SCALE = (J_MEAN / J_SD) ** 2, J_SD ** 2 / J_MEAN
# Worked Example 15.1: the levers, their declared prices, and the commitments
FEE, VQ = 0.03, 8.0                              # fees: 3% of the line over the program; $8m a quarter of delay
DEPTH0, DEPTH_PER_Q = 28.0, 4.0                  # the draw's depth (index points); a quarter of delay cuts 4
APPETITE = 0.05                                  # the board: at most a 5% chance of a breach in some quarter
EBITDA = 0.118 * 4200.0                          # $495.6m (Table 5.4)
NET_DEBT, COVENANT = 3.4 * EBITDA, 4.5           # $1,685m; net leverage at most 4.5x
CAPABILITY, CAP_FLOOR = 58.0, 55.0               # workforce capability today; the digital build's floor

TQ = np.arange(1, Q + 1) / 4                     # quarters 1..12, in years
BASE = 6.2 * (112 + (100 - 112) * np.exp(-0.35 * TQ))      # Chapter 1's path without the draw, $6.2m a point
S1 = (TQ / 2) * np.exp(1 - TQ / 2)                          # the draw's shape: deepest at two years (S1 = 1)
SHAPE = 6.2 * S1                                            # $ million per point of depth

def plan(depth=DEPTH0):
    # the planned liquidity in quarters 0..12, $ million
    t = np.arange(Q + 1) / 4
    return 6.2 * (112 + (100 - 112) * np.exp(-0.35 * t) - depth * (t / 2) * np.exp(1 - t / 2))

def depth(phi):
    return DEPTH0 - DEPTH_PER_Q * phi

def draw(phi=0.0):
    # the program's deepest cash draw under a delay of phi quarters
    return LIQ0 - plan(depth(phi)).min()

class Stream:
    # n three-year paths of both channels, drawn in the order of the book's engines: each quarter the n
    # surprises, then the n closure counts, then the sizes of that quarter's closures in path order
    def __init__(self, seed, n=N):
        rng = np.random.default_rng(seed)
        self.n, self.events, W = n, [], np.empty((n, Q))
        for k in range(Q):
            W[:, k] = SD_W * rng.standard_normal(n)
            cnt = rng.poisson(LAM / 4, n)
            self.events.append((np.repeat(np.arange(n), cnt), rng.gamma(G_SHAPE, G_SCALE, cnt.sum())))
        self.E, e = np.empty((n, Q)), np.zeros(n)
        for k in range(Q):
            e = A_E * e + W[:, k]
            self.E[:, k] = e
        self._crit = {}
    def lost(self, line):
        # liquidity lost to closures the line does not cover, cumulated by quarter
        J, j = np.empty((self.n, Q)), np.zeros(self.n)
        for k, (who, size) in enumerate(self.events):
            j = j + np.bincount(who, np.maximum(size - line, 0.0), minlength=self.n)
            J[:, k] = j
        return J
    def paths(self, line=0.0, phi=0.0):
        # liquidity in quarters 1..12 under the package (line, delay)
        return BASE - depth(phi) * SHAPE + self.E - self.lost(line)
    def crit(self, line):
        # each path's critical depth, sorted: the path stays above the floor exactly when D <= its value
        key = round(float(line), 6)
        if key not in self._crit:
            self._crit[key] = np.sort(((BASE + self.E - self.lost(line) - FLOOR) / SHAPE).min(axis=1))
        return self._crit[key]
    def odds(self, line, phi):
        return float(np.mean(self.crit(line) < depth(phi)))
    def delay_for(self, line, p):
        # the least delay that meets an appetite p with this line (nan if no delay can)
        d = min(DEPTH0, self.crit(line)[int(np.floor(p * self.n + 1e-9))])
        return np.nan if d < 0 else (DEPTH0 - d) / DEPTH_PER_Q

def cost(line, phi, vq=VQ):
    return FEE * line + vq * phi

LINES = np.arange(0.0, 400.01, 5.0)               # lines in $5m steps, as in the book's engine

def cheapest(S, p, vq=VQ, cap=None, max_delay=None):
    # the least-cost package meeting appetite p: (line, delay, cost)
    best = None
    for l in LINES:
        if cap is not None and l > cap + 1e-9:
            continue
        ph = S.delay_for(l, p)
        if np.isnan(ph) or (max_delay is not None and ph > max_delay + 1e-12):
            continue
        c = cost(l, ph, vq)
        if best is None or c < best[2]:
            best = (float(l), float(ph), float(c))
    return best

B = Stream(BOOK_SEED)                             # the book's 100,000 paths (seed 8)
pl = plan()
print("plan by quarter ($ million):", np.round(pl).astype(int))
print(f"trough ${pl.min():.0f} million in quarter {pl.argmin()}: deepest draw ${draw(0):.1f} million;"
      f" phased build (depth 20) ${draw(2):.1f} million, ${draw(0) - draw(2):.0f} million smaller")
print(f"closures: gamma, shape {G_SHAPE:.2f}, scale {G_SCALE:.2f}; {sum(len(s) for _, s in B.events):,} closures"
      f" on the book's paths, the largest ${max(s.max() for _, s in B.events):.0f} million")
print(f"EBITDA ${EBITDA:.1f} million, net debt ${NET_DEBT:,.1f} million ({NET_DEBT / EBITDA:.1f}x)")
plan by quarter ($ million): [620 574 540 516 499 488 483 482 484 488 494 502 510]
trough $482 million in quarter 7: deepest draw $138.0 million; phased build (depth 20) $89.0 million, $49 million smaller
closures: gamma, shape 5.76, scale 20.83; 30,030 closures on the book's paths, the largest $486 million
EBITDA $495.6 million, net debt $1,685.0 million (3.4x)

Panel 1 — Write the problem down (Worked Example 15.1, Step 1; Table 15.2; Chapter 8's 24.6, 12.4, 13.1 and 3.0 percent)

AXIOM Lab 1.15, step 1, the GEOP builder: assemble the instance from the declared inventories, each element with its owner (Definition 15.1), and run the well-posedness checks of Theorem 15.1(i). A package (line, delay) and a path of the environment determine exactly one liquidity path, so every package has one breach probability. The environment is Chapter 8's: the four packages of Table 8.5 must come out as printed, 24.6, 12.4, 13.1 and 3.0 percent. The odds are computed exactly on the 100,000 paths (Online Appendix 15.B.4): for a given line, a path stays above the floor if and only if the depth is at most its critical depth, the smallest over the quarters of its liquidity without the draw, less the floor, divided by the draw's shape. The cell checks this against the paths themselves.

Python Code
INSTANCE = [("decision", "standby line l, $ million, 0 to 400", "CFO"),
            ("decision", "delay phi, quarters, 0 to 7 (depth 28 - 4 phi >= 0)", "transformation office"),
            ("objective", "minimize the levers' cost 0.03 l + 8 phi, $ million", "fees: CFO; delay: transformation office"),
            ("commitment", "P(liquidity < 350 in some quarter 1-12) <= 5% (a chance constraint)", "board"),
            ("commitment", "net leverage (1,685 + l) / 495.6 <= 4.5, the line fully drawn", "CFO"),
            ("commitment", "workforce capability >= 55 for the digital build", "HR, CTO"),
            ("horizon", "the program's 12 quarters", ""),
            ("environment", "Chapter 8's 100,000 paths (seed 8)", ""),
            ("policy class", "open loop: a package committed today", "")]
print("The GEOP of Worked Example 15.1 (Definition 15.1)")
for kind, what, owner in INSTANCE:
    print(f"  {kind:13s} {what:70s} {owner}")

print("\nwell-posedness: Chapter 8's packages, by the paths and by the critical depths")
CH8 = [("plan as drawn", 0.0, 0.0), ("standby line, $100m", 100.0, 0.0), ("phased build, 2 quarters", 0.0, 2.0),
       ("both levers", 100.0, 2.0)]
for name, l, ph in CH8:
    direct = int((B.paths(l, ph) < FLOOR).any(axis=1).sum())
    via = int((B.crit(l) < depth(ph)).sum())
    print(f"  {name:26s} line {l:5.0f}  delay {ph:3.1f}:  {direct:6,d} breaches on the paths, {via:6,d} by critical depths"
          f" -> {100 * B.odds(l, ph):5.2f}%")
print(f"decisions: line 0 to 400 (the largest closure on the paths is ${max(s.max() for _, s in B.events):.0f} million),"
      f" delay 0 to {DEPTH0 / DEPTH_PER_Q:.0f} quarters (depth 0)")
print(f"covenant with the largest line fully drawn: ({NET_DEBT:,.0f} + 400) / {EBITDA:.1f} = {(NET_DEBT + 400) / EBITDA:.2f}x"
      f" <= {COVENANT}x: it holds for every package")
print(f"capability: neither lever touches it, {CAPABILITY:.0f} >= {CAP_FLOOR:.0f} for every package")
The GEOP of Worked Example 15.1 (Definition 15.1)
  decision      standby line l, $ million, 0 to 400                                    CFO
  decision      delay phi, quarters, 0 to 7 (depth 28 - 4 phi >= 0)                    transformation office
  objective     minimize the levers' cost 0.03 l + 8 phi, $ million                    fees: CFO; delay: transformation office
  commitment    P(liquidity < 350 in some quarter 1-12) <= 5% (a chance constraint)    board
  commitment    net leverage (1,685 + l) / 495.6 <= 4.5, the line fully drawn          CFO
  commitment    workforce capability >= 55 for the digital build                       HR, CTO
  horizon       the program's 12 quarters                                              
  environment   Chapter 8's 100,000 paths (seed 8)                                     
  policy class  open loop: a package committed today                                   

well-posedness: Chapter 8's packages, by the paths and by the critical depths
  plan as drawn              line     0  delay 0.0:  24,622 breaches on the paths, 24,622 by critical depths -> 24.62%
  standby line, $100m        line   100  delay 0.0:  12,374 breaches on the paths, 12,374 by critical depths -> 12.37%
  phased build, 2 quarters   line     0  delay 2.0:  13,068 breaches on the paths, 13,068 by critical depths -> 13.07%
  both levers                line   100  delay 2.0:   3,003 breaches on the paths,  3,003 by critical depths ->  3.00%
decisions: line 0 to 400 (the largest closure on the paths is $486 million), delay 0 to 7 quarters (depth 0)
covenant with the largest line fully drawn: (1,685 + 400) / 495.6 = 4.21x <= 4.5x: it holds for every package
capability: neither lever touches it, 58 >= 55 for every package

Panel 2 — Three formulations, three answers (Worked Example 15.1, Step 2; Proposition 15.7: $460 million, 24.6 percent; a $55 million line for $1.65 million, 17.4 percent; 8.4 percent)

AXIOM Lab 1.15, step 5, first part, the scenario generator. The certainty-equivalent formulation replaces the environment by its mean: no deviation, closures by their expected drain. The average path's lowest point is $460 million, above the floor, so it buys nothing, while the true odds of a breach are 24.6 percent. The robust formulation is Chapter 13's joint check: the deepest draw plus a cash buffer for one 90th-percentile closure, less what the line covers, must fit in the $270 million above the floor, 138+(187−ℓ)≤270138 + (187 - \ell) \le 270. A $55 million line passes it, for $1.65 million, but the odds stay at 17.4 percent: the declared set leaves out the execution and market deviation, which alone breaches the floor on 8.4 percent of paths. Only the stochastic formulation states the board's actual promise.

Python Code
mean_path = np.concatenate([[LIQ0], B.paths(0, 0).mean(axis=0)])                    # 100,000 paths (seed 8)
exact_mean = plan() - LAM / 4 * np.arange(Q + 1) * J_MEAN                              # plan less the expected drain
CE_TROUGH, CE_EXACT = mean_path.min(), exact_mean.min()
P_CE = B.odds(0, 0)
print(f"certainty equivalent: the mean path bottoms out at ${CE_TROUGH:.1f} million (exactly {CE_EXACT:.1f}, quarter"
      f" {exact_mean.argmin()}), above the floor -> no levers; true odds {100 * P_CE:.1f}%")

P90 = stats.gamma.ppf(0.9, G_SHAPE, scale=G_SCALE)                                     # Chapter 12's closure
ROBUST_LINE = max(P90 - (POOL - draw(0)), 0.0)
P_ROBUST = B.odds(ROBUST_LINE, 0)
P_DEV = float(((BASE - DEPTH0 * SHAPE + B.E) < FLOOR).any(axis=1).mean())            # no closures at all
print(f"robust (Chapter 13's joint check): {draw(0):.1f} + ({P90:.1f} - line) <= {POOL:.0f} -> line >= {ROBUST_LINE:.1f},"
      f" cost ${cost(ROBUST_LINE, 0):.2f} million; true odds {100 * P_ROBUST:.1f}%")
print(f"the execution and market deviation alone breaches the floor on {100 * P_DEV:.1f}% of paths:"
      f" no set of closures can see it")

L5, PH5, C5 = cheapest(B, APPETITE)
print(f"stochastic (the appetite as a chance constraint): line {L5:.0f}, delay {PH5:.3f} quarters, cost ${C5:.2f} million,"
      f" odds {100 * B.odds(L5, PH5):.2f}%")
print("\nformulation            promise                                   line   delay    cost    true odds")
for name, prom, l, ph, p in (("certainty equivalent", "the average path stays above the floor", 0, 0, P_CE),
                             ("robust (joint check)", "one 90th-percentile closure is covered", ROBUST_LINE, 0, P_ROBUST),
                             ("stochastic", "at most 5% of paths breach", L5, PH5, B.odds(L5, PH5))):
    print(f"{name:22s} {prom:40s} {l:6.0f} {ph:7.2f} {cost(l, ph):7.2f} {100 * p:10.1f}%")
certainty equivalent: the mean path bottoms out at $459.9 million (exactly 459.9, quarter 8), above the floor -> no levers; true odds 24.6%
robust (Chapter 13's joint check): 138.0 + (186.9 - line) <= 270 -> line >= 54.9, cost $1.65 million; true odds 17.4%
the execution and market deviation alone breaches the floor on 8.4% of paths: no set of closures can see it
stochastic (the appetite as a chance constraint): line 170, delay 0.668 quarters, cost $10.44 million, odds 5.00%

formulation            promise                                   line   delay    cost    true odds
certainty equivalent   the average path stays above the floor        0    0.00    0.00       24.6%
robust (joint check)   one 90th-percentile closure is covered       55    0.00    1.65       17.4%
stochastic             at most 5% of paths breach                  170    0.67   10.44        5.0%

Panel 3 — Solve and read the binding set (Worked Example 15.1, Step 3; Figure 15.2, left: $170 million, two months, $10.4 million; $140–205 million; 3.7×)

The cheapest package that meets the appetite is a line of about $170 million and a delay of two-thirds of a quarter, two months, with the deepest draw $16 million smaller, for $10.4 million: $5.1 million of fees and $5.3 million of delay. For each line, the deepest draw that meets an appetite is a quantile of the critical depths, so the least delay is exact; along the 5 percent contour its successive differences increase, so the feasible packages form a convex set and the multiplier statements apply (Online Appendix 15.B.4). The optimum is flat: any line between $140 million and $205 million costs within $0.5 million of it. The appetite binds; the covenant (3.7× with the line fully drawn) and the capability floor do not, so both carry zero multipliers (Theorem 15.3(i)). At the optimum the last million dollars on either lever cuts the odds by about half a percentage point: a point of safety costs $1.80 million by the line and $1.77 million by the delay, the equal-margin condition of Equation 15.4.

The certificate of Table 15.4's admission contract records the seed and the tolerance. On 100,000 paths a 5 percent probability carries a standard error of 0.069 points. Fresh paths drawn with the certificate seed 26209 show what that means for the decision: there the same package breaches 4.91 percent of paths, 1.3 standard errors from the appetite, and re-solved on them the cheapest line stays on the flat stretch of $140–205 million while the cost moves by less than $0.2 million.

Python Code
print(f"cheapest at 5%: line {L5:.0f}, delay {PH5:.3f} quarters ({3 * PH5:.1f} months), depth {depth(PH5):.2f},"
      f" deepest draw {draw(PH5):.1f} ({draw(0) - draw(PH5):.1f} smaller)")
print(f"cost {C5:.2f} = fees {FEE * L5:.2f} + delay {VQ * PH5:.2f}; odds {100 * B.odds(L5, PH5):.3f}%"
      f" ({int((B.crit(L5) < depth(PH5)).sum()):,} paths of {N:,})")
CONTOUR = [(l, B.delay_for(l, APPETITE)) for l in np.arange(0.0, 251.0, 25.0)]
print("5% contour, least delay by line:", ", ".join(f"{l:.0f}: {ph:.3f}" for l, ph in CONTOUR))
steps = np.diff([ph for _, ph in CONTOUR])
print("its successive differences:", np.round(steps, 3), "-> increasing:", bool((np.diff(steps) > 0).all()))
FLAT = [l for l in LINES if not np.isnan(B.delay_for(l, APPETITE)) and cost(l, B.delay_for(l, APPETITE)) <= C5 + 0.5]
print(f"lines within $0.5 million of the least cost: {min(FLAT):.0f} to {max(FLAT):.0f}")

LEV = (NET_DEBT + L5) / EBITDA
print(f"\nbinding set: the appetite binds ({100 * B.odds(L5, PH5):.2f}%); the covenant does not, leverage {LEV:.2f}x"
      f" with the line fully drawn; nor does the capability floor ({CAPABILITY:.0f} >= {CAP_FLOOR:.0f}): zero multipliers")
DL, DPHI = 20.0, 0.125
SL = (B.odds(L5 + DL, PH5) - B.odds(L5 - DL, PH5)) / (2 * DL) * 100        # points per $ million of line
SP = (B.odds(L5, PH5 + DPHI) - B.odds(L5, PH5 - DPHI)) / (2 * DPHI) * 100  # points per quarter of delay
print(f"margins: the line cuts {-SL:.4f} points per $1m of line -> ${FEE / -SL:.2f} million a point;"
      f" the delay {-SP:.3f} points a quarter -> ${VQ / -SP:.2f} million a point")
print(f"the last $1 million buys {-SL / FEE:.2f} points by the line and {-SP / VQ:.2f} by the delay: about half a point")

SE5 = np.sqrt(APPETITE * (1 - APPETITE) / N)
F = Stream(CERT_SEED)                                                    # fresh paths: the certificate seed 26209
P5_FRESH = F.odds(L5, PH5)
LF, PHF, CF = cheapest(F, APPETITE)
print(f"\ncertificate: standard error of 5% on {N:,} paths = {100 * SE5:.3f} points")
print(f"fresh paths (seed {CERT_SEED}): the book's package breaches {100 * P5_FRESH:.2f}%"
      f" ({(P5_FRESH - APPETITE) / SE5:+.1f} standard errors); re-solved there: line {LF:.0f}, delay {PHF:.3f},"
      f" cost ${CF:.2f} million")
print(f"fresh paths (seed {CERT_SEED}), Chapter 8's four packages:", ", ".join(f"{100 * F.odds(l, ph):.1f}%" for _, l, ph in CH8))

ls = np.arange(0.0, 300.01, 2.5)
contour = np.array([B.delay_for(l, APPETITE) for l in ls])
fig, ax = plt.subplots(figsize=(7.6, 3.6))
ax.fill_between(ls, 0, contour, color="#F6E3E3", lw=0)
ax.fill_between(ls, contour, 5.6, color="#E3F0E3", lw=0)
ax.plot(ls, contour, color="#2E7D32", lw=2, label="least delay meeting 5% (the contour)")
for c, lab in ((C5, f"cost {C5:.1f}"), (20.0, "cost 20")):
    xx = np.linspace(0, 300, 200); yy = (c - FEE * xx) / VQ; ok = (yy >= 0) & (yy <= 5.6)
    ax.plot(xx[ok], yy[ok], color="#616161", lw=0.9, ls=(0, (3, 2)))
    ax.text(8, (c - FEE * 8) / VQ + 0.08, lab, fontsize=8, color="#616161", ha="left", va="bottom")
ax.plot([L5], [PH5], marker="*", ms=13, color="#5E35B1", zorder=5, label=f"cheapest: line {L5:.0f}, delay {PH5:.2f}")
for (x, y), lab, dx, dy in (((0, 0), "average path", 6, 0.3), ((ROBUST_LINE, 0), "joint check", 6, 0.15),
                            ((100, 2), "Chapter 8 package", 6, 0.25), ((0, B.delay_for(0, APPETITE)), "phasing alone", 8, 0.0)):
    ax.plot([x], [y], "o", color="#1A1A1A", ms=4.5, zorder=5, clip_on=False)
    ax.text(x + dx, y + dy, lab, fontsize=8, va="center")
ax.text(205, 0.04, "odds above 5%", color="#B71C1C", fontsize=8, ha="left")
ax.text(296, 5.0, "within the appetite", color="#2E7D32", fontsize=8, ha="right")
ax.set(xlim=(0, 300), ylim=(0, 5.6), xlabel="standby line (\\$ million)", ylabel="delay of the platform (quarters)",
       title="The cheapest package touches the 5% contour (seed 8, the book's paths)")
ax.legend(frameon=False, fontsize=8, loc="center right"); plt.tight_layout(); plt.show()
cheapest at 5%: line 170, delay 0.668 quarters (2.0 months), depth 25.33, deepest draw 121.6 (16.4 smaller)
cost 10.44 = fees 5.10 + delay 5.34; odds 5.000% (5,000 paths of 100,000)
5% contour, least delay by line: 0: 5.095, 25: 3.817, 50: 2.701, 75: 1.851, 100: 1.287, 125: 0.950, 150: 0.760, 175: 0.655, 200: 0.599, 225: 0.576, 250: 0.567
its successive differences: [-1.278 -1.116 -0.85  -0.564 -0.337 -0.19  -0.105 -0.056 -0.023 -0.01 ] -> increasing: True
lines within $0.5 million of the least cost: 140 to 205

binding set: the appetite binds (5.00%); the covenant does not, leverage 3.74x with the line fully drawn; nor does the capability floor (58 >= 55): zero multipliers
margins: the line cuts 0.0166 points per $1m of line -> $1.80 million a point; the delay 4.516 points a quarter -> $1.77 million a point
the last $1 million buys 0.55 points by the line and 0.56 by the delay: about half a point

certificate: standard error of 5% on 100,000 paths = 0.069 points
fresh paths (seed 26209): the book's package breaches 4.91% (-1.3 standard errors); re-solved there: line 165, delay 0.666, cost $10.28 million
fresh paths (seed 26209), Chapter 8's four packages: 24.3%, 12.2%, 13.1%, 3.0%
The cheapest package touches the 5% contour (seed 8, the book's paths)

Panel 4 — Audit before optimizing (Theorem 15.2; Proposition 15.4: the capped levers stop at 3.0 percent)

AXIOM Lab 1.15, step 2, the constraint manager. Feasibility comes before optimality, and the audits produce named artifacts. Consistency: some package keeps every commitment at once (Chapter 8's package does), and the same cash is not promised twice: Chapter 13's joint check, which the program alone fails (138 + 187 against 270), passes with the levers. Viability: the appetite is a promise about the whole path, a breach in some quarter, so a quarter-by-quarter reading certifies nothing about the program (Theorem 14.5(iv)). Then cap the line at $100 million and the delay at two quarters: the odds fall with both levers, so the best the caps allow is their corner, Chapter 8's package, at 3.0 percent. Tighten the appetite below 3 percent, here to 2 percent, and the audit reports a minimal infeasible set (Theorem 15.2(iii)): the line cap, the delay cap and the appetite, each with its owner. Drop any one and the rest can hold; the covenant and the capability floor are not in it. The cell also finds the emptying date of the capped declaration: the last quarter up to which the appetite can still be honored.

Python Code
print("consistency: Chapter 8's package keeps all three commitments:"
      f" odds {100 * B.odds(100, 2):.1f}%, leverage {(NET_DEBT + 100) / EBITDA:.2f}x, capability {CAPABILITY:.0f}")
for name, l, ph in (("no levers", 0.0, 0.0), ("Chapter 8's package", 100.0, 2.0), ("cheapest at 5%", L5, PH5)):
    buf = max(P90 - l, 0.0)
    print(f"  joint check, {name:20s}: draw {draw(ph):6.1f} + buffer {buf:6.1f} = {draw(ph) + buf:6.1f}"
          f" against {POOL:.0f} -> {'passes' if draw(ph) + buf <= POOL else 'fails'}")
VIAB = {}
for name, l, ph in (("no levers", 0.0, 0.0), ("cheapest at 5%", L5, PH5)):
    Lq = B.paths(l, ph) < FLOOR
    VIAB[name] = (Lq.mean(axis=0), float(Lq.any(axis=1).mean()))
    print(f"viability, {name:15s}: worst single quarter {100 * Lq.mean(axis=0).max():5.2f}% of paths,"
          f" some quarter {100 * Lq.any(axis=1).mean():5.2f}%")

CAP_LINE, CAP_DELAY, TIGHT = 100.0, 2.0, 0.02
P_CORNER = B.odds(CAP_LINE, CAP_DELAY)
print(f"\ncaps: line <= {CAP_LINE:.0f}, delay <= {CAP_DELAY:.0f} -> the least odds within them, at the corner: {100 * P_CORNER:.3f}%")
print(f"appetite tightened to {100 * TIGHT:.0f}%: the line at its cap needs a delay of"
      f" {B.delay_for(CAP_LINE, TIGHT):.2f} quarters > {CAP_DELAY:.0f} -> no feasible package")
DROP = {"the line cap (CFO, the bank)": cheapest(B, TIGHT, max_delay=CAP_DELAY),
        "the delay cap (transformation office)": cheapest(B, TIGHT, cap=CAP_LINE),
        "the appetite (board)": (CAP_LINE, CAP_DELAY, cost(CAP_LINE, CAP_DELAY))}
print("minimal infeasible set {line cap, delay cap, appetite}: drop one, and the rest can hold")
for name, (l, ph, c) in DROP.items():
    print(f"  without {name:38s}: line {l:5.0f}, delay {ph:4.2f}, cost {c:5.2f}, odds {100 * B.odds(l, ph):4.2f}%")
Lc = B.paths(CAP_LINE, CAP_DELAY) < FLOOR
CUM = np.array([Lc[:, :K].any(axis=1).mean() for K in range(1, Q + 1)])
K_HONORED = int((CUM <= TIGHT + 1e-12).sum())
print("odds of a breach by quarter K at the corner (%):", np.round(100 * CUM, 2))
print(f"emptying date: the capped levers honor {100 * TIGHT:.0f}% through quarter {K_HONORED} of {Q}, and no further")
consistency: Chapter 8's package keeps all three commitments: odds 3.0%, leverage 3.60x, capability 58
  joint check, no levers           : draw  138.0 + buffer  186.9 =  324.9 against 270 -> fails
  joint check, Chapter 8's package : draw   89.0 + buffer   86.9 =  175.9 against 270 -> passes
  joint check, cheapest at 5%      : draw  121.6 + buffer   16.9 =  138.5 against 270 -> passes
viability, no levers      : worst single quarter 10.33% of paths, some quarter 24.62%
viability, cheapest at 5% : worst single quarter  0.97% of paths, some quarter  5.00%

caps: line <= 100, delay <= 2 -> the least odds within them, at the corner: 3.003%
appetite tightened to 2%: the line at its cap needs a delay of 2.61 quarters > 2 -> no feasible package
minimal infeasible set {line cap, delay cap, appetite}: drop one, and the rest can hold
  without the line cap (CFO, the bank)          : line   170, delay 1.60, cost 17.86, odds 2.00%
  without the delay cap (transformation office) : line   100, delay 2.61, cost 23.85, odds 2.00%
  without the appetite (board)                  : line   100, delay 2.00, cost 19.00, odds 3.00%
odds of a breach by quarter K at the corner (%): [0.01 0.06 0.2  0.46 0.8  1.12 1.5  1.85 2.2  2.5  2.77 3.  ]
emptying date: the capped levers honor 2% through quarter 8 of 12, and no further

Panel 5 — Price the appetite (Worked Example 15.1, Step 4; Theorem 15.3(iii): $12.4 and $8.8 million; $1.8 million a point; about $180 million)

Tightening the appetite to 4 percent raises the cheapest cost to $12.4 million; loosening it to 6 percent lowers it to $8.8 million. The appetite's multiplier, the slope of the least cost, is $1.8 million per percentage point. Read through Theorem 15.3(iii), the appetite is a price in disguise: a board that sets 5 percent acts as if a breach of the floor would cost Meridian about $180 million, a third of a year's EBITDA. The multiplier caps what loosening can gain and floors what tightening will cost. The price moves with the declared value of delay ($0.9 million a point at $4 million a quarter, $3.4 million at $16 million), while the line hardly moves ($140–195 million): the decision is robust, and the price is a declaration.

Python Code
PRICES = {p: cheapest(B, p) for p in (0.04, 0.045, 0.05, 0.055, 0.06)}
for p, (l, ph, c) in PRICES.items():
    print(f"appetite {100 * p:3.1f}%: line {l:5.0f}, delay {ph:5.3f}, least cost {c:6.2f}")
LAMBDA = PRICES[0.045][2] - PRICES[0.055][2]
LAMBDA2 = (PRICES[0.04][2] - PRICES[0.06][2]) / 2
print(f"multiplier of the appetite: {LAMBDA:.2f} $ million a point (4.5 to 5.5%), {LAMBDA2:.2f} (4 to 6%)")
print(f"implied cost of a breach: 100 x {LAMBDA:.2f} = ${100 * LAMBDA:.0f} million, {100 * LAMBDA / EBITDA:.0%} of a year's EBITDA")
up, down = PRICES[0.04][2] - C5, C5 - PRICES[0.06][2]
print(f"Theorem 15.3(iii): tightening a point costs {up:.2f} >= {LAMBDA:.2f}; loosening a point gains {down:.2f} <= {LAMBDA:.2f}")
SENS = {}
for vq in (4.0, 8.0, 16.0):
    l, ph, c = cheapest(B, APPETITE, vq=vq)
    lam = cheapest(B, 0.045, vq=vq)[2] - cheapest(B, 0.055, vq=vq)[2]
    SENS[vq] = (l, ph, c, lam)
    print(f"a quarter of delay at ${vq:4.1f} million: line {l:5.0f}, delay {ph:5.3f}, cost {c:6.2f}, price {lam:.2f} a point")
appetite 4.0%: line   165, delay 0.925, least cost  12.35
appetite 4.5%: line   165, delay 0.805, least cost  11.39
appetite 5.0%: line   170, delay 0.668, least cost  10.44
appetite 5.5%: line   165, delay 0.579, least cost   9.58
appetite 6.0%: line   160, delay 0.502, least cost   8.82
multiplier of the appetite: 1.81 $ million a point (4.5 to 5.5%), 1.77 (4 to 6%)
implied cost of a breach: 100 x 1.81 = $181 million, 36% of a year's EBITDA
Theorem 15.3(iii): tightening a point costs 1.91 >= 1.81; loosening a point gains 1.62 <= 1.81
a quarter of delay at $ 4.0 million: line   140, delay 0.831, cost   7.52, price 0.91 a point
a quarter of delay at $ 8.0 million: line   170, delay 0.668, cost  10.44, price 1.81 a point
a quarter of delay at $16.0 million: line   195, delay 0.604, cost  15.51, price 3.42 a point

Panel 6 — Read the frontier, by floors and by weights (Worked Example 15.1, Step 5; Theorem 15.5; Figure 15.2, right; Table 15.5)

AXIOM Lab 1.15, step 4, the multi-objective explorer. Two objectives conflict: the levers' cost and the breach odds (Proposition 15.8). Floors (the constraint method of Theorem 15.5(iii)) minimize the cost subject to an appetite, one appetite at a time, and find every frontier point; weight sweeps minimize cost plus a weight times the odds and find only the points on the frontier's convex hull (Theorem 15.5(ii)). The frontier gives the least cost of every appetite. Each office acting alone sits far from it: no line, however large, brings the odds below 8.4 percent, and phasing alone meets the appetite only with a delay of 5.1 quarters, for $40.8 million. Priced together, the two levers save $30 million, the value of coordination of Theorem 15.6(iii). Chapter 8's package, a $100 million line and the two-quarter phasing, is safe at 3.0 percent but inefficient: the frontier delivers the same 3.0 percent for $14.7 million instead of $19.0 million (Theorem 15.5(v)). The bank's cap of $100 million on the line raises the cheapest cost by $2.9 million.

Python Code
P_BOOK = [0.01, 0.02, 0.03, 0.04, 0.045, 0.05, 0.055, 0.06, 0.08, 0.10, 0.12, 0.15, 0.20, 0.246]
FRONT = {p: cheapest(B, p) for p in P_BOOK}
print("least cost by appetite (Online Appendix 15.B.4):")
print("  " + "  ".join(f"{100 * p:4.1f}%: {FRONT[p][2]:5.2f}" for p in P_BOOK[:7]))
print("  " + "  ".join(f"{100 * p:4.1f}%: {FRONT[p][2]:5.2f}" for p in P_BOOK[7:]))

P_FINE = np.round(0.01 + 0.0025 * np.arange(95), 6)                 # floors every quarter point, 1% to 24.5%
C_FINE = np.array([cheapest(B, p)[2] for p in P_FINE])
WEIGHTS = np.round(np.arange(0.05, 10.001, 0.05), 2)                  # $ million per point of odds
picks = np.array([int(np.argmin(C_FINE + w * 100 * P_FINE)) for w in WEIGHTS])
found = sorted(set(picks.tolist()))
print(f"\nfloors trace all {len(P_FINE)} frontier points from 1% to 24.5%; weights from 0.05 to 10 a point find {len(found)}")
for j in found:
    if 0.04 <= P_FINE[j] <= 0.06:
        ws_j = WEIGHTS[picks == j]
        print(f"  weights from {ws_j.min():4.2f} to {ws_j.max():4.2f} a point pick {100 * P_FINE[j]:5.2f}%")
J5 = int(np.argmin(abs(P_FINE - APPETITE)))
print(f"  no weight picks the board's 5% itself: it lies {C_FINE[J5] - (C_FINE[J5 - 1] + C_FINE[J5 + 1]) / 2:.4f}"
      f" $ million above the chord from 4.75 to 5.25%, whose slope is {(C_FINE[J5 - 1] - C_FINE[J5 + 1]) / 0.5:.2f} a point")

P_LINE = B.odds(400, 0)
PH_ALONE = B.delay_for(0, APPETITE)
C_ALONE = cost(0, PH_ALONE)
print(f"\nline alone: even ${400} million leaves {100 * P_LINE:.2f}%; phasing alone: {PH_ALONE:.2f} quarters"
      f" (depth {depth(PH_ALONE):.2f}), cost {C_ALONE:.2f}")
print(f"value of coordination: {C_ALONE:.2f} - {C5:.2f} = ${C_ALONE - C5:.1f} million")
P_PKG, C_PKG = B.odds(100, 2), cost(100, 2)
F_PKG = cheapest(B, P_PKG)
print(f"Chapter 8's package: {100 * P_PKG:.2f}% for ${C_PKG:.1f} million; the frontier at the same odds: line {F_PKG[0]:.0f},"
      f" delay {F_PKG[1]:.2f}, ${F_PKG[2]:.2f} million (${C_PKG - F_PKG[2]:.1f} million less);"
      f" for $18.9 million it reaches 1.75% ({cheapest(B, 0.0175)[2]:.2f})")
CAPPED = cheapest(B, APPETITE, cap=100)
print(f"the bank's cap of $100 million: delay {CAPPED[1]:.2f}, cost {CAPPED[2]:.2f}, ${CAPPED[2] - C5:.2f} million more")

print("\nTable 15.5                                   line    delay    cost    odds")
T155 = [("Average path (certainty equivalent)", 0, 0.0, P_CE), ("Joint check of Chapter 13 (robust)", ROBUST_LINE, 0.0, P_ROBUST),
        ("Phasing alone", 0, PH_ALONE, B.odds(0, PH_ALONE)), ("Chapter 8 package", 100, 2.0, P_PKG)]
T155 += [(f"Cheapest at {100 * p:.0f}%", *FRONT[p][:2], B.odds(*FRONT[p][:2])) for p in (0.06, 0.05, 0.04, 0.03)]
for name, l, ph, p in T155:
    print(f"  {name:40s} {l:5.0f} {ph:8.2f} {cost(l, ph):7.1f} {100 * p:7.1f}")
print(f"  {'Line alone, any size':40s}   any     0.00       -    >= {100 * P_LINE:.1f}")

ps = np.round(np.arange(0.01, 0.2461, 0.0025), 6)
alone = [cost(0, B.delay_for(0, p)) for p in ps]
fig, ax = plt.subplots(figsize=(7.6, 3.6))
ax.plot(100 * ps, alone, color="#E65100", lw=1.4, ls="--", label="phasing alone")
ax.plot(100 * P_FINE, C_FINE, color="#5E35B1", lw=2, label="both levers: least cost by floors")
ax.plot(100 * P_FINE[found], C_FINE[found], "o", color="#5E35B1", ms=4, mfc="white", label="points a weight sweep finds")
ax.axvline(100 * P_LINE, color="#1F4E79", lw=1, ls=":", label=f"line alone: never below {100 * P_LINE:.1f}%")
xx = np.array([2.0, 8.5])
ax.plot(xx, C5 - LAMBDA * (xx - 5), color="#1A1A1A", lw=0.9, ls=(0, (1.5, 1.5)), label=f"slope at 5%: {LAMBDA:.1f} a point")
ax.plot([5], [C5], marker="*", ms=12, color="#5E35B1", zorder=5)
ax.plot([100 * P_PKG], [C_PKG], "o", color="#1A1A1A", ms=5, zorder=5)
ax.text(100 * P_PKG + 0.6, C_PKG, "Chapter 8 package", fontsize=8, va="center")
ax.set(xlim=(0, 25), ylim=(0, 45), xlabel="board's appetite: odds of a breach (%)", ylabel="least cost (\\$ million)",
       title="Floors trace every frontier point; weights skip the dents (seed 8, the book's paths)")
ax.legend(frameon=False, fontsize=8, loc="upper right"); plt.tight_layout(); plt.show()
least cost by appetite (Online Appendix 15.B.4):
   1.0%: 23.09   2.0%: 17.86   3.0%: 14.68   4.0%: 12.35   4.5%: 11.39   5.0%: 10.44   5.5%:  9.58
   6.0%:  8.82   8.0%:  6.25  10.0%:  4.17  12.0%:  3.15  15.0%:  2.25  20.0%:  1.19  24.6%:  0.02

floors trace all 95 frontier points from 1% to 24.5%; weights from 0.05 to 10 a point find 30
  weights from 2.00 to 2.20 a point pick  4.00%
  weights from 1.75 to 1.95 a point pick  4.75%
  weights from 1.70 to 1.70 a point pick  5.25%
  weights from 1.65 to 1.65 a point pick  5.50%
  weights from 1.45 to 1.60 a point pick  5.75%
  weights from 1.40 to 1.40 a point pick  6.00%
  no weight picks the board's 5% itself: it lies 0.0019 $ million above the chord from 4.75 to 5.25%, whose slope is 1.75 a point

line alone: even $400 million leaves 8.40%; phasing alone: 5.09 quarters (depth 7.62), cost 40.76
value of coordination: 40.76 - 10.44 = $30.3 million
Chapter 8's package: 3.00% for $19.0 million; the frontier at the same odds: line 180, delay 1.16, $14.67 million ($4.3 million less); for $18.9 million it reaches 1.75% (18.88)
the bank's cap of $100 million: delay 1.29, cost 13.30, $2.86 million more

Table 15.5                                   line    delay    cost    odds
  Average path (certainty equivalent)          0     0.00     0.0    24.6
  Joint check of Chapter 13 (robust)          55     0.00     1.6    17.4
  Phasing alone                                0     5.09    40.8     5.0
  Chapter 8 package                          100     2.00    19.0     3.0
  Cheapest at 6%                             160     0.50     8.8     6.0
  Cheapest at 5%                             170     0.67    10.4     5.0
  Cheapest at 4%                             165     0.93    12.4     4.0
  Cheapest at 3%                             180     1.16    14.7     3.0
  Line alone, any size                       any     0.00       -    >= 8.4
Floors trace every frontier point; weights skip the dents (seed 8, the book's paths)

Panel 7 — A small allocation: the corner and its multipliers (Theorem 15.3; Equation 15.4)

AXIOM Lab 1.15, step 3. The module's preloaded allocation instance has one budget and three capital stocks. The book describes it in words and prints no data, so the data here are this notebook's declaration, not the book's: a budget of 6 is split across financial, human and technological capital, with stocks 40, 30 and 20 that keep 98, 94 and 90 percent of themselves, and output Y=10 KF0.3KH0.4KT0.3Y = 10\,K_F^{0.3}K_H^{0.4}K_T^{0.3} of the stocks after investment. Watch the unconstrained first-order point demand a negative investment in financial capital; the optimum is then the corner where the nonnegativity constraint binds. Read its multipliers: the budget's price, equal to the marginal output of every funded form, and the positive price of the binding nonnegativity constraint, the gap between that price and financial capital's marginal output (complementary slackness). Output is concave and the constraints linear, so the corner is the global optimum (Theorem 15.3(ii)), and the multipliers bound what relaxing or tightening can do (Theorem 15.3(iii)).

Python Code
K0 = np.array([40.0, 30.0, 20.0]); KEEP = np.array([0.98, 0.94, 0.90]); ALPHA = np.array([0.3, 0.4, 0.3])
TFP, BUDGET = 10.0, 6.0
FORMS = ("financial", "human", "technological")
KB = KEEP * K0                                                   # the stocks before investment: 39.2, 28.2, 18.0
Y = lambda I: float(TFP * np.prod((KB + np.asarray(I)) ** ALPHA))

def allocate(budget, floor_f=0.0):
    # the best split with financial investment held at floor_f (the binding corner) and the rest shared
    rest = KB[1] + KB[2] + budget - floor_f
    k = np.array([KB[0] + floor_f, *(ALPHA[1:] / ALPHA[1:].sum() * rest)])
    return k - KB

I_FREE = ALPHA * (KB.sum() + BUDGET) - KB                         # first-order point, nonnegativity ignored
print("unconstrained first-order point:", ", ".join(f"{f} {v:+.2f}" for f, v in zip(FORMS, I_FREE)),
      f"(sum {I_FREE.sum():.1f}): a negative investment, infeasible")
I_STAR = allocate(BUDGET)
Y_STAR = Y(I_STAR)
MP = ALPHA * Y_STAR / (KB + I_STAR)                              # marginal output of each form at the optimum
LAM_B, MU_F = MP[1], MP[1] - MP[0]
print("corner optimum:", ", ".join(f"{f} {v:.4f}" for f, v in zip(FORMS, I_STAR)), f"-> output {Y_STAR:.4f}"
      f" (an even split gives {Y([2, 2, 2]):.4f})")
print(f"marginal outputs {np.round(MP, 4)}: the budget's price lambda = {LAM_B:.4f} for every funded form;"
      f" nonnegativity's price mu_F = {MU_F:.4f} > 0, and it binds")
print("KKT, form by form: grad Y = lambda x 1 - mu x e_F ->",
      bool(np.allclose(MP, LAM_B - np.array([MU_F, 0, 0]))))
G1 = Y(allocate(BUDGET + 1.0)) - Y_STAR
G2 = Y_STAR - Y(allocate(BUDGET, floor_f=1.0))
print(f"Theorem 15.3(iii): a budget of 7 gains {G1:.4f} <= lambda = {LAM_B:.4f};"
      f" forcing 1 into financial capital loses {G2:.4f} >= mu_F = {MU_F:.4f}")
unconstrained first-order point: financial -11.78, human +8.36, technological +9.42 (sum 6.0): a negative investment, infeasible
corner optimum: financial 0.0000, human 1.6286, technological 4.3714 -> output 296.9935 (an even split gives 292.9415)
marginal outputs [2.2729 3.9827 3.9827]: the budget's price lambda = 3.9827 for every funded form; nonnegativity's price mu_F = 1.7098 > 0, and it binds
KKT, form by form: grad Y = lambda x 1 - mu x e_F -> True
Theorem 15.3(iii): a budget of 7 gains 3.9713 <= lambda = 3.9827; forcing 1 into financial capital loses 1.7716 >= mu_F = 1.7098

Panel 8 — A rule against the committed delay (Theorem 15.4(iii); the worked example's discussion question)

AXIOM Lab 1.15, step 5, second part, the policy simulator: could a rule that slows the build only when cash runs low meet the appetite more cheaply than a committed delay? The book leaves the question open, so the rule here is this notebook's declaration, not the book's, and so are its numbers. At the end of quarter kk the program office reads liquidity; if it is below a trigger, the rest of the build slows by ϕ′\phi' quarters of delay: the draw still ahead is cut as Chapter 8's phasing cuts it, 4ϕ′4\phi' points of depth, and the platform is delayed in proportion to the share of the draw still ahead. The search runs over a small class: the line, the review quarter, the slowdown, the trigger, and an optional committed delay. Enlarging the policy class from committed plans to rules can only lower the least cost (Theorem 15.4(iii)); the gap is the value of reading cash. The search uses the book's paths and is checked on fresh paths (seed 26209). Perfect foresight, a delay chosen path by path, bounds what any rule could save.

Python Code
LIM = int(np.floor(APPETITE * N + 1e-9))
AHEAD = {k: 1 - S1[k - 1] for k in (1, 2, 3, 4)}       # share of the draw still ahead after quarter k

def rule_search(S, lines=(160.0, 165.0, 170.0, 175.0), bases=(0.0, 0.25, 0.5, 0.6), slows=np.arange(0.25, 7.01, 0.25)):
    found = []
    for l in lines:
        lost = S.lost(l)
        for ph0 in bases:
            L = BASE - depth(ph0) * SHAPE + S.E - lost
            b0 = (L < FLOOR).any(axis=1)
            for k in (1, 2, 3, 4):
                order = np.argsort(L[:, k - 1], kind="stable")              # the lowest cash first
                cb0 = np.concatenate([[0], np.cumsum(b0[order])])
                early = (L[:, :k] < FLOOR).any(axis=1)
                for ph in slows:
                    if ph0 + ph * AHEAD[k] > DEPTH0 / DEPTH_PER_Q:
                        continue
                    b1 = early | ((L[:, k:] + DEPTH_PER_Q * ph * (SHAPE[k:] - SHAPE[k - 1])) < FLOOR).any(axis=1)
                    count = np.concatenate([[0], np.cumsum(b1[order])]) + (b0.sum() - cb0)
                    ok = np.nonzero(count <= LIM)[0]
                    if len(ok) == 0:
                        continue
                    m = int(ok[0])                                         # slow the m paths with the least cash
                    lk = L[order, k - 1]
                    trig = np.inf if m == S.n else (-np.inf if m == 0 else 0.5 * (lk[m - 1] + lk[m]))
                    c = cost(l, ph0) + VQ * ph * AHEAD[k] * m / S.n
                    found.append(dict(cost=c, line=l, base=ph0, k=k, slow=float(ph), share=m / S.n, trigger=trig))
    return sorted(found, key=lambda r: r["cost"])

def run_rule(S, r):
    L = BASE - depth(r["base"]) * SHAPE + S.E - S.lost(r["line"])
    k = r["k"]
    hit = L[:, k - 1] < r["trigger"]
    L[hit, k:] += DEPTH_PER_Q * r["slow"] * (SHAPE[k:] - SHAPE[k - 1])
    return float((L < FLOOR).any(axis=1).mean()), cost(r["line"], r["base"]) + VQ * r["slow"] * AHEAD[k] * hit.mean()

RULES = rule_search(B)
ONLY = {k: next(r for r in RULES if r["base"] == 0 and r["k"] == k) for k in (1, 2, 3, 4)}
MIXED = {k: next(r for r in RULES if r["base"] > 0 and r["k"] == k) for k in (1, 2, 3, 4)}
print(f"committed delay (open loop): ${C5:.2f} million")
print("review   draw ahead   slow only when cash is low          commit part, slow more when cash is low")
for k in (1, 2, 3, 4):
    a, b = ONLY[k], MIXED[k]
    print(f"   q{k}       {100 * AHEAD[k]:3.0f}%     {a['cost']:6.2f} ({100 * a['share']:4.1f}% of paths slowed)"
          f"       {b['cost']:6.2f} (commit {b['base']:.2f}, {100 * b['share']:4.1f}% slowed)")
BR = RULES[0]
print(f"best rule found: line {BR['line']:.0f} and a committed delay of {BR['base']:.2f} quarter; at quarter {BR['k']}, if cash"
      f" is below ${BR['trigger']:.0f} million ({100 * BR['share']:.1f}% of paths), cut the draw still ahead as a"
      f" {BR['slow']:.2f}-quarter phasing would, {BR['slow'] * AHEAD[BR['k']]:.2f} quarter more delay")
print(f"  expected cost ${BR['cost']:.2f} million: ${C5 - BR['cost']:.2f} million less than the committed delay")
pF, cF = run_rule(F, BR)
print(f"fresh paths (seed {CERT_SEED}): the rule breaches {100 * pF:.2f}% at ${cF:.2f} million;"
      f" the committed package {100 * P5_FRESH:.2f}% at ${C5:.2f} million")

def foresight(S, p=APPETITE):
    # delays chosen path by path, knowing each path's future: no rule can do better
    best = None
    for l in LINES:
        need = np.where(S.crit(l) < 0, np.inf, np.maximum(0.0, (DEPTH0 - S.crit(l)) / DEPTH_PER_Q))
        saved = np.sort(need)[:S.n - int(np.floor(p * S.n + 1e-9))]
        if np.isfinite(saved).all():
            c = cost(l, saved.sum() / S.n)
            if best is None or c < best[0]:
                best = (c, l, (saved > 0).mean())
    return best
FS = foresight(B)
print(f"perfect foresight: line {FS[1]:.0f}, delay on {100 * FS[2]:.1f}% of paths, ${FS[0]:.2f} million;"
      f" the most any information could save is ${C5 - FS[0]:.1f} million")

ks = np.array([1, 2, 3, 4])
fig, ax = plt.subplots(figsize=(7.6, 3.6))
ax.axhline(C5, color="#5E35B1", lw=1.6, label=f"committed delay: {C5:.2f}")
ax.plot(ks, [ONLY[k]["cost"] for k in ks], "o-", color="#B71C1C", lw=1.6, label="slow only when cash is low")
ax.plot(ks, [MIXED[k]["cost"] for k in ks], "s-", color="#1F4E79", lw=1.6, label="commit part, slow more when cash is low")
for k in ks:
    ax.text(k, 9.62, f"{100 * AHEAD[k]:.0f}% of the\ndraw ahead", ha="center", va="bottom", fontsize=7.5, color="#616161")
ax.set(xticks=ks, xticklabels=[f"quarter {k}" for k in ks], xlim=(0.6, 4.4), ylim=(9.6, 12.6),
       xlabel="when the program office reads cash", ylabel="least cost meeting 5% (\\$ million)",
       title="Cash runs low too late to replace the committed delay (seed 8, the book's paths)")
ax.legend(frameon=False, fontsize=8, loc="upper left"); plt.tight_layout(); plt.show()
committed delay (open loop): $10.44 million
review   draw ahead   slow only when cash is low          commit part, slow more when cash is low
   q1        70%      10.62 (98.5% of paths slowed)        10.38 (commit 0.60, 44.9% slowed)
   q2        47%      10.89 (90.1% of paths slowed)        10.30 (commit 0.60, 11.6% slowed)
   q3        30%      11.41 (64.3% of paths slowed)        10.27 (commit 0.50, 17.8% slowed)
   q4        18%      12.35 (74.8% of paths slowed)        10.31 (commit 0.60,  9.9% slowed)
best rule found: line 170 and a committed delay of 0.50 quarter; at quarter 3, if cash is below $468 million (17.8% of paths), cut the draw still ahead as a 2.75-quarter phasing would, 0.82 quarter more delay
  expected cost $10.27 million: $0.17 million less than the committed delay
fresh paths (seed 26209): the rule breaches 4.96% at $10.29 million; the committed package 4.91% at $10.44 million
perfect foresight: line 40, delay on 15.2% of paths, $2.58 million; the most any information could save is $7.9 million
Cash runs low too late to replace the committed delay (seed 8, the book's paths)

Under this declaration, reading cash is worth little. A rule that slows the build only when cash runs low costs more than the committed delay at every review quarter: early readings say little about the trough, and by the time cash runs low most of the draw is spent. Combined with a smaller committed delay, a review in quarter 3 saves only about $0.2 million, while perfect foresight would be worth many times more. What the transformation office would need to see is an earlier signal of the trough, not a faster reaction to cash: the value of that information is, again, a difference of two GEOP values (Theorem 15.4(iii)).

Panel 9 — Rolling plans need a terminal condition (Theorem 15.4(iv); Figure 15.1; Online Appendix 15.B.2)

The runway of Chapter 14 after its $30 million repair: $150 million of cash above the floor and a burn of $50 million a quarter that can be cut by at most $10 million a quarter. Stopping a burn rr needs N(r)=∑i≥0max⁡(r−10i,0)N(r) = \sum_{i \ge 0}\max(r - 10i, 0) of cash, and N(50)=150N(50) = 150: the start lies on the edge of the viability kernel {s≥N(r)}\{s \ge N(r)\}. Each quarter the plan is re-made over a one-quarter window that maximizes the program's spending. Without a terminal condition every window is feasible and optimal, the burn is never cut, and cash runs out in quarter 4. With the kernel as terminal condition, the windows cut from the first quarter, 150/50, 100/40, 60/30, 30/20, 10/10, 0/0, and the burn stops in quarter 5 with the cash exactly spent. From Chapter 14's $120 million the start lies outside the kernel: no window with the terminal condition is feasible, and the audit names the emptying date instead (Theorem 15.2(iii)).

Python Code
CUT = 10.0
def need(r, b=CUT):
    # the cash a burn r needs to be stopped, cutting b a quarter
    return sum(max(r - b * i, 0.0) for i in range(int(np.ceil(r / b)) + 1))

def rolling(s, r, terminal, quarters=6):
    path = [(0, s, r)]
    for k in range(1, quarters + 1):
        if s - r < -1e-9:                         # the window is infeasible: out of cash
            path.append((k, s - r, r))
            break
        s1 = s - r
        if terminal:                              # keep the largest burn whose next state can still stop in time
            lo, hi = max(r - CUT, 0.0), r
            if need(lo) > s1 + 1e-6:
                raise ValueError("outside the kernel")
            for _ in range(60):
                mid = 0.5 * (lo + hi)
                lo, hi = (mid, hi) if need(mid) <= s1 + 1e-9 else (lo, mid)
            r = np.floor(lo * 1e6) / 1e6          # to the dollar, rounded down: still inside the kernel
        s = s1
        path.append((k, s, r))
    return path

print(f"N(50) = {need(50):.0f}: the start (150, 50) is on the kernel's edge")
NO_TC, TC = rolling(150.0, 50.0, False), rolling(150.0, 50.0, True)
print("no terminal condition (cash, burn):", [(round(s), round(r)) for _, s, r in NO_TC],
      f"-> out of cash in quarter {next(k for k, s, _ in NO_TC if s < 0)}")
print("kernel as terminal condition      :", [(round(s), round(r)) for _, s, r in TC],
      f"-> the burn stops in quarter {next(k for k, _, r in TC if r < 1e-9)}")
try:
    rolling(120.0, 50.0, True)
except ValueError:
    full = [120.0]
    while full[-1] >= 0:
        full.append(full[-1] - max(50.0 - CUT * (len(full) - 1), 0.0))
    print(f"from $120 million: no window with the terminal condition is feasible (N(50) = 150 > 120); cutting as fast as"
          f" allowed, cash runs {[round(v) for v in full]}: the floor holds through quarter {len(full) - 2}")

fig, (ax, bx) = plt.subplots(1, 2, figsize=(7.6, 3.6))
k1, s1_, r1 = zip(*NO_TC); k2, s2, r2 = zip(*TC)
ax.axhspan(-70, 0, color="#F6E3E3", lw=0)
ax.axhline(0, color="#616161", lw=0.8)
ax.plot(k1[:4], s1_[:4], "o-", color="#B71C1C", lw=1.6, ms=4, label="no end condition")
ax.plot(k1[3:5], s1_[3:5], "--", color="#B71C1C", lw=1.2)
ax.plot([k1[4]], [s1_[4]], "X", color="#B71C1C", ms=8)
ax.plot(k2, s2, "o-", color="#2E7D32", lw=1.6, ms=4, label="end where the burn can still be stopped")
ax.text(4.3, -50, "out of cash", color="#B71C1C", fontsize=8, va="center")
ax.set(xlim=(-0.3, 6.3), ylim=(-70, 165), xlabel="quarter", ylabel="cash above the floor (\\$ million)", title="Cash")
bx.plot(k1[:4], r1[:4], "o-", color="#B71C1C", lw=1.6, ms=4)
bx.plot(k2, r2, "o-", color="#2E7D32", lw=1.6, ms=4)
bx.set(xlim=(-0.3, 6.3), ylim=(-3, 58), xlabel="quarter", ylabel="burn (\\$ million a quarter)", title="Burn")
ax.legend(frameon=False, fontsize=7.5, loc="upper right")
for z in (ax, bx):
    z.tick_params(labelsize=8); z.xaxis.label.set_size(8.5); z.yaxis.label.set_size(8.5); z.title.set_size(9)
fig.suptitle("Re-planning without a terminal condition runs out of cash in quarter 4 (seed 26115)", fontsize=10)
plt.tight_layout(); plt.show()
N(50) = 150: the start (150, 50) is on the kernel's edge
no terminal condition (cash, burn): [(150, 50), (100, 50), (50, 50), (0, 50), (-50, 50)] -> out of cash in quarter 4
kernel as terminal condition      : [(150, 50), (100, 40), (60, 30), (30, 20), (10, 10), (0, 0), (0, 0)] -> the burn stops in quarter 5
from $120 million: no window with the terminal condition is feasible (N(50) = 150 > 120); cutting as fast as allowed, cash runs [120, 70, 30, 0, -20]: the floor holds through quarter 3
Re-planning without a terminal condition runs out of cash in quarter 4 (seed 26115)

Panel 10 — Prices inside the architecture (Proposition 15.9; Theorem 15.6(ii); Proposition 15.5; Online Appendix 15.B.1, 15.B.3)

The stability budget is a shared resource. In Meridian's feedback core (Chapter 14), with engineering links of gain ee, treasury links tt and the new Digital–Industrial Systems link hh, the board's half-life rule reads hr∗+2(e2+t2)≤r∗2hr^* + 2(e^2 + t^2) \le r^{*2} with r∗=2−1/4r^* = 2^{-1/4}. With every existing link at 0.40 the new link can carry at most 0.080, and the budget binds: every 0.01 trimmed from both engineering links, or from both treasury links, frees 0.019 of the new link. Its multiplier is the internal price at which each office buys down its own couplings (Online Appendix 15.B.3): with the new link worth α\alpha a unit and each office's links worth β\beta, the price λ=α/r∗\lambda = \alpha/r^* makes each office choose e∗=βr∗/(4α)e^* = \beta r^*/(4\alpha) on its own. A twitchy optimum. In the scalar company x′=ax+bux' = ax + bu the best standing decision is u∗=pb/(c(1−a))u^* = pb/(c(1-a)); its response to the payoff is 2, 5 and 20 at a=0.5a = 0.5, 0.8 (the spectral radius of Meridian's core today) and 0.95, and its elasticity to the carry-over, a/(1−a)a/(1-a), is 1, 4 and 19 (Proposition 15.5).

Python Code
R_STAR = 2 ** -0.25
H_MAX = (R_STAR ** 2 - 2 * (0.40 ** 2 + 0.40 ** 2)) / R_STAR
DH_DE = -4 * 0.40 / R_STAR
print(f"r* = {R_STAR:.4f}: with e = t = 0.40 the new link carries at most h = {H_MAX:.4f};"
      f" dh/de = -4e/r* = {DH_DE:.3f}: 0.01 trimmed from both engineering links frees {-0.01 * DH_DE:.3f}")
E_EVEN = np.sqrt((R_STAR ** 2 - 0.40 * R_STAR) / 4)        # Chapter 14's uniform repair: the new link at 0.40
RATIO = 4 * E_EVEN / R_STAR                                 # beta/alpha for which that repair is the company's best
lam = 1.0 / R_STAR                                          # alpha = 1: the budget's price
e_office = RATIO / (4 * lam)                                # each office alone: max beta e - lam 2 e^2
print(f"if the links are valued so that Chapter 14's uniform repair is best (beta/alpha = {RATIO:.3f}), the price"
      f" lambda = alpha/r* = {lam:.3f} alpha leads each office to {e_office:.3f} on its own;"
      f" the budget then leaves the new link {(R_STAR ** 2 - 4 * e_office ** 2) / R_STAR:.3f}")
print("\na twitchy optimum, u* = 1/(1 - a) with b = c = p = 1 (Online Appendix 15.B.1)")
TWITCH = {}
for a in (0.5, 0.8, 0.95):
    u = 1 / (1 - a)
    exact = 100 * (1 / (1 - 1.01 * a) / u - 1)
    TWITCH[a] = (u, a / (1 - a), exact)
    print(f"  a = {a:4.2f}: response to the payoff {u:5.1f}; elasticity to a {a / (1 - a):5.1f}"
          f" (to first order; an exact 1% recalibration moves u* by {exact:.1f}%)")
r* = 0.8409: with e = t = 0.40 the new link carries at most h = 0.0798; dh/de = -4e/r* = -1.903: 0.01 trimmed from both engineering links frees 0.019
if the links are valued so that Chapter 14's uniform repair is best (beta/alpha = 1.448), the price lambda = alpha/r* = 1.189 alpha leads each office to 0.304 on its own; the budget then leaves the new link 0.400

a twitchy optimum, u* = 1/(1 - a) with b = c = p = 1 (Online Appendix 15.B.1)
  a = 0.50: response to the payoff   2.0; elasticity to a   1.0 (to first order; an exact 1% recalibration moves u* by 1.0%)
  a = 0.80: response to the payoff   5.0; elasticity to a   4.0 (to first order; an exact 1% recalibration moves u* by 4.2%)
  a = 0.95: response to the payoff  20.0; elasticity to a  19.0 (to first order; an exact 1% recalibration moves u* by 23.5%)

Validation — the book's numbers, and agreement with DCT_V1_Ch15_Lab.xlsx

Each checkpoint is a number printed in Chapter 15 (Worked Example 15.1, Table 15.5, Figures 15.1–15.2, Propositions 15.5 and 15.9) or in Online Appendix 15.B (Examples 15.B.1–15.B.4), with Chapter 8's four cases that the worked example reproduces. Simulated checkpoints use the book's paths (seed 8). The workbook recomputes the ones marked workbook with Excel formulas and shows PASS against the same engine values on its Checks sheet.

Python Code
checks = [
    ("Chapter 8: plan as drawn, % (seed 8)", 100 * B.odds(0, 0), 24.6, 0.05),
    ("Chapter 8: standby line, % (seed 8)", 100 * B.odds(100, 0), 12.4, 0.05),
    ("Chapter 8: phased build, % (seed 8)", 100 * B.odds(0, 2), 13.1, 0.05),
    ("Chapter 8: both levers, % (seed 8)", 100 * P_PKG, 3.0, 0.05),
    ("deepest draw, $ million (workbook)", draw(0), 138, 0.5),
    ("deepest draw, phased build (workbook)", draw(2), 89, 0.5),
    ("certainty equivalent: mean-path trough (seed 8)", CE_TROUGH, 460, 0.5),
    ("certainty equivalent: mean-path trough, exact (workbook)", CE_EXACT, 460, 0.5),
    ("90th-percentile closure (workbook)", P90, 187, 0.5),
    ("robust: least line (workbook)", ROBUST_LINE, 55, 0.5),
    ("robust: cost (workbook)", cost(ROBUST_LINE, 0), 1.65, 0.005),
    ("robust: true odds, % (seed 8)", 100 * P_ROBUST, 17.4, 0.05),
    ("deviation alone, % (seed 8)", 100 * P_DEV, 8.4, 0.05),
    ("cheapest at 5%: line (workbook)", L5, 170, 0),
    ("cheapest at 5%: delay, quarters (workbook)", PH5, 0.668, 5e-4),
    ("cheapest at 5%: depth (workbook)", depth(PH5), 25.33, 0.005),
    ("cheapest at 5%: deepest draw (workbook)", draw(PH5), 121.6, 0.05),
    ("cheapest at 5%: draw smaller by (workbook)", draw(0) - draw(PH5), 16.4, 0.05),
    ("cheapest at 5%: cost (workbook)", C5, 10.44, 0.005),
    ("cheapest at 5%: fees (workbook)", FEE * L5, 5.10, 0.005),
    ("cheapest at 5%: delay cost (workbook)", VQ * PH5, 5.34, 0.005),
    ("flat optimum: lowest line within $0.5m (workbook)", min(FLAT), 140, 0),
    ("flat optimum: highest line within $0.5m (workbook)", max(FLAT), 205, 0),
    ("leverage with the line fully drawn (workbook)", LEV, 3.74, 0.005),
    ("margin: odds per $m of line, points (workbook)", -SL, 0.0166, 5e-5),
    ("margin: odds per quarter of delay, points (workbook)", -SP, 4.52, 0.005),
    ("margin: $m a point by the line (workbook)", FEE / -SL, 1.80, 0.005),
    ("margin: $m a point by the delay (workbook)", VQ / -SP, 1.77, 0.005),
    ("least cost at 4% (workbook)", PRICES[0.04][2], 12.4, 0.05),
    ("least cost at 4.5% (workbook)", PRICES[0.045][2], 11.4, 0.05),
    ("least cost at 5.5% (workbook)", PRICES[0.055][2], 9.6, 0.05),
    ("least cost at 6% (workbook)", PRICES[0.06][2], 8.8, 0.05),
    ("price of the appetite, $m a point (workbook)", LAMBDA, 1.81, 0.005),
    ("price of the appetite, 4 to 6% (workbook)", LAMBDA2, 1.77, 0.005),
    ("implied cost of a breach, $ million (workbook)", 100 * LAMBDA, 180, 1.0),
    ("delay at $4m a quarter: line (workbook)", SENS[4.0][0], 140, 0),
    ("delay at $4m a quarter: cost (workbook)", SENS[4.0][2], 7.52, 0.005),
    ("delay at $4m a quarter: price (workbook)", SENS[4.0][3], 0.91, 0.005),
    ("delay at $16m a quarter: line (workbook)", SENS[16.0][0], 195, 0),
    ("delay at $16m a quarter: cost (workbook)", SENS[16.0][2], 15.51, 0.005),
    ("delay at $16m a quarter: price (workbook)", SENS[16.0][3], 3.42, 0.005),
    ("least cost at 1% (workbook)", FRONT[0.01][2], 23.1, 0.05),
    ("least cost at 2% (workbook)", FRONT[0.02][2], 17.9, 0.05),
    ("least cost at 8% (workbook)", FRONT[0.08][2], 6.3, 0.05),
    ("least cost at 10% (workbook)", FRONT[0.10][2], 4.2, 0.05),
    ("least cost at 12% (workbook)", FRONT[0.12][2], 3.2, 0.05),
    ("least cost at 15% (workbook)", FRONT[0.15][2], 2.3, 0.05),
    ("least cost at 20% (workbook)", FRONT[0.20][2], 1.2, 0.05),
    ("least cost at 24.6% (workbook)", FRONT[0.246][2], 0.0, 0.05),
    ("Table 15.5: 6%, line (workbook)", FRONT[0.06][0], 160, 0),
    ("Table 15.5: 6%, delay (workbook)", FRONT[0.06][1], 0.50, 0.005),
    ("Table 15.5: 4%, line (workbook)", FRONT[0.04][0], 165, 0),
    ("Table 15.5: 4%, delay (workbook)", FRONT[0.04][1], 0.93, 0.005),
    ("Table 15.5: 3%, line (workbook)", FRONT[0.03][0], 180, 0),
    ("Table 15.5: 3%, delay (workbook)", FRONT[0.03][1], 1.16, 0.005),
    ("Table 15.5: 3%, cost (workbook)", FRONT[0.03][2], 14.7, 0.05),
    ("line alone at $400m, % (seed 8)", 100 * P_LINE, 8.40, 0.005),
    ("phasing alone: delay, quarters (workbook)", PH_ALONE, 5.09, 0.005),
    ("phasing alone: depth (workbook)", depth(PH_ALONE), 7.62, 0.005),
    ("phasing alone: cost (workbook)", C_ALONE, 40.76, 0.005),
    ("value of coordination (workbook)", C_ALONE - C5, 30.3, 0.05),
    ("Chapter 8 package: cost (workbook)", C_PKG, 19.0, 0.05),
    ("frontier at the package's odds: cost (workbook)", F_PKG[2], 14.7, 0.05),
    ("frontier at 1.75% (workbook)", cheapest(B, 0.0175)[2], 18.9, 0.05),
    ("line capped at $100m: cost (workbook)", CAPPED[2], 13.30, 0.005),
    ("line capped at $100m: delay (workbook)", CAPPED[1], 1.29, 0.005),
    ("line capped at $100m: extra cost (workbook)", CAPPED[2] - C5, 2.9, 0.05),
    ("5% contour: delay at line 25 (workbook)", CONTOUR[1][1], 3.82, 0.005),
    ("5% contour: delay at line 100 (workbook)", CONTOUR[4][1], 1.29, 0.005),
    ("5% contour: delay at line 250 (workbook)", CONTOUR[10][1], 0.57, 0.005),
    ("rolling plans: N(50) (workbook)", need(50), 150, 0),
    ("rolling plans: quarter cash runs out (workbook)", next(k for k, s, _ in NO_TC if s < 0), 4, 0),
    ("rolling plans: burn in quarter 1, kernel (workbook)", TC[1][2], 40, 1e-6),
    ("rolling plans: cash in quarter 2, kernel (workbook)", TC[2][1], 60, 1e-6),
    ("rolling plans: quarter the burn stops (workbook)", next(k for k, _, r in TC if r < 1e-9), 5, 0),
    ("stability budget: new link at most (workbook)", H_MAX, 0.080, 5e-4),
    ("stability budget: dh/de (workbook)", DH_DE, -1.903, 5e-4),
    ("stability budget: freed by trimming 0.01 (workbook)", -0.01 * DH_DE, 0.019, 5e-4),
    ("twitchy: response at a = 0.5 (workbook)", TWITCH[0.5][0], 2, 1e-9),
    ("twitchy: response at a = 0.8 (workbook)", TWITCH[0.8][0], 5, 1e-9),
    ("twitchy: response at a = 0.95 (workbook)", TWITCH[0.95][0], 20, 1e-9),
    ("twitchy: elasticity at a = 0.5 (workbook)", TWITCH[0.5][1], 1, 1e-9),
    ("twitchy: elasticity at a = 0.8 (workbook)", TWITCH[0.8][1], 4, 1e-9),
    ("twitchy: elasticity at a = 0.95 (workbook)", TWITCH[0.95][1], 19, 1e-9),
]
ok, width = 0, max(len(name) for name, *_ in checks)
for name, got, want, tol in checks:
    status = "PASS" if abs(got - want) <= tol + 1e-9 else "FAIL"; ok += status == "PASS"
    print(f"{name:{width}s} {got:12.4f}   book {want:10.4f}   {status}")
print(f"\n{ok} of {len(checks)} checkpoints PASS")
Chapter 8: plan as drawn, % (seed 8)                          24.6220   book    24.6000   PASS
Chapter 8: standby line, % (seed 8)                           12.3740   book    12.4000   PASS
Chapter 8: phased build, % (seed 8)                           13.0680   book    13.1000   PASS
Chapter 8: both levers, % (seed 8)                             3.0030   book     3.0000   PASS
deepest draw, $ million (workbook)                           138.0496   book   138.0000   PASS
deepest draw, phased build (workbook)                         89.0261   book    89.0000   PASS
certainty equivalent: mean-path trough (seed 8)              459.9415   book   460.0000   PASS
certainty equivalent: mean-path trough, exact (workbook)     459.8541   book   460.0000   PASS
90th-percentile closure (workbook)                           186.8670   book   187.0000   PASS
robust: least line (workbook)                                 54.9166   book    55.0000   PASS
robust: cost (workbook)                                        1.6475   book     1.6500   PASS
robust: true odds, % (seed 8)                                 17.4030   book    17.4000   PASS
deviation alone, % (seed 8)                                    8.4030   book     8.4000   PASS
cheapest at 5%: line (workbook)                              170.0000   book   170.0000   PASS
cheapest at 5%: delay, quarters (workbook)                     0.6676   book     0.6680   PASS
cheapest at 5%: depth (workbook)                              25.3297   book    25.3300   PASS
cheapest at 5%: deepest draw (workbook)                      121.6344   book   121.6000   PASS
cheapest at 5%: draw smaller by (workbook)                    16.4152   book    16.4000   PASS
cheapest at 5%: cost (workbook)                               10.4406   book    10.4400   PASS
cheapest at 5%: fees (workbook)                                5.1000   book     5.1000   PASS
cheapest at 5%: delay cost (workbook)                          5.3406   book     5.3400   PASS
flat optimum: lowest line within $0.5m (workbook)            140.0000   book   140.0000   PASS
flat optimum: highest line within $0.5m (workbook)           205.0000   book   205.0000   PASS
leverage with the line fully drawn (workbook)                  3.7430   book     3.7400   PASS
margin: odds per $m of line, points (workbook)                 0.0166   book     0.0166   PASS
margin: odds per quarter of delay, points (workbook)           4.5160   book     4.5200   PASS
margin: $m a point by the line (workbook)                      1.8045   book     1.8000   PASS
margin: $m a point by the delay (workbook)                     1.7715   book     1.7700   PASS
least cost at 4% (workbook)                                   12.3505   book    12.4000   PASS
least cost at 4.5% (workbook)                                 11.3885   book    11.4000   PASS
least cost at 5.5% (workbook)                                  9.5815   book     9.6000   PASS
least cost at 6% (workbook)                                    8.8194   book     8.8000   PASS
price of the appetite, $m a point (workbook)                   1.8070   book     1.8100   PASS
price of the appetite, 4 to 6% (workbook)                      1.7655   book     1.7700   PASS
implied cost of a breach, $ million (workbook)               180.7015   book   180.0000   PASS
delay at $4m a quarter: line (workbook)                      140.0000   book   140.0000   PASS
delay at $4m a quarter: cost (workbook)                        7.5246   book     7.5200   PASS
delay at $4m a quarter: price (workbook)                       0.9063   book     0.9100   PASS
delay at $16m a quarter: line (workbook)                     195.0000   book   195.0000   PASS
delay at $16m a quarter: cost (workbook)                      15.5129   book    15.5100   PASS
delay at $16m a quarter: price (workbook)                      3.4220   book     3.4200   PASS
least cost at 1% (workbook)                                   23.0893   book    23.1000   PASS
least cost at 2% (workbook)                                   17.8609   book    17.9000   PASS
least cost at 8% (workbook)                                    6.2536   book     6.3000   PASS
least cost at 10% (workbook)                                   4.1714   book     4.2000   PASS
least cost at 12% (workbook)                                   3.1500   book     3.2000   PASS
least cost at 15% (workbook)                                   2.2500   book     2.3000   PASS
least cost at 20% (workbook)                                   1.1859   book     1.2000   PASS
least cost at 24.6% (workbook)                                 0.0199   book     0.0000   PASS
Table 15.5: 6%, line (workbook)                              160.0000   book   160.0000   PASS
Table 15.5: 6%, delay (workbook)                               0.5024   book     0.5000   PASS
Table 15.5: 4%, line (workbook)                              165.0000   book   165.0000   PASS
Table 15.5: 4%, delay (workbook)                               0.9251   book     0.9300   PASS
Table 15.5: 3%, line (workbook)                              180.0000   book   180.0000   PASS
Table 15.5: 3%, delay (workbook)                               1.1605   book     1.1600   PASS
Table 15.5: 3%, cost (workbook)                               14.6841   book    14.7000   PASS
line alone at $400m, % (seed 8)                                8.4040   book     8.4000   PASS
phasing alone: delay, quarters (workbook)                      5.0947   book     5.0900   PASS
phasing alone: depth (workbook)                                7.6213   book     7.6200   PASS
phasing alone: cost (workbook)                                40.7574   book    40.7600   PASS
value of coordination (workbook)                              30.3168   book    30.3000   PASS
Chapter 8 package: cost (workbook)                            19.0000   book    19.0000   PASS
frontier at the package's odds: cost (workbook)               14.6681   book    14.7000   PASS
frontier at 1.75% (workbook)                                  18.8804   book    18.9000   PASS
line capped at $100m: cost (workbook)                         13.2969   book    13.3000   PASS
line capped at $100m: delay (workbook)                         1.2871   book     1.2900   PASS
line capped at $100m: extra cost (workbook)                    2.8563   book     2.9000   PASS
5% contour: delay at line 25 (workbook)                        3.8170   book     3.8200   PASS
5% contour: delay at line 100 (workbook)                       1.2871   book     1.2900   PASS
5% contour: delay at line 250 (workbook)                       0.5668   book     0.5700   PASS
rolling plans: N(50) (workbook)                              150.0000   book   150.0000   PASS
rolling plans: quarter cash runs out (workbook)                4.0000   book     4.0000   PASS
rolling plans: burn in quarter 1, kernel (workbook)           40.0000   book    40.0000   PASS
rolling plans: cash in quarter 2, kernel (workbook)           60.0000   book    60.0000   PASS
rolling plans: quarter the burn stops (workbook)               5.0000   book     5.0000   PASS
stability budget: new link at most (workbook)                  0.0798   book     0.0800   PASS
stability budget: dh/de (workbook)                            -1.9027   book    -1.9030   PASS
stability budget: freed by trimming 0.01 (workbook)            0.0190   book     0.0190   PASS
twitchy: response at a = 0.5 (workbook)                        2.0000   book     2.0000   PASS
twitchy: response at a = 0.8 (workbook)                        5.0000   book     5.0000   PASS
twitchy: response at a = 0.95 (workbook)                      20.0000   book    20.0000   PASS
twitchy: elasticity at a = 0.5 (workbook)                      1.0000   book     1.0000   PASS
twitchy: elasticity at a = 0.8 (workbook)                      4.0000   book     4.0000   PASS
twitchy: elasticity at a = 0.95 (workbook)                    19.0000   book    19.0000   PASS

84 of 84 checkpoints PASS

Next. Chapter 16 closes the volume and hands the problem to Volume II: it turns the fifteen chapters into four readiness gates that tell a board whether it is ready to optimize, and Worked Example 16.1 runs them on this very GEOP. AXIOM-15 runs the same instance interactively (Lab 1.15); this notebook and the workbook are its reproducible record.

Dynamic Corporate Transformation — Volume I: Foundations and Mathematical Framework; Volume II: Enterprise Optimization & Applications
Jump to any chapter

Volume I: Foundations and Mathematical Framework

  1. Ch. 1Introduction to Dynamic Corporate Transformation
  2. Ch. 2Enterprise Systems and Transformation
  3. Ch. 3Mathematical Foundations
  4. Ch. 4Enterprise Modeling Principles
  5. Ch. 5Enterprise State Representation
  6. Ch. 6Enterprise Transformation Operators
  7. Ch. 7Dynamic Enterprise Systems
  8. Ch. 8Stochastic Enterprise Dynamics
  9. Ch. 9Enterprise State Architecture
  10. Ch. 10Enterprise Capital Architecture
  11. Ch. 11Enterprise Performance Architecture
  12. Ch. 12Enterprise Risk, Resilience, and Robustness Architecture
  13. Ch. 13Unified Enterprise Transformation Architecture
  14. Ch. 14Mathematical Analysis of the Unified Enterprise Transformation Architecture
  15. Ch. 15Mathematical Formulation of Enterprise Optimization
  16. Ch. 16Synthesis, Future Directions, and Transition to Volume II

Volume II: Enterprise Optimization & Applications

  1. Ch. 1Introduction to Enterprise Optimization
  2. Ch. 2The General Enterprise Optimization Problem Revisited
  3. Ch. 3Convex Enterprise Optimization
  4. Ch. 4Nonlinear and Mixed-Integer Enterprise Optimization
  5. Ch. 5Dynamic Enterprise Optimization
  6. Ch. 6Optimal Control of Enterprise Systems
  7. Ch. 7Dynamic Programming for Enterprise Systems
  8. Ch. 8Hamilton–Jacobi–Bellman Enterprise Framework
  9. Ch. 9Stochastic Enterprise Optimization
  10. Ch. 10Neuro-Fuzzy Robust Enterprise Optimization
  11. Ch. 11Distributionally Robust Enterprise Optimization
  12. Ch. 12Multi-Objective Enterprise Optimization
  13. Ch. 13Machine Learning for Enterprise Transformation
  14. Ch. 14Artificial Intelligence for Enterprise Optimization
  15. Ch. 15Enterprise Digital Twins and Autonomous Enterprise Transformation
  16. Ch. 16Enterprise Applications and Integrated Transformation Case Studies

Dynamic Corporate Transformation

Springer Nature · Management for Professionals · Forthcoming 2027

  • Volume I — Foundations and Mathematical Framework
  • Volume II — Enterprise Optimization & Applications
Buy Volume I: Dynamic Corporate Transformation: Foundations and Mathematical FrameworkBuy Volume II: Dynamic Corporate Transformation: Enterprise Optimization & Applications
Jump to any chapter

Volume I: Foundations and Mathematical Framework

  1. Ch. 1Introduction to Dynamic Corporate Transformation
  2. Ch. 2Enterprise Systems and Transformation
  3. Ch. 3Mathematical Foundations
  4. Ch. 4Enterprise Modeling Principles
  5. Ch. 5Enterprise State Representation
  6. Ch. 6Enterprise Transformation Operators
  7. Ch. 7Dynamic Enterprise Systems
  8. Ch. 8Stochastic Enterprise Dynamics
  9. Ch. 9Enterprise State Architecture
  10. Ch. 10Enterprise Capital Architecture
  11. Ch. 11Enterprise Performance Architecture
  12. Ch. 12Enterprise Risk, Resilience, and Robustness Architecture
  13. Ch. 13Unified Enterprise Transformation Architecture
  14. Ch. 14Mathematical Analysis of the Unified Enterprise Transformation Architecture
  15. Ch. 15Mathematical Formulation of Enterprise Optimization
  16. Ch. 16Synthesis, Future Directions, and Transition to Volume II

Volume II: Enterprise Optimization & Applications

  1. Ch. 1Introduction to Enterprise Optimization
  2. Ch. 2The General Enterprise Optimization Problem Revisited
  3. Ch. 3Convex Enterprise Optimization
  4. Ch. 4Nonlinear and Mixed-Integer Enterprise Optimization
  5. Ch. 5Dynamic Enterprise Optimization
  6. Ch. 6Optimal Control of Enterprise Systems
  7. Ch. 7Dynamic Programming for Enterprise Systems
  8. Ch. 8Hamilton–Jacobi–Bellman Enterprise Framework
  9. Ch. 9Stochastic Enterprise Optimization
  10. Ch. 10Neuro-Fuzzy Robust Enterprise Optimization
  11. Ch. 11Distributionally Robust Enterprise Optimization
  12. Ch. 12Multi-Objective Enterprise Optimization
  13. Ch. 13Machine Learning for Enterprise Transformation
  14. Ch. 14Artificial Intelligence for Enterprise Optimization
  15. Ch. 15Enterprise Digital Twins and Autonomous Enterprise Transformation
  16. Ch. 16Enterprise Applications and Integrated Transformation Case Studies