Build a reviewable staffing plan that ties evidence to decisions, rejects infeasible schedules and reports scenario exposure.
Project: allocate support reviews under capacity and uncertainty
Freeze the decision inputs
Create 47 eligible ordinary cases and 23 partner cases. For each queue, record the number available, analyst-hours per completed review and estimated prevented escalations. Include an audit sample and uncertainty notes for those estimates. State the review day, staffing cutoff and which cases can actually be assigned. The decision contract defines one complete review as the action.
Write constraints as checks
Set a total analyst-hour budget, minimum coverage for each queue and an upper bound from eligible case counts. Include a fixture whose minimums exceed capacity and assert that the model reports infeasibility rather than returning a fake optimum. For a feasible allocation, report hours used and slack for every bound. Feasibility rules are reviewed before any benefit ranking.
Solve the small integer case
Enumerate feasible whole-review allocations for a small fixture and compare with a first-come baseline. Calculate the continuous relaxation only as an upper bound if its formulation covers the integer plans. For a larger fixture, use a solver and save its status, best bound, runtime limit and chosen incumbent. The integer lesson explains the difference between a valid plan and a proof of optimality.
Stress the released plan
Evaluate each plan under ordinary and partner-surge benefit estimates, then under a longer review-duration scenario. Publish the selected risk rule, worst-case benefit and any capacity breach. A plan that ranks first on expected benefit but violates the stressed duration limit needs either a buffer or an explicit operational contingency. Scenario analysis should be reproducible from a saved matrix.
Deliver an audit packet
Save input snapshot, estimate provenance, units, constraints, feasible-plan table, selected plan, baseline, scenario matrix, code revision and a short decision note. Recompute the final plan’s objective and each constraint independently of the search routine. After the review day, compare actual hours and prevented escalations with the estimates; feed that error back into the next allocation.
Implementation
def audit_released_plan(ordinary_reviews, partner_reviews,
available_hours, ordinary_cases, partner_cases):
used_hours = 2 * ordinary_reviews + 3 * partner_reviews
feasible = (0 <= ordinary_reviews <= ordinary_cases and
0 <= partner_reviews <= partner_cases and
used_hours <= available_hours)
return {"feasible": feasible, "hours_used": used_hours,
"hour_slack": available_hours - used_hours}
assert audit_released_plan(4, 3, 19, 47, 23) == {
"feasible": True, "hours_used": 17, "hour_slack": 2}Performance and operating cost
Independent audit of one two-queue plan is O(1). Enumerating all bounded queue combinations is O(AB) for A and B candidate counts; scenario scoring multiplies by the number of scenarios. Reviewer time goes into estimating benefits and validating the constraints, not into the final arithmetic.
Common Mistakes
- Do not accept a plan whose minimum coverage and capacity cannot both be met.
- Do not report a fractional allocation as a shift schedule.
- Do not omit actual-outcome follow-up after choosing a model-based plan.
Read next
- Decision objectives: define the action before optimizing a score
- Constraint feasibility and slack: reject impossible plans early
- Integer allocation and relaxation gaps for indivisible work
- Scenario stress tests and regret for uncertain allocation benefits
Continue the workflow: Project: simulate warehouse capacity under shared shocks.
