Introduction To The Transportation Problem
Introduction To The Transportation Problem
3 4
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Introduction to the TP The Transportation Model
The transportation problem is a special type of linear The transportation model is a special class of LPPs that
programming problems in which goods are deals with transporting (=shipping) a commodity from
transported from a set of sources to a set of sources (e.g. factories) to destinations (e.g. warehouses).
Transportation Problem
Introduction to the TP • Basically a transportation problem is one in which you are
– The transportation Problem is a distribution-type problem asking:
in which supplies of goods that are held at various locations
are to be distributed to other receiving locations.
• How many of what should go where?
– How many goods should go from which factory to which
– The solution of a transportation problem will indicate to a warehouse?
manager the quantities and costs of various routes and the
resulting minimum cost. – How many goods should go from which warehouse to
which store?
– Inventory: How many goods should be made in month i to
– The transportation Problem is used to compare location
be available in month j? (i.e. how many goods should go
alternatives in deciding where to locate factories and
warehouses to achieve the minimum cost distribution from month i to month j?)
configuration. – Can you think of another example?
7 8
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Formulating the Model of a TP Formulating the Model of a TP
Transportation models deal can be formulated as a standard LP problem. Typical
– A transportation problem typically involves a set of situation shown in the following manufacturer example.
sending locations, which are referred to as sources, and a A manufacturer has three plants P1, P2, P3 producing same products.
set of receiving locations, which are referred to as From these plants, the product is transported to three warehouses
destinations. W1, W2 and W3.
Each plant has a limited capacity, and each warehouse has specific
– To develop a model of a transportation problem, it is demand. Each plant transport to each warehouse, but transportation
necessary to have the following information: cost vary for different combinations.
1. Supply quantity (capacity) of each source, The problem is to determine the quantity each warehouse in order to minimize
total transportation costs.
2. Demand quantity of each destination.
3. Unit transportation cost for each origin-destination
route.
9 10
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Supply a1 1 Demand b1
1
Supply a2 2
2 Demand b2
…
bj amount required at destination j
xij
Demand bn
xij amount to be shipped from origin i to
Supply am n
m
destination j
Costs cij cij cost of shipping one unit from origin i to
13 destination j 14
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
15 16
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
General Description of a TP Example 2: Schematic of a Transportation Problem
17 18
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
3 5
8 3 3 2 3 4 5 5 8 • We simply formulate them in table form.
4 9 4 1 6 3 8 2 7
7 4 dj 2 12 5 9 2 30
5 2
19 20
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Destinations
1 2 j n Supply Example 4:
c c12 c1j c1n a1
S 1 11 a2
O 2 Desti- Desti- Desti- Desti- Supply
U nation 1 nation 2 nation 3 nation 4
R
C Source 1 c11 c12 c13 c14 a1
E ai
S i ci1 ci2 cij cin Source 2 c21 c22 c23 c24 a2
23 24
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Decision variables
Number of millions energy (kWh) produced from sources and
sent to demands
i = number of sources
j = number of demands
sources demands
25 26
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Constraints of Demands
j = number of demands
27 28
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
LP Formulation of Powerco’s Problem Example 6:
Min Z = 8x11+6x12+10x13+9x14+9x21+12x22+13x23+7x24
+14x31+9x32+16x33+5x34 - Problem: how many tons of wheat to transport from each grain elevator to each mill on
a monthly basis in order to minimize the total cost of transportation ?
S.T.: x11+x12+x13+x14 ≤ 35 (Supply Constraints) - Data: Grain Elevator Supply Mill Demand
1. Kansas City 150 A. Chicago 200
x21+x22+x23+x24 ≤ 50
2. Omaha 175 B. St.Louis 100
x31+x32+x33+x34 ≤ 40 3. Des Moines 275 C. Cincinnati 300
x11+x21+x31 ≥ 45 (Demand Constraints) Total 600 tons Total 600 tons
x12+x22+x32 ≥ 20
x13+x23+x33 ≥ 30 Transport cost from Grain Elevator to Mill ($/ton)
Grain Elevator A. Chicago B. St. Louis C. Cincinnati
x14+x24+x34 ≥ 30 1. Kansas City $6 8 10
2. Omaha 7 11 11
xij ≥ 0 (i= 1,2,3; j= 1,2,3,4) 3. Des Moines 4 5 12
29 30
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
minimize Z = 6x1A + 8x1B + 10x1C + 7x2A + 11x2B + 11x2C + 4x3A + 5x3B + 12x3C
Solution:
subject to x1A + x1B + x1C = 150
x2A + x2B + x2C = 175
You have 3 DCs, and need to deliver product to 3 customers.
x3A + x3B+ x3C = 275
x1A + x2A + x3A = 200
CH 200 x1B + x2B + x3B = 100
x1C + x2C + x3C = 300
KC 150
xij 0
O 175 St 100
DM 275
CI 300
Network of transportation routes for wheat shipments
33 34
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Formulate the transportation problem so that the total cost of x1 = number of computers shipped from plant A to outlet I
shipping the computers from the assembly plants to the x2 = number of computers shipped from plant A to outlet II
distribution outlets.
x3 = number of computers shipped from plant B to outlet I
35 36
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Thus, we must solve the following linear programming problem:
The constraints are as follows:
x1 + x2 < 700 Available from A Minimize C = 6x1 + 5x2 + 4x3 + 8x4
Before we can solve this problem, we must multiply the first two
constraints by -1 so that all are of the > type.
37 38
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
1 1 0 0 700
The problem can now be stated as: 0 0 1 1 900
A 1 0 1 0 500
Minimize C = 6x1 + 5x2 + 4x3 + 8x4
0 1 0 1 1, 0 0 0
subject to 6 5 4 8 1
-x1 - x2 > -700
- x3 - x4 > -900 1 0 1 0 6
1 0 0 1 5
x1 + x3 > 500
A T
0 1 1 0 4
x2 + x4 > 1,000 0 1 0 1 8
x1, x2, x3, x4 > 0 700 900 500 1, 0 0 0 1
39 40
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Introduce slack variables x1, x2, x3, and x4 to form the initial system
for the dual:
The dual problem is;
-y1 + y3 + x1 =6
Maximize P = -700y1 - 900y2 +500y3 + 1,000y4
-y1 + y4 + x2 =5
subject to
-y2 + y3 + x3 =4
-y1 + y3 <6
-y2 + y4 + x4 =8
-y1 + y4 < 5
-700y1 - 900y2 +500y3 + 1,000y4 +P = 0
-y2 + y3 <4
-y2 + y4 < 8
If we form the simplex tableau for this initial system and solve, we
y1, y2, y3, y4 > 0 find that the shipping schedule that minimizes the shipping charges
is 0 from plant A to outlet I, 700 from plant A to outlet II, 500 from
plant B to outlet I, and 300 from plant B to outlet II. The total
shipping cost is $7,900.
41 42
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
m cm1 cm 2 cm 3 cmn am
ai bj
i 1 j 1
Demand b1 b2 b3 bn
That is, the total availability equals the total demand.
45 46
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Supply
Supply
x ij a i (i 1, 2 ,..., m ) i 1 j 1 m
dj
cm1 c42
d1 d 2
cmn
dn
sm
T
m
dj
xm1
d1
x42
d2
xmn
dn
sm
T
j 1 n
Subject to xij si i 1, ,m
m j 1
x ij bj ( j 1, 2 ,..., n ) m
i 1
xij dj j 1, ,n
i 1
x ij 0 47
xij 0 i 1, , m and j 1, ,n
48
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Remark:
The Transportation Problem
Thus there are m n decision variables xij and m+n constraints. Though we can solve the above TP by the Simplex
Since the sum of the first m constraints equals the sum of the last n
method, we will solve it by a special algorithm called
constraints (because the problem is a balanced one), one of the the transportation algorithm.
constraints is redundant and we can show that the other m+n-1
constraints are linearly independent.
49 50
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Destination
1 2 . . n Supply
c11 c12 c1n
1 a1
S
o c21 c22 c2n
u
2 a2
3. Balanced and Unbalanced
r .
c . Transportation Problems
e
m cm1 cm2 cmn
am
Demand b1 b2 bn
51 52
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Balanced Transportation Problem Example 8: Balanced Transportation Problem
1 20 10 15 200 ai b j
i 1 j 1
2 10 12 9 300
• Unbalanced transportation problems
3 25 30 18 500 m n
Demand a i b j
i 1 j 1
200 400 400
55 56
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Balancing a TP if total supply exceeds
Types of Transportation Problems
total demand
• Key point in a transportation problem:
– Supply has to equal demand. • If total supply > total demand,
m n
we add a dummy demand point.
ai b j (Balanced Transportation Problem)
i 1 j 1
• When there isn’t equality: • Since shipments to the dummy demand point are
– We can use dummy demands (or supplies) in order capture not real, they are assigned a cost of zero.
the excess supply (or demand) to get equality.
– And then solve the problem.
57 58
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Ware Ware Ware Ware Output Ware Ware Ware Ware Unused Output
house 1 house 2 house 3 house 4 house 1 house 2 house 3 house 4 Capacity
Source 1 464 415 654 867 125 Source 1 464 415 654 867 125
Source 2 352 416 690 791 125 Source 2 352 416 690 791 125
Source 3 995 682 388 685 125
Source 3 995 682 388 685 125
80 65 70 85
80 65 70 85
We have 75 units of excess supply, so we create a dummy demand (this
Supply = 125 * 3 = 375; Demand = 80 + 65 + 70 + 85 = 30059 really represents supply capacity that won’t be used) 60
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Example 11: TP with Excess Supply
Example 13:
Example 12: Demand Less than Supply
D1 D2 D3 Supply
Customer Dummy S1 3 7 8 21
1 Customer 2 Factory
Capacity S2 9 4 6 16
Factory 1 8 5 0 S3 10 11 5 13
170
Demand 18 7 15
Factory 2 15 10 0
130 Supply = 50, Demand=40 => Add a dummy destination
Factory 3 3 9 0 D1 D2 D3 D4 Supply
80 S1 3 7 8 0 18
S2 9 4 6 0 7
Customer S3 10 11 5 0 15
Requirements 150 80 150 380
Demand 21 16 13 10
63 64
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Balancing a transportation problem if Example 14: TP with Excess Demand
total supply is less than total demand
Ware Ware Ware Ware Output
house 1 house 2 house 3 house 4
• If total supply < total demand (no feasible
Source 1 464 415 654 867 75
solution) one or more of the demand will be left
unmet. Source 2 352 416 690 791 125
• a penalty cost is often associated with unmet Source 3 995 682 388 685 100
demand
80 80 80 80
Solution: Add dummy supply Example 15: Total demand ≠ Total supply
Unused 0 0 0 0 20 Note that, the total demand=650, and the total supply = 600
storage How to solve it?
Allocation 80 80 80 80
We need to add a dummy row and assign o cost to each cell as such ..
67 68
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Example 16: TP with Excess Demand
Extra row, since Demand > supply When demand exceeds supply a dummy row is added to the tableau.
69 70
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Example 18:
Example 17: Supply Less than Demand
D1 D2 D3 Supply
Customer Customer Customer Factory S1 3 7 8 18
1 2 3 Capacity S2 9 4 6 7
Factory 1 8 5 16 S3 10 11 5 15
170
Demand 21 16 13
Factory 2 15 10 7
130 Supply= 40, Demand=50 => Add a dummy source
0 0 0 D1 D2 D3 Supply
Dummy 80 S1 3 7 8 18
S2 9 4 6 7
Customer S3 10 11 5 15
Requirements 150 80 150 380
S4 0 0 0 10
71
Demand 21 16 13 72
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Remark: The Balanced Transportation Problem:
represented as an LP model
Quantities in dummy routes in the optimal m n
M inim ize : Z = c ij x ij
solution are not shipped and serve to indicate i =1 j=1
73 74
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Example 19:
MG Auto has three plants in Los Angeles, Detroit, and New
Orleans, and two major distribution centers in Denver and
4. Examples of Miami. The capacities of the three plants during the next quarter
are 1000, 1300 and 1200 cars. The quarterly demands at the two
distribution centers are 2300 and 1400 cars. The transportation
Transportation Problems cost per car from Los Angeles to Denver and Miami are $80 and
$215 respectively. The corresponding figures from Detroit and
New Orleans are 100, 108 and 102, 68 respectively.
75 76
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Solution:
Destination
Denver Miami Supply
Since the total demand = 3700 > 3500 (Total supply) we
80 215
introduce a dummy supply with availability 3700-3500=200
S Los Angeles 1000
units to make the problem a balanced one.
o 100 108
1300
Detroit
If a destination receives u units from the dummy source, it u
102 68
means that that destination gets u units less than what it r New Orleans 1200
demanded. c 0 0
200
Dummy
e
Demand 2300 1400
We usually put the cost per unit of transporting from a dummy
source as zero (unless some restrictions are there). Thus we get We write inside the (i,j) cell the amount to be shipped from source
i to destination j. A blank inside a cell indicates no amount was
the transportation tableau
shipped.
77 78
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Destination
Example 20:
Denver Miami Supply
In the previous problem, penalty costs are levied at the rate of
80 M
$200 and $300 for each undelivered car at Denver and Miami S Los Angeles 1000
respectively. Additionally no deliveries are made from the Los o 100 108
1300
Detroit
Angeles plant to the Miami distribution center. Set up the u
102 68
transportation model. r New Orleans 1200
Solution: c 200 300
200
Dummy
e
The above imply that the "cost" of transporting a car from the
Demand 2300 1400
dummy source to Denver and Miami are respectively 200 and
300. The second condition means we put a "high" transportation Note: M indicates a very "big" positive number.
cost from Los Angeles to Miami. We thus get the tableau
79 80
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Example 21: Distribution Area
1 2 3
Three refineries with daily capacities of 6,5, and 8 million 1 120 180 -
gallons, respectively, supply three distribution areas with daily Refinery 2 300 100 80
demands of 4,8, and 7 million gallons, respectively. Gasoline
3 200 250 120
is distributed to the three distribution areas through a network
of pipelines. The transportation cost is 10 cents per 1000 Construct the associated transportation model.
gallons per pipeline mile. The table below gives the mileage
between the refineries and the distribution areas. Refinery 1 is
not connected to the distribution area 3.
81 82
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Solution: Destination
Distribution Area Example 22:
S 1 2 3 Supply
o 12 18 M
1 6 In the previous problem, suppose that the daily demand at area
u 30 10 8
3 drops to 4 million gallons. Surplus production at refineries 1
r Refinery 2 5 and 2 is diverted to other distribution areas by truck. The
transportation cost per 100 gallons is $1.50 from refinery 1 and
c 20 25 12
8 $2.20 from refinery 2. Refinery 3 can divert its surplus
3
e production to other chemical processes within the plant.
Demand 4 8 7
Formulate the problem as a transportation model.
The problem is a balanced one. M indicates a very "big"
positive number.
3 3 Solution: We introduce a dummy destination.
The total cost will be 1000* c ij x ij
i 1 j 1 83 84
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Destination
Distribution Area Example 23:
S 1 2 3 Dummy Supply
o 1 12 18 M 15
6
Three orchards supply crates of oranges to four retailers. The
u daily demand at the four retailers is 150,150,400, and 100
30 10 8 22
r Refinery 2 5 crates, respectively. Supply at the three orchards is dictated by
c 3 20 25 12 0 8 available regular labor and is estimated at 150, 200, and 250
e crates daily. However, both orchards 1 and 2 have indicated
Demand 4 8 4 3
that they could supply more crates, if necessary by using
M indicates a very "big" positive number. overtime labor. Orchard 3 does not offer this option. The
transportation costs (in dollars) per crate from the orchards to
3 3 the retailers are given in Table below.
The total cost will be 1000* c ij x ij
i 1 j 1 85 86
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Retailer Destination
1 2 3 4 Retailer
S O 1 2 3 4 Dummy Supply
1 1 2 3 2 o r
1
1 2 3 2 0
350
Orchard 2 2 4 1 2 u c
3 1 3 5 3 h 2 2 4 1 2 0
400
r a
c 1 3 5 3 M
Formulate the problem as a transportation model. r 3 250
e d
Solution: Demand 150 150 400 100 200
Since the orchards 1, 2 can supply more crates with overtime
labor, we increase their capacities to 150+200=350 and
200+200=400 respectively (as initially the total supply fell short
by 200). But then to balance the problem we add a dummy
destination. The tableau follows.
87 88
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Finding a BFS for the TP
5. Determination of a and then iteratively move towards the optimal solution which has
the least shipping cost.
Starting Basic Feasible Unlike other Linear Programming problems, a balanced TP with
m supply points and n demand points is easier to solve, although
Solution it has m + n equality constraints. The reason for that is, if a set of
decision variables (xij’s) satisfy all but one constraint, the values
for xij’s will satisfy that remaining constraint automatically.
89 90
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Determination of the Starting Solution Starting BFS for the Transportation Problem
Step 2:
If for any cell, supply equals demand, then the next allocation can
be made in cell either in the next row or column.
Step 5:
Continue the procedure until the total available quantity is fully
allocated to the cells as required.
95 96
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Solution: After we check the east and south cells, we see that we can go
east (meaning supply point 1 still has capacity to fulfill some
We can set x11=3 (meaning demand point 1 is satisfied by
supply point 1). demand).
5 3 2 X
6 6
2 2
3 5 2 3 X 3 2 3
3 2 3 2 X
6 3 3
2 2
X 5 2 3 X X 2 3
97 98
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
3 2 X
3 2 1
3 2 X
2
X X X 3 3 2 1 X
3 2 X 2 X
X X X X
3 2 1 X
X X X 2
99 100
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Example 25: Find an initial BFS for the following Solution:
transportation problem. Destination Destination
1 2 3 4 Supply 1 2 3 4 Supply
3 7 6 4 3 7 6 4
1 5 1 52
3 2
Source 2 4 3 2 Source 2 4 3 2
2 2 2 1 1 21
4 3 8 5 4 3 8 5
3 3 3 1 2 3 2
Demand 3 3 2 2 Demand 3 3 1 2 1 2
1
1
30
1
20
1 2 1
50
D1 D2 D3 D4 Supply
19 30 50 10
S1 7
1 1 1 1 1 5 2
2 0 60 60
source 70 30 40 60
S2 9
1 1 2 2 M 6 3
3 10 30 10 50
40 8 70 20
S3 18
M 0 M 0 0 4 14
4(D) 50 50
Demand 5 8 7 14 34
Demand 30 20 70 30 60
vj
103 104
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Example 28: Find an initial BFS using the NW corner Example 29: Find an initial BFS using the NW corner
method for the following transportation problem. method for the following transportation problem.
- The initial solution is complete when all rim requirements are satisfied.
- Transportation cost is computed by evaluating the objective function:
Z = $6x1A + 8x1B + 10x1C + 7x2A + 11x2B + 11x2C + 4x3A + 5x3B + 12x3C
= 6(150) + 8(0) + 10(0) + 7(50) + 11(100) + 11(25) + 4(0) + 5(0) + 12(275) Total sipping cost = 2250
= $5,925
105 106
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
107 108
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Example 31: Find an initial BFS using the NW corner
method for the following transportation problem. Solution:
D1 D2 D3 D4 Supply D1 D2 D3 D4 Supply
S1 5 S1 2 3 5
S2 1 S2 1 1
S3 3 S3 0 2 1 3
Demand 2 4 2 1 9 Demand 2 4 2 1 9
109 110
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
111 112
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
2. The Least Cost Method for
Determining the Starting BFS
Step2: Then eliminate the row or column in which supply or
demand is exhausted. If both the supply and demand values
Step1: In this method we start assigning as much as are the same, either of the row or column can be eliminated.
possible to the cell with the least cost (ties are broken In case, the smallest unit cost is not unique, then select the
arbitrarily) and the associated amounts of supply and cell where maximum allocation can be made.
Example 33: Find a starting BFS using the Minimum Step 2: Cross-out column 2
Cost Method
2 3 5 6 2 1 3 5
5 2
8
2 1 3 5 3 8 4 6
10 15
3 8 4 6 12 X 4 6
15
12 8 4 6
115 116
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Step 3: Find the new cell with minimum shipping cost and cross- Step 4: Find the new cell with minimum shipping cost and cross-
out row 2 out row 1
2 3 5 6 2 3 5 6
5 X
5
2 1 3 5 2 1 3 5
X X
2 8 2 8
3 8 4 6 3 8 4 6
15 15
10 X 4 6 5 X 4 6
117 118
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Step 5: Find the new cell with minimum shipping cost and cross- Step 6: Find the new cell with minimum shipping cost and cross-
out column 1 out column 3
2 3 5 6 2 3 5 6
X X
5 5
2 1 3 5 2 1 3 5
X X
2 8 2 8
3 8 4 6 3 8 4 6
10 6
5 5 4
X X 4 6 X X X 6
119 120
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Step 7: Finally assign 6 to last cell. The BFS is found as: x11=5, Example 34: Find a starting BFS using the Minimum
x21=2, x22=8, x31=5, x33=4 and x34=6 Cost Method
2 3 5 6
X
5
2 1 3 5
X
2 8
3 8 4 6
X
5 4 6
X X X X
121 122
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
125 126
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
D1 D2 D3 D4 Supply D1 D2 D3 D4 Supply
2 3 5 6 2 3 5 6
S1 5 S1 5
5
2 1 3 5 2 1 3 5
S2 10 S2 10
2 8
3 8 4 6 3 8 4 6
S3 15 S3 15
5 4 6
Demand 12 8 4 6 30 Demand 12 8 4 6 30
127 128
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Example 37: Find an initial BFS for the following Solution:
transportation problem. Destination Destination
1 2 3 4 Supply 1 2 3 4 Supply
3 7 6 4 3 7 6 4
1 5 1 1 0 2 2 542
Source 2 4 3 2 Source 2 4 3 2
2 2 2 2 2
4 3 8 5 4 3 8 5
3 3 3 3 3
Demand 3 3 2 2 Demand 3 1 3 0 2 2
131 132
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
3. The Vogel’s Approximation method
If both a row and a column are simultaneously satisfied then
(VAM)
Step 1. For each row (column), determine a penalty by If exactly one row or column is left uncrossed make the
subtracting the smallest unit cost in the row (column) from the obvious allocations and stop. Else cross out one only (either
next smallest unit cost in the same row (column). ( If two unit
the row or the column) and leave a zero supply (demand) in
costs tie for being the smallest unit cost, then the penalty is
0). the uncrossed out row (column). (But omit that row or
column for calculating future penalties).
Step2. Identify the row or column with the largest penalty. Break
ties arbitrarily. Allocate as much as possible to the cell with the
least unit cost in the selected row or column. (Again break the Step 3. If all allocations are made, stop. Else go to step 1.
ties arbitrarily.) Adjust the supply and demand and cross out
the satisfied row or column.
133 134
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
15 80 78 15 80 78
15 78-15=63 15 78-15=63
Demand 15 5 5 Demand 15 X 5
137 138
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Step 3: Identify the largest penalty and assign the highest Step 4: Identify the largest penalty and assign the highest
possible value to the variable. possible value to the variable.
6 7 8 6 7 8
0 _ X _
5 5 0 5 5
15 80 78 15 80 78
15 _ 15 _
Demand 15 X X Demand 15 X X
139 140
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Step 5: Finally the BFS is found as x11=0, x12=5, x13=5, and Example 41:
x21=15.
Find an initial BFS for the following transportation problem.
6 7 8
X _
0 5 5
15 80 78
X _
15
Demand X X X
Column Penalty _ _ _
141 142
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
- VAM allocates as much as possible to the minimum cost cell in the row or column with the - After each VAM cell allocation, all row and column penalty costs are recomputed.
largest penalty cost.
The Second
The Initial VAM AM Allocation
Allocation
143 144
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
- Re-compute penalty costs after the third allocation. - The initial VAM solution; total cost = $5,125
- VAM and minimum cell cost methods both provide better initial solutions than does the
northwest corner method.
145 146
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Example 42: Find a starting BFS using the Vogel’s Method Solution:
Suppl Row
D1 D2 D3
D1 D2 D3 Supply y penalty
6 7 8 6 7 8
S1 10 S1 10 7-6=1
15 80 78 15 80 78
S2 15 S2 15 8-15=63
Demand 15 5 5 25 Demand 15 5 5
Column
15-6=9 80-7=73 78-8=70
Penalty
147 148
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Suppl Row Suppl Row
D1 D2 D3 D1 D2 D3
y penalty y penalty
6 7 8 6 7 8
S1 5 8-6=2 S1 0 —
5 5 5
15 80 78 15 80 78
S2 15 8-15=63 S2 15 —
Demand 15 X 5 Demand 15 X X
Column Column
15-6=9 — 78-8=70 15-6=9 — —
Penalty Penalty
149 150
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
D1 D2 D3 Supply
6 7 8
S1 10
0 5 5
15 80 78
S2 15
15
Demand 15 5 5 25
153 154
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Transportation Problem
155 156
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Degenerate BFS Degenerate BFS
In order to evaluate the routes, we need to introduce some In simplex language, we say that we have a degenerate BFS.
cell (s) with zero values. That cell should be selected at
the correct place.
157 158
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Factory 2 0 8 4 3
100 20 120
Factory 3 9 7 5
80 80
Added this
Note: we pick this over others because it has the least cost for the Min Z problem! Customer
Requirements 100 100 100 300
161 162
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Example 47: Degeneracy The Minimum Cell Cost Initial Solution To rectify a degenerate tableau, an empty cell must artificially
be treated as an occupied cell.
163 164
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
The TP and Unacceptable Routes Example 48: Unacceptable Routes
– Certain origin-destination routes may be unacceptable due When one route cannot be used then Assign a big
If 1C Cannot
to weather factors, equipment breakdowns, labor problems, M cost to its cell delivered
Then we assign
or skill requirements that either prohibit, or make M value here
Thus, there are m n -1 basic variables. 169 given this special form 170
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
173 174
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
179 180
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
The Transportation Simplex Method
Properties of Transportation Problem
• The transportation problem is solved in two phases:
• Feasible Solutions Property :
m n m n – Phase I – Finding an initial basic feasible solution
ai bj xij – Phase II – Iterating to the optimal solution
i 1 j 1 i 1 j 1
• In Phase I, an initial basic feasible solution is determined.
If the total supply total demand, it mean either ai or bj • In Phase II, the Stepping Stone Method, using the Modified
represent a bound rather than an exact requirement, in this
Distribution Method (MODI) for evaluating the reduced costs
case introduce “dummy source” or “dummy destination”
as the slack variable. may be used to move from the initial feasible solution to the
optimal one.
• Integer solutions property: Not only ai and bj must be
integer values. But also all the B.F.S. have integer values.
181 182
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
183 184
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
The Transportation Simplex Method Solution of the Transportation Problem
• The transportation problem is solved in two phases: Once an initial basic feasible solution is obtained, the next
– Phase I – Finding an initial basic feasible solution step is to check its optimality.
– Phase II – Iterating to the optimal solution
• In Phase I, an initial basic feasible solution is determined. An optimal solution is one where there is no other set of
• In Phase II, the Stepping Stone Method, using the Modified transportation routes (allocations) that will further reduce the
Distribution Method (MODI) for evaluating the reduced costs total transportation cost. Thus, we have to evaluate each un-
may be used to move from the initial feasible solution to the
occupied cell in the transportation table in terms of an
optimal one.
opportunity of reducing the total transportation cost.
185 186
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
If we have a B.F.S. consisting of (m+ n–1) independent positive A basic feasible solution is optimal if and
allocations and a set of arbitrary number ui and vj (i=1,2,...m; only if rij cij ui vj 0 for every ( i , j )
j=1,2,...n) such that cij = ui + vj for all occupied cells (i, j) then the
such that xij is non-basic.
value rij corresponding to each empty cell (i, j) is given by :
rij = cij – ui – vj
This value is also called the opportunity cost for un-occupied cells.
187 188
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
The Modified Distribution (MODI) or
Remark: the u-v Method
Step 1: Start with B.F.S. consisting of (m+ n–1) allocations in
independent positions.
Since cij – ui – vj = 0 if xij is a basic variable,
Step 2: Determine a set of m+n numbers ui (i=1,2,....m) and
cij = ui + vj if xij is a basic variable,
vj (j=1,2,...n) for all the rows and columns such that for each
There are m+n-1 basic variables. occupied cell (i,j), the following condition is satisfied :
cij = ui + vj
m+n-1 equations, but m+n unknowns. We arbitrarily choose one of them and equate to zero and determine the
remaining m+n-1 of them. We usually, choose u1 =0
A convenient choice is to select ui that has the largest
number of allocations in its row (tie broken Step 3: Calculate cell evaluations (opportunity cost) rij for
each empty cell (i,j) by using the formula : rij = cij – ui – vj for all i & j.
arbitrarily), and to assign it to be zero.
189 190
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Step 4: Examine the matrix of cell evaluation rij for negative Step 5: Construct a closed path (loop) for the unoccupied cell
entries and conclude that having largest negative opportunity cost. Mark a (+) sign in
this cell and move along the rows (or columns) to find an
i) If all rij > 0 , then solution is optimal and unique.
occupied cell. Mark a (-) sign in this cell and find out another
ii) If at least one rij = 0 , then solution is optimal and alternate
occupied cell. Repeat the process and mark the occupied cells
solution also exists. with (+) and (-) signs alternatively. Close the path back to the
iii) If at least one rij < 0 ,then solution is not optimal and an selected unoccupied cell.
improved solution can be obtained.
In this case, the un-occupied cell with the largest negative value of rij
is considered for the new transportation schedule.
191 192
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Step 6: Select the smallest quantity amongst the cells marked
with (-) sign. Allocate this value to the unoccupied cell of the
loop and add and subtract it in the occupied cells as per their
signs.
Example 49: Solve the transportation problem with the Solution: The first step consists of determining a starting
following cost function. BFS. In this case we use the Northwest method.
Destination Supply Destination Supply
3 7 6 4 3 7 6 4
S 5 S 5
3 2 0 1
o o
2 4 3 2 2 4 3 2
u 2 u 1 1 2
r 2
r
4 3 8 5 c 4 3 8 5
c 3 1 2 3
e e
Demand 3 3 2 2 Demand 3 3 2 2
195 196
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
The second step consists of calculate the ui, vi and rij to check the
optimality. Determining the Leaving Variable
Destination
Iteration 1
v1=3v2=7 v3=6 v4=3 Supply
3 7 6 4
S 5 We first construct a closed loop that starts and ends at the entering
u1=0 3 2
o 0 1 variable cell. The loop consists of connected horizontal and
u 2 4 3 2
u2= -3 1 1 2 vertical segments only (no diagonals are allowed). Except for the
r 2 2 entering variable cell, each vertex (or corner) of the closed loop
c 4 3 8 5
u3 = 2 3 must correspond to a basic variable cell. The loop can cross itself
e 1 2
-1 -6 and bypass one or more basic variables. The amount to be
Demand 3 3 2 2 allocated to the entering variable cell is such that it satisfies all the
demand and supply restrictions and must be non-negative. Usually
Thus x32 enters the basis. Total Cost =48 197 198
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Destination
Iteration 3 Total Cost =42
Thus will become 0 and x32 leaves the basis. Again the
BFS is degenerate . But the transportation cost remains v1=3 v2=7 v3=6 v4=9 Supply
3 7 6 4
the same and we say the second iteration is over. The S 3 2 0 5
u1=0
o -5
resulting new tableau is on the next slide.
u 2 4 3 2
u2= -3 2 2
r 2 0 -4
c 4 3 8 5
u3= -4 1 2 3
e 5 6
Demand 3 3 2 2
209 210
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
213 214
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Iteration 1 Tableau
The Stepping Stone Method
The stepping stone path for cell (2,4) is (2,4), (1,4),
(1,2), (2,2). The allocations in the subtraction cells
Westwood Dummy
Northwood Eastwood ui are 20 and 40, respectively. The minimum is 20,
24 30 40 0 and hence reallocate 20 along this path. Thus for
Plant 1 25 5 +8 20 0
the next tableau:
30 40 42 0 x24 = 0 + 20 = 20 (0 is its current allocation)
Plant 2 -4 40 10 -10 10
x14 = 20 - 20 = 0 (blank for the next tableau)
vj 24 30 32 0 x12 = 5 + 20 = 25
x22 = 40 - 20 = 20
Note that the most negative reduced cost is = -10 determined by x24.
Therefore, x24 will be the entering variable. The stepping stone method The other occupied cells remain the same.
will help us determine the leaving variable.
215 216
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Iteration 1 Tableau (Stepping Stone Method)
New BFS Tableau 1
Westwood Dummy Supply Westwood Dummy Supply
Northwood Eastwood Northwood Eastwood
24 30 40 0 24 30 40 0
Plant 1 25 5+ 20 - 50 Plant 1 25 25 50
30 40 42 0 30 40 42 0
Plant 2 40- 10 + 50 Plant 2 20 10 20 50
Demand 25 45 10 20 Demand 25 45 10 20
217 218
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
219 220
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
• The Stepping Stone Method
The most negative reduced cost is = -4 determined
Iteration 2 Tableau by x21. The stepping stone path for this cell is
Westwood (2,1),(1,1),(1,2),(2,2). The allocations in the
Dummy ui
Northwood Eastwood subtraction cells are 25 and 20 respectively.
24 30 40 0 Thus the new solution is obtained by reallocating 20
Plant 1 25 25 +8 +10 0
on the stepping stone path. Thus for the next
30 40 42 0 tableau:
Plant 2 -4 20 10 20 10
x21 = 0 + 20 = 20 (0 is its current allocation)
vj 24 30 36 -6 x11 = 25 - 20 = 5
x12 = 25 + 20 = 45
Note that the most negative reduced cost is = -4 determined by x21.
x22 = 20 - 20 = 0 (blank for the next tableau)
Therefore, x21 will be the entering variable. The stepping stone method
will help us determine the leaving variable.
The other occupied cells remain the same.
221 222
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
30 40 42 0 30 40 42 0
Plant 2 + 20- 10 20 Plant 2 20 10 20
50 50
Demand 25 45 10 20 Demand 25 45 10 20
223 224
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Iteration 3
Calculate the reduced costs (circled numbers on the
next slide) by cij - ui - vj.
• The MODI Method
The reduced costs are found by calculating the ui's Unoccupied Cell Reduced Cost
and vj's for this tableau. (1,3) 40 - 0 - 36 = 4
1. Set u1 = 0 (1,4) 0 - 0 - (-6) = 6
2. Since u1 + vj = c1j for occupied cells in row 1, then (2,2) 40 - 6 - 30 = 4
v1 = 24 and v2 = 30.
3. Since ui + v1 = ci1 for occupied cells in column 2,
then u2 + 24 = 30 or u2 = 6.
4. Since u2 + vj = c2j for occupied cells in row 2, then
6 + v3 = 42 or v3 = 36, and 6 + v4 = 0 or v4 = -6.
225 226
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
vj 24 30 36 -6
227 228
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Example 51: Solution:
1 2 3 Supply
In the unbalanced transportation problem given in the table
1 1 2 1 20
below, if a unit from a source is not shipped out (to any of the
destinations) a storage cost is incurred at the rate of $5, $4, and
2 3 4 5 40
3 2 3 3 30
$3 per unit for sources 1,2, and 3 respectively. Additionally all
the supply at source 2 must be shipped out completely to make
Demand 30 20 20
room for a new product. Use VAM to determine the starting To balance the problem, we introduce a dummy
solution and determine the optimum solution. destination with transportation costs $5, $M, $3
respectively.
229 230
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Destination Destination
1 2 3 Dummy Supply Row Penalties Starting Tableau Total Cost =240
1 2 1 5 0 - - -
1 20 20 v2=3 v3=3 v4=3 Supply
v1=2
S
1 2 1 5
o 3 4 5 M
40 10 1 1 1 1 S u1=-2 20 20
2 30 10 1 1 4
u o
r 2 3 3 3 u 3 4 5 M
3 10 0 20 30 10 1 11 0 u2= 1 30 10 40
c r 1 -4+M
e Demand 30 20 10 20 0 20 c 2 3 3 3
u3 = 0 10 0 20 30
e 0
1 1 2 2
Column
Penalties 1 1 - M-3 Demand 30 20 20 20
1 1 - -
- 1 - - 231 Thus this is the optimal tableau. Alt Opt solutions exist. 232
EE 477 Total shipping cost = 240
Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Example 52: If each task is to be allocated to a person (i.e. no splitting of the
The table below gives the times taken by 3 persons to task between 2 or more persons is allowed) and if each person can
complete 4 tasks ( i.e. cell (i,j) is the time taken by person i to be assigned at most two tasks, find the optimum allocation of the
complete the task j). jobs to the persons to minimize the total time taken to complete all
the 4 tasks.
Tasks
1 2 3 4 Solution: This can be formulated as a transportation model with
1 4 1 2 6 three sources (persons) and 4 destinations (tasks). The demands at
Person 2 6 4 3 5 the three destinations are bj = 1 for j=1,2,3,4. But the availabilities
3 5 2 6 4 are ai = 2 for i=1, 2, 3 as each person can be assigned a maximum
of two tasks. Thus to balance the problem, we introduce a dummy
233 task with demand 2 and time 0. Thus we get the starting tableau: 234
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Destination
Starting Tableau Destination Starting Tableau
1 2 3 4 Dummy Supply v1=5 v2=2 v3=3 v4=4 v5=0 Supply
S S
o 1 4 11 2 1 6 0 2 1 1 1 3 o u1= -1
4 1 2 6 0
2
0 1 1
-3 -1
u 2 6 4 3 5 0 2 2 3 - -
u
6 4 3 5 0
r r u2= 0 2 2
c 3 5 1
2 0
6 4 1 0 0 2 2 22 c -1 -2 0 -1
e e 5 2 6 4 0
2
0
Demand 1 1 0 1 1 2 0 u3= 0 1 0 1
-3
1 1 1 1 0 Demand 1 1 1 1 2
1 1 4 2 -
1 1 - 2 - Thus this is the optimal tableau. Optimal cost = 12
235 236
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Example 53: Medical Supply Transportation Problem
To
TO WAREHOUSE S N P M
From Plant Capacity
Plant Capacity From
S N P M
19 7 3 21
S 300
KL x31 x32 x33 x34 200
11 14 15 22
Warehouse
Demand
150 100 200 150 600 KL 200
-- Number of constraints = number of rows + number of columns Demand 150 100 200 150 600
--Total plant capacity must equal total warehouse demand.
Although this may seem unrealistic in real world application, it Begin with a blank shipment schedule. Note the shipping
is possible to construct any transportation problem using this model. costs in the upper right hand corner of each cell.
239 240
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Northwest Corner Method Northwest Corner Method
To To
S N P M S N P M
Capacity Capacity
From From
19 7 3 21 19 7 3 21
15 21 18 6 15 21 18 6
S 300 S 50 300
11 14 15 22 11 14 15 22
KL 200 KL 200
Demand 150 100 200 150 600 Demand 150 100 200 150 600
Start in the upper left-hand corner, “northwest corner” of the schedule Since Juarez capacity is depleted move down to repeat the
and place the largest amount of capacity and demand available in that process for the Seoul to Seattle cell. Seoul has sufficient
cell. Seattle demands 150 and Jaurez has a capacity of 100. capacity but Seattle can only take another 50 packs of demand.
241 242
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
To
S N P M To
Capacity S N P M
From Capacity
From
19 7 3 21
J 100 100
19 7 3 21 1900
J 1900 100
15 21 18 6 750
15 21 18 6
S 50 100 150 300
S 750 2100 2700 300 2100
11 14 15 22
KL 50 150 200
11 14 15 22 2700
KL 750 3300 200
750
Demand 150 100 200 150 600
Demand 150 100 200 150 600 3300
Now move to the next cells to the right and assign capacity for
Seoul to warehouse demand until depleted. Then move down The previous slides show the process of satisfying all constraints
and allows us to begin with a starting feasible solution. Multiply C =11,500
to the KL row and repeat the process.
243
the quantity in each cell by the cost. 244
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
For non empty cells: cij = ui+ vj For non empty cells: cij = ui+ vj
Assign zero as the row number for the first row. Assign zero as the row number for the first row.
To
S N P M
To Capacity
S N P M From
Capacity
From 19 7 3 21
19 7 3 21 J 100 100 u1 = 0 a
u1 = 0 a
J 100 100
15 21 18 6
15 21 18 6 S 50 100 150 300 u2 = -4 c
S 50 100 150 300
11 14 15 22
11 14 15 22 T 50 150 200
KL 50 150 200
To To
S N P M S N P M
Capacity Capacity
From From
19 7 3 21 19 7 3 21
J 100 100 u1 = 0 a J 100 100 u1 = 0 a
15 21 18 6 15 21 18 6
S 50 100 150 300 u2 = -4 c S 50 100 150 300 u2 = -4 c
* *
11 14 15 22 11 14 15 22
T 50 150 200 T 50 150 200 u3 = -7 e
Demand 150 100 200 150 600 Demand 150 100 200 150 600
v1 = 19 v3 = 22 v1 = 19 v3 = 22
18 =-4 + v3 b d
15 = u3+ 22 b d
Skip cell SN, mark it * for later
v3 = 22 u3= -7
and move on to cell SP .
247 248
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
For non empty cells: cij = ui+ vj For non empty cells: cij = ui+ vj
Assign zero as the row number for the first row then Assign zero as the row number for the first row then
use the newest r value to compute the next k. use the newest r value to compute the next k.
To To
S N P M S N P M
Capacity Capacity
From From
19 7 3 21 19 7 3 21
J 100 100 u1 = 0 a J 100 100 u1 = 0 a
15 21 18 6 15 21 18 6
S 50 100 150 300 u2 = -4 c S 50 100 150 300 u2 = -4 c
* *
11 14 15 22 11 14 15 22
T 50 150 200 u3 = -7 e T 50 150 200 u3 = -7 e
Demand 150 100 200 150 600 Demand 150 100 200 150 600
v1 = 19 v3 = 22 v4 = 29 v1 = 19 v2 = 25 v3 = 22 v4 = 29
22 = -7 + v4 b d f
21= -4 + v2 b g d f
v4= 29 v2= 25
249 250
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Next calculate empty cells using: cij - ui - vj Next calculate empty cells using: cij - ui - vj
Improvement Difference >> r12 = 7 – 0 – 25 = -18 Improvement Difference >> r13 = 3 – 0 – 22 = -19
To To
S N P M S N P M
Capacity Capacity
From From
19 7 3 21 19 7 3 21
J 100 100 u1 = 0 a J 100 100 u1 = 0 a
-18 -18 -19
15 21 18 6 15 21 18 6
S 50 100 150 300 u2 = -4 c S 50 100 150 300 u2 = -4 c
11 14 15 22 11 14 15 22
T 50 150 200 u3 = -7 e T 50 150 200 u3 = -7 e
Demand 150 100 200 150 600 Demand 150 100 200 150 600
v1 = 19 v2 = 25 v3 = 22 v4 = 29 v1 = 19 v2 = 25 v3 = 22 v4 = 29
b g d f b g d f
251 252
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Next calculate empty cells using: cij - ui - vj Next calculate empty cells using: cij - ui - vj
Improvement Difference >> r14 = 21 – 0 – 29 = -8 Improvement Difference >> r24 = 6 – (-4) – 29 = -19
To To
S N P M S N P M
Capacity Capacity
From From
19 7 3 21 19 7 3 21
J 100 100 u1 = 0 a J 100 100 u1 = 0 a
-18 -19 -8 -18 -19 -8
15 21 18 6 15 21 18 6
S 50 100 150 300 u2 = -4 c S 50 100 150 300 u2 = -4 c
-19
11 14 15 22 11 14 15 22
T 50 150 200 u3 = -7 e T 50 150 200 u3 = -7 e
Demand 150 100 200 150 600 Demand 150 100 200 150 600
v1 = 19 v2 = 25 v3 = 22 v4 = 29 v1 = 19 v2 = 25 v3 = 22 v4 = 29
b g d f b g d f
253 254
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Next calculate empty cells using: cij - ri - kj Next calculate empty cells using: cij - ui - vj
Improvement Difference >> r31 = 11 – (-7) – 19 = -1 Improvement Difference >> r32 = 14 – (-7) – 25 = -4
To To
S N P M S N P M
Capacity Capacity
From From
19 7 3 21 19 7 3 21
J 100 100 u1 = 0 a J 100 100 u1 = 0 a
-18 -19 -8 -18 -19 -8
15 21 18 6 15 21 18 6
S 50 100 150 300 u2 = -4 c S 50 100 150 300 u2 = -4 c
-19 -19
11 14 15 22 11 14 15 22
T 50 150 200 u3 = -7 e T 50 150 200 u3 = -7 e
-1 -1 -4
Demand 150 100 200 150 600 Demand 150 100 200 150 600
v1 = 19 v3 = 25 v3 = 22 v4 = 29 v1 = 19 v2 = 25 v3 = 22 v4 = 29
b g d f b g d f
255 256
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Improvement Difference >> Improvement Difference >>
To To
S N P M S N P M
Capacity Capacity
From From
19 7 3 21 19 7 3 21
Demand 150 100 200 150 600 Demand 150 100 200 150 600
v1 = 19 v2 = 25 v3 = 22 v4 = 29 v1 = 19 v2 = 25 v3 = 22 v4 = 29
b g d f b g d f
257 258
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
To To
S N P M S N P M
Capacity Capacity 300
From From
19 7 3 21 19 7 3 21 2250
J 100 100 100 u1= 0 J 100 100 u1 = 0 2100
(-) -18 -19 (+) -8
(-) -18 -19 (+) -8
15 21 18 6 15 21 18 6
900
S 50 100 150 300 S 150
50 100 50 300 750
(+) (-) -19 u2 = -4 (+) (-) -19 u2 = -4 3300
11 14 15 22 11 14 15 22
C = $9,600
T 50 150 200 T 50 150 200
-1 -4 u3 = -7 -1 -4 u3= -7
Demand 150 100 200 150 600 Demand 150 100 200 150 600
v1= 19 v2 = 25 v3 = 22 v4 = 29 v1 = 19 v2 = 25 v3 = 22 v4 = 29
Note: Except for the entering cell all changes must Note: Except for the entering cell all changes must involve nonempty cells.
involve nonempty cells.
259 260
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Begin another iteration choosing the empty cell with the Begin another iteration choosing the empty cell with the
greatest absolute negative improvement difference. greatest absolute negative improvement difference.
>>>>>SM SM
Previous cost was $9,600, now the new is:
To To
S N P M S N P M
Capacity Capacity 300
From From
19 7 3 21 19 7 3 21 2250
J 100 100 u1 = 0 J 100 100 u 1= 0 2100
19 1 11 19 1 11 300
15 21 18 6 15 21 18 6
S 150
50 100 50 300 S 150
50 100 50 50 300 1500
(-) -19
(+) u2 = 15 (-) -19
(+) u2 = 15 2200
11 14 15 22 11 14 15 22
150 100 150
100
C = $8,650
T 50 200 T 50 200
-1 -4 (+) (-) u3 = 12 -1 -4 (+) (-) u3 = 12
Demand 150 100 200 150 600 Demand 150 100 200 150 600
v1 = 0 v2 = 6 v3 = 3 v4 = 10 v1 = 0 v 2= 6 v3 = 3 v4 = 10
Note: The r and k values and the improvement Note: The r and k values and the improvement
difference values have changed. 261 difference values have changed. 262
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Begin another iteration choosing the empty cell with the Begin another iteration choosing the empty cell with the
greatest absolute negative improvement difference. greatest absolute negative improvement difference.
SM SM
Previous cost was $8,650, now the new is: $6,350
To To
S N P M S N P M
Capacity 300 Capacity 300
From From
19 7 3 21 2250 19 7 3 21 2250
J 100 100 u1 = 0 900 J 100 100 u1 = 0 900
0 -18 11 1400 20 5 31 1400
15 21 18 6 15 21 18 6
100 50
150 1500 150 150 1500
S 150
50 300 S 300
(-) -19
(+) u2 = -4 (-) 3 -1
(+) u2 = 16
11 14 15 22 11 14 15 22
100 100 0
100 C = $6,350 0 100 100 C = $6,350
T 200 T 200
-20
(+)
-23
(-) u3 = 12 (+) (-) 20 u3= 12
Demand 150 100 200 150 600 Demand 150 100 200 150 600
v1= 19 v2= 2 v3 = 3 v4 = 10 v1 = -1 v2 = 2 v3 = 3 v4 = 10
Note: The u and v values and the improvement Note: The u and v values and the improvement
difference values have changed. 263 difference values have changed. 264
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Optimal Solution In five iterations the shipping cost has moved Example 54:
from $11,500 to $6,250. There are no
remaining empty cells with a negative value. Solve the following transportation problem.
$6,250
Client Supply
To
S N P M
Capacity
From
300 1 2 3 4
19 7 3 21 750
J 100 100 u1 = 0 1800
19 4 30 900
1 4 6 8 3 700
15 21 18 6
S
50 100 150
300 1100
(-) (+) u2 = 15 1400
11
3
14 15 22
C = $6,250 Factories 2 5 5 7 4 900
100 100
T 200
(+) 1 (-) 20 u3= 11
Note: The u and v values and the improvement difference values have changed. Demand 800 500 600 1300
265 266
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Solution: Iteration 1:
1 2 3 4 1 2 3 4
x11 x12 x13 x14 700
1 700
1 4 6 8 3 700 4 6 8 3
300 600
x21 x22 x23 x24 Factories 2 900
5 5 7 4 5 5 7 4
Factories 2 900
500 500 600
3 1600
x31 2 x32 3 x33 11 x34 9 2 3 11 9
3 1600
Demand 800 500 600 1300
Demand 800 500 600 1300 267 268
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
BASIC: Set x1j = 0; Solve variables using cij = ui + vj NON-BASIC: xij = cij – ui - vj
vj 4 5 13 3 vj 4 5 13 3
ui Client1 Client 2 Client 3 Client 4 ui Client 1 Client 2 Client 3 Client4
700 0 1 -5 700
0 F1 4 6 8 3
700 0 F1 4 6 8 3
700
300 600 300 -1 -7 600
1 F2 900 1 F2 900
5 5 7 4 5 5 7 4
vj 4 5 13 3 vj 4 5 13 3
ui 1 2 3 4 ui 1 2 3 4
0 1 -5 700 0 1 -5 700
0 1 700
0 1 4 6 8 3 700 4 6 8 3
vj vj -3 -2 6 3
ui 1 2 3 4 ui 1 2 3 4
700 700
1 4 6 8 3 700 0 1 4 6 8 3 700
0 5 5
300 7
600 4
0 5 5
300 7
600 4
2 900 1 2 900
800 500 600 1300 273 800 500 600 1300 274
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Destination Destination
W1 W2 W3 W4 W1 W2 W3 W4
12 10 5 8 12 10 5 8
P1 90 P1 90
65 25
7 4 9 6 7 4 9 6
P2 120 P2 120
1 1 55 65
9 11 7 5 9 11 7 5
P3 75 P3 75
5 9 5 9 25 50
65 80 90 50 65 80 90 50
277 278
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Destination
W1 W2 W3 W4 ui W1 W2 W3 W4 ui
12 10 5 8 12 10 5 8
P1 90 0 P1 90 0
65 25 10 5 65 10 25 5
7 4 9 6 7 4 9 6
P2 120 6 P2 120 4
1 55 65 1 9 80 40 1
9 11 7 5 9 11 7 5
P3 75 8 P3 75 2
5 9 25 50 5 9 25 50
65 80 90 50 Z 2, 260 65 80 90 50 Z 2, 010
vj 12 10 15 13 vj 12 0 5 3
279 280
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
W1 W2 W3 W4 ui W1 W2 W3 W4 ui
12 10 5 8 12 10 5 8
P1 90 0 P1 90 0
25 1 65 5 0 1 90 0
7 4 9 6 7 4 9 6
P2 120 5 P2 120 5
40 80 9 8 40 80 9 3
9 11 7 5 9 11 7 5
P3 75 2 P3 75 3
5 0 25 50 25 5 5 50
65 80 90 50 Z 1, 625 65 80 90 50 Z 1,525
vj 12 9 5 3 vj 12 9 5 8
281 282
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Example 56:
The solution is optimal since all the rij are non-
negative. • Holiday shipments of iPods to distribution centers
• Production at 3 facilities,
The optimal solution is – A, supply 200k
– B, supply 350k
x13= 90, x21=40, x23= 80, x31=25, x34=80. – C, supply 150k
• Distribute to 4 centers,
The optimal cost is Z = 1525. – N, demand 100k
– S, demand 140k
– E, demand 300k
– W, demand 250k
• Total demand vs. total supply
283 284
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Step 2: Finding a starting BFS using the
Step 1: Initial Transportation Tableau
Northwest Method
Destination Destination Suppl
Supply
Source N S E W Source N S E W y
16 13 22 17 16 13 22 17
A 200 A 200
100 100
14 13 19 15 14 13 19 15
B 350 B 350
40 300 10
9 20 23 10 9 20 23 10
C 150 C 150
150
0 0 0 0 0 0 0 0
Dummy 90 Dummy 90
90
14 13 19 15 14 13 19 15
B 350 1 B 350 1
9 20 23 10 9 20 23 10
C 150 1 C 100 150 1
0 0 0 0 0 0 0 0
Dummy
90 --- --- Dummy --- ---
90
Demand 100 140 210 250 Demand 100 140 210 250
diff 5 0 3 5 diff 5 0 3 5
289 290
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Destination Destination
Supply diff
Supply diff Source N S E W
Source N S E W
16 13 22 17
16 13 22 17 A 200 4
A 200 4
14 13 19 15
14 13 19 15 B 350 2
B 350 2
9 20 23 10
9 20 23 10 C 50 10
C 100 50 10 100 50
0 0 0 0 0 0 0 0
Dummy --- ---
Dummy --- ---
90 90
diff --- 0 3 5
diff --- 0 3 5
291 292
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Destination Destination
Supply diff Supply diff
Source N S E W Source N S E W
16 13 22 17 16 13 22 17
A 200 4 A 200 4
140
14 13 19 15 14 13 19 15
B 350 2 B 350 2
9 20 23 10 9 20 23 10
C --- --- C --- ---
100 50 100 50
0 0 0 0 0 0 0 0
Dummy --- --- Dummy --- ---
90 90
Demand --- 140 210 200 Demand --- 140 210 200
diff --- 0 3 2 diff --- 0 3 2
293 294
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Destination
Supply diff Destination
Source N S E W Supply diff
Source N S E W
16 13 22 17
A 60 5 16 13 22 17
140 A 60 5
140 60
14 13 19 15 14 13 19 15
B 350 4
B 350 4
9 20 23 10
C --- --- 9 20 23 10
100 50 C --- ---
100 50
0 0 0 0 0 0 0 0
Dummy --- ---
90 Dummy --- ---
90
Demand --- --- 210 200 Demand --- --- 210 200
diff --- --- 3 2 diff --- --- 3 2
295 296
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Destination Destination
Supply diff Supply diff
Source N S E W Source N S E W
16 13 22 17 16 13 22 17
A --- --- A --- ---
140 60 140 60
14 13 19 15 14 13 19 15
B 350 4 B ---
210 140
9 20 23 10 9 20 23 10
C 50
--- --- C --- ---
100 100 50
0 0 0 0 0 0 0 0
Dummy --- --- Dummy --- ---
90 90
Demand --- --- 210 140 Demand --- --- --- --- Z = 10330
Destination Destination
Supply ui Supply ui
Source N S E W Source N S E W
16 100 13 100 22 17 16 100 13 100 22 17
A 200 0 A 200
- +
40 300 10 40 210 100
14 13 19 15 14 13 19 15
B 350 0 B 350
150 150
9 20 23 +
10 9 20 23 10
C - 150 -5 C 150
? 90 90
0 0 0 0 0 0 0 0
Dummy 90 -15 Dummy 90
vj 16 13 19 15 305 vj 306
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Destination Destination
Supply ui Supply ui
Source N S E W Source N S E W
- +
16 100 13 100 22 17 16 100 13 100 22 17
A 200 0 A 200 0
3 2 + -
40 210 100 ? 40 210 100
14 13 19 15 14 13 19 15
B 350 0 B 350 0
-2 150 150
9 20 23 10 9 20 23 10
C 150 -5 C 150 -5
-2 12 9
90 90
0 0 0 0 0 0 0 0
Dummy 90 -19 Dummy 90 -19
3 6 4
307 vj 16 13 19 15 308
vj 16 13477
EE 19
Dr. Mohamed Zribi15 EE 477 Dr. Mohamed Zribi
Optimality Test
Destination Destination
Supply ui Supply ui
Source N S E W Source N S E W
16 60 13 140 22 17 16 60 13 140 22 17
A 200 A 200 2
1 0
40 210 100 40 210 100
14 13 19 15 14 13 19 15
B 350 B 350 0
150
2 150
9 20 23 10 9 20 23 10
C 150 C 150 -5
90 0 14 990
0 0 0 0 0 0 0 0
Dummy 90 Dummy 90 -19
5 8 4 Z = 10330
vj 309 vj 14 11 19 15 310
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
311 312
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Step 2: Determine a Starting BFS Using the Least Cost
Method
--
--
200
200 75
313 314
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
(8-6)
(11-7)
Stop. The above tableau is an initial tableau because all (5-4)
allocations have been assigned
(6-4) (8-5) (11-10)
315 316
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Highest penalty
cost
--- ---
319 320
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Step 4: Check the Optimality of the solution
Hence, the second one has the minimum cost, but is it the
optimal solution?
The Initial tableau for VAM
321 322
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
-1
-1 +2
+5
6-0-7
Step 3: Select the cell that has the most –ve value in 2b
Note this may look difficult and complicated, however, we can add these 327 328
EE 477 asDr.
V=values into the above tableau Mohamed Zribi
well EE 477 Dr. Mohamed Zribi
Use the stepping-stone method
-1
+ -
-1 +2
+5
- +
331 332
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Example 59:
Solve the following transportation problem.
All positives
STOP
333 334
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
335 336
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Example 60:
- Formulas for cells containing allocations:
337 338
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
- After each allocation to an empty cell, the ui and vj values must be recomputed.
339 340
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
- Re-computing ui and vj values:
x1A: u1 + vA = 6, vA = 6 x1C: u1 + vC = 10, vC = 10 x2C: u2 + vC = 11, u2 = 1
x3A: u3 + vA = 4, u3 = -2 x3B: u3 + vB = 5, vB = 7
341 342
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
343 344
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Solution:
v1=2 v2=5 v3=10 Supply
Example 62:
0 ≥3 ≥8 15
u1=-2
15 The Onenote Co. produces a single product at three plants for
four customers. The three plants will produce 60, 80, and 40
5 8 ≥13
u2=3 5 25 30 25
units respectively. The firm has made a commitment to sell 40
≥7 10 5 15 80 units to customer 1, 60 units to customer 2, and at least 20
u3=5 85
units to customer 3. Both customers 3 and 4 also want to buy
20 5 30 5 80 as many of the remaining units as possible. The net profit
Demand
associated with shipping a unit from plant i to customer j is
Associated cost = 1475 given by the following table.
345 346
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Customer Solution: There are 3 sources (Plants 1, 2 and 3). Right now there
1 2 3 4
are 4 destinations (customers 1, 2, 3, and 4). The supplies ai at the
1 $800 $700 $500 $200
three sources are 60, 80, and 40 respectively. The demands at the
Plant 2 $500 $200 $100 $300 three destinations are: b1 = 40, b2 = 60, b3 20, b4 = ?
3 $600 $400 $300 $500
Since in a transportation model, all constraints are equalities, we
Management wants to know how many units to sell to
shall put b3 = 80 ( since customer 3 must get at least 20 units) and
customers 3 and 4 and how many units to ship from each of b4= 60 as the supply remaining after satisfying the three customers 1,
the plant to each of the customers to maximize profits. 2, and 3 is 60 and since customers 3 and 4 will buy as much as
Formulate the problem as a transportation model and solve it. possible.
347 348
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
Destination
But now the demand has become 240 and so we introduce a dummy 1 2 3 4 Supply
source SF with supply 60. Since the customers 1, 2 must definitely 1 -8 -7 -5 -2
60 0 60 0 1 - - -
get 40 and 60 units respectively, the dummy source cannot send any S -5 -2 -1 -3
2 80 40
o 40 40 2 2 2 -
amount to these destinations. This is achieved by putting the cost
from the dummy to these destinations as big M. Now the cost from u 3 -6 -4 -3 -5
20 20 40 20 1 1 2 2
dummy to the destinations 3 and 4 are put as zero. Also since these
r
SF M M 0 0
c 60 60 0 0 0 0
are actually profits, and since the transportation model is a
e
minimization problem, to maximize the total profit we take cij as Demand 40 60 80 6020
Destination
v1= -9 v2= -7 v3= -5 v4= -7
u1= 0 -8 -7 -5 -2
S -1 60 0 -5
o u2= 4 -5 -2 -1 -3
u 40 -5 0 40
r -6 -4 -3 -5
u3= 2 20 20
c -1 -9
e M M 0 0
u4= 5 60
-4-M -2-M -2