Presentation is loading. Please wait.

Presentation is loading. Please wait.

Network Flows. 2 Ardavan Asef-Vaziri June-2013Transportation Problem and Related Topics Table of Contents Chapter 6 (Network Optimization Problems) Minimum-Cost.

Similar presentations


Presentation on theme: "Network Flows. 2 Ardavan Asef-Vaziri June-2013Transportation Problem and Related Topics Table of Contents Chapter 6 (Network Optimization Problems) Minimum-Cost."— Presentation transcript:

1 Network Flows

2 2 Ardavan Asef-Vaziri June-2013Transportation Problem and Related Topics 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

3 3 Ardavan Asef-Vaziri June-2013Transportation Problem and Related Topics Distribution Unlimited Co. Problem  The Distribution Unlimited Co. has two factories producing a product that needs to be shipped to two warehouses Factory 1 produces 80 units. Factory 2 produces 70 units. Warehouse 1 needs 60 units. Warehouse 2 needs 90 units.  There are rail links directly from Factory 1 to Warehouse 1 and Factory 2 to Warehouse 2.  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?

4 4 Ardavan Asef-Vaziri June-2013Transportation Problem and Related Topics 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. Minimum Cost Flow Problem: Narrative representation

5 5 Ardavan Asef-Vaziri June-2013Transportation Problem and Related Topics Transportation costs for each unit of product and max capacity of each road is given below FromTocost/ unitMax capacity 14700No limit 1330050 2340050 25900No limit 3420050 3540050 There is no other link between any pair of points Minimum Cost Flow Problem: Narrative representation

6 6 Ardavan Asef-Vaziri June-2013Transportation Problem and Related Topics Minimum Cost Problem: Pictorial Representation 1 2 4 5 3 30 40 30 50 30 50 80 70 60 90 x 14 x 13 x 34 x 23 x 35 x 25

7 7 Ardavan Asef-Vaziri June-2013Transportation Problem and Related Topics 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. f i : Net flow of node i If i is a supply point then f i = + supply of node i If i is a demand point then f i = - demand of node i If i is a transshipment point then f i = 0

8 8 Ardavan Asef-Vaziri June-2013Transportation Problem and Related Topics Notations and Formulation Notation t ij : Outflow from node i to node j with i ---------> j t ji : Inflow from node j to node i with i <---------- j T ij : Maximum capacity of arc ij t ij  T ij  ij  A ( A is the set of directed arcs) f i : Net flow of node i  t ij -  t ji = f i  i  N ( N is the set of nodes) c ij : Cost of moving one unit on arc ij

9 9 Ardavan Asef-Vaziri June-2013Transportation Problem and Related Topics 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

10 10 Ardavan Asef-Vaziri June-2013Transportation Problem and Related Topics 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

11 11 Ardavan Asef-Vaziri June-2013Transportation Problem and Related Topics Minimum Cost Flow Problem: constraints Capacity x 13  50 x 23  50 x 34  50 x 35  50 Nonnegativity x 14, x 13, x 23, x 25, x 34, x 35  0

12 12 Ardavan Asef-Vaziri June-2013Transportation Problem and Related Topics Example 1 2 4 5 3 700 900 200300 400 5050 5050 5050 5050 80 70 -60 -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

13 13 Ardavan Asef-Vaziri June-2013Transportation Problem and Related Topics Excel

14 14 Ardavan Asef-Vaziri June-2013Transportation Problem and Related Topics Excel

15 15 Ardavan Asef-Vaziri June-2013Transportation Problem and Related Topics Excel 1 2 4 5 3 700 900 200300 400 5050 5050 5050 5050 80 70 -60 -90

16 16 Ardavan Asef-Vaziri June-2013Transportation Problem and Related Topics Solver

17 17 Ardavan Asef-Vaziri June-2013Transportation Problem and Related Topics Solution

18 18 Ardavan Asef-Vaziri June-2013Transportation Problem and Related Topics Minimum Cost Flow Problem: constraints

19 19 Ardavan Asef-Vaziri June-2013Transportation Problem and Related Topics Minimum Cost Problem: Pictorial Representation 1 2 4 5 3 30 40 30 50 30 50 80 70 60 90

20 20 Ardavan Asef-Vaziri June-2013Transportation Problem and Related Topics Transportation problem II : Formulation

21 21 Ardavan Asef-Vaziri June-2013Transportation Problem and Related Topics Transportation problem II : Solution

22 22 Ardavan Asef-Vaziri June-2013Transportation Problem and Related Topics Transportation problem II : Solution

23 23 Ardavan Asef-Vaziri June-2013Transportation Problem and Related Topics Transportation problem III : Pictorial representation 1 2 4 5 3 +50 +40 -30 -60 900 400 100 300 200 300 200 50 80 x 14 x 13 x 23 x 35 x 12 x 45 x 54

24 24 Ardavan Asef-Vaziri June-2013Transportation Problem and Related Topics 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 = 200x 12 + 400x 13 + 900x 14 + 300x 23 + 100x 35 + 300x 45 + 200x 54

25 25 Ardavan Asef-Vaziri June-2013Transportation Problem and Related Topics Transportation problem III : Excel Solution

26 26 Ardavan Asef-Vaziri June-2013Transportation Problem and Related Topics The Maximum Flow Problem O 5 4 3 2 6 D 40 70 50 60 40 50 30 70 80 There is no inflow associated with origin There is no outflow associated with destination We want to Maximize total outflow of the origin or total inflow of the destination

27 27 Ardavan Asef-Vaziri June-2013Transportation Problem and Related Topics Notations and Formulation t ij : Outflow from node i to node j with i ---------> j t ji : Inflow from node j to node i with i <---------- j T ij : Maximum capacity of arc ij t ij  T ij  ij  A f i : is zero for all nodes except Origin(s) and Destination(s)  t ij -  t ji = 0  i  N \ O and D

28 28 Ardavan Asef-Vaziri June-2013Transportation Problem and Related Topics Example O 5 4 3 2 6 D 40 70 50 60 40 50 30 70 80 t 25 - t O2 = 0 t 35 + t 36 - t O3 = 0 t 46 - t O4 = 0 t 5D - t 25 - t 35 = 0 t 6D - t 36 - t 46 = 0 t O2  50 t O3  70 t O4  40 t 25  60 t 35  40 t 36  50 and so on t 6D  70 Max Z = t O2 + t O3 + t O4

29 29 Ardavan Asef-Vaziri June-2013Transportation Problem and Related Topics Excel and Solver O 5 4 3 2 6 D 40 70 50 60 40 50 30 70 80

30 30 Ardavan Asef-Vaziri June-2013Transportation Problem and Related Topics Solution O 5 4 3 2 6 D 40 (30) 70 50 60(50) 40 (30) 50(40) 30 70 80

31 31 Ardavan Asef-Vaziri June-2013Transportation Problem and Related Topics More Than One Origin 5 4 3 2 6 D1 40 70 50 60 40 50 30 70 80 O1 O2 7 8 D2 60 20 40 30 20 40 10  t ij -  t ji = 0  i  N \ Os and Ds t ij  T ij  ij  A

32 32 Ardavan Asef-Vaziri June-2013Transportation Problem and Related Topics Example 5 4 3 2 6 D 40 70 50 60 40 50 30 70 80 O1 O2 7 8 D2 60 20 40 30 20 40 10  t ij -  t ji = 0  i  N \ Os and Ds Example: Node 7 + t 78 + t 75 - t O27 = 0 Example: Node 5 + t 5D1 + t 5D2 - t 25 - t 35 - t 75 = 0 t ij  T ij  ij  A Example: Arc 46 t 46  30 Example: Arc O12 t O12  50 Objective Function Max Z = + t O12 + t O13 + t O14 + t O22 + t O27

33 33 Ardavan Asef-Vaziri June-2013Transportation Problem and Related Topics 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 l ij = l ji  ij In a asymmetric network this condition does not hold

34 34 Ardavan Asef-Vaziri June-2013Transportation Problem and Related Topics Example 6 3 4 2 5 7 2 6 5 6 4 8 7 2 2 1 2 2 2

35 35 Ardavan Asef-Vaziri June-2013Transportation Problem and Related Topics Decision Variables and Formulation x ij : The decision variable for the directed arc from node i to nod j. x ij = 1 if arc ij is on the shortest route x ij = 0 if arc ij is not on the shortest route  x ij -  x ji = 0  i  N \ O and D  x oj =1  x iD = 1 Min Z =  l ij x ij

36 36 Ardavan Asef-Vaziri June-2013Transportation Problem and Related Topics Example 6 3 4 2 5 7 2 6 5 6 4 8 7 2 2 1 2 2 2

