You are on page 1of 56

Transportation Problem

Teuku Naraski Zahari, S.T., M.T.


Introduction
A transportation problem basically deals with the problem, which
aims to find the best way to fulfill the demand of 𝑛 demand points
using the capacities of 𝑚 supply points.

While trying to find the best way, generally a variable cost of shipping
the product from one supply point to a demand point or a similar
constraint should be taken into consideration.
Transportation Problem Generalization
(1/5)
• In general, a transportation problem is specified by the following
information:
o A set of 𝑚 supply points from which a good is shipped. Supply point
𝑖 can supply at most 𝑠𝑖 units.
o A set of 𝑛 demand points to which the good is shipped. Demand
point 𝑗 must receive at least 𝑑𝑖 units of the shipped good.
o Each unit produced at supply point 𝑖 and shipped to demand point
𝑗 incurs a variable cost of 𝑐𝑖𝑗.
Transportation Problem Generalization
(2/5)
• 𝑥𝑖𝑗 = number of units shipped from supply point 𝑖 to demand point 𝑗
i=m j =n
mincijXij
i=1 j =1
j =n
s.t.Xij  si(i =1,2,...,m)
j =1
i=m

X  d ( j =1,2,...,n)
i=1
ij j

Xij  0(i =1,2,...,m; j =1,2,...,n)


Transportation Problem Generalization
(3/5)
• Parameter table for the transportation problem
Transportation Problem Generalization
(4/5)
• The transportation problem can be represented into a Transportation
Tableau
Transportation Problem Generalization
(5/5)
• Network representation of the transportation problem
Example 2 (1/5)
Powerco Formulation
Powerco has three electric power plants that supply the electric needs
of four cities. The power plant capacity, the peak power demands in
each, and the costs of sending 1 million kwh of electricity from plant to
city are as follows:
Example 2 (2/5)
Powerco Formulation
• Decision Variables
o Powerco must determine how much power is sent from each plant to
each city so 𝑥𝑖𝑗 = Amount of electricity produced at plant 𝑖 and sent to
city 𝑗
• 𝑥14 = Amount of electricity produced at plant 1 and sent to city 4
• Constraints
o A supply constraint ensures that the total quality produced does not
exceed plant capacity. Each plant is a supply point.
o A demand constraint ensures that a location receives its demand. Each
city is a demand point.
o Since a negative amount of electricity can not be shipped all 𝑥𝑖𝑗’s must be
non-negative
Example 2 (3/5)
Powerco Formulation
LP Formulation of Powerco’s Problem

Min 𝑧 = 8𝑥11 + 6𝑥12 + 10𝑥13 + 9𝑥14 + 9𝑥21 + 12𝑥22 + 13𝑥23 + 7𝑥24 + 14𝑥31 + 9𝑥32 + 16𝑥33 + 5𝑥34

Subject to:
𝑥11 + 𝑥12 + 𝑥13 + 𝑥14 ≤ 35 (Plant 1 supply constraint)
𝑥21 + 𝑥22 + 𝑥23 + 𝑥24 ≤ 50 (Plant 2 supply constraint)
𝑥31 + 𝑥32 + 𝑥33 + 𝑥34 ≤ 40 (Plant 3 supply constraint)
𝑥11 + 𝑥21 + 𝑥31 ≤ 45 (City 1 demand constraint)
𝑥12 + 𝑥22 + 𝑥32 ≤ 20 (City 2 demand constraint)
𝑥13 + 𝑥23 + 𝑥33 ≤ 30 (City 3 demand constraint)
𝑥14 + 𝑥24 + 𝑥34 ≤ 30 (City 4 demand constraint)
𝑥𝑖𝑗 ≥ 0 (𝑖 = 1,2,3; 𝑗 = 1,2,3,4)
Example 2 (4/5)
Powerco Formulation
• Tableau Representation of Powerco Problem
Example 2 (5/5)
Powerco Formulation
Exercise 1 (1/3)
The Childfair Company
The Childfair Company has three plants producing child push chairs
that are to be shipped to four distribution centers. Plants 1, 2, and 3
produce 12, 17, and 11 shipments per month, respectively.
Each distribution center needs to receive 10 shipments per month. The
distance from each plant to the respective distributing centers is given
below:
Exercise 1 (2/3)
The Childfair Company
The freight cost for each shipment is $100 plus 50 cents per mile. How
much should be shipped from each plant to each of the distribution
centers to minimize the total shipping cost?
Formulate this problem as a transportation problem by constructing the
appropriate parameter Table!
Exercise 1 (3/3)
The Childfair Company
Unit Cost ($)

