Professional Documents
Culture Documents
Transportation and Assignment Problems: Lewis Ntaimo
Transportation and Assignment Problems: Lewis Ntaimo
Based on
Chapter 7
Introduction to Mathematical Programming: Operations Research, Volume 1
4th edition, by Wayne L. Winston and Munirpallam Venkataramanan
Lewis Ntaimo
1
L. Ntaimo (c) 2005 INEN420 TAMU
7.1Transportation Problems
1. Example formulation
2. General formulation
3. Balancing a transportation problem
4. Finding a basic feasible solution
5. The transportation simplex algorithm
2
L. Ntaimo (c) 2005 INEN420 TAMU
7.1 Powerco Problem
Powerco has 3 electric power plants that supply the needs of 4 cities. Each power plant can
supply the following numbers of kilowatt-hours (kwh) of electricity: plant 1 – 35 million; plant 2
– 50 million; plant 3 – 40 million (see Table 1). The peak power demands in these cities,
which occur at the same time (2pm), are as follows (in kwh): city 1 – 45 million; city 2 – 20
million; city 3 – 30 million; city 4 - 30 million. The costs of sending 1 million kwh of electricity
from plant to city depend on the distance the electricity must travel. Formulate an LP to
minimize the cost of meeting each city’s peak power demand.
3
L. Ntaimo (c) 2005 INEN420 TAMU
7.1 Graphical Representation
Demand Points
Supply Points
City 1 d1 = 45
xij
s1 = 35 Plant 1
City 2 d2 = 20
s2 = 50 Plant 2
City 3 d3 = 30
s3 = 40 Plant 3
City 4 d4 = 30
Decision Variables: xij # of (million) kwh produced at plant i and sent to city j
Constraints: Supply (Capacity) constraints
Demand constraints 4
L. Ntaimo (c) 2005 INEN420 TAMU
7.1 Powerco Problem Formulation
Min 8 x11 + 6 x12 + 10 x13 + 9 x14 +
9 x21 + 12 x22 + 13 x23 + 7 x24 +
Minimize total shipping costs
14 x31 + 9 x32 + 16 x33 + 5 x34
x12= 10
s1 = 35 Plant 1
x13= 25 City 2 d2 = 20
x21= 45
x23= 5
s2 = 50 Plant 2
City 3 d3 = 30
x32= 10
s3 = 40 Plant 3
x34= 30
City 4 d4 = 30
6
L. Ntaimo (c) 2005 INEN420 TAMU
7.1 General Formulation of a Transportation Problem
m n
Min ∑∑ c x
i =1 j =1
ij ij
n
s. t. ∑x
j =1
ij ≤ si (i = 1,2,..., m) (supply constraints)
∑x
i =1
ij ≥ d j ( j = 1,2,..., n) (demand constraints)
7
L. Ntaimo (c) 2005 INEN420 TAMU
7.2 A Balanced Transportation Problem
∑ si = ∑ d j
i =1 j =1
8
L. Ntaimo (c) 2005 INEN420 TAMU
7.2 A Balanced Transportation Problem
m n
Min ∑∑ c x
i =1 j =1
ij ij
n
s. t. ∑x
j =1
ij = si (i = 1,2,..., m) (supply constraints)
∑x
i =1
ij = d j ( j = 1,2,..., n) (demand constraints)
9
L. Ntaimo (c) 2005 INEN420 TAMU
7.2 Balancing a Transportation Problem if Total Supply
Exceeds Total Demand
Create a “dummy demand point” that has demand equal to the amount of
excess supply
10
L. Ntaimo (c) 2005 INEN420 TAMU
7.2 Balancing a Transportation Problem if Total
Supply Exceeds Total Demand
Demand Points
Supply Points
City 1 d1 = 35
xij
s1 = 35 Plant 1
City 2 d2 = 20
4
∑d
j =1
j = 115
3
∑s
Plant 2
i = 125 s2 = 50
City 3 d3 = 30
i =1
s3 = 40 Plant 3
City 4 d4 = 30
Dummy
5 d5 = 10
c15 = c25 =c35 = 0
11
L. Ntaimo (c) 2005 INEN420 TAMU
7.2 Balancing a Transportation Problem if Total
Supply is Less than Total Demand
In this case the problem has no feasible solution: demand cannot be satisfied
12
L. Ntaimo (c) 2005 INEN420 TAMU
7.3 Transportation Tableau
A transportation problem is specified by supply, the demand, and the
shipping costs, so the relevant data can be summarized in a “transportation
tableau”:
j
1 2 n
. . . .
Cell: (row i, col j) . . . .
. . . .
cm1 cm2 ... cmn
m sm
d1 d2 ... dn
13
L. Ntaimo (c) 2005 INEN420 TAMU
7.3 Powerco Transportation Tableau
• If xij is a bv, its value is placed in the lower left-hand corner of the ijth cell
8 6 9 10
10 25 35
9 12 13 7
45 5 50
14 9 16 5
10 30 40
45 20 30 30
14
L. Ntaimo (c) 2005 INEN420 TAMU
7.4 Finding BFS’s for Transportation Problems
Important Observation
If a set of values for the xij’s satisfies all but one of the constraints of a balanced
transportation problem, then the values for the xij’s will automatically satisfy the
other constraints.
15
L. Ntaimo (c) 2005 INEN420 TAMU
7.4 Powerco Problem Formulation
Min 8 x11 + 6 x12 + 10 x13 + 9 x14 +
9 x21 + 12 x22 + 13 x23 + 7 x24 +
Minimize total shipping costs
14 x31 + 9 x32 + 16 x33 + 5 x34
Let a set of xij’s satisfy all constraints except the first supply constraint.
Then this set of xij’s must supply
d1 + d2 + d3 + d4 = 125 million kwh to cities 1 to 4
and supply
s2 + s3 = 125 – s1 = 90 million kwh from plants 2 and 3.
Thus plant 1 must supply
125 – (125 – s1) = 35 million kwh,
So the xij’s must satisfy the first supply constraint!
Therefore, we arbitrarily assume that the first constraint is omitted from consideration.
17
L. Ntaimo (c) 2005 INEN420 TAMU
7.5 Loop
Definition:
An ordered sequence of at least 4 different cells is called a loop if
1. Any 2 consecutive cells lie in either the same row or same column
2. No 3 consecutive cells lie in the same row or column
3. The last cell in the sequence has a row or column in common with the first cell in
the sequence
Path: (1,1)-(1,2)-(2,3)-(2,1)
Loop or Path?
This follows from the fact that a set of (m + n – 1) cells contains no loop iff the
(m + n – 1) columns corresponding to these cells are linearly independent.
5
3 2 4
9 12 13 7
50
14 9 16 5
40
45 - 35 20 30 30
8 6 9 10
35 x
50
9 12 13 7
40
14 9 16 5
10 20 30 30 21
L. Ntaimo (c) 2005 INEN420 TAMU
7.6 Powerco Example: Finding a BFS
8 6 9 10
35 X
9 12 13 7
10 50 - 10
14 9 16 5
40
10 - 10 20 30 30
8 6 9 10
35 x
9 12 13 7
10 40
14 9 16 5
40
X 20 30 30 22
L. Ntaimo (c) 2005 INEN420 TAMU
7.6 Powerco Example: Finding a BFS
8 6 9 10
35 X
9 12 13 7
10 40 - 20
20
14 9 16 5
40
X 20 - 20 30 30
8 6 9 10
35 x
9 12 13 7
10 20
20
14 9 16 5
40
X X 30 30 23
L. Ntaimo (c) 2005 INEN420 TAMU
7.6 Powerco Example: Finding a BFS
8 6 9 10
35 X
9 12 13 7
10 20 20
20 - 20
14 9 16 5
40
X X 30 - 20 30
8 6 9 10
35 x
9 12 13 7
10 X
20 20
14 9 16 5
40
X X 10 30 24
L. Ntaimo (c) 2005 INEN420 TAMU
Powerco Example: Finding a BFS
8 6 9 10
35 X
9 12 13 7
10 20 20 X
14 9 16 5
10 40 -10
X X 10 -10 30
8 6 9 10
35 x
9 12 13 7
10 X
20 20
14 9 16 5
10 30
X X X 30 25
L. Ntaimo (c) 2005 INEN420 TAMU
7.6 Powerco Example: Finding a BFS
8 6 9 10
35 X
9 12 13 7
10 20 20 X
14 9 16 5
30 - 30
10
30
X X X 30 - 30
8 6 9 10
35 X
9 12 13 7
10 X
20 20
14 9 16 5
10 30 X
X X X X 26
L. Ntaimo (c) 2005 INEN420 TAMU
7.6 Powerco Example: Basic Feasible Solution
8 6 9 10
35 35
9 12 13 7
10 20 20 50
14 9 16 5
10 30
40
45 20 30 30
BFS: x11 = 35
x22 = 10
x22 = 20 NOTE: The BFS does NOT form a LOOP
x23 = 20
x33 = 10
x34 = 30
27
L. Ntaimo (c) 2005 INEN420 TAMU
7.8 The Transportation Simplex Method
Pricing Out Nonbasic Variables Recall:
The coefficient of the variable xij in the tableau' s Row 0 (reduced cost) is given by
cij = cBV B −1aij − cij ,
where,
cij = objective coefficient for xij ,
aij = column for xij in the original LP,
(assuming that the first supply constraint has been dropped)
BV = set of basic variables.
Because the first constraint has been dropped, will have (m + n-1) elements :
29
L. Ntaimo (c) 2005 INEN420 TAMU
7.8 The Transportation Simplex Method Cont..
To determine cBV B -1 , we use the fact that in any tableau, each basic variable xij must have
cij = 0. Thus for each of the m + n-1 basic variables (in BV ),
cBV B −1aij − cij = 0 (1)
For a transportation problem, the equations (1) are very easy to solve!
Thus, to solve for cBV B -1 , we must solve the following system of m + n equations :
u1 = 0,
ui + v j = cij
for all basic variables.
30
L. Ntaimo (c) 2005 INEN420 TAMU
7.8 Powerco Example: Solution of (1)
We start with the BFS obtained by applying the NW Corner method:
8 6 9 10
35 35
9 12 13 7
10 20 20 50
14 9 16 5
10 30
40
45 20 30 30
31
L. Ntaimo (c) 2005 INEN420 TAMU
7.8 Powerco Example: Solution of (1) Model
BV = {x11 , x21 , x22 , x23 , x33 , x34 }
⎡0 ⎤ Applying cBV B -1aij -cij = 0 ⎡1⎤
⎢0 ⎥ ⎢0 ⎥
⎢ ⎥ ⎢ ⎥
⎢1⎥ ⎢0 ⎥
c11 = [u2 u3 v1 v2 v3 v4 ]⎢ ⎥ − 8 = v1-8 = 0 c23 = [u2 u3 v1 v2 v3 v4 ]⎢ ⎥ − 13 = u2 + v3-13 = 0
⎢0 ⎥ ⎢0 ⎥
⎢0 ⎥ ⎢1⎥
⎢ ⎥ ⎢ ⎥
⎢⎣0⎥⎦ ⎢⎣0⎥⎦
⎡1 ⎤ ⎡0 ⎤
⎢0 ⎥ ⎢1 ⎥
⎢ ⎥ ⎢ ⎥
⎢1 ⎥ ⎢0 ⎥
c21 = [u2 u3 v1 v2 v3 v4 ]⎢ ⎥ − 9 = u2 + v1-9 = 0 =
c [u 2 3 1 2 3 4 ⎢ ⎥ − 16 = u3 + v3-16 = 0
u v v v v ]
⎢0 ⎥ 33
⎢0 ⎥
⎢0 ⎥ ⎢1 ⎥
⎢ ⎥ ⎢ ⎥
⎢⎣0⎥⎦ ⎢⎣0⎥⎦
⎡1 ⎤ ⎡0 ⎤
⎢0 ⎥ ⎢1⎥
⎢ ⎥ ⎢ ⎥
⎢0 ⎥ ⎢0 ⎥
c22 = [u2 u3 v1 v2 v3 v4 ]⎢ ⎥ − 12 = u2 + v2 -12 = 0 c34 = [u2 u3 v1 v2 v3 v4 ]⎢ ⎥ − 5 = u3 + v4 -5 = 0
⎢1 ⎥ ⎢0 ⎥
⎢0 ⎥ ⎢0 ⎥
⎢ ⎥ ⎢ ⎥
⎢⎣0⎥⎦ ⎢⎣1⎥⎦
32
L. Ntaimo (c) 2005 INEN420 TAMU
7.8 Powerco Example: Solution of (1)
We start with the BFS obtained by applying the NW Corner method:
8 6 9 10
35 35
9 12 13 7
10 20 20 50
14 9 16 5
10 30
40
45 20 30 30
-1
We find c BV B by solving :
u1 = 0,
u1 + v1 = 8
u 2 + v1 = 9
u 2 + v 2 = 12
u 2 + v3 = 13
u 3 + v3 = 16
u3 + v4 = 5 33
L. Ntaimo (c) 2005 INEN420 TAMU
7.8 Powerco Example: Solution of (1)
For each nonbasic variable, we now compute
We find cBV B -1 by solving :
cij = ui + v j − cij
u1 = 0,
u1 + v1 = 8 and we obtain :
u 2 + v1 = 9 c12 = 0 + 11 − 6 = 5
u 2 + v2 = 12 c13 = 0 + 12 − 10 = 2
u 2 + v3 = 13 c14 = 0 + 1 − 9 = −8
u3 + v3 = 16 c24 = 1 + 1 − 7 = −5
u 3 + v4 = 5 c31 = 4 + 8 − 14 = −2
c32 = 4 + 11 − 9 = 6
We obtain :
v1 = 8 Entering Nonbasic Variable
u2 = 1
Because c32 is the most positive cij ,
v2 = 11
we would next enter x32 into the basis.
v3 = 12
u3 = 4
Note : Each unit of x32 that is entered into the
v4 = 1
basis will decrease Powerco' s cost by $6.
34
L. Ntaimo (c) 2005 INEN420 TAMU
7.9 How to Pivot in a Transportation Problem
Step 2: Find the loop involving the entering variable and some of the
basic variables. (It can be shown that there is only one loop)
Step 3: Counting only cells in the loop, label those found in Step 2 that
are an even number (0, 2, 4, …) cells away from the entering
variable as even cells. Also label those that are an odd number
of cells away from the entering variable as odd cells.
Step 4: Find the odd cell whose variable assumes the smallest value.
Call this value θ. The variable corresponding to this cell will leave
the basis.
To perform the pivot, decrease the value of each odd cell by θ
and increase the value of each even cell by θ. The values of variables
not in the loop remain unchanged. The pivot is now complete!
35
L. Ntaimo (c) 2005 INEN420 TAMU
7.9 How to Pivot in a Transportation Problem Cont…
Degenerate Solution:
In this case, a degenerate bfs existed before and will result after the pivot.
If more that one odd cell in the loop equals θ, you may arbitrarily choose
one of these to leave the basis, again, a degenerate bfs will result.
36
L. Ntaimo (c) 2005 INEN420 TAMU
7.10 Summary of the Transportation Simplex Method
Step 4: If ui + vj - cij ≤ 0 for all nonbasic variables, then the current bfs is optimal.
If this is not the case, then we enter the variable with the most positive
ui + vj - cij into the basis using the pivoting procedure. This yields a new bfs.
For a maximization problem proceed as stated, but replace step 4 by Step 4’:
Step 4’: If ui + vj - cij ≥ 0 for all nonbasic variables, then the current bfs is optimal.
Otherwise, enter the variable with the most negative ui + vj - cij into the
basis using the pivoting procedure. This yields a new bfs.
37
L. Ntaimo (c) 2005 INEN420 TAMU
7.11 Example: Powerco Problem
We start with the initial bfs obtained by using the For each nonbasic variable, we compute
NW corner method: cij = ui + v j − cij
Table 1 and obtain :
8 6 10 9 c12 = 0 + 11 − 6 = 5
35 35 c13 = 0 + 12 − 10 = 2
9 12 13 7 c14 = 0 + 1 − 9 = −8
10 20 20 50 c24 = 1 + 1 − 7 = −5
14 9 16 5
c31 = 4 + 8 − 14 = −2
10 30 40 c32 = 4 + 11 − 9 = 6
Because c32 is the most positive cij ,
45 20 30 30
we would next enter x32 into the basis.
-1
We have already found cBV B by solving :
u1 = 0, The loop involving x32 and some of the bv' s is
Solution : v1 = 8
u1 + v1 = 8 shown in Table 1 : (3,2) - (3,3) - (2,3) - (2,2).
u2 = 1
u2 + v1 = 9 The odd cells in this loop are (3,3) and (2,2).
v2 = 11
u2 + v2 = 12 v3 = 12 Because x33 = 10 and x22 = 20, the pivot will
u2 + v3 = 13 u3 = 4 decrease x33 and x22 by 10, and increase x32 and
u3 + v3 = 16 v4 = 1 x23 by 10 (see Table 2)
u3 + v4 = 5 38
L. Ntaimo (c) 2005 INEN420 TAMU
7.11 Example: Powerco Problem
For each nonbasic variable, we compute
cij = ui + v j − cij
Table 2 and obtain :
8 6 10 9 c12 = 0 + 11 − 6 = 5
35 35 c13 = 0 + 12 − 10 = 2
9 12 13 7 c14 = 0 + 7 − 9 = −2
10 10 30 50 c24 = 1 + 7 − 7 = 1
14 9 16 5
c31 = −2 + 8 − 14 = −8
10 30 40 c33 = −2 + 12 − 16 = −6
Because c1 2 is the most positive cij ,
45 20 30 30
we would next enter x12 into the basis.
-1
We find cBV B by solving :
u1 = 0, The loop involving x12 and some of the bv' s is
Solution : v1 = 8
u1 + v1 = 8 shown in Table 2 : (1,2) - (2,2) - (2,1) - (1,1).
u2 = 1
u2 + v1 = 9 The odd cells in this loop are (2,2) and (1,1).
v2 = 11
u2 + v2 = 12 v3 = 12 Because x22 = 10 is the smallest entry in an odd cell,
u2 + v3 = 13 u 3 = −2 the pivot will decrease x22 and x11 by 10, and increase
u 3 + v2 = 9 v4 = 7 x12 and x21 by 10 (see Table 3).
u 3 + v4 = 5 39
L. Ntaimo (c) 2005 INEN420 TAMU
7.11 Example: Powerco Problem
For each nonbasic variable, we compute
cij = ui + v j − cij
Table 3 and obtain :
8 6 10 9 c13 = 0 + 12 − 10 = 2
25 10 35 c14 = 0 + 5 − 9 = −4
9 12 13 7 c22 = 1 + 6 − 12 = −5
20 30 50 c24 = 1 + 5 − 7 = −1
14 9 16 5
c31 = 0 + 8 − 14 = −6
10 30 40 c33 = 0 + 12 − 16 = −4
Because c13 is the most positive cij ,
45 20 30 30
we would next enter x13 into the basis.
-1
We find cBV B by solving :
u1 = 0, The loop involving x13 and some of the bv' s is
Solution : v1 = 8
u1 + v1 = 8 shown in Table 3 : (1,3) - (2,3) - (2,1) - (1,1).
u2 = 1
u2 + v1 = 9 The odd cells in this loop are (2,3) and (1,1).
v2 = 6
u2 + v3 = 13 v3 = 12 Because x11 = 25 is the smallest entry in an odd cell,
u1 + v2 = 6 u3 = 0 the pivot will decrease x23 and x11 by 25, and increase
u 3 + v2 = 6 v4 = 5 x13 and x21 by 25 (see Table 4).
u 3 + v4 = 5 40
L. Ntaimo (c) 2005 INEN420 TAMU
7.11 Example: Powerco Problem
For each nonbasic variable, we compute
cij = ui + v j − cij
Table 4 and obtain :
8 6 10 9 c11 = 0 + 6 − 8 = −2
10 25 35 c14 = 0 + 5 − 9 = −4
9 12 13 7 c22 = 3 + 6 − 12 = −3
45 5 50 c24 = 3 + 2 − 7 = −2
14 9 16 5
c31 = 3 + 6 − 14 = −5
10 30 40 c33 = 3 + 10 − 16 = −3
1. Problem Description
2. Example Formulation
3. The Hungarian Method
4. Example using the Hungarian Method
5. Transshipment Problems
42
L. Ntaimo (c) 2005 INEN420 TAMU
7.12 On the integrality Property of the Transportation
Problem
• We already know the fact that solutions to the transportation problem are
integral. This is a useful property of the transportation problem.
• In general, solutions to integer programs with the integer restrictions
relaxed are fractional (linear programming (LP) relaxation).
e.g. x1 + x2 = 1, x1 – x2 = 0, has the unique solution (x1 = 0.5, x2 = 0.5)
• But solutions to the transportation problem are integral.
• In general, if there is at most one 1 and at most one –1 in any column of
the constraint matrix (unimodular constraint matrix), then every basic
feasible solution is integer (so long as RHS is integral.)
43
L. Ntaimo (c) 2005 INEN420 TAMU
7.12 A special case of the Transportation Problem:
Supplies and Demands are All Equal to 1.
Supply Demand Supply Demand
1
0
1 1 4 1 1 1 4 1
2
1
1
2
1 2 5 1 1 2 5 1
1
1
1
1
0
1 3 6 1 1 3 6 1
2
44
L. Ntaimo (c) 2005 INEN420 TAMU
7.12 The Assignment Problem
•3 people: nodes 1, 2, 3
• Suppose that n people (let us label them 1 to n) are assigned to n tasks (also let
us label them labeled 1 to n). Then,
46
L. Ntaimo (c) 2005 INEN420 TAMU
7.13 The Assignment Problem
n n
Minimize
∑∑ c
i =1 j =1
ij xij
s.t. ∑x
j =1
ij = 1, ∀i = 1,… , n Each supply is 1
∑x
i =1
ij = 1, ∀j = 1,… , n
Each demand is 1
xij = 0 or 1, ∀ij
47
L. Ntaimo (c) 2005 INEN420 TAMU
7.14 Example Problem
Table 1
Time (Hours)
Machine Job 1 Job 2 Job 3 Job 4
1 14 5 8 7
2 2 12 6 5
3 7 8 3 9
4 2 4 6 10
48
L. Ntaimo (c) 2005 INEN420 TAMU
7.14 Example Problem Formulation
Machineco must determine which machine should be assigned to each
job. Let the decision variables be defined as:
xij = 1 if machine i is assigned to meet the demands of job j
xij = 0 if machine i is not assigned to meet the demands of job j
Min z = 14 x11 + 5 x12 + 8 x13 + 7 x14 +
2 x11 + 12 x12 + 6 x13 + 5 x14 +
7 x11 + 8 x12 + 3x13 + 9 x14 +
2 x11 + 4 x12 + 6 x13 + 10 x14
s.t. x11 + x12 + x13 + x14 = 1 (Machine contraints)
x21 + x22 + x23 + x24 = 1
Ensures that each machine
x31 + x32 + x33 + x34 = 1 is assigned to one job
x41 + x42 + x43 + x44 = 1
x11 + x21 + x31 + x41 = 1 (Job contraints)
x12 + x22 + x32 + x42 = 1
Ensures that each job is
x13 + x23 + x33 + x43 = 1 assigned to one machine
(each job is completed)
x14 + x24 + x34 + x44 = 1
xij = 1 or xij = 0, (i = 1,2,3,4; j = 1,2,3,4).
49
L. Ntaimo (c) 2005 INEN420 TAMU
7.15 Relaxing Integrality Requirements
Since all the supplies and demands for the assignment problem
are integers, our discussion of the transportation simplex method
implies that all variables in an optimal solution of a transportation
problem must be integers
50
L. Ntaimo (c) 2005 INEN420 TAMU
7.15 Solution Approach
For this reason, and the fact that the algorithm is even much
simpler than the transportation simplex, the Hungarian method is
usually used to solve assignment (min) problems
Note: If your assignment is a max problem, convert it to a min
problem before applying the Hungarian Method.
51
L. Ntaimo (c) 2005 INEN420 TAMU
7.15 The Hungarian Method
Step 1. Find the minimum element in each row of the m x m cost matrix.
Construct a new matrix by subtracting from each cost the minimum cost in
its row. For this new matrix, find the minimum cost in each column.
Construct a new matrix (called the reduced cost matrix) by subtracting
from each cost the minimum cost in its column.
Step 2. Cover all the zeros in the reduced cost matrix using the minimum
number of lines needed. If m lines are required, then an optimal solution is
available among the covered zeros in the matrix. If fewer than m lines are
needed, then proceed to Step 3.
Step 3. Find the smallest nonzero element (k) in the reduced cost matrix that
is uncovered by the lines drawn in Step 2. Now subtract k from each
uncovered element and add k to each element that is covered by two lines.
Return to Step 2.
52
L. Ntaimo (c) 2005 INEN420 TAMU
7.15 Remarks on the Hungarian Method
If the number of rows and columns in the cost matrix are unequal,
then the assignment problem is unbalanced. The Hungarian
method may yield an incorrect solution if the problem is
unbalanced. Thus, any assignment problem should be balanced
(by the addition of one or more dummy points) before it is solved
by the Hungarian method.
53
L. Ntaimo (c) 2005 INEN420 TAMU
7.16 Machineco Example
Machine 1 14 5 8 7
Machine 2 2 12 6 5
Machine 3 7 8 3 9
Machine 4 2 4 6 10
54
L. Ntaimo (c) 2005 INEN420 TAMU
7.16 Machineco Example
Row Minimum Table 5. Cost Matrix After Column
Table 3. Machineco Cost Matrix
Mins are Subtracted
14 5 8 7 5
9 0 3 0 3 lines with
smallest
2 12 6 5 2 uncovered
0 10 4 1 element
7 8 3 9 3 equals 1
4 5 0 4
2 4 6 10 2
0 2 4 6
Table 4. Cost Matrix After Row Table 6. Four lines required: optimal
Mins are Subtracted solution found
9 0 3 2 10 0 3 0
0 10 4 3 0 9 3 0
4 5 0 6 5 5 0 4
0 2 4 8 0 1 3 5
0 0 0 2
Optimal Assignment : x12 = 1, x 24 = 1, x 33 = 1, x 41 = 1.
Column Minimum
55
L. Ntaimo (c) 2005 INEN420 TAMU
7.17 Transshipment Problems
56
L. Ntaimo (c) 2005 INEN420 TAMU
7.17 Widgetco Example:
See problem description on page 400
Los
Memphis New York
Angeles
150 130
200 130
Supply Demand
57
L. Ntaimo (c) 2005 INEN420 TAMU
7.18 Converting a Transshipment Problem into a
Balanced Transportation problem
(assuming supply >= demand)
58
L. Ntaimo (c) 2005 INEN420 TAMU
7.18 Converting a Transshipment Problem into a
Balanced Transportation problem
Step2. Cont..
Each supply point will have a supply equal to it’s original supply, and each demand
point will have a demand to its original demand.
Let s= total available supply. Then each transshipment point will have a supply
equal to (point’s original supply) + s and a demand equal to (point’s original
demand) + s. This ensures that any transshipment point that is a net supplier will
have a net outflow equal to point’s original supply and a net demander will have a
net inflow equal to point’s original demand.
Although we don’t know how much will be shipped through each transshipment
point, we can be sure that the total amount will not exceed s.
59
L. Ntaimo (c) 2005 INEN420 TAMU
7.19 Widgeco Example: As a Balanced Transportation
Problem
N.Y. Chicago L.A. Boston Dummy
8 13 25 28 0
Memphis 130 20 150
15 12 26 25 0
Denver 200
130 70
0 6 16 17 0
N.Y 350
220 130
6 0 14 16 0
Chicago
350 350
60
L. Ntaimo (c) 2005 INEN420 TAMU
References
61
L. Ntaimo (c) 2005 INEN420 TAMU
Powerco Problem Formulation back
62
L. Ntaimo (c) 2005 INEN420 TAMU