0% found this document useful (0 votes)
11 views

ENGR 3157-Operations Research-Lecture 06-TransportationProblems1

Uploaded by

dashtonmoy349
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

ENGR 3157-Operations Research-Lecture 06-TransportationProblems1

Uploaded by

dashtonmoy349
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

Operations Research

ENGR 3157
Lecture 06 – Transportation Problems 1

Eugene Ben-Awuah, PhD, PEng


Bharti School of Engineering
Laurentian University

Office: F220
Tel: 705-675-1151 ext. 2195
Email: [email protected]

2
Transportation Problems

• A transportation problem seeks the best way to satisfy n


demand points with the capacities of m supply points.
– Minimize production and shipping costs to deliver a commodity (e.g.,
widgets) from m supply points (e.g., factories) to n demand points
(e.g., retail outlets).

• In more general terms, a transportation problem has the


following criteria:
– There is a set of m supply points from which a commodity is shipped.
Supply point i can supply at most si units.
– There is a set of n demand points to which the commodity is shipped.
Demand point j must receive at least dj units of the shipped good.
– Each unit produced at supply point i and shipped to demand point j
incurs a cost of cij.

1
3
Transportation Problems (2)

Supply Demand
Points Points

s1 = ? 1 1 d1 = ?

s2 = ? 2 2 d2 = ?
Each supply Each demand
point, i, can point, j, requires
provide si units of dj units of the
the commodity. commodity.

sm-1 = ? m-1 n-1 dn-1 = ?

sm = ? m n dn = ?

4
Transportation Problems (3)

• In general, a transportation problem is in following form:

Min:  
i 1m j 1n
cij  xij

Subject to: 
j 1n
xij  si , i  m


i 1m
xij  d j , j  n

xij  0, i  1 m, j  1 n

– Each supply constraint ensures that the total quantity produced


does not exceed plant capacity.
– Each demand constraint ensures that a demand is satisfied.
– Since a negative amount of commodity can’t be shipped all xij’s
(the amount of commodity shipped from supply point i to demand
point j) must be non-negative.

2
5
Balanced Transportation Problems

• A balanced transportation problem is one where total


supply is equal to total demand:


i 1m
si  
j 1n
dj

• If a transportation problem is balanced, then all


constraints (except non-negativity) are strict equalities.
– Why?
– Balanced transportation problems are much easier to solve than
unbalanced transportation problems.
– But what about obtaining an initial BFS?

6
Balancing Transportation Problems (2)

• An unbalanced transportation problem can be one of two


types:
– Demand exceeds supply.
– Supply exceeds demand.

• If demand exceeds supply, we can balance the problem by


adding a dummy supply point:

• If supply exceeds demand, we can balance the problem by


adding a dummy demand point:
ddummy  
i 1m
si  
j 1n
dj

– All shipment costs for the dummy demand/supply point are cij = 0.

3
7
Example – Transportation Problem

• Powerco has three power plants that supply the electricity


needs of four cities, with plant capacities (in million kwh
units), city demands, and transmission costs as follows:

City 1 City 2 City 3 City 4 Supply


Plant 1 8 6 10 9 35
Plant 2 9 12 13 7 50
Plant 3 14 9 16 5 40
Demand 45 20 30 30

• What is the lowest cost way of meeting each city’s demand


with the available supply?

8
Example – Transportation Problem (2)

• LP formulation of the problem:

minimize: z = 8x11 + 6x12 + 10x13 + 9x14 +


9x21 + 12x22 + 13x23 + 7x24 +
14x31 + 9x32 + 16x33 + 5x34

subject to: x11+x12+x13+x14  35 (supply point 1)


x21+x22+x23+x24  50 (supply point 2)
x31+x32+x33+x34  40 (supply point 3)

x11+x21+x31  45 (demand point 1)


x12+x22+x32  20 (demand point 2)
x13+x23+x33  30 (demand point 3)
x14+x24+x34  30 (demand point 4)

x11, x12 , x13, etc.  0 (non-negativity)

4
9
Example – Transportation Problem (3)

z x11 x12 x13 x14 x21 x22 x23 x24 x31 x32 x33 x34 RHS

1 -8 -6 -10 -9 -9 -12 -13 -7 -14 -9 -16 -5 = 0

0 1 1 1 1 0 0 0 0 0 0 0 0 = 35

0 0 0 0 0 1 1 1 1 0 0 0 0 = 50

0 0 0 0 0 0 0 0 0 1 1 1 1 = 40

0 1 0 0 0 1 0 0 0 1 0 0 0 = 45

0 0 1 0 0 0 1 0 0 0 1 0 0 = 20

0 0 0 1 0 0 0 1 0 0 0 1 0 = 30

0 0 0 0 1 0 0 0 1 0 0 0 1 = 30

10
Transportation Problem Tableaus

• The transportation problem tableau takes a different form


than the regular simplex method tableau:

The upper right corner of c1,1 c1,2 c1,n


s1
each cell in the tableau x1,1 x1,2 x1,n
gives the shipping cost for c2,1 c2,2 c2,n
the corresponding supply s2
x2,1 x2,2 x1,n
point and demand point.

The main body of each cell


sm-1
in the tableau gives the
current value of the variable cm,1 cm,2 cm,n
for the corresponding supply sm
xm,1 xm,2 xm,n
point and demand point.
d1 d2 dn-1 dn

5
11
Transportation Problem Tableaus (2)

• For example, the optimal tableau for the previous example


would look like this:

8 6 10 9
s1 = 35
10 25
9 12 13 7
s2 = 50
45 5
14 9 16 5
s3 = 40
10 30

d1=45 d2=20 d3=30 d4=30

• But how will an initial tableau (and starting BFS) look like?
• How do we do pivots?

12
Northwest Corner Method for Starting BFS

• One method of finding an initial basic feasible solution is


called the northwest corner method:
– Start with the far upper left cell and assign its xij value to be as large
as possible (i.e., the smaller of the supply for the row, si, or demand
for the column, dj).
– Cross out the row or column that is depleted, and subtract xij from the
si or dj that is not depleted. If both are depleted (i.e., si = dj ), only
cross out one of them.
– Repeat for the farthest upper left cell that is not in a crossed out row
or column.

6
13
Northwest Corner Method for Starting BFS (2)

Start here. Note that costs Set the xij of the upper left
are not needed for finding cell to the smaller of its si
an initial BFS. or dj values.

s1 = 5 s1 = 3
2

s2 = 1 s2 = 1

s3 = 3 s3 = 3

d1=2 d2=4 d3=2 d4=1 d1=X d2=4 d3=2 d4=1

14
Northwest Corner Method for Starting BFS (3)

Then move to the next And again…


most upper left cell.

s1 = X s1 = X
2 3 2 3

s2 = 1 s2 = X
1

s3 = 3 s3 = 3

d1=X d2=1 d3=2 d4=1 d1=X d2=0 d3=2 d4=1

7
15
Northwest Corner Method for Starting BFS (4)

s1 = X s1 = X
2 3 2 3

s2 = X s2 = X
1 1

s3 = 3 s3 = 1
0 0 2
d1=X d2=X d3=2 d4=1 d1=X d2=X d3=X d4=1

16
Northwest Corner Method for Starting BFS (5)

s1 = X Finally, you’ve crossed out


2 3 all rows and columns,
which tells you that each
s2 = X
1 supply is completely used
up and each demand is
s3 = X satisfied.
0 2 1
d1=X d2=X d3=X d4=X

8
17
Minimum Cost Method for Starting BFS

• Another method of finding an initial basic feasible solution is


called the minimum cost method:
– Start with the cell with the smallest cost and assign its xij value to be
as large as possible (i.e., the smaller of the supply for the row, si, or
demand for the column, dj).
– Cross out the row or column that is depleted, and subtract xij from the
si or dj that is not depleted. If both are depleted (i.e., si = dj ), only
cross out one of them.
– Repeat for the next lowest cost cell that is not in a crossed out row or
column.

18
Minimum Cost Method for Starting BFS (2)

Start here. Now costs are Set the xij of the lowest
needed for finding an cell to the larger of its si or
initial BFS. dj values.

2 3 5 6 2 3 5 6
s1 = 5 s1 = 5

2 1 3 5 2 1 3 5
s2 = 10 s2 = 2
8
3 8 4 6 3 8 4 6
s3 = 15 s3 = 15

d1=12 d2=8 d3=4 d4=6 d1=12 d2=X d3=4 d4=6

9
19
Minimum Cost Method for Starting BFS (3)

Then move to the next And again…


lowest cost cell.

2 3 5 6 2 3 5 6
s1 = 5 s1 = X
5
2 1 3 5 2 1 3 5
s2 = X s2 = X
2 8 2 8
3 8 4 6 3 8 4 6
s3 = 15 s3 = 15

d1=10 d2=X d3=4 d4=6 d1=5 d2=X d3=4 d4=6

20
Minimum Cost Method for Starting BFS (4)

2 3 5 6 2 3 5 6
s1 = X s1 = X
5 5
2 1 3 5 2 1 3 5
s2 = X s2 = X
2 8 2 8
3 8 4 6 2 8 4 6
s3 = 10 s3 = 6
5 5 4
d1=X d2=X d3=4 d4=6 d1=X d2=X d3=X d4=6

10
21
Minimum Cost Method for Starting BFS (5)

2 3 5 6
s1 = X
5 Finally, you’ve crossed out
2 1 3 5 all rows and columns,
s2 = X which tells you that each
2 8
supply is completely used
3 8 4 6 up and each demand is
s3 = X
5 4 6 satisfied.
d1=X d2=X d3=X d4=X

When using minimum cost method for initial basic feasible


solution for a maximization problem, number in each cell is revenue, not
a cost; look for maximum profit cells

22
Vogel’s Method for Starting BFS

• Another method of finding an initial basic feasible solution is


called Vogel’s method:
– Start by computing a “penalty” for each row and column,
corresponding to the difference between the two smallest costs.
– Select the row or column with the largest penalty, and the cell in that
row or column with the smallest cost and assign its xij value to be as
large as possible (i.e., the smaller of the supply for the row, si, or
demand for the column, dj).
– Cross out the row or column that is depleted, and subtract xij from the
si or dj that is not depleted. If both are depleted (i.e., si = dj ), only
cross out one of them.
– Recalculate penalties and repeat for cells that are not in crossed out
rows or columns.

11
23
Vogel’s Method for Starting BFS (2)

(2) Lowest 6 7 8 s2 = 5
(1) Start here, calculating
cost cell in 5 p=2
row and column penalties.
highest 15 80 78 s3 = 15
6 7 8 s2 = 10 penalty row or
p = 63
p=1
column:
d2=15 d3=X d4=5
15 80 78 s3 = 15 p=9 p=X p=70
p = 63
d2=15 d3=5 d4=5
(3) Lowest 6 7 8 s2 = 0
p=9 p=73 p=70
cost cell in 5 5 p = N/A
highest 15 80 78 s3 = 15
penalty row or
p = 63
column:
d2=15 d3=X d4=X
p=9 p=X p=X

24
Vogel’s Method for Starting BFS (3)

(4) Lowest 6 7 8 s2 = 0
cost cell in 5 5 p = N/A
highest 15 80 78 s3 = X
penalty row or 15 p=X
column:
d2=0 d3=X d4=X
p=N/A p=X p=X
Initial BFS Tableau

(5) Lowest 6 7 8
s2 = 10
cost cell in 0 5 5
highest 15 80 78
penalty row or s3 = 15
15
column:
d2=15 d3=5 d4=5

12
25
Transportation Simplex Method

• Using a transportation tableau, we can perform a version of


the simplex method.
– We start by finding an initial basic feasible solution.
– Then identify a non-basic variable that should enter the basis.
– Then determine which basic variable leaves the basis, and perform a
pivot.
– Repeat until we have an optimal tableau.

26
Transportation Simplex Method (2)

• First, let’s define what we mean by a “loop” in a tableau.


– A loop is an ordered sequence of at least four cells such that
• any two consecutive cells lie in either the same row or same column,
• no three consecutive cells lie in the same row or column, and
• the last cell in the sequence has a row or column in common with the
first cell in the sequence.

13
27
Transportation Simplex Method (3)

• We determine the entering variable by pricing out all of the


non-basic variables (i.e., analogous to calculating the new
cost coefficients for row 0) and choosing the most positive.
– For each non-basic variable, we can calculate each coefficient as c′ij
= ui + vj - cij, where ui and vj are equivalent to the shadow prices of
the supply and demand constraints of the simplex tableau.
– We also have a set of similar equations, one for each basic variable,
xij:
• c11 = u1 + v1
• c21 = u2 + v1
• c22 = u2 + v2
• etc.
– If we let u1 = 0, then we can solve all of those equations.
• But why can we let u1 = 0?

28
Transportation Simplex Method (4)

• What are the row 0 cost coefficients for the current tableau?

8 6 10 9
s1 = 35
35
9 12 13 7
s2 = 50
10 20 20
14 9 16 5
s3 = 40
10 30

d1=45 d2=20 d3=30 d4=30

14
29
Transportation Simplex Method (5)

• Once we know which non-basic variable enters the basis,


we perform a pivot:
– Find the loop that involves the entering variable and some of the
basic variables (it can be shown that there is only one such loop).
– Counting only cells in the loop, label them as either odd or even,
corresponding to the number of hops away from the entering
variable.
– Select the odd cell whose xij is the smallest. Subtract that value from
the xij of all odd cells and add it to the xij of all even cells.

30
Transportation Simplex Method (6)

• If x14 were the entering variable, what is the loop and what
are the new xij values?

8 6 10 9
s1 = 35
35
15 20
9 12 13 7
s2 = 50
10
30 20 20
14 9 16 5
s3 = 40
10
30 30
10

d1=45 d2=20 d3=30 d4=30

15
31
Transportation Simplex Method (7)

• The transportation simplex method continues in this fashion


(calculate reduced costs, identify the entering variable, pivot,
repeat) until we obtain an optimal tableau.
– The tableau is optimal when all c′ij ≤ 0 for cost minimization or c′ij  0
for revenue maximization

8 6 10 9
s1 = 35
35
25 10 25
9 12 13 7
s2 = 50
10
20
45 20
10 20
30
5
14 9 16 5
s3 = 40
10 10 30

d1=45 d2=20 d3=30 d4=30

32
In-Class Problem – Transportation Simplex Method

• Find the optimal solution to a maximization transportation


problem whose tableau is as follows:

75 60 69
s1 = 50

79 73 68
s2 = 100

85 76 70
s3 = 50

0 0 0
s4 = 70

d1=80 d2=90 d3=100

16
33
Announcements

• Mid term: Nov 3


– 5 or 6 questions: Lect 2: LP Graphical to Lect 5 Simplex Algorithm 2
– Review all in-class, assignments and tutorial problems
• Assignment 2 out
– Due date Oct 27
• Design Project Review Meetings
– Oct 27: GP1 to GP4 (10:00 AM to 11:20 PM @ C306)
– Nov 3: GP5 to GP8 (10:00 AM to 11:20 PM @ C306)
• Tutorial Session by TA: October 20 during class time

17

You might also like