Destination (Distribution Center)

1 2 3 4 Supply

1 500 750 300 450 12


Source 2 650 800 400 600 17

3 400 700 500 550 11


Demand 10 10 10 10
Balanced & Unbalanced Transportation
Problem
• If i=m j=n

s =d
i=1
i
j=1
j

then total supply equals to total demand, the problem is said to be a balanced
transportation problem.
• If total supply exceeds total demand, we can balance the problem by adding
dummy demand point. Since shipments to the dummy demand point are not
real, they are assigned a cost of zero.
• If a transportation problem has a total supply that is strictly less than total
demand the problem has no feasible solution.
o No doubt that in such a case one or more of the demand will be left unmet.
o Generally in such situations a penalty cost is often associated with unmet
demand and as one can guess the total penalty cost is desired to be
minimum.
Balancing a Transportation Problem
If Total Supply Exceeds Total Demand (1/2)
• If total supply exceeds total demand, we can balance a
transportation problem by creating a dummy demand point that has a
demand equal to the amount of excess supply.
• Because shipments to the dummy demand point are not real
shipments, they are assigned a cost of zero.
o Shipments to the dummy demand point indicate unused supply
capacity.
Balancing a Transportation Problem
If Total Supply Exceeds Total Demand (2/2)
• Suppose that in the Powerco
problem, the demand for city 1
were reduced to 40 million kwh.
• To balance the Powerco
problem, we would add a
dummy demand point (point 5)
with a demand of 125 − 120 = 5
million kwh
• From each plant, the cost of
shipping 1 million kwh to the
dummy is 0.
Balancing a Transportation Problem
If Total Supply Is Less Than Total Demand (1/6)
• If a transportation problem has a total supply that is strictly less than
total demand, then the problem has no feasible solution.
• When total supply is less than total demand, it is sometimes desirable
to allow the possibility of leaving some demand unmet. In such a
situation, a penalty is often associated with unmet demand.
• We can balance a transportation problem by creating a dummy
supply point that has a supply equal to the amount of excess demand.
• The cost of shipping from the dummy supply point is just the supply
shortage cost to the corresponding demand point.
Balancing a Transportation Problem
If Total Supply Is Less Than Total Demand (2/6)
Case Example:
• Two reservoirs are available to supply the water needs of three cities.
• Each reservoir can supply up to 50 million gallons of water per day.
Each city would like to receive 40 million gallons per day.
• For each million gallons per day of unmet demand, there is a penalty.
At city 1, the penalty is $20; at city 2, the penalty is $22; and at city 3,
the penalty is $23.
Balancing a Transportation Problem
If Total Supply Is Less Than Total Demand (3/6)
• The cost of transporting 1 million gallons of water from each reservoir
to each city is shown in following Table.

• Formulate a balanced transportation problem that can be used to


