The minimum cost flow problem

Slides:



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

The Primal-Dual Method: Steiner Forest TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AA A A AA A A A AA A A.
Duality for linear programming. Illustration of the notion Consider an enterprise producing r items: f k = demand for the item k =1,…, r using s components:
Linear Programming (LP) (Chap.29)
Linear Programming Simplex Method
Transportation Problem (TP) and Assignment Problem (AP)
Introduction to Algorithms
Copyright (c) 2003 Brooks/Cole, a division of Thomson Learning, Inc
Computational Methods for Management and Economics Carla Gomes Module 6a Introduction to Simplex (Textbook – Hillier and Lieberman)
Network Optimization Models: Maximum Flow Problems In this handout: The problem statement Solving by linear programming Augmenting path algorithm.
Network Simplex Method Fatme Elmoukaddem Jignesh Patel Martin Porcelli.
15.082J and 6.855J and ESD.78J November 4, 2010 The Network Simplex Algorithm.
1. The Simplex Method.
Topic III The Simplex Method Setting up the Method Tabular Form Chapter(s): 4.
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.
The minimum cost flow problem. Simplifying assumptions Network is connected (as an undirected graph). – We can consider each connected component separately.
Linear Programming Revised Simplex Method, Duality of LP problems and Sensitivity analysis D Nagesh Kumar, IISc Optimization Methods: M3L5.
Linear Programming Erasmus Mobility Program (24Apr2012) Pollack Mihály Engineering Faculty (PMMK) University of Pécs João Miranda
Discrete Optimization Lecture #3 2008/3/41Shi-Chung Chang, NTUEE, GIIE, GICE Last Time 1.Algorithms and Complexity » Problems, algorithms, and complexity.
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
1 Bob and Sue solved this by hand: Maximize x x 2 subject to 1 x x 2 ≤ x x 2 ≤ 4 x 1, x 2 ≥ 0 and their last dictionary was: X1.
1 Network Models Transportation Problem (TP) Distributing any commodity from any group of supply centers, called sources, to any group of receiving.
1 THE REVISED SIMPLEX METHOD CONTENTS Linear Program in the Matrix Notation Basic Feasible Solution in Matrix Notation Revised Simplex Method in Matrix.
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.
Simplex Method Simplex: a linear-programming algorithm that can solve problems having more than two decision variables. The simplex technique involves.
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.
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.
An Introduction to Linear Programming
EMGT 6412/MATH 6665 Mathematical Programming Spring 2016
Solving Linear Program by Simplex Method The Concept
Part 3 Linear Programming
Integer Programming An integer linear program (ILP) is defined exactly as a linear program except that values of variables in a feasible solution have.
Linear Programming Revised Simplex Method, Duality of LP problems and Sensitivity analysis D Nagesh Kumar, IISc Optimization Methods: M3L5.
Chap 10. Sensitivity Analysis
Network Simplex Animations
Perturbation method, lexicographic method
Flow in Network.
Duality for linear programming.
Chapter 5. Optimal Matchings
The Network Simplex Method
1.3 Modeling with exponentially many constr.
James B. Orlin Presented by Tal Kaminker
Chapter 4 Linear Programming: The Simplex Method
Chap 9. General LP problems: Duality and Infeasibility
The Simplex Method.
Part 3 Linear Programming
Chap 3. The simplex method
Analysis of Algorithms
Chapter 3 The Simplex Method and Sensitivity Analysis
Dual simplex method for solving the primal
Chapter 8. General LP Problems
2.2 Shortest Paths Def: directed graph or digraph
1.3 Modeling with exponentially many constr.
Chapter 5 Transportation, Assignment, and Transshipment Problems
Flow Feasibility Problems
Chapter 8. General LP Problems
Part 3 Linear Programming
The Network Simplex Method
Simplex method (algebraic interpretation)
DUALITY THEORY Reference: Chapter 6 in Bazaraa, Jarvis and Sherali.
Chapter 8. General LP Problems
Presentation transcript:

The minimum cost flow problem Given network 𝐷=(𝑁,𝐴) with arc costs 𝑐 𝑖𝑗 , together with balance constraints and possibly arc constraints. Find feasible flow 𝑥 minimizing 𝑖𝑗∈𝐴 𝑐 𝑖𝑗 𝑥 𝑖𝑗

