About job shop scheduling
What is the job shop problem?
In a job shop, every job has its own route through the machines: one job goes from the lathe to the mill and then to the drill, another from the drill to the lathe. A machine works on one operation at a time, an operation cannot be interrupted, and a job is on one machine at a time. The goal in Jₘ || Cₘₐₓ is the schedule with the smallest makespan, the moment the last job is finished.
Unlike the flow shop, each machine can take the jobs in a different order, so a schedule is one sequence per machine. The problem is NP-hard even with two machines once jobs can have three operations, and it is one of the hardest problems in combinatorial optimization: the 10 × 10 benchmark ft10 of Fisher and Thompson, published in 1963, was only solved in 1989.
The disjunctive graph
Roy and Sussmann (1964) model a job shop as a graph. Every operation is a vertex. Conjunctive arcs link the consecutive operations of each job, and disjunctive edges join every pair of operations that share a machine. A schedule gives every disjunctive edge a direction. If the result has no cycle, the longest path from start to finish is the makespan, and its operations form the critical path.
Giffler and Thompson’s algorithm
A schedule is active when no operation could start earlier without delaying another one. Giffler and Thompson (1960) showed how to build every active schedule, and some active schedule is always optimal. At each step, take the next operation of every job, find the earliest completion c* and its machine M*, and choose one of the operations on M* that can start before c*.
Priority rules make that choice. SPT and LPT look at the operation time, MWKR and LWKR at the work left in the job. For the makespan, MWKR is usually the best of them. The comparison table shows how each rule does on your data.
Jackson’s rule for two machines
When there are two machines and every job has at most two operations, Jackson (1956) gives an optimal schedule. Split the jobs by route, order the jobs that go from M1 to M2 and those that go from M2 to M1 with Johnson’s rule, and let each machine start with the jobs that begin there.
Branch and bound
The exact method branches on the conflict sets of Giffler and Thompson, so it only explores active schedules. Each partial schedule gets a lower bound from the work left in each job and from a one-machine relaxation of each machine: Jackson’s preemptive schedule with release times and tails, the classic bound of Carlier and Pinson. Nodes that cannot beat the best schedule found so far are pruned. On Fisher and Thompson’s 6 × 6 instance ft06 it proves the optimum of 55 in a few thousand nodes.
How this calculator works
Every time is read exactly, fractions and decimals included, and all sums are exact, so there is no rounding. Ties are always broken by job number, so the same data gives the same schedule. Problems can have up to 10 jobs and 6 machines. The exact search runs for up to 36 operations and stops after a node or time limit, in which case the best schedule found is shown with a lower bound.
Frequently asked questions
What is the difference between a flow shop and a job shop?
In a flow shop every job visits the machines in the same order. In a job shop each job has its own route, so a machine can meet the jobs in any order and a schedule is one sequence per machine. Every flow shop is a special job shop, which is why the job shop is harder.
What is the makespan?
The makespan Cₘₐₓ is the time at which the last operation finishes, measured from time 0. Minimizing it finishes the whole set of jobs as early as possible.
Which priority rule is the best?
For the makespan, MWKR (most work remaining) is usually the best simple rule, because it keeps the long jobs moving. SPT finishes many operations early but can leave a long job for the end. No rule is always the best, so the calculator runs all of them and compares them with the exact optimum.
What is an active schedule?
A schedule in which no operation can be moved earlier without delaying another operation. Some optimal schedule is always active, and Giffler and Thompson’s algorithm builds exactly the active schedules, so searching them is enough.
Why does my textbook get a different schedule?
Usually because of ties. When two operations have the same priority, books break the tie in different ways, and a problem often has several optimal schedules with the same makespan. Compare the makespans first. Some books also use the non-delay version of the algorithm, which only considers the operations that can start at the earliest possible moment.
How large can the problem be?
Up to 10 jobs and 6 machines, each job with up to 6 operations. The priority rules run instantly. The exact branch and bound runs for up to 36 operations, which covers Fisher and Thompson’s ft06, and on larger or harder problems it shows the best schedule found with a lower bound.