Lawfare Academy

Business Analytics: Optimization and Simulation · Chapter 8 of 8

Integrate robust feasibility, information timing and independent policy testing

Return to the linked course unit →

DEVELOPED COURSE TEXT

Integrate robust feasibility, information timing and independent policy testing

Compare policies on the same feasible decision architecture

Helix's factory A demand limit is now uncertain:it is 20 in a low-access state and 30 in a high-access state, each with probability.5. All original resource capacities and B bound remain unchanged. The company must select accepted quantities before learning access and must never promise more A than the state permits. Under this hard all-state feasibility requirement, a fixed plan must satisfyx≤20. This is a robust constraint over the stated two-state uncertainty set, not an expected-demand replacement.
The robust optimum isx 20, y 30, contribution 1700. Machine use 80 binds, labor 70 is slack. The nominal original planx 30, y 25 is infeasible in the low-access state. It is incorrect to replace the A bound by its average 25 and call the resulting plan feasible in every state. A chance-constrained or recourse model could permit different risks or later adjustments, but those are different decision architectures requiring explicit violation or adjustment consequences.

Value observation before commitment

Suppose a perfect access report arrives before quantities are accepted. Helix can then choose(20,30)in the low state and(30,25)in the high state. Expected contribution is.5×1700+.5×1950=1825. Relative to the best fixed robust plan 1700, the gross value of this timely information in the stated policy class is 125. A report costing 80 yields expected net 1745, an improvement 45. A report arriving after quantities are irrevocably accepted cannot implement that contingent policy.
The comparison holds the hard feasibility requirement, resource use and contribution coefficients fixed. It does not value information over every possible contract or adjustment option. If rejected orders can be revised at a cost, model that recourse explicitly. Nonanticipativity means that decisions made before a report must be identical across states with the same information history; allowing them to differ secretly gives the model perfect foresight and overstates value.

Keep optimization and evaluation samples separate

For the seasonal-kit decision, the training simulation selectedq 100 and the independent test mean was about 304.896, close to exact 304. This validation checks numerical implementation and policy evaluation under a known distribution. For the factory LP, the matching primal/dual value 1950 checks deterministic optimality. These are complementary tests:the LP certificate does not validate demand inputs, and the simulation interval does not prove a noisy optimizer found the global optimum.
A complete analytics packet should contain the formulation ledger, raw parameter record, feasible plan, solver status, bound or certificate, scenario policy, simulation stream definitions and independent evaluation. Include an executable reproduction of the original benchmarks. If a recommendation combines factory and kit decisions, identify any shared cash, storage or labor constraint before adding their profits. The present examples are separate Helix decisions; their objectives must not be aggregated into an enterprise optimum without a joint resource model.

Write a recommendation with an explicit reversal trigger

Recommend the fixed robust factory plan when access is unknown and hard all-state feasibility is required. Buy the timely perfect report only if its total cost and implementation delay remain below the 125 gross value in this policy class. For kits, recommendq 100 under the original costs/distribution and retain an independent evaluation record. A changed salvage value, shortage penalty or access-report timing requires reopening the relevant derivation rather than preserving the action because the previous report was approved.
The analytics report should also state what remains outside its model:actual data quality, contract authority, unmodeled consequences and independent subject review. Internal editorial completion is not proof of learner competence or real-world optimality. The advanced standard is a transparent chain from decision timing and feasible choices through mathematical solution and numerical verification to a recommendation whose assumptions and failure conditions can be inspected. Complexity serves that chain; it is not a substitute for it.

Reproduce the numerical benchmark packet

Save this as mba681-analysis.py and run with NumPy and SciPy. It independently solves the LP,enumerates the integer case,checks exact discrete expectations and evaluates a training-selected inventory policy on an independent stream. The output is saved as mba681-outputs.json.

import json,numpy as np
from pathlib import Path
from scipy.optimize import linprog
O=Path(__file__).parent
A=np.array([[2.,1.],[1.,2.],[1.,0.],[0.,1.]]);b=np.array([100.,80.,30.,40.]);c=np.array([40.,30.])
r=linprog(-c,A_ub=A,b_ub=b,bounds=[(0,None)]*2,method='highs');assert r.success
integer=max(((40*x+30*y,x,y) for x in range(31) for y in range(41) if 2*x+y<=100 and x+2*y<=81))
values=np.array([60,100,140]);probs=np.array([.3,.4,.3])
def profit(q,d):return 10*np.minimum(q,d)+2*np.maximum(q-d,0)-6*q
exact={str(q):dict(outcomes=profit(q,values).tolist(),mean=float(profit(q,values)@probs)) for q in [80,100,120]}
train=np.random.default_rng(68101).choice(values,size=1000,p=probs);test=np.random.default_rng(68102).choice(values,size=5000,p=probs)
qbest=max(range(161),key=lambda q:float(profit(q,train).mean()))
paired=profit(100,test)-profit(80,test)
out=dict(lp=dict(x=r.x.tolist(),objective=float(c@r.x),slack=(b-A@r.x).tolist(),shadow=(-r.ineqlin.marginals).tolist()),integerMachine81=dict(objective=integer[0],x=integer[1],y=integer[2]),exact=exact,trainingSelectedQ=qbest,test=dict(n=len(test),policyMean=float(profit(qbest,test).mean()),policySE=float(profit(qbest,test).std(ddof=1)/np.sqrt(len(test))),pairedDifference=float(paired.mean()),pairedSE=float(paired.std(ddof=1)/np.sqrt(len(test)))),seeds=dict(training=68101,test=68102),perfectInformationProfit=float((4*values)@probs))
assert np.allclose(r.x,[30,25]) and np.isclose(c@r.x,1950)
(O/'mba681-outputs.json').write_text(json.dumps(out,indent=2));print(json.dumps(out,indent=2))

Worked records

Record 1

Factory A upper bound 20 or 30 with equal probability. Quantities chosen before state, hard feasibility in every state. Perfect report can arrive before choice at cost 80. Kit simulation remains a separate decision without shared-resource coupling.

Develop the reasoning

Fixed robust factory plan(20,30)earns 1700. Timely observed-state plans earn 1700/1950, expected 1825; net after report 80 is 1745. If the report arrives after commitment, the fixed robust choice remains necessary and the same report has zero action value in this policy class. The kit benchmark isq 100, exact mean 304 and independent-test mean 304.896.

Progressive practice — optional

1. Foundation

Why is an average A bound 25 not robustly feasible?

Compare the worked reasoning

The low state permits only 20; averaging constraints does not satisfy each state.

Change the record

Both possible bounds become 25 and 30.

Compare the changed-record reasoning

The fixed robust bound becomes 25. Machine binding givesy 27.5 in the divisible model and contribution 1825; For integer jobs, the optimum isx 25, y 27, value 1810, verified by enumeration; the fractional 1825 is only a relaxation bound.

2. Application

Calculate the perfect-report break-even cost.

Compare the worked reasoning

1825-1700=125.

Change the record

Report cost rises from 80 to 140.

Compare the changed-record reasoning

Net informed value 1685 is below robust 1700, so do not buy under the same timing and action set.

3. Transfer

Can scenario-specific decisions be chosen before observing which scenario occurs?

Compare the worked reasoning

No. Enforce nonanticipativity for decisions sharing the same information history.

Change the record

A report arrives before production but after an irrevocable accepted-order commitment.

Compare the changed-record reasoning

Production flexibility does not undo the order feasibility obligation. Unless the contract explicitly permits revision, the accepted quantities must still satisfy the robustx≤20 bound; the earlier 125 information value cannot be claimed.

Sources and scope