Transportation Problem Solving
Transportation Problem Solving
Transportation
problems
              1.1   You should be familiar with the terminology used in describing and modelling
                    the transportation problem.
              䊏 The capacity of each of the supply points (or sources) – the quantity of goods that can be
                produced at each factory or held at each warehouse. This is called the supply or stock.
              䊏 The amount required at each of the demand points – the quantity of goods that are
                needed at each shop or by each customer. This is called the demand (or destination).
䊏 The unit cost of transporting goods from the supply points to the demand points.
                                                The unit cost is the cost of transporting one item. If one item costs
                                                c pounds to transport from A to X then two items will cost 2c pounds
                                                to transport along that route, and n items nc pounds.
Example 1
              Three suppliers A, B and C, each produce road grit which has to be delivered to council depots W,
              X, Y and Z. The stock held at each supplier and the demand from each depot is known. The cost,
              in pounds, of transporting one lorry load of grit from each supplier to each depot is also known.
              This information is given in the table.
                                                Notice that the total supply is equal to the total demand. If this is
                                                not the case we simply introduce a dummy destination to absorb the
                                                excess supply, with transportation costs all zero (see Section 1.3).
   2
                                                                                  Transportation problems
                                                                                                            3
CHAPTER   1
Example 2
              Use the north-west corner method to find an initial solution to the problem described in
              example 1 and shown in the table.
                1                 W       X          Y      Z       Stock
                     A                                               14
                     B                                               16            1 Set up the table.
                     C                                               20
                     Demand       11      15         14     10       50
                                  W        X         Y      Z       Stock
                     A            11      3                          14
                     B                    12                         16            As the stock at A has been
                                                                                   exhausted, move one square
                     C                                               20            down and allocate the
                     Demand       11      15         14     10       50            maximum possible number
                                                                                   of units from supplier B to
                                                                                   depot X. In this case,
                                                                                   15  3  12.
   4
                                                                                Transportation problems
                  W         X       Y        Z     Stock
                                                                       Now that the demand at
    A             11       3                        14                 X has also been met, move
    B                      12       4               16                 one square to the right and
                                                                       use the remaining stock at B
    C                                               20                 to start to meet the demand
    Demand        11       15       14       10     50                 at Y.
                  W         X       Y        Z     Stock
                                                                       The stock at B is now
    A             11       3                        14                 exhausted (12  4  16)
    B                      12        4              16                 and so move one square
                                                                       down and use the stock at
    C                               10              20                 C to fulfill the remaining
    Demand        11       15       14       10     50                 demand at Y.
                  W         X       Y        Z     Stock
    A             11       3                        14                 Finally, move one square
                                                                       to the right and use the
    B                      12        4              16                 remaining stock at C to
    C                               10       10     20                 meet the demand at Z.
    Demand        11       15       14       10     50
This is the final table. All of the stock has been used and
all of the demands met.
  The number of occupied cells (routes used) in the table  number of supply points  number of
  demand points 1.
  In this case the
  number of occupied cells (routes used)  6,
  number of supply points  3,
  number of demand points  4
  and 6  3  4  1.
                                                                                                          5
CHAPTER   1
1.3 You can adapt the algorithm to deal with unbalanced transportation problems.
䊏 When the total supply total demand, we say the problem is unbalanced.
              䊏 If the problem is unbalanced we simply add a dummy demand point with a demand chosen
                so that total supply ⴝ total demand, with transportation costs of zero.
Example 3
                                A        B          C        Supply
              X                 9        11         10        40
              Y               10         8          12        60
              Z               12         7          8         50
              Demand          50         40         30
              Three outlets A, B and C are supplied by three suppliers X, Y and Z. The table shows the cost, in
              pounds, of transporting each unit, the number of units required at each outlet and the number
              of units available at each supplier.
              a Explain why it is necessary to add a dummy demand point in order to solve this problem.
              b Add a dummy demand point and appropriate costs to the table.
              c Use the north-west corner method to obtain an initial solution.
   6
                                                                               Transportation problems
1.4     You understand what is meant by a degenerate solution and know how to
        manage such solutions.
䊏 In a feasible solution to a transportation problem with m rows and n columns, if the number
  of cells used is less than n ⴙ m ⴚ 1, then the solution is degenerate.
