What does Routing Periodic Quotas conclude, in numbers, about “Shadow Prices and the Reset Countdown: How the Marginal Value of Quota Falls with Time”?

Answer: Strong duality holds exactly on the problem of Chapter 1, and the shadow price of 9/40 for H is valid only between 400 and 900 units; with less quota it rises to 0.4375 and with more it falls to 0.0500. Tasks arriving online turn the plan into a dynamic programme: the nearer the reset and the larger the balance, the less one H unit is worth, down to nothing with ten or so tasks to come; with a tight balance it stays dear. Countdown re-solving approaches the optimum but needs a margin against fluctuation. The next chapter turns from time to the tasks themselves: complexity has to be judged, judgements err, and how much of the benefit of routing survives the errors?

Scope of the numbers: Under illustrative parameters the linear programme gains 0.1668 to 0.2217 over arrival order, but only 0.41 % to 5.05 % over a fixed rule that sorts by complexity; most of the gain comes from sorting itself. Parameters are illustrative and contain no vendor's prices or quotas; all calculations are generated by the book's programs.

中文版

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.0500, 0.4375, 40, 400, 900

primal optimum 893, dual b.y 893, equal: True
duals: H 9/40F 0demand rows 19/20 8/5 9/4 49/10
H quotaoptimumy_Hmarginal class on H
0690.000.4375-
100733.750.4375critical
200777.500.4375critical
300821.250.4375critical
400848.000.2250complex
500870.500.2250complex
600893.000.2250complex
700915.500.2250complex
800938.000.2250complex
900960.500.2250complex
1000969.000.0500standard
1100974.000.0500standard
1200979.000.0500standard
1300984.000.0500standard
1400989.000.0500standard
Show the full program
# Chapter 3. p31: the shadow price of quota, and how it steps down.
# Model: the routing programme of p21 (two tiers, four classes). The
# dual value y_H of the H quota row is the extra expected output from
# one more H unit; strong duality says b.y equals the primal optimum,
# checked here in exact Fractions. Then the H quota is scanned from 0
# to 1,400 units: the optimum is concave and piecewise linear, and its
# slope is y_H. All parameters are illustrative units.
from fractions import Fraction as Fr

def simplex(c, A, b, rule="bland", cap=500):
    m, n = len(A), len(c)
    T = [[Fr(v) for v in A[i]] + [Fr(int(i == j)) for j in range(m)]
         + [Fr(b[i])] for i in range(m)]
    z = [-Fr(v) for v in c] + [Fr(0)] * (m + 1)
    basis = [n + i for i in range(m)]
    steps = 0
    while steps < cap:
        cols = [j for j in range(n + m) if z[j] < 0]
        if not cols:
            break
        if rule == "bland":
            e = cols[0]
        else:
            e = min(cols, key=lambda j: (z[j], j))
        rows = [i for i in range(m) if T[i][e] > 0]
        if not rows:
            return None
        r = min(rows, key=lambda i: (T[i][-1] / T[i][e], basis[i]))
        p = T[r][e]
        T[r] = [v / p for v in T[r]]
        for i in range(m):
            if i != r and T[i][e] != 0:
                f = T[i][e]
                T[i] = [a - f * w for a, w in zip(T[i], T[r])]
        f = z[e]
        z = [a - f * w for a, w in zip(z, T[r])]
        basis[r] = e
        steps += 1
    x = [Fr(0)] * (n + m)
    for i, j in enumerate(basis):
        x[j] = T[i][-1]
    return x[:n], z[-1], z[n:n + m], steps


VALUE = (1, 2, 5, 10)
COST = {"H": (4, 6, 10, 16), "F": (1, 2, 3, 4)}
SUCC = {"H": ("0.97", "0.95", "0.90", "0.85"),
        "F": ("0.95", "0.80", "0.45", "0.15")}
DEMAND = (300, 150, 60, 20)


def solve(qh, qf):
    c = [VALUE[k] * Fr(SUCC[t][k]) for t in "HF" for k in range(4)]
    A = [[COST["H"][k] if t == "H" else 0 for t in "HF" for k in range(4)],
         [COST["F"][k] if t == "F" else 0 for t in "HF" for k in range(4)]]
    b = [qh, qf]
    for k in range(4):
        A.append([1 if j == k else 0 for t in "HF" for j in range(4)])
        b.append(DEMAND[k])
    return simplex(c, A, b), b


(x, val, y, _), b = solve(600, 900)
dual = Fr(0)
for bi, yi in zip(b, y):
    dual += bi * yi
print("primal optimum %s, dual b.y %s, equal: %s" % (val, dual,
                                                    val == dual))
print("duals: H %s  F %s  demand rows %s" % (
    y[0], y[1], " ".join(str(v) for v in y[2:])))
print("H quota  optimum   y_H     marginal class on H")
names = ("routine", "standard", "complex", "critical")
prev = None
for qh in range(0, 1401, 100):
    (x, val, y, _), _b = solve(qh, 900)
    marg = "-"
    for k in range(4):
        if 0 < x[k] < DEMAND[k]:
            marg = names[k]
    print("%7d  %7.2f  %6.4f  %s" % (qh, float(val), float(y[0]), marg))

Single source and citation

Fan, Y. (2026). Peak-Shaving Periodic Quotas and Cross-Model Routing: Linear Programming against Reset Countdowns to Split Work between Heavy-Reasoning and Fast Models (Version 1.0.0), Chapter 3: Shadow Prices and the Reset Countdown: How the Marginal Value of Quota Falls with Time. 5D Library. DOI pending

DOI pending · monograph page goes live after publication · 5DL-B-270 · v1.0.0 · CC-BY-NC-ND-4.0

BibTeX
@book{fan2026270,
  author    = {Fan, Yafu},
  title     = {Peak-Shaving Periodic Quotas and Cross-Model Routing: Linear Programming against Reset Countdowns to Split Work between Heavy-Reasoning and Fast Models},
  year      = {2026},
  publisher = {5D Library},
  edition   = {1.0.0},
  note      = {DOI pending}
}

Other chapter answers in this book