0% found this document useful (0 votes)
18 views54 pages

Chapter 6

Uploaded by

abdodosskii
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views54 pages

Chapter 6

Uploaded by

abdodosskii
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 54

Chapter 6

Transportation Problem
Lecture Objectives
 At the end of the lecture, each student should be able to:
• Given a situation, identify when the transportation algorithm can be applied
• Understand the basics of the transportation algorithm
• Generate a basic feasible solution for the transportation problem
The Transportation Problem
 The transportation problem is a special case of an LP problem
 Because of its characteristics, the transportation problem can be solved very
efficiently with a special algorithm called the transportation algorithm
 The problem is concerned with specifying how to disposition a single product from
several sources to several destinations at minimum cost

m Sources n Destinations
C11: X11
a1 b1

a2 b2
Demand required
from by
Supply Capacity destination n
from source m
am bn
Cmn: Xmn
Number of units
Cost to send a unit to send from n to
from m to n m
Car-Distribution Problem (from
Taha)
The MG Auto Company has plants in LA, Detroit, and New Orleans. Its major distribution centers are
located in Denver and Miami. The capacities of the three plants during the next quarter are: 1000,
1500, and 1200 cars. The quarterly demands at the two distribution centers are 2300 and 1400 cars.
The cost of shipping in $’s per car is given by:

Denver Miami
Los Angeles 80 215
Detroit 100 108
New Orleans 102 68
Find the best strategy to send cars from the plants to the distribution centers.
Model of the Car Distribution
Problem
Example: The car distribution problem

Let Xij = units sent from location i (L,N,D) to destination j (V,M).

Then, the problem can be stated as:


Minimize z = 80XLV + 215XLM + 100XDV+ 108XDM+102XNV+68XNM
Subject to:
XLV + XLM = 1000
XDV+ XDM = 1500
XNV+ XNM = 1200
XLV + XDV + XNV = 2300
XLM + XDM +XNM = 1400
XLV , XLM , XDV , XDM , XNV , XNM0
The General Transportation
Problem

 In general, a transportation problem


m n can be expressed as:
min z   Cij X ij
i 1 j 1

Subject to: n

X
j 1
ij ai , i 1,2,  , m
m

X
i 1
ij b j , j 1,2,  , n

X ij 0
Transportation Tableau
 Usually, it is not necessary to explicitly build the LP model of the
transportation problem. Instead, we usually represent the
Deci transportation problem by usingMarkets
M1
a transportation
(Destinations) tableau
M2 M3 M4
sion S1 X11
C11
X12
C12
X13
C13
X14
C14
a1
Sources

Varia S2 X21
C21
X22
C22
X23
C23
X24
C24
a2

ble
S3 X31 X32 X33
Number
X 34 a3
C31
Cost C32 C33 C 34

Number b1 b2 b3
of b 4

for
of units availabl
sending
required e units
a unit
in to ship
from 3
destinati from
Transportation Tableau Example
 Markets (Destinations) Supply
Example: Car Distribution Matrix
Denver Miami
P L.A. X11 X12 1000
l 80 215
a Detroit X21 X22 1500
n 100 108
t New Orl. X31 X32 1200
102 68
Demand 2300 1400

Min z = 80 X11 + 215 X12 + 100 X21 + 108


X22 + 102 X31 + 68 X32
X11 + X12 = 1000
(LA)
Characteristics of the
Transportation Problem
 The transportation problem could be solved using the regular simplex
method. However, because of its special characteristics, a more efficient
procedure is used. The procedure is called the transportation (simplex)
method.
 Because of the uni-modularity property (special structure of the constraints),
transportation problems with supplies and demands given by integers will
have integer basic solutions.
 The transportation problem is solved in two phases:
1. Determination of an initial basic feasible solution
2. Finding an optimal solution through the sequential improvement of the initial
feasible solution
Finding an Initial Basic Solution
 There are many ways to find a feasible solution. We will examine
