Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
A flow shop is one where all the jobs visit all the machine for processing in the given order.
If we consider a flow shop with n jobs and two machines (M1 and M2), all the jobs visit M1
first and then visit M2. The processing times may be different on different machines for the
jobs. We consider n jobs and m machines.
Let Sij be the start time of job i on machine j. Let p ij be the known processing times. The
completion times of the jobs are Sim + pim. The objective is to Minimize Z where
Z Sim + pim
For every job, the start time on machine j+1 is greater than or equal to the completion time
on machine j.
Each machine can process only one job at a time. This gives us the usual constraints
Illustration 5.7
Consider five jobs that go through a 2 machine flow shop. The processing times on M1 are
10, 8, 12, 15 and 8 while the processing times on M2 are 8, 10, 12, 9 and 16 respectively.
Find the sequence that minimizes makespan?
ijk binary.
The optimum solution to the binary IP is given by S12 = 55, S22 = 45, S11 = 45, S31 = 8, S32 = 24,
S42 = 36, S21 = 37, S41 = 21, S52 = 8, S51 = 0, with makespan = 63.
From the solution we observe that the jobs are sent in the sequence J5 J3 J4 J1 J2. J5
starts at M1 at time = 0 and finishes at M1 at time = 8. It starts at M2 at 8 and finishes at 24.
J3 starts on M1 at 8 (when M1 is free) and finishes at 20. It starts on M2 at 24 (when M2 is
free; it waits for 4 minutes to access M2) and finishes at 36. J4 starts on M1 at 20 and
finishes at 35. It starts on M2 at 36 (when M2 is free) and finishes at 44. J1 starts on M1 at
35 and finishes at 45. It starts on M2 at 45 and finishes at 53. J2 starts on M1 at 45 and
finishes at 53. It starts on M2 at 53 and finishes at 63. All jobs are completed by time 63,
which is the makespan.
The optimum makespan to the two machine flowshop can be obtained by the Johnsons rule
(Johnson, 1954). The algorithm is as follows:
1. Find the job not yet in the sequence that has the smallest value of the processing
time. If this is on M1 schedule the job in the first available position from the left. If it
is on M2 schedule it in the first available position from the right. Break ties
arbitrarily.
2. Repeat step 1 till all jobs are scheduled. Compute the makespan of the complete
sequence.
Minimize Sj2.
To minimize total tardiness we define Ej and Tj as the earliness and tardiness of job j. Dj is
the given due date for job j. We minimize Tj and add constraints Ej Tj = Dj Sj2 pj2.
To minimize number of tardy jobs, we define Nj = 1 if job j is tardy (Nj is a binary variable)
and add constraints Tj M Nj.
Illustration 5.8
Consider five jobs that go through a 2 machine flow shop. The processing times on M1 are
10, 8, 12, 15 and 8 while the processing times on M2 are 8, 10, 12, 9 and 16 respectively.
The due dates are 30, 30, 20, 30 and 60 respectively for the five jobs. Apply Johnsons
algorithm to minimize makespan? Also find the optimum sequences that minimize sum of
completion times, total tardiness, maximum tardiness and number of tardy jobs?
We first apply Johnsons algorithm to the problem. We choose J1 on M2 first and schedule
J1 as the fifth job. We choose J2 on M1 (tie) and J2 becomes the first job. J5 on M1 comes
next and J5 becomes the second job. We choose J4 on M2 and J4 becomes the fourth job. J3
becomes the third job and the sequence is J2 J5 J3 J4 J1. The completion times are
18, 34, 44, 55 and 63 for jobs J2, J5, J3, J4 and J1. The makespan is 63. This sequence is
different from the solution to the binary IP but the makespan is the same.
The processing times are the same as in Illustration 5.7. To minimize sum of completion
times we minimize S12 + S22 + S32 + S42 + S52. The constraints are the same as in example 7.
The optimum solution to the binary IP is given by S12 = 18, S22 = 8, S11 = 8, S31 = 41, S32 = 53,
S42 = 42, S21 = 0, S41 = 26, S52 = 26, S51 = 18, with Z = 147. The optimum sequence is J2 J1
J5 J4 J3 with completion times 18, 26, 42, 51 and 65 for jobs J2, J1, J5, J4 and J3
respectively. The minimum sum of completion times is 202 (= 147 + 55). The objective
function is the sum of start times on M2. To this we add all the processing times on M2
which is 55. The sum of completion times is 147 + 55 = 202.
The optimum solution to the binary IP is given by S31 = 0, S32 = 12, S11 = 12, S12 = 24, S21 = 22,
S22 = 32, S41 = 30, S42 = 45, S51 = 45, S52 = 54, with total tardiness = 52. The optimum
sequence is J3 J1 J2 J4 J5 with completion times 24, 32, 42, 54 and 70 for the jobs in
the order of sequence. The corresponding due dates are 20, 30, 30, 30, 60. All jobs are tardy
with tardiness 4, 2, 12, 24 and 10 for jobs J3, J1, J2, J4 and J5 respectively. The total
tardiness is 52.
To minimize maximum tardiness we use all the constraints that we used to minimize total
tardiness. We introduce a variable u and minimize u. We add five constraints, u T 1, u T2,
u T3, u T4, u T5.
The optimum solution to the binary IP is given by S11 = 35, S12 = 45, S21 = 12, S22 = 24, S31 = 0,
S32 = 12, S41 = 20, S42 = 35, S51 = 59, S52 = 67, with maximum tardiness = 23. The completion
times for J1, J2, J3, J4 and J5 are 53, 34, 24, 44 and 83. The tardiness values are 23, 4, 4, 14
and 23 with maximum tardiness = 23.
Let Sij be the start time of the processing on machine i for job j. Let p ij be the given
processing time for job j on machine i. Let [i] represent the ith machine in a sequence.
The completion time for job j is given by S[m]j + p[m]j. The objective is to minimize makespan
given by Minimize Z where
Z S[m]j + p[m]j
Each machine can process only one job at a time. For a pair of jobs j and k on machine i,
Either Sik Sij + pij or Sik Sjk + pjk. These are written using M as usual by adding a binary
variable for each pair of constraint.
Illustration 5.9
Consider a job shop scheduling problem with three jobs (J1 to J3) and three machines (M1
to M3). The sequence and the processing times for the jobs are J1 = M1 (8), M3 (12), M2
(10), J2 = M1 (9), M2 (11) and J3 = M3 (10), M1 (11), M2 (12). Find the schedule that
minimizes makespan?
For each job, the sequence of visit of machines has to be maintained. This gives us the
constraints
S31 S11 + 8
S21 S31 + 12
S22 S12 + 9
S13 S33 + 10
S23 S13 + 11
A machine can process only one job at a time. Machines M1 and M2 have all three jobs
being processed while M2 processes only two jobs. There are seven pairs of constraints.
These are
S11 - S12 - 1000121 -8
S12 - S11 + 1000 121 991
S11 - S13 - 1000 131 -8
S13 - S11 + 1000 131 989
S12 - S13 - 1000 231 -9
S13 - S12 + 1000 231 989
S21 - S22 - 1000 122 -9
S22 - S21 + 1000 122 989
S21 - S23 - 1000 132 -10
S23 - S21 + 1000 132 988
S22 - S23 - 1000 232 -11
S23 - S22 + 1000 232 988
S31 - S33 - 1000 133 -11
S33 - S31 + 1000 133 990
ijk 0,1.
The optimum solution is given by S33 = S11 = 0, S21 = 28, S22 = 17, S23 = 38, S31 = 10, S21 = 8, S13
= 17 with makespan = 50. From the optimum solution we observe that M1 processes the
three jobs in the order J1, J2 and J3 starting at 0, 8 and 17. M2 processes the jobs in the
order J2, J1 and J3 starting at 17, 28 and 38 while M3 processes them in the order J3 and J1
starting at 0 and 10. The completion times of the jobs J2, J1 and J3 are 28, 38 and 50 and the
makespan is 50.
Minimize S[jn]
To minimize total tardiness we define Ej and Tj as the earliness and tardiness of job j. Dj is
the given due date for job j. We minimize Tj and add constraints Ej Tj = Dj S[jn] p[jn].
Illustration 5.10
Consider a job shop scheduling problem with three jobs (J1 to J3) and three machines (M1
to M3). The sequence and the processing times for the jobs are J1 = M1 (8), M3 (12), M2
(10), J2 = M1 (9), M2 (11) and J3 = M3 (10), M1 (11), M2 (12). Find the schedule that
minimizes sum of completion times. If the due dates for the jobs are 30, 30, 30 find the
minimum values of total tardiness, maximum tardiness and number of tardy jobs?
The processing times are the same as in Illustration 5.9. We use the same decision variables.
To minimize sum of completion times we define an objective function Minimize S21 + S22 +
S23. The optimum solution is given by S33 = S12 = 0, S21 = 41, S22 = 9, S23 = 21, S31 = 29, S11 = 21,
S13 = 10 with makespan = 50. From the optimum solution we observe that M1 processes the
three jobs in the order J2, J3 and J1 starting at 0, 10 and 21. M2 processes the jobs in the
order J2, J3 and J1 starting at 9, 21 and 41 while M3 processes them in the order J3 and J1
starting at 0 and 29. The completion times of the jobs J2, J3 and J1 are 20, 33 and 51 and the
minimum sum of completion times is 104.
To minimize total tardiness, we define Ej and Tj and minimize Tj. We also add constraints
E1 - T1 + S21 = 30 - 10
E2 - T2 + S22 = 30 - 11
E3 - T3 + S23 = 30 - 12
The optimum solution is given by S33 = S11 = 0, S21 = 41, S22 = 9, S23 = 21, S31 = 29, S11 = 21, S13
= 10 with makespan = 50. From the optimum solution we observe that M1 processes the
three jobs in the order J2, J3 and J1 starting at 0, 10 and 21. M2 processes the jobs in the
order J2, J3 and J1 starting at 9, 21 and 41 while M3 processes them in the order J3 and J1
starting at 0 and 29. The completion times of the jobs J2, J3 and J1 are 20, 33 and 51. Two
jobs J3 and J1 are tardy and the minimum total tardiness is 21 + 3 = 24.
To minimize maximum tardiness, we Minimize U and add constraints U T1, U T2, U T3.
The optimum solution gives us makespan = 50 and minimum value of the maximum
tardiness as 20. The solution that minimizes makespan is optimal for minimizing maximum
tardiness.
To minimize number of tardy jobs, we define Nj = 1 if job j is tardy and add constraints T1
1000N1, T2 1000N2, T3 1000N3. The optimum solution gives us 2 tardy jobs. The solution
that minimizes total tardiness also minimizes number of tardy jobs in this case.