Presentation is loading. Please wait.

Presentation is loading. Please wait.

8/14/04J. Bard and J. W. Barnes Operations Research Models and Methods Copyright 2004 - All rights reserved Lecture 5 – Integration of Network Flow Programming.

Similar presentations


Presentation on theme: "8/14/04J. Bard and J. W. Barnes Operations Research Models and Methods Copyright 2004 - All rights reserved Lecture 5 – Integration of Network Flow Programming."— Presentation transcript:

1 8/14/04J. Bard and J. W. Barnes Operations Research Models and Methods Copyright 2004 - All rights reserved Lecture 5 – Integration of Network Flow Programming Models Topics Min-cost flow problem (general model) Mathematical formulation and problem characteristics Pure vs. generalized networks

2 2 Min-Cost Flow Problem Warehouses store a particular commodity in Phoenix, Austin and Gainesville. Customers - Chicago, LA, Dallas, Atlanta, & New York Supply [ s i ] at each warehouse i Demand [  d j ] of each customer j Shipping links depicted by arcs, flow on each arc is limited to 200 units. Dallas and Atlanta - transshipment hubs Per unit transportation cost ( c ij ) for each arc Problem:Determine optimal shipping plan that minimizes transportation costs Example: Distribution problem

3 3 GAINS 8 ATL 5 NY 6 DAL 4 CHIC 2 AUS 7 LA 3 PHOE 1 (6) (3) (5) (7) (4) (2) (4) (5) (6) (4) (7) (6) (3) [–150] [200] [–300] [200] [–200] (2) (7) [–250] [700] [supply / demand] (shipping cost) arc lower bounds = 0 arc upper bounds = 200 Distribution Problem

4 4 Notation for Min-Cost Flow Problem In general:[supply/demand] on nodes (shipping cost per unit) on arcs In example:all arcs have an upper bound of 200 nodes labeled with a number 1,...,8 Must indicate notation that is included in model: ( c ij ) for costs ( u ij ) for capacities/simple upper bounds ( g ij ) for gains All 3 could be included: ( c ij, u ij, g ij )

5 5 Spreadsheet Input Data arc name termination node costgain origin node lower bound upper bound x ij ijl ij The origin node is the arc’s tail The termination node is called the head Supplies are positive and demands are negative i j u ij c ij g ij external flow s i or - d i

6 6 Data Entry Using Math Programming/Network Add-in. And here is the solution...

7 7 GAINS ATL NY DAL CHIC AUS LA PHOE (200) (50) (200) [-150] [200] [-300] [200] [-200] (50) (100) [-250] [700] [supply / demand] (flow) Solution to Distribution Problem

8 8 Sensitivity Report for Max Flow Problem

9 9 Characteristics of Network Flow Problems  Conservation of flow at nodes. At each node flow in = flow out. At supply nodes there is an external inflow (positive) At demand nodes there is an external outflow (negative).  Flows on arcs must obey the arc’s bounds. lower bound & upper bound (capacity)  Each arc has a per unit cost & the goal is to minimize total cost.

10 10 Distribution Network 8 5 6 4 2 7 3 1 (6) (3) (5) (7) (4) (2) (4) (5) (6) (4) (7) (6) (3) [-150] [200] [-300] [200] [-200] (2) (7) [-250] [700] [external flow] (cost) lower = 0, upper = 200  NotationNotation

11 11 Pure network  flow at each node is conserved  flow across an arc is conserved  no gains or losses can occur on arcs Min 6x6x 12 + 3x3x 13 + 3x3x 14 + 7x7x 16 +  + 4x4x 85 + 7x7x 86 sit.  x 21 +x 41  x 51 =  200 x 21 +x 23 +x 24 +x 26 = 700  x 23 +x 43  x 63 =  200 x 41 +x 43 +x 46 +x 47 + x 24 +x 54 +x 64 +x 84 =  300... x 84 + x 85 + x 86  x ij  200, for all ( i, j ) combinations which are arcs s.t. xx 12  x 42  x 52 =  200 x 12 + x 13 + x 14 + x 15 = 700 xx 13 + x 43  x 73 =  200 xx 41 + x 42 + x 43 + x 45 + x 46  x 54  x 74  x 84 =  300 Flow balance constraints for each of the 8 nodes =200 LP for Distribution Problem

12 12 Decision variables are the flow variables x ij By examining the flow balance constraints we see that x ij appears in exactly two of them: x ij 0... 0 +1 node i (or in the other order if i > j ) 0... 0  1 node j 0... 0 i j

13 13 If we add the constraints we obtain zero on the left-hand side so the right-hand side must also be zero for feasibility. In particular, this means sum of supplies = sum of demands. Mathematically, we have one redundant constraint. Must be careful in interpreting shadow prices on the flow balance constraints. Cannot change only a supply or demand and have model make sense. Observations from LP Model

14 14 Pure Minimum Cost Flow Problem G = ( N, A )  network with node set N and arc set A Indices i, j  N denote nodes and ( i, j )  A denote arcs Originating set of arcs for node i (tails are i ) is the forward star of i FS( i ) = { ( i, j ) : ( i, j )  A } Terminating set of arcs for node i is the reverse star of i RS( i ) = { ( j, i ) : ( j, i )  A }.

15 15 In our example:example FS(1) = { (1,2), (1,3), (1,4), (1, 5) } RS(1) = Ø FS(4) = { (4,2), (4,3), (4,5), (4,6) } RS(4) = { (1,4), (5, 4), (7,4), (8,4) }  x ij –  x ji = b i ( i, j )  FS( i ) where b i is positive for supply and negative for demand at node i. ( j, i )  RS( i ) Flow Balance equation:

16 16 Pure Min-Cost Flow Problem Indices/sets i, j  N nodes arcs forward star of i reverse star of i ( i, j )  A FS( i ) RS( i ) Data c ij unit cost of flow on ( i, j ) lower bound on flow ( i, j ) upper bound on flow ( i, j ) external flow at node i l ij u ij bibi

17 17 Decision Variables x ij = flow on arc ( i, j ) Formulation Min  c ij x ij (i,j)A(i,j)A s.t.  x ij   x ji = b i,  i  N ( i, j )  FS( i ) ( j, i )  RS( i ) l ij  x ij  u ij,  ( i, j )  A

18 18 Generalized Minimum Cost Network Flow Model one Only one modification to “pure” formulation  a possible gain on each arc, denoted by g ij If g ij = 0.95 then 100 units of flow leaves node i and 95 units arrive at node j

19 19 Generalized Formulation Min  c ij x ij ( i, j )  A s.t. l ij  x ij  u ij,  ( i, j )  A Note that if g ij =1  ( i, j )  A, then we obtain the “pure” model  x ij   g ji x ji = b i,  i  N ( i, j )  FS( i )( j, i )  RS( i )

20 20 Gains and Losses Might experience 5% spoilage of a perishable good during transportation on a particular arc. g ij = 0.95 for the associated arc ( i, j ). In production of manufacturing formulations we might incur losses due to production defects. In financial examples we can have gains due to currency exchange or gains due to returns on investments. US $ Swiss francs Year 1 Year 2 currency exchange 15% return on investment Gain = 1.78 Gain = 1.15

21 21 Pure Network Problems vs. General Network Problems FACT If b i, l ij and u ij are integer-valued then all extreme points of the feasible region for a pure network flow problem give integer values for x ij. (Same cannot be said for generalized network models.) This integer property means that if we use the simplex method to solve a pure network flow problem then we are guaranteed that x ij will be integer at optimality.

22 22 This is critical when we formulate the assignment, shortest path problems, and other network problems. Special cases of the pure min-cost flow model: Transportation problem Assignment problem Shortest path problem Maximum flow problem

23 23 Checking for Arbitrage Opportunities US $Yen(100)CHFD-MarkBrit £ 1 US $ 11.051.451.72.68 2 Yen(100).9511.411.64.64 3CHF.69.7111.14.48 4D-Mark.58.61 0.88 1.39 5 Brit £ 1.501.562.08 1 The table is to be read as follows: The 1.45 in row 1 column 3 means that $1 US will purchase 1.45 Swiss Francs (CHF). In addition, there is a 1% fee that is charged on each exchange.

24 24 Each arc has a gain of g ij. For example, g 12 = (1.05)(0.99) g 51 = (1.50)(0.99) Arbitrage Network: Generalized Min-Cost Flow Problem 5 4 3 2 1 [-1] Brit £ US $ D-Mark CHF Yen Arc costs: c ij = $ equivalent (first column of table) For example: c 14 = 1, c 35 = 0.69

25 25 Solution to Arbitrage Network 1 4 5 3 30.473 0.674 34.986 Start with 13.801 £  34.986 D-Mark  30.473 CHF  14.475 £ Remove 0.674 £  $1 leaving 13.801 £ Brit £ US $ CHF D-Mark 13.801 g 54 = 2.535 g 43 = 0.871 g 35 = 0.475 Note (£  $): g 51 = 1.485 Arc gains in optimal cycle: Total cycle gain: = 1.0488 = 4.88%


Download ppt "8/14/04J. Bard and J. W. Barnes Operations Research Models and Methods Copyright 2004 - All rights reserved Lecture 5 – Integration of Network Flow Programming."

Similar presentations


Ads by Google