minimize the sum of shortage and transport costs
Balancing a Transportation Problem
If Total Supply Is Less Than Total Demand (5/6)
• In this problem, Daily supply is 50 + 50 = 100 million gallons per day and
the Daily demand is 40 + 40 + 40 = 120 million gallons per day
• To balance the problem, we add a dummy (or shortage) supply point
having a supply of 120 − 100 = 20 million gallons per day.
• The cost of shipping 1 million gallons from the dummy supply point to a
city is the penalty for each million gallons per day of unmet demand.
Balancing a Transportation Problem
If Total Supply Is Less Than Total Demand (6/6)
• The tableau representation of the problem is
Exercise 2 (1/3)
The Beer Problem
Tom would like 3 pints of home brew today and an additional at least 4
pints of home brew tomorrow. Dick is willing to sell a maximum of 5 pints
total at a price of $3.00 per pint today and $2.70 per pint tomorrow.
Harry is willing to sell a maximum of 4 pints total at a price of $2.90 per
pint today and $2.80 per pint tomorrow. Tom wishes to know what his
purchases should be to minimize his cost while satisfying his thirst
requirements.
a) Formulate a linear programming model for this problem!
b) Formulate this problem as a transportation problem by constructing
the appropriate parameter table!
Exercise 2 (2/3)
The Beer Problem
a) Let
𝑥𝐷1 be the number of pints purchased for today from Dick
𝑥𝐷2 be the number of pints purchased for tomorrow from Dick
𝑥𝐻1 be the number of pints purchased for today from Harry
𝑥𝐻2 be the number of pints purchased for tomorrow from Harry

The objective is to minimise the total purchase


min 𝑍 = 3𝑥𝐷1 + 2.7𝑥𝐷2 + 2.9𝑥𝐻1 + 2.8𝑥𝐻2
Subject to
𝑥𝐷1 + 𝑥𝐷2 ≤ 5
𝑥𝐻1 + 𝑥𝐻2 ≤ 4
𝑥𝐷1 + 𝑥𝐻1 = 3
𝑥𝐷2 + 𝑥𝐻2 ≥ 4
𝑥𝐷1 , 𝑥𝐷2 , 𝑥𝐻1 , 𝑥𝐻2 ≥ 0
Exercise 2 (3/3)
The Beer Problem
• The parameter table is

Unit Cost ($)

Today Tomorrow Dummy Supply

Dick 3 2.7 0 5
Source
Harry 2.9 2.8 0 4

Demand 3 4 2
Modelling for an Unused Source
• In some cases, there are source point that are unused or
intended not be used to meet a demand point.
• We can assign a very large cost of 𝑀 to ensure there are no
sources used for that demand point.
Exercise 3 (1/3)
The Versatech Corporation
The Versatech Corporation has decided to produce three new products.
Five branch plants now have excess product capacity.
The unit manufacturing cost of the first product would be $31, $29, $32,
$28, and $29 in Plants 1, 2, 3, 4, and 5, respectively.
The unit manufacturing cost of the second product would be $45, $41,
$46, $42, and $43 in Plants 1, 2, 3, 4, and 5, respectively.
The unit manufacturing cost of the third product would be $38, $35, and
$40 in Plants 1, 2, and 3, respectively, whereas Plants 4 and 5 do not
have the capability for producing this product.
Exercise 3 (2/3)
The Versatech Corporation
Sales forecasts indicate that 600, 1,000, and 800 units of products 1, 2,
and 3, respectively, should be produced per day. Plants 1, 2, 3, 4, and 5
have the capacity to produce 400, 600, 400, 600, and 1,000 units daily,
respectively, regardless of the product or combination of products
involved. Assume that any plant having the capability and capacity to
produce them can produce any combination of the products in any
quantity.
Formulate this problem as a transportation problem by constructing the
appropriate parameter table!
Exercise 3 (3/3)
The Versatech Corporation
Unit Cost ($)

Product

1 2 3 Dummy Supply

1 31 45 38 0 400

2 29 41 45 0 600
Source 32 46 40 0 400
3
(Plant)
4 28 42 𝑀 0 600

5 29 43 𝑀 0 1000

Demand 600 1000 800 600


Finding Basic Feasible Solutions for
Transportation Problems (1/2)
Because the transportation problem is just a special type of linear
programming problem, it can be solved by applying the simplex
method as described in previous chapter
However, unlike other Linear Programming problems, a balanced
transportation problem with 𝑚 supply points and 𝑛 demand points is
easier to solve, although it has 𝑚 + 𝑛 equality constraints.
• The reason for that is, if a set of decision variables (𝑥𝑖𝑗’s) satisfies all but
one constraint, the values for 𝑥𝑖𝑗’s will satisfy that remaining constraint
automatically.
Finding Basic Feasible Solutions for
Transportation Problems (2/2)
Like the Simplex method, the Transportation Simplex Method also
requires an initial basic feasible solution.
There are some method that can be used to construct an initial BFS:
o North-West Corner Method
o Minimum Cost Method
o Vogel’s Method
o Russell’s Method
North-West Corner Method (1/4)
To find the bfs by the Northwest Corner method:
• Begin in the upper left (northwest) corner of the transportation tableau
and set 𝑥11 as large as possible. Clearly, 𝑥11 can be no larger than the
smaller of 𝑠1 and 𝑑1 i.e
𝑥11 = min 𝑠1 , 𝑑1
• If 𝑥11 = 𝑠1 , then cross out row 1 and set 𝑑1 to 𝑑1 − 𝑠1 . If 𝑥11 = 𝑑1 , then cross
out column 1 and set 𝑠1 to 𝑠1 − 𝑑1 . If 𝑥11 = 𝑠1 = 𝑑1 , cross either column 1 or
row 1 but not both.
• Continue applying this procedure to the most northwest cell in the
tableau that does not lie in a crossed-out row or column.
• Assign the last cell a value equal to its row or column demand, and cross
out both cells row and column.
North-West Corner Method (2/4)
Consider the following transportation simplex tableau
North-West Corner Method (3/4)
Consider the following transportation simplex tableau

7 3 3

5 4 6 10 6

7 5
North-West Corner Method (4/4)
• The value of Z for this solution is
𝑧 = 5 2 + 7 2 + 3 1 + 5 8 + 4 4 + 6 6 = 97

• The Northwest Corner Method can provide a quick and easy way
of obtaining BFS. However, it may lead to a high initial cost since it
does not consider shipping costs when determining BFS.
• Another method of finding BFS, the Minimum Cost Method,
considers shipping costs in to determine a bfs that has a lower cost.
Minimum Cost Method (1/3)
• To begin the minimum-cost method, find the variable with the smallest
shipping cost (call it xij). Then assign xij its largest possible value, min{si,dj}.
• As in the northwest corner method, cross out row i or column j and reduce
the supply or demand of the non crossed-out row or column by the value
of xij.
• Then choose from the cells that do not lie in a crossed-out row or column
the cell with the minimum shipping cost and repeat the procedure.
Continue until there is only one cell that can be chosen. In this case, cross
out both the cell’s row and column.
• Remember that (with the exception of the last variable) if a variable
satisfies both a supply and demand constraint, only cross out a row or
column, not both.
Minimum Cost Method (2/3)
Consider the same transportation problem:
Using the Minimum Cost
Method, the initial BFS
5 may yield a lower initial
cost compared to
Northwest Corner
2 8 2 Method:
𝑧=5 2 +2 2 +8 1 +5 3
10 6 +4 4 + 6 6
5 4 6
= 89

10
5
Minimum Cost Method (3/3)
• Because the minimum-cost method chooses variables with small
shipping costs to be basic variables, you might think that this method
would always yield a bfs with a relatively low total shipping cost.
• The following problem shows how the minimum-cost method can be
fooled into choosing a relatively high-cost bfs.
Vogel’s Method
• Vogel’s method for finding a bfs usually avoids extremely high
shipping costs.
• To find the bfs by the Vogel’s method:
o Begin with computing each row and column a penalty. The penalty will be
equal to the difference between the two smallest shipping costs in the row or
column.
o Identify the row or column with the largest penalty.
o Find the first basic variable which has the smallest shipping cost in that row or
column.
o Assign the highest possible value to that variable, and cross-out the row or
column as in the previous methods.
o Compute new penalties and use the same procedure.
Vogel’s Method
• Example: Use Vogel’s Method to find bfs for the following
transportation problem:
Vogel’s Method
• Iteration 1

5 5
Vogel’s Method
• Iteration 2

