network flows
play

Network Flows Marco Chiarandini Department of Mathematics & - PowerPoint PPT Presentation

DM545 Linear and Integer Programming Lecture 11 Network Flows Marco Chiarandini Department of Mathematics & Computer Science University of Southern Denmark Network Flows Duality Outline Assignment and Transportation 1. (Minimum Cost)


  1. DM545 Linear and Integer Programming Lecture 11 Network Flows Marco Chiarandini Department of Mathematics & Computer Science University of Southern Denmark

  2. Network Flows Duality Outline Assignment and Transportation 1. (Minimum Cost) Network Flows 2. Duality in Network Flow Problems 3. Assignment and Transportation 2

  3. Network Flows Duality Outline Assignment and Transportation 1. (Minimum Cost) Network Flows 2. Duality in Network Flow Problems 3. Assignment and Transportation 3

  4. Network Flows Duality Terminology Assignment and Transportation Network: • directed graph D = ( V , A ) • arc, directed link, from tail to head • lower bound l ij > 0, ∀ ij ∈ A , capacity u ij ≥ l ij , ∀ ij ∈ A • cost c ij , linear variation (if ij �∈ A then l ij = u ij = 0 , c ij = 0) • balance vector b ( i ) , b ( i ) > 0 supply node (source), b ( i ) < 0 demand node (sink, tank), b ( i ) = 0 transhipment node (assumption � i b ( i ) = 0) N = ( V , A , l , u , b , c ) − 1 3 1 / · / 4 , 3 b b d d 2 / · / 5 , 6 0 / · / 3 , 2 3 / · / 3 , 1 3 a a 0 / · / 3 , 1 5 / · / 8 , 4 − 2 f f f − 2 b ( a ) 1 / · / 4 , 1 4 / · / 7 , 8 2 / · / 4 , 1 c c c − 3 e e e 0 l ce / x ce / u ce , c ce 0 − 3 4

  5. Network Flows Duality Network Flows Assignment and Transportation Flow x : A → R balance vector of x : b x ( v ) = � x vu − � x wv , ∀ v ∈ V vu ∈ A wv ∈ A  > 0 source   b x ( v ) < 0 sink/target/tank  = 0 balanced  (generalizes the concept of path with b x ( v ) = { 0 , 1 , − 1 } ) feasible l ij ≤ x ij ≤ u ij , b x ( i ) = b ( i ) c T x = � cost ij ∈ A c ij x ij (varies linearly with x ) If iji is a 2-cycle and all l ij = 0, then at least one of x ij and x ji is zero. 5

  6. Network Flows Duality Example Assignment and Transportation − 1 3 1 / 3 / 4 , 3 b d 2 / 4 / 5 , 6 0 / 3 / 3 , 2 a 0 / 0 / 3 , 1 3 / 3 / 3 , 1 5 / 6 / 8 , 4 f 3 − 2 1 / 1 / 4 , 1 4 / 5 / 7 , 8 2 / 2 / 4 , 1 c e 0 − 3 Feasible flow of cost 109 6

  7. Network Flows Duality Minimum Cost Network Flows Assignment and Transportation Find cheapest flow through a network in order to satisfy demands at certain nodes from available supplier nodes. Variables: x ij ∈ R + 0 min c T x Objective: N x = b � min c ij x ij l ≤ x ≤ u ij ∈ A Constraints: mass balance + flow bounds N node arc incidence matrix � � (assumption: all values are integer, x ij − x ji = b ( i ) ∀ i ∈ V we can multiply if rational) j : ij ∈ A j : ji ∈ A l ij ≤ x ij ≤ u ij 7

  8. Network Flows Duality Assignment and Transportation . . . . . . x e 1 x e 2 x ij x e m . . . . . . c e 1 c e 2 c ij c e m 1 − 1 . . . . . . . . . = b 1 2 . . . . . . . . . . = b 2 . . . ... . . . . . = . 1 . . . . − 1 . . . . = i b i . . . ... . . . . . = . . . . . . 1 . . . . = j b j . . . ... . . . . . = . . . . . . . . . . . = n b n e 1 1 ≤ u 1 e 2 1 ≤ u 2 . . . ... . . . . . ≤ . ( i , j ) 1 ≤ u ij . . . ... . . . . . ≤ . e m 1 ≤ u m 8

  9. Network Flows Duality Reductions/Transformations Assignment and Transportation Lower bounds N ′ = ( V , A , l ′ , u ′ , b ′ , c ) Let N = ( V , A , l , u , b , c ) b ′ ( i ) = b ( i ) − l ij b ′ ( j ) = b ( j ) + l ij u ′ ij = u ij − l ij l ′ ij = 0 b ( i ) b ( j ) l ij > 0 b ( i ) − l ij b ( j ) + l ij l ij = 0 j i j i u ij − l ij c T x ′ + c T x � c ij l ij ij ∈ A 9

  10. Network Flows Duality Assignment and Transportation Undirected arcs j j i i 10

  11. Network Flows Duality Assignment and Transportation Vertex splitting If there are bounds and costs of flow passing through vertices where b ( v ) = 0 (used to ensure that a node is visited): N = ( V , A , l , u , c , l ∗ , u ∗ , c ∗ ) b a s a t b s b t a c c s c t d s d t d From D to D ST as follows: � v s , v t ∈ V ( D ST ) and v s v t ∈ A ( D ST ) ∀ v ∈ V ∀ xy ∈ A ( D ) � x t y s ∈ A ( D ST ) 11

  12. Network Flows Duality Assignment and Transportation 1 / · / 3 , 2 2 / · / 2 , 1 3 0 − 4 0 / · / 3 , 4 0 / · / 3 , 4 3 0 1 / · / 3 , 2 − 4 − 1 2 / · / 2 , 1 0 / · / 3 , 0 − 1 0 0 / · / 3 , 0 2 0 2 1 / · / 4 , 6 1 / · / 4 , 6 h ∗ ∈ { l ∗ , u ∗ , c ∗ } ∀ v ∈ V and v s v t ∈ A ST � h ′ ( v s v t ) = h ∗ ( v ) , ∀ xy ∈ A and x t y s ∈ A ST � h ′ ( x t y s ) = h ( x , y ) , h ∈ { l , u , c } If b ( v ) = 0, then b ′ ( v s ) = b ′ ( v t ) = 0 If b ( v ) < 0, then b ′ ( v s ) = 0 and b ′ ( v t ) = b ( v ) If b ( v ) > 0, then b ′ ( v s ) = b ( v ) and b ′ ( v t ) = 0 12

  13. Network Flows Duality ( s , t ) -flow: Assignment and Transportation  if v = s k   b x ( v ) = , | x | = | b x ( s ) | − k if v = t  0 otherwise  5 // 5 b d − 1 3 b d 0 // b ( b ) 0 // − b ( d ) b ( s ) 1 // 2 b ( t ) s t 1 // 2 0 // 2 0 // b ( c ) 0 // − b ( e ) c e 6 c e − 8 6 // 6 b ( s ) = � v : b ( v ) > 0 b ( v ) = M b ( t ) = � v : b ( v ) < 0 b ( v ) = − M ∃ feasible flow in N ⇐ ⇒ ∃ ( s , t ) -flow in N st with | x | = M ⇐ ⇒ max flow in N st is M 13

  14. Network Flows Duality Residual Network Assignment and Transportation Residual Network N ( x ) : given that a flow x already exists, how much flow excess can be moved in G ? ( N ( x ) , c ′ ) Replace arc ij ∈ N with arcs: ( N , c , u , x ) residual capacity cost ij : r ij = u ij − x ij c ij ji : r ji = x ij − c ij 14

  15. Network Flows Duality Special cases Assignment and Transportation Shortest path problem path of minimum cost from s to t with costs ⋚ 0 b ( s ) = 1 , b ( t ) = − 1 , b ( i ) = 0 if to any other node? b ( s ) = ( n − 1 ) , b ( i ) = 1 , u ij = n − 1 Max flow problem incur no cost but restricted by bounds steady state flow from s to t b ( i ) = 0 ∀ i ∈ V , c ij = 0 ∀ ij ∈ A ts ∈ A c ts = − 1 , u ts = ∞ Assignment problem min weighted bipartite matching, | V 1 | = | V 2 | , A ⊆ V 1 × V 2 c ij b ( i ) = 1 ∀ i ∈ V 1 b ( i ) = − 1 ∀ i ∈ V 2 u ij = 1 ∀ ij ∈ A 15

  16. Network Flows Duality Special cases Assignment and Transportation Transportation problem/Transhipment distribution of goods, warehouses-costumers | V 1 | � = | V 2 | , u ij = ∞ for all ij ∈ A � min c ij x ij � x ij ≥ b j ∀ j i � x ij ≤ a i ∀ i j x ij ≥ 0 if � a i = � b i then ≥ / ≤ become = if � a i > � b i then add dummy tank nodes if � a i < � b i then infeasible 16

  17. Network Flows Duality Assignment and Transportation Multi-commodity flow problem ship several commodities using the same network, different origin destination pairs separate mass balance constraints, share capacity constraints, min overall flow k c k x k min � N x k ≥ b k ∀ k k x k � ij ≤ u ij ∀ ij ∈ A 0 ≤ x k ij ≤ u k ij What is the structure of the matrix now? Is the matrix still TUM? 17

  18. Network Flows Application Example Duality Assignment and Transportation Ship loading problem Plenty of applications. See Ahuja Magnanti Orlin, Network Flows, 1993 • A cargo company (eg, Maersk) uses a ship with a capacity to carry at most r units of cargo. • The ship sails on a long route (say from Southampton to Alexandria) with several stops at ports in between. • At these ports cargo may be unloaded and new cargo loaded. • At each port there is an amount b ij of cargo which is waiting to be shipped from port i to port j > i • Let f ij denote the income for the company from transporting one unit of cargo from port i to port j . • The goal is to plan how much cargo to load at each port so as to maximize the total income while never exceeding ship’s capacity. 18

  19. Network Flows Duality Application Example: Modeling Assignment and Transportation • n number of stops including the starting port and the terminal port. • N = ( V , A , l ≡ 0 , u , c ) be the network defined as follows: • V = { v 1 , v 2 , ..., v n } ∪ { v ij : 1 ≤ i < j ≤ n } • A = { v 1 v 2 , v 2 v 3 , ... v n − 1 v n } ∪ { v ij v i , v ij v j : 1 ≤ i < j ≤ n } • capacity: u v i v i + 1 = r for i = 1 , 2 , ..., n − 1 and all other arcs have capacity ∞ . • cost: c v ij v i = − f ij for 1 ≤ i < j ≤ n and all other arcs have cost zero (including those of the form v ij v j ) • balance vector: b ( v ij ) = b ij for 1 ≤ i < j ≤ n and the balance vector of b ( v i ) = − b 1 i − b 2 i − ... − b i − 1 , i for i = 1 , 2 , ..., n 19

  20. Network Flows Duality Application Example: Modeling Assignment and Transportation 20

  21. Network Flows Duality Application Example: Modeling Assignment and Transportation Claim: the network models the ship loading problem. • suppose that t 12 , t 13 , ..., t 1 n , t 23 , ..., t n − 1 , n are cargo numbers, where t ij ( ≤ b ij ) is the amount of cargo the ship will transport from port i to port j and that the ship is never loaded above capacity. • total income is � I = t ij f ij 1 ≤ i < j ≤ n • Let x be the flow in N defined as follows: • flow on an arc of the form v ij v i is t ij • flow on an arc of the form v ij v j is b ij − t ij • flow on an arc of the form v i v i + 1 , i = 1 , 2 , ..., n − 1, is the sum of those t ab for which a ≤ i and b ≥ i + 1. • since t ij , 1 ≤ i < j ≤ n , are legal cargo numbers then x is feasible with respect to the balance vector and the capacity restriction. • the cost of x is − I . 21

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend