All posts

Johnson's Rule: Sequence Your Mix-and-Pack Runs to Shrink Total Makespan

Johnson's Rule for Two-Stage CPG Lines: Sequence Your Mix-and-Pack Runs to Shrink Total Makespan

Two numbers that don't add up

A scheduler lays out the day's wheel: five SKUs, run times at mixing, run times at packaging. She adds the packaging hours together, quotes a finish time to the plant manager, and misses it by two hours. Nobody ran slow. Nothing broke. The line did exactly what it was told.

The mistake was arithmetic of the wrong kind. On a line where every SKU flows mixing → filling/packaging, the time to finish the whole set is not the sum of the run times. It's the makespan — the wall-clock elapsed time from the first job starting to the last job finishing — and makespan is driven by overlap and idle gaps between the two stages, not by raw totals.

Here's the good news: there's a named, provable, roughly-15-minute rule that re-orders the same jobs so the whole set finishes sooner. No new equipment, no overtime, no faster run rates. Just a smarter sequence. It's called Johnson's rule, and for a true two-stage line it is mathematically optimal.

What makespan really is (and why it's the right scoreboard)

In operations research, makespan is the elapsed time from the start of the first operation to the completion of the last job across all the work you've scheduled (Makespan, Wikipedia). When you have n jobs that each must pass through two stations in order, makespan is the number your finish-time promise actually depends on.

Why isn't it just the sum of packaging times? Because the two stages run in parallel once the pipeline fills. Picture it:

  • At the start, packaging (stage 2) sits idle while it waits for the very first batch to clear mixing (stage 1). That's startup idle.
  • At the tail, mixing (stage 1) has finished everything, but packaging is still draining the last big job. That's shutdown idle.

Total finish time = useful overlap in the middle plus the idle at both ends. The sum of run times ignores the idle entirely. Johnson's rule works by deliberately shaping which jobs cause idle and when, so both ends shrink.

For the rest of this piece: Mixing / batching = Work Center 1. Filling / packaging = Work Center 2.

Where your line fits: the two-stage flow shop

Formally, a flow shop assigns n jobs to m serial machines, where each job's i-th operation runs on machine i, and every job visits the machines in the same fixed order (Flow-shop scheduling, Wikipedia). That's a precise description of a mix-and-pack line: batch first, then fill, always in that order.

A permutation flow shop adds one more condition — the job processing order is identical at every stage. SKUs leave mixing in some order and hit packaging in that same order. Again, that's exactly how a real CPG line runs: batches don't leapfrog each other between the kettle and the filler.

The reassuring part: most flow-shop problems are NP-hard as you add stages, meaning there's no fast exact method and you fall back on heuristics. But the two-stage case — written in the literature as F2|prmu|Cmax — is the easy, exactly-solvable exception. Johnson's rule finds the optimal makespan sequence in O(n log n) time: basically, sort a short list (Flow-shop scheduling, Wikipedia). Use it where it's airtight; escalate to a solver where it isn't.

The rule, step by step

Johnson's rule is named for Selmer M. Johnson. Its objective is to find the job sequence that minimizes makespan across two work centers, and in doing so it also reduces idle time between them (Johnson's Rule, Wikipedia). The algorithm is small enough to do by hand:

  1. List each job's processing time at both work centers.
  2. Find the shortest activity time among all remaining jobs, across both centers.
  3. Place the job:
    • If that shortest time is on Center 1 (mixing), schedule the job as early as possible (fill from the front).
    • If it's on Center 2 (packaging), schedule the job as late as possible (fill from the back).
  4. Eliminate that job from the list and repeat, working inward from both ends until the sequence is complete. Break ties arbitrarily.

The intuition is clean. A job that's quick in mixing should go up front — it fills the downstream pipeline fast so packaging stops starving. A job that's quick in packaging should go last — it drains the pipeline at the end with the least trailing idle. Short-at-front, short-at-back, big jobs in the comfortable middle.

A worked CPG example

Five SKUs, times in hours, one line, mixing then packaging:

SKU Mixing (C1) Packaging (C2)
A 2 6
B 8 2
C 1 4
D 4 7
E 6 5

Apply the rule:

  • Shortest time anywhere is C's mixing = 1 → Center 1 → place C first.
  • Next shortest remaining is B's packaging = 2 → Center 2 → place B last.
  • Next is A's mixing = 2 → Center 1 → place A as early as possible (second).
  • Next is D's mixing = 4 → Center 1 → place D next (third).
  • E is the only one left → fourth.