䊏 This will happen when an entry, other than the last, is made that satisfies the supply for a
  given row, and at the same time, satisfies the demand for a given column.
䊏 The algorithm requires that n ⴙ m ⴚ 1 cells are used in every solution, so a zero needs to be
  placed in a currently unused cell.
Example 4
                  A        B         C        Supply
W                10        11        6         30
X                 4        5         9         20
Y                 3        8         7         35
Z                11        10        9         35
Demand           30        40        50        120
a Demonstrate that the north-west corner method gives a degenerate solution and explain why
  it is degenerate.
b Adapt your solution to give a non-degenerate initial solution and state its cost.
    a                 A         B         C   Supply
         W            30                       30
         X                      20             20                  Notice that there has been
                                                                   a diagonal ‘move’ from cell
         Y                      20       15     35
                                                                   WA to cell XB. Degenerate
         Z                               35     35                 solutions can be avoided by
                                                                   not allowing diagonal moves.
         Demand       30        40       50    120
    This solution is degenerate since it fulfils all the supply
    and demand needs but only uses 5 cells WA, XB, YB,
    YC and ZC. There are 4 rows and 3 columns so a non-
    degenerate solution will use 4  3  1  6 cells.
    b Start by placing the largest possible number in the
        north-west corner
                                                                  Having placed the 30 in the
                      A         B         C   Supply              NW corner, you now need to
                                                                  place the next number in the
         W            30                       30                 square to its right or in the
         X                                     20                 square underneath.
                                                                                                         7
CHAPTER   1
                  Or                     A       B         C         Supply
                             W           30                           30
                             X            0      20                   20
                             Y                   20        15          35          In fact the zero can be placed
                             Z                             35          35          anywhere in the table, but
                                                                                   it is convenient to ‘stick to
                             Demand      30      40        50         120          the rule’ about restricting
                                                                                   the movement to one square
                  Both have a cost of (30  10)  0  (20  5)                     down or one square right.
                   (20  8)  (15  7)  (35  9)  £980
Exercise 1A
              1                     P       Q         R         Supply
                       A           150     213       222             32
                       B           175     204       218             44
                       C           188     198       246             34
                       Demand      28      45         37            110
              2                     P       Q         R         S         Supply
                       A           27      33         34        41            54
                       B           31      29         37        30            67
                       C           40      32         28        35            29
                       Demand      21      32         51        46         150
   8
                                                                           Transportation problems
3                   P      Q       R      Supply
    A              17      24     19           123
    B              15      21     25           143
    C              19      22     18           84
    D              20      27     16           150
    Demand        200     100     200          500
4                   P      Q       R       S         Supply
    A              56      86     80      61          134
    B              59      76     78      65          203
    C              62      70     57      67          176
    D              60      68     75      71          187
    Demand        175     175     175    175          700
5                  A       B       C      D          Supply
    X              27      33     34      41          60
    Y              31      29     37      30          60
    Z              40      32     28      35          80
    Demand         40      70     50      20
    Four sandwich shops A, B, C and D can be supplied with bread from three bakeries, X, Y,
    and Z. The table shows the cost, in pence, of transporting one tray of bread from each
    supplier to each shop, the number of trays of bread required by each shop and the number
    of trays of bread that can be supplied by each bakery.
    a Explain why it is necessary to add a dummy demand point in order to solve this problem,
      and what this dummy point means in practical terms.
    b Use the north-west corner method to determine an initial solution to this problem and
      the cost of this solution.
6                  K       L       M      N          Supply
    A              35      46     62      80          20
    B              24      53     73      52          15
    C              67      61     50      65          20
    D              92      81     41      42          20
    Demand         25      10     18      22
    A company needs to supply ready-mixed concrete from four depots A, B, C and D to four
    work sites K, L, M and N. The number of loads that can be supplied from each depot and
    the number of loads required at each site are shown in the table above, as well as the
    transportation cost per load from each depot to each work site.
    a Explain what is meant by a degenerate solution.
    b Demonstrate that the north-west corner method gives a degenerate solution.
    c Adapt your solution to give a non-degenerate intial solution.
                                                                                                     9
CHAPTER   1
              7                     L      M       N      Supply
                    P               3      5        9        22
                    Q               4      3        7        a
                    R               6      4        8        11
                    S               8      2        5        b
                    Demand         15      17      20
                    The table shows a balanced transportation problem. The initial solution, given by the north-
                    west corner method, is degenerate.
                    a Use this information to determine the values of a and b.
                    b Hence write down the initial, degenerate solution given by the north west-corner method.
              䊏 Transportation costs are made up of two components, one associated with the source and
                one with the destination. These costs of using that route, are called shadow costs.
              In example 2, the cost of £250 in transporting one unit from supplier B to depot X must be
              dependent on the features  location, toll costs etc, of both B and X.
              Using the routes currently in use you can build up equations, showing the cost of transporting one
              unit, such as
                    S(A)  D(X)  110 and S(C)  D(Z)  120 etc.
              where S(A), D(X) are the costs due to supply point A and demand point X and so on,
              respectively.
              You need a value for each of the source components and each
                                                                                      You are only looking at the
              of the destination components. You do not have sufficient               costs of the routes used in
              equations for a solution (five equations and six unknowns) but          your current solution.
              relative costs will do.
  10
                                                                                        Transportation problems
Example 5
                W           X        Y         Z   Stock
   A            11         3                        14
   B                       12         4             16
   C                                 10     10      20
   Demand       11         15        14     10      50
                                                                                                                  11
CHAPTER   1
              Putting S(A) to zero, from row 1 we get D(W)  180                     Put S(A)  0 arbitrarily and
              and D(X)  110                                                         then solve the equations
                                                                                     S(A)  D(W)  180 and
                                                                                     S(A)  D(X)  110.
               Find the remaining shadow costs by ‘walking round’ the current
               solution, noting the shadow costs you find round the edge
               of the table, and using shadow costs found earlier to find the
               remaining ones.
              You have now found all source and all destination shadow costs.
              S(A)  0     S(B)  140      S(C)  180
                                                                  Do not be alarmed at the negative shadow
              D(W)  180 D(X)  110         D(Y)  10             cost found for D(Z). It is a feature of
              D(Z)  60                                          arbitrarily putting S(A)  0. You are simply
                                                                     finding costs relative to the cost S(A).
  12
                                                                             Transportation problems
Example 6
                 A       B         C        D       Supply
X                9      11         10        0          40
Y               10       8         12        0          60
Z               12       7         8         0          50
Demand          50      40         30       30          150
Calculate the shadow costs given by the initial solution of the problem given in example 3 and
shown in the table.
                                                                                                       13
CHAPTER   1
               You do not have to show each stage of the table in the examination.
               Just this final list of shadow costs is sufficient.
  14
                                                                               Transportation problems
1.6 You can find improvement indices and use these to find entering cells.
It may be possible to reduce the cost of the initial solution by introducing a route that is not
currently in use. You consider each unused route in turn and calculate the reduction in cost which
would be made by sending one unit along that route. This is called the improvement index.
䊏 The improvement index in sending a unit from a source P to a demand point Q is found
  by subtracting the source cost S(P) and destination cost D(Q) from the stated cost of
  transporting one unit along that route C(PQ). i.e.
           Improvement index for PQ  IPQ C(PQ)  S(P)  D(Q)
䊏 The route with the most negative improvement index will be introduced into the solution.
䊏 The cell corresponding to the value with the most negative improvement index becomes the
  entering cell (or entering square or entering route) and the route it replaces is referred
  to as the exiting cell (or exiting square or exiting route).
䊏 If there are two equal potential entering cells you may choose either. Similarly, if there are
  two equal exiting cells, you may select either
䊏 If there are no negative improvement indices the solution is optimal.
Example 7
Use the shadow costs found in example 5, and shown in the table above, to calculate
improvement indices, and use these to identify the entering cell.
  Focus on the routes not currently being used, BW, CW, CX, AY, AZ and BZ.
  You already know that
  S(A)  0 S(B)  140 S(C)  180 D(W)  180 D(X)  110 D(Y)  10 D(Z)  60
  Improvement index for BW  IBW  C(BW)  S(B)  D(W)  190  140  180  130
  Improvement index for CW  ICW  240  180  180  120
  Improvement index for CX  ICX  270  180  110  20
  Improvement index for AY  IAY  130  0  10  120
  Improvement index for AZ  IAZ  290  0  (ⴚ60)  350
  Improvement index for BZ  IBZ  280  140  (ⴚ60)  200
  The entering cell is therefore BW, since this is the most negative.
                                                                                                         15
