Network Analysis Minimal spanning tree shortest route maximum flow Links, nodes, trees, graphs, paths and cycles what does it all mean? Real OR in action! 1
Network Terminology Graph - set of points (nodes) connected by lines (arcs) network - graph with numbers assigned to the arcs chain - sequence of arcs connecting two nodes connected graph - a chain exists for all pairs of nodes path - directed chain directed network - network with all arcs directed cycle - chain (path) connecting a node to itself tree - graph with no cycles spanning tree - tree with all nodes connected capacitated network - network with arc capacities
A Graph 3
A Network 3 1 10 Distances are in miles.
Are there any real examples of these so called arcs and nodes? Nodes Arcs Flows intersections roads vehicles airports air lanes aircraft switching points wires, channels messages pumping stations pipes fluid or gas work centers materials-handling jobs
Minimal Spanning Tree Select those branches of the network having the shortest total length while providing a path between each pair of nodes. The greedy algorithm: 1. Select any node arbitrarily. Find the unconnected node nearest to a connected node and connect the two nodes. 3. Repeat step until all nodes are connected.
The County desires to connect all the towns to a single sewage system. This will require having each town tied to a piping system. How should the system be designed to minimize the total length of pipe. 3 1 10 Roadways connecting towns in Putrid County. Distances are in miles.
1. Arbitrarily pick a starting node. 3 1 10
1. Arbitrarily pick a starting node.. Connect it to the nearest node. 3 1 10 9
1. Arbitrarily pick a starting node.. Connect it to the nearest node. 3. Find the nearest unconnected node to a connected node and connect it. 3 1 10 10
1. Arbitrarily pick a starting node.. Connect it to the nearest node. 3. Find the nearest unconnected node to a connected node and connect it. 3 10. Repeat step 3 until all nodes are connected. 1 11
1. Arbitrarily pick a starting node.. Connect it to the nearest node. 3. Find the nearest unconnected node to a connected node and connect it. 3 10. Repeat step 3 until all nodes are connected. 1 1
1. Arbitrarily pick a starting node.. Connect it to the nearest node. 3. Find the nearest unconnected node to a connected node and connect it. 3 10. Repeat step 3 until all nodes are connected. 1 13
1. Arbitrarily pick a starting node.. Connect it to the nearest node. 3. Find the nearest unconnected node to a connected node and connect it. 3 10. Repeat step 3 until all nodes are connected. 1 1
1. Arbitrarily pick a starting node.. Connect it to the nearest node. 3. Find the nearest unconnected node to a connected node and connect it. 3 10. Repeat step 3 until all nodes are connected. 1 1
1. Arbitrarily pick a starting node.. Connect it to the nearest node. 3. Find the nearest unconnected node to a connected node and connect it. 3 10. Repeat step 3 until all nodes are connected. 1 Distance = + 3 + + + + + + = 3 miles 1
1. Arbitrarily pick a starting node.. Connect it to the nearest node. 3. Find the nearest unconnected node to a connected node and connect it.. Repeat step 3 until all nodes are connected. 3 Distance = + 3 + + + + + + = 3 miles 1
Shortest Route Problem Find the shortest path from one node to another node or to all other nodes in a directed network. Shortest Path Solution procedures 1. Tabular Method. Cut Method 1
Find the shortest route from the County Seat to each of the other towns. B E G A 3 C 1 County Seat D F 10 H Roadways connecting towns in Putrid County. Distances are in miles. 19
Seat A B C D E F G H SA-3 AB- BA- CB- DF- EG- FH- GE- HF- SC- BC- CF- DH-10 EB- FC- GF- HD-10 SD- BE- EF- FG- GH-1 HG-1 FE- FD- 0
3 Seat A B C D E F G H SA-3 AB- BA- CB-3 DF- EB- FD- GE- HF- SC -1 BE- CF- DH-10 EG- FH- GF- HD-10 SD-1 BC-3 EF- FE- GH-1 HG-1 FG- FC- A 3 B 1 3 C E G 1 S 1 D F 10 H 1
3 10 11 1 1 Seat A B C D E F G H SA-3 AB- BA- CB- DF- EG- FH- GE- HF- SC- BC- CF- DH-10 EB- FC- GF- HD-10 SD- BE- EF- FG- GH-1 HG-1 FE- FD- Seat -C -F -H + + = 1 miles Seat -A -B -E -G 3 + + + = 1 miles
Find the shortest route from the County Seat to each of the other towns. B E G A 3 C 1 County Seat D F 10 H 3
More Networking Operations research students busy finding the shortest paths to success.
When will Harry meet Sally? Numbers are travel times in hours. O B E H K D C A F G I J L Sally Harry 10 3 3 1 3 Not to scale
0 A B C D E F G H OA- AC- BE- CA- DE- ED- FI-3 GC-3 HJ- OB- AI-1 BD- CD- DC- EB- FC- GJ-3 HK- CG-3 DB- EH- HE- CF- DJ-10 I J K L IF-3 JG-3 KH- LK- IJ- JH- KL- LI- IL- JI- KJ- IA-1 JK- JD-10
9 11 11 10 0 A B C D E F G H OA- AC- BE- CA- DE- ED- FI-3 GC-3 HJ- OB- AI-1 BD- CD- DC- EB- FC- GJ-3 HK- CG-3 DB- EH- HE- CF- DJ-10 1 0 -A -C -G -J -K Harry meets Sally in 1 hours! 1 13 1 1 I J K L IF-3 JG-3 KH- LK- IJ- JH- KL- LI- IL- JI- KJ- IA-1 JK- JD-10
When Harry meets Sally O A C 3 1 F G 3 3 I J L B Not to scale E D 10 H K Gosh, it only took 1 hours.
Maximal Flow Problem Determine the maximum flow from an origin node to a sink node through a capacitated network. 9
Applications Oil and gas pipelines with pumping stations Intersecting highways 30
Out very first example The city of Maxiflow has the following main highways leading from the stadium where the Maxiflow Tigers play football to the junction of I-111 (interstate). Mr. Bot L. Necke, the city planner, must determine the proper direction of travel on three streets that are currently bi-directional. Flow capacities in vehicles per minutes are shown. Determine the direction of flow and the maximum flow out of the stadium. 0 A S I-111 3 B 1 30 0 0 C D 0 0 31
The Algorithm 1. Find a path from origin to sink having nonzero capacities on all of its arcs.. Assign a flow along the path equal to the minimum arc capacity. 3. Revise all arc capacities along the path as a result of the assigned flow.. Repeat 1-3 until no new paths can be found. Instead of learning yet another algorithm, I read in the book where this problem can be solved as a linear program. 3
The Network 0 A 30 1 0 C 0 S I-111 3 B D 0 0 I need a way to solve this problem.
The LP Formulation 0 A 30 1 0 S I-111 3 B D 0 C 0 0 Let x ij = the flow from node i to node j max xsa + xsb subject to!conservation of flow xsa+xba+xda-xab-xad-xac=0 xsb+xab-xba-xbd=0 xac+xdc-xcd-xci=0 xad+xbd+xcd-xda-xdc-xdi=0! arc capacities xsa<0 xab+xba<1 xcd+xdc< xbd<0 xdi<0 xsb<3 xad+xda<0 xac<30 xci<0
Excel Solver Solution variables changing LHS Capacities Node conservati on of flow 1 xsa 0 LHS RHS xsb 3 3 3 A 0 0 3 xab 1 B 0 0 xba 0 C 0 0 xad 0 0 0 D 0 0 xda 0 xac 30 30 30 xbd 0 0 0 9 xcd 0 0 10 xdc 0 11 xci 0 0 0 1 xd1 0 0 0 Flow out = 90
This stuff really works! 30 A C 0 0 0 S I-111 3 B D 0 0 Max flow = 90 vehicles per mins or 1 vehicles per minute. 3
The End This has been a fast past journey into the wonderful and mysterious world of graphs, networks, arcs, and branches. We hope your visit was enjoyable. Please come see us again and have a safe trip home. This is an Engineering Management and Systems Presentation. All rights Reserved. 3