You are on page 1of 11

# Transportation Problem Two Set of Nodes Sources (m): commodities available for shipment Destinations (n): demand centers

Inputs si supply of commodity available at source i dj demand for commodity at destination j cij cost of shipping one unit of commodity from source i to destination j Matrix Model Destinations D1 D2 Dn Supply s1 c11 c12 c1n s2 c21 c22 c2n : : : : cm1 cm2 cmn sm d1 d2 dn

S1 Sources S2 : Sm
Demand

Problem: Determine the amount of commodity to be transported from each source to each destination so that all requirements are met and total shipping costs are minimized.

Mathematical Formulation Let xij be the amount of commodity shipped from source i to destination j Minimize subject to (i) Supply at each source must be used:
n

c x
i =1 j =1

ij ij

x
j =1

ij

= si , i = 1,..., m

## (ii) Demand at each destination must be met:

x
i =1

ij

= d j , j = 1,..., n

(iii) Flows must be nonnegative: xij 0, i = 1,...,m; j = 1,...,n Total number of variables = m n Total number of constraints = m + n

## Flow balance requirement:

s = d
i =1 i j =1

If Supply > Demand add dummy destination (Dn+1) to take up slack: dn+1 = with ci,n+1 = 0 If Demand > Supply add dummy source (Sm+1) to provide additional commodity: sm+1 = with cm+1, j = 0
D1 S1 S2 S3 9 8 13 D2 12 15 17 20 D3 Supply 10 12 19 15 15 15 15 S1 S2 S3 Received D1 0 10 0 10 D2 5 0 15 20 D3 10 5 0 15 Shipped 15 15 15

Demand 10

## b. Optimal solution (xij)

Properties of Transportation Model 1. There is exactly one redundant constraint. When any one constraint is dropped, the remaining are linearly independent. 2. A BFS has m + n 1 basic variables 3. Easy to compute initial BFS no phase 1. 4. Easy to compute dual solution and reduced costs without computing B1. 5. Easy to compute new BFS when nonbasic variable is brought into basis no pivoting.

Dual Problem Let ui be the dual variable corresponding to constraint supply constraint i. Let vj be the dual variable corresponding to constraint demand constraint j. Maximize

s u + d v
i =1 i i j =1 j

subject to ui + vj cij, i = 1,...,m; j = 1,...,n ui and vj unrestricted for all i and j Dual slack: wij = cij ui vj (also reduced cost of xij) Important properties of dual: 1. Complementary slackness condition (CSC): ui + vj = cij or wij = 0 for every basic variable xij 2. Because of the redundant primal constraint, one of the dual variables can be arbitrarily set to zero. The others can be determined from CSC. 3. Optimality conditions: xij 0 (primal feasibility) ui + vj cij or wij 0 for all nonbasic cells

Transportation Example
D1 S1 15 5 S2 13 S3 8 Demand
m

D2 D3 D4 15 16 11 10 11 15 9 15 12 11 7 10
n

D5 11 6

Supply 15 15

8 5 5 10 10 15

15

Note:

s = d
i =1 i j =1

= 45

Initial solution: x11 = 5, x12 = 10, x23 = 15, x34 = 5, x35 = 10 Is this a BFS? Criterion for BFS: m + n 1 basic variables, where m = 3 and n = 5 7 basic variables required

## We need to identify 2 more variables as basic: let x22 = 0, x33 =0

Initial BFS:
D1 S1 15 5 S2 13 S3 8 Demand 5 D2 D3 D4 15 16 11 10 11 15 9 0 15 12 11 7 0 5 10 15 5 D5 11 6 15 8 10 10 15 Supply 15

Dependent Cells: Possible to trace a closed path through them. Not a basis In tableau below, the dependent cells are marked by and form a closed path. The variables associated with those cells are x12, x15, x22, x23, x33 and x35.
S1 S2 S3 Demand D1 15 13 8 5 D3 D4 D5 Supply 16 11 11 15 11 15 9 6 15 12 11 7 8 15 10 15 5 10 D2 15

Example (continued) Compute dual variables (ui, vj) and reduced costs (wij):
D1 S1 15 S2 13 S3 Demand vj 8 5 2 1 5 7 D2 15 10 11 12 0 5 10 7 15 15 11 0 15 11 7 5 5 7 8 10 10 8 15 0 9 2 6 6 15 4 D3 D4 D5 Supply u i 15 8 16 3 11 4 11 5

## Is the solution optimal? If not, how do we improve it?

Simplex Algorithm Step 1. Construct the initial tableau and identify a BFS. Step 2. Compute the dual variables for the current basis and check for optimality. a. Assign a value of zero to a dual variable b. Compute the dual slack variable wij for each nonbasic cell c. If all the values of wij 0, stop; otherwise go to Step 3. Step 3. Change the basis. a. Find the cell to enter the basis b. Find the cell to leave the basis -- ratio test c. Change the basic solution by -- pivoting d. Return to Step 2

Example (continued)
D1 S1 S2 S3 Demand vj 15 13 8 5 2 1 5 7 D2 15 10 11 15 0 15 12 5 11 + 0 10 15 7 11 9 7 5 5 7 2 6 6 + 8 10 10 8 16 D3 3 D4 11 4 D5 11 5 15 15 15 8 4 0 Supply ui

First iteration for example: x25 enters the basis and x35 leaves with = 10
D1 S1 S2 S3 Demand vj 15 13 8 D2 D3 D4 D5 Supply 15 15 15 ui 4 0 4

15 16 3 11 4 11 1 5 10 + 2 11 15 9 2 6 10 + 0 5 1 12 5 11 7 8 6 + 10 5 5 10 15 5 10 11 11 15 11 6

Second iteration for example: x14 enters the basis and x23 leaves with = 5

Finding an Initial BFS Initialization Step: Construct a tableau showing all problem parameters. None of the rows or columns is crossed out. Iterative Step: According to some criterion, select a cell that has not been crossed out. 1. Let that cell be basic. 2. Assign a value to the basic variable for the cell that will use up either the remaining supply in the row or the remaining demand in the column. 3. Reduce the remaining supply for the row and the remaining demand for the column by the amount assigned. 4. Cross out the row or column whose supply or demand goes to zero. 5. If both go to zero, cross out only one (degeneracy). Stopping Rule: 1. If only one row or column remains, let all the cells not yet crossed out be basic and assign them all the remaining supply or demand. Stop. 2. If more than one row and more than one column remain, go to the iterative step.