Sei sulla pagina 1di 35

Iterative computations

of the Transportation
algorithm
Iterative computations of the Transportation algorithm
After determining the starting BFS by any one of the
three methods discussed earlier, we use the following
algorithm to determine the optimum solution
Step1: Use the Simplex optimality condition to
determine the entering variable as a current non-basic
variable that can improve the solution. If the
optimality condition is satisfied by all non-basic
variables, the current solution is optimal and we stop.
Otherwise we go to Step 2.
Step 2. Determine the leaving variable using the
Simplex feasibility condition. Change the basis
and go to Step 1.

The determination of the entering variable from


among the current non-basic variables is done by
the method of multipliers.

In the method of multipliers, we associate with


each row a dual variable (also called a multiplier)
ui and with each column we associate a dual
variable (also called a multiplier) vj.
Noting that each row corresponds to a constraint
and each column corresponds to a constraint we
recall from duality theory that

At any simplex iteration ,


Primal z-equation Left hand side Right hand side
coefficient of = of corresponding - of corresponding
variable xj dual constraint dual constraint

That is " zij  cij "  ui  v j  cij


(Verify this by taking m=3 and n=4 !)
Since there are m+n-1 basic variables and since
zij  cij  0
for all such basic variables, we have m+n-1
equations u v c
i j ij

to determine the m+n variables u i , v j


We arbitrarily choose one of them and equate to
zero and determine the remaining m+n-1 of
them. Then we calculate zij  cij  ui  v j  cij
for all non-basic variables xij. Then the entering
variable is that one for which ui  v j  cij
is most positive.
We do all this on the transportation
tableau itself (and NOT separately) as the
following example shows.
Destination
Starting Tableau Total Cost =48
v1=3 v2=7 v3=6 v4=3 Supply
3 7 6 4
S u1=0 5
3 2 0 -1
o
u 2 4 3 2
u2= -3 1 1 2
r -2 -2
c 4 3 8 5
u3= 2 1 2 3
e 1 6

Demand 3 3 2 2

Thus x32 enters the basis.


Determining the leaving variable
We first construct a closed loop that starts and
ends at the entering variable cell. The loop
consists of connected horizontal and vertical
segments only (no diagonals are allowed). Except
for the entering variable cell, each vertex (or
corner) of the closed loop must correspond to a
basic variable cell. The loop can cross itself and
bypass one or more basic variables. The amount
 to be allocated to the entering variable cell is
such that it satisfies all the demand and supply
restrictions and must be non-negative. Usually
 is the minimum of the amounts allocated to the
basic cells adjacent to the entering variable cell.
Having decided about the amount  to be
allocated to the entering cell, for the supply and
demand limits to remain satisfied, we must
alternate between subtracting and adding the
amount  at the successive corners of the loop.
In this process one of the basic variables will
drop to zero. In simplex language, we say it
leaves the basis. We repeat this process till
optimality is reached. We illustrate with a
numerical example.
Destination
Starting Tableau Total Cost =48
v1=3 v2=7 v3=6 v4=3 Supply
3 7 6 4
S u1=0 5
3 2 0 -1
o
u 2 4 3 2
u2= -3 1 1 2
r -2 -2
c 4 3 8 5
u3= 2  1 2 3
e 1 6

Demand 3 3 2 2

Thus x32 enters the basis.


Thus  will become 1 and in the process both the
basic variables x22 and x33 will become
simultaneously zero. Since only one of them should
leave the basis we make x22 leave the basis and
keep x33 in the basis but with value zero. Thus the
transportation cost reduces by 6 (as x23 increases
by 1) and we say one iteration is over. The resulting
new tableau is on the next slide.
Destination
Start of Iteration 2 Total Cost =42
v1=3 v2=7 v3=12 v4=9 Supply
3 7 6 4
S u1=0 3 2  5
o 6 5
u 2 4 3 2
u2= -9 2 2
r -8 -6 -2
c 4 3 8 5
u3= -4 1 0 2 3
e -5

Demand 3 3 2 2

Thus x13 enters the basis.


Thus  will become 0 and x32 leaves the basis.
Again the BFS is degenerate . But the
transportation cost remains the same and we say
the second iteration is over. The resulting new
tableau is on the next slide.
Destination
Start of Iteration 3 Total Cost =42
v1=3 v2=7 v3=6 v4=9 Supply
3 7 6 4
S u1=0 3 2 0  5
o 5
u 2 4 3 2
u2= -3 2 2
r -2 0 4
c 4 3 8 5
u3= -4 1 2 3
e -5 -6

