The Minimum Cost Network Flow MCNF Problem Extremely
The Minimum Cost Network Flow (MCNF) Problem • Extremely useful model in IEOR • Important Special Cases of the MCNF Problem – – Transportation and Assignment Problems Maximum Flow Problem Minimum Cut Problem Shortest Path Problem • Network Structure – BFS for MCNF LPs always have integer values !!! – Problems can be formulated graphically
General Form of the MCNF Problem • Defined on a network N = (V, A) • V is a set of vertices (nodes) – Each node i has an assoicated value bi • bi < 0 => node i is a demand node with a demand of -bi • bi = 0 => node i is a transshipment node • bi > 0 => node i is a supply node with a supply of bi • A is a set of arcs – arc (i, j) from node i to node j has • cost cij per unit of flow on arc (i, j) • upper bound on flow of uij (capacity) • lower bound on flow of lij (usually 0)
General Form of the MCNF Problem Continued • A flow is feasible if – Flow on all arcs is within the allowable bounds – Flow is balanced (conserved) • total flow going out of node i - total flow coming into node i = bi • We want to find a minimum cost feasible flow • LP Formulation – Let xij be the units of flow on arc (i, j)
Example: Medley Relay Team • Supply Nodes 1, 2, 3 and 4 for John, Paul, George and Ringo • Each has a supply of one swimmer, so bi = 1 • Demand Nodes 5, 6, 7 and 8 for Freestyle, Butterfly, Backstroke and Breaststroke • Each even needs a swimmer, so bi = -1 for i=6, 7, 8, 9 • Arcs from each supply node to each demand node • cij = swimmer i’s time in event j • uij = 1, only one swimmer can be in any event • lij = 0
1 John 5. 88 6. 91 Freestyle -1 Butterfly -1 9. 30 1 Paul 9, 10 8. 46 1 George Backstroke 5. 27 1 Ringo -1 7. 36 Breaststorke -1
LP Formulation • Let xij = 1 if swimmer i swims event j and 0 otherwise MIN 5. 88 X 15 + 6. 91 X 16 + 9. 1 X 17 + 7. 36 X 18 + 9. 3 X 25 + 6. 53 X 26 + 7. 62 X 27 + 3. 28 X 28 + 8. 46 X 35 + 4. 16 X 36 + 2. 62 X 37 + 6. 23 X 38 + 5. 27 X 45 + 7. 01 X 46 + 2. 47 X 47 + 7. 56 X 48 SUBJECT TO 2) X 15 + X 16 + X 17 + X 18 = 1 ! John = swimmer 1 3) X 25 + X 26 + X 27 + X 28 = 1 ! Paul = swimmer 2 4) X 35 + X 36 + X 37 + X 38 = 1 ! George = swimmer 3 5) X 45 + X 46 + X 47 + X 48 = 1 ! Ringo = swimmer 3 6) - X 15 - X 25 - X 35 - X 45 = - 1 ! Freestyle = event 1 7) - X 16 - X 26 - X 36 - X 46 = - 1 ! Butterfly = event 2 8) - X 17 - X 27 - X 37 - X 47 = - 1 ! Backstroke = event 3 9) - X 18 - X 28 - X 38 - X 48 = - 1 ! Breaststroke = event 4 0 <= Xij <= 1 for all (i, j)
LP Solution • X 15 = X 28 = X 36 = X 47 = 1 all other variables = 0 • John swims Freestyle, Paul swims Breaststroke, George swims Butterfly and Ring swims Backstroke. • The total time is 15. 79 minutes. • Observe that the LP solution is integer valued.
Example 2 (From Bazarra and Jarvis) • Transport 20, 000 barrels of oil from Dhahran, Saudi Arabia to Rotterdam (4 Mil. ), Marseilles (12 Mil) and Naples (4 Mil. ) in Europe • Routes – Ship oil around Africa to • Rotterdam • Marseilles • Naples $1. 20/barrel $1. 40/barrel – Dhahran -> Suez Canal -> Port Said • $0. 30/barrel from Dhahran to Suez • $0. 20/barrel through Suez Canal • Port Said to – Rotterdam $0. 25 – Marseilles $0. 20 – Naples $0. 15
Example 2 Continued – Dhahran to Suez then pipeline to Alexandria • $0. 15/barrel through pipeline • Alexandria to – Rotterdam $0. 22 – Marseilles $0. 20 – Naples $0. 15 • 30% of oil in Dhahran shipped in large tankers that can’t go through the Suez Canal • Pipeline from Suez to Alexandria has a capacity of 10 million barrels of oil • Formulate as a MCNF Problem
Network Formulation R PS D M S A N
Network Formulation Continued • Supply Node – Dharhan has a supply of 20 M • Demand Nodes – Rotterdam, Marseilles and Naples have demands of 4 M, 12 M and 4 M, respectively • Transshipment Nodes – Suez, Alexandria and Port Said
Arcs Lower bound = 0 for all arcs Upper bound = infinity for all arcs except (S, A) = 10 million (S, PS) = 14 million
LP Formulation minimize 1. 2 XDR + 1. 4 XDM + 1. 4 XDN + 0. 3 XDS + 0. 2 XSPS + 0. 15 XSA + 0. 25 XPSR + 0. 2 XPSM + 0. 15 XPSN + 0. 25 XAR + 0. 2 XAM + 0. 15 XAN subject to XDR + XDM + XDN + XDS = 20000000 ! D XSPS + XSA - XDS = 0 !S XPSR + XPSM + XPSN - XSPS = 0 ! PS XAR + XAM + XAN - XSA = 0 ! PA -XPSR - XAR - XDR = - 4000000 !R -XPSM - XAM - XDM = - 12000000 !M -XPSN - XAN - XDN = - 4000000 !N XSPS <= 14000000 ! At most 70% through canal XSA <= 10000000 ! Pipeline capacity end
Solution OBJECTIVE FUNCTION VALUE Cost $13, 500, 000 VARIABLE XDS XSPS XSA XPSR XPSM XAN VALUE 20, 000, 000 10, 000 4, 000, 000 6, 000 4, 000
- Slides: 14