What does Routing Periodic Quotas conclude, in numbers, about “A Daily Task Routing Table: the Empirical Loop, the Distilled Tool and a Pre-registered Test”?
Answer: Chapter 8 gives the daily task routing table, the Quota Routing LP Planner and a pre-registered switchback protocol. Marked boxes separate published evidence, runnable Python calculations (19 programs), classical sources and the author's hypotheses.
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 only
| critical guarded at 22 tasks (352 H units); plan 883.30 points | |
| class forecast to H to F gain/unit H price 0.2250 | |
| routine | 320 0.0 320.0 0.0050 |
| standard | 140 0.0 140.0 0.0500 |
| complex | 50 24.8 25.2 0.2250 |
| critical | 22 22.0 0.0 0.4375 |
| countdown price of one H unit | |
| cycle left pace x1.0 pace x1.3 pace x1.6 | |
| 0.50 | 0.2250 0.2250 0.0500 |
| 0.25 | 0.2250 0.2250 0.0500 |
| 0.10 | 0.2250 0.2250 0.0500 |
Show the full program
# Chapter 8. p81: tomorrow's task routing table, from forecast to rules.
# Model: forecast (320, 140, 50, 15) tasks for one cycle, quotas H 600
# and F 900 (illustrative). Step 1, guard: raise the critical forecast
# to forecast + 1.645 sqrt(forecast), rounded up (a one-sided 95
# percent Poisson-style margin). Step 2, plan: the p21 programme on the
# guarded forecast. Step 3, countdown: the fluid price of an
# H unit when a share of the cycle is left and the H balance is on
# pace, 30 percent ahead or 60 percent ahead of pace; a class may use
# H while its gain per unit is at least that price.
import math
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
NAMES = ("routine", "standard", "complex", "critical")
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")}
FC = (320, 140, 50, 15)
Q = {"H": 600, "F": 900}
GAIN = [VALUE[k] * (Fr(SUCC["H"][k]) - Fr(SUCC["F"][k]))
for k in range(4)]
guard = math.ceil(FC[3] + 1.645 * math.sqrt(FC[3]))
GF = (FC[0], FC[1], FC[2], guard)
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 = [Q["H"], Q["F"]]
for k in range(4):
A.append([1 if j == k else 0 for t in "HF" for j in range(4)])
b.append(GF[k])
x, val, y, _ = simplex(c, A, b)
print("critical guarded at %d tasks (%d H units); plan %.2f points" % (
guard, guard * COST["H"][3], float(val)))
print("class forecast to H to F gain/unit H price %.4f" %
float(y[0]))
for k in range(4):
print("%-9s %8d %5.1f %5.1f %9.4f" % (
NAMES[k], GF[k], float(x[k]), float(x[4 + k]),
float(GAIN[k] / COST["H"][k])))
def price(left_share, h_left):
order = sorted(range(4), key=lambda k: -GAIN[k] / COST["H"][k])
room = h_left
for k in order:
need = left_share * GF[k] * COST["H"][k]
if need >= room:
return GAIN[k] / COST["H"][k]
room -= need
return Fr(0)
print("countdown price of one H unit")
print("cycle left pace x1.0 pace x1.3 pace x1.6")
for left in (Fr(1, 2), Fr(1, 4), Fr(1, 10)):
cells = []
for ahead in (Fr(1), Fr(13, 10), Fr(16, 10)):
p = price(left, ahead * left * Q["H"])
cells.append("%9.4f" % float(p))
print("%10.2f " % float(left) + " ".join(cells))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 8: A Daily Task Routing Table: the Empirical Loop, the Distilled Tool and a Pre-registered Test. 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
- Chapter 1 · The Price of First Come, First Served: Exhaustion before the Reset and Waste at It
- Chapter 2 · A Standard-Library Simplex: Exact Fractions, Bland's Rule and the Worst Case
- Chapter 3 · Shadow Prices and the Reset Countdown: How the Marginal Value of Quota Falls with Time
- Chapter 4 · Routing across Models: Complexity Classes, Label Errors and Cascades
- Chapter 5 · Peak Shaving and Valley Filling: Deferral, Pulling Forward and a Backlog under Short Reset Windows
- Chapter 6 · Greedy against Linear Programming: Random Arrival, Prices Learned from a Sample, and Drift
- Chapter 7 · Eastern and Western Classics: Gathering and Releasing in the Guanzi, and Kantorovich's Resolving Multipliers