CHAPTER   1
Example 8
                               X         Y         Z              Supply
              A                11        12        17              11
              B                13        10        13              15
              C                15        18        9               14
              Demand           10        15        15
              a Use the north-west corner method to find an initial solution to the transportation problem
                shown in the table.
              b Find the shadow costs and improvement indices.
              c Hence determine if the solution is optimal.
                  a                  X         Y        Z         Supply
                      A             10         1                    11
                      B                       14         1          15
                      C                                 14          14
                      Demand        10        15        15
                  b   Shadow costs                           11      12    15
                                                              X       Y     Z   Supply
                             0           A                   11      12    17     11
                            ⴚ2           B                   13      10    13     15
                            ⴚ6           C                   15      18    9      14
                                         Demand              10      15    15
                      Improvement indices for cells:
                      BX  13  2  11  4
                      CX  15  6  11  10
                      CY  18  6  12  12
                      AZ  17  0  15  2
                  c   There are no negative improvement indices, so the solution is
                      optimal.
Exercise 1B
1                     P       Q        R       Supply
      A             150      213      222           32
      B             175      204      218           44
      C             188      198      246           34
      Demand         28       45      37
2                     P       Q        R        S         Supply
      A              27       33       34      41          54
      B              31       29      37       30          67
      C              40       32      28       35          29
      Demand         21       32      51       46
3                     P       Q        R       Supply
      A              17       24       19           123
      B              15       21       25           143
      C              19       22      18            84
      D              20       27      16            150
      Demand        200      100      200
4                     P       Q        R        S         Supply
      A              56       86       80      61          134
      B              59       76      78       65          203
      C              62       70      57       67          176
      D              60       68      75       71          187
      Demand        175      175      175      175
1.7 You can use the stepping-stone method to obtain an improved solution.
In example 7 you discovered that the most negative improvement index was BW with a value
of 130 (see page 15). This means that every time you send a unit along BW you save a cost of
130. Therefore you want to send as many units as possible along this new route. You have to
be careful, however, not to exceed the stock or the demand. To ensure this, you go through a
sequence of adjustments, called the stepping-stone method.
You are looking therefore for a cycle of adjustments, where you increase the value in one cell and
then decrease the value in the next cell, then increase the value in the next, and so on.
 A popular mind picture is that you are using the cells as ‘stepping-stones’, placing one foot on each,
 and alternately putting down your left foot (increasing) then right foot (decreasing) as you journey
 around the table – hence the method’s nickname.
                                                                                                                 17
CHAPTER   1
Example 9
                              W           X        Y            Z       Stock
              A               11          3                              14
              B                           12       4                     16
              C                                   10            10       20
              Demand          11          15      14            10       50
                              W           X    Y            Z        Stock
                  A           11         3                            14
                  B                     12     4                     16
                  C                            10        10           20
                  Demand       11        15    14        10           50
  18
                                                                      Transportation problems
                                                                                                19
CHAPTER   1
              You will notice that AW has become empty. AW is therefore the exiting cell.
              Remember that the number of cells used in a feasible solution must equal the number of rows
              plus the number of columns minus 1. So if you put a number into an entering cell, it must be
              balanced by a number being removed from an exiting cell.
䊏 At each iteration we create one entering cell and one exiting cell.
              䊏 To find an optimal solution, continue to calculate new shadow costs and improvement
                indices and then apply the stepping-stone method. Repeat this iteration until all the
                improvement indices are non-negative.
Example 10
                Second iteration
                Find the new shadow costs:
                 Shadow costs                  50     110      10   ⴚ60
                                               W        X       Y     Z      Stock
                        0           A         180     110     130   290       14
                       140          B         190     250     150   280       16
                       180          C         240     270     190   120       20
                                    Demand      11     15      14    10       50
  20
                                                                     Transportation problems
So the new entering cell is CX, since this has the most negative
improvement index.
Applying the stepping-stone method gives
             W        X          Y        Z       Stock
