3. Prescriptive Analytics

Linear Optimisation

Translate an allocation problem into variables, objectives, constraints and an auditable solution

Linear Optimisation

Formulation before solver

HarborMart assembles standard meal boxes xx and express boxes yy for one shift.

BoxContributionPicker-hoursChilled-unit capacity
standard xx£512
express yy£821

Available capacity is 40 picker-hours and 50 chilled units.

maxx,y  5x+8y\max_{x,y}\;5x+8y

subject to

x+2y40,2x+y50,x,y0.x+2y\le40,\qquad 2x+y\le50,\qquad x,y\ge0.

If boxes cannot be fractional, add x,yZx,y\in\mathbb Z.

Unit audit

  • objective: pounds per shift;
  • first left side: picker-hours per shift;
  • second left side: chilled units per shift;
  • right sides: capacity for the same shift.

Combining weekly contribution with daily capacity silently invalidates the model.

Py

Enumerate a small integer allocation

Idle

The optimum is x=20x=20, y=10y=10, with £180 contribution; both constraints bind.

Shadow price and range

For a continuous linear programme, a shadow price estimates the objective improvement from one more unit of a binding resource while the current basis remains valid. It is local:

  • it can change after enough capacity is added;
  • integer restrictions can create jumps;
  • the capacity itself may have an acquisition cost;
  • uncertainty can make nominally optimal use brittle.

Do not call every binding constraint a bottleneck without checking its marginal value.

Common formulation failures

FailureRepair
profit coefficient includes avoidable cost inconsistentlyreconcile contribution definition
demand limit omittedadd upper bounds or unmet-demand variables
quality/people constraints left in prosemodel them or state why they remain a review gate
average capacity hides time windowsindex resources by period/location
uncertain demand entered as certainuse scenarios, safety margins or stochastic/robust model
infeasible solver result blamed on softwarefind conflicting constraints and business assumptions

Validate the prescription

  1. reproduce objective and resource use by hand;
  2. compare with current and simple heuristic policies;
  3. vary coefficients and capacity over plausible ranges;
  4. test integer, timing and operational details;
  5. assign an owner for exceptions and re-optimisation.

Quick check

The solver recommends 20.4 standard boxes. Can HarborMart round to 20 without further work?

Answer
Check all constraints and objective after rounding. In larger models, independent rounding can violate linked constraints or lose substantial value; solve the integer model or use a validated rounding procedure.

Next: Inventory and Allocation

Copyright © 2026