You are on page 1of 15

Transportation Problem

Transport a commodity from several sources to several destinations. No. of sources : m, No. of destinations : n

Fixed supply at each source : si


Fixed demand at each destination : dj Unit cost of transportation from source i to destination j : cij (different for each pair) cij si dj

LP Formulation
Decision Variables: xij : Quantity shipped from source i to destination j. Minimize subject to: Z = cij.xij j xij = si i xij = dj xij 0 Although an LP, this problem has a very special structure. i = 1...m j = 1...n

A-matrix has only values 0 and 1.


Each column has only two ones.

cij si dj

x11 x12 x13 x21 x22 x23 1 1 1 0 0 0

0 1 0 0

0 0 1 0

0 0 0 1

1 1 0 0

1 0 1 0

1 0 0 1

Exploiting the Special Structure


Number of variables and constraints can be quite large. 50 sources, 200 destinations : 10000 variables, 250 constraints. Simplex method will be very inefficient. Using the special structure and duality theory, develop a specialized version of the algorithm for this problem. Problem is feasible only if si = dj , i.e. the problem is balanced. If not balanced, it can be made balanced by
Adding a dummy source if si < dj

Adding a dummy sink if sj > dj


Transportation cost from/to a dummy node is zero. Why? What does transportation from/to a dummy node represent? Unfilled demand or spare supply.

Finding a basic feasible solution

x1 + x2 + x3 = 3

2x1 + x2 + 2x3 = 5 How many basic variable? m+n? Are all constraints independent? 3x1 + 2x2 + 3x3 = 8 If we ignore any one constraint, it will automatically be satisfied if the rest are satisfied. d1=5 d2=10 No. of basic variables = m+n-1
x11 How to get a basic feasible solution?
All constraints must be satisfied. No more than m+n-1 variables should be non-zero.
North West Corner Rule. Vogels Approximation Method.

x12 s1=8 x22 s2=7

x21

Such a solution is easy to find manually by inspection.

No need for simplex tableau. Use a m n Transportation tableau.

North West Corner Rule


Select the cell in the north west corner of the table. Set this variable to highest possible value. 12 10 14 This will satisfy either a row or a column 10 2 Cross out this row or column 12 Adjust supply/demand of uncrossed column or row Continue operation with remaining matrix

20 26
2 12 6 20 6 18 20

The Dual Solution


How many dual variables? m+n One for each supply constraint : ui One for each demand constraint : vj Equality constraints : unrestricted dual variables. How to find the dual variables? v1 = 0 v2 = -20 v3 = -25 cij 75 55 u1 = 75 Reduced cost of basic variables is zero. 40 35 u2 = 60 Dual constraint is tight (comp. slackness) 50 u3 = 75 cij = cij (ui+vj) = 0 < > For basic variable, we must have ui+vj = cij We have m+n unknowns and m+n-1 equations. Value of one unknown can be arbitrarily decided. Let v1 = 0, and compute u1. Given u1, v2 can be computed, and so on.

Reduced Cost and Pivoting


Having computed the dual variables, the reduced cost can be computed for each non-basic variable. cij = cij (ui+vj) Select the non-basic variable with most negative reduced cost.
cij 75 60 30
v1 = 0 v2 = -20 v3 = -25

10
0 -45

55

55 5
35 50

u1 = 75 u2 = 60

40 12 75 20

6
20

u3 = 75

How to perform the Pivot?


Increase the value of non-basic variable. Must keep all constraints satisfied. How? What are the changes necessary in other 10 variables if the value of this variable is 10 increased? For increasing the value of this variable, a basic variable in that row must be decreased. This decrease must be accompanied by an increase in the corresponding column. We can form a cycle of cells, where
if the values of alternate cells are increased/decreased the solution remains balanced.

14
2

26
12

12

6
20

18

20

xij

10

+ -

2
12

v1 = 0 v2 = -20 v3 = -25 75 55 u1 = 75

+ 6 - 20

40 30
-45

35 50

u1 = 60 u1 = 75

cij
Solution is balanced if values are increased/decreased by a fixed amount d for each cell. Cells with decreasing value are called Donor Cells.

Cells with increasing value are called Recipient Cells.


What is the impact on cost for d = 1? Cost increases by cij for recipient cells, and decreases for donor cells.

Net change in cost:


(30+35+55) - (50+40+75) = -45 What is the reduced cost of non-basic cell? 30 -(0+75) = -45. Net change in Z if non-basic variable is increased by one unit. (cj - zj)

10

+ -

2 12

12 2 16 10

+ 6 - 20

10

How much can we increase the value of non-basic variable? All variables must remain non-negative. Value is decreasing for donor cells. d cannot be greater than the value in any donor cell. Find the donor cell with smallest value of xij. This donor cell is the out-going basic variable. Increase/Decrease values by this amount. New Basic Feasible solution. Z has decreased by d.cij. Continue until optimal, i.e. cij 0 for all non-basic variables.

Transportation Simplex Algorithm


Step 0 (Construction of initial solution) Construct an initial basic feasible solution using North-West Corner rule, and set up the Transportation Simplex tableau. Step 1 (Computation of dual solution and reduced costs) Compute the dual variable values using the fact that cij = ui+vj for basic variables. Using the dual values, compute reduced cost for the non-basic cells. Step 2 (Optimality test and selection of incoming variable) Select the cell with most negative reduced cost as incoming basic variable. If all cells have non-negative reduced costs, current solution is optimal, STOP. Otherwise go to Step 3. Step 3 (Pivot Operation) Form a cycle of donor/recipient cells starting and ending at the incoming cell. Identify the donor cell with smallest allocation as the outgoing variable, and increase/decrease allocation for recipient/donor cells accordingly. Go back to Step 1.

Transportation Problem

The basic solution of a transportation problem is given below. The cij values are given in the top left corner of each cell, and the xij values in the bottom right corner. 1.Find the dual solution in which u4 = 0. 2.Compute the reduced cost of variable x22. 3.Is the current solution optimal? Why or why not? 4.Find the unique cycle of donor/recipient cells starting/ending with variable x22. 5.If this cycle is used to perform a pivot, what will be the new value of x22? 6.What will be the reduction/increase in Z value after the pivot?

5 8 11 13 7 5 11

3 4 8 9 6

2 5 2 5 3

7 6 9 7 12 4

9 12 12 10 4

Dual of Transportation Problem


c11 x11 1 0 1 0 0 c12 x12 1 0 0 1 0 c13 x13 1 0 0 0 1 c21 x21 0 1 1 0 0 c22 x22 0 1 0 1 0 c23 x23 0 1 0 0 1 =s1 =s2 =d1 =d2 =d3 u1 u2 v1 v2 v3

If x11 is basic, the corresponding dual constraint must be tight.


u1 + v1 c11 <>

Transportation Problem

The basic solution of a transportation problem is given below. The cij values are given in the top left corner of each cell, and the xij values in the bottom right corner. 1.Find the dual solution in which u4 = 0.

5 5 8 3

11 -8 2

12 7 -5 -12 9

9 12 0 6 -3 0

-3
-6 5

11

-13 + 7 8 2 5 -9
5

4 -13

6
9

12
10

-3
4

+7

+11

-5

-3

12

-4

-5

5
8 11 13

3
4

2
5

7
6

9
12 12

7
5 11

8
9 6

2
5 3

9
7 12 4

10
4

You might also like