Transportation and Network Flow Problems by wulinqing

VIEWS: 24 PAGES: 32

									    Transportation
          and
    Network Flow
       Problems
From Linear & Nonlinear Programming ch.5
          Presented by Wei Shiou
          Information Management Dept.
            National Taiwan University
                   2002.11.7
             Introduction
   Part A
     The Transportation Problem
     The Assignment Problem

   Part B
     Minimum Cost Flow
     Maximal Flow
問題描述
 There are m origins that contain
  various amounts of a commodity
  that must be shipped to n
  destinations to meet demand
  requirements
 It is assumed that the system is
  balanced    m       n

              ai   bj
             i 1   j 1
For Example
   A specific transportation problem
    with four origins and five
    destinations is defined by
    a    30,80,10,60
    b    10,50,20,80,20 
        3   4 6 8 9
        2   2 4 5 5
    C             
        2   2 2 3 2
                   
        3   3 2 4 2
 Standard Form
x11  x12  ....x1n                                                                   a1
                         x 21  x 22  ....x 2 n                                      a2
         ..........
..........                 ..........
                  ..........        ..........
                                             ..........
                                                      ..........        ..........
                                                               ..........                 ..
                                                                                 ..........
                                                           x m1  x m 2  ....x mn  a m

x11      x 21        x m1      b1
       x12                     x 21                               x m1               b2
         ..........
..........                 ..........
                  ..........        ..........
                                             ..........
                                                      ..........        ..........
                                                               ..........                 ..
                                                                                 ..........
                 x1n                     x2n                                x mn  bn
可行解
 We can let xij = aibj / S
  for i=1 to m and j=1 to n then it is
  clearly a feasible solution
 相當於將supply依照比例分配給每個
  destination
必然存在可行解!?
   Theorem.
   A transportation problem always has a
    solution , but there is exactly one
    redundant equality constraint . When any
    one of the equality constraints is dropped ,
    the remaining system of n+m-1 equality
    constraints is linearly independent .
   完整證明於 page.120
Simplex Method的應用
   Step 1
     用西北角法找出 initial basic feasible solution
   Step 2
     計算 simplex multipliers and the relative cost
      coefficients , if all relative cost coefficients are
      nonnegative then stop. otherwise, go to
      Step.3
   Step 3
     選擇一個nonbasic variable corresponding to
      enter the basis。Compute the cycle of change
      and update the solution. Go to Step.2
   請參照page.130
The Northwest Corner Rule
   Solution array:

      10   20                  30
           30   20   30        80
                     10        10
                     40   20   60
      10   50   20   80   20
The Northwest Corner Rule
   Step 1
     Start with the cell in the upper left-hand corner
   Step 2
     Allocate the maximum feasible amount
       consistent with row and column sum
       requirements involving that cell
   Step 3
     Move one cell to the right if there is any
       remaining row requirement. Otherwise move
       one cell down till the end.
名詞定義
   A nonsingular square matrix M is said to
    be triangular if by a permutation of its
    rows and columns it can be put in the
    form of a lower triangular matrix
   判斷 M 是否 triangular 的過程叫做 back
    substitution, 可參照page.123
Basis Triangularity
   Basis Triangularity Theorem:
     Every basis of the transportation
      problem is triangular. 完整證明於
      page.124
   Corollary:
     If the row and column sums of a
      transportation problem are integers,
      then the basic variables in any basic
      solution are integers.
Simplex Multipliers
   We partition the vector of
    multipliers as   (u, v)
    Where ui represents the multiplier
     associated with the ith row sum
     constraint
    and vj represents the multiplier
     associated with the jth column sum
     constraint
Simplex Multipliers
   In transportation problem, the
    relative cost coefficients are
        rij  cij  ui  v j   for i  1,2,....,m
                                  j  1,2,....,n
   任意給定一個multiplier值,可算出所有其他值,
    由此計算rij,找出下一個enter variable
Cycle of Change
   Corollary:
    If the unit costs cij of a transportation problem
      are all integers, then the simplex multipliers
      associated with iany mbasis are integers
                         1,2,....,


   Theorem:
    Let B be a basis from A (ignoring one row), and
      let d be another column. Then the
      components of the vector y=B-1d are either
      0,+1,-1
Cycle of Change
   From the Theorem mentioned before, we
    know that if a new enter variable has a
    value S, then S is equal to the value
    subtracted from the old basic variable
   We will set S equal to the smallest
    magnitude of these basic variables in the
    stepping-stone path
     Example
    如page.131

