Vol. II, Ch. 1seed 26201
DCT Laboratory — Volume II, Chapter 1
Introduction to Enterprise Optimization
Seed 26201 · Companion to the chapter and AXIOM Module AXIOM-01 (Vol. II)
Volume II's laboratory line opens where Volume I's closed: with choosing.
Three instruments: a closed-form allocation (marginal values equalized at
the optimum), feasibility as conjunction (a 36-point grid under three
simultaneous constraints), and the proposition that optimal decisions depend
on objectives — same feasible set, two different argmaxes.
Mirrored in DCT_V2_Ch01_Lab.xlsx.
import numpy as np
import matplotlib.pyplot as plt
plt.rcParams['figure.dpi']=110
import numpy as np
SEED = 26201
# --- closed-form allocation: max 3*sqrt(x) + 4*sqrt(B-x), B=100 ---
A1, A2, B = 3.0, 4.0, 100.0
def f_alloc(x): return A1*np.sqrt(x) + A2*np.sqrt(B-x)
X_STAR = B*A1**2/(A1**2+A2**2) # 36
# --- feasibility as conjunction: integer grid under three constraints ---
def grid_points():
return [(x1,x2) for x1 in range(6) for x2 in range(6)]
def feasible(p):
x1,x2 = p
return (x1+x2 <= 6) and (2*x1+x2 <= 8) and (x2 <= 4)
# --- objectives choose optima ---
def fA(p): return 3*p[0]+2*p[1]
def fB(p): return 4*p[0]+p[1]
def reference_values():
feas = [p for p in grid_points() if feasible(p)]
argA = max(feas, key=fA); argB = max(feas, key=fB)
mval = (A1/(2*np.sqrt(X_STAR)))/(A2/(2*np.sqrt(B-X_STAR)))
return {
"x_star": round(float(X_STAR),4),
"f_star": round(float(f_alloc(X_STAR)),4),
"marginal_ratio": round(float(mval),4),
"n_grid": len(grid_points()),
"n_feasible": len(feas),
"fA_max": fA(argA), "fB_max": fB(argB),
"argA_x1": argA[0], "argA_x2": argA[1],
"argB_x1": argB[0], "argB_x2": argB[1],
}
if __name__ == "__main__":
[print(f"{k:16s} {v}") for k,v in reference_values().items()]x_star 36.0 f_star 50.0 marginal_ratio 1.0 n_grid 36 n_feasible 19 fA_max 14 fB_max 16 argA_x1 2 argA_x2 4 argB_x1 4 argB_x2 0
Panel 1 — The anatomy, in closed form
Allocate a budget of 100 across two channels with square-root response: . The first-order condition equalizes marginal values, giving and — every piece of the Anatomy of an Optimization Problem (Prop.) visible: decision, objective, constraint, optimum, and the optimality certificate (marginal ratio 1.0000).
xs = np.linspace(0.5, 99.5, 300)
fig, ax = plt.subplots(figsize=(8.0,4.2))
ax.plot(xs, f_alloc(xs), c="#C8A24B", lw=2.5)
ax.scatter([X_STAR],[f_alloc(X_STAR)], c="#0B3D2E", s=90, zorder=5, label=f"x* = {X_STAR:.0f}, f* = {f_alloc(X_STAR):.0f}")
ax.set(xlabel="x (channel 1 budget)", ylabel="f(x)", title="3√x + 4√(100−x) — seed 26201")
ax.legend(frameon=False); ax.grid(alpha=.25); plt.tight_layout(); plt.show()
m1 = A1/(2*np.sqrt(X_STAR)); m2 = A2/(2*np.sqrt(B-X_STAR))
print(f"marginal values at x*: {m1:.6f} vs {m2:.6f} ratio {m1/m2:.4f}")
marginal values at x*: 0.250000 vs 0.250000 ratio 1.0000
Panel 2 — Feasibility is conjunction
36 candidate decisions ; three constraints (, , ). Feasibility is Conjunction (Prop.): a point survives only if it satisfies ALL three — 19 of 36 do. The feasible region is the intersection, and the intersection is smaller than any of its parts.
pts = grid_points(); feas = [p for p in pts if feasible(p)]
fig, ax = plt.subplots(figsize=(6.2,5.0))
inf = [p for p in pts if not feasible(p)]
ax.scatter(*zip(*inf), c="#C9CCC9", s=70, label="infeasible")
ax.scatter(*zip(*feas), c="#0B3D2E", s=90, label="feasible (19)")
xs = np.linspace(-0.3,5.3,50)
ax.plot(xs, 6-xs, c="#C8A24B", lw=1.5); ax.plot(xs, 8-2*xs, c="#C8A24B", lw=1.5); ax.axhline(4, c="#C8A24B", lw=1.5)
ax.set(xlim=(-0.4,5.4), ylim=(-0.4,5.6), xlabel="x1", ylabel="x2", title="Three constraints, one intersection")
ax.legend(frameon=False, fontsize=9); ax.grid(alpha=.2); plt.tight_layout(); plt.show()
print(f"grid {len(pts)} feasible {len(feas)}")
grid 36 feasible 19
Panel 3 — Optimal decisions depend on objectives
Same 19 feasible points, two objectives. crowns at 14; crowns at 16. Optimal Decisions Depend on Objectives (Prop.): the feasible region proposes, the objective disposes — and publishing the objective is what makes 'the optimal decision' a checkable claim (Volume I, Ch. 11's honesty campaign, arriving at decisions).
feas = [p for p in grid_points() if feasible(p)]
argA = max(feas, key=fA); argB = max(feas, key=fB)
print(f"objective A = 3x1+2x2 → argmax {argA}, value {fA(argA)}")
print(f"objective B = 4x1+x2 → argmax {argB}, value {fB(argB)}")
print("distinct optima:", argA != argB)objective A = 3x1+2x2 → argmax (2, 4), value 14 objective B = 4x1+x2 → argmax (4, 0), value 16 distinct optima: True
Validation — agrees with DCT_V2_Ch01_Lab.xlsx
ref = reference_values()
expected = {"x_star":36.0,"f_star":50.0,"marginal_ratio":1.0,"n_grid":36,"n_feasible":19,
"fA_max":14,"fB_max":16,"argA_x1":2,"argA_x2":4,"argB_x1":4,"argB_x2":0}
for k,v in expected.items():
assert abs(ref[k]-v)<5e-4, f"MISMATCH {k}"
print(f"PASS {k:16s} {ref[k]}")
print("\nAll checkpoints agree — seed 26201. Volume II's line is open.")PASS x_star 36.0 PASS f_star 50.0 PASS marginal_ratio 1.0 PASS n_grid 36 PASS n_feasible 19 PASS fA_max 14 PASS fB_max 16 PASS argA_x1 2 PASS argA_x2 4 PASS argB_x1 4 PASS argB_x2 0 All checkpoints agree — seed 26201. Volume II's line is open.
Next: Exercises 1.5–1.8 (Part C) reshape the constraints and re-count; AXIOM-01's anatomy bench labels every piece of the problem live. Solutions: IM Vol. II, Ch. 1.