several below. The first is simple but ineffective, and we will then look
at more complex but effective (producing near optimal solutions)
methods.

 Northwest Corner Rule (NWC)


• We begin in the Northwest (upper-left) corner of the matrix and assign as
much as we can (considering supply and demand) and update remaining
supply and demand. We move either down or to the right (depending on
whether supply or demand has been depleted). We again assign as
much as possible and continue to the Southeast (lower-right).
Northwest Corner Rule (NWC)
 Step1. Allocate as much as possible to the selected cell, and
adjust the associated amounts of supply and demand by
subtracting the allocated amount.
 Step2. Cross out the row or column with zero supply or
demand. If both a row and a column net to zero
simultaneously, cross out one only, and leave a zero supply
(demand) in the uncrossed-out row (column).
 Step3. If exactly one row or column is left uncrossed out,
stop. Otherwise, move to the cell to the right if a column has
just been crossed out or below if a row has been crossed
out. Go step 1
Example of NW Corner
Markets (Destinations) Supply
Denver Miami
P L.A. X11 X12 1000
l 80 215
a Detroit X21 X22 1500
n 100 108
t New Orl. X31 X32 1200
102 68
Demand 2300 1400

Markets (Destinations) Supply


Denver Miami
P L.A. 1000 1000
l 80 215
a Detroit 1300 200 1500
n 100 108
t New Orl. 1200 1200
102 68
Demand 2300 1400 TC=313
,200
Example 2 of NWC
 Using the NW corner rule, make the initial assignment for the following
transportation problem Demand
Source A B C D
1 X11 X12 X13 X14 15
10 2 20 11
2 X21 X22 X23 X24 25
12 7 9 20
3 X31 X32 X33 X34 10
4 14 16 18
5 15 15 15

 the starting basic solution are:


X11=5, X12=10;
X22=5, X23=15, X24= 5
X34= 10
 the association cost is
z= 5* 10 + 10*2+ 5*7+15*9+ 5*20 + 10*18 = $520
The Least Cost Rule (LCR)
 Note that the NWC method did not look at the costs! Thus it may
produce a terrible solution. The Least Cost Rule examines the costs to
build an initial solution. The cell with the lowest cost is chosen, and we
assign as many units as possible to the cell (considering supply and
demand). We then reduce supplies and demands by the assignment
and mark out ineligible cells (those in rows or columns where the
supply or demand has been depleted). We repeat this process until all
supplies and demands are depleted.
Example LCR
Markets (Destinations) Supply
Denver Miami
P L.A. 1000 1000
l 80 215 0
a Detroit 1500
n 1300 100 200 108 200 0
t New Orl. 1200
1200
Leas 102 68 0
Demand 2300 1400
t
1300 200 0
Cost 0

Leas TC=313,200
t
Cost
Example 2 of LCR
 Using the LC Rule, make the initial assignment for the following
Transportation Problem Demand
Source A B C D
1 X11 X12 X13 X14 15
10 15 2 20 0 11 0
2 X21 X22 X23 X24 25
12 7 15 9 10 20 10 0
3 X31 X32 X33 X34 10
5 4 Le
14 16 5 18 5 0
Le 5 0 0 15
ast
15 0 15 10 0
Le Le
Le ast Co
ast ast
Le
ast Co st
Co Co
ast
Co st
st st
Co
st
Example 2 of LCR (cont.)

Demand
Source A B C D
1 X11 X12 X13 X14 15
10 15 2 20 0 11
2 X21 X22 X23 X24 25
12 7 15 9 10 20
3 X31 X32 X33 X34 10
5 4 14 16 5 18
5 15 15 15
 the starting basic solution are:
X12=15; X14=0;
X23=15; X24=10;
X31= 5 X23=5
 the association cost is
z= 15* 2 + 0*11+ 15*9+10*20+ 5*4 + 5*18 = $475
Vogel's Approximation Method
(VAM)
 This method recognizes that it may be wise to make a small sacrifice
