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 and express boxes for one shift.
| Box | Contribution | Picker-hours | Chilled-unit capacity |
|---|---|---|---|
| standard | £5 | 1 | 2 |
| express | £8 | 2 | 1 |
Available capacity is 40 picker-hours and 50 chilled units.
subject to
If boxes cannot be fractional, add .
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
The optimum is , , 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
| Failure | Repair |
|---|---|
| profit coefficient includes avoidable cost inconsistently | reconcile contribution definition |
| demand limit omitted | add upper bounds or unmet-demand variables |
| quality/people constraints left in prose | model them or state why they remain a review gate |
| average capacity hides time windows | index resources by period/location |
| uncertain demand entered as certain | use scenarios, safety margins or stochastic/robust model |
| infeasible solver result blamed on software | find conflicting constraints and business assumptions |
Validate the prescription
- reproduce objective and resource use by hand;
- compare with current and simple heuristic policies;
- vary coefficients and capacity over plausible ranges;
- test integer, timing and operational details;
- 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.