DEV Community

Seyed Alireza Alhosseini
Seyed Alireza Alhosseini

Posted on

I Simulated Whether Cutting Supply Chains Can Stop a War. The Math Says: Sometimes. Here's Exactly When."

Every engineer knows this feeling: you find the single point of failure in someone else's system and think, "If I just cut that one dependency, the whole thing stops."

Now scale that thought up to a military. Fuel. Refinery catalysts. Gallium. Neodymium magnets. Chips. Cut the chokepoints, and the war machine stalls, right?

That's the pitch behind a lot of sanctions and export-control thinking, and increasingly behind "let AI optimize it" proposals. So I did what developers do when someone makes a confident claim about a system: I built a simulator.

The result is less satisfying than the pitch, and more useful.

TL;DR Interdiction works only in a specific region of parameter space. Whether you're in that region depends more on how substitutable the input is than on how hard you squeeze. And every layer of oversight you add to the enforcer shrinks the time window in which squeezing works.


The model in one picture

Two clocks are racing:

  1. Clock A: stockpile depletion. The target has reserves s0. You cut their supply by a fraction phi. How long until the reserves run dry?
  2. Clock B: supply reconstitution. After a delay tau, they start rerouting through third countries, grey markets, domestic substitutes. Supply from bypasses ramps up toward bmax.

If Clock A finishes first, the system stalls. If Clock B finishes first, you've just paid sanctions costs for nothing.

Think of it as an incident-response race: your outage (their shortage) versus their failover (the bypass). Sound familiar?


The part most people get wrong: substitution

How much a missing input hurts depends on the production function. I used a two-input CES (constant elasticity of substitution) model: one critical input you're cutting, one complementary input that can ramp up.

  • sigma → 0 means nothing substitutes (think: a hard dependency, no fallback).
  • sigma → ∞ means the other input fully covers for the missing one (think: a library with a drop-in replacement).

The math gives a critical supply fraction f*: if the target's supply of the critical input falls below f*, their capacity halves. For sigma > 1 it even yields a no-halt region, a regime where no amount of cutting works because the complement is enough.

Here's the whole simulator. It's short on purpose, and I validated it against the closed-form T = s / delta before trusting anything it printed:

import numpy as np
rng = np.random.default_rng(11)

def capacity(f, sigma, alpha=0.5, xi=1.5):
    """CES war capacity given supply fraction f of the critical input."""
    if abs(sigma - 1) < 1e-9:
        return f**alpha * xi**(1 - alpha)
    rho = (sigma - 1) / sigma
    return (alpha * np.maximum(f, 1e-12)**rho + (1 - alpha) * xi**rho) ** (1 / rho)

def f_star(sigma, thr=0.5):
    """Supply fraction below which capacity < thr (bisection)."""
    lo, hi = 1e-9, 1.0
    if capacity(lo, sigma) >= thr:
        return 0.0                     # no-halt region
    for _ in range(80):
        mid = (lo + hi) / 2
        lo, hi = (mid, hi) if capacity(mid, sigma) < thr else (lo, mid)
    return hi

def race(phi, s0, q, tau, theta, bmax, fs, T=600, d=1.0):
    """Stockpile depletion vs. supply reconstitution. Returns halt day or inf."""
    s = s0
    for t in range(T):
        b = 0 if t < tau else bmax * (1 - np.exp(-(t - tau) / theta))
        supply = (1 - phi) * q + b
        use = min(max(s, 0), max(0, d - supply))
        s -= use
        if min(d, supply + use) / d < fs:
            return t
    return np.inf

for sigma in [0.05, 0.2, 0.5, 1, 2, 5]:
    fs, halts = f_star(sigma), []
    for _ in range(6000):
        halts.append(race(
            phi=rng.uniform(0.6, 0.95), s0=rng.lognormal(np.log(60), 0.5),
            q=rng.uniform(1.0, 1.5), tau=int(rng.lognormal(np.log(90), 0.6)),
            theta=rng.uniform(20, 120), bmax=rng.uniform(0.2, 1.0), fs=fs))
    print(f"sigma={sigma:<5} f*={fs:.3f}  P(halt)={np.mean(np.isfinite(halts)):.0%}")
