Sie sind auf Seite 1von 29

The Assignment Problem

MODULE II

ySensitivity analysis ;

allocation problems Assignment and distribution problems

The Assignment Problem


y In many business situations, management needs

to assign - personnel to jobs, - jobs to machines, machines to job locations, or - salespersons to territories. y Consider the situation of assigning n jobs to n machines. y When a job i (= 1, 2,...., n) is assigned to machine j (= 1, 2, ....., n) the cost incurred is Cij. y The objective is to assign the jobs to machines so that the total cost is minimised.

The Assignment Problem


y This situation is a special case of the

Transportation Model and it is known as the assignment problem. y Here, jobs represent sources and machines represent destinations. y The supply available at each source is 1 unit And demand at each destination is 1 unit.

"One machine can do the work of fifty ordinary men. No machine can do the work of one extraordinary man." -- Elbert Hubbard

The Assignment Problem

The assignment model can be expressed mathematically as follows: Xij= 0, if the job j is not assigned to machine i 1, if the job j is assigned to machine i

The Assignment Problem

The Assignment Problem


y Assignment problem can be either formulated

as a linear programming model, or it can be formulated as a transportation model.


y However, An algorithm known as Hungarian

Method has proven to be a quick and efficient way to solve such problems.

Hungarian Method Example


The following table gives the costs incurred in assigning jobs to certain machines in a factory. Determine the assignment that minimizes the cost.

Hungarian Method Example

Step 1: Select the smallest value in each row. Subtract this value from each value in that row Step 2: Select the smallest value in each column. Subtract this value from each value in that column.

Hungarian Method Example

Hungarian Method Example


Step 3 : (i) Examine the rows successively starting from the first, until a row with exactly one zero element is found. Put a box around the zero as an assigned element and cross out all other zeroes in that column. Proceed in this manner until all the rows have been examined. If there are more than one zero in any row, then do not consider that row but proceed to the next. (ii) Examine the columns successively starting from the first, until a column with exactly one zero element is found. Put a box around the zero as an assigned element and cross out all other zeroes in that row. Proceed in this manner until all the columns have been examined. If there are more than one zero in any column, then do not consider that row but proceed to the next.

Hungarian Method Example

Hungarian Method Example


Step 4 : If each row and column contain exactly one assigned zero then the assignment is optimal . y Therefore, we assign job 1 to machine 1; job 2 to machine 3, and job 3 to machine 2. y Total cost is 5+12+13 = 30. y It is not always possible to obtain a feasible assignment as in here.

PROBLEM 1
y Assign Jobs 1, 2, 3, 4 to inspectors A, B, C, D so that the cost is

minimised using the following data.

1 5 2 INSPECTORS 7 5

JOBS 2 7 3 8 3

3 9 4 9 2

4 8 5 1 4

PROBLEM 2
y A department has 5 employees and 5 jobs to be performed. The time

( in hours) that each employee takes is given below. Determine the job allocation that will minimise the man hours. E M P L O Y E E S Jobs 1 A B C D E 8 0 3 4 9 2 4 9 8 3 5 3 2 5 9 1 8 4 6 5 2 0 9 5 1 4 6 3 5

HOMEWORK 1
y Find the optimal assignment schedule given the following data.

1 10 3 EMPLOYEES 10 5

JOBS 2 5 9 7 11

3 13 8 3 9

4 15 3 2 7

Hungarian Method Example 2

Hungarian Method Example 2


y A feasible assignment is not possible at this moment. y In such a case, The procedure is to draw a minimum

number of lines through some of the rows and columns, Such that all zero values are crossed out.

Hungarian Method Example 2

y (i) Put a tick mark to those rows where no

assignments have been made. y (ii) Put a tick mark to those columns which have zeros in the marked rows. y (iii) Put a tick mark to those rows (not already marked) which have assignments (boxed zeroes) in marked columns. y (iv) Repeat (ii) and (iii) until no more rows and columns can be checked. y Draw lines through unmarked rows and marked columns. If the number of these lines is equal to the order of the matrix then the solution is optimal. Else go to the next step.

