1 15.053Tuesday, March 19 The Network Simplex Method for Solving the Minimum Cost Flow Problem Handouts: Lecture Notes Warning: there is a lot to the network.

Slides:



Advertisements
Similar presentations
February 14, 2002 Putting Linear Programs into standard form
Advertisements

Outline LP formulation of minimal cost flow problem
Chapter 5: Linear Programming: The Simplex Method
Linear Programming (LP) (Chap.29)
Transportation Problem (TP) and Assignment Problem (AP)
Introduction to Algorithms
MINIMUM COST FLOWS: NETWORK SIMPLEX ALGORITHM A talk by: Lior Teller 1.
Computational Methods for Management and Economics Carla Gomes Module 8b The transportation simplex method.
Basic Feasible Solutions: Recap MS&E 211. WILL FOLLOW A CELEBRATED INTELLECTUAL TEACHING TRADITION.
Trees and BFSs Page 1 The Network Simplex Method Spanning Trees and Basic Feasible Solutions.
Network Optimization Models: Maximum Flow Problems
Network Optimization Models: Maximum Flow Problems In this handout: The problem statement Solving by linear programming Augmenting path algorithm.
Optimization Linear Programming and Simplex Method
Network Simplex Method Fatme Elmoukaddem Jignesh Patel Martin Porcelli.
MIT and James Orlin © Chapter 3. The simplex algorithm Putting Linear Programs into standard form Introduction to Simplex Algorithm.
NetworkModel-1 Network Optimization Models. NetworkModel-2 Network Terminology A network consists of a set of nodes and arcs. The arcs may have some flow.
15.082J and 6.855J and ESD.78J November 4, 2010 The Network Simplex Algorithm.
15.082J, 6.855J, and ESD.78J September 21, 2010 Eulerian Walks Flow Decomposition and Transformations.
and 6.855J The Capacity Scaling Algorithm.
1 Minimum Cost Flows Goal: Minimize costs to meet all demands in a network subject to capacities (combines elements of both shortest path and max flow.
Topic III The Simplex Method Setting up the Method Tabular Form Chapter(s): 4.
1 1 Slide © 2000 South-Western College Publishing/ITP Slides Prepared by JOHN LOUCKS.
Chapter 7 Transportation, Assignment & Transshipment Problems
Kerimcan OzcanMNGT 379 Operations Research1 Linear Programming: The Simplex Method Chapter 5.
Minimum Cost Flows. 2 The Minimum Cost Flow Problem u ij = capacity of arc (i,j). c ij = unit cost of shipping flow from node i to node j on (i,j). x.
1 1 © 2003 Thomson  /South-Western Slide Slides Prepared by JOHN S. LOUCKS St. Edward’s University.
1 1 © 2003 Thomson  /South-Western Slide Slides Prepared by JOHN S. LOUCKS St. Edward’s University.
Network Optimization Problems
EMIS 8374 Optimal Trees updated 25 April slide 1 Minimum Spanning Tree (MST) Input –A (simple) graph G = (V,E) –Edge cost c ij for each edge e 
 Minimization Problem  First Approach  Introduce the basis variable  To solve minimization problem we simple reverse the rule that is we select the.
1 1 Slide © 2005 Thomson/South-Western Linear Programming: The Simplex Method n An Overview of the Simplex Method n Standard Form n Tableau Form n Setting.
Chapter 4 Linear Programming: The Simplex Method
Chapter 4 Minimum Cost Flow Problems (MCF)
CS 4407, Algorithms University College Cork, Gregory M. Provan Network Optimization Models: Maximum Flow Problems In this handout: The problem statement.
Two Discrete Optimization Problems Problem: The Transportation Problem.
1 Network Models Transportation Problem (TP) Distributing any commodity from any group of supply centers, called sources, to any group of receiving.
OR Chapter 8. General LP Problems Converting other forms to general LP problem : min c’x  - max (-c)’x   = by adding a nonnegative slack variable.
OR Chapter 7. The Revised Simplex Method  Recall Theorem 3.1, same basis  same dictionary Entire dictionary can be constructed as long as we.
Flow in Network. Graph, oriented graph, network A graph G =(V, E) is specified by a non empty set of nodes V and a set of edges E such that each edge.
Chapter 8 Network Models to accompany Operations Research: Applications and Algorithms 4th edition by Wayne L. Winston Copyright (c) 2004 Brooks/Cole,
Network Simplex Animations Network Simplex Animations.
Supplementary: Feasible Labels and Linear Programming  Consider the LP formulation of the shortest s-t path problem: (P) Minimize  (i, j)  A c ij x.
1 Chapter 2 Notation and Definitions Data Structures Transformations.
The minimum cost flow problem. Solving the minimum cost flow problem.
Simplex Method Review. Canonical Form A is m x n Theorem 7.5: If an LP has an optimal solution, then at least one such solution exists at a basic feasible.
15.082J and 6.855J and ESD.78J Network Simplex Animations.
1 Optimization Linear Programming and Simplex Method.
::Network Optimization:: Minimum Spanning Trees and Clustering Taufik Djatna, Dr.Eng. 1.
MIT and James Orlin © The Geometry of Linear Programs –the geometry of LPs illustrated on GTC.
EMGT 6412/MATH 6665 Mathematical Programming Spring 2016
Chap 10. Sensitivity Analysis
The minimum cost flow problem
Network Simplex Animations
Flow in Network.
Jonathan Kalechstain Tel Aviv University
The Network Simplex Method
James B. Orlin Presented by Tal Kaminker
Chapter 4 Linear Programming: The Simplex Method
Introduction Basic formulations Applications
Not Always Feasible 2 (3,5) 1 s (0,2) 3 (, u) t.
Chapter 8. General LP Problems
Successive Shortest Path Algorithm
Successive Shortest Path Algorithm
Flow Feasibility Problems
Network Simplex Animations
The Network Simplex Method
Introduction to Minimum Cost Flows
Not Always Feasible 2 (3,5) 1 s (0,2) 3 (, u) t.
Network Optimization Models: Maximum Flow Problems
The network simplex method
Presentation transcript:

Tuesday, March 19 The Network Simplex Method for Solving the Minimum Cost Flow Problem Handouts: Lecture Notes Warning: there is a lot to the network simplex algorithm, even if it is the same as the simplex algorithm

2 The Minimum Cost Flow Problem Directed Graph G = ( N, A ). –Node set N, arc set A ; –Capacities u ij on arc ( i,j ) –Lower bound of 0 on arc ( i,j ) –Cost c ij on arc ( i,j ) –Supply/demand bi for node i. (Positive indicates supply) A network with costs, capacities, supplies, demands Minimize the cost of sending flow s.t. Flow out of i - Flow into i = b i 0 ≤x ij ≤u ij

3 Formulation We will consider the LP formulation is given as Minimize

4 Pricing Out

5 We call y i a node potential for node i Pricing out is like a export reward for flow leaving a node and a import tax for every unit of flow arriving Reduced costs will be a key to the network simplex algorithm

6 Reduced Costs of Cycles c ij = c ij - y i + y j for each arc (i,j). The reduced cost of a cycle is the cost of the cycle. Node 2 adds $20 to a unit of flow in (1,2) and subtracts $20 from a unit of flow in (2,3)

7 Important Fact: optimizing wrt costs c gives the same optimal solutions as optimizing wrt reduced costs c. Consider impact of potential for node 2. Each unit of flow leaving cost is reduced $20. Each unit of flow arriving cost is increased $20. 8 more leave than arrive. Net impact on cost: 8 x $20 = $160 regardless of the flow

8 Taking Advantage of Reduced Costs c ij = c ij - y i + y j for each arc (i,j). Suppose that I want the reduced costs of (1,2) and (2,3) to both be 0. Note: After, the cost of the cycle is the reduced cost of (3,1).

9 Some Assumptions 1.The network is directed. 2.∑ i=1 to n b( i ) = 0. (Otherwise, there cannot be a feasible solution) 3.There is a feasible solution (see next slide)

10 An Artificial Initial Feasible Solution Add an arc (1, j) for each j with b(j) < 0, with high cost. Add an arc (j, 1) for each j with b(j) > 0, with high cost. Send 2 units of flow from 1 to 4, send 5 units of flow from 1 to 3, and send 3 units of flow from 2 to 1.

11 The basic variables are arc flows, and the arcs form a spanning tree There is one node, called the root. There is a unique path (not directed) from the root to each other node (and vice versa). What is the path from node 1 to node 5?

12 Review of the simplex algorithm Step 1. Start with a basic feasible solution In our algorithm, we will start with a spanning tree and then determine its flow.

13 Calculating A Spanning Tree Flow A tree with supplies and demands. (Assume that all other arcs have a flow of 0) What is the flow in arc (4,3)? HINT: Node 4 has a supply of 2. See the animation.

14 What would happen if the flows in non-tree arcs were not 0? Suppose that non- tree arcs had a non-zero flow. How would this change the computations?

15 What would happen if the flows in non-tree arcs were not 0? Adjust the supplies/demands to take into account arcs with flow at the upper bound. The compute flows as in the previous method; e.g., what is the flow in (4,3)? The flow in (4,3) is 0.

16 Upper bounds In the simplex algorithm, the non-basic variables have a flow of 0. In the simplex algorithm with upper bounds, non-basic variables can have a flow of 0 –or can be at the upper bound. –Non-basic flows at their upper bound lead to changes in the net supply at a node.

17 The simplex algorithm Step 1A. Start with a basic feasible solution Step 1B. Compute simplex multipliers so that the reduced costs of the basic variables are all 0. (That is, make sure that the cost coefficients are also in canonical form.)

18 Finding the Multipliers To do this, we first need to determine the multipliers yi for i=1,…,n by using the fact that c ij - y i + y j =0 for all basic variables.

19 Calculating Simplex Multipliers for a Spanning Tree Here is a spanning tree with arc costs. How can one choose node potentials so that reduced costs of each tree arc is 0? See the animation. Recall: the reduced cost of (i,j) is c ij - π i + π j Suppose that π 1 = 0.

20 Optimality Conditions Once we have the multipliers, we check the following optimality conditions for each nonbasic arc.

21 Looking at a single arc. Suppose c 12 < 0. Then we want the flow to be as high as possible. If x 12 < u 12, the flow in (1,2) is not optimal. We want to increase its flow. If x 12 = u 12, then it is optimal Suppose c 12 > 0. Then we want the flow to be as low as possible. If x 12 > 0, the flow in (1,2) is not optimal. We want to decrease its flow. If x 12 = 0, then it is optimal

22 Checking Reduced Costs First, set the node potentials so that all tree arcs have a reduced cost of 0.

23 Checking Reduced Costs upper bound lower bound (6,5) is at its lower bound. It is a violating arc and could enter the basis. (5,4) is at its upper bound. It satisfies the optimality conditions.

24 The simplex algorithm Step 1A. Start with a basic feasible solution Step 1B. Compute simplex multipliers so that the reduced costs of the basic variables are all 0. Step 2. Choose an entering variable that violates the optimality condition. In the previous example, we would choose (6,5) and not (5,4)

25 Which arc should enter the basis? In the network simplex method with bounded variables, the nonbasic variables are either at their upper or lower bounds. An improved solution can be found by –1. Increasing a variable that has a negative reduced cost and is at its lower bound –2. Decreasing a variable that has a positive reduced cost and is at its upper bound

26 If the entering arc is at its lower bound, increase the flow by ∆. Adding a non-basic arc to the spanning tree creates a basic cycle. Adjust flows in the basic cycle so that supply/demand constraints remain satisfied.

27 If the entering arc is at its upper bound, decrease the flow by ∆. Suppose that (6,5) was at its upper bound. Adjust flows in the basic cycle so that supply/demand constraints remain satisfied. As ∆ is increased, some tree arc will hit its lower or upper bound. (or the optimal solution is unbounded). That arc leaves the basis.

28 Network Simplex Algorithm begin determine an initial feasible tree structure (T, L, U) let x be the initial flow let y be the initial node potentials while some tree arc violates its opt. conditions do begin select an entering arc (k, l) violating opt. conditions add arc (k,l) to the tree and send flow around the basic cycle determine the leaving arc update the node potentials end

29 Essential Points A basis corresponds to a spanning tree for the network Introducing a new variable into the basis forms a unique cycle in the spanning tree and the variable that limits the amount of flow sent in this cycle drops from the basis. There is a speedup for calculating the new node potentials, but we will not discuss it here.

30 Conclusions. The Network Simplex Method –Technique to solve a minimum cost flow problem –Ideas come from Simplex Method –Basic solutions are Spanning Trees

31