Download presentation
Presentation is loading. Please wait.
Published byLeona Pope Modified over 8 years ago
1
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
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
3
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 Min-Cost Flow Problem
4
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 ) unit flow cost on arc ( i, j ) ( u ij ) capacity (or simple upper bound) on arc ( i, j ) ( g ij ) gain or loss on arc ( i, j ) All 3 could be included: ( c ij, u ij, g ij ) Notation for Min-Cost Flow Problem
5
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 External flow balance: total supply = total demand i j u ij c ij g ij external flow s i or - d i Spreadsheet Input Data
6
And here is the solution... Data Entry Using Jensen Network Solver
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
Sensitivity Report for Distribution Problem
9
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 bounds; i.e., lower bound & upper bound (capacity) Each arc has a per unit cost & the goal is to minimize total cost. Characteristics of Network Flow Problems
10
Distribution Network Used in Formulation 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
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 }. Pure Minimum Cost Flow Problem
12
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 = positive for supply node i = negative for demand node i = 0 otherwise ( j, i ) RS( i ) Flow balance equation for node i : In our example:
13
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 Pure Min-Cost Flow Model Total supply = total demand: i b i = 0
14
Decision variables x ij = flow on arc ( i, j ) Formulation for pure min-cost flow model 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
15
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 This structure is called total unimodularity and guarantees integer solutions
16
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
17
oneOnly one modification to “pure” formulation a possible gain (or loss) 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 Generalized Minimum Cost Network Flow Model
18
Min c ij x ij (i, j )A(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 ) Generalized Formulation
19
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 Gains and Losses
20
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. Pure Network Problems vs. General Network Problems
21
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
22
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. Checking for Arbitrage Opportunities
23
Each arc has a gain of g ij. For example, g 12 = (1.05)(0.99) g 35 = (0.48)(0.99) 5 4 3 2 1 [-1] Brit £ US $ D-Mark CHF Yen Arc costs: c ij = $ equivalent (first column of table) For example: c 12 = 1.05, c 35 = 0.48 Arbitrage Network: Generalized Min-Cost Flow Problem
24
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% Solution to Arbitrage Network
25
What You Should Known About General Network Flow Problems How to view flow on an arch with a gain or loss. How to formulate a general network flow problem as a linear program. What the implications are for a network flow problem with gains. How to solve general network flow problems using the Excel add-ins.
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.