Lawler's algorithm explained

Lawler's algorithm is an efficient algorithm for solving a variety of constrained scheduling problems, particularly single-machine scheduling.[1] It can handle precedence constraints between jobs, requiring certain jobs to be completed before other jobs can be started. It can schedule jobs on a single processor in a way that minimizes the maximum tardiness, lateness, or any function of them.

Definitions

There are n jobs. Each job is denoted by

i

and has the following characteristics:

di

.

gi

; it is a weakly-increasing function of the time job i completes its execution, denoted by

Fi

.

The objective function is

minmax0\legi(Fi)

.[2] Some special cases are:

gi(Fi)=Fi-di=Li

, the objective function corresponds to minimizing the maximum lateness

gi(Fi)=max{(Fi-di,0)}

, the objective corresponds to minimizing the maximum tardiness.

Algorithm

The algorithm builds the schedule back to front. For each scheduling step, it looks only at the tasks that no other tasks depend on, and puts the one with the latest due date at the end of the schedule queue. Then it repeats this process until all jobs are scheduled.

The algorithm works by planning the job with the least impact as late as possible. Starting at

t=\sumpj

that

pj

is the processing time of job

j

.

S

set of already scheduled jobs (at start: S =

\emptyset

)

J

set of jobs whose successors have been scheduled (at start: all jobs without successors)

t

time when the next job will be completed (at start:

t=\sumpj

) while

J\emptyset

do select

j\inJ

such that

fj(t)=minkfk(t)

schedule

j

such that it completes at time

t

add

j

to

S

, delete

j

from

J

and update

J

.

t=t-pj

end while

Example 1

Assuming there are three jobs: t1, t2, and t3, with the following precedence constraints:

And the following deadlines (due date in a month)

Now we construct the required set of jobs:

Repeat the following steps until J is empty:

Do the next round:

Do the next round:

J is now empty. The end.

So the final schedule is t1 -> t2-> t3 as S =

Example 2

A more complex example, with simplified steps:The jobs and precedence constraints are shown below: a parent node --> child node in the tree.

      j1 
     (2) 
    /   \
   j2    j3 
  (2)    (4)
  / \     |
 j4 j5   j6
(3) (5)  (6)  
The due dates of jobs are shown underneath of each node of the tree in parentheses.

Now look at the set of jobs without any successors, find the one with latest due date, put it into the front of S:

Further reading

Notes and References

  1. Steven Nahmias. Production and Operations Analysis. 2008.
  2. Joseph Y-T. Leung. Handbook of scheduling: algorithms, models, and performance analysis. 2004.