0% found this document useful (0 votes)
12 views21 pages

510 Slides 9

510slides9

Uploaded by

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

510 Slides 9

510slides9

Uploaded by

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

9.

The Balanced Transportation Problem


Katta G. Murty Lecture slides

Input Data :
SOURCES: m sources with supplies available of a1, . . . , am.
SINKS: n sinks with demands of b1, . . . , bn.
COST MATRIX: (cij ) matrix of unit shipping cost coefficients.
FORBIDDEN CELLS: Each source may be allowed to ship only
to a subset of sinks; i.e., it is forbidden to ship to sinks outside
this subset. Variables associated with forbidden cells are required
to be 0. Make cost coeff. cij of forbidden cells (i, j) to be +∞ or
a very large positive number, to force variable to be 0.

Balance Condition: Total supply available = Total demand;


m n
i.e., i=1 ai = j=1 bj .

Decision Variables: xij = amount shipped from source i to


sink j, i = 1 to m, j = 1 to n.

178
Problem:


min z(x) = cij xij
n

subject to xij = ai, i = 1 to m
j=1
m

xij = bj , j = 1 to n
i=1
xij ≥ 0 for all i, j.

Redundancy in constraints: There is a redundant con-


straint, and any constraint in system can be treated as redundant
one and eliminated.
We will treat constraint corresponding to j = n as redundant
and eliminate it. Effect is to set associated dual variable vn = 0
in dual problem.

Dual Problem:

 
max w(u, v) = a i ui + b j vj

subject to ui + vj ≤ cij for all i, j

vn = 0
179
Relative cost coeff. of xij is dual slack c̄ij = cij − ui − vj .
Various complementary pairs are (xij , c̄ij ).
An Application at a Bus Rental Company
The transportation model finds many many applications, and often in contexts that
do not involve shipping of any commodities. We will discuss one such application at a
bus rental company in Seoul, South Korea, which involves allocation of buses to trips
[Kim and Murty, “A chartered Bus Allocation Problem”, you can see on my webpage].
This company rents buses with drivers to customers who request them. Seoul is a
big city and a popular destination for many tourists from all over the world. Requests
for the company’s buses come from visiting student groups, business teams, wedding
groups, etc. If there are tour requests of smaller durations, the same bus may be able
to handle them one after the other. In this way, the company tries to combine requests
of smaller durations into a bus trip for the whole day.
So, each bus trip involves the driver reporting with the bus to the first group for
the day at a specified location (origin of this trip) in the city, at a specified time in the
morning (trip start time), and driving the group along the route laid out for their tour
(the route may involve some stops of varying durations along the way, the driver waits
in the bus during such stops). After finishing this group’s tour, the driver may handle
the next group’s tour on schedule for the day in the same way. And so on. The bus trip
for the day ends with the last group on its shedule, at the specified end location and
specified time in the evening.
The company stations buses at two depots in the city, call them Depot 1, Depot 2
(D1 , D2 ). A driver allotted to a bus trip starts the bus at the depot and picks up the
first group on the trip schedule in the morning. In the evening after the trip is over, the
driver takes the bus from the ending location of the trip back to its depot.
The customers pay for all the driving in their tours; but the company has to pay for
the drive of the bus from the depot to the starting location of the trip in the morning,

180
and from the ending location of the trip back to the depot in the evening. That’s why
these drives are called empty load drives. It has been estimated that the time spent
in empty load driving costs the company at the rate of $40/hour (it includes driver’s
wages, fuel, maintenance, lost opportunity for the bus to make profit during that time,
etc.). This is the only cost we consider in allocating buses to trips, this cost is to be
minimized.
If the company finds that the number of trips on a day is more than the number
of buses that they have, they can borrow additional buses on a daily basis from other
vendors. For these borrowed buses, the company has to pay an agreed upon daily rate
that is much higher than the cost of empty load drives if they use their own bus. That’s
why the company uses their own buses as far as possible.
The number of trips handled daily varies between 30 to 50. But in this illustrative
example, we will consider only 8 trips.
The sources for the buses for these trips are D1 , D2 (Depots 1, 2), and OV (Outside
vendors). Each trip needs a bus, so each of them is a sink with a demand for one bus.
The total demand on this day is for 8 buses. The company has two buses stationed at
D1 , and 4 at D2 . So, they need to borrow 8 − 2 − 4 = 2 buses from OV on this day.
All the data is shown in the following table. In it, j is a trip, and when i is a depot,
cij = cost in $ of empty load drives from i to the starting location and back to the depot
from the ending location of trip j; based on estimated average driving speed. When i is
an OV, cij = cost in $ of borrowing a bus from i to handle trip j.

