Tools › Operations Research › Scheduling › Job Shop Scheduling and Sequencing


Job Shop Scheduling and Sequencing

Sequences jobs on one machine, through a flow shop or through a job shop with its own routings and compares the schedules. Single machine: SPT, EDD, WSPT, first come first served, Moore-Hodgson (fewest late jobs) and Lawler's backward rule for the maximum lateness with precedence, each with the makespan, mean flow time, lateness, tardiness and number tardy. Two-machine flow shop: Johnson's rule (optimal makespan) and his three-machine special case. m-machine flow shop: the Palmer slope index, Campbell-Dudek-Smith and Nawaz-Enscore-Ham heuristics against an exact branch and bound (up to 8 jobs). Job shop: eight dispatching rules by discrete-event simulation, Giffler-Thompson active schedules, the disjunctive-graph lower bound, an exact time-boxed branch and bound (proves the Fisher-Thompson 6 x 6 optimum of 55), Gantt charts per machine and per job, machine utilisation and the critical path. Parallel machines: LPT list scheduling with Graham's bound and the exact optimum. Sequence-dependent setups: nearest neighbour and 2-opt. The default is an illustrative 5-job, 4-machine shop; the FT06 and FT10 instances of Fisher and Thompson (OR-Library data) load from the problem list.

  • Single machine: SPT, EDD, WSPT, FCFS, Moore-Hodgson and Lawler with every flow-time, lateness and tardiness measure

  • Flow shop: Johnson's rule, the three-machine case, Palmer, CDS and NEH against an exact branch and bound

  • Job shop: eight dispatching rules, Giffler-Thompson active schedules, lower bound, exact branch and bound, Gantt charts, utilisation, critical path

  • Parallel machines by LPT with Graham's bound; sequence-dependent setups by nearest neighbour and 2-opt; every value checked against enumeration or scipy

Job Shop Scheduling


Unit System: /

Problem


Jobs (one per line; or the OR-Library matrix: first line "jobs machines", then "machine time" pairs with machines numbered from 0)


