300 likes | 427 Views
Network Models (2). Tran Van Hoai Faculty of Computer Science & Engineering HCMC University of Technology. Ballston Electric Assembly line - Inspection. Products transported from Assembly line to Inspection are for Quality Control.
E N D
Network Models (2) Tran Van HoaiFaculty of Computer Science & Engineering HCMC University of Technology Tran Van Hoai
Ballston ElectricAssembly line - Inspection Products transported from Assembly line to Inspection are for Quality Control Which assembly line should be assigned to which inspection area (to minimize a given objective)? Tran Van Hoai
Time to transport a unit of product from assembly line to inspection Time difference mainly comes from the distance difference among pair <assembly line-inspection area> Tran Van Hoai
Formulation Define a set of decision variables Xij, which mean 1 if Line i is assigned to Inspection j Xij = 0 otherwise Tran Van Hoai
Assignment networksDefinition • Can be solved by • Enumeration • LP • Transportation model • Dynamic programming • Branch-and-bound • Hungarian algorithm • m workers are to be assigned to m jobs • Unit cost Cij for worker i performing job j • Goal: to minimize total cost of assignment Tran Van Hoai
Advanced issues (1) • Number of workers ≥ number of jobs • Worker constraint changed from “=” to “≤” • A worker can perform ≥ 1 jobs • Minimization changed to maximization • Additional constraints • Line 1 cannot be assigned to Inspection B • X12=0 • If Line 1 is assigned to Inspection B, then Line 2 must be assigned to Inspection D Tran Van Hoai
Advanced issues (2) • Additional constraints • If Line 1 is assigned to Inspection B, then Line 2 must be assigned to Inspection D • X12 ≤ X24 • At least one in Lines {1,3,4} is assigned to Inspection E • X15+X35+X45=1 Tran Van Hoai
Generalized assignment model Tran Van Hoai
Marriage service ASSIGNMENT Each man only assigned to one woman Pair assignment requires a operational cost GOAL: to find a match having minimum total cost Tran Van Hoai
Shortest path problem • n nodes, a starting node (source), an ending node (destination) • Arcs connecting adjacent nodes with non-negative distances dij • GOAL: to find a shortest path from source to destination 100 1 2 150 151 75 6 42 3 5 71 25 67 11 22 4 7 89 8 52 Tran Van Hoai
Solution methods • Dijkstra • Only works for non-negative arc weight • Bellman-Ford • To find shortest path from a source to all other nodes • Works with non-negative arc weight (provided that there is no negative weighted cycle) • Floyd–Warshall • To find shortest path between all node pairs Not easy to include additional constraints (for non-IT users) Tran Van Hoai
LP-based approach Define a set of decision variables Xij, which mean 1 if arc ij is utilized Xij = 0 otherwise Tran Van Hoai
Shortest path 100 1 2 150 151 75 6 42 3 5 71 9 25 67 22 4 7 89 8 52 Tran Van Hoai
Additional constraints • Not go through node 5 X25 = X35 = X45 = X57 = 0 Don’t have to remove node 5 • Node 4 must be on the path X45+X47= 1 100 100 1 1 2 2 150 150 151 151 75 75 6 6 42 42 3 3 5 5 71 71 9 9 25 25 67 67 22 22 4 4 7 7 89 89 8 8 52 52 Tran Van Hoai
Additional constraints • If node 7 on path, then node 3 must on path X35 + X34 – X78 ≥ 0 • … 100 1 2 150 151 75 6 42 3 5 71 9 25 67 22 4 7 89 8 52 Tran Van Hoai
Maximal flow model • one source node, generating flows • one terminal node, depositing flows • flow in = flow out on intermediate nodes • capacity Cij on arc from i to j • GOAL: to find maximum flow out of source to terminal, without exceeding arc capacities Tran Van Hoai
Maximal flow problem 10 1 2 12 15 7 6 5 3 5 7 4 6 3 2 4 7 8 8 5 Tran Van Hoai
LP-based approach • Xij: flow from node i to node j (if arc ij exists) Tran Van Hoai
Maximal flow problem 10 1 2 7 12 15 5 7 7 6 5 3 5 7 5 6 7 4 3 2 5 4 5 7 8 8 5 Tran Van Hoai
Cuts in maximal flow problem CUT (all flow from 1 → 8 must cross CUT) 10 1 2 7 12 15 5 7 7 6 5 3 Maximal flow (12) ≤ C25 + C26 + C35 + C45 + C47 (34) 5 7 5 6 7 4 3 2 5 4 5 7 Sum of arc capacities on the cut provides upper bound for maximal flow 8 8 5 Tran Van Hoai
Max flow/Min cut theorem • The value of max flow = the sum of capacities of min cut • The flow of all arcs on min cut will be at their upper bound Tran Van Hoai
Traveling salesman network • NP-Hard (cannot be solved in polynomial time) • Connectivity network model • m nodes • unit cost Cij utilizing arc from i to jGOAL: to find a minimum cost tour (cycle) visiting all nodes (not twice) Tran Van Hoai
Solution methods Define a set of decision variables Xij, which mean 1 if arc ij is utilized Xij = 0 otherwise • Enumerating all possible tour (cycle) (m-1)! tours for m nodes in symmetric TSP • LP-based approach Tran Van Hoai
Federal Emergency Managament Agency 25 2 1 40 40 45 50 30 3 H 65 50 35 80 4 Tran Van Hoai
Assignment constraints • Sum of arcs used out of each node is 1 X11 + X12 + X13 + X14 + X15 = 1 • Sum of arcs used into each node is 1 X11 + X21 + X31 + X41 + X51 = 1 25 2 1 40 40 45 50 30 3 INVALID SOLUTION H 65 50 35 80 4 Need constraints to remove subtours Tran Van Hoai
Subtour constraints • One-node subtour constraints X11, X22, X33, X44, X55 ≤ 0 • Two-node subtour constraints X12 + X21 ≤ 1, … • Three-node subtour constraints X12 + X23 + X31 ≤ 2, … • Four-node subtour constraints X12 + X23 + X34 + X41 ≤ 3, … Tran Van Hoai
Vehicle routing problem • Generalized TSP Tran Van Hoai
Minimum spanning tree network • Read textbook Tran Van Hoai