assignment problem

34
ASSIGNMENT PROBLEM PROBLEM Anggy Herny Anggraeni 13030214016 Mathematics 2013-B

Upload: anggy-herny-anggraeni

Post on 12-Jul-2015

275 views

Category:

Education


1 download

TRANSCRIPT

Page 1: Assignment problem

ASSIGNMENT PROBLEMPROBLEM

Anggy Herny Anggraeni

13030214016

Mathematics 2013-B

Page 2: Assignment problem

Standard Assignment Problems

Consider a machine shop with M machine and J job where M=N

Xji = if job j is assigned to machine i otherwise

Since each machine is assigned exactly to one

1

0

Since each machine is assigned exactly to one job, we have

for i = 1,2,...,n

Similiary each job is assigned exactly to one machine

for j = 1,2,...,n

Page 3: Assignment problem

Nonstandard Assignment Problem

Consider a machine shop with M machines and J jobs where M ≠ J.

If more machines than jobs If more machines than jobs

(M > J)

or

If more jobs than machines

(M < J)

Page 4: Assignment problem

STEPS OF HUNGARIAN METHOD

STEP 1 : reduce all element of rows with the smallest element of each row.

STEP 2 : if there is zero more than one on the row, then do step one of the coloumn that don’ t have zero.coloumn that don’ t have zero.

STEP 3 : if there is job that doesn’t have pair, then we search it with close the row and coloumn which have zero. After that do step one and add the minimal value on the intersection of row and coloumn.

Page 5: Assignment problem

Find the optimal assignment of four jobs and four machines when the cost of assignment is given by the following table

J1 J2 J3 J4

M1 10 9 8 7M1 10 9 8 7

M2 3 4 5 6

M3 2 1 1 2

M4 4 3 5 6

Page 6: Assignment problem

Find less costs from the rows

J1 J2 J3 J4

M1 10 9 8 7M1 10 9 8 7

M2 3 4 5 6

M3 2 1 1 2

M4 4 3 5 6

Page 7: Assignment problem

This produces the following cost matrix

J1 J2 J3 J4

M1 3 2 1 0M1 3 2 1 0

M2 0 1 2 3

M3 1 0 0 1

M4 1 0 2 3

Page 8: Assignment problem

J1 J2 J3 J4

M1 3 2 1 0

M2 0 1 2 3

M3 1 0 0 1

M4 1 0 2 3

From the above table a feasible assignment using only the cells with zero costs is M1 → J4, M2→ J1, M3 → J3, and M4 → J2. Hence, this is an optimal assignment. The total cost is given by 7+3+1+3 = 14

M4 1 0 2 3

Page 9: Assignment problem

ExampleFind an optimal solution to an assignment problem with the following cost matrix:

J1 J2 J3 J4

M1 10 9 7 8M1 10 9 7 8

M2 5 8 7 7

M3 5 4 6 5

M4 2 3 4 5

Page 10: Assignment problem

First the minimum element in each row is subtracted from all the moments in that row. This gives the followin reduced-cost matrix.

J1 J2 J3 J4

M1 10 9 7 8M1 10 9 7 8

M2 5 8 7 7

M3 5 4 6 5

M4 2 3 4 5

Page 11: Assignment problem

First the minimum element in each row is subtracted from all the moments in that row. This gives the followin reduced-cost matrix.

J1 J2 J3 J4

M1 3 2 0 1M1 3 2 0 1

M2 0 3 2 2

M3 1 0 2 1

M4 0 1 2 3

Page 12: Assignment problem

Since both the machines M2 and M4

have zero cost corresponding to job J1

only, a feasible assignment using only cells with zero costs is not possible.

J1 J2 J3 J4

M1 3 2 0 1

M2 0 3 2 2

M3 1 0 2 1

M4 0 1 2 3

Page 13: Assignment problem

To get additional zeros subtract the minimum element in the fourth column from all the elements in that column.

J1 J2 J3 J4

M1 3 2 0 1M1 3 2 0 1

M2 0 3 2 2

M3 1 0 2 1

M4 0 1 2 3

Page 14: Assignment problem

To get additional zeros subtract the minimum element in the fourth column from all the elements in that column.

J1 J2 J3 J4

M1 3 2 0 1

M2 0 3 2 2

M3 1 0 2 1

M4 0 1 2 3

Page 15: Assignment problem

To get additional zeros subtract the minimum element in the fourth column from all the elements in that column.

J1 J2 J3 J4

M1 3 2 0 0

M2 0 3 2 1

M3 1 0 2 0

M4 0 1 2 2

Page 16: Assignment problem

The machines M2 and M4 have zero cost corresponding to job J1 only

J1 J2 J3 J4

M1 3 2 0 0M1 3 2 0 0

M2 0 3 2 1

M3 1 0 2 0

M4 0 1 2 2

Page 17: Assignment problem

The procedure draws a minimum number of lines through some selected rows and columns in such a way that all the cells with zero costs are covered by the lines.

J1 J2 J3 J4

M1 3 2 0 0M1 3 2 0 0

M2 0 3 2 1

M3 1 0 2 0

M4 0 1 2 2