Source cij for trip j = Availability


i 1 2 3 4 5 6 7 8 ai
1 = D1 44 20 60 30 25 50 40 30 2
2 = D2 45 60 80 15 35 28 43 15 4
3 = OV 300 400 250 350 450 275 250 350 2
Demand 1 1 1 1 1 1 1 1
bj

Let xij denote the number of buses allocated from souce i to trip j. This bus

181
allocation problem is clearly the balanced transportation problem with the data given
in the above table, with the restriction that xij can take only integer values. However, the
integer property of the transportation problem discussed in Chapter 3 guarantees that
this integer restriction can be ignored because the remaining LP has integer optimum
solutions that can be found by LP algorithms.
The optimum solution (xij ) for this problem computed using the algorithm discussed
in later sections is given in the following table (blank entries are zero, i.e.; only if the
value of an xij is nonzero, that value is entered in cell (i, j)).

Source xij for trip j =


i 1 2 3 4 5 6 7 8
D1 1 1
D2 1 1 1 1
OV 1 1

So, in the optimum solution the two buses at D1 are allocated to trips 2, 5; the four
buses from D2 are allocated to trips 1, 4, 6, and 8; and buses borrowed from OVs are
allocated to trips 3, 7; resulting in a minimum cost of $648 for these trips.

Every day the company solves the same model with the data for the trips to be

handled on that day to determine the bus allocations for these trips.

182
Properties:

Basic vectors: Every basic vector has (m + n − 1) basic


variables.

Lower Triangular, Upper Triangular, Triangular Ma-


trices

A triangular matrix has properties:

1. It has a row with a single nonzero entry.

2. Submatrix obtained by striking off the row and col. of a


unique nonzero entry in a row again has property 1.
   



1 1 0 0 0 0





1 1 0 0 0 1


   
   
   

 0 0 1 1 1 0 


 0 0 1 1 0 0 

   
   
   
   


0 0 0 0 0 1 



0 0 0 0 1 1 

A= 


 , B= 



   

 0 0 1 0 0 1 


 1 0 0 0 1 0 

   
   
   
   


1 0 0 0 0 0 



0 0 1 0 0 0 

   
   
   
0 0 0 1 0 0 0 1 0 1 0 0
A square matrix A is triangular iff it is nonsingular & both
Ax = b, & πA = c, can be solved by backsubstitution.
183
Theorem: Every basis for the balanced transportation prob-
lem is triangular.

Theorem: The determinant of every basis for the balanced


transportation problem is ±1. As a consequence, every basic
solution is integral if the RHS constants vector is integral.

In following, the cost coeffs. in basic cells in a basic vector are


marked with a box. Find primal & dual basic sols. by backsub-
stitution.

C1 C2 C3 C4 C5 C6
R1 7 10 213
R2 25 15 312
R3 33 9 111
R4 11 4 8 110
163 22 100 318 79 64

How to Determine if a subset of m + n − 1 cells is a


basic set?

1. There must exist a line in the array (row or col) with a single
184
cell from subset.

2. The remaining array after a line with a single cell from subset
is crossed out must againg satisfy Property 1.

Special Routine to find Initial BFS:


General Step: Suppose some basic cells have already been
selected, and some rows and some columns of the array are struck-
off from further consideration. Let ai, bj denote modified row and
column totals.
If remaining portion of array consists of a single row only [single
column only], select each remaining cell in it as a basic cell, make
value of basic variable corresponding to it = modified column
[row] total at this stage, terminate.
If remaining portion of array has ≥ 2 rows and ≥ 2 cols., select
one of remaining cells, (r, s) say, as next basic cell.
BASIC CELL SELECTION RULES: 1: GREEDY CHOICE
RULE: Select (r, s), the one with smallest cost coeff. among ones
open (i.e., not struck off) at this stage.
2. VOGEL’s CHOICE RULE: In each row and col. not yet
185
struck off, define Cost Difference (CD)

CD = 2nd smallest cost coeff. − smallest cost coeff. among


open cells.

Find row or col. with largest CD. Select (r, s), the open cell in
it with smallest cost coeff.

NOTE: Forbidden cells may be selected as basic cells. OK.


Process of cost minimization will force them out of basic vector
later, if a feasible solution exists.

Fix value of basic variable xrs = β = min{ar , bs} ≥ 0 in the


BFS.
If β = ar , strike off row r from further consideration, replace
bs by bs − β (even if it is 0), and go to next step.
If β < ar , i.e., β = bs, replace ar by ar − β, strike off col. s
from further consideration, and go to next step.

186
Examples:
cij ai
j=1 2 3
i=1 11 8 2 800
2 7 5 4 300
bj 400 500 200

cij ai
j=1 2 3
i=1 1 2 3 15
2 4 4 10 19
3 6 5 15 11
bj 7 8 30

187
How to check Optimality of a BES:

1. Compute associated dual basic solution.

Dual constraint associated with primal variable xij is ui +vj ≤


cij .

Dual solution associated with a basic vector is obtained by


solving the system of dual constraints associated with basic
variables as a system of linear equations. So, here we need to
solve:

ui + vj = cij for all basic cells (i, j)


vn = 0

System of m + n equations in m + n unknowns, can be solved


by backsubstitution beginning with vn = 0.

Example: Basic vector (x11, x12, x13, x22) for first example
above.

2. Compute relative cost coeffs. of nonbasic variables.

Relative cost coeff. of nonbasic variable xpq is the dual slack


associated with xpq , c̄pq = cpq − up − vq .
188
3. Check Optimality.

Optimality Criterion: c̄ij ≥ 0 for all nonbasic (i, j).

3.1. If optimality criterion satisfied, present solutions optimal.


Primal BFS gives amounts to be shipped to various sinks
from each source.

In optimum solution, if some forbidden basic variable has


positive value, then original problem has no feasible solu-
tion, i.e., no solution without shipment among forbidden
cells.

3.2. If optimality criterion violated, cells in E = {(i, j) : c̄ij <


0} are eligible to enter basic set. Select one of them as
Entering cell.

4. Find θ-loop of entering cell.

(i) A θ-loop is a subset of cells in the array marked with +θ


or −θ adjustments, beginning with a +θ adjustment in
the entering cell.

189
(ii) All cells in θ-loop other than the entering cell are basic
cells.

(iii) If any row or column of array contains some cells of θ-loop,


then it contains exactly 2 cells, one with a +θ adjustment,
and another with a −θ adjustment.

(iv) No proper subset of a θ-loop satisfies (iii).

Cells with +θ adjustment are called Recipient cells; those


with −θ adjustment are called Donor cells.

Example: In a 4 × 5 array, can {(1, 2), (1, 3), (2, 2), (2, 3),
(3, 4), (3, 5), (4, 4), (4, 5)} form a θ-loop?

190
Array 6.7
1 2 3 4 5 ui
1 7 −6
1 18 − θ 20 + θ
6 3 4 5 5 11
7 6 11
2 27 − θ 35 + θ
10 15 15 14 16 16
−1 10 −5
3 0+θ 27 − θ
8 5 7 11 9 14
−6 −13 −2
4 θ 25 65 − θ
13 4 16 12 25 25
vj −6 −8 −7 −13 0

A trial and error method for finding the θ-loop starts by


putting a +θ adjustment in entering cell. Now make a −θ
adjustment among one of the basic cells in the row of enter-
ing cell. Continue making alternately +θ and −θ adjustments
among basic cells until loop is complete. At any time, if stuck,
backtrack and change position of previous entries and try.

5. Find dropping basic variable and new BFS.

To find new solution, fix all nonbasics other than entering


variable at 0, make entering variable = θ, and reevaluate
values of basic variables. This is equal to:
191
Present BFS + θ-adjustments in θ-loop of entering cell.

Objective value of this solution is z(θ) = Present objective


value + c̄pq θ.

Actually, c̄pq = Cost of θ-loop = sum of original cost coeffs.


of recipient cells − sum of original cost coeffs. of donor cells.

Since z(θ) decreases as θ increases from 0, we should give


θ maximum possible value that keeps solution ≥ 0. This is
equal to:

Min ratio in this pivot step = min{Value of donor variables


in present BFS }.

So, the dropping basic variable can be taken to be any donor


variable which ties for minimum above.

So, pivot step consists of obtaining new BFS by substituting


θ = min ratio in the new solution; replacing dropping basic
variable by entering variable in the basic set.

192
With the new BFS and basic set, return to next iteration.

Example:

cij ai
j=1 2 3
i=1 9 6 8 6
2 10 5 12 11
3 11 13 20 4
bj 3 4 14

How to find θ-loops efficiently? Tree Labels

A basis has no cycles, it forms a spanning tree. A basic vector


+ one other cell has a unique cycle or θ-loop.

H. I. Scoins, “The compact representation of a rooted tree and


the transportation problem”, 1964 Int. Symp. on MP, presented
tree label method to find these loops efficiently.

193
C1 C2 C3 C4 C5 C6
R1 7 10 213
R2 25 15 312
R3 33 9 111
R4 11 4 8 110
163 22 100 318 79 64

C1 C2 C3 C4 C5 C6 C7 C8
R1 8 11 9
R2 0 3
R3 20 13 8 22
R4 9 17
R5 7 8 10 4 11 43
1 11 19 12 6 5 34 6

194
If Balance Condition Does Not Hold ...
We either have excess supply or excess demand.

Total supply > Total demand

Let ∆ = Total supply − Total demand.


A total of ∆ units will be left unused at all sources put together.

Introduce a dummy sink with demand = ∆. This sink repre-


sents leaving material unused at source itself. All cost coeffs. to
dummy sink are 0.
Now problem balanced. Solve it. In optimal sol. shipments to
dummy sink represent material unused at source.

Total Demand > Total Supply.

So, shortage = ∆ = Total demand − total supply.

To meet demand, a new source of supply for ∆ units must be


found. If none available, open a dummy source with supply of ∆,
representing unfulfilled demand at sinks. Make cost of shipping
from dummy source to every sink 0.

195
Now problem balanced. Solve it. In optimal sol. shipments
from dummy source represent unfulfilled demand at sinks.

196
Marginal analysis, Changes in Demand - Supply data:

Let x̄, (ū, v̄) be optimum pair. Suppose demand at sink j is


changing from present bj to bj + δ where δ ≥ 0. What is the best
source for increasing supply by δ to meet this additional demand,
if our aim is to keep total transportation cost as small as possible?
From marginal analysis, we know that the best source is the
source that has smallest ūi. Suppose ūp = min{ūi}.
Then increase supply at source p from present ap to ap + δ.
The change in total transportation cost will be δ(ūp + v̄j ) as long
as δ is in its optimality range.
To find new optimum solution as a function of δ, find δ-path
from row p to column j in array. This δ-path consists alternately
of entries of +δ and −δ among basic cells only, beginning with
a +δ adjustment in row p, and ending with a +δ adjustment in
column j.
The optimality range of δ is the interval of δ that keeps this
solution ≥ 0.

Example:
197
1 2 3 4 ai ui

1 10 − δ 15 20 + δ 45
25 36 20 10 10

2 40 + δ 30 − δ 70
47 40 30 20 20

3 50 + δ 50 + δ
20 33 15 14 5

bj 60 40 + δ 15 50
vj 15 20 10 0

198

You might also like