Enter fullscreen mode Exit fullscreen mode

What the simulation says

Monte Carlo, 6,000 runs per row, same interdiction strength for everyone:

σ (substitutability) critical supply fraction f* P(halt)
0.05 (hard dependency) 0.48 66%
0.2 0.42 59%
0.5 0.30 40%
1 0.17 16%
2 0.04 0%
5 (drop-in replacement) 0.00 0%

Same squeeze. Wildly different outcome. A rank-correlation sensitivity check backs it up: interdiction strength (phi) matters most among the controllable knobs, but the regime (σ) decides whether those knobs matter at all.

With these assumptions, the no-halt threshold lands at σ ≈ 2.71. Above it, the "chokepoint" is a mirage.

This is the old economic-warfare lesson (Olson, Harrison) turned into a boundary condition you can compute instead of a vibe you can argue about.


The twist: your governance process is part of the attack surface

This is the part that surprised me, and the one I think developers will recognize immediately.

Suppose an enforcement system needs approvals: multiple sign-offs, audits, public notice. That's governance latency. Good engineering instinct says: add review, add transparency, add kill switches.

But the target watches too. If they learn about an interdiction a days before it activates, they start building bypasses early, so the effective rebuild delay shrinks:

tau_effective = tau - a
race-halt requires:   T0 < tau - a
Enter fullscreen mode Exit fullscreen mode

Every approval step you add eats into the window.

It's the production-incident dilemma in disguise: the safer the change process, the slower the response. There's no free lunch. The honest design response isn't "skip oversight"; it's pre-authorizing narrow, well-defined classes of actions so the latency is short and the mandate is bounded.


What this does NOT show (read this before you quote me)

I'd rather be roasted for caution than for hype, so here's the damage report:

  • Every number above uses illustrative priors, not data. The shape of the result follows from the structure of the model. The magnitudes mean nothing until σ and τ are calibrated.
  • It's single-input. Real supply is a network; chokepoints interact.
  • No strategic behavior. In reality, a target that sees a clock ticking may strike early instead of sitting still (the 1941 oil embargo on Japan is the cautionary tale). A real design needs an off-ramp.
  • War has causes beyond supply. Bargaining failures, commitment problems, and indivisible stakes aren't fixed by any supply-chain model (see Fearon 1995).
  • Collateral damage is a hard constraint, not a cost term. If you can't separate military from civilian flows precisely enough, the intervention is simply off the table.
  • Legitimacy is unsolved. Who gets to run a system that can cut off fuel for a country? That's not an engineering question, and I'm not claiming to have answered it.
  • My literature search was a quick pass, not a systematic review. "Novel" is a claim to be tested, not a trophy.

Why a developer might care

  1. Sensitivity analysis beats storytelling. The most important parameter wasn't the one everyone argues about.
  2. Validate your simulator against a closed form. Mine matched T = s / delta (76.9 vs 76 days) before I trusted a single Monte Carlo row.
  3. Failure-mode thinking transfers. Hard dependencies, fallbacks, failover delays, and approval latency are the same concepts in infrastructure, security, and geopolitics.
  4. Governance is a system component. If you build automation that can take drastic action, oversight design belongs in the model, not in the appendix.

Try it, break it

Paste the script, change the priors, and tell me where the model is wrong. The most valuable feedback would be:

  • Real estimates of σ for military-relevant inputs (I couldn't find good open ones).
  • Empirical τ: how many months until rerouted flows hit half their former level after export controls?
  • A better model of preemption incentives.

Full paper draft (PDF, with the closed-form results) is available if people want it. Drop a comment and I'll link it.

*I'm Alireza Alhosseini Almodarresieh Find me on https://almodarresieh.github.io/

Top comments (0)