Demand 3 3 2 2

Thus x14 enters the basis.


Sometimes it might be difficult to find the closed
loop from the entering cell by inspection. In that
case the following method can be used to find the
closed loop. We sketch the flowchart of the
sequence in which the variables ui and vj were
determined. For example in the above case the
flowchart is on the next slide. Now to find the
loop emanating from the non-basic cell (1,4), join
u1 and v4 by a dotted line (as shown). Then the
closed loop is:
(1,4) (1,2) (2,3) (3,4) (1,4)
v1=3

u1=0 v2=7 u3= -4 v4= 9

v3=6 u2= -9
Thus the closed loop is
(1,4) (1,2) (2,3) (3,4) (1,4)
Thus  will become 2 and in the process both the
basic variables x12 and x32 will become
simultaneously zero. Since only one of them should
leave the basis we make x32 leave the basis and
keep x12 in the basis but with value zero. Also x32
becomes 3. Thus the transportation cost reduces by
1*2+4*2=10 and we say third iteration is over. The
resulting new tableau is on the next slide.
Destination
Start of Iteration 4 Total Cost =32
v1=3 v2=7 v3=6 v4=4 Supply
3 7 6 4
S u1=0 3 0 0 2 5
o
u 2 4 3 2
u2= -3 2 2
r -2 0 -1
c 4 3 8 5
u3= -4 3 3
e -5 -6 -5

Demand 3 3 2 2

Thus this is the optimal tableau. Alt Opt solutions exist.


Problem 4 Problem Set 5.3B Page 193
In the unbalanced transportation problem given in
the table below, if a unit from a source is not
shipped out (to any of the destinations) a storage
cost is incurred at the rate of $5, $4, and $3 per unit
for sources 1,2, and 3 respectively. Additionally all
the supply at source 2 must be shipped out
completely to make room for a new product. Use
VAM to determine the starting solution and
determine the optimum solution.
1 2 3
1 1 2 1 20
2 3 4 5 40
3 2 3 3 30
30 20 20
To balance the problem, we introduce a dummy
destination with transportation costs
$5, $M, $3 respectively.

(Solution in the next slide)


Destination
1 2 3 Dummy Supply Row Penalties
1 2 1 5
1 20 20 0 - - -
S
o 3 4 5 M
2 30 10 40 10 1 1 1 1
u
r 2 3 3 3
3 10 0 20 30 10 1 11 0
c
e Demand 30 20 10 20 0 20

1 1 2 2
Column
Penalties 1 1 - M-3
1 1 - -
- 1 - -
Total shipping cost = 240
Destination
Starting Tableau Total Cost =240
v1=2v2=3 v3=3 v4=3 Supply
1 2 1 5
S u1=-2 20 20
o -1 -1 -4
u 3 4 5 M
u2= 1 30 10 40
r -1 4-M
c 2 3 3 3
u3= 0 10 0 20 30
e 0

Demand 30 20 20 20

Thus this is the optimal tableau. Alt Opt solutions exist.


Problem 5 Problem Set 5.3 B Page 193
In a 33 transportation problem, let xij be the
amount shipped from source i to destination j
and cij be the corresponding transportation cost
per unit. The amounts of supply at sources 1, 2,
and 3 are 15, 30, and 85 units, respectively;
and the demands at destinations 1, 2, and 3 are
15, 30, and 85 units, respectively. Assume that
the northwest corner solution is optimal and
that the associated values of the multipliers are
given by u1 = -2, u2 = 3, u3 = 5, v1 = 2, v2 =
5, and v3 = 10.
(a) Find the associated optimal cost
(b) Determine the smallest values of cij
associated with each non-basic variable
that will maintain the optimality of the
northwest corner solution.
v1=2 v2=5 v3=10 Supply
0 ≥3 ≥8 15
u1=-2 15
5 8 ≥13 30
u2=3 5 25 25
≥7 10 15
u3=5 5 80 85

Demand 20 5 30 80
5

Associated cost = 1475


Problem 8.1-6 Page 393 Hillier and Lieberman
(Operations Research 7th Edition)
The Onenote Co. produces a single product at
three plants for four customers. The three plants
will produce 60, 80, and 40 units respectively. The
firm has made a commitment to sell 40 units to
customer 1, 60 units to customer 2, and at least 20
units to customer 3. Both customers 3 and 4 also
want to buy as many of the remaining units as
possible. The net profit associated with shipping a
unit from plant i to customer j is given by the
following table.
Customer
1 2 3 4
1 $800 $700 $500 $200
Plant 2 $500 $200 $100 $300
3 $600 $400 $300 $500

Management wants to know how many units to sell to


customers 3 and 4 and how many units to ship from
each of the plant to each of the customers to maximize
profits. Formulate the problem as a transportation
model and solve it.
There are 3 sources, viz. Plants 1, 2 and 3. Right
now there are 4 destinations, viz. customers 1, 2, 3,
and 4. The supplies ai at the three sources are 60,
80, and 40 respectively. The demands at the three
destinations are: b1 = 40, b2 = 60, b3  20, b4 = ?
Since in a transportation model, all constraints are
equalities, we shall put b3 = 80 ( since customer 3
must get at least 20 units) and b4= 60 as the supply
remaining after satisfying the three customers 1, 2,
and 3 is 60 and since customers 3 and 4 will buy as
much as possible.
But now the demand has become 240 and so we
introduce a dummy source SF with supply 60. Since
the customers 1, 2 must definitely get 40 and 60 units
respectively, the dummy source cannot send any
amount to these destinations. This is achieved by
putting the cost from the dummy to these destinations
as big M. Now the cost from dummy to the
destinations 3 and 4 are put as zero. Also since these
are actually profits, and since the transportation model
is a minimization problem, to maximize the total profit
we take cij as negative of the profits given. The
starting tableau is given below.
Destination
1 2 3 4 Supply
1 -8 -7 -5 -2
60 0 60 0 1 - - -
S -5 -2 -1 -3
2 80 40 2 2 2 -
o 40 40
u 3 -6 -4 -3 -5
20 20 40 20 1 1 2 2
r
SF M M 0 0
c 60 60 0 0 0 0
e
Demand 40 60 80 6020

2 3 2 2
1 - 2 2
- - 2 2
- - 3 5
Destination
v1= -9 v2= -7 v3= -5 v4= -7

u1= 0 -8 -7 -5 -2
S -1 60 0 -5
o u2= 4 -5 -2 -1 -3
u 40 -5 0 40
r -6 -4 -3 -5
u3= 2 20 20
c -1 -9
e M M 0 0
u4= 5 60
-4-M -2-M -2

This is the optimal tableau.


Max Profit = - min z = - (-900) = $900.
Compre Question I Semester 2003-2004
The table below gives the times taken by 3 persons
to complete 4 tasks( i.e. cell (i,j) is the time taken
by person i to complete the task j).
Tasks
1 2 3 4
1 4 1 2 6
Person 2 6 4 3 5
3 5 2 6 4
If each task is to be allocated to a person (i.e. no
splitting of the task between 2 or more persons is
allowed) and if each person can be assigned at most
two tasks, find the optimum allocation of the jobs to
the persons to minimize the total time taken to
complete all the 4 tasks.
This can be formulated as a transportation model with
three sources (persons) and 4 destinations (tasks). The
demands at the three destinations are bj = 1 for
j=1,2,3,4. But the availabilities are ai = 2 for i=1, 2, 3
as each person can be assigned a maximum of two
tasks. Thus to balance the problem, we introduce a
dummy task with demand 2 and time 0. Thus we get
the starting tableau:
Destination
Starting Tableau
1 2 3 4 Dummy Supply
S 4 1 2 6 0
o 1 1 1 2 1 1 1 3
u 2 6 4 3 5 0 2 3 - -
r 2
c 3 5 2 6 4 0 2 2 22
1 0 1 0
e
Demand 1 1 0 1 1 2 0

1 1 1 1 0
1 1 4 2 -
1 1 - 2 -
Destination
Starting Tableau
v1=5 v2=2 v3=3 v4=4 v5=0 Supply
S 4 1 2 6 0
o u1= -1 1 1 2
0 -3 -1
u
6 4 3 5 0
r u2= 0 2 2
c -1 -2 0 -1
e 5 2 6 4 0
2
0
u3= 0 1 0 1
-3
Demand 1 1 1 1 2

Thus this is the optimal tableau. Optimal cost = 12

Potrebbero piacerti anche