IE141 - IX.b. Assignment Model
IE141 - IX.b. Assignment Model
IE141 - IX.b. Assignment Model
OPERATIONS
RESEARCH 1
SPECIAL CASES OF TRANSPORTATION
MODELS:
THE TRANSSHIPMENT AND ASSIGNMENT
PROBLEM
Learning objectives:
• At the end of this module, the student should be able to:
• 1. Differentiate regular transportation model, assignment model and transshipment
model.
• 2. Solve the optimal solution for transshipment and assignment problem.
Assignment Model and
Transshipment Model
Assignment Model
• Special case of the transportation model,
• “the best person for the job”
Assignment Model
• This situation is a special case of the Transportation Model and it is
known as the assignment problem.
• For balanced model (demand=supply), the supply available at each
source is 1 unit and demand at each destination is 1 unit.
Assignment Model - Application
• Situation where management needs to assign - personnel to jobs, -
jobs to machines, machines to job locations, or - salespersons to
territories.
• Consider the situation of assigning n jobs to n machines.
• When a job i (=1,2,....,n) is assigned to machine j (=1,2, .....n) that incurs a cost
Cij
• The objective is to assign the jobs to machines at the least possible total cost.
• Here, jobs represent “sources” and machines represent “destinations.”
Solution to Assignment Problem
To find the optimal solution, the following techniques can be
used:
• Hungarian Method
Hungarian Method
• Technique than can be used to solve Assignment Problem
• The steps of The Hungarian Method are as listed below:
1. Find a bfs. Find the minimum element in each row of the n x n cost matrix.
2. Construct a new matrix by subtracting from each cost the minimum cost in
its row.
3. For this new matrix, find the minimum cost in each column. Construct a
new matrix (reduced cost matrix) by subtracting from each cost the
minimum cost in its column.
Hungarian Method
• Technique than can be used to solve Assignment Problem
• The steps of The Hungarian Method are as listed below (contd):
4. Draw the minimum number of lines (horizontal and/or vertical) that are needed to
cover all zeros in the reduced cost matrix.
5. If n lines are required, an optimal solution is available among the covered zeros in
the matrix. If fewer than n lines are required, proceed to step 6.
6. Find the smallest nonzero element (call its value k) in the reduced cost matrix that
is uncovered by the lines drawn in step 5.
7. Now subtract k from each uncovered element of the reduced cost matrix and add
k to each element that is covered by two lines.
8. If the required number of lines is met, the optimal solution has been found. Else,
repeat steps 4-8.
Example 1. Assigning Machine to Job sites
• A construction company has four large cement mixers located at four different storage
facility. The mixers are to be moved to four different construction sites. The distances in
kilometers between the cement mixers and the construction sites are given in the table.
Mixer\Site A B C D
1 95 78 76 82
2 40 88 56 67
3 130 98 91 107
4 50 113 96 117
• How should the cement mixers be moved to the construction sites in order to minimize
the total distance travelled?
Solution: Example 1 using Hungarian Method
• Step 1. Find the minimum element in Step 2. Construct a new matrix by subtracting
each row of the n x n cost matrix. from each cost the minimum cost in its row.
Mixer\Sit
A B C D Min Mixer
e A B C D
\Site
1 95 78 76 82 76 1 19 2 0 6
2 40 88 56 67 40 2 0 48 16 27
3 130 98 91 107 91 3 39 7 0 16
4 50 113 96 117 50 4 0 63 46 67
Solution: Example 1 using Hungarian Method
Step 3. For this new matrix, find the minimum cost in each column. Construct a new matrix
(reduced cost matrix) by subtracting from each cost the minimum cost in its column.
Mixer\Site A B C D Mixer\Site A B C D
1 19 2 0 6 1 19 0 0 0
2 0 48 16 27
2 0 46 16 21
3 39 7 0 16
3 39 5 0 10
4 0 63 46 67
4 0 61 46 61
Min 0 2 0 6
Solution: Example 1 using Hungarian Method
Step 4. Draw the minimum number of lines (horizontal and/or vertical) that are
needed to cover all zeros in the reduced cost matrix. Note: we can draw more than 3
lines here to cover the zeros, but we need the minimum number of lines to cover all
the zeros.
Mixer\Site A B C D
1 19 0 0 0
2 0 46 16 21
3 39 5 0 10
4 0 61 46 61
Step 5. If n lines are required, an optimal solution is available among the covered zeros in the matrix. If
fewer than n lines are required, proceed to step 6. (Here, n=number of columns/row = 4) . Thus, since only
3 lines are needed to cover all the zeros, proceed to step 6.
Solution: Example 1 using Hungarian Method
Step 6. Find the smallest nonzero Step 7. Subtract k from each uncovered element of the
element (call its value k) in the reduced reduced cost matrix and add k to each element that is
cost matrix that is uncovered by the
lines drawn in step 5. (k=16) covered by two lines.
Mixer\Site A B C D Mixer\Site A B C D
1 19 0 0 0 1 35 0 0 0
2 0 46 16 21 2 0 30 0 5
3 39 5 0 10 3 55 5 0 10
4 0 61 46 61 4 0 45 30 45
Solution: Example 1 using Hungarian Method
Step 8. If the required number of lines is met, the Subtract k from each uncovered element of the reduced
optimal solution has been found. Else, repeat
steps 4-8. (Since only 3 lines were needed to cost matrix and add k to each element that is covered by
cover all the zeros, repeat steps 4-8.
two lines.
K=5
Mixer\Site A B C D Mixer\Site A B C D
1 35 0 0 0 1 40 0 5 0
2 0 30 0 5 2 0 25 0 0
3 55 5 0 10 3 55 0 0 5
4 0 45 30 45 4 0 40 30 40
Solution: Example 1 using Hungarian Method
If the required number of lines is met, the
optimal solution has been found. Else, repeat Find the zero cost assignment from the last
steps 4-8. (Since 4 lines is the minimum number matrix generated,
of lines needed to cover all the zeros, optimal
solution is found.
Mixer\Site A B C D Mixer\Site A B C D
1 40 0 5 0 1 40 0 5 0
2 0 25 0 0 2 0 25 0 0
3 55 0 0 5 3 55 0 0 5
4 0 40 30 40 4 0 40 30 40
Solution: Example 1 using Hungarian Method
Multiple optimal solution exist.
Mixer\Site A B C D Mixer\Site A B C D
1 40 0 5 0 1 40 0 5 0
2 0 25 0 0 2 0 25 0 0
3 55 0 0 5 3 55 0 0 5
4 0 40 30 40 4 0 40 30 40
Solution: Example 1 using Hungarian Method
To calculate the total distance, refer to the original distance given
Bulldozer\Site A B C D Bulldozer\Site A B C D
1 95 78 76 82 1 95 78 76 82
2 40 88 56 67 2 40 88 56 67
Method 2
3
40
130
88
98
56
91
67
107
4 50 113 96 117
• The optimal solution to the assignment problem is
shown in the table with the minimum total
distance travelled equal to 286 kms.
Distance Distance
Bulldozer Site Bulldozer Site
Travelled Travelled
1 D 82 1 B 78
2 C 56 2 D 67
3 B 98 or 3 C 91
4 A 50 4 A 50
Total 286 Total 286
Mini Exercise
What are the tasks that can be assigned to each staff in order to
minimize the time to create a report? (5 pts)
1 9 4 10 11
Staff
2 8 6 3 7
3 6 5 2 4
4 3 3 8 3
Transshipment Problems
• A transportation problem allows only shipments that go directly
from supply points to demand points.
• Transshipment models are more general than that of regular
transportation model where it allows shipment to pass through
intermediate or transient nodes (also called transshipment points)
before reaching the final destination.
• The optimal solution to a transshipment problem can be found by
solving a transportation problem. But it must be first converted to a
regular transportation model using the idea of buffer.
Transshipment Problems
• LP Formulation
• Pure Supply point: it can send goods to another point but cannot receive
goods from any other point
• Pure Demand point: it can receive goods from other points but cannot send
goods to any other point
• Transshipment point: It can both receive goods from other points send goods
to other points
Transshipment Problems
D3 500
Step 1: Compute the total supply and total demand. Check if balanced, if not, add dummy.
Since total supply=total demand, there is no need to add dummy.
D1 800
8
3
1,000 P1 T1 6
5
Total Supply 4 Total Demand
=1000+ 1200
=2200 7 D2 900 = 800+ 900+500
=2200
2 4
1,200 P2 5 T2 9 3
D3 500
Step 1: Compute the total supply and total demand. Check if balanced, if not, add dummy.
Buffer = B = maximum between total supply and total demand = 2,200
D1 800
8
3
1,000 P1 T1 6
5
Total Supply 4 Total Demand
=1000+ 1200
=2200 7 D2 900 = 800+ 900+500
=2200
2 4
1,200 P2 5 T2 9 3
D3 500
Identify the Pure Supply Points, pure demand points and transshipment points.
D1 800
8
3
1,000 P1 T1 6
5
Total Supply 4 Total Demand
=1000+ 1200
=2200 7 D2 900 = 800+ 900+500
=2200
2 4
1,200 P2 5 T2 9 3
D3 500
Step 3. A row in the tableau will be needed for each supply point and transshipment point, and a
column will be needed for each demand point and transshipment point.
T1 T2 D1 D2 D3 Supply
P1
P2
T1
T2
D1
D2
Demand
•Step 3.
1. Each supply point will have a supply equal to its original supply
2. Each demand point will have a demand equal to its original demand
3. Since B = 2,200, each transshipment point will have a:
supply equal to (point’s original supply)+B, and
demand equal to (point’s original demand)+B.
T1 T2 D1 D2 D3 Supply
P1 1000
P2 1200
T1 B
T2 B
D1 B
D2 B
T1 T2 D1 D2 D3 Supply
3 4 M M M
P1 1000
2 5 M M M
P2 1200
0 7 8 6 M
T1 2200
M 0 M 4 9
dummy cell/variable, or shipping to self
T2 2200 regular unit shipping costs
M M 0 5 M shipment not possible
D1 2200
M M M 0 3
D2 2200
Demand 2200 2200 3000 3100 500
•Solve the problem as regular transportation model.
Using least cost, 6 iterations.
Using VAM, 2 iterations.
Optimal solution Z = 20,700
T1 T2 D1 D2 D3 Supply
3 4 M M M
P1 1000 1000
2 5 M M M
P2 1200 1200
0 7 8 6 M
T1 1000 800 400 2200
M 0 M 4 9
T2 1200 1000 2200
M M 0 5 M
D1 2200 2200
M M M 0 3
D2 1700 500 2200
Demand 2200 2200 3000 3100 500
T1 T2 D1 D2 D3 Supply
3 4 M M M
Optimal solution Z = 20,700 P1
2
1000
5 M M M
1000
P2 1200 1200
0 7 8 6 M
T1 1000 800 400 2200
M 0 M 4 9
T2 1200 1000 2200
M M 0 5 M
D1 2200 2200
M M M 0 3
D2 1700 500 2200
Demand 2200 2200 3000 3100 500
Issues in Transportation
Model
Special Issues in Modeling
• Demand not equal to supply
§ Called an unbalanced problem
§ Common situation in the real world
§ Resolved by introducing dummy sources (d > s) or
dummy destinations (d < s) as necessary with cost
coefficients of zero
Consider the original problem, and let the capacity
of Des Moines be 250 (instead of 100)
To Factory
From Albuquerque Boston Cleveland capacity
$5 $4 $3
Des Moines 100
$8 $4 $3
Evansville 300
Fort $9 $7 $5
Lauderdale
300
Warehouse
requirement 300 200 200 700
Special Issues in Modeling
Total Cost = 250($5) + 50($8) + 200($4) + 50($3) + 150($5) + 150(0)
= $3,350
$5 $4 $3 0
(D) Des Moines 250 250
$8 $4 $3 0
(E) Evansville 50 200 50 300
$9 $7 $5 0
(F) Fort Lauderdale 150 150 300
Warehouse
requirement 300 200 200 150 850
New
Figure C.9 Des Moines
capacity
Special Issues in Modeling
§ Degeneracy
§ Already discussed in the previous module