for a bigger gain. It computes a penalty for each row and column if the
lowest cost cell is not selected. That is, it figures out what it would cost
to take the second best cost.
 The penalty is the cost difference between the lowest cost cell and next
lowest cost value in each row and column.
 We select the cell associated with the largest penalty to assign units to,
and proceed essentially like the LCR. We will have to recalculate
some of the penalties on each iteration.
Vogel's Approximation Method
(VAM)

 Step 1: Determine the difference between the lowest two cells in all
rows and columns, including dummies.
 Step 2: Identify the row or column with the largest difference. Ties may
be broken arbitrarily.
 Step 3: Allocate as much as possible to the lowest-cost cell in the row
or column with the highest difference. If two or more differences are
equal, allocate as much as possible to the lowest-cost cell in these
rows or columns.
 Step 4: Stop the process if all row and column requirements are met. If
not, go to the next step.
 Step 5: Recalculate the differences between the two lowest cells
remaining in all rows and columns. Any row and column with zero
supply or demand should not be used in calculating further differences.
Then go to Step 2.
When this assignment is
made, we deplete both the
VAM column and the row;
however, we eliminate just
Demand Penalty
Source A B Cone. In Dthis case,
Avail we
1 15 arbitrarily eliminate
15
0
10the row
High
10 0 20 11
2 0 0 15 10 25 2 5 est
12 7 9 20 10
3 5 5 14
Pena
0 14 16 18 0
lty
Demand 50 15 0 15 0 10 0
When this assignment is
10 7 7 7
2 made, we deplete 11 both the
9
column and the row; Highest
however, we eliminate just Penalty
one. In this case, we .
VAM Final Solution
Demand
Source A B C D Avail
1 15 15
10 0 20 11
2 0 0 15 10 25
12 7 9 20
3 5 5
0 14 16 18
Demand 5 15 15 10

TC = 335
Example 2 of VAM High
Demand Penalty est
High
Source A B C D Avail
Pena
est
1 15 0 15 8 9
High
10 2 20 11 0
lty
2 25 2 11 estPena
15 10
12 7 9 20 10
Penalty
3 5 10 5 10 2
5 4 14 16 18 0 lty
Demand 5 0
15 0 15 0 10 15
6 5 7 7

 the starting basic solution are:


X12=15; X14=0;
X23=15; X24=10;
X31= 5 X23=5
 the association cost is The solution
Dealing with Unbalanced
Problems
 If the problem is unbalanced (demand and supply
are not equal), the problem can be transformed into
a balanced one by creating dummy sources or
destinations with a cost of zero (usually). These
dummy nodes will absorb the difference between the
supply and demand.
Dealing with Unbalanced
Problems
 Example: We have three reservoirs with daily supplies of 15, 20, and 25 million liters of fresh
water, respectively. On each day we must supply four cities- A, B, C and D, whose demands
are 8, 10, 12, and 15, respectively. The cost of pumping per million liters is given below:
Cities
Reservoirs A B C D
1 2 3 4 5
2 3 2 5 2
 Set up the transportation
3 Tableau
to 4 determine
1 the cheapest2pumping schedule
3 if excess
water can be disposed of at no cost.

City Dum
Reservoir A B C D E (Dummy)
1 X11 X12 X13 X14 X15 15 my
2 3 4 5 0
2 X21
3
X22
2
X23
5
X24
2
X25
0
20 Destin
3 X31
4
X32
1
X33
2
X34
3
X35
0
25
ation
Demand 8 10 12 15 15
Added
Tutorial
Iterative computation of the
transportation algorithms
 After determining the starting solution; use the following algorithms to
determine the optimum solution

Step1 : use the simplex optimality condition to determine the Entering Variables
as the current nonbsic variable that can improve the solution. If the optimality
condition is satisfied, stop. Otherwise, go to step 2

Step 2: determine the Leaving variables using the simplex feasibility condition.
Change the basis, and return to step 1.

 The optimality and feasibility do not involve the row operational that
used in simplex method. Instead, the special structure of transportation
allow simpler computation
Iterative computation of the
transportation algorithms

 The determination of the Entering variable is done by computing the nonbasic


coefficient in z-row , using Method of multipliers

 In the method of multiplier, associate the multipliers ui and vj with row i and
column j of the transportation tubule.

 These multipliers satisfy the following equations:


ui + vj = Cij, for each basic Xij

 To solve these equation, the method of multipliers call for arbitrarily setting
any ui=0, and then solving for the remaining variables
Example
 By using the NW corner rule, the starting basic solution are:
Demand
Source A B C D
1 X11 5 X12 10 X13 X14 15
10 2 20 11
2 X21 X22 5 X23 15 X24 5 25
12 7 9 20
3 X31 X32 X33 X34 10 10
4 14 16 18
5 15 15 15
Example
Demand
Source A B C D
1 X11 5 X12 10 X13 X14 15
10 2 20 11
2 X21 X22 5 X23 15 X24 5 25
12 7 9 20
3 X31 X32 X33 X34 10 10
4 14 16 18
5 15 15 15

Basic variable (u,v) Equation Solution


X11 U1 + V1= 10 Set U1=0  V1=10
X12 U1 + V2 = 2 U1=0  V2=2
X22 U2 + V2 = 7 V2= 2  U2= 5
X23 U2 + V3 = 9 U2= 5  V3= 4
X24 U2 + V4 = 20 U2= 5  V4= 15
X34 U3 + V4 = 18 V4= 15  U3= 3

We got: U1=0, U2= 5,


Example
 Use ui, vi to evaluate the nonbasic variable by computing:

Source
Ui+
A
vj – cij,B for each nonbasic
Demand
C
xij
D
1 X11 5 X12 10 X13 X14 15
10 2 20 11
2 X21 X22 5 X23 15 X24 5 25
12 7 9 20
3 X31 X32 X33 X34 10 10
4 14 16 18
5 15 15 15

Nonbasic variable Ui+Vj- cij


X13 U1+V3-C13= 0+4 -20= -16
X14 U1+V4-C14= 0+15-11= 4
X21 U2+V1-C21=5+10-12=3
X31 U3+V1-C31=3+10-4=9
X32 U3+V2-C32=3+2-14=-9
X33 U3+V3-C33=3+4-16=-9
Example
 ui+vi-cij=0 for each basic xij is important to computing the z-row of the simplex
tubule,X11as the
Basic X12
following:
X13 X14 X21 X22 X23 X24 X31 X32 X33 X34

Z 0 0 -16 4 3 0 0 0 9 -9 -9 0

 The transportation seek to minimize so, EV is the largest positive value


coefficient in z-row thus X31 is EV
Basic X11 X12 X13 X14 X21 X22 X23 X24 X31 X32 X33 X34

Z 0 0 -16 4 3 0 0 0 9 -9 -9 0
Example
 Construct closed loop that start and end at EV;
 The loop consist of connected horizontal and vertical segments only.
 Except EV, each corner must coincide with basic variable.
 It must alternate between subtracting and adding (an addition to one cell in the
loop is followed by a subtraction from the next cell in the loop)
Demand
Source A B C D
1 X11 - 5 X12 10 X13 X14 15
10 + 2 20 11
2 X21 X22 5 X23 15 X24 5 25
12 - 7 9 + 20
3 X31 + X32 X33 X34 10 10
4 14 16 - 18
5 15 15 15

each unit shipped here will save $9


Example
 To determine the LV it should Determine Which Current Basic Variable Reaches 0
First.
 If we add one unit to X31, it must subtract a unit from X34 (leaving 9); add it back to X24 (giving
6), and subtract it from X22 (leaving 4); add it back to X12 (giving 11), and subtract it from X11
(leaving 4); this saves (1)($9).
 If we add five unit to X31, it must subtract a 5 unit from X34 (leaving 5); add it back to X24