3    4    6   8   9      5   10 20                30
2    2    4   5   5      3      30 20 30          80
2    2    2   3   2      1            10          10
3    3    2   4   2      2          + 40 20       60
-2   -1   1   2   0          10 50 20 80 20
     Coefficient array        Transportation tableau
Degeneracy
   In a transportation tableau with m
    rows and n columns, there must be
    m+n-1 cells with allocations;
    otherwise, it is degenerate.
   必須引入特殊符號來代替basic variable的
    「零」,否則可能找不到stepping-stone path
The Assignment Problem
   問題描述:
    Assigning n workers to n jobs, there is a
     benefit(or cost) for each assignment. Each
     worker must be assigned to exactly one job
     and each job must have one assigned worker
   General formulation:
                   n            n

    Minimize   c x
                   j 1    i 1
                                    ij   ij

                     n
    Subject to  x  1 for i  1 to
                           ij                   n
                    j 1
                     n

                   x
                    i 1
                           ij    1 for j  1 to n

                  xij  0 for i  1 to n , j  1 to n
Minimum Cost Flow
問題描述: (以下簡稱MCF)
 Consider a network having n nodes.
  Corresponding to each node I, there is a number
  bi representing the available supply at the
  node(using bi<0 to represent a required
  demand)
 To determine flows xij>=0 in each arc of the
  network so that the net flow into each node I is
  bi while minimizing the total cost
 Still assume that the net work is balanced
Problem Structure (MCF)
                    n         n

Minimize       c
                 j 1        i 1
                                          ij   x ij


                n              n

Subject to     x x
                j 1
                        ij
                              k 1
                                     ki    bi for i  1 to n

               xij  0 for i  1 to n , j  1 to n
   The transportation problem is a special
    case of this problem!
   The more general problem is often
    termed the transshipment problem
Simplex Method (MCF)
   Step 1
     Start with a given basic feasible solution
   Step 2
     Compute simplex multipliers and relative cost
       coefficients. If all rij are nonnegative, stop;
       Otherwise, go Step 3
   Step 3
     Select a nonbasic flow with negative relative
       cost coefficient to enter the basis. And move
       out the flow from the cycle, go Step 2
Maximal Flow
   問題描述: (以下簡稱MF)
    To determine the maximal flow possible
      from one given source node to a sink
      node under arc capacity constraints.
   Reachable
    自行參考page.141或Ford-Fulkerson’s Algorithm
Capacitated Networks
   A capacitated network is a network in
    which some arcs are assigned
    nonnegative capacities
   The capacities of an arc(I,j) is denoted kij
    and this capacity is indicated on the
    graph by placing the number kij adjacent
    to the arc
General Form (MF)
 maxinize            f
                n                    n
 subject to   x
               j 1
                          1j     x j1  f  0
                                     j 1
              n                  n

            xj 1
                         ij     x ji
                                 j 1
                                                   0     i  1, m

              n                    n

            xj 1
                         mj      x jm  f  0
                                  j 1

                         i, j           0  xij  k ij
Min Cut Theorem
 In a network the maximal flow
  between a source and a sink is equal
  to the minimal cut capacity of all
  cuts separating the source and sink
 The capacity of the cut is the sum
  of the capacities of the arcs in the
  cut
 證明於page.147
Primal-Dual Algorithm
                  n             n

Minimize     c
               j 1            i 1
                                                 ij       x ij

              n                  n


Subject to x x
             j 1
                      ij
                                k 1
                                            ki        bi for i  1 to n

             xij  0 for i  1 to n , j  1 to n


             m                       n

Maximize     u a  v b
                      i    i                     j    j
             i 1                    j 1




Subject to   ui + vj <= cij
Primal-Dual Algorithm
                       m                 n
minimize          yi 1
                                 i   zj
                                        j 1
                  n
subject to      x
                 j1
                            ij        y i  ai   i  1 to m

                m

                x
                i 1
                           ij     zi  b j       j  1 to n

for all i , j   xij  0 y i  0 z j  0
for i , j  S xij  0
Primal-Dual Algorithm (MF)
              m         n

   Since  y i        z in any solution
                              j
          i 1         j 1




   Alternatively, the problem can be
    cast as a maximal flow problem. The
    objective can be rewritten as
          m          n       n
                                         m
                                               
             ai   xij     b j   xij 
                           
         i 1       j 1   j 1       i 1  
Dual Feasible Solution
   With Primal-Dual Algorithm , it is
    unnecessary to construct the network
    explicitly!
Hungarian’s Method
This is The End
 Thank You All

								
To top