Network Flows Table of Contents Chapter 6 Network
Network Flows
Table of Contents Chapter 6 (Network Optimization Problems) Minimum-Cost Flow Problems (Section 6. 1) 6. 2– 6. 12 A Case Study: The BMZ Maximum Flow Problem (Section 6. 2) 6. 13– 6. 16 Maximum Flow Problems (Section 6. 3) 6. 17– 6. 21 Shortest Path Problems: Littletown Fire Department (Section 6. 4) 6. 22– 6. 25 Shortest Path Problems: General Characteristics (Section 6. 4) 6. 26– 6. 27 Shortest Path Problems: Minimizing Sarah’s Total Cost (Section 6. 4) 6. 28– 6. 31 Shortest Path Problems: Minimizing Quick’s Total Time (Section 6. 4) 6. 32– 6. 36 Transportation Problem and Related Topics Ardavan Asef-Vaziri June-2013 2
Distribution Unlimited Co. Problem p The Distribution Unlimited Co. has two factories producing a product that needs to be shipped to two warehouses Factory 1 produces 80 units. n Factory 2 produces 70 units. n Warehouse 1 needs 60 units. n Warehouse 2 needs 90 units. n p There are rail links directly from Factory 1 to Warehouse 1 and Factory 2 to Warehouse 2. p Independent truckers are available to ship up to 50 units from each factory to the distribution center, and then 50 units from the distribution center to each warehouse. Question: How many units (truckloads) should be shipped along each shipping lane? Transportation Problem and Related Topics Ardavan Asef-Vaziri June-2013 3
Minimum Cost Flow Problem: Narrative representation There are 2 plants, 2 demand centers and 1 transshipment point. Production of Plants 1 and 2 are 80 and 70 units respectively. Demand of Demand centers 1 and 2 ( we call them points 4 and 5) are 60 and 90 units respectively. Transshipment point ( point 3) is does not have any supply or demand. Given the information on the next page, formulate this problem as an LP to satisfy supply and demand with minimal transportation costs. Transportation Problem and Related Topics Ardavan Asef-Vaziri June-2013 4
Minimum Cost Flow Problem: Narrative representation Transportation costs for each unit of product and max capacity of each road is given below From To cost/ unit Max capacity 1 4 700 No limit 1 3 300 50 2 3 400 50 2 5 900 No limit 3 4 200 50 3 5 400 50 There is no other link between any pair of points Transportation Problem and Related Topics Ardavan Asef-Vaziri June-2013 5
Minimum Cost Problem: Pictorial Representation 80 1 x 14 x 13 x 23 70 2 30 50 50 3 30 Transportation Problem and Related Topics 60 5 90 x 34 30 50 50 x 25 4 40 Ardavan Asef-Vaziri x 35 June-2013 6
Conventions Minimum Cost Flow is the same as Transportation and Transshipment problem. We reformulate the same problem in the context of Minimum Cost flow just as an introduction to the domain of the Network Optimization Problems. For each node i , we define the net flow as the difference between total outflow minus total inflow. fi : Net flow of node i If i is a supply point then fi = + supply of node i If i is a demand point then fi = - demand of node i If i is a transshipment point then fi = 0 Transportation Problem and Related Topics Ardavan Asef-Vaziri June-2013 7
Notations and Formulation Notation tij : Outflow from node i to node j with i -----> j tji : Inflow from node j to node i with i <----- j Tij : Maximum capacity of arc ij tij Tij A ( A is the set of directed arcs) fi : Net flow of node i tij - tji = fi i N ( N is the set of nodes) cij : Cost of moving one unit on arc ij Transportation Problem and Related Topics Ardavan Asef-Vaziri June-2013 8
Minimum Cost Flow Problem: decision variables x 14 = Volume of product sent from point 1 to 4 x 13 = Volume of product sent from point 1 to 3 x 23 = Volume of product sent from point 2 to 3 x 25 = Volume of product sent from point 2 to 5 x 34 = Volume of product sent from point 3 to 4 x 35 = Volume of product sent from point 3 to 5 We want to minimize Z = 700 x 14 +300 x 13 + 400 x 23 + 900 x 25 +200 x 34 + 400 x 35 Transportation Problem and Related Topics Ardavan Asef-Vaziri June-2013 9
Minimum Cost Flow Problem: constraints Supply x 14 + x 13 = 80 x 23 + x 25 = 70 Demand x 14 + x 34 = 60 x 25 + x 35 = 90 Transshipment x 13 + x 23 = x 34 + x 35 (Move all variables to LHS) x 13 + x 23 - x 34 - x 35 =0 Transportation Problem and Related Topics Ardavan Asef-Vaziri June-2013 10
Minimum Cost Flow Problem: constraints Capacity x 13 50 x 23 50 x 34 50 x 35 50 Nonnegativity x 14, x 13 , x 25 , x 34 , x 35 0 Transportation Problem and Related Topics Ardavan Asef-Vaziri June-2013 11
Example 80 700 1 300 70 2 5 0 400 5 0 4 -60 200 3 900 5 0 400 5 -90 Node 1 : t 13 + t 14 = 80 ( the same for node 2) Node 4 : -t 14 - t 34 = -60 (the same for node 5) Node 3 : t 34 + t 35 - t 13 - t 23 = 0 Capacity Constraints on arc 13 : t 13 50 ( the same for arcs 2 -3, 3 -4, and 3 -5) Min Z = + 300 t 13 + 700 t 14 + 400 t 23 + 900 t 25 + 200 t 34 + 400 t 35 Transportation Problem and Related Topics Ardavan Asef-Vaziri June-2013 12
Excel Transportation Problem and Related Topics Ardavan Asef-Vaziri June-2013 13
Excel Transportation Problem and Related Topics Ardavan Asef-Vaziri June-2013 14
Excel 80 700 1 300 70 2 5 0 400 5 0 Transportation Problem and Related Topics 4 -60 200 3 900 5 0 400 Ardavan Asef-Vaziri 5 June-2013 -90 15
Solver Transportation Problem and Related Topics Ardavan Asef-Vaziri June-2013 16
Solution Transportation Problem and Related Topics Ardavan Asef-Vaziri June-2013 17
Minimum Cost Flow Problem: constraints Transportation Problem and Related Topics Ardavan Asef-Vaziri June-2013 18
Minimum Cost Problem: Pictorial Representation 80 30 1 50 50 3 30 2 Transportation Problem and Related Topics 60 5 90 30 50 50 70 4 40 Ardavan Asef-Vaziri June-2013 19
Transportation problem II : Formulation Transportation Problem and Related Topics Ardavan Asef-Vaziri June-2013 20
Transportation problem II : Solution Transportation Problem and Related Topics Ardavan Asef-Vaziri June-2013 21
Transportation problem II : Solution Transportation Problem and Related Topics Ardavan Asef-Vaziri June-2013 22
Transportation problem III : Pictorial representation +50 x 14 1 x 13 x 12 x 23 4 -30 400 3 50 200 +40 900 300 200 x 35 80 300 x 54 100 2 Transportation Problem and Related Topics x 45 5 Ardavan Asef-Vaziri June-2013 -60 23
Transportation problem III : Formulation Material Flow Balance. At each node we have Supply + Inflow = Demand + Outflow 50 = x 12+ x 13 + x 14 40+x 12 = x 23 x 13+ x 23 = x 35 x 14+ x 54 = 30 + x 45 x 35+ x 45 = 60 + x 54 Capacity x 12 50 x 35 80 Min Z = 200 x 12+ 400 x 13 + 900 x 14 + 300 x 23 + 100 x 35 + 300 x 45 + 200 x 54 Transportation Problem and Related Topics Ardavan Asef-Vaziri June-2013 24
Transportation problem III : Excel Solution Transportation Problem and Related Topics Ardavan Asef-Vaziri June-2013 25
The Maximum Flow Problem There is no inflow associated with origin There is no outflow associated with destination 2 60 5 80 D We want to Maximize total outflow of the origin or total inflow of the destination 50 40 70 70 3 50 O 40 6 30 4 Transportation Problem and Related Topics Ardavan Asef-Vaziri June-2013 26
Notations and Formulation tij : Outflow from node i to node j with i -----> j tji : Inflow from node j to node i with i <----- j Tij : Maximum capacity of arc ij tij Tij A fi : is zero for all nodes except Origin(s) and Destination(s) tij - tji = 0 i N O and D Transportation Problem and Related Topics Ardavan Asef-Vaziri June-2013 27
Example t 25 - t. O 2 = 0 t 35 + t 36 - t. O 3 = 0 t 46 - t. O 4 = 0 t 5 D - t 25 - t 35 = 0 t 6 D - t 36 - t 46 = 0 2 60 5 80 D 50 40 70 3 50 6 t. O 2 50 t. O 3 70 t. O 4 40 t 25 60 t 35 40 t 36 50 and so on t 6 D 70 70 O 40 30 4 Max Z = t. O 2 + t. O 3 + t. O 4 Transportation Problem and Related Topics Ardavan Asef-Vaziri June-2013 28
Excel and Solver 2 60 80 D 5 50 40 70 3 50 6 70 O 40 30 4 Transportation Problem and Related Topics Ardavan Asef-Vaziri June-2013 29
Solution 2 60(50) 5 80 50 40 (30) 70 D 70 3 50(40) O 40 (30) 6 30 Transportation Problem and Related Topics Ardavan Asef-Vaziri June-2013 4 30
More Than One Origin 7 40 8 20 60 30 10 D 2 2 60 40 5 80 70 tij Tij 3 50 6 O 2 50 40 D 1 tij - tji = 0 20 70 O 1 40 30 4 i N Os and Ds ij A Transportation Problem and Related Topics Ardavan Asef-Vaziri June-2013 31
Example tij - tji = 0 i N Os and Ds Example: Node 7 + t 78 + t 75 - t. O 27 = 0 Example: Node 5 + t 5 D 1 + t 5 D 2 - t 25 - t 35 - t 75 = 0 tij Tij A 7 40 8 20 60 30 10 D 2 60 40 Example: Arc 46 t 46 30 Example: Arc O 12 t. O 12 50 20 5 80 D 2 50 40 70 3 50 6 O 2 70 O 1 40 30 4 Objective Function Max Z = + t. O 12 + t. O 13 + t. O 14 + t. O 22 + t. O 27 Transportation Problem and Related Topics Ardavan Asef-Vaziri June-2013 32
The Shortest Route Problem The shortest route between two points l ij : The length of the directed arc ij. l ij is a parameter, not a decision variable. It could be the length in term of distance or in terms of time or cost ( the same as c ij ) For those nodes which we are sure that we go from i to j we only have one directed arc from i to j. For those node which we are not sure that we go from i to j or from j to i, we have two directed arcs, one from i to j, the other from j to i. We may have symmetric or asymmetric network. In a symmetric network lij = lji ij In a asymmetric network this condition does not hold Transportation Problem and Related Topics Ardavan Asef-Vaziri June-2013 33
Example 2 6 6 2 5 2 4 2 7 2 6 4 8 1 2 5 2 7 3 Transportation Problem and Related Topics Ardavan Asef-Vaziri June-2013 34
Decision Variables and Formulation xij : The decision variable for the directed arc from node i to nod j. xij = 1 if arc ij is on the shortest route xij = 0 if arc ij is not on the shortest route xij - xji = 0 i N O and D xoj =1 xi. D = 1 Min Z = lij xij Transportation Problem and Related Topics Ardavan Asef-Vaziri June-2013 35
Example 2 6 6 2 5 2 4 2 7 2 6 4 8 1 2 5 2 7 3 Transportation Problem and Related Topics Ardavan Asef-Vaziri June-2013 36
Example + x 13 + x 14+ x 12= 1 - x 57 - x 67 = -1 + x 34 + x 35 - x 43 - x 13 = 0 + x 42 + x 43 + x 45 + x 46 - x 14 - x 24 - x 34 = 0 2 6 6 2 7 …. …. . 2 4 5 2 2 8 5 6 4 7 2 1 2 3 Min Z = + 5 x 12 + 4 x 13 + 3 x 14 + 2 x 24 + 6 x 26 + 2 x 34 + 3 x 35 + 2 x 43 + 2 x 42 + 5 x 45 + 4 x 46 + 3 x 56 + 2 x 57 + 3 x 65 + 2 x 67 Transportation Problem and Related Topics Ardavan Asef-Vaziri June-2013 37
Excel 2 6 6 2 7 Ardavan Asef-Vaziri 5 2 2 June-2013 6 4 8 5 Transportation Problem and Related Topics 2 4 7 2 3 1 2 38
Excel 2 6 6 2 7 Ardavan Asef-Vaziri 5 2 2 June-2013 6 4 8 5 Transportation Problem and Related Topics 2 4 7 2 3 1 2 39
Solver Solution 2 6 6 2 7 2 4 5 2 2 8 5 6 4 7 2 1 2 3 Transportation Problem and Related Topics Ardavan Asef-Vaziri June-2013 40
After class practice; Find the shortest route 6 4 9 4 2 3 6 11 2 10 2 4 3 5 3 2 3 4 5 7 2 6 8 2 2 5 6 6 D 6 3 3 2 O 5 1 4 3 Transportation Problem and Related Topics Ardavan Asef-Vaziri June-2013 41
Two important observations in the LP-relaxation 2 6 1 2 4 3 1 4 3 Formulate on the problem on the black board Did I say xij <= 1 ? Why all the variables came out less than 1 Did I say xij 0 or 1 Transportation and Related Topicsout Ardavan Why all. Problem variables came 0 or 1 Asef-Vaziri June-2013 42
The Minimum Spanning Tree Find a tree such that we can access each and every node at the minimum cost. The total length ( or cost) of the tree is minimized. In other words, we want to minimize the construction cost of the tree. Edges on the MST are bi-directional l ij : The length or cost of the bi-directional edge ij. We usually use the term “EDGE” as nondirected, and term “ARC” as directed. All distances in MSE network are symmetric. Transportation Problem and Related Topics Ardavan Asef-Vaziri June-2013 43
The Minimum Spanning Tree 2 7 2 2 5 1 4 4 6 3 1 3 4 4 Transportation Problem and Related Topics 1 5 7 7 5 Ardavan Asef-Vaziri June-2013 44
Minimum Spanning Tree 2 2 5 1 7 2 4 6 3 4 3 Transportation Problem and Related Topics 4 Ardavan Asef-Vaziri 4 1 5 7 7 5 June-2013 45
Minimum Spanning Tree 2 2 5 1 7 2 4 4 6 3 4 3 Transportation Problem and Related Topics 4 1 5 7 7 5 Ardavan Asef-Vaziri June-2013 46
Minimum Spanning Tree : Connectivity Transportation Problem and Related Topics Ardavan Asef-Vaziri June-2013 47
Minimum Spanning Tree : Connectivity 2 2 5 1 7 2 4 6 3 4 3 Transportation Problem and Related Topics 4 4 Ardavan Asef-Vaziri 1 5 7 7 5 June-2013 48
Minimum Spanning Tree : Connectivity 2 2 5 1 7 2 4 4 6 3 4 1 5 7 7 5 Transportation Problem and Related Topics Ardavan Asef-Vaziri June-2013 49
Minimum Spanning Tree : Integrality 2 2 5 1 7 2 4 4 6 3 4 1 5 7 7 5 Transportation Problem and Related Topics Ardavan Asef-Vaziri June-2013 50
Minimum Spanning Tree : Connectivity 2 2 5 1 7 2 4 6 3 4 3 Transportation Problem and Related Topics 4 Ardavan Asef-Vaziri 4 June-2013 1 5 7 7 5 51
Minimum Spanning Tree : Connectivity 2 2 5 1 7 2 4 6 3 4 3 Transportation Problem and Related Topics 4 4 Ardavan Asef-Vaziri 1 5 7 7 5 June-2013 52
Minimum Spanning Tree : Connectivity 2 2 5 1 7 2 4 6 3 4 3 Transportation Problem and Related Topics 4 4 Ardavan Asef-Vaziri 1 5 7 7 5 June-2013 53
Minimum Spanning Tree : Optimal Solution Transportation Problem and Related Topics Ardavan Asef-Vaziri June-2013 54
Minimum Spanning Tree : Optimal Solution 2 2 5 1 7 2 4 6 3 4 3 Transportation Problem and Related Topics 4 4 Ardavan Asef-Vaziri 1 5 7 7 5 June-2013 55
- Slides: 55