5
Vogel’s Method
• Iteration 3

15
Vogel’s Method
Initial BFS

• Observe that Vogel’s method


avoids the costly shipments
associated with 𝑥22 and 𝑥23
• This is because the high shipping
costs resulted in large penalties
that caused Vogel’s method to
choose other variables to satisfy
the second and third demand
constraints.
Determining the Entering Variable (1/4)
After we have found the initial BFS, now we want to optimize the solution.
Recall from previous lectures that for a BFS in which the set of basic
variables is BV, the coefficient of the variable 𝑥𝑖𝑗 (call it 𝑐𝑖𝑗
ҧ ) in the
tableau’s row 0 is given by
ҧ = 𝑐𝐵𝑉 𝐵 −1 𝑎𝑖𝑗 − 𝑐𝑖𝑗
𝑐𝑖𝑗

where 𝑐𝐵𝑉 is the basic variables coefficient in the objective function, 𝐵 is


the constraint coefficient of the basic variable of the constraints, 𝑐𝑖𝑗 is the
objective function coefficient for 𝑥𝑖𝑗 and 𝑎𝑖𝑗 is the column for 𝑥𝑖𝑗 in the
original LP.
Determining the Entering Variable (2/4)
Also recall from previous lectures that 𝑐𝐵𝑉 𝐵 −1 contains the dual variables of the
original LP where
𝑐𝐵𝑉 𝐵 −1 = 𝑢1 𝑢2 … 𝑢𝑚 𝑣1 𝑣2 … 𝑣𝑛

Where 𝑢1 , 𝑢2 ,…, 𝑢𝑚 corresponds to the 𝑚 supply constraints and 𝑣1 , 𝑣2 ,…, 𝑣𝑛


corresponds to the 𝑛 demand constraints.
To determine 𝑐𝐵𝑉 𝐵 −1 , remember that for each basic variable 𝑥𝑖𝑗 must have 𝑐𝑖𝑗 ҧ =
0, and we then can solve for
𝑐𝐵𝑉 𝐵 −1 𝑎𝑖𝑗 − 𝑐𝑖𝑗 = 0
Because we are solving a minimization problem, the current BFS will be optimal
if all the 𝑐𝑖𝑗
ҧ are nonpositive; otherwise, the variable with the most positive
ҧ becomes the entering variable.
𝑐𝑖𝑗
Determining the Entering Variable (3/4)
For example, consider the Powerco problem. Suppose we omit constraint 1 without
affecting the model. Since the model has 3 supply constraint and 4 demand
constraint. Now, 𝑐𝐵𝑉 𝐵 −1 = 0 𝑢2 𝑢3 𝑣1 𝑣2 𝑣3 𝑣4
Implementing NWC method, we will find that the BFS is 𝐵𝑉 =
{𝑥11 , 𝑥21 , 𝑥22 , 𝑥23 , 𝑥33 , 𝑥34 }. We need to solve for 𝑐𝐵𝑉 𝐵 −1 for each of this BV.
For example for 𝑥21 ,
1
0
1
𝑐𝐵𝑉 𝐵 −1 𝑎21 − 𝑐21 = 0 𝑢2 𝑢3 𝑣1 𝑣2 𝑣3 𝑣4 − 9 = 𝑢2 + 𝑣1 − 9 = 0
0
0
0
and
𝑢2 + 𝑣1 = 9
Determining the Entering Variable (4/4)
Repeating the same procedure to the other BV we will obtain the
following equations:
𝑢1 + 𝑣1 = 8
𝑢2 + 𝑣1 = 9
𝑢2 + 𝑣2 = 12
𝑢2 + 𝑣3 = 13
𝑢3 + 𝑣3 = 16
𝑢3 + 𝑣4 = 5
Since we have omitted the first constraints, then 𝑢1 = 0 and then can
solve for all the other dual variables. We will find that 𝑐32
ҧ = 6 to be the
most positive, and hence 𝑥32 will be the entering variable.
With 𝑥32 being the entering variable, PowerCo’s cost will decrease by $6.
Pivoting Procedure (1/3)
To perform the pivoting procedure, we must find the loop involving the
entering variable and some of the basic variables.
A loop is an ordered sequence of at least four different cells which satisfy
the following:
1. Starts at an entering variable.
2. Each corner of the loop is a basic variable.
3. Each corner is connected by a horizontal or vertical line (no diagonal
line).
4. No three consecutive cells lie in the same row or column
5. Ends at the starting point.
Pivoting Procedure (2/3)
Consider the PowerCo tableau after
finding the initial BFS. We have found
that 𝑥32 is the entering variable.
To find the loop involving 𝑥32 ,
horizontally or vertically find the
nearest BV as the next stop. There are
𝑥22 and 𝑥33 . Suppose we choose 𝑥22 .
We then can go to 𝑥13 or 𝑥23 . However,
if we choose 𝑥13 we will violate the
loop requirement since eventually we
will have a NBV (𝑥31 ) as corner. So the
next corner should be 𝑥23 .
Then we can only choose 𝑥33 as the
next corner and finally back to 𝑥32 ,
closing the path.
Pivoting Procedure (3/3)
After identifying the loop, we then
enumerate the corners, starting
from 0.
Identify the odd numbered corners
and select the smallest 𝑥𝑖𝑗 to be the 1 2
pivot. In this case, the pivot is
Min 𝑥22 , 𝑥32 = Min 20,10 = 10.
0 3
We then subtract each of the odd
numbered 𝑥𝑖𝑗 with the pivot and
add the pivot the even numbered
𝑥𝑖𝑗 .
Pivoting Procedure (3/3)
We then subtract each of the odd
numbered 𝑥𝑖𝑗 with the pivot and
add the pivot the even numbered
𝑥𝑖𝑗 .
This is the new BFS. 20 − 10 = 10 20 + 10 = 30

