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:

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

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.

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.

Answer: 13.0

Worked example: Critical ratio

Given: Due in 10 days, 12 days of work remaining

Find: CR.

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 30

No 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

Applications

Key takeaways

Going further