A                    14                            14
B            11     1      4                   16
C                          10          10       20
Demand       11      15       14          10       50
Third iteration
New shadow costs
Shadow costs                  70       110       30    ⴚ40
                              W          X        Y      Z   Stock
       0          A          180       110      130    290    14
      120         B          190       250      150    280    16
      160         C          240       270      190    120    20
                  Demand       11       15       14     10    50
                                                                                               21
CHAPTER   1
Some stepping-stone routes are not rectangles and some values are not immediately apparent.
Example 11
                Check the problem is balanced, Supply  Demand  36, so we do not need to add a
                dummy.
                The north-west corner method gives the following initial solution
                               X       Y        Z    Stock
                 A            10       3              13
                 B                    10         1     11
                 C                              12    12
                 Demand       10      13        13
  22
                                                                                    Transportation problems
Use CX as the entering cell, since it has the most negative improvement index.
                X         Y               Z        Stock
A            10       3                         13
B                      10            1           11
C                                    12          12
Demand         10          13           13
  This stepping stone route is quite complicated. Take a minute or two to check how it has been
  created. Start by putting  in CX, then to correct the demand of X, subtract  from cell AX, then to
  correct the supply in A, add  to cell AY and so on, finishing at cell CZ.
  Many candidates fail to understand the difference between an empty cell and one with a zero entry.
  Zero is a number, just like 4 and ‘counts’ towards our m  n  1 entries in the table. An empty cell
  has no number in it.
Improved solution is
              X        Y        Z         Stock
A                     13                   13
B                     0         11          11
C             10                 2         12
Demand        10      13        13
                                                                                                              23
CHAPTER   1
  24
                                                                               Transportation problems
Exercise 1C
Questions 1 to 3
Complete your solutions to the transportation problems from questions 1, 2 and 4 in exercises
1A and 1B. You should demonstrate that your solution is optimal.
1                    P         Q         R        Supply
      A              150       213       222           32
      B              175       204       218           44
      C              188       198       246           34
      Demand         28        45        37
2                    P         Q         R         S        Supply
      A              27        33        34       41         54
      B              31        29        37       30         67
      C              40        32        28       35         29
      Demand         21        32        51       46
3                    P         Q         R         S        Supply
      A              56        86        80       61         134
      B              59        76        78       65         203
      C              62        70        57       67         176
      D              60        68        75       71         187
      Demand         175       175       175      175
                                                                                                         25
CHAPTER   1
               The solution to question 3 requires a number of iterations, plus the optimality check – you will
               certainly get lots of practise in implementing the algorithms!
               In book D1 you met linear programming problems in two variables. In chapter 4 of this book you will
               study linear programming problems in more than two variables.
              Let x11 (the entry in the 1st row, 1st column) be the number of                 x11, x23, x34 and so on
              units transported from A to W, and x24 (the entry in the 2nd row                are called the decision
              and 4th column) be the number of units transported from B to Z,                 variables.
              and so on, then you have the following solution.
               In this case a lot of these entries will be empty  there will be only 3  4  1  6 non-empty
               cells, and all the rest will be blank. However, since you do not yet know which will be empty you
               allow for any of them to be non-empty as you formulate the problem.
              The objective is to minimise the total cost, which will be calculated by finding the sum of the
              product of number of units transported along each route and the cost of using that route.
  26
                                                                              Transportation problems
We can write similar constraints for each supplier and each depot, and include non-negativity
constraints. This enables you to formulate the transportation problem as a linear programming
problem.
Example 12
                   R      S     T    Supply
          A        3      3     2     25
          B        4      2     3     40
          C        3      4     3     31
      Demand       30    30     36
Formulate the transportation problem as a linear programming problem. You must state your
decision variables, objective and constraints.
  Let xij be the number of units transported from i to j.             FIRST define your decision
       where i ∈ {A, B, C}                                            variables
               j ∈ {R, S, T }
         and xij  0
                                                                                                        27
CHAPTER   1
Exercise 1D
              1                   P       Q       R        Supply
                   A             150     213     222            32
                   B             175     204     218            44
                   C             188     198     246            34
                   Demand        28      45      37
              2                   P       Q       R         S         Supply
                   A             27      33      34        41          54
                   B             31      29      37        30          67
                   C             40      32      28        35          29
                   Demand        21      32      51        46
              3                   P       Q       R        Supply
                   A             17      24      19             123
                   B             15      21      25             143
                   C             19      22      18             84
                   D             20      27      16             150
                   Demand        200     100     200
              4                   P       Q       R         S         Supply
                   A             56      86      80        61          134
                   B             59      76      78        65          203
                   C             62      70      57        67          176
                   D             60      68      75        71          187
                   Demand        175     175     175       175
Mixed exercise 1E
              1                   L      M       Supply
                   A             20      70           15
                   B             40      30            5
                   C             60      90            8
                   Demand        16      12
                  The table shows the cost, in pounds, of transporting a car from each of three factories A, B
                  and C to each of two showrooms L and M. It also shows the number of cars available for
                  delivery at each factory and the number required at each showroom.
  28
                                                                              Transportation problems
2                   P      Q       R       Supply
    F              23      21      22          15
    G              21      23      24          35
    H              22      21      23          10
    Demand         10      30      20
    The table shows the cost of transporting one unit of stock from each of three supply points
    F, G and H to each of three sales points P, Q and R. It also shows the stock held at each
    supply point and the amount required at each sales point.
    a Use the north-west corner method to obtain an initial solution.
    b Taking the most negative improvement index to indicate the entering square, perform
      two complete iterations of the stepping-stone method. You must state your shadow costs,
      improvement indices, stepping-stone routes and exiting cells.
    c Explain how you can tell that your current solution is optimal.
    d State the cost of your optimal solution.
    e Taking the zero improvement index to indicate the entering square, perform one futher
      iteration to obtain a second optimal solution.
3                   X      Y       Z       Supply
    J               8       5      7           30
    K               5       5      9           40
    L               7       2      10          50
    M               6       3      15          50
    Demand         25      45     100
                    X       Y      Z       Supply
    J              25       5                  30
    K                      40                  40
    L                       0      50          50
    M                              50          50
    Demand         25      45     100
                                                                                                        29
CHAPTER   1
                  a Explain why it is was necessary to add a zero entry (in cell LY) to the solution.
                  b State the cost of this initial solution.
                  c Choosing cell MX as the entering cell, perform one iteration of the stepping-stone
                    method to obtain an improved solution. You must make your route clear, state your
                    exiting cell and the cost of the improved solution.
                  d Determine whether your current solution is optimal. Give a reason for your answer.
                  After two more iterations the following solution was found.
                                       X         Y         Z      Supply
                      J                                    30         30
                      K                          20        20         40
                      L                                    50         50
                      M                25        25                   50
                      Demand           25        45       100
                  e Taking the most negative improvement index to indicate the entering square, perform
                    one further complete iteration of the stepping-stone method to obtain an optimal
                    solution. You must state your shadow costs, improvement indices, stepping-stone route
                    and exiting cell.
              4                    S        T         U         Supply
                  A                6        10        7          50
                  B                7        5         8          70
                  C                6        7         7          50
                  Demand          100       30        20
                  a Explain why a dummy demand point might be needed when solving a transportation
                    problem.
                  The table shows the cost, in pounds, of transporting one van load of fruit tree seedlings from
                  each of three greenhouses A, B and C to three garden centres S, T and U. It also shows the
                  stock held at each greenhouse and the amount required at each garden centre.
                  b Use the north-west corner method to obtain an initial solution.
                  c Taking the most negative improvement index in each case to indicate the entering square,
                    use the stepping-stone method to obtain an optimal solution. You must state your shadow
                    costs, improvement indices, stepping-stone routes, entering squares and exiting cells.
                  d State the cost of your optimal solution.
                  e Formulate this problem as a linear programming problem. Make your decision variables,
                    objective function and constraints clear.
  30
                                                                             Transportation problems
3   A dummy destination is needed if total supply does not equal total demand.
    Transport costs to this dummy destination are zero.
9   Transportation costs are made up of two components, one associated with the source and
    one with the destination. The costs of using a route are called shadow costs.
    (See example 5 for how to work out shadow costs.)
10 The improvement index of a route is the reduction in cost which would be made by
   sending one unit along that route.
   Improvement index for route PQ  IPQ  C(PQ)  S(P)  D(Q) (see example 7).
11 The stepping-stone method is used to find an improved solution (see example 9).
31