Setup matrix (sequence-dependent setups: one row per job, from the row job to the column job; an optional first row holds the setup from the machine's initial state)


Options





×

Job Shop Scheduling and Sequencing

Job Shop Scheduling and Sequencing: Sequencing Rules, Johnson's Rule, Flow-Shop Heuristics, Dispatching, Active Schedules and Branch and Bound

What the tool does

A shop has jobs to run and machines to run them on; a schedule says which job each machine works on and when. The tool sequences the jobs for six shop types, prints the schedule with its measures and, wherever the problem is small enough, proves what the best possible schedule is. The shop type follows the problem chosen on the form: a single machine (every job one operation), a two-machine flow shop (every job first on machine 1 then on machine 2), an m-machine flow shop (every job through the same machines in the same order), a job shop (every job its own routing), identical parallel machines (every job on any one of m machines) and a single machine with sequence-dependent setups. Times are plain numbers in one unit, named under Options.

Input format

One job per line: a one-word name, then up to three bare numbers in order (release time rj, due date dj, weight wj; a lone "-" leaves one blank; blank release = 0, no due date = the due-date rules are skipped, blank weight = 1), then the routing as machine:time tokens in the order the job visits the machines (M1:3 M2:4 … or 1:3 2:4). "after:J1" makes the job follow J1 (Lawler's rule on the single machine). Machines are named by first appearance. The OR-Library matrix is read too: a first line "n m", then one line per job of m "machine time" pairs with machines numbered from 0, as in Beasley's jobshop1.txt; the FT06 and FT10 entries of the problem list load the Fisher and Thompson instances in that form. Limits: 30 jobs, 20 machines. The setup problem takes an n × n matrix of setup times (row = the job just finished, column = the next job) with an optional first row for the setup from the machine's initial state.

Measures

For job j with completion Cj: flow time Fj = Cj − rj, lateness Lj = Cj − dj, tardiness Tj = max(0, Lj), tardy indicator Uj = 1 when Tj > 0. The schedule measures are the makespan Cmax = max Cj, the mean flow time, the mean and maximum lateness, the total tardiness, the number tardy and the weighted completion Σ wj Cj (Conway, Maxwell and Miller 1967).

Single machine

SPT (shortest processing time first) minimises the mean flow time, hence the mean completion and the mean number of jobs in the shop. WSPT (least pj/wj first, Smith 1956) minimises Σ wj Cj. EDD (earliest due date first) minimises the maximum lateness and the maximum tardiness. Moore-Hodgson (Moore 1968) minimises the number of tardy jobs: jobs are added in EDD order and, whenever the job just added would be late, the longest job scheduled so far is removed and goes to the end; the removed jobs are the late ones. Lawler (1973) minimises the maximum of any non-decreasing cost fj(Cj) under precedence constraints, here fj = Cj − dj: the sequence is filled from the back; with P the total time of the jobs not yet placed, the job with no unplaced successor whose cost fj(P) is least goes last, P is reduced by its time, and so on. Without precedence it gives EDD's maximum lateness. FCFS is the order entered. Total tardiness has no simple rule (the problem is NP-hard); the table shows what each rule gives. With release times the rules run as non-delay dispatching (among the jobs already released); Moore-Hodgson and Lawler are then not applied.

Two-machine flow shop: Johnson's rule

Every job runs first on machine 1 for aj, then on machine 2 for bj. Johnson (1954) proved that the makespan is minimised by placing the jobs with aj < bj first in increasing aj and the others after them in decreasing bj: job i precedes job k when min(ai, bk) ≤ min(ak, bi). The tool prints the two sets, the sequence, the completion times on both machines and the idle time of the second machine. Johnson's three-machine case: when the middle machine is dominated, min aj ≥ max bj or min cj ≥ max bj, the rule on the pseudo times aj + bj and bj + cj is optimal; the tool tests the condition and, when it fails, reports the heuristics and the exact search instead.

m-machine flow shop

Permutation schedules (the same job order on every machine) are compared. Palmer (1965) sorts the jobs by decreasing slope index sj = Σk (2k − m − 1) pjk, which puts jobs whose work lies late in the routing first. Campbell, Dudek and Smith (1970) solve m − 1 two-machine problems by Johnson's rule, the k-th with aj = the first k times and bj = the last k, and keep the best makespan. Nawaz, Enscore and Ham (1983) take the jobs by decreasing total work and insert each at the position of the partial sequence that gives the least makespan. The lower bound is, over the machines, the least head (work before the machine) + the machine's total work + the least tail (work after it). The exact branch and bound (up to 8 jobs) searches the permutations depth first with the bound at each node = max over machines of (completion of the partial sequence + remaining work + least remaining tail), children ordered by bound, the best heuristic as the incumbent; a time box stops it. For three or more machines a non-permutation schedule can in principle be shorter than the best permutation; the bound holds for every schedule.

Job shop

Dispatching rules are run by discrete-event simulation of the routings as non-delay schedules: whenever a machine is free and an operation is ready for it, the lowest-numbered such machine takes the operation the rule prefers (ties to the lower job number): SPT and LPT by the operation's time, FCFS by the time the operation arrived in the queue, EDD by the job's due date, least slack by dj − t − remaining work, critical ratio by (dj − t) / remaining work, MWKR and LWKR by the work remaining in the job. Giffler and Thompson (1960) generate active schedules: at each step the schedulable operation with the least earliest completion C* fixes the machine M*; the conflict set is every schedulable operation on M* that could start before C*; the rule picks one and it is appended to M*. A schedule is active when no operation can start earlier without delaying another; every non-delay schedule is active, the active set contains an optimal schedule for any regular measure, and the tool confirms the property on every schedule it prints.

Lower bound (disjunctive graph): no schedule finishes before the longest job chain rj + Σk pjk, nor before any machine's least head + total work + least tail, the one-machine relaxation of Carlier (1982) without its sequencing. Exact branch and bound: depth-first search over the Giffler-Thompson conflict sets, so that every leaf is an active schedule and the tree holds an optimum; at each node the bound is the maximum over the machines of Jackson's preemptive one-machine schedule of the unscheduled operations (heads from the partial schedule, tails the remaining job chains), children are ordered by bound, the incumbent is the best heuristic schedule, and a time box of 1 to 20 s stops the search. The 6 × 6 instance FT06 is proven at 55 in a fraction of a second; FT10 (optimum 930, Carlier and Pinson 1989) is not proven within the box and the page reports the best schedule found with the open bound. Critical path: from the operation that ends at Cmax, back through a predecessor (job or machine) whose completion equals the start, to time zero; every link is tight and the lengths add to Cmax. The Gantt charts outline the critical operations in red. Utilisation is busy time over the makespan.

Identical parallel machines

LPT list scheduling (Graham 1969): the jobs in decreasing processing time, each to the least-loaded machine. Its makespan never exceeds (4/3 − 1/(3m)) times the optimum, and the ratio is attained by Graham's worst case (2m + 1 jobs of 2m − 1, 2m − 1, …, m + 1, m + 1, m, m, m). The lower bound is max(pmax, ⌈Σ pj / m⌉); up to 12 jobs the exact optimum is found by enumerating the assignments with symmetry breaking.

Sequence-dependent setups

With fixed processing times the makespan Σ pj + Σ setups is least when the total setup is least, an open travelling-salesman path from the machine's initial state. The tool builds a nearest-neighbour sequence (the job with the least setup next), improves it by 2-opt (Croes 1958: every reversal of a segment that lowers the total is applied until none is left) and, up to 8 jobs, confirms the optimum by enumeration; 2-opt can stop at a local optimum, and the page says when it does. The Network Flow and Routing tool solves the closed tour exactly (Held-Karp bound and dynamic programming). Lot splitting and batching (Ohno's small-lot production, the economic batch under setup cost) change the problem's data rather than its sequence and are not modelled.

Limits

Up to 30 jobs and 20 machines; one operation per job on the single, parallel and setup problems; flow shops need the same machines in the same order on every job; the exact job-shop search is a time-boxed depth-first search meant for small instances (about 6 × 6), larger ones get the heuristics and the bound; no preemption, no machine breakdowns, no transport times, no re-entrant routings (a machine twice in one job is accepted by the dispatching and the search but not by the flow-shop readers).

Checks

The test script (test-scripts/test_job_shop_scheduling.php) checks Johnson's rule against brute-force enumeration on ten seeded two-machine instances and five three-machine instances meeting the condition, Moore-Hodgson against enumeration on ten instances, SPT / EDD / WSPT / Lawler against the enumerated optimum of their measures, Palmer, CDS and NEH against the enumerated optimum on eight seeded 5-job instances (the branch and bound equal to it), the dispatching simulation and Giffler-Thompson against an independent numpy implementation rule by rule on FT06, FT10, the default shop and six seeded shops (makespans equal, every schedule active), the exact branch and bound against scipy's MILP optimum (Manne's disjunctive formulation) on FT06 (55) and the seeded shops, LPT against the enumerated optimum with Graham's ratio and his worst cases, the setup heuristics against enumeration, and the rendered page through the site harness. Sources and the check script are filed in References/Job-Shop/.




References

Johnson, S. M. (1954). "Optimal Two- and Three-Stage Production Schedules with Setup Times Included." Naval Research Logistics Quarterly, Vol. 1, No. 1, pp. 61–68.

Moore, J. M. (1968). "An n Job, One Machine Sequencing Algorithm for Minimizing the Number of Late Jobs." Management Science, Vol. 15, No. 1, pp. 102–109.

Lawler, E. L. (1973). "Optimal Sequencing of a Single Machine Subject to Precedence Constraints." Management Science, Vol. 19, No. 5, pp. 544–546.

Smith, W. E. (1956). "Various Optimizers for Single-Stage Production." Naval Research Logistics Quarterly, Vol. 3, No. 1–2, pp. 59–66.

Palmer, D. S. (1965). "Sequencing Jobs Through a Multi-Stage Process in the Minimum Total Time—A Quick Method of Obtaining a Near Optimum." Operational Research Quarterly, Vol. 16, No. 1, pp. 101–107.

Campbell, H. G., Dudek, R. A., and Smith, M. L. (1970). "A Heuristic Algorithm for the n Job, m Machine Sequencing Problem." Management Science, Vol. 16, No. 10, pp. B630–B637.

Nawaz, M., Enscore, E. E., and Ham, I. (1983). "A Heuristic Algorithm for the m-Machine, n-Job Flow-Shop Sequencing Problem." Omega, Vol. 11, No. 1, pp. 91–95.

Giffler, B., and Thompson, G. L. (1960). "Algorithms for Solving Production-Scheduling Problems." Operations Research, Vol. 8, No. 4, pp. 487–503.

Fisher, H., and Thompson, G. L. (1963). "Probabilistic Learning Combinations of Local Job-Shop Scheduling Rules." In Muth, J. F., and Thompson, G. L. (eds.), Industrial Scheduling, Prentice-Hall, Englewood Cliffs, NJ, pp. 225–251.

Beasley, J. E. (1990). "OR-Library: Distributing Test Problems by Electronic Mail." Journal of the Operational Research Society, Vol. 41, No. 11, pp. 1069–1072.

Carlier, J. (1982). "The One-Machine Sequencing Problem." European Journal of Operational Research, Vol. 11, No. 1, pp. 42–47.

Carlier, J., and Pinson, E. (1989). "An Algorithm for Solving the Job-Shop Problem." Management Science, Vol. 35, No. 2, pp. 164–176.

Manne, A. S. (1960). "On the Job-Shop Scheduling Problem." Operations Research, Vol. 8, No. 2, pp. 219–223.

Graham, R. L. (1969). "Bounds on Multiprocessing Timing Anomalies." SIAM Journal on Applied Mathematics, Vol. 17, No. 2, pp. 416–429.

Croes, G. A. (1958). "A Method for Solving Traveling-Salesman Problems." Operations Research, Vol. 6, No. 6, pp. 791–812.

Da Col, G., and Teppan, E. C. (2019). "Google vs IBM: A Constraint Solving Challenge on the Job-Shop Scheduling Problem." Electronic Proceedings in Theoretical Computer Science, Vol. 306, pp. 259–265.

Conway, R. W., Maxwell, W. L., and Miller, L. W. (1967). Theory of Scheduling. Addison-Wesley, Reading, MA.

Baker, K. R., and Trietsch, D. (2009). Principles of Sequencing and Scheduling. John Wiley and Sons, Hoboken, NJ.

Pinedo, M. L. (2016). Scheduling: Theory, Algorithms, and Systems, 5th ed. Springer, New York.

Ohno, T. (1988). Toyota Production System: Beyond Large-Scale Production. Productivity Press, Cambridge, MA.

Worked Examples

Published examples this tool reproduces; each page lists the inputs to enter and the printed answers.

All worked examples


DISCLAIMER: The methods and calculation on aNOWysis.com are provided as means to educate the reader. There is no warranty, expessed or implied, as to the relevance or accuracy of the methods or calculations. All calculations should be checked by a qualified analyst for appropriateness and accuracy. We will not be held liable for any damages, injuries or deaths caused by using methods or calculations from this site.