Transportation Models
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

Transportation Models

on

  • 8,223 views

 

Statistics

Views

Total Views
8,223
Views on SlideShare
5,465
Embed Views
2,758

Actions

Likes
1
Downloads
220
Comments
0

6 Embeds 2,758

http://www1.uprh.edu 1818
http://www.uprh.edu 934
http://www.slideshare.net 3
http://www.google.com.mx 1
http://webcache.googleusercontent.com 1
http://translate.googleusercontent.com 1

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Transportation Models Presentation Transcript

  • 1. Operations Research Modeling Toolset Linear Programming Network Programming PERT/ CPM Dynamic Programming Integer Programming Nonlinear Programming Game Theory Decision Analysis Markov Chains Queueing Theory Inventory Theory Forecasting Markov Decision Processes Simulation Stochastic Programming
  • 2. Network Problems
    • Linear programming has a wide variety of applications
    • Network problems
      • Special types of linear programs
      • Particular structure involving networks
    • Ultimately, a network problem can be represented as a linear programming model
    • However the resulting A matrix is very sparse , and involves only zeroes and ones
    • This structure of the A matrix led to the development of specialized algorithms to solve network problems
  • 3. Types of Network Problems
    • Shortest Path
      • Special case: Project Management with PERT/CPM
    • Minimum Spanning Tree
    • Maximum Flow/Minimum Cut
    • Minimum Cost Flow
      • Special case: Transportation and Assignment Problems
    • Set Covering/Partitioning
    • Traveling Salesperson
    • Facility Location
    • and many more
  • 4. The Transportation Problem
  • 5. The Transportation Problem
    • The problem of finding the minimum-cost distribution of a given commodity from a group of supply centers ( sources ) i=1,…,m to a group of receiving centers ( destinations ) j=1,…,n
    • Each source has a certain supply (s i )
    • Each destination has a certain demand (d j )
    • The cost of shipping from a source to a destination is directly proportional to the number of units shipped
  • 6. Simple Network Representation 1 2 m 1 2 n Sources Destinations … … Supply s 1 Supply s 2 Supply s m Demand d 1 Demand d 2 Demand d n x ij Costs c ij
  • 7. Example: P&T Co.
    • Produces canned peas at three canneries
      • Bellingham, WA, Eugene, OR, and Albert Lea, MN
    • Ships by truck to four warehouses
      • Sacramento, CA, Salt Lake City, UT, Rapid City, SD, and Albuquerque, NM
    • Estimates of shipping costs, production capacities and demands for the upcoming season is given
    • The management needs to make a plan on the least costly shipments to meet demand
  • 8. Example: P&T Co. Map 1 2 3 1 2 3 4
  • 9. Example: P&T Co. Data Shipping cost per truckload 85 70 65 80 Demand (Truckloads) 100 $ 685 $ 388 $ 682 $ 995 3 125 $ 791 $ 690 $ 216 $ 352 2 75 $ 867 $ 654 $ 513 $ 464 1 Supply (Truckloads) 4 3 2 1 Cannery Warehouse
  • 10. Example: P&T Co.
    • Network representation
  • 11. Example: P&T Co.
    • Linear programming formulation
    • Let x ij denote…
    • Minimize
    • subject to
  • 12. General LP Formulation for Transportation Problems
  • 13. Feasible Solutions
    • A transportation problem will have feasible solutions if and only if
    • How to deal with cases when the equation doesn’t hold?
  • 14. Integer Solutions Property: Unimodularity
    • Unimodularity relates to the properties of the A matrix (determinants of the submatrices, beyond scope)
    • Transportation problems are unimodular, so we get the integers solutions property:
    • For transportation problems, when every s i and d j have an integer value, every BFS is integer valued.
    • Most network problems also have this property.
  • 15. Transportation Simplex Method
    • Since any transportation problem can be formulated as an LP, we can use the simplex method to find an optimal solution
    • Because of the special structure of a transportation LP, the iterations of the simplex method have a very special form
    • The transportation simplex method is nothing but the original simplex method, but it streamlines the iterations given this special form
  • 16. Transportation Simplex Method Initialization (Find initial CPF solution) Is the current CPF solution optimal? Move to a better adjacent CPF solution Stop No Yes
  • 17. The Transportation Simplex Tableau v j Z = d n … d 2 d 1 Demand s m c mn … c m2 c m1 m … … … … … … s 2 c 2n … c 22 c 21 2 s 1 c 1n … c 12 c 11 1 n … 2 1 Source u i Supply Destination
  • 18. Prototype Problem
    • Holiday shipments of iPods to distribution centers
    • Production at 3 facilities,
      • A, supply 200k
      • B, supply 350k
      • C, supply 150k
    • Distribute to 4 centers,
      • N, demand 100k
      • S, demand 140k
      • E, demand 300k
      • W, demand 250k
    • Total demand vs. total supply
  • 19. Prototype Problem W 90 0 0 0 0 Dummy 250 10 15 17 v j Z = 300 140 100 Demand 150 23 20 9 C 350 19 13 14 B 200 22 13 16 A E S N Source u i Supply Destination
  • 20. Finding an Initial BFS
    • The transportation simplex starts with an initial basic feasible solution (as does regular simplex)
    • There are alternative ways to find an initial BFS, most common are
      • The Northwest corner rule
      • Vogel’s method
      • Russell’s method (beyond scope)
  • 21. The Northwest Corner Rule
    • Begin by selecting x 11 , let x 11 = min{ s 1 , d 1 }
    • Thereafter, if x ij was the last basic variable selected,
      • Select x i(j+1) if source i has any supply left
      • Otherwise, select x (i+1)j
  • 22. The Northwest Corner Rule Z = 10770 W 90 90 0 0 0 0 Dummy 250 10 15 17 150 10 300 140 100 Demand 150 23 20 9 C 300 40 350 19 13 14 B 100 100 200 22 13 16 A E S N Source Supply Destination
  • 23. Vogel’s Method
    • For each row and column, calculate its difference :
      • = (Second smallest c ij in row/col) - (Smallest c ij in row/col)
    • For the row/col with the largest difference, select entry with minimum c ij as basic
    • Eliminate any row/col with no supply/demand left from further steps
    • Repeat until BFS found
  • 24. Vogel’s Method (1): calculate differences W 0 90 0 0 0 0 Dummy 10 250 10 15 17 19 13 9 diff 300 140 100 Demand 1 150 23 20 9 C 1 350 19 13 14 B 3 200 22 13 16 A E S N Source diff Supply Destination
  • 25. Vogel’s Method (2): select x DummyE as basic variable 90 W 0 90 0 0 0 0 Dummy 10 250 10 15 17 19 13 9 diff 300 140 100 Demand 1 150 23 20 9 C 1 350 19 13 14 B 3 200 22 13 16 A E S N Source diff Supply Destination
  • 26. Vogel’s Method (3): update supply, demand and differences 90 W --- --- 0 0 0 0 Dummy 5 250 10 15 17 3 0 5 diff 210 140 100 Demand 1 150 23 20 9 C 1 350 19 13 14 B 3 200 22 13 16 A E S N Source diff Supply Destination
  • 27. Vogel’s Method (4): select x CN as basic variable 90 100 W --- --- 0 0 0 0 Dummy 5 250 10 15 17 3 0 5 diff 210 140 100 Demand 1 150 23 20 9 C 1 350 19 13 14 B 3 200 22 13 16 A E S N Source diff Supply Destination
  • 28. Vogel’s Method (5): update supply, demand and differences 90 100 W --- --- 0 0 0 0 Dummy 5 250 10 15 17 3 0 --- diff 210 140 --- Demand 10 50 23 20 9 C 2 350 19 13 14 B 4 200 22 13 16 A E S N Source diff Supply Destination
  • 29. Vogel’s Method (6): select x CW as basic variable 90 100 50 W --- --- 0 0 0 0 Dummy 5 250 10 15 17 3 0 --- diff 210 140 --- Demand 10 50 23 20 9 C 2 350 19 13 14 B 4 200 22 13 16 A E S N Source diff Supply Destination
  • 30. Vogel’s Method (7): update supply, demand and differences 90 100 50 W --- --- 0 0 0 0 Dummy 2 200 10 15 17 3 0 --- diff 210 140 --- Demand --- --- 23 20 9 C 2 350 19 13 14 B 4 200 22 13 16 A E S N Source diff Supply Destination
  • 31. Vogel’s Method (8): select x AS as basic variable 90 100 50 140 W --- --- 0 0 0 0 Dummy 2 200 10 15 17 3 0 --- diff 210 140 --- Demand --- --- 23 20 9 C 2 350 19 13 14 B 4 200 22 13 16 A E S N Source diff Supply Destination
  • 32. Vogel’s Method (9): update supply, demand and differences 90 100 50 140 W --- --- 0 0 0 0 Dummy 2 200 10 15 17 3 --- --- diff 210 --- --- Demand --- --- 23 20 9 C 4 350 19 13 14 B 5 60 22 13 16 A E S N Source diff Supply Destination
  • 33. Vogel’s Method (10): select x AW as basic variable 90 100 50 140 60 W --- --- 0 0 0 0 Dummy 2 200 10 15 17 3 --- --- diff 210 --- --- Demand --- --- 23 20 9 C 4 350 19 13 14 B 5 60 22 13 16 A E S N Source diff Supply Destination
  • 34. Vogel’s Method (11): update supply, demand and differences 90 100 50 140 60 W --- --- 0 0 0 0 Dummy 140 10 15 17 --- --- diff 210 --- --- Demand --- --- 23 20 9 C 4 350 19 13 14 B --- --- 22 13 16 A E S N Source diff Supply Destination
  • 35. Vogel’s Method (12): select x BW and x BE as basic variables 90 100 50 140 60 140 210 Z = 10330 W --- --- 0 0 0 0 Dummy --- 10 15 17 --- --- diff --- --- --- Demand --- --- 23 20 9 C --- 19 13 14 B --- --- 22 13 16 A E S N Source diff Supply Destination
  • 36. Optimality Test
    • In the regular simplex method, we needed to check the row-0 coefficients of each nonbasic variable to check optimality and we have an optimal solution if all are  0
    • There is an efficient way to find these row-0 coefficients for a given BFS to a transportation problem:
      • Given the basic variables, calculate values of dual variables
        • u i associated with each source
        • v j associated with each destination
      • using c ij – u i – v j = 0 for x ij basic, or u i + v j = c ij
      • (let u i = 0 for row i with the largest number of basic variables)
      • Row-0 coefficients can be found from c ’ ij =c ij -u i -v j for x ij nonbasic
  • 37. Optimality Test (1) 90 140 100 60 140 210 50 W 90 0 0 0 0 Dummy 250 10 15 17 v j 300 140 100 Demand 150 23 20 9 C 350 19 13 14 B 200 22 13 16 A E S N Source u i Supply Destination
  • 38. Optimality Test (2)
    • Calculate u i , v j using c ij – u i – v j = 0 for x ij basic
    • (let u i = 0 for row i with the largest number of basic variables)
    90 140 100 60 140 210 50 W -21 90 0 0 0 0 Dummy 17 250 10 15 17 21 13 16 v j 300 140 100 Demand -7 150 23 20 9 C -2 350 19 13 14 B 0 200 22 13 16 A E S N Source u i Supply Destination
  • 39. Optimality Test (3)
    • Calculate c ’ ij =c ij -u i -v j for x ij nonbasic
    90 140 100 60 140 210 50 W 4 8 5 -21 90 0 0 0 0 Dummy 17 250 10 15 17 21 13 16 v j 300 140 100 Demand 9 14 -7 150 23 20 9 C 2 0 -2 350 19 13 14 B 1 0 0 200 22 13 16 A E S N Source u i Supply Destination
  • 40. Optimal Solution A B C N S W Sources Destinations Supply = 200 Supply = 350 Supply = 150 Demand = 100 Demand = 140 Demand = 250 E Demand = 300 (shortage of 90) 60 140 210 140 50 100 Cost Z = 10330
  • 41. An Iteration
    • Find the entering basic variable
      • Select the variable with the largest negative c ’ ij
    • Find the leaving basic variable
      • Determine the chain reaction that would result from increasing the value of the entering variable from zero
      • The leaving variable will be the first variable to reach zero because of this chain reaction
  • 42. Initial Solution Obtained by the Northwest Corner Rule 100 150 10 300 40 100 90 W - 4 2 - 1 -15 90 0 0 0 0 Dummy 15 250 10 15 17 2 19 13 16 v j 300 140 100 Demand 9 12 - 2 -5 150 23 20 9 C - 2 0 350 19 13 14 B 3 0 200 22 13 16 A E S N Source u i Supply Destination
  • 43. Iteration 1 W -15 90 0 0 0 0 Dummy 15 250 10 15 17 19 13 16 v j 300 140 100 Demand -5 150 23 20 9 C 0 350 19 13 14 B 0 200 22 13 16 A E S N Source u i Supply Destination 100 150 10 300 40 100 90 ? + - + -
  • 44. End of Iteration 1 100 150 100 210 40 100 90 W 90 0 0 0 0 Dummy 250 10 15 17 v j 300 140 100 Demand 150 23 20 9 C 350 19 13 14 B 200 22 13 16 A E S N Source u i Supply Destination
  • 45. Optimality Test 100 150 100 210 40 100 90 W 4 6 3 -19 90 0 0 0 0 Dummy 15 250 10 15 17 2 19 13 16 v j 300 140 100 Demand 9 12 - 2 -5 150 23 20 9 C - 2 0 350 19 13 14 B 3 0 200 22 13 16 A E S N Source u i Supply Destination
  • 46. Iteration 2 100 150 100 210 40 100 90 ? + - + - W -19 90 0 0 0 0 Dummy 15 250 10 15 17 19 13 16 v j 300 140 100 Demand -5 150 23 20 9 C 0 350 19 13 14 B 0 200 22 13 16 A E S N Source u i Supply Destination
  • 47. End of Iteration 2 60 150 100 210 140 90 40 W 90 0 0 0 0 Dummy 250 10 15 17 v j 300 140 100 Demand 150 23 20 9 C 350 19 13 14 B 200 22 13 16 A E S N Source u i Supply Destination
  • 48. Optimality Test 60 150 100 210 140 90 40 Z = 10330 W 4 8 5 -19 90 0 0 0 0 Dummy 15 250 10 15 17 0 19 11 14 v j 300 140 100 Demand 9 14 0 -5 150 23 20 9 C 2 0 350 19 13 14 B 1 2 200 22 13 16 A E S N Source u i Supply Destination
  • 49. Optimal Solution A B C N S W Sources Destinations Supply = 200 Supply = 350 Supply = 150 E 60 140 40 100 150 210 Demand = 100 Demand = 140 Demand = 250 Demand = 300 (shortage of 90) Cost Z = 10330
  • 50. The Assignment Problem
    • The problem of finding the minimum-costly assignment of a set of tasks (i=1,…,m) to a set of agents (j=1,…,n)
    • Each task should be performed by one agent
    • Each agent should perform one task
    • A cost c ij associated with each assignment
    • We should have m=n (if not…?)
    • A special type of linear programming problem, and
    • A special type of transportation problem, with s i =d j = ?
  • 51. Prototype Problem
    • Assign students to mentors
    • Each assignment has a ‘mismatch’ index
    • Minimize mismatches
    1 1 1 Demand 1 4 4 2 Goyle 1 5 4 1 Draco 1 3 2 5 Harry Lupin McGonagall Snape Student Supply Mentor
  • 52. Prototype Problem
    • Linear programming formulation
    • Let x ij denote…
    • Minimize
    • subject to
  • 53. General LP Formulation for Assignment Problems
  • 54. Solving the Assignment Problem
    • It is a linear programming problem, so we could use regular simplex method
    • It is a transportation problem, so we could use transportation simplex method
    • However, it has a very special structure, such that it can be solved in polynomial time
    • Many such algorithms exist, but the best known (and one of the oldest) is the Hungarian Method
  • 55. The Hungarian Method
    • Subtract row minimums from each element in the row
    • Subtract column minimums from each element in the column
    • Cover the zeroes with as few lines as possible
    • If the number of lines = n, then optimal solution is hidden in zeroes
    • Otherwise, find the minimum cost that is not covered by any lines
      • Subtract it from all uncovered elements
      • Add it to all elements at intersections (covered by two lines)
    • Back to step 3
  • 56. The Hungarian Method – Optimal Solution
    • How to identify the optimal solution:
    • Make the assignments one at a time in positions that have zero elements.
    • Begin with rows or columns that have only one zero. Cross out both the row and the column involved after each assignment is made.
    • Move on to the rows and columns that are not yet crossed out to select the next assignment, with preference given to any such row or column that has only one zero that is not crossed out.
    • Continue until every row and every column has exactly one assignment and so has been crossed out.
  • 57. Hungarian Method 4 4 2 Goyle 5 4 1 Draco 3 2 5 Harry Lupin McG Snape Student Mentor Goyle Draco Harry Lupin McG Snape Student Mentor Goyle Draco Harry Lupin McG Snape Student Mentor Goyle Draco Harry Lupin McG Snape Student Mentor