Transportation Problem
Transportation Problem
Transportation problems
Factory
Ship
Warehouse
Goods
• Warehouses
• Sacramento, California
• Salt Lake City, Utah
• Rapid City, South Dakota,
• Albuquerque, New Mexico
Constraints of warehouses
• Minimize
• Minimize
W1 [-80]
[75] C1
W2 [-65]
[125] C2
W3 [-70]
[100] C3
W4 [-85]
• The requirements assumption: Each source has a fixed supply of units, where
this entire supply must be distributed to the destinations. Similarly, each
destination has a fixed demand for units, where this entire demand must be
received from the sources.
• The cost assumption: The cost of distributing units from any particular source
to any particular destination is directly proportional to the number of units
distributed. Therefore, this cost is just the unit cost of distribution times the
number of units distributed.
𝑠𝑖 = 𝑑𝑖
𝑖=1 𝑗=1
• 𝑥𝑖𝑗 is the number of units distributed from the source 𝑖 to the destination 𝑗
Minimize 𝑍 = σ𝑚 𝑛
𝑖=1 σ𝑗=1 𝑐𝑖𝑗 𝑥𝑖𝑗
Any linear programming
problem that fits the special
subject to
formulation is of the
σ𝑚𝑖=1 𝑥𝑖𝑗 = 𝑠𝑖 for 𝑖 = 1, 2, … , 𝑚
transportation problem type,
σ𝑛𝑗=1 𝑥𝑖𝑗 = 𝑑𝑗 for 𝑗 = 1,2, … , 𝑛 regardless of its physical
and context
𝑥𝑖𝑗 ≥ 0 for all 𝑖 and 𝑗
• The company has some contracts to the airplanes and the production of the
jet engines must be scheduled.
Month Scheduled Maximum Unit Cost of Unit Cost of
Installations Production Production Storage
1 10 25 1.08 0.015
2 15 35 1.11 0.015
3 25 30 1.10 0.015
4 20 10 1.13
Cost is expressed in milions of dollars
• The company must supply engines for installation as mentioned in the 2nd
column of the table
• The company can produce more engines than scheduled and these ones
must be storaged.
Month Scheduled Maximum Unit Cost of Unit Cost of
Installations Production Production Storage
1 10 25 1.08 0.015
2 15 35 1.11 0.015
3 25 30 1.10 0.015
4 20 10 1.13
Cost is expressed in milions of dollars
• The goal: to minimize the costs for production and storage of the jet engines
• Task:
• Identify supply and demand
• The goal: to minimize the costs for production and storage of the jet engines
• The goal: to minimize the costs for production and storage of the jet engines
• The goal: to minimize the costs for production and storage of the jet engines
• Slack variable express the number of built engines which have not been used
25 + 35 + 30 + 10 − 10 + 15 + 25 + 20 = 30
Operations research I
• Introduction
Example •
•
Model creation
Initial BF solution
Water for cities • Optimality test
• How to supply cities from three rivers to satisfy the needs of cities and
minimize the total cost to the district
Demand 50 70 30 60
• How many acres must be taken from dummy for each city?
Destination
1 2 3 4 5 Supply Diff.
1 16 16 13 22 17 50 3
2 14 14 13 19 15 60 1
3 19 19 20 23 M 50 0
4 M 0 M 0 0 50 0
Demand 30 20 70 30 60
• For each row and column calculate the difference between two smallest values
• Select the largest difference and in the same row or column select the smallest
unit cost
Destination
1 2 3 5 Supply Diff.
1 16 16 13 17 50 3 𝒙𝟒𝟒 =30
2 14 14 13 15 60 1
3 19 19 20 M 50 0
4 M 0 M 0 50-30 0 Eliminate row 4
Demand 30 20 70 60 𝒙𝟒𝟓 = 𝟐𝟎
Diff. 2 14 0 15
• For each row and column calculate the difference between two smallest values
• Select the largest difference and in the same row or column select the smallest
unit cost
Destination
1 2 3 5 Supply Diff.
1 16 16 13 17 50 3 Eliminate row 1
2 14 14 13 15 60 1
3 19 19 20 M 50 0
Demand 30 20 70 40 𝒙𝟏𝟑 = 𝟓𝟎
Diff. 2 2 0 2
• For each row and column calculate the difference between two smallest values
• Select the largest difference and in the same row or column select the smallest
unit cost
Destination
1 2 3 5 Supply Diff.
2 14 14 13 15 60 1
3 19 19 20 M 50 0
Demand 30 20 20 40 𝒙𝟐𝟓 = 𝟒𝟎
Diff. 5 5 7 M-15
Eliminate column 5
• For each row and column calculate the difference between two smallest values
• Select the largest difference and in the same row or column select the smallest
unit cost
Destination
1 2 3 Supply Diff.
2 14 14 13 20 1 Eliminate row 2
3 19 19 20 50 0
Demand 30 20 20 𝒙𝟐𝟑 = 𝟐𝟎
Diff. 5 5 7
𝑍 = 0 ∗ 30 + 0 ∗ 20 + 13 ∗ 50 + 15 ∗ 40 + 13 ∗ 20 + 19 ∗ 30 + 19 ∗ 20 + 20 ∗ 0
𝑍 = 0 + 0 + 650 + 600 + 260 + 570 + 380 + 0 = 𝟐𝟒𝟔𝟎
• For each source row 𝑖 determine 𝑢ത - largest unit cost 𝑐𝑖𝑗 in that row
• For each destination column 𝑗 determine 𝑣ҧ - largest unit cost 𝑐𝑖𝑗 in that column
Destination ഥ𝟏
𝒖 ഥ𝟐 𝒖
𝒖 ഥ𝟑 𝒖
ഥ𝟒 𝒗
ഥ𝟏 𝒗
ഥ𝟐 𝒗
ഥ𝟑 𝒗
ഥ𝟒 ഥ𝟓
𝒗
1 2 3 4 5 S 22 19 M M M 19 M 23 M
1 16 16 13 22 17 50
2 14 14 13 19 15 60 • For each variable 𝑥𝑖𝑗 calculate
∆𝑖𝑗 = 𝑐𝑖𝑗 − 𝑢ത 𝑖 − 𝑣𝑗ҧ
3 19 19 20 23 M 50
4 M 0 M 0 0 50 • Select the variable with the largest
D 30 20 70 30 60 negative value ∆𝑖𝑗
Allocation of 𝒙𝟒𝟓 = 𝟓𝟎. It uses up the supply in row 4 ⇒ the row 4 will be eliminated
Allocation of 𝒙𝟏𝟓 = 𝟏𝟎. It uses up the supply in column 5 ⇒ the column 5 will be
eliminated
Allocation of 𝒙𝟏𝟑 = 𝟒𝟎. It uses up the supply in row 1 ⇒ the row 1 will be eliminated
Allocation of 𝑥23 = 30. It uses up the supply in column 3 ⇒ the column 3 will be
eliminated
𝑍 = 0 ∗ 50 + 13 ∗ 40 + 17 ∗ 10 + 13 ∗ 30 + 14 ∗ 30 + 19 ∗ 0 + 19 ∗ 20 + 23 ∗ 30
𝑍 = 0 + 520 + 170 + 390 + 420 + 0 + 380 + 690 = 𝟐𝟓𝟕𝟎
Iteration Destination
0 1 2 3 4 5 Supply 𝑢𝑖
16 16 13 22 17
1 40 10
50
2 14 14 13 19 15 60
Source 30
3 19 19 20 23 M 50
0 20 30
M 0 M 0
4(D) 0
50 50
Demand 30 20 70 30 60 𝑍 = 2570
𝑣𝑗
Destination 𝒙𝟑𝟏 = 𝟎
𝒙𝟑𝟐 = 𝟐𝟎 → 𝑢3 = 0
1 2 3 4 5 S
𝒙𝟑𝟒 = 𝟑𝟎
1 16 16 13 22 17 50
2 14 14 13 19 15 60 19 = 𝑢3 + 𝑣1 ⇒ 𝑣1 = 19
19 = 𝑢3 + 𝑣2 ⇒ 𝑣2 = 19
3 19 19 20 23 M 50 23 = 𝑢3 + 𝑣1 ⇒ 𝑣3 = 23
4 M 0 M 0 0 50 14 = 𝑢2 + 𝑣1 ⇒ 𝑣1 = 19 ⇒ 𝑢2 = −5
D 30 20 70 30 60
⋮
…and so on
• Determine:
1. Entering basic variable
2. Leaving basic variable 𝑐25 − 𝑢2 − 𝑣5 = −2 and 𝑐44 − 𝑢4 − 𝑣4 = −1
3. Resulting new BF
• 𝑐𝑖𝑗 − 𝑢𝑖 − 𝑣𝑗 represents the rate at which the object. funct. will change as the
nonbasic variable 𝑥𝑖𝑗 is increased ⇒ the enterig basic variable must have a
negative value of 𝑐𝑖𝑗 − 𝑢𝑖 − 𝑣𝑗
• We will select the candidate having the largest negative value of 𝑐𝑖𝑗 − 𝑢𝑖 − 𝑣𝑗 ,
so 𝑥25
Iter. Destination
0 1 2 3 4 5 Supply 𝑢𝑖
16 16 13 22 17 10
1 40 50 -5
+2 +2 +4
Source 2 14 30 14 13 30 19 15 60 -5
0 +1 -2
19 0 19 20 23 M
3 20 30 50 0
+2 M-22
4(D) M 0 M 0 0 50 50 -22
M+3 +3 M+4 -1
Demand 30 20 70 30 60 𝑍 = 2570
𝑣𝑗 19 19 18 23 22
Iter. Destination
0 3 4 5 Supply
13 22 17
1 ⋯ - 50
40 + +4 10
Source -
2 ⋯ 13 19 15 60
30
+1 + -2
⋯ ⋯ ⋯ ⋯
Demand 70 30 60
Iter. Destination
0 3 4 5 Supply
1 13 ⋯ 22 17 50
40 + 10 -
+4
Source 2 13 ⋯ - 19 15 60
30
+1 + -2
Demand 70 30 60
• Cells (2,5) and (1,3) = recipient cells (they recieve additional allocation from donor
celss)
• Cells (1,5) and (2, 3) = donor cells
Iter. Destination
0 3 4 5 Supply
1 13 ⋯ 22 17 50
40 + 10 -
+4
Source 2 13 ⋯ - 19 15 60
30
+1 + -2
Demand 70 30 60
• The recipient and donor cells correspond to the basic variables in the current
BF solution
Iter. Destination
0 3 4 5 Supply
1 13 ⋯ 22 17 50
40 + 10 -
+4
Source 2 13 ⋯ - 19 15 60
30
+1 + -2
Demand 70 30 60
• When we find the chain reaction, the donor cell having the smallest
allocation automaticaly provides the leaving basic variable.
Iter. Destination
0 3 4 5 Supply
13 22 17
1 ⋯ + - 50
50 +4
Source 2 ⋯ 13 - 19 15 60
20 10
+1 -2
Demand 70 30 60
• Add the value of the leaving basic variable to the allocation for each recipient
cell
• Subtract the same amount from the allocation for each donor cell
0 1 2 3 4 5 Supply 𝑢𝑖
16 16 13 22 17
1 50 50 -7
+4 +4 +7 +2
Source 2 14 14 13 20 19 15 40 60 -7
+2 +2 +4
19 30 19 20 23 M
3 20 0 50 0
+1 M-22
4(D) M 0 M 0 30 0 20 50 -22
M+3 +3 M+2
Demand 30 20 70 30 60 𝑍 = 2460
𝑣𝑗 19 19 20 22 22
0 1 2 3 4 5 Supply 𝑢𝑖
16 16 13 22 17
1 50 50 -7
+4 +4 +7 +2
Source 2 14 14 13 20 19 15 40 60 -7
+2 +2 +4
19 30 19 20 23 M
3 20 0 50 0
+1 M-22
4(D) M 0 M 0 30 0 20 50 -22
M+3 +3 M+2
Demand 30 20 70 30 60 𝑍 = 2460
𝑣𝑗 19 19 20 22 22
[1] Literature: Hillier and Lieberman: Introduction to Operations Research, 8th edition,
2005