Page 18: Assignment problem

Reduce with the minimum element not covered with lines on matrix

J1 J2 J3 J4

M1 3 2 0 0

M2 0 3 2 1

M3 1 0 2 0

M4 0 1 2 2

Page 19: Assignment problem

Reduce with the minimum element not covered with lines on matrix

J1 J2 J3 J4

M1 3 2 0 0M1 3 2 0 0

M2 0 3 2 1

M3 1 0 2 0

M4 0 1 2 2

Page 20: Assignment problem

The procedure draws a minimum number of lines through some selected rows and columns in such a way that all the cells with zero costs are covered by the lines.

J1 J2 J3 J4

M1 3 2 0 0M1 3 2 0 0

M2 0 2 1 0

M3 1 0 2 0

M4 0 0 1 1

Page 21: Assignment problem

Then add this number to all those covered elements that are at the intersection of two lines.

J1 J2 J3 J4

M1 3 2 0 0M1 3 2 0 0

M2 0 2 1 0

M3 1 0 2 0

M4 0 0 1 1

Page 22: Assignment problem

J1 J2 J3 J4

M1 4 2 0 0

Then add this number to all those covered elements that are at the intersection of two lines.

M1 4 2 0 0

M2 0 2 1 0

M3 2 0 2 0

M4 0 0 1 1

Page 23: Assignment problem

J1 J2 J3 J4

M1 4 2 0 0

M2 0 2 1 0

M3 2 0 2 0

M4 0 0 1 1

A feasible assignment is now possible and an optimal solution is to assign M1→J3, M2→J1, M3→J4, and M4→J2. The total cost is given by 7 + 5 + 5 + 3 = 20.

Page 24: Assignment problem

To solve Maximization Problems

Step I.Convert the problem to a minimization problem by multiplying all the elements (cij) of the assignment matrix by – 1

Step II.If some of the elements of tthe cost matrix are negative, add a sufficiently large positive are negative, add a sufficiently large positive number to the corresponding rows and columns so that all the cost elements would become nonnegative.

Step III.We now have an assignment problem with a minimization objective and all cost elements nonnegative. The Hungarian Method can now be applied directly.

Page 25: Assignment problem

ExerciseA batch of four jobs can be assigned to five different

machines. The setup time for each job on various machines is given by the following table and

J1 J2 J3 J4 J5

M1 10 11 4 2 8

find an optimal assignment of jobs to machines

which will minimize the total setup time.

M1 10 11 4 2 8

M2 7 11 10 14 12

M3 5 6 9 12 14

M4 13 15 11 10 7

Page 26: Assignment problem

Make 1 row for M5 with zero costs

J1 J2 J3 J4 J5

M1 10 11 4 2 8

M2 7 11 10 14 12

M3 5 6 9 12 14

M4 13 15 11 10 7

Page 27: Assignment problem

Make 1 row for M5 with zero costs

J1 J2 J3 J4 J5

M1 10 11 4 2 8

M2 7 11 10 14 12

M3 5 6 9 12 14

M4 13 15 11 10 7

M5 0 0 0 0 0

Page 28: Assignment problem

Find less costs from every rows

J1 J2 J3 J4 J5

M1 10 11 4 2 8

M2 7 11 10 14 12M2 7 11 10 14 12

M3 5 6 9 12 14

M4 13 15 11 10 7

M5 0 0 0 0 0

Page 29: Assignment problem

The machines M2 and M4 have zero cost corresponding to job J1 only

J1 J2 J3 J4 J5

M1 8 9 2 0 6

M2 0 4 3 7 5

M3 0 1 4 7 9

M4 6 8 4 3 0

M5 0 0 0 0 0

Page 30: Assignment problem

To get additional zeros subtract the minimum element in the second and third column from all the elements in that column.

J1 J2 J3 J4 J5

M1 8 9 2 0 6

M2 0 4 3 7 5

M3 0 1 4 7 9

M4 6 8 4 3 0

M5 0 0 0 0 0

Page 31: Assignment problem

To get additional zeros subtract the minimum element in the second and third column from all the elements in that column.

J1 J2 J3 J4 J5

M1 8 9 2 0 6

M2 0 4 3 7 5

M3 0 1 4 7 9

M4 6 8 4 3 0

M5 0 0 0 0 0

Page 32: Assignment problem

To get additional zeros subtract the minimum element in the second and third column from all the elements in that column.

J1 J2 J3 J4 J5

M1 8 8 0 0 6

M2 0 3 1 7 5

M3 0 0 2 7 9

M4 6 7 2 3 0

M5 0 0 0 0 0

Page 33: Assignment problem

J1 J2 J3 J4 J5

M1 8 8 0 0 6

M2 0 3 1 7 5

M3 0 0 2 7 9

M4 6 7 2 3 0

A feasible assignment is now possible and an optimal solution is to assign M1→J4, M2→J1, M3→J2, M4→J5, and M5→J3. The total cost is given by 2+7+6+7+0=22.

M4 6 7 2 3 0

M5 0 0 0 0 0

Page 34: Assignment problem

Thanks For Your Attention Thanks For Your Attention