Sei sulla pagina 1di 7

Flow Shop Scheduling - makespan

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.

Si,j+1 Sij + pij.

Each machine can process only one job at a time. This gives us the usual constraints

Skj - Sij - pij Mijk


Sij Skj pjk M (1 -ijk).
ijk binary.

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?

Let Sij be the start time of job i on machine j. The formulation is


Minimize Z
Z S12 + 8
Z S22 + 10
Z S32 + 12
Z S42 + 9
Z S52 + 16
S12 S11 + 10
S22 S21 + 8
S32 S31 + 12
S42 S41 + 15
S52 S51 + 8
S21 - S11 -1000121 -8
S11 - S21 + 1000121 990
S22 - S12 -1000122 -10
S12 - S22 + 1000122 992
S31 - S11 -1000131 -12
S11 - S31 + 1000131 990
S32 - S12 -1000132 -12
S12 - S32 + 1000132 992
S41 - S11 -1000141 -15
S11 - S41 + 1000141 990
S42 - S12 -1000142 -9
S12 - S42 + 1000142 992
S51 - S11 -1000151 -8
S11 - S51 + 1000151 990
S52 - S12 -1000152 -16
S12 - S52 + 1000152 992
S31 - S21 -1000231 -12
S21 - S31 + 1000231 992
S32 - S22 -1000d232 -12
S22 - S32 + 1000d232 990
S41 - S21 -1000d241 -15
S21 - S41 + 1000d241 992
S42 - S22 -1000d242 -9
S22 - S42 + 1000d242 = 990
S51 - S21 -1000d251 -8
S21 - S51 + 1000d251 992
S52 - S22 -1000d252 -16
S22 - S52 + 1000d252 990
S41 - S31 - 1000d341 -15
S31 - S41 + 1000d341 988
S42 - S32 - 1000d342 -9
S32 - S42 + 1000d342 988
S51 - S31 - 1000d351 -8
S31 - S51 + 1000d351 988
S52 - S32 - 1000d352 -16
S32 - S52 + 1000d352 988
S51 - S41 - 1000d451 -8
S41 - S51 + 1000d451 985
S52 - S42 - 1000d452 -16
S42 - S52 + 1000d452 991

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.

Flow Shop Scheduling sum of completion times, tardiness etc..


We consider other objectives such as minimizing sum of completion times, minimizing total
tardiness, minimizing maximum tardiness and minimizing the number of tardy jobs. The
objective function to minimize sum of completion times is given by

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 maximum tardiness we add constraints u Tj and minimize u.

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.

To minimize total tardiness, we define Tj and Ej. We minimize T1 + T2 + T3 + T4 + T5 and add


five constraints
E1 - T1 + S12 = 22
E2 - T2 + S22 = 20
E3 - T3 + S32 = 8
E4 - T4 + S42 = 21
E5 - T5 + S52 = 44

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.

From the optimum solution, we can conclude that the sequence is J3 J2 J4 J1 J5 is


optimum. We can compute the completion times as 24, 34, 44, 53 and 69 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, 4, 14, 23 and 19 for the jobs in the order of sequence. The maximum
tardiness is 23. We observe that the optimum solution delays the start of job 5 such that its
tardiness is 23. Since the maximum tardiness occurs for J1, the optimum solution
deliberately allows J5 to have the maximum value of 23 while it is possible to have T 5 = 19.
Since the objective is to minimize maximum tardiness both solutions are optimum with
maximum tardiness = 23.

To minimize number of tardy jobs, we define N1 to N5 as binary variables indicating whether


job j is tardy or not. We use the all the constraints to minimize total tardiness. We now
minimize N1 + N2 + N3 + N4 + N5 and add five constraints
T1 1000N1
T2 1000N2
T3 1000N3
T4 1000N4
T5 1000N5
The optimum solution to the binary IP is given by S21 = 0, S22 = 8, S11 = 8, S12 = 18, S51 = 18,
S52 = 26, S41 = 26, S42 = 42, S31 = 41, S52 = 53, with number of tardy jobs = 2. The optimum
sequence is J2 J1 J5 J4 J3. The completion times for J2, J1, J5, J4 and J3 are 18, 26, 42,
51 and 65. The due dates are 30, 30, 60, 30 and 20 in the order of the sequence. The
tardiness values are 0, 0, 0, 21 and 45 for jobs J2, J1, J5, J4 and J3. Two jobs J4 and J3 are
tardy.

Job shop Scheduling


In job shop scheduling, n jobs are processed on n machines where each job has a specified
route. For example, job J1 may visit machines in the order M3, M2 and then M1 while J2
may visit M2 and then M3. Some jobs can skip some machines also.

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

The sequence of visit of machines has to be maintained. For job j,

S[i+1],j S[i]j + p[i]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?

Let Sij be the start time of job j on machine i.

We minimize Z such that


Z S21 + 10
Z S22 + 11
Z S23 + 12

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.

(In the above formulation we have used M = 1000).

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.

Job shop Scheduling Minimizing sum of completion times, tardiness etc..


We consider other objectives such as minimizing sum of completion times, minimizing total
tardiness, minimizing maximum tardiness and minimizing the number of tardy jobs. The
objective function to minimize sum of completion times is given by

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].

To minimize maximum tardiness we add constraints u Tj and minimize u.


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.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.

Potrebbero piacerti anche