Lec05 06 PDF

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 50

 Transportation Modeling

 Transportation Simplex Method


 Special Issues in Modeling
 Demand Not Equal to Supply
 Developing an Initial Solution
 The Northwest-Corner Rule
 The Vogel Method
 Assignment Problem
1
 An interactive procedure that finds
the least costly means of moving
products from a series of sources
to a series of destinations
 Can be used to help resolve
distribution
and location
decisions

2
 A special class of linear programming
 Find minimum-cost distribution of a
given commodity from a group of
supply centers (sources) to a group of
receiving centers (destinations)
 Need to know
1. The origin points and the capacity
or supply per period at each
2. The destination points and the
demand per period at each
3. The cost of shipping one unit from
each origin to each destination
3
Nodes??? Arcs???
4
Three plants (L.A.=1000, Detroit=1500, N.O.=1200)
supplied cars to Denver & Miami. Charge 8 cents
per mile per car.

5
To
From Albuquerque Boston Cleveland
Des Moines $5 $4 $3
Evansville $8 $4 $3
Fort Lauderdale $9 $7 $5

Boston
Cleveland (200 units
Des Moines (200 units required)
(100 units required)
capacity)
Albuquerque
(300 units Evansville
required) (300 units
capacity)
Fort Lauderdale
(300 units
capacity) 6
Cell representing a possible source-
to-destination shipping assignment
(Evansville to Cleveland)
Supply
To Factory
From Albuquerque Boston Cleveland capacity
Des
$5 $4 $3 Moines
Des Moines 100 capacity
constraint
$8 $4 $3
Evansville 300

$9 $7 $5
Fort Lauderdale 300

Warehouse
requirement 300 200 200 700
Demand
Cost of shipping 1 unit from Fort Cleveland Total demand
Lauderdale factory to Boston warehouse warehouse demand and total supply

7
 Demand not equal to supply
 Called an unbalanced problem
 Common situation in the real world
 Resolved by introducing dummy sources or
dummy destinations as necessary with cost
coefficients of zero Supply
To (A) (B) (C) Factory
Dummy capacity
From Albuquerque Boston Cleveland

$5 $4 $3 0
(D) Des Moines 250 250

$8 $4 $3 0
(E) Evansville 50 200 50 300

$9 $7 $5 0
(F) Fort Lauderdale 150 150 300

Warehouse
Demand
requirement 300 200 200 150 850
Three plants (L.A.=1000, Detroit=1300, N.O.=1200) supplied cars to
Denver & Miami.

1300

Supply < Demand


Add dummy source

9
1900

Supply > Demand


Add dummy
destination

10
 Since any transportation problem can be
formulated as an LP, simplex method
can be used to find an optimal solution
 Because of the special structure of a
transportation LP, the iterations of the
simplex method have a very special form
 The transportation simplex method is
nothing but the original simplex method,
but it streamlines the iterations given
this special form

11
1) Determine a starting basic feasible solution(BFS).
 Northwest-corner method (NW)
 Vogel approximation method (VAM)

2) Use the optimality condition of simplex


method to determine entering variable from
nonbasic variables.
 If optimality condition satisfies, stop.
 Otherwise, go to Step 3.

3) Use the feasibility of simplex method to


determine leaving variable from current basic
variables and find new basic solution. Return
to Step 2.
12
 Start in the upper left-hand cell (or
northwest corner) of the table and
allocate units to shipping routes as
follows:
1. Exhaust the supply (factory capacity) of
each row before moving down to the next
row
2. Exhaust the (warehouse) requirements of
each column before moving to the next
column
3. Check to ensure that all supplies and
demands are met

13
1. Assign 100 tubs from Des Moines to
Albuquerque (exhausting Des Moines’s supply)

2. Assign 200 tubs from Evansville to


Albuquerque (exhausting Albuquerque’s
demand)
3. Assign 100 tubs from Evansville to Boston
(exhausting Evansville’s supply)
4. Assign 100 tubs from Fort Lauderdale to
Boston (exhausting Boston’s demand)
5. Assign 200 tubs from Fort Lauderdale to
Cleveland (exhausting Cleveland’s demand
and Fort Lauderdale’s supply)

