Chapter 4: Discharge Model: Theory and Formulation
5.2 Model Results and Experimental Comparison
There are basically two methods of solving the assignment problems:
Enumeration of Solution Method
The enumeration method solves assignment problem by trying to see different permutation (arrangement) possible. Thereafter, we select the arrangement that gives the minimum cost. In the case of a maximisation problem, the arrangement that gives the maximum contribution will be selected. This method is better described by example. Below is an example to illustrate the enumeration method.
EXAMPLE 1
The personnel director of Naira Finance Corporation must assign three hired University graduates to three regional offices. The three new loan officers are equally well-qualified, so the decision will be based on the cost of allocating the graduates families. The cost data are presented in the accompanying table.
SOLUTION
The objective of the problem is to assign the three officers to the various locations in a way that will result in the lowest total cost to the company.
Note
The assignment of people to location must be on a one-to-one basis.
Each location will be assigned exclusively to one officer only. Also, the number of rows must always equal the number of columns.
Officers Locations ( ) #
I II III
A 11 14 6
B 8 10 11
C 9 12 7
Project Assignment Labour Costs
Total costs ( )
= = = = = = Conclusion
a. The computation above shows that the least cost solution would be to assign to project , to project and to project at a total cost of . Enumeration method works well for very small problems, but quickly becomes inefficient as the size of the assignment problem becomes large.
b. Hungarian Method or the Reduced Matrix Method
c. The Hungarian method of assignment provides us with an efficient means of finding the optimal solution without having to make comparison of every option. It operates on the principles of matrix reduction. This is done by just subtracting and adding appropriate numbers in the cost table/matrix.
The flow chart below gives an outline of the reduced matrix method to solve both maximisation and minimisation assignment problems.
#
I II III
A B C 11107 28.00
A C B 111211 34.00
B A C 8147 29.00
B C A 8126 26.00
C A B 91411 34.00
C B A 9106 25.00
C I B II A III
00 . 25
#
EXAMPLE 1
A company employs service engineers based at various locations throughout the country to service and repair their equipment installed in customers’ premises. Four requests for service have been received and the company finds that four engineers are available. The distance each
START
Set up problem as a square matrix
Reduce each column by smallest figure in that column for minimizing
For maximizing, reduce by largest figure OR
Reduce each row by smallest figure in that row
Cover zeros by minimum number of lines
Make Assignment to (i) Zeros unique to column and row (ii) Zeros unique to column or row
Yes
Calculate
cost/Mileage/Contribution or Final Assignment
STOP
Find smallest uncovered Element ( ) x
Subtract from uncovered Elements. Add to Elements covered twice
x No of lines
Assignment?
No
of the engineers is from the various customers is given in the following table and the company wishes to assign engineers to customers to minimise the total distance to be traveled.
Solution Step 1
Reduce each column by the smallest figure in that column. The smallest figures are , , and and deducting these values from each element in the columns produces the following table.
Step 2
Reduce each row by the smallest figure in that row. The smallest figures are , , and and deducting these values gives the following table.
Note
Where the smallest value in a row is zero (i.e. as in rows A, B and C above) the row is, of course, unchanged.
15 15 23 14
0 0 0 11
Service Engineers
Customers
W X Y Z
A 25 18 23 14
B 38 15 53 23
C 15 17 41 30
D 26 28 36 29
W X Y Z
A 10 3 0 0
B 23 0 30 9
C 0 2 18 16
D 11 13 13 15
W X Y Z
A 10 3 0 0
B 23 0 30 9
C 0 2 18 16
D 0 2 2 4
Step 3
Cover all the zeros in the above table by the MINIMUM POSSIBLE number of lines. The lines may be horizontal or vertical.
Note
Line , covering row B, could equally well have been drawn covering column X.
Step 4
i. Compare the number of lines with the number of assignments to be made (in this example, there are lines and assignments).
If the number of lines EQUALS the number of assignments to be made, go to Step 6. If the number of lines is LESS than the number of assignments to be made (i.e. as in this example which has three lines and four assignments) then:
ii. Find the smallest UNCOVERED element from Step 3 called (in the above table and this value is ).
iii. Subtract from every element in the matrix.
iv. Add back to every element covered by a line. If an element is covered by two lines, for example, cell A: W in the Table, is added twice.
Note
The effect of these steps is that is subtracted from all uncovered elements. Elements covered by one line remain unchanged, and elements covered by two lines are increased by .
Carrying out this procedure on the above table produces the following result:
In the above table the smallest element is . The new table is:
3
3 4
x 2
x x
x
x
x
2
W X Y Z
A 10 3 0 0
B 23 0 30 9
C 0 2 18 16
D 0 2 2 4
Line 2 Line 3
Line 1
Note
It will be seen that cells A:W and B:W have been increased by ; cells A:X, A:Y, A:Z, B:X, B:Y, B:Z, C:W and D:W are unchanged, and all other cells have been reduced by .
Step 5
Repeat Steps 3 and 4 until the number of lines covering the zeros equals the number of assignments to be made. In this example, covering the zeros in the table above by the minimum number of lines equals the number of assignments without any further repetition. Thus:
Table 6 Step 6
When the number of lines EQUALS the number of assignments to be made, the actual assignments can be made using the following rules:
a. Assign to any zero which is unique to BOTH a column and a row.
b. Assign to any zero which is unique to a column OR a row.
c. Ignoring assignments already made, repeat rule (ii) until all assignments are made.
Carrying out this procedure for our example results in the following:
a. (Zero unique to BOTH a column and a row). None in this example.
b. (Zero unique to column OR row). Assign B to X and A to Z.
The position is now as follow:
2 2
W X Y Z
A 12 3 0 0
B 25 0 30 9
C 0 0 16 14
D 0 0 0 2
W X Y Z
A 12 3 0 0
B 25 0 30 9
C 0 0 16 14
D 0 0 0 2
Line 1
Line 1 Line 2 Line 3 Line 4
c. Repeat rule (ii), results in assigning D to Y and C to W.
Notes
a. Should the final assignment not be to a zero, then more lines than necessary were used in Step 3.
b. If a block of or more zero’s is left for the final assignment, then a choice of assignments exists with the same distance.
Step 7
Calculate the total distance of the final assignment.
EXAMPLE 2
Example1 will be used with the changed assumption that the figures relate to contribution and not distance and that it is required to maximise contribution.
4
row Satisfied
Column satisfied row Satisfied
Column satisfied
Column satisfied Column satisfied
Column satisfied Column satisfied
to Distance to “
to “
to “
W X Y Z
A
B
C 0 16
D 0 0
A Z 14
B X 15
C W 15
D Y 36
80
Solution
In each case, the step number corresponds to the solution given for Example 1.
Original data
Step 1
Reduce each column by LARGEST figure in that column and ignore the resulting minus signs.
Step 2
Reduce each row by the SMALLEST figure in that row.
Step 3
Cover zeros by minimum possible number of lines
W X Y Z
A 25 18 23 14
B 38 15 53 23
C 15 17 41 30
D 26 28 36 29
W X Y Z
A 13 10 30 16
B 0 13 0 7
C 23 11 12 0
D 12 0 17 1
W X Y Z
A 3 0 20 6
B 0 13 0 7
C 23 11 12 0
D 12 0 17 1
W X Y Z
A 3 0 20 6
B 0 13 0 7
C 23 11 12 0
D 12 0 17 1
Contributions to be gained
Step 4
If the number of lines equals the number of assignments to be made, go to step 6. If less (as in example), carry out the ‘uncovered element’
procedure previously described. This results in the following table:
Step 5
Repeat steps 3 and 4 until number of lines equals the number of assignments to be made. In this example, this occurs without further repetition, thus:
Step 6
Make assignments in accordance with the rules previously described which result in the following assignments:
Step 7
Calculate contribution to be gained from the assignments.
to to to to
to to to to
W X Y Z
A 0 0 17 6
B 0 16 0 10
C 20 11 9 0
D 9 0 14 1
W X Y Z
A 0 0 17 6
B 0 16 0 10
C 20 11 9 0
D 9 0 14 1
C Z
D X
A W
B Y
C Z 30
D X 28
A W 25
B Y 53
Notes
a. It will be apparent that maximising assignment problems can be solved in virtually the same manner as minimising problems.
b. The solution methods given are suitable for any size of matrix. If a problem is as small as the illustration used in this chapter, it can probably be solved merely by inspection.