Trans
Trans
Assignment Problem
Sessions 11-14
Transportation and Assignment
Problems
Transportation and assignment problems tend to require a very
large number of functional constraints and decision variables, so
use of the simplex method may require an exorbitant
computational effort.
However, a key characteristic of these problems is that most of the
𝑎𝑖𝑗 coefficients in the functional constraints are zeros, and the
relatively few nonzero coefficients appear in a distinctive pattern.
As a result, it has been possible to develop special streamlined
algorithms that achieve dramatic computational savings by
exploiting this special structure of the problem.
Transportation Problem
Transportation Problem
Sources/ Destinations
Origins
Source: Vohra (2017: 216)
Problem Statement
Subject to:
σ𝑛𝑗=1 𝑥𝑖𝑗 = 𝑎𝑖 𝑖 = 1,2, … , 𝑚
σ𝑚
1=1 𝑥𝑖𝑗 = 𝑏𝑗 𝑗 = 1,2, … , 𝑛
𝑥𝑖𝑗 ≥ 0
Transportation Tableau
Solving a transportation problem
The company wants to send the output from various plants to the
warehouses to minimize the transportation cost. Formulate the problem as
a LPP.
Formulating a transportation problem
as a LPP
Transportation tableau
Let 𝑥𝑖𝑗 be the number of units shipped from plant i to warehouse j. The
problem can be stated as:
Minimize Z = 12 𝑥11 +10 𝑥12 +12 𝑥13 +13 𝑥14 +7 𝑥21 +11 𝑥22 +8 𝑥23 +14 𝑥24 +6 𝑥31 +16
𝑥32 +11 𝑥33 +7 𝑥34
Formulating a transportation problem
as a LPP
Subject to:
}
𝑥11 + 𝑥12 + 𝑥13 + 𝑥14 = 500
Supply constraints
𝑥21 + 𝑥22 + 𝑥23 + 𝑥24 = 300
𝑥31 + 𝑥32 + 𝑥33 + 𝑥34 = 200
}
𝑥11 + 𝑥21 + 𝑥31 = 180
𝑥12 + 𝑥22 + 𝑥32 = 150
Demand constraints
𝑥13 + 𝑥23 + 𝑥33 = 350
𝑥14 + 𝑥24 + 𝑥34 = 320
𝑥𝑖𝑗 ≥ 0 for 𝑖 = 1,2, … , 𝑚 and 𝑗 = 1,2, … , 𝑛
Steps involved in solving a
transportation problem
Obtain an initial solution, i.e., make an initial assignment in such a way that
an initial basic feasible solution is obtained.
Ascertain whether it is optimal or not, by determining the opportunity costs
associated with the empty cells. If the solution is optimal, then exit, and if
not optimal, proceed to step 3.
Revise the solution until an optimal solution is reached.
Exercise 1
From/ To D1 D2 D3 D4
S1 19 30 50 10
S2 70 30 40 60
S3 40 8 70 20
Formulate this transportation problem as an LPP to minimize the total
transportation cost
Step 1: Finding an initial feasible
solution
North-West Corner Rule
Least cost method
Vogel’s Approximation Method
Exercise 2
After obtaining the initial basic feasible solution, the next step is to test
whether it is optimal or not.
There are two methods for testing the optimality of a basic feasible solution.
Stepping-stone method
Modified distribution method (MODI)
Both methods can be used only when the solution is a basic feasible
solution, so that it has m + n – 1 basic variables
Step 3: Improving the solution
If the solution is not seen to be optimal, then a revised and improved basis
feasible solution is obtained. This is done by exchanging a non-basic
variable for a basic variable. In simple terms, rearrangement is made by
transferring units from an occupied cell to an empty cell that has the
largest opportunity costs, and then adjusting the units in other related cells
in a way that all the rim requirements are satisfied.
The solution so obtained is again tested for optimality (step 2) and revised, if
necessary. We continue this until an optimal solution is finally obtained.
Testing the Optimality
Stepping-stone method
The optimality test is applied by calculating the opportunity cost of each and
every empty cell
Modified Distribution method (MODI)
More efficient that the Stepping-stone method
Based on the concept of dual variables that are used to evaluate the empty
cells
Using these dual variables the opportunity cost of each empty cell is determined.
Both the methods can be used only when the solution is a initial basic
solution, so that it has m + n - 1 basic variables.
Stepping-stone method
For drawing a closed loop, begin with an empty cell and move alternately
horizontally and vertically, through occupied cells only, until reaching back
to the starting point.
• An even number of at least four cells must participate in a closed loop and an
occupied cell can be considered only once and not more.
• If there exists a basic feasible solution with m + n – 1 possible variables, then there
would be one and only one closed loop for each cell. This is irrespective of the
size of the matrix given.
• All cells that receive a plus or a minus sign, except the starting empty cell, must
be the occupied cell.
• Closed loops may or may not be square or rectangular in shape.
• Movement on the path set by the loop is generally clockwise. However, if the
progression on the path is anticlockwise, it would not affect the result.
Modified Distribution Method (MODI)
Step 1:
Add to the transportation tableau a column on the RHS titled 𝑢𝑖 and a row in the
bottom of it labelled 𝑣𝑗 . The objective is to obtain a value for each row and
column.
Step 2:
Calculate the 𝑢𝑖 and 𝑣𝑗 values with the help of occupied cells only. For this,
assign a value arbitrarily to a row or column variable 𝑢𝑖 or 𝑣𝑗 . The value may be
positive, negative or zero. Generally, a zero is assigned to the first row, i.e., 𝑢1 = 0
After assigning initial value, consider the row (column) to which this is assigned,
select an occupied cell in it and place in corresponding column (row) a value
such that the row and column value adds up to the cost element of the cell (𝑢𝑖 +
𝑣𝑗 = 𝑐𝑖𝑗 ). Repeat the process for any other occupied cell.
Modified Distribution Method (MODI)
Step 3
Having determined all 𝑢𝑖 and 𝑣𝑗 values, calculate for each unoccupied cell ∆𝑖𝑗 = 𝑢𝑖 + 𝑣𝑗 − 𝑐𝑖𝑗 .
The ∆𝑖𝑗 ’s represent the opportunity costs of various cells.
After obtaining the opportunity costs, proceed in the same way as in the stepping-stone
method.
If all the empty cells have negative opportunity cost, the solution is optimal and unique.
Modified Distribution Method (MODI)
∆14 = 0 + 18 − 13 = 5
∆21 = −4 + 12 − 7 = 1
∆22 = −4 + 10 − 11 = −5
∆31 = −11 + 12 − 6 = −5
∆32 = −11 + 10 − 16 = −17
∆33 = −11 + 12 − 11 = −10
Exercise 3
A cement company has three factories which manufacture cement which is then
transported to four distribution centers. The quantity of monthly production of each
factory, the demand of each distribution center and the associated transportation
cost per quintal are given as follows:
A steel company is concerned with the problem of distributing imported ore from
three ports to four steel mills. The supplies of ore arriving at the ports are:
Port P Q R
Tonnes per week 20,000 38,000 16,000
The transportation cost is Re 0.1 per tonne per km. The distance between the ports
and the steel mills is as given below:
In every workplace, there are jobs to be done and there are people
available to do them. But everyone is not equally efficient at every job.
Someone may be more efficient on one and less efficient on the other job.
The relative efficiency is reflected in terms of the time taken for, or the cost
associated with, performance of different jobs by different people.
An obvious problem for a manager to handle is to assign jobs to various
workers in a manner that they can be done in the most efficient way.
Interestingly, such problems can be formulated as linear programming
problems or as transportation problems and solved as such, but a method,
called Hungarian Assignment Method provides an easy route.
Typical example of an assignment
problem
A production supervisor is considering how he should assign the four
jobs that are to be performed by four of the workers. He wants to
assign the jobs to the workers such that the aggregate time to
perform the jobs is least. Based on previous experience, he has the
information on the time taken by the four workers in performing
these jobs, as given in the Table below:
Job
Worker A B C D
1 45 40 51 67
2 57 42 63 55
3 49 52 48 64
4 41 45 60 55
Solving an assignment problem using the
Hungarian Assignment Method (HAM)
Step 1: Locate the smallest cost element in each row of the cost table. Now
subtract this smallest element from each element in that row. As a result, there
shall be at least one zero in each row of this table called the Reduced Cost
Table.
Step 2: In the reduced cost table obtained, consider each column and locate
the smallest element in it. Subtract the smallest value from every other entry in
the column. As a consequence of this action, there would be at least one zero
in each of the rows and columns of the second reduced cost table.
Step 3: Draw the minimum number of horizontal and vertical lines (not diagonal
ones) that are required to cover all the ‘zero’ elements. If the number of lines
drawn is equal to n (the number of rows/ columns) the solution is optimal, and
proceed to step 6. If the number of lines drawn is less than n, go to step 4.
Hungarian Assignment Method
Step 4: If the number of lines covering all zeros is smaller than n, it has to
implication that the number of zeros and their locations do not permit us to
obtain the optimal solution. Thus, there is need to create more zeros. For
this, select the smallest uncovered (by lines) cost element. Subtract this
element from all uncovered elements including itself and add this element
to each value located at the interaction of any two lines. The cost
elements through which only one line passes remain unaltered.
a. Locate a row which contains only one ‘zero’ element. Assign the job corresponding
to this element to its corresponding person. Cross out the zeros, if any, in the column
corresponding to the element, which is indicative of the fact that the particular job
and person are no more available.
b. Repeat (a) for each of such rows which contain only one zero. Similarly, perform the
same operation in respect of each column containing only one ‘zero’ element,
crossing out the zero(s), if any, in the row in which the element lies.
c. If there is no row or column with only a single ‘zero’ element left, then select a row/
column arbitrarily and choose one of the jobs (or persons) and make the assignment.
Now cross the remaining zeros in the column and row in respect of which the
assignment is made.
d. Repeat steps (a) through (c) until all assignments are made.
e. Determine the total cost with reference to the original cost table.
Example 2
Job
Worker A B C D
1 45 40 51 67
2 57 42 63 55
3 49 52 48 64
4 41 45 60 55
Solution to Example 2
Step 1: The minimum value of each row is subtracted from all elements in
the row. It is shown in the reduced cost table, also called Opportunity Cost
Table
Job
Worker A B C D
1 5 0 11 27
2 15 0 21 13
3 1 4 0 16
4 0 4 19 14
Solution to Example 2
Step 2: For each column of this table, the minimum value is subtracted from
all the other values. Obviously, the columns that contain a zero would
remain unaffected by this operation. Here only the fourth column values
would change.
Job
Worker A B C D
1 5 0 11 14
2 15 0 21 0
3 1 4 0 3
4 0 4 19 1
Solution to Example 2
Step 3: Draw the minimum number of lines covering all zeros. As a general
rule, we should first cover those rows/ columns which contain a larger
number of zeros.
Job
Worker A B C D
1 5 0 11 14
2 15 0 21 0
3 1 4 0 3
4 0 4 19 1
Solution to Example 2
Step 4: Since the number of lines drawn is equal to 4(=n), the optimal
solution is obtained. The assignments are made after scanning the rows
and columns for unit zeros.
Job
Worker A B C D
1 5 0 11 14
2 15 0 21 0
3 1 4 0 3
4 0 4 19 1
The final pattern of assignments is 1-B, 2-D, 3-C, and 4-A, involving a total
time of 40 + 55 + 48 + 41 = 184 minutes
Exercise 7
Using the following cost matrix, determine (a) the optimal job assignments
and (b) the cost of assignments
Job
Machinist 1 2 3 4 5
A 10 3 3 2 8
B 9 7 8 2 7
C 7 5 6 2 4
D 3 5 8 2 4
E 9 10 9 6 10
Exercise 8
A computer centre has three expert programmers. The centre wants three
application programs to be developed. The head of the computer centre,
after carefully studying the programs to be developed, estimates the
computer time in minutes required by the experts for the application
programs as follows:
Assign the programmers to the programs in such a way that the total
computer time is minimum.
Exercise 9
How should the jobs be allocated, one per employee, so as to minimize the
total man-hours?