Solving the minimum cost flow problem The problem is a special case of the linear programming problem: Minimize 𝑖𝑗∈𝐴 𝑐 𝑖𝑗 𝑥 𝑖𝑗 Subject to 𝑖𝑗∈𝐴 𝑥 𝑖𝑗 − 𝑗𝑖∈𝐴 𝑥 𝑗𝑖 = 𝑏 𝑖 𝑙 𝑖𝑗 ≤ 𝑥 𝑖𝑗 ≤ 𝑢 𝑖𝑗 Today: A specialization of the simplex algorithm to the minimum cost flow problem - The network simplex algorithm.

Simplifying assumptions Network is connected (as an undirected graph). We can consider each connected component separately. Network is uncapacitated (no arc constraints). We can transform any network to an equivalent uncapacitated network. Alternatively: The network simplex algorithm can be extended to handle upper and lower bounds. The network has no 2-cycles Only simplifies the exposition. The algorithm works also with 2-cycles.

LP formulation 𝑖𝑗∈𝐴 𝑐 𝑖𝑗 𝑥 𝑖𝑗 Minimize 𝑖𝑗∈𝐴 𝑐 𝑖𝑗 𝑥 𝑖𝑗 Minimize 𝑖𝑗∈𝐴 𝑥 𝑖𝑗 − 𝑗𝑖∈𝐴 𝑥 𝑗𝑖 = 𝑏 𝑖 𝑥 𝑖𝑗 ≥0 Subject to Following the book we negate both sides of equality constraints – this is done to change the sign of the dual variables.

LP formulation and the dual 𝑖𝑗∈𝐴 𝑐 𝑖𝑗 𝑥 𝑖𝑗 Minimize Primal: 𝑗𝑖∈𝐴 𝑥 𝑗𝑖 − 𝑖𝑗∈𝐴 𝑥 𝑗𝑖 =− 𝑏 𝑖 𝑥 𝑖𝑗 ≥0 Subject to − 𝑖∈𝑁 𝑏 𝑖 𝑦 𝑖 Maximize Dual: Subject to 𝑦 𝑗 − 𝑦 𝑖 ≤ 𝑐 𝑖𝑗 𝑖𝑗∈𝐴

Introducing dual slack variables 𝑖𝑗∈𝐴 𝑐 𝑖𝑗 𝑥 𝑖𝑗 Minimize Primal: 𝑗𝑖∈𝐴 𝑥 𝑗𝑖 − 𝑖𝑗∈𝐴 𝑥 𝑗𝑖 =− 𝑏 𝑖 𝑥 𝑖𝑗 ≥0 Subject to − 𝑖∈𝑁 𝑏 𝑖 𝑦 𝑖 Maximize Dual: Subject to 𝑦 𝑗 − 𝑦 𝑖 + 𝑧 𝑖𝑗 = 𝑐 𝑖𝑗 𝑧 𝑖𝑗 ≥0 𝑖𝑗∈𝐴

Complementary slackness Let 𝑥 and 𝑦,𝑧 be a pair of feasible solutions to the primal and dual LP. Then these are (simultaneously) optimal if and only if 𝑥 𝑖𝑗 𝑧 𝑖𝑗 =0 for all 𝑖𝑗∈𝐴 .

Dictionaries A dictionary defines not just a basic primal solution but also a basic dual solution. They are basic but not necessarily feasible! The pair of basic solutions defined by a dictionary satisfy complimentary slackness. When running the primal simplex algorithm, the dual solution is infeasible until the final dictionary. In fact, the feasibility of the dual solution is exactly the termination criterion.

Primal and dual network simplex Both algorithms work with both a primal and a dual solution. The (primal) network simplex algorithm is used when we have a feasible primal solution. The dual network simplex algorithm is used when we have a feasible dual solution.

Spanning trees and bases A basic solution corresponds to a spanning tree T of the network. Fix a root 𝑟 of T. Erasing the row of the node-arc incidence matrix 𝐴 corresponding to 𝑟 and erasing columns corresponding to arcs not in T results in a non-singular matrix.

The primal solution Start at the leaves of T working towards root, assign flow to satisfy balance constraints. The edges in T are basic variables. Assign flow 0 to edges not in T. The edges not in T are non-basic variables.

The dual solution Assign 0 to dual variable 𝑦 𝑟 of root. Assign 0 to dual slack variables 𝑧 𝑖𝑗 for 𝑖𝑗∈𝑇, to make sure complementary slackness conditions are satisfied. Work from root to leaves computing dual variables by 𝑦 𝑗 = 𝑦 𝑖 + 𝑐 𝑖𝑗 for 𝑖𝑗∈𝑇. Compute remaining dual slack variables 𝑧 𝑖𝑗 for 𝑖𝑗∉𝑇 by 𝑧 𝑖𝑗 = 𝑐 𝑖𝑗 − 𝑦 𝑗 + 𝑦 𝑖 .

Understanding dual solution The dual variable 𝑦 𝑖 can also be computed by: Consider path from 𝑟 to 𝑖. Add costs of forward edges and subtract costs of backward edges. The dual slack 𝑧 𝑖𝑗 for 𝑖𝑗∉𝐴 can also be computed by: Consider cycle formed by 𝑖 and T in direction of 𝑖𝑗. Add costs of forward edges and subtract costs of backward edges.

Complementary slackness: 𝑥 𝑖𝑗 𝑧 𝑖𝑗 =0 for all 𝑖𝑗∈𝐴 . 𝑖𝑗∈𝐴 𝑐 𝑖𝑗 𝑥 𝑖𝑗 Minimize Primal: 𝑗𝑖∈𝐴 𝑥 𝑗𝑖 − 𝑖𝑗∈𝐴 𝑥 𝑖𝑗 =− 𝑏 𝑖 𝑥 𝑖𝑗 ≥0 Subject to − 𝑖∈𝑁 𝑏 𝑖 𝑦 𝑖 Maximize Dual: Subject to 𝑦 𝑗 − 𝑦 𝑖 + 𝑧 𝑖𝑗 = 𝑐 𝑖𝑗 𝑧 𝑖𝑗 ≥0 𝑖𝑗∈𝐴 Complementary slackness: 𝑥 𝑖𝑗 𝑧 𝑖𝑗 =0 for all 𝑖𝑗∈𝐴 .

Observation Since complementary slackness is satisfied by primal and dual solution, we have optimal solutions if 𝑥 𝑖𝑗 ≥0 and 𝑧 𝑖𝑗 ≥0 for all 𝑖𝑗∈𝐴

(Primal) network simplex algorithm Assume 𝑥 is feasible. Do pivot operations to improve the cost of 𝑥 (equivalently: improving the feasibility of (𝑦,𝑧)). Select entering arc: Pick some 𝑖𝑗∈𝐴 with 𝑧 𝑖𝑗 <0. Select leaving arc: Consider cycle formed by 𝑖𝑗 and T in the direction of 𝑖𝑗. Pick backwards edge with minimum flow value. Send flow along cycle to cancel flow on this edge. Update dual solution.

Updating the dual solution Removing leaving arc splits T into two trees. Updating dual variables: If entering arc point from root-containing tree then increase all dual variables in non-root-containing tree by old dual slack of entering arc. Otherwise, decrease all dual variables in non-root-containing tree by old dual slack of entering arc.

Updating the dual solution Updating dual slack variables: Subtract old dual slack of entering arc to arcs bridging in same direction as entering arc, and add old dual slack of entering arc to arcs bridging in the opposite direction of entering arc.

The dual network simplex algorithm Assume (𝑦,𝑧) is feasible. Do pivot operations to make 𝑥 feasible (and thus optimal). Select leaving arc: Pick an arc 𝑖𝑗∈𝑇 with 𝑥 𝑖𝑗 <0. Select entering arc: Find an arc that with T with forms cycle in direction of 𝑖𝑗. Pick such arc with minimum dual slack. Send flow along cycle to increase flow on arc 𝑖𝑗 to 0. Update dual solution as before.

Finding the entering arc Removing leaving arc splits T into two trees. Consider all arcs that bridge the two trees in opposite direction as leaving arc. When such an arc enters the basis all these gets decreased by the dual slack of the chosen arc. Hence we must select one with minimum dual slack.

Initialization We can use the dual network simplex algorithm to find the first feasible solution for the (primal) network simplex algorithm. Temporarily set all costs to 0. Then the the dual solution is automatically feasible. Running the dual network simplex algorithm results in a feasible primal solution (i.e. a feasible flow). We can then revert to the original costs and proceed with the (primal) network simplex algorithm.

Termination As with the normal simplex algorithm we may have degenerate pivot operations and cycling. We can apply the usual anti-cycling rules. We can still have stalling: long sequences of pivot operations that do not improve the solutions. Specialized pivot operations exists that prevent stalling as well.

Complexity In practice the general simplex algorithm very efficient. Each iteration of the network simplex algorithm is much faster than the general simplex algorithm. In worst case the network simplex algorithm can still make exponentially many pivot operations.