Download - Assignment Problem Operations Research

Transcript
Page 1: Assignment Problem Operations Research

Assignment Problem

Dr. CVC’s Lecture Material

Dr. CVC’s Lecture Material

Page 2: Assignment Problem Operations Research

Dr. CVC’s Lecture Material

Dr. CVC’s Lecture Material

Assignment Problem

Introduction:

* It is a special kind of transportation problem

* In this case each source should have the capacity to fulfill the demand of any of the destinations

* In other words, each resource (workers) can be assigned to ONLY ONE job and each job required ONLY ONE resource.

Assignment model consists of assignment of ‘m’ resource (workers, salesperson etc.,) to ‘m’ resources (jobs) so as to minimize the overall cost or time in such a way that

one unit of resource is associated with one and only one job.

Examples:

Row entry Column entry cell entryJobs Operations Processing timeOperators Machine Processing timeDrivers Routes Travel timeTeacher Subject Student pass %Physician Treatment No. of cases handledSalesman Sales area Time

Page 3: Assignment Problem Operations Research

Types of assignment

Balanced andUnbalanced

Page 4: Assignment Problem Operations Research

Developed and published by Harold Kuhn in 1955

He gave the name "Hungarian method" because the algorithm was largely

based on the earlier works of two Hungarian mathematicians:

Dénes Kőnig and Jenő Egerváry

Hungerian method can be applied to solve the assignment problem in an easy way

HUNGERIAN METHOD:

It consists of two phases:

First phase: row reductions and column reductions are carried out Second phase: The solution is optimized on iterative basis

Dr. CVC’s Lecture Material

Dr. CVC’s Lecture Material

Page 5: Assignment Problem Operations Research

Phase I: Row and column reductions

Step 0: write down the cost matrix of the given assignment problem

Step 1: Write down the minimum value of each row on the right side of the matrix.

Obtain the next matrix by subtraction these minimum values from the entries of the row respectively

Step 2: Write down the minimum value of each column at the bottom of the matrix. Obtain the next matrix by subtracting the minimum value of each column from the entries of that column.

Now, the matrix is ready for phase 2

Algorithms to solve assignment problems:Algorithms to solve assignment problems:

Dr. CVC’s Lecture Material

Dr. CVC’s Lecture Material

Page 6: Assignment Problem Operations Research

Phase II: Optimization of the problem

Step 3: Draw a minimum number of lines to cover all the zeros of the matrix. The procedure for drawing minimum number of lines involves the following steps:

3.1 Row scanning:1. Starting from the first row, scan each row one by one.

If you come across exactly one zero, mark a square around that zero and draw a vertical line passing through that zero; otherwise skip that row.

2. After scanning the last row, check whether all the zeros are covered with lines. If yes, go to step 4; otherwise, do column scanning as explained below.

3.2 Column scanning:1. Starting from the first column, scan each row one by one.

If you come across exactly one zero, mark a square around that zero and draw a horizontal line passing through that zero: otherwise skip that column.

2. After scanning the last column, check whether all the zeros are covered with lines. If yes, go to step 4; otherwise, do row scanning as explained above.

Dr. CVC’s Lecture Material

Dr. CVC’s Lecture Material

Page 7: Assignment Problem Operations Research

Step 4: Check whether the number of squares marked is equal to the number of rows of the matrix. If yes, go to step 7; otherwise, go to step 5.

Step 5: Identify the minimum value of the undeleted cell values. Obtain the next matrix by following the steps mentioned below.

5.1 Copy the entries on the lines but not on the intersection points of the present matrix as such without any modification to the corresponding positions of the next matrix.

5.2 Copy the entries at the intersection points of the present matrix after adding the minimum undeleted cell value to the corresponding positions of the next matrix.

5.3 Subtract the minimum undeleted cell value from all the undeleted cell values and then copy them to the corresponding positions of the next matrix.

Step 6: Go to step 3.

Step 7: Treat the solution as marked by the squares as the optimal solution.

(Note: In performing step 3, sometimes it will repeat endlessly when the number of zeros in the applicable rows as well as columns is more than one. Under such situation, one should mark squares on diagonally opposite cells having zeros. This means multiple optimal solutions exist.)

Dr. CVC’s Lecture Material

Dr. CVC’s Lecture Material

Page 8: Assignment Problem Operations Research

1 2 3 4 5

1 10 12 15 12 8

2 7 16 14 14 1

3 13 14 7 9 9

4 12 10 11 13 10

5 8 13 15 11 15

Consider a assignment problem as shown below. In this problem 5 different jobs are to be assigned to 5 different operators such that the total processing time is minimized. The matrix entries represent processing time in ‘hours’

Develop a zero-one programming model and solve the problem by “Hungerian method”

Page 9: Assignment Problem Operations Research

1 2 3 4 5

1 10 12 15 12 8

2 7 16 14 14 1

3 13 14 7 9 9

4 12 10 11 13 10

5 8 13 15 11 15

Phase I: Row and column reductions

Step 0: write down the cost matrix of the given assignment problem

Dr. CVC’s Lecture Material

Dr. CVC’s Lecture Material

Page 10: Assignment Problem Operations Research

1 2 3 4 5RowMin.

1 10 12 15 12 8 8

2 7 16 14 14 1 7

3 13 14 7 9 9 7

4 12 10 11 13 10 10

5 8 13 15 11 15 8

Step 1: Write down the minimum value of each row on the right side of the matrix.

Phase I: Row and column reductions…..

Obtain the next matrix by subtracting these minimum values from the entries of the row respectively

1 2 3 4 5

1 2 4 7 4 0

2 0 9 7 7 4

3 6 7 0 2 2

4 2 0 1 3 0

5 0 5 7 3 7

Matrix after Row Reduction

Row Reduction

Dr. CVC’s Lecture Material

Dr. CVC’s Lecture Material

Page 11: Assignment Problem Operations Research

Phase I: Row and column reductions…..

1 2 3 45

1 2 4 7 4 0

2 0 9 7 7 4

3 6 7 0 2 2

4 2 0 1 3 0

5 0 5 7 3 7

Column Min.

0 0 0 2 0

Matrix after Column Reduction

Step 2: Write down the minimum value of each column at the bottom of the matrix.

Column Reduction

Obtain the next matrix by subtracting the minimum value of each column from the entries of that column.

1 2 3 45

1 2 4 7 2 0

2 0 9 7 5 4

3 6 7 0 0 2

4 2 0 1 1 0

5 0 5 7 1 7

Now, the matrix is ready for phase 2

Dr. CVC’s Lecture Material

Dr. CVC’s Lecture Material

Page 12: Assignment Problem Operations Research

Phase II: Optimization of the problem

Step 3: Draw a minimum number of lines to cover all the zeros of the matrix. The procedure for drawing minimum number of lines involves the following steps:

3.1 Row scanning:1. Starting from the first row, scan each row one by one.

If you come across exactly one zero, mark a square around that zero and draw a vertical line passing through that zero; otherwise skip that row.

2. After scanning the last row, check whether all the zeros are covered with lines. If yes, go to step 4; otherwise, do column scanning as explained below.

3.2 Column scanning:1. Starting from the first column, scan each row one by one.

If you come across exactly one zero, mark a square around that zero and draw a horizontal line passing through that zero: otherwise skip that column.

2. After scanning the last column, check whether all the zeros are covered with lines. If yes, go to step 4; otherwise, do row scanning as explained above.

Dr. CVC’s Lecture Material

Dr. CVC’s Lecture Material

Page 13: Assignment Problem Operations Research

1 2 3 45

1 2 4 7 2 0

2 0 9 7 5 4

3 6 7 0 0 2

4 2 0 1 1 0

5 0 5 7 1 7

Phase II: Optimization of the problem

Step 3: Draw a minimum number of lines to cover all the zeros of the matrix. 3.1 Row scanning:1. Starting from the first row, scan each row one by one.

If you come across exactly one zero, mark a square around that zero and draw a vertical line passing through that zero; otherwise skip that row.

2. After scanning the last row, check whether all the zeros are covered with lines. If yes, go to step 4; otherwise, do column scanning.

X - Two zeros

X - No zeros

3.2 Column scanning:

Dr. CVC’s Lecture Material

Dr. CVC’s Lecture Material

Page 14: Assignment Problem Operations Research

1 2 3 45

1 2 4 7 2 0

2 0 9 7 5 4

3 6 7 0 0 2

4 2 0 1 1 0

5 0 5 7 1 7

Step 4: Check whether the number of squares marked is equal to the number of rows of the matrix. If yes, go to step 7; otherwise, go to step 5.

Number of square marked is 4 and is NOT EQUAL Number of rows (5)

Hence, the solution is NOT Feasible and Optimal

Therefore, we have to follow step 5

Dr. CVC’s Lecture Material

Dr. CVC’s Lecture Material

Page 15: Assignment Problem Operations Research

Step 5: Identify the minimum value of the undeleted cell values. Obtain the next matrix by following the steps mentioned below.

5.1 Copy the entries on the lines but not on the intersection points of the present matrix as such without any modification to the corresponding positions of the next matrix.

1 2 3 45

1 2 4 7 2 0

2 0 9 7 5 4

3 6 7 0 0 2

4 2 0 1 1 0

5 0 5 7 1 7

1 2 3 45

1 2 4 0

2 0 9 4

3 0 0

4 2 0 0

5 0 5 7

Minimum value of the undeleted cell value

Dr. CVC’s Lecture Material

Dr. CVC’s Lecture Material

Page 16: Assignment Problem Operations Research

5.2 Copy the entries at the intersection points of the present matrix after adding the minimum undeleted cell value to the corresponding positions of the next matrix.5.3 Subtract the minimum undeleted cell value from all the undeleted cell value and then copy them to the corresponding positions of the next matrix.

1 2 3 45

1 2 4 6 1 0

2 0 9 6 4 4

3 7 8 0 0 3

4 2 0 0 0 0

5 0 5 6 0 7

1 2 3 45

1 2 4 7 2 0

2 0 9 7 5 4

3 6 7 0 0 2

4 2 0 1 1 0

5 0 5 7 1 7

Minimum value of the undeleted cell value Step 6: Go to step 3.

Dr. CVC’s Lecture Material

Dr. CVC’s Lecture Material

Page 17: Assignment Problem Operations Research

1 2 3 4 5Row Min.

1 2 4 6 1 0 0

2 0 9 6 4 4 0

3 7 8 0 0 3 0

4 2 0 0 0 0 0

5 0 5 6 0 7 0

ColumnMin.

0 0 0 0 0

Step 3: Draw a minimum number of lines to cover all the zeros of the matrix. 3.1 Row scanning: 3.2 Column scanning:

1 2 3 45

1 2 4 6 1 0

2 0 9 6 4 4

3 7 8 0 0 3

4 2 0 0 0 0

5 0 5 6 0 7

Dr. CVC’s Lecture Material

Dr. CVC’s Lecture Material

Page 18: Assignment Problem Operations Research

Step 4: Check whether the number of squares marked is equal to the number of rows of the matrix. If yes, go to step 7; otherwise, go to step 5.

Yes, Number of square marked (5) is equal to the number of rows.Hence, the solution is optimal and feasible.

Optimal solution

Job Operator Time (Hrs.)

1 5 8

2 1 7

3 3 7

4 2 10

5 4 11

Total processing time 43

Dr. CVC’s Lecture Material

Dr. CVC’s Lecture Material

Page 19: Assignment Problem Operations Research
Page 20: Assignment Problem Operations Research

Assignment ProblemExample 2:

Page 21: Assignment Problem Operations Research

Example 3:Assignment Problem

Page 22: Assignment Problem Operations Research

-22

-22

-24

-24

- - - -

- - - -

- - - -

- - - -

Page 23: Assignment Problem Operations Research

- - - -

- - - -

- - - -

- - - -

12 0 10 8

13 4 0 12

0 4 12 6

8 10 0 40 0 0 4

Page 24: Assignment Problem Operations Research

- - - -

- - - -

- - - -

- - - -

12 0 10 4

13 4 0 8

0 4 12 2

8 10 0 0

- - - -

- - - -

- - - -

- - - -

12 0 10 4

13 4 0 8

0 4 12 2

8 10 0 0

Page 25: Assignment Problem Operations Research

Final Solution

Page 26: Assignment Problem Operations Research
Page 27: Assignment Problem Operations Research

Example 4:Assignment Problem

Page 28: Assignment Problem Operations Research

Example 5:Assignment Problem

Page 29: Assignment Problem Operations Research

Example 6:Assignment Problem

Page 30: Assignment Problem Operations Research

Part /

Roll No.

1-11 12-22 23-33 33-43 44-54 55-65

Part A 1 2 3 4 5 6

Part B 6 5 4 3 2 1

Part C 1 2 3 4 5 6

Part D 6 5 4 3 2 1

Entry in each indicates the question number

First Assignment:Unit –I and II