Converter tool

Job Shop Scheduler with Tabu Search

Schedule jobs that each visit machines in their own order. Dispatch rules give a starting plan and tabu search improves the makespan or the weighted tardiness, with a Gantt chart by machine and by job.

One row per job

1. Your data

Or paste the table

What the model covers

Scope

Each job is a fixed sequence of operations, each on one machine, and a machine does one operation at a time without pre-emption. Dispatch rules build an active schedule (Giffler and Thompson). Tabu search then swaps neighbouring operations on the critical path for the makespan (the N5 neighbourhood of Nowicki and Smutnicki), or any neighbouring pair for weighted tardiness.

Machine calendars, setup times, tooling and labour limits are not modelled. Up to 60 jobs, 30 machines and 1,000 operations.

Job Shop Scheduler with Tabu Search

Operator: Abdulla Al Fahad. How tools are built and checked

In a job shop every job has its own route through the machines, so a machine that is idle now may be blocking three jobs a few steps later, and a schedule that looks sensible in a spreadsheet can be 20% longer than the best one. This page builds a feasible schedule from machine routings, starts from the best of several dispatch rules, and then improves it with tabu search for the shortest finishing time or the least weighted lateness.

Key features

  • Jobs with their own machine order, optional release times, due dates and weights, up to 60 jobs, 30 machines and 1,000 operations
  • Eight dispatch rules (SPT, LPT, FIFO, EDD, MWKR, LWKR, critical ratio, apparent tardiness cost) compared before any search
  • Tabu search over swaps of neighbouring operations, running in the background with progress, a time budget you set and a Cancel button
  • A Gantt chart by machine or by job, utilisation per machine, flow time and a lower bound on the makespan

Routings, dispatch rules and the tabu search neighbourhood

One row per job. The routing is a list of machine:time pairs in processing order, for example Saw:4 Mill:6 Drill:3 Paint:5, separated by spaces, commas or semicolons. Machine names are free text and a job may visit a machine more than once. Release time, due date and weight columns are optional: a blank release is 0, a blank due date means the job cannot be late, and a blank weight is 1.

Each operation runs on one machine without interruption, a machine handles one operation at a time, and operations of a job follow the listed order. Setup times, machine calendars and downtime, tooling and labour limits are not modelled.

The built-in FT06 button loads the 6-job, 6-machine instance of Fisher and Thompson (1963) in the OR-Library layout, so you can compare the result with the known optimum.

How it works

Dispatch rules use the Giffler and Thompson procedure. At each step it finds the operation that could finish earliest, collects the operations competing for that machine and lets the rule choose among them, which always produces an active schedule. Tabu search then moves between schedules by swapping two neighbouring operations on a machine. For the makespan only swaps on a critical path are tried, at the ends of each block of consecutive operations on one machine (the N5 neighbourhood of Nowicki and Smutnicki), which keeps every schedule feasible; for weighted tardiness every neighbouring pair is tried and infeasible ones are discarded. Recently reversed swaps are forbidden for a number of iterations unless they beat the best result, and after a long stretch without improvement the search restarts from the best schedule with a few random swaps.

When to use it

  • A machine shop loads six jobs with due dates and weights from 1 to 3. The best dispatch rule, EDD, leaves a weighted tardiness of 53; tabu search brings it to 37 with 3 late jobs and a largest lateness of 13.
  • The same six jobs scheduled for the shortest finish instead reach a makespan of 43, which equals the lower bound, so no schedule can finish earlier.
  • A teaching assistant loads FT06 and shows students that SPT gives 94, about 71% above the optimum of 55, which is why the choice of rule matters.
  • A planner runs the six jobs with due dates under seeds 1, 2 and 3 for 5 seconds each; all three settle on a weighted tardiness of 37, the first reaching it after 21 milliseconds, so the budget was far larger than needed.

Inputs

  1. Load the job list, or choose Load FT06 benchmark or Load jobs with due dates.
  2. Check that the job and routing columns are right and pick the optional release, due date and weight columns.
  3. Choose the goal, shortest makespan or least weighted tardiness, and a search time from 0.5 to 120 seconds.
  4. Press Build the schedule and watch the iteration count and best value; stop early with Cancel if you are satisfied.
  5. Read the dispatch-rule table, the KPIs and the Gantt chart, and download the operation list as CSV or XLSX.

Worked example

The FT06 benchmark, goal: shortest makespan, 5 seconds

job,routing
J1,2:1 0:3 1:6 3:7 5:3 4:6
J2,1:8 2:5 4:10 5:10 0:10 3:4
J3,2:5 3:4 5:8 0:9 1:1 4:7
J4,1:5 0:5 2:5 3:3 4:8 5:9
J5,2:9 1:3 4:5 5:4 0:3 3:1
J6,1:3 3:3 5:9 0:10 4:4 2:1

Dispatch rules, then tabu search

Makespan by rule: FIFO 65, MWKR 67, LPT 86, SPT 94, LWKR 96
Tabu search from FIFO: makespan 55 within a few milliseconds, the same for seeds 1, 2 and 3
Simple lower bound 52, known optimum 55

Tips for best results

  • Weighted tardiness needs a due date column; with makespan as the goal the page ignores due dates and weights.
  • Run the same instance with seeds 1, 2 and 3. If they agree, as they do on FT06, the search has probably found a very good schedule; if they differ, give it more time.
  • The Gantt chart can be read by job when you want to see how long a particular job waits between operations.

Limits

A result is optimal only when it equals the lower bound. The simple bound here is the busiest machine with its earliest start and shortest tail, or the longest job, and it is often below the true optimum, as 52 against 55 on FT06.

Tabu search is a heuristic and has no proof of optimality. Larger instances such as 10 jobs on 10 machines may need a longer budget, and this page has not been checked against those benchmarks.

Real shops have setups, shifts and breakdowns. A schedule from this page is a plan on an idealised shop, not a dispatch list.

Results depend on the time budget as well as the seed, because the search stops on the clock rather than at a fixed number of iterations.

Common errors and how to fix them

Job "J3": "M2" should look like machine:time, for example M2:5.
Each step in the routing needs a colon and a time. Check for a missing time or a space inside a machine name.
Weighted tardiness needs a due date column.
Pick the column that holds each job's due date, or switch the goal to the shortest makespan.
The page schedules up to 60 jobs; this file has 75.
Split the file by week or by product family and schedule the groups one after another.

Why a dispatch rule is only a start

A dispatch rule decides locally, one machine and one moment at a time, and never sees the consequence for a job that is still two machines away. On FT06 the five rules give makespans from 65 to 96, and none is the best on every instance. Starting the search from the best of them saves time, but tabu search does the real work: on FT06 it goes from 65 to 55 within 50 iterations.

What the critical path restricts

Swapping two operations that are not on a critical path cannot shorten the makespan, so for that goal the search only considers pairs at the ends of critical blocks. This is far fewer moves than all neighbouring pairs, which is what makes each iteration cheap. For weighted tardiness no such shortcut exists, because lateness depends on every job's finishing time, so the page tries all neighbouring pairs and each iteration costs more.

Frequently asked questions

How do I know 55 is really optimal for FT06?

Fisher and Thompson's 6-by-6 instance has a long-established optimal makespan of 55, and the page reaches exactly that and never anything lower, which it would if the loaded routings were wrong. Its own simple lower bound is only 52, so the page cannot prove optimality itself; it relies on the published optimum.

Can I schedule a flow shop, where every job visits the machines in the same order?

Yes, as a special case: give every job the same routing. The search is general rather than specialised, so a dedicated flow-shop heuristic such as NEH may do better on large permutation flow shops.

Why does the same seed sometimes give a slightly different final value?

The search stops on the clock, so two runs reach different iteration counts. The sequence of moves is the same for a seed; a faster or slower machine simply stops it earlier or later along that path.