0 + 10 = 10 10 − 10 = 0
The Transportation Simplex Method
From the preceding steps, we can summarize the transportation simplex
method:
Step 1 If the problem is unbalanced, balance it.
Step 2 Find the initial BFS.
Step 3 For minimization problem, if 𝑢𝑖 + 𝑣𝑗 − 𝑐𝑖𝑗 ≤ 0 for all non-basic
variables, then the current bfs is optimal. If this is not the case, then we
enter the variable with the most positive 𝑢𝑖 + 𝑣𝑗 − 𝑐𝑖𝑗 into the basis
using the pivoting procedure.
For maximization problem, if 𝑢𝑖 + 𝑣𝑗 − 𝑐𝑖𝑗 ≥ 0 for all non-basic
variables, then the current bfs is optimal. If this is not the case, then we
enter the variable with the most negative 𝑢𝑖 + 𝑣𝑗 − 𝑐𝑖𝑗 into the basis.
Step 4 Perform the pivoting procedure. This yields a new bfs.
Step 5 Using the new bfs, return to steps 3 and 4.
Assignment (1/2)
Use the Transportation Simplex Method to find the optimal solution for the
PowerCo problem.
Use North West Corner Method, Minimum Cost Method, and Vogel’s
method to find the BFS and perform the Transportation Simplex Method
for each separately.
Assignment (2/2)
Instruction:
• This is an individual assignment.
• Write your answer on A4 paper(s).
• You may use multiple sheets for 1 problem. Use different paper set for each problem.
• Pencils are not allowed.
• Late turn-ins are allowed. However you will be penalized 1 point for each late
minute.
• Submit your answer as a .pdf file. You may submit as an image file (.jpg, .jpeg, .png,
.gif, etc.) but make sure the quality of the picture so that your handwriting is clear.
• Unclear/blurry handwriting will be penalized 5 points.
• Submit each problem as different files.
• Solution to a problem with more than 1 page should be merged into 1 file.
• Use the following file naming format: LP-A7-[your NPM]-[your name]-[Initial BFS
Method].pdf
• Example: LP-A7-1706990174-Teuku Naraski Zahari-NWC

You might also like