Sequence: C → A → D → E → B, run in that same order at both stages (Johnson's Rule, Wikipedia).

Now walk the clock for the Johnson sequence. Packaging can't start a SKU until that SKU clears mixing and packaging is free:

  • C: mix 0→1, pack 1→5
  • A: mix 1→3, pack 5→11
  • D: mix 3→7, pack 11→18
  • E: mix 7→13, pack 18→23
  • B: mix 13→21, pack 23→25

Makespan = 25 hours.

Compare a naive FIFO order (A → B → C → D → E):

  • A: mix 0→2, pack 2→8
  • B: mix 2→10, pack 10→12
  • C: mix 10→11, pack 12→16
  • D: mix 11→15, pack 16→23
  • E: mix 15→21, pack 23→28

Makespan = 28 hours.

Same five SKUs, same run rates, same equipment. The only thing that changed was the order — and the Johnson sequence finishes three hours sooner. Notice why: FIFO parks the big packaging job (B's 8-hour mix, A's 6-hour pack) badly, starving and stalling the downstream station. Johnson pushes the quick-to-mix SKU up front to prime packaging early and the quick-to-pack SKU to the tail to drain it clean.

Stretching to three stages (and when you can't)

Johnson's rule is provably optimal for two centers. It can also deliver the optimal makespan for three work centers, but only when an added condition holds: the minimum processing time at the first center (and/or the third) is greater than or equal to the maximum processing time at the middle center (Johnson's Rule, Wikipedia). When that's true, you collapse the three stages into two "virtual" centers — combining the middle step into each neighbor — and apply the standard rule.

The practical read for a CPG line: if your middle step is small relative to the stages around it — say a fast capper or checkweigher sandwiched between a slow mix and a slow case-pack — you can still get an optimal sequence. If the middle stage is a genuine bottleneck, the condition fails and you're into heuristic or solver territory.

The preconditions — and the CPG reality check

Johnson's rule earns its optimality by assuming a tidy world. The assumptions (Johnson's Rule, Wikipedia):

  • Each job's time is invariant to when it runs.
  • Job times are independent of sequence.
  • Every job passes through Center 1 before Center 2.
  • All jobs are equally prioritized.

Here's where real CPG floors break those assumptions — and what to do about it:

  • Sequence-dependent changeovers. Allergen, color, and flavor matrices mean a job's effective time depends on what ran before it. Johnson's rule ignores this entirely. Pair it with changeover-aware sequencing (see Run Order Matters and the broader SMED approach), or fold setup time into each job's processing time. That's not a hack: Johnson's original 1954 paper, "Optimal Two- and Three-Stage Production Schedules With Set-up Time Included," built setup into the formulation from the start (Johnson's Rule, Wikipedia).
  • Due dates, MABD, and shelf life. Minimizing makespan finishes the set fastest — it says nothing about hitting individual customer dates. When due dates dominate, makespan is the wrong objective; prioritize on-time delivery instead (see OTIF and must-arrive-by-date and shelf-life-constrained scheduling).
  • Unequal priority / hot orders. The rule assumes every job matters equally. A rush order that must jump the queue violates that — re-run the rule on the remaining jobs after you've committed the hot one.
  • Limited buffer between stages. The classic rule assumes unlimited intermediate storage. If your mix-to-fill buffer is a single tank, a WIP cap changes the math — relevant if you run a CONWIP pull system.

How to actually run it on Monday

  1. Get clean per-SKU run times at each stage. Use real, schedulable run rates — your OEE-adjusted rate, not nameplate speed. If you quote mixing and packaging at ideal speed you'll under-plan every gap. See planning to real capacity.
  2. Build a six-row table like the example above: SKU, Center 1 time, Center 2 time.
  3. Run the four steps — pick the global shortest, front it or back it, eliminate, repeat inward. A spreadsheet or two minutes with a pencil does it.
  4. Sanity-check against your constraints. Does the Johnson sequence trigger an ugly allergen changeover? Does it push a short-dated SKU too late? Adjust, knowing you're trading a little makespan for a hard constraint.
  5. Know when to escalate. Three or more genuine stages, heavy changeover coupling, or due-date pressure means you've outgrown the plain rule. That's a job for a solver that optimizes makespan, changeovers, and dates together — and for understanding the variability that drives lead time in the first place.

TL;DR

  • On a two-stage line, makespan — not the sum of run times — is the finish-time truth. The gap is the idle time between stages.
  • Johnson's rule is provably optimal for two stages and free to run: shortest-time-first, front if it's stage 1, back if it's stage 2, repeat inward.
  • In the worked example, re-sequencing the same five SKUs cut makespan from 28 to 25 hours — zero new resources.
  • It extends to three stages only when the middle step is small relative to its neighbors.
  • Respect the preconditions. Layer changeover logic, due dates, and WIP limits on top — Johnson's rule gives you the clean backbone, not the whole answer.

Sources

More from the journal