Hungarian Method Example 2

The next step is to select the smallest uncrossed out element. This element is subtracted from every uncrossed out element and added to every element at the intersection of two lines.

Hungarian Method Example 2


y We can now easily assign to the zero values. Solution is to assign (1 to 1), (2 to 3), (3 to 2) and (4 to 4). y If drawing lines do not provide an easy solution, then we should perform the task of drawing lines one more time. y Actually, we should continue drawing lines until a feasible assignment is possible.

Hungarian Algorithm
Check whether the number of rows = the number of columns in the cost matrix. If so the assignment problem is said to be balanced and we can proceed to Step 2. If it is not balanced and the number of rows is less than the number of columns add dummy rows with zero cost to balance the problem. If it is not balanced and the number of columns is less than the number of rows add dummy columns with zero cost to balance the problem. y Step 2: Select the smallest value in each row. Subtract this value from each value in that row. y Step 3: Select the smallest value in each column. Subtract this value from each value in that column.
y Step 1:

Hungarian Method Example


Step 4 : (i) Examine the rows successively starting from the first, until a row with exactly one zero element is found. Put a box around the zero as an assigned element and cross out all other zeroes in that column. Proceed in this manner until all the rows have been examined. If there are more than one zero in any row, then do not consider that row but proceed to the next. (ii) Examine the columns successively starting from the first, until a column with exactly one zero element is found. Put a box around the zero as an assigned element and cross out all other zeroes in that row. Proceed in this manner until all the columns have been examined. If there are more than one zero in any column, then do not consider that column but proceed to the next.

Hungarian Algorithm
y Step 5 : If each row and column contain exactly one assigned zero then the assignment is optimal. If either a row or a column does not contain exactly one assigned zero then the assignment is not optimal, go to Step 6. y Step 6: Cover all the zeros by drawing minimal number of lines as follows : y (i) Put a tick mark to those rows where no assignments have been made. y (ii) Put a tick mark to those columns which have zeros in the marked rows. y (iii) Put a tick mark to those rows (not already marked) which have assignments (boxed zeroes) in marked columns. y (iv) Repeat (ii) and (iii) until no more rows and columns can be checked.

Hungarian Algorithm
y Step 7 : Draw lines through unmarked rows and

marked columns. If the number of these lines is equal to the order of the matrix then the solution is optimal. Else go to the next step. y Step 8: Determine the smallest cost element not covered by the straight lines. Subtract this element from all the uncrossed elements, add it to the elements lying in the intersection of the straight lines and do not change the remaining elements on the straight lines. y Go to step 4 and repeat the procedure until an optimal solution is reached.

PROBLEM 1
y A department has 5 employees and 5 jobs to be performed. The time

( in hours) that each employee takes is given below. Determine the job allocation that will minimise the man hours. E M P L O Y E E S Jobs 1 A B C D E 10 3 10 7 7 2 5 9 7 11 9 3 13 18 2 9 10 4 15 13 2 7 4 5 16 6 2 12 12

PROBLEM 2
y The processing time ( in hours) for jobs when allocated

for different machines are indicated. Determine the job allocation that will minimise the total processing time.
JOBS M A C H I N E S 1 A B C D E 9 43 41 74 36 2 22 78 28 42 11 3 58 72 91 27 57 4 11 50 37 49 22 5 19 63 45 39 25

The Traveling Salesman Problem


y In the traveling salesman problem, there are m locations (or nodes) y And unit costs (Cij) are associated with traveling between locations i and j. y The goal is to find the cycle that minimizes the total (traveling) distance required to visit all locations (nodes) without visiting any location twice. y The Traveling salesman begins its journey from his/her home city And visits other cities (in no particular order) before returning home.

Das könnte Ihnen auch gefallen