(giving 10), and subtract it from X22 (leaving 0); add it back to X12 (giving 15), and subtract it
from X11 (leaving 0); this saves (5)($9)= $45.
Demand
Source A B C D
1 X11 - 5 X12 + 10 X13 X14 15
10 2 20 11
2 X21 X22 5 X23 15 X24 5 25
12 - 7 9 + 20
3 X31 X32 X33 X34 10 10
+ 4 14 16 18
5 15 15
-15

Both X11, X22 reach zero, arbitrary choose X11 to lea


Example
 The next transportation tableau is
Demand
Source A B C D
1 X11 X12 15 X13 X14 15
10 2 20 11
2 X21 X22 0 X23 15 X24 10 25
12 7 9 20
3 X31 5 X32 X33 X34 5 10
4 14 16 18
5 15 15 15

Basic variable (u,v) Equation Solution


X12 U1 + V2 = 2 Set U1=0  V2=2
X22 U2 + V2 = 7 V2= 2  U2= 5
X23 U2 + V3 = 9 U2= 5  V3= 4
X24 U2 + V4 = 20 U2= 5  V4= 15
X34 U3 + V4 = 18 V4= 15  U3= 3
X31 U3 + V1= 4 U3= 3  V1= 1
Example
 Use ui, vi to evaluate the nonbasic variable by computing:
Source
Ui+ vj – cij,B for
A
each nonbasic
Demand
C
xij
D
1 X11 X12 15 X13 X14 15
10 2 20 11
2 X21 X22 0 X23 15 X24 10 25
12 7 9 20
3 X31 5 X32 X33 X34 5 10
4 14 16 18
5 15 15 15

Nonbasic variable Ui+Vj- cij


X11 U1+V1-C11=0+1-10= -9
X13 U1+V3-C13= 0+4 -20= -16
X14 U1+V4-C14= 0+15-11= 4
X21 U2+V1-C21=5+1-12= -6
X32 U3+V2-C32=3+2-14= -9
X33 U3+V3-C33=3+4-16= -9
Example
 EVX11is
Basic X12 X13 X14 X21 X22 X23 X24 X31 X32 X33 X34

Z -9 0 -16 4 -6 0 0 0 0 -9 -9 0

 closed loop
Demand
Source A B C D  If we add 10 unit to X14, it
1 X11 X12 15 X13 X14 15 must subtract a 10 unit from
10 - 2 20
+ 11
2 X21 X22 0 X23 15 X24 - 10 25 X24 (leaving 0); add it back
12 + 7 9 20 to X22 (giving 10), and
3 X31 5 X32 X33 X34 5 10
4 14 16 18 subtract it from X12
5 15 15 15 (leaving 5; this saves (10)
($4)= $45.

X24 reach zero, so it leaves the solution


The new cost is 475- 40= $435
Example
 The next transportation tableau is
Demand
Source A B C D
1 X11 X12 5 X13 X14 10 15
10 2 20 11
2 X21 X22 10 X23 15 X24 25
12 7 9 20
3 X31 5 X32 X33 X34 5 10
4 14 16 18
5 15 15 15

Basic variable (u,v) Equation Solution


X12 U1 + V2 = 2 Set U1=0  V2=2
X14 U1 + V4 = 11 U1= 0  V4 = 11
X22 U2 + V2 = 7 V2= 2  U2= 5
X23 U2 + V3 = 9 U2= 5  V3= 4
X34 U3 + V4= 18 V4= 11 U3= 7
X31 U3 + V1= 4 U3= 7  V1= -3
Example
 Use ui, vi to evaluate the nonbasic variable by computing:
Source A
Ui+ B
vj – cij, for Ceach nonbasic
Demand
D
xij
1 X11 X12 5 X13 X14 10 15
10 2 20 11
2 X21 X22 10 X23 15 X24 25
12 7 9 20
3 X31 5 X32 X33 X34 5 10
4 14 16 18
5 15 15 15

Nonbasic variable Ui+Vj- cij


X11 U1+V1-C11=0-3-10= -13
X13 U1+V3-C13= 0+4 -20= -16
X21 U2+V1-C21=5-3-12= -10
X32 U3+V2-C32=7+2-14= -5
X33 U3+V3-C33=7+4-16= -5
X24 U2+V4-C24=5+11-20=-4
Example
Basic X11 X12 X13 X14 X21 X22 X23 X24 X31 X32 X33 X34

Z -13 0 -16 0 -10 0 0 -4 0 -5 -5 0

 Since no positive , the optimal solution is


From Silo To mill Number truckload
1 2 5
1 4 10
2 2 10
2 3 15
3 1 5
3 4 5

 Optimal cost is $435


Assignment Problem
• An assignment problem seeks to minimize the total cost assignment
of m workers to m jobs, given that the cost of worker i performing job
j is cij.
• It assumes all workers are assigned and each job is performed.
• An assignment problem is a special case of a transportation problem
in which all supplies and all demands are equal to 1; hence
assignment problems may be solved as linear programs.
• The network representation of an assignment problem with three
workers and three jobs is shown on the next slide.
Assignment Problem
• Linear Programming Formulation

Min cijxij
ij
s.t. xij = 1 for each worker i
j
xij = 1 for each job j
i
xij = 0 or 1 for all i and j.
– Note: A modification to the right-hand side of the first constraint set can be made if a
worker is permitted to work more than 1 job.
Hungarian Method
• The Hungarian method solves minimization assignment
problems with m workers and m jobs.
• Special considerations can include:
– number of workers does not equal the number of jobs -- add dummy
workers or jobs with 0 assignment costs as needed
– worker i cannot do job j -- assign cij = +M
– maximization objective -- create an opportunity loss matrix
subtracting all profits for each job from the maximum profit for that job
before beginning the Hungarian method
• Step 1: For each row, subtract the minimum number in that row from all
numbers in that row.
• Step 2: For each column, subtract the minimum number in that column
from all numbers in that column.
• Step 3: Draw the minimum number of lines to cover all zeroes. If this
number = m, STOP -- an assignment can be made.
• Step 4: Determine the minimum uncovered number (call it d).
– Subtract d from uncovered numbers.
– Add d to numbers covered by two lines.
– Numbers covered by one line remain the same.
– Then, GO TO STEP 3.
• Finding the Minimum Number of Lines and Determining the
Optimal Solution
– Step 1: Find a row or column with only one unlined zero and circle it.
(If all rows/columns have two or more unlined zeroes choose an
arbitrary zero.)
– Step 2: If the circle is in a row with one zero, draw a line through its
column. If the circle is in a column with one zero, draw a line through
its row. One approach, when all rows and columns have two or more
zeroes, is to draw a line through one with the most zeroes, breaking
ties arbitrarily.
– Step 3: Repeat step 2 until all circles are lined. If this minimum
number of lines equals m, the circles provide the optimal assignment.
Example: Hungry Owner
A contractor pays his subcontractors a fixed fee plus mileage for work
performed. On a given day the contractor is faced with three electrical jobs
associated with various projects. Given below are the distances between the
subcontractors and the projects.
Projects
A B C
Westside 50 36 16
Subcontractors Federated 28 30 18
Goliath 35 32 20
Universal 25 25 14
How should the contractors be assigned to minimize total costs?
• Initial Tableau Setup
Since the Hungarian algorithm requires that
there be the same number of rows as columns, add
a Dummy column so that the first tableau is:
A B C Dummy
Westside 50 36 16
0
Federated 28 30 18 0
• Step 1: Subtract minimum number in each row from all numbers in that
row. Since each row has a zero, we would simply generate the same
matrix above.
• Step 2: Subtract the minimum number in each column from all numbers in
the column. For A it is 25, for B it is 25, for C it is 14, for Dummy it is 0.
This yields:
A B C Dummy
Westside 25 11 2 0
Federated 3 5 4 0
Goliath 10 7 6 0
Universal 0 0 0 0

You might also like