Production Planning, MRP & Scheduling
From monthly plans to minute-by-minute sequences. Learn the planning hierarchy (S&OP, aggregate planning, MPS, MRP, shop-floor scheduling), aggregate strategies (chase, level, mixed), MRP logic (BOM explosion, netting, lead-time offsetting, lot sizing), capacity planning (RCCP, CRP), single-machine sequencing rules (FCFS, SPT, EDD, CR), Johnson's rule for two machines, Gantt charts and finite scheduling — with Python comparing dispatching rules and applying Johnson's rule.
Planning decides what and how much to make and when resources are needed; scheduling decides the exact order and timing of jobs on machines and people. Good plans meet demand with minimal inventory, overtime and late orders.
Enterprise resource planning (ERP) systems automate much of this, but engineers must understand the logic to set parameters, interpret results and fix the plan when reality differs.
An analogy
Planning is deciding the menu and shopping list for a week of dinners (how much of each ingredient, when to buy); scheduling is deciding the order you cook tonight's dishes so everything is ready on time using limited burners.
The planning hierarchy
Strategic capacity (years) → sales & operations planning / aggregate plan (months, product families) → master production schedule (weeks, end items) → MRP (components, purchase and work orders) → shop-floor scheduling and dispatching (hours). Each level constrains the next; feedback flows upward when capacity or materials fall short.
Aggregate planning and MRP
Key ideas:
- Chase strategy — vary workforce/output with demand; level — constant output, inventory absorbs swings; mixed in between
- MRP inputs — MPS, BOM (product structure), inventory records, lead times
- MRP logic — explode requirements level by level, net against inventory, offset by lead time, apply lot sizing (lot-for-lot, EOQ, POQ)
- Capacity checks — rough-cut (RCCP) at MPS level, detailed (CRP) at MRP level
- MRP II / ERP integrate finance, sales and HR; APS adds finite-capacity optimisation
Sequencing rules
For n jobs on one machine: FCFS (fair, poor performance), SPT (minimises mean flow and WIP, may starve long jobs), EDD (minimises maximum lateness), Moore–Hodgson (minimises number of late jobs), critical ratio (dynamic priority). Johnson's rule solves the two-machine flow shop optimally; larger job shops are NP-hard and use heuristics, dispatching rules or optimisation solvers.
Finite scheduling and modern tools
Gantt charts visualise schedules; finite-capacity scheduling respects machine, labour and tooling limits, setups (sequence-dependent), and maintenance. Methods: mixed-integer programming, constraint programming (e.g. OR-Tools CP-SAT), metaheuristics (genetic algorithms, simulated annealing, tabu search), and rolling-horizon rescheduling. Pull systems (kanban, CONWIP) cap WIP and reduce the need for detailed schedules.
Formulas
- MRP netting:
Net = GR − SR − POH(prev) + safety stock (if > 0) - Lead-time offset:
Planned order release = net requirement shifted back by L - Flow time:
F_j = C_j − r_j; mean flow = ΣC_j/n (r = 0) - SPT optimality:
SPT minimises mean flow time on one machine - EDD optimality:
EDD minimises maximum lateness on one machine - Critical ratio:
CR = (due date − now) / remaining processing time
Worked example: MRP netting
Given: Gross requirement 500 in week 6, on hand 120, scheduled receipt 100 in week 5, lead time 2
Find: Planned order release.
- Net = 500 − 120 − 100 = 280
- Offset by 2 weeks
Answer: Release 280 in week 4 (lot-for-lot)
Worked example: SPT mean flow
Given: Jobs 2, 3, 6, 8, 9 (SPT order)
Find: Mean flow time.
- Completion 2, 5, 11, 19, 28 → sum 65
Answer: 13.0
Worked example: Critical ratio
Given: Due in 10 days, 12 days of work remaining
Find: CR.
- 10/12
Answer: 0.83 < 1 → behind schedule, high priority
Dispatching rules and Johnson's rule
# Single machine sequencing rules and Johnson's rule for two machines
jobs = {"A": (6, 8), "B": (2, 6), "C": (8, 18), "D": (3, 15), "E": (9, 23)} # (processing time, due date)
def evaluate(order):
t = 0; flow = 0; tard = 0; late = 0
for j in order:
p, d = jobs[j]
t += p; flow += t
tard += max(0, t - d); late += t > d
return flow / len(order), tard / len(order), late
for rule, key in (("FCFS", None), ("SPT", lambda j: jobs[j][0]), ("EDD", lambda j: jobs[j][1])):
order = list(jobs) if key is None else sorted(jobs, key=key)
f, tt, n = evaluate(order)
print(f"{rule:4s} {''.join(order)}: mean flow {f:.1f}, mean tardiness {tt:.1f}, late jobs {n}")
# Johnson's rule: jobs on machine 1 then machine 2
two = {"J1": (5, 2), "J2": (1, 6), "J3": (9, 7), "J4": (3, 8), "J5": (10, 4)}
front = sorted([j for j, (a, b) in two.items() if a < b], key=lambda j: two[j][0])
back = sorted([j for j, (a, b) in two.items() if a >= b], key=lambda j: two[j][1], reverse=True)
seq = front + back
t1 = t2 = 0
for j in seq:
t1 += two[j][0]
t2 = max(t2, t1) + two[j][1]
print(f"Johnson sequence {' '.join(seq)}: makespan {t2}")
# FCFS ABCDE: mean flow 15.4, mean tardiness 2.2, late jobs 3
# SPT BDACE: mean flow 13.0, mean tardiness 1.8, late jobs 3
# EDD BADCE: mean flow 13.6, mean tardiness 1.2, late jobs 2
# Johnson sequence J2 J4 J3 J5 J1: makespan 30No rule wins every metric: SPT gives the lowest mean flow time (less WIP), EDD the least tardiness. Johnson's rule gives the optimal makespan for two-machine flow shops: short machine-1 jobs first so machine 2 starts early, short machine-2 jobs last so it finishes early.
Common mistakes
- Wrong: Running MRP with infinite capacity assumptions unchecked. — Right: Validate with RCCP/CRP and adjust the MPS.
- Wrong: Inaccurate BOMs and inventory records. — Right: MRP needs >95% data accuracy (cycle counting).
- Wrong: Always using FCFS. — Right: Choose rules that fit the objective (flow, due dates).
Applications
- Automotive: Sequenced supply of parts to mixed-model lines.
- Job shops: Machine shops scheduling orders with due dates.
- Process industries: Campaign planning with sequence-dependent setups.
- Services: Operating-room and staff rostering.
Key takeaways
- Hierarchy: S&OP → MPS → MRP → scheduling.
- MRP: explode, net, offset, lot-size.
- SPT for flow, EDD for lateness, Johnson for 2 machines.
- Check capacity; keep data accurate.
Going further
- Constraint programming: CP-SAT for job-shop scheduling.
- DDMRP: Demand-driven MRP with strategic buffers.
- APS systems: Finite-capacity advanced planning and scheduling.