Or2016 s07 Transportation Problem Pt1 Handout

download Or2016 s07 Transportation Problem Pt1 Handout

of 26

Transcript of Or2016 s07 Transportation Problem Pt1 Handout

  • 8/15/2019 Or2016 s07 Transportation Problem Pt1 Handout

    1/26

  • 8/15/2019 Or2016 s07 Transportation Problem Pt1 Handout

    2/26

    Outline Introduction Linear Programming Model References

    Outline

    Outline

    IntroductionThe Transportation ProblemIllustration: The Foster Generators Problem

    Linear Programming ModelLP Model for Foster Generators Transportation ProblemComputer Solution

    References

    IFC6503C PSTI UNSRAT

  • 8/15/2019 Or2016 s07 Transportation Problem Pt1 Handout

    3/26

    Outline Introduction Linear Programming Model References

    Acknowledgement

    The explanation about transportation problemand the Foster Generators example are adapted

    from [1].

    IFC6503C PSTI UNSRAT

  • 8/15/2019 Or2016 s07 Transportation Problem Pt1 Handout

    4/26

    Outline Introduction Linear Programming Model References

    The Transportation Problem

    Introduction

    Transportation problem belongs to a special class of linearprogramming called Network Flow problems.

    The transportation problem arises frequently in planning forthe distribution of goods and services from several supplylocations to several demand locations.

    Typically the goods quantity at each supply location (origin )is limited, and the quantity of goods needed at each of several

    locations (destinations ) is known. The common objective in transportation problem is tominimize the cost of shipping (transporting) goods from theorigin to the destinations.

    IFC6503C PSTI UNSRAT

  • 8/15/2019 Or2016 s07 Transportation Problem Pt1 Handout

    5/26

    Outline Introduction Linear Programming Model References

    Illustration

    IllustrationThe Foster Generators Problem

    Foster Generators is a generator manufacturer. It has three plants, and four distribution centers. It operates plants in Cleveland, Ohio; Bedford, Indiana; and

    York, Pennsylvania. Production capacities over the next three-month planningperiod for one particular type of generator are as follows:

    Table 1 : Production capacities for next three-month period.

    Origin Plant Prod. Capacity (units)1 Cleveland 5,0002 Bedford 6,0003 York 2,500

    Total: 13,500

    IFC6503C PSTI UNSRAT

  • 8/15/2019 Or2016 s07 Transportation Problem Pt1 Handout

    6/26

    Outline Introduction Linear Programming Model References

    Illustration

    IllustrationThe Foster Generators Problem

    The rm distributes its generators through four regionaldistribution centers located in Boston, Chicago, St. Louis, andLexington.

    The three-month forecast of demand for the distributioncenters is as follows:Table 2 : Production capacities for next three-month period.

    Destination Distribution Demand Forecast

    Center (units)1 Boston 6,0002 Chicago 4,0003 St. Louis 2,0004 Lexington 1,500

    Total: 13,500

    IFC6503C PSTI UNSRAT

  • 8/15/2019 Or2016 s07 Transportation Problem Pt1 Handout

    7/26

    O tli I t d ti Li P i M d l R f

  • 8/15/2019 Or2016 s07 Transportation Problem Pt1 Handout

    8/26

    Outline Introduction Linear Programming Model References

    Illustration

    IllustrationThe Foster Generators Problem

    5000 1Cleveland

    6000 2Bedford

    2500 3

    York

    1Boston

    2Chicago

    3St. Louis

    4Lexington

    6000

    2500

    1500

    4000

    3

    27

    6

    75

    23

    2

    54

    5

    Supplies Distribution Routes(arcs)

    Demands

    Figure 1 : Network Representation

    IFC6503C PSTI UNSRAT

    Outline Introduction Linear Programming Model References

  • 8/15/2019 Or2016 s07 Transportation Problem Pt1 Handout

    9/26

    Outline Introduction Linear Programming Model References

    Illustration

    IllustrationThe Foster Generators Problem

    The circles are referred to as nodes . The lines connecting the nodes are arcs .

    Each origin and destination is represented by a node, and eachpossible shipping route represented by an arc. The amount of supply is written next to each destinationnode, and the amount of demand is written next to eachdestination node.

    The goods shipped from the origins to destinations representthe ow in the network, the direction indicated by the arrows.

    The cost for each unit shipped on each route is shown inTable 3.

    IFC6503C PSTI UNSRAT

    Outline Introduction Linear Programming Model References

  • 8/15/2019 Or2016 s07 Transportation Problem Pt1 Handout

    10/26

    Outline Introduction Linear Programming Model References

    Illustration

    IllustrationThe Foster Generators Problem

    Table 3 : Transportation cost per unit.

    DestinationOrigin Boston Chicago St. Louis Lexington

    Cleveland 3 2 7 6Bedford 7 5 2 3

    York 2 5 4 5

    IFC6503C PSTI UNSRAT

    Outline Introduction Linear Programming Model References

  • 8/15/2019 Or2016 s07 Transportation Problem Pt1 Handout

    11/26

    Outline Introduction Linear Programming Model References

    Illustration

    IllustrationThe Foster Generators Problem

    A linear programming model can be used to solve thistransportation problem.

    We use double-subscripted variables as the decision variables.For m origins and n destinations the decision variables arewritten asx ij = number of units shipped from origin i to destination j ,where i = 1 , 2, . . . , m and j = 1 , 2, . . . , n

    Example: x11 is the number of units shipped from origin 1(Cleveland) to destination 1 (Boston).Example: x12 is the number of units shipped from origin 1(Cleveland) to destination 2 (Chicago).

    IFC6503C PSTI UNSRAT

    Outline Introduction Linear Programming Model References

  • 8/15/2019 Or2016 s07 Transportation Problem Pt1 Handout

    12/26

    Outline Introduction Linear Programming Model References

    Illustration

    IllustrationThe Foster Generators Problem

    Remember that the objective of the transportation problems isto minimize the total transportation cost

    Therefore we can use the cost data in Table 3Transportation costs for units shipped from Cleveland =3x 11 + 2 x 12 + 7 x 13 + 6 x 14Transportation costs for units shipped from Bedford =7x 21 + 5 x 22 + 2 x 23 + 3 x 24Transportation costs for units shipped from York =2x 31 + 5 x 32 + 4 x 33 + 5 x 34

    The sum of these expressions provides the objective functionshowing the total transportation cost for Foster Generators.

    3x 11 +2 x 12 +7 x 13 +6 x 14 +7 x 21 +5 x 22 +2 x 23 +3 x 24 +2 x 31 +5 x 32 +4 x 33 +5 x 34

    IFC6503C PSTI UNSRAT

    Outline Introduction Linear Programming Model References

  • 8/15/2019 Or2016 s07 Transportation Problem Pt1 Handout

    13/26

    g g

    Illustration

    IllustrationThe Foster Generators Problem

    Transportation problems need constraints because each originhas a limited supply and each destination has a demandrequirement.

    With three origins (plants), the Foster transportation problemhas three supply constraints.

    The supply constraints are:x 11 + x 12 + x 13 + x 14 ≤ 5, 000 Cleveland supply.x 21 + x 22 + x 23 + x 24 ≤ 6, 000 Bedford supply.x 31 + x 32 + x 33 + x 34 ≤ 2, 500 York supply.

    IFC6503C PSTI UNSRAT

    Outline Introduction Linear Programming Model References

  • 8/15/2019 Or2016 s07 Transportation Problem Pt1 Handout

    14/26

    g g

    Illustration

    IllustrationThe Foster Generators Problem

    With four distribution centers (destinations), four demandconstraints are needed.

    The demand constraints are:x 11 + x 21 + x 31 = 6 , 000 Boston demand.x 12 + x 22 + x 32 = 4 , 000 Chicago demand.x 13 + x 23 + x 33 = 2 , 000 St. Louis demand.x 14 + x 24 + x 34 = 1 , 500 Lexington demand.

    IFC6503C PSTI UNSRAT

    Outline Introduction Linear Programming Model References

  • 8/15/2019 Or2016 s07 Transportation Problem Pt1 Handout

    15/26

    Illustration

    IllustrationThe Foster Generators Problem

    Min.

    3x 11 +2 x 12 +7 x 13 +6 x 14 +7 x 21 +5 x 22 +2 x 23 +3 x 24 +2 x 31 +5 x 32 +4 x 33 +5 x 34

    s.tx 11 + x 12 + x 13 + x 14 ≤ 5, 000

    x 21 + x 22 + x 23 + x 24 ≤ 6, 000

    x 31 + x 32 + x 33 + x 34 ≤ 2, 500

    x 11 + x 21 + x 31 = 6 , 000x 12 + x 22 + x 32 = 4 , 000

    x 13 + x 23 + x 33 = 2 , 000

    x 14 + x 24 + x 34 = 1 , 500

    x ij ≥ 0 for i = 1 , 2, 3 and j = 1 , 2, 3, 4IFC6503C PSTI UNSRAT

    Outline Introduction Linear Programming Model References

  • 8/15/2019 Or2016 s07 Transportation Problem Pt1 Handout

    16/26

    Illustration

    Transportation ProblemA General Linear Programming Model

    Minimizem

    i =1

    n

    j =1

    cij x ij

    subject ton

    j =1

    x ij ≤ s i i = 1 , 2, . . . , m Supply

    m

    i =1

    x ij = d j i = 1 , 2, . . . , n Demmand

    x ij ≥ 0 for all i and j

    IFC6503C PSTI UNSRAT

    Outline Introduction Linear Programming Model References

  • 8/15/2019 Or2016 s07 Transportation Problem Pt1 Handout

    17/26

    Computer Solution

    Computer Solution

    There are several known methods to solve transportation.

    The rst, and the easiest solution is by using computersoftware. Since we can express transportation problem in linearprogramming model, therefore we can use GLPK to solve it.

    Start with extracting the coefficients and write them in amatrix.

    IFC6503C PSTI UNSRAT

    Outline Introduction Linear Programming Model References

  • 8/15/2019 Or2016 s07 Transportation Problem Pt1 Handout

    18/26

    Computer Solution

    The Foster Generators ProblemSystem of Equations

    Min.

    3x 11 +2 x 12 +7 x 13 +6 x 14 +7 x 21 +5 x 22 +2 x 23 +3 x 24 +2 x 31 +5 x 32 +4 x 33 +5 x 34

    s.t

    x 11 + x 12 + x 13 + x 14 ≤ 5, 000

    x 21 + x 22 + x 23 + x 24 ≤ 6, 000

    x 31 + x 32 + x 33 + x 34 ≤ 2, 500

    x 11 + x 21 + x 31 = 6 , 000

    x 12 + x 22 + x 32 = 4 , 000

    x 13 + x 23 + x 33 = 2 , 000

    x 14 + x 24 + x 34 = 1 , 500

    x ij ≥

    0 for i = 1 , 2, 3 and j = 1 , 2, 3, 4IFC6503C PSTI UNSRAT

    Outline Introduction Linear Programming Model References

  • 8/15/2019 Or2016 s07 Transportation Problem Pt1 Handout

    19/26

    Computer Solution

    Constraints in Tabular Form

    Table 4 : Foster Generators transportation problem constraints coefficients.

    x 11 x12 x13 x 14 x 21 x22 x23 x24 x 31 x32 x33 x341 1 1 1 0 0 0 0 0 0 0 00 0 0 0 1 1 1 1 0 0 0 00 0 0 0 0 0 0 0 1 1 1 11 0 0 0 1 0 0 0 1 0 0 00 1 0 0 0 1 0 0 0 1 0 00 0 1 0 0 0 1 0 0 0 1 00 0 0 1 0 0 0 1 0 0 0 1

    IFC6503C PSTI UNSRAT

    Outline Introduction Linear Programming Model References

  • 8/15/2019 Or2016 s07 Transportation Problem Pt1 Handout

    20/26

    Computer Solution

    Assigning Variables

    Assign the coeffients of the constraints to a matrix. mat

  • 8/15/2019 Or2016 s07 Transportation Problem Pt1 Handout

    21/26

    Computer Solution

    Assigning Variablesx 11 x 12 x 13 x 14 x 21 x 22 x 23 x 24 x 31 x 32 x 33 x 34

    1 1 1 1 0 0 0 0 0 0 0 00 0 0 0 1 1 1 1 0 0 0 00 0 0 0 0 0 0 0 1 1 1 11 0 0 0 1 0 0 0 1 0 0 00 1 0 0 0 1 0 0 0 1 0 00 0 1 0 0 0 1 0 0 0 1 00 0 0 1 0 0 0 1 0 0 0 1

    mat

    ## [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12]## [1,] 1 1 1 1 0 0 0 0 0 0 0 0

    ## [2,] 0 0 0 0 1 1 1 1 0 0 0 0## [3,] 0 0 0 0 0 0 0 0 1 1 1 1## [4,] 1 0 0 0 1 0 0 0 1 0 0 0## [5,] 0 1 0 0 0 1 0 0 0 1 0 0## [6,] 0 0 1 0 0 0 1 0 0 0 1 0## [7,] 0 0 0 1 0 0 0 1 0 0 0 1

    IFC6503C PSTI UNSRAT

    Outline Introduction Linear Programming Model References

  • 8/15/2019 Or2016 s07 Transportation Problem Pt1 Handout

    22/26

    Computer Solution

    Assigning Variables

    Assign the right side values to a variable.

    rhs

  • 8/15/2019 Or2016 s07 Transportation Problem Pt1 Handout

    23/26

    Solving LP using Rglpk

    Do not forget to load the Rglpk package before usingRglpk solve LP() .

    library (Rglpk)

    ## Loading required package: slam ## Using the GLPK callable library version 4.52

    Rglpk_solve_LP ( obj =obj, mat =mat, dir =dir, rhs =rhs, max = F)

    ## $optimum## [1] 39500#### $solution## [1] 3500 1500 0 0 0 2500 2000 1500 2500 0 0## [12] 0#### $status## [1] 0

    Outline Introduction Linear Programming Model References

  • 8/15/2019 Or2016 s07 Transportation Problem Pt1 Handout

    24/26

    Computer Solution

    ConclusionThe Optimal Solution

    Based on the results of the software calculation, the optimalsolution to the Foster Generators transportation problem is as shonin Table 5.

    IFC6503C PSTI UNSRAT

    Outline Introduction Linear Programming Model References

  • 8/15/2019 Or2016 s07 Transportation Problem Pt1 Handout

    25/26

    Computer Solution

    ConclusionThe Optimal Solution

    Table 5 : Optimal solution of Foster Generators transportation problem.

    Variable 1 From To UnitsShipped Costper Unit ($) Total Cost($)x 11 Cleveland Boston 3500 3 10,500x 12 Cleveland Chicago 1500 2 3,000x 22 Bedford Chicago 2500 5 12,500x 23 Bedford St. Louis 2000 2 4,000x 24 Bedford Lexington 1500 3 4,500x 31 York Boston 2500 2 5,000

    Total 39,500

    1 Actually, the Variable column is not a part of the solution. It is added only

    to ease the comparison with the linear model.IFC6503C PSTI UNSRAT

    Outline Introduction Linear Programming Model References

  • 8/15/2019 Or2016 s07 Transportation Problem Pt1 Handout

    26/26

    References I

    [1] D. R. Anderson, D. J. Sweeney, T. A. Williams, J. D. Camm, andK. Martin, An Introduction to Management Science: Quantitative Approaches to Decision Making , revised 13th ed. OH:South-Western/Cengage Learning, 2012.

    IFC6503C PSTI UNSRAT