14
Supply
To (A) (B) (C) Factory
From Albuquerque Boston Cleveland capacity

$5 $4 $3
(D) Des Moines 100 100

$8 $4 $3
(E) Evansville 200 100 300

$9 $7 $5
(F) Fort Lauderdale 100 200 300

Warehouse
requirement 300 200 200 700

the firm is shipping 100 bathtubs


from Fort Lauderdale to Boston
15
Computed Shipping Cost
Route
From To Tubs Shipped Cost per Unit Total Cost
D A 100 $5 $ 500
E A 200 8 1,600
E B 100 4 400
F B 100 7 700
F C 200 5 $1,000
Total: $4,200

This is a feasible solution


but not necessarily the
lowest cost alternative
16
1) Calculate difference between the lowest two remaining costs for
each row and column  row and column penalties.
2) Select the row or column with the highest penalty and select the
minimum unit cost of that row or column.
 Allocate as much as possible of supply or demand values in
that cell.
 If there is a tie, select the cell where maximum allocation
could be made.
3) Adjust the supply and demand to eliminate the satisfied row or
column.
 If a row and column are satisfied simultaneously, only one of
them is eliminated and the other one is assigned a zero
value.
 Any row or column having zero supply or demand, can not
be used in calculating future penalties.
4) Repeat the process until all the supply sources and demand
destinations are satisfied. 17
Destination
Supply diff
Source N S E W
16 13 22 17
A 200 3

14 13 19 15
B 350 1

9 20 23 10
C 150 1

0 0 0 0
Dummy 90 0

Demand 100 140 300 250

diff 9 13 19 10

18
Destination
Supply diff
Source N S E W
16 13 22 17
A 200 3

14 13 19 15
B 350 1

9 20 23 10
C 150 1

0 0 0 0
Dummy 90 0
90

Demand 100 140 300 250

diff 9 13 19 10

19
Destination
Supply diff
Source N S E W
16 13 22 17
A 200 3

14 13 19 15
B 350 1

9 20 23 10
C 150 1

0 0 0 0
Dummy --- ---
90

Demand 100 140 210 250

diff 5 0 3 5

20
Destination
Supply diff
Source N S E W
16 13 22 17
A 200 3

14 13 19 15
B 350 1

9 20 23 10
C 100 150 1

0 0 0 0
Dummy --- ---
90

Demand 100 140 210 250

diff 5 0 3 5

21
Destination
Supply diff
Source N S E W
16 13 22 17
A 200 4

14 13 19 15
B 350 2

9 20 23 10
C 100 50 10

0 0 0 0
Dummy --- ---
90

Demand --- 140 210 250

diff --- 0 3 5

22
Destination
Supply diff
Source N S E W
16 13 22 17
A 200 4

14 13 19 15
B 350 2

9 20 23 10
C 100 50 10
50
0 0 0 0
Dummy --- ---
90

Demand --- 140 210 250

diff --- 0 3 5

23
Destination
Supply diff
Source N S E W
16 13 22 17
A 200 4

14 13 19 15
B 350 2

9 20 23 10
C 100 --- ---
50
0 0 0 0
Dummy --- ---
90

Demand --- 140 210 200

diff --- 0 3 2

24
Destination
Supply diff
Source N S E W
16 13 22 17
A 140 200 4

14 13 19 15
B 350 2

9 20 23 10
C 100 --- ---
50
0 0 0 0
Dummy --- ---
90

Demand --- 140 210 200

diff --- 0 3 2

25
Destination
Supply diff
Source N S E W
16 13 22 17
A 140 60 5

14 13 19 15
B 350 4

9 20 23 10
C 100 --- ---
50
0 0 0 0
Dummy --- ---
90

Demand --- --- 210 200

diff --- --- 3 2

26
Destination
Supply diff
Source N S E W
16 13 22 17
A 140 60 60 5

14 13 19 15
B 350 4

9 20 23 10
C 100 --- ---
50
0 0 0 0
Dummy --- ---
90

Demand --- --- 210 200

diff --- --- 3 2

27
Destination
Supply diff
Source N S E W
16 13 22 17
A 140 60 --- ---

14 13 19 15
B 350 4

9 20 23 10
C 100 --- ---
50
0 0 0 0
Dummy --- ---
90

Demand --- --- 210 140

diff --- ---

28
Destination
Supply diff
Source N S E W
16 13 22 17
A 140 60 --- ---

14 13 19 15
B 210 140 ---

9 20 23 10
C 100 --- ---
50
0 0 0 0
Dummy --- ---
90

Demand --- --- --- ---


Z = 10330
diff --- ---

29
 In simplex method, check the Z-row coefficients of
each nonbasic variable to check optimality
 have an optimal solution if all are  0 (maximization)
Thus, minimization problem: all nonbasic ≤ 0

 Efficient way to find these Z-row coefficients for a


given BFS to a transportation problem:
 Given the basic variables, calculate values of dual variables
 ui associated with each source
 vj associated with each destination

cij – ui – vj = 0 for xij basic, or ui + vj = cij


(let ui = 0 for 1st row)
 Z-row coefficients can be found from
c’ij= ui+vj - cij for xij nonbasic
30
Destination
Supply ui
Source N S E W
16 13 22 17
A 140 60 200

14 13 19 15
B 210 140 350

9 20 23 10
C 100 50 150

0 0 0 0
Dummy 90 90

Demand 100 140 300 250

vj

31
 Calculate ui, vj using cij – ui – vj = 0 for xij basic
(let ui = 0 for row i with the largest number of basic variables)

Destination
Supply ui
Source N S E W
16 13 22 17
A 140 60 200 0

14 13 19 15
B 210 140 350 -2

9 20 23 10
C 100 50 150 -7

0 0 0 0
Dummy 90 90 -21

Demand 100 140 300 250


vj 16 13 21 17
 Calculate c’ij= ui+vj - cij for xij nonbasic
Destination
Supply ui
Source N S E W
16 13 22 17
A 140 60 200 0
(0) (-1)
14 13 19 15
B 210 140 350 -2
(0) (-2)
9 20 23 10
C 100 50 150 -7
(-14) (-9)
0 0 0 0
Dummy 90 90 -21
(-5) (-8) (-4)
Demand 100 140 300 250
vj 16 13 21 17

All nonbasic variables ≤ 0


Sources Destinations

N Demand = 100
Supply = 200 A 140
60
S Demand = 140
Supply = 350 B 210
140 E Demand = 300
100 (shortage of 90)
Supply = 150 C
50 Demand = 250
W

Cost Z = 10330

34
 Find the entering nonbasic variable
 Select the variable with the largest positive c’ij

 Find the leaving basic variable


 Determine the chain reaction that would result
from increasing the value of the entering
variable from zero
 The leaving variable will be the first variable to
reach zero because of this chain reaction

35
Destination
Supply ui
Source N S E W
16 13 22 17
A 200 0
100 100 (-3) (-2)
14 13 19 15
B 40 350 0
(2) 300 10
9 20 23 10
C 150 150 -5
(2) (-12) (-9)
0 0 0 0
Dummy 90 -15
(1) (-2) (4) 90

Demand 100 140 300 250

vj 16 13 19 15

most positive nonbasic variable c’ij = 4  entering variable


Destination
Supply ui
Source N S E W
16 13 22 17
A 200 0
100 100
14 13 19 - 15
B + 350 0
40 300 10
9 20 23 10
C 150 150 -5

0 0 0 + 0 -
Dummy 90 -15
? 90

Demand 100 140 300 250

vj 16 13 19 15

Minimum value in subtraction of chain reaction,θ=90  leaving variable


Destination
Supply ui
Source N S E W
16 13 22 17
A 200
100 100
14 13 19 15
B 40 350
210 100
9 20 23 10
C 150 150

0 0 0 0
Dummy 90 90

Demand 100 140 300 250

vj
Destination
Supply ui
Source N S E W
16 13 22 17
A 200 0
100 100 (-3) (-2)
14 13 19 15
B 40 350 0
(2) 210 100
9 20 23 10
C 150 150 -5
(2) (-12) (-9)
0 0 0 0
Dummy 90 90 -19
(-3) (-6) (-4)
Demand 100 140 300 250

vj 16 13 19 15

most positive nonbasic variable c’ij = 2  entering variable


Destination
Supply ui
Source N S E W
16 - 13 + 22 17
A 200 0
100 100
14 + 13 - 19 15
B 350 0
? 40 210 100
9 20 23 10
C 150 150 -5

0 0 0 0
Dummy 90 90 -19

Demand 100 140 300 250

vj 16 13 19 15

Minimum value in subtraction of chain reaction,θ=40  leaving variable


Destination
Supply ui
Source N S E W
16 13 22 17
A 200
60 140
14 13 19 15
B 40 350
210 100
9 20 23 10
C 150 150

0 0 0 0
Dummy 90 90

Demand 100 140 300 250

vj
Destination
Supply ui
Source N S E W
16 13 22 17
A 200 2
60 140 (-1) (0)
14 13 19 15
B 40 350 0
(-2) 210 100
9 20 23 10
C 150 150 -5
(0) (-14) (-9)
0 0 0 0
Dummy 90 90 -19
(-5) (-8) (-4)
Demand 100 140 300 250

vj 14 11 19 15

All nonbasic variables ≤ 0 Z = 10330


 The problem of finding the minimum-costly
assignment of a set of tasks (i=1,…,m) to a set
of agents (j=1,…,n)
 Each task should be performed by one agent
 Each agent should perform one task
 A cost cij associated with each assignment

 We should have m=n (if not…?)

A special type of linear programming problem


 A special type of transportation problem,
with supply=demand=1

43
44
 Assignstudents to mentors
 Each assignment has a ‘mismatch’ index
 Minimize mismatches

Mentor
Supply
Student Snape McGonagall Lupin Chris

1 4 6 3
Harry 1

9 7 10 9
Draco 1

4 5 11 7
Goyle
1
8 7 8 5
Albert

Demand 1 1 1 1 45
 It is a linear programming problem  use
regular simplex method
 It is a transportation problem  could use
transportation simplex method
 However, it has a very special structure, such
that it can be solved in polynomial time
 Many such algorithms exist, but the best
known (and one of the oldest) is the
Hungarian Method

46
1. Subtract row minimums from each element in the row
2. Subtract column minimums from each element in the
column
3. Cover the zeroes with as few lines as possible
4. If the number of lines = number of rows/columns,
then optimal solution is hidden in zeroes
5. Otherwise, find the minimum cost that is not covered
by any lines
 Subtract it from all uncovered elements
 Add it to all elements at intersections (covered by
two lines)
6. Back to step 3

47
How to identify the optimal solution:
 Make the assignments one at a time in positions
that have zero elements.
 Beginwith rows or columns that have only one
zero. Cross out both the row and the column
involved after each assignment is made.
 Move on to the rows and columns that are not yet
crossed out to select the next assignment, with
preference given to any such row or column that
has only one zero that is not crossed out.
 Continueuntil every row and every column has
exactly one assignment and so has been crossed
out.
48
Mentor
Row Min
Student Snape McG Lupin Chris

Harry 1 4 6 3 1
Step 1
Draco 9 7 10 9 7
Goyle 4 5 11 7 4
Albert 8 7 8 5 5
Mentor
Student Snape McG Lupin Chris

Harry 0 3 5 2
Draco 2 0 3 2
Step 2
Goyle 0 1 7 3
Albert 3 2 3 0
Column Min: 0 0 3 0 49
Mentor Step 3: Cover the zeroes
Student Snape McG Lupin Chris with as few lines as
possible.
Harry 0 3 2 2
Draco 2 0 0 2 Step 4: number of lines ≠
4, not optimal
Goyle 0 1 4 3
Albert 3 2 0 0 Step 5: Find min cost

Mentor
Student Snape McG Lupin Chris

Harry 0 2 1 1
Step 3 Draco 3 0 0 2
Step 4: optimal Goyle 0 0 3 2
Albert 4 2 0 0
Cost = 1+10+5+5 = 21 = (1+7+4+5)+(0+0+3+0)+1 50

You might also like