37 37 Ardavan Asef-Vaziri June-2013Transportation Problem and Related Topics Example 6 3 4 2 5 7 2 6 5 6 4 8 7 2 2 1 2 2 2 + 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 …. ….. Min Z = + 5x 12 + 4x 13 + 3x 14 + 2x 24 + 6x 26 + 2x 34 + 3x 35 + 2x 43 + 2x 42 + 5x 45 + 4x 46 + 3x 56 + 2x 57 + 3x 65 + 2x 67

38 38 Ardavan Asef-Vaziri June-2013Transportation Problem and Related Topics Excel 6 3 4 2 5 7 2 6 5 6 4 8 7 2 2 1 2 2 2

39 39 Ardavan Asef-Vaziri June-2013Transportation Problem and Related Topics Excel 6 3 4 2 5 7 2 6 5 6 4 8 7 2 2 1 2 2 2

40 40 Ardavan Asef-Vaziri June-2013Transportation Problem and Related Topics Solver Solution 6 3 4 2 5 7 2 6 5 6 4 8 7 2 2 1 2 2 2

41 41 Ardavan Asef-Vaziri June-2013Transportation Problem and Related Topics After class practice; Find the shortest route 8 3 4 5 7 10 4 3 5 6 4 5 3 2 2 1 2 6 9 11 6 2 4 3 4 6 6 O D 2 3 6 5 3 2 3 2 2

42 42 Ardavan Asef-Vaziri June-2013Transportation Problem and Related Topics Two important observations in the LP-relaxation 2 1 3 4 2 6 1 4 3 Formulate on the problem on the black board Did I say x ij <= 1 ? Why all the variables came out less than 1 Did I say x ij 0 or 1 Why all variables came out 0 or 1

43 43 Ardavan Asef-Vaziri June-2013Transportation Problem and Related Topics 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 u sually use the term “EDGE” as nondirected, and term “ARC” as directed. All distances in MSE network are symmetric.

44 44 Ardavan Asef-Vaziri June-2013Transportation Problem and Related Topics The Minimum Spanning Tree 1 5 6 4 3 2 7 2 5 2 7 5 1 7 3 4 4 41

45 45 Ardavan Asef-Vaziri June-2013Transportation Problem and Related Topics Minimum Spanning Tree 1 5 6 4 3 2 7 2 5 2 7 5 1 7 3 4 4 4

46 46 Ardavan Asef-Vaziri June-2013Transportation Problem and Related Topics 1 5 6 4 3 2 7 2 5 2 7 5 1 7 3 4 4 4 Minimum Spanning Tree

47 47 Ardavan Asef-Vaziri June-2013Transportation Problem and Related Topics Minimum Spanning Tree : Connectivity

48 48 Ardavan Asef-Vaziri June-2013Transportation Problem and Related Topics Minimum Spanning Tree : Connectivity 1 5 6 4 3 2 7 2 5 2 7 5 1 7 3 4 4 4

49 49 Ardavan Asef-Vaziri June-2013Transportation Problem and Related Topics 1 5 6 4 3 2 7 2 5 2 7 5 1 7 3 4 4 4 Minimum Spanning Tree : Connectivity

50 50 Ardavan Asef-Vaziri June-2013Transportation Problem and Related Topics Minimum Spanning Tree : Integrality 1 5 6 4 3 2 7 2 5 2 7 5 1 7 3 4 4 4

51 51 Ardavan Asef-Vaziri June-2013Transportation Problem and Related Topics Minimum Spanning Tree : Connectivity 1 5 6 4 3 2 7 2 5 2 7 5 1 7 3 4 4 4

52 52 Ardavan Asef-Vaziri June-2013Transportation Problem and Related Topics Minimum Spanning Tree : Connectivity 1 5 6 4 3 2 7 2 5 2 7 5 1 7 3 4 4 4

53 53 Ardavan Asef-Vaziri June-2013Transportation Problem and Related Topics Minimum Spanning Tree : Connectivity 1 5 6 4 3 2 7 2 5 2 7 5 1 7 3 4 4 4

54 54 Ardavan Asef-Vaziri June-2013Transportation Problem and Related Topics Minimum Spanning Tree : Optimal Solution

55 55 Ardavan Asef-Vaziri June-2013Transportation Problem and Related Topics Minimum Spanning Tree : Optimal Solution 1 5 6 4 3 2 7 2 5 2 7 5 1 7 3 4 4 4


Download ppt "Network Flows. 2 Ardavan Asef-Vaziri June-2013Transportation Problem and Related Topics Table of Contents Chapter 6 (Network Optimization Problems) Minimum-Cost."

Similar presentations


Ads by Google