Novel update techniques for the revised simplex method (and their application)

Similar documents
The practical revised simplex method (Part 2)

Exploiting hyper-sparsity when computing preconditioners for conjugate gradients in interior point methods

Solving Linear and Integer Programs

Revised Simplex Method

DM545 Linear and Integer Programming. Lecture 7 Revised Simplex Method. Marco Chiarandini

Linear Programming: Simplex

Solving LP and MIP Models with Piecewise Linear Objective Functions

MS&E 318 (CME 338) Large-Scale Numerical Optimization

Permutations in the factorization of simplex bases

9.1 Linear Programs in canonical form

Slack Variable. Max Z= 3x 1 + 4x 2 + 5X 3. Subject to: X 1 + X 2 + X x 1 + 4x 2 + X X 1 + X 2 + 4X 3 10 X 1 0, X 2 0, X 3 0

Brief summary of linear programming and duality: Consider the linear program in standard form. (P ) min z = cx. x 0. (D) max yb. z = c B x B + c N x N

Linear Programming The Simplex Algorithm: Part II Chapter 5

Worked Examples for Chapter 5

The dual simplex method with bounds

CO350 Linear Programming Chapter 6: The Simplex Method

Introduction to optimization

LU Factorization. Marco Chiarandini. DM559 Linear and Integer Programming. Department of Mathematics & Computer Science University of Southern Denmark

Yinyu Ye, MS&E, Stanford MS&E310 Lecture Note #06. The Simplex Method

Linear Programming Redux

Dual Basic Solutions. Observation 5.7. Consider LP in standard form with A 2 R m n,rank(a) =m, and dual LP:

Developing an Algorithm for LP Preamble to Section 3 (Simplex Method)

Part 1. The Review of Linear Programming

Parallel PIPS-SBB Multi-level parallelism for 2-stage SMIPS. Lluís-Miquel Munguia, Geoffrey M. Oxberry, Deepak Rajan, Yuji Shinano

Lecture 5 Simplex Method. September 2, 2009

Linear Algebra Section 2.6 : LU Decomposition Section 2.7 : Permutations and transposes Wednesday, February 13th Math 301 Week #4

21. Solve the LP given in Exercise 19 using the big-m method discussed in Exercise 20.

A review of sparsity vs stability in LU updates

TIM 206 Lecture 3: The Simplex Method

1 Implementation (continued)

Numerical Analysis: Solutions of System of. Linear Equation. Natasha S. Sharma, PhD

1. Algebraic and geometric treatments Consider an LP problem in the standard form. x 0. Solutions to the system of linear equations

Standard Form An LP is in standard form when: All variables are non-negativenegative All constraints are equalities Putting an LP formulation into sta

MVE165/MMG631 Linear and integer optimization with applications Lecture 8 Discrete optimization: theory and algorithms

TR/02/87 February An Investigation of Pricing. Strategies Within Simplex

OPTIMISATION 3: NOTES ON THE SIMPLEX ALGORITHM

Applications. Stephen J. Stoyan, Maged M. Dessouky*, and Xiaoqing Wang

Review Solutions, Exam 2, Operations Research

Lecture 11: Post-Optimal Analysis. September 23, 2009

(17) (18)

Contents. 4.5 The(Primal)SimplexMethod NumericalExamplesoftheSimplexMethod

Lesson 27 Linear Programming; The Simplex Method

Decision Procedures An Algorithmic Point of View

An Enhanced Piecewise Linear Dual Phase-1 Algorithm for the Simplex Method

An Integer Cutting-Plane Procedure for the Dantzig-Wolfe Decomposition: Theory

New Artificial-Free Phase 1 Simplex Method

Chap6 Duality Theory and Sensitivity Analysis

The Dual Simplex Algorithm

Lecture: Algorithms for LP, SOCP and SDP

23. Cutting planes and branch & bound

TRANSPORTATION PROBLEMS

2.098/6.255/ Optimization Methods Practice True/False Questions

Overview of course. Introduction to Optimization, DIKU Monday 12 November David Pisinger

Linear programs Optimization Geoff Gordon Ryan Tibshirani

LP. Lecture 3. Chapter 3: degeneracy. degeneracy example cycling the lexicographic method other pivot rules the fundamental theorem of LP

Linear Programming in Matrix Form

Pivoting. Reading: GV96 Section 3.4, Stew98 Chapter 3: 1.3

LINEAR PROGRAMMING I. a refreshing example standard form fundamental questions geometry linear algebra simplex algorithm

Sensitivity Analysis

The use of shadow price is an example of sensitivity analysis. Duality theory can be applied to do other kind of sensitivity analysis:

A Parametric Simplex Algorithm for Linear Vector Optimization Problems

Motivating examples Introduction to algorithms Simplex algorithm. On a particular example General algorithm. Duality An application to game theory

Linear & Integer programming

Lecture 9: Dantzig-Wolfe Decomposition

Lecture slides by Kevin Wayne

CO350 Linear Programming Chapter 8: Degeneracy and Finite Termination

1 Review Session. 1.1 Lecture 2

F 1 F 2 Daily Requirement Cost N N N

Linear Programming Duality P&S Chapter 3 Last Revised Nov 1, 2004

Transportation Problem

min 4x 1 5x 2 + 3x 3 s.t. x 1 + 2x 2 + x 3 = 10 x 1 x 2 6 x 1 + 3x 2 + x 3 14

Linear Programming and the Simplex method

7. LU factorization. factor-solve method. LU factorization. solving Ax = b with A nonsingular. the inverse of a nonsingular matrix

(includes both Phases I & II)

The Simplex Method. Lecture 5 Standard and Canonical Forms and Setting up the Tableau. Lecture 5 Slide 1. FOMGT 353 Introduction to Management Science

1 date: February 23, 1998 le: papar1. coecient pivoting rule. a particular form of the simplex algorithm.

M340(921) Solutions Problem Set 6 (c) 2013, Philip D Loewen. g = 35y y y 3.

A NEW FACE METHOD FOR LINEAR PROGRAMMING. 1. Introduction We are concerned with the standard linear programming (LP) problem

Farkas Lemma, Dual Simplex and Sensitivity Analysis

4. Duality and Sensitivity

Simplex Algorithm Using Canonical Tableaus

Simplex Method: More Details

A quadratic penalty algorithm for linear programming and its application to linearizations of quadratic assignment problems

Resource Constrained Project Scheduling Linear and Integer Programming (1)

4. Duality Duality 4.1 Duality of LPs and the duality theorem. min c T x x R n, c R n. s.t. ai Tx = b i i M a i R n

Linear programs, convex polyhedra, extreme points

Presolve Reductions in Mixed Integer Programming

MS&E 318 (CME 338) Large-Scale Numerical Optimization

The augmented form of this LP is the following linear system of equations:

Chapter 5 Linear Programming (LP)

(P ) Minimize 4x 1 + 6x 2 + 5x 3 s.t. 2x 1 3x 3 3 3x 2 2x 3 6

COMPUTATIONAL COMPLEXITY OF PARAMETRIC LINEAR PROGRAMMING +

Numerical Linear Algebra

Program Lecture 2. Numerical Linear Algebra. Gaussian elimination (2) Gaussian elimination. Decompositions, numerical aspects

Lecture Simplex Issues: Number of Pivots. ORIE 6300 Mathematical Programming I October 9, 2014

4.5 Simplex method. LP in standard form: min z = c T x s.t. Ax = b

AM 121: Intro to Optimization Models and Methods Fall 2018

From structures to heuristics to global solvers

Interior-Point versus Simplex methods for Integer Programming Branch-and-Bound

Linear programming. Saad Mneimneh. maximize x 1 + x 2 subject to 4x 1 x 2 8 2x 1 + x x 1 2x 2 2

Transcription:

Novel update techniques for the revised simplex method (and their application) Qi Huangfu 1 Julian Hall 2 Others 1 FICO 2 School of Mathematics, University of Edinburgh ERGO 30 November 2016

Overview Background Dual vs primal simplex method Three COAP prizes Hyper-sparsity in the revised simplex method (2005) Data parallel simplex for massive stochastic LPs (2013) Novel update techniques for the revised simplex method (2015) The future Qi Huangfu and Julian Hall Novel update techniques for the revised simplex method 2 / 42

Solving LP problems: Characterizing the feasible region x 3 minimize f = c T x subject to Ax = b x 0 K x 2 x 1 A R m n is full rank Solution of Ax = b is a n m dim. hyperplane in R n Intersection with x 0 is the feasible region K A vertex of K has m basic components, i B given by Ax = b n m zero nonbasic components, j N where B N partitions {1,..., n} A solution of the LP occurs at a vertex of K Qi Huangfu and Julian Hall Novel update techniques for the revised simplex method 3 / 42

Solving LP problems: Characterizing the feasible region x 3 minimize f = c T x subject to Ax = b x 0 K x 2 Equations partitioned according to B N as Bx B + Nx N = b with nonsingular basis matrix B Solution set characterized by x B = B 1 (b Nx N ) [ ] [ ] x At a vertex of K, B b = where x N 0 b = B 1 b 0 K is x B = b B 1 Nx N for some x N 0 x 1 Qi Huangfu and Julian Hall Novel update techniques for the revised simplex method 4 / 42

Solving LP problems: Optimality conditions x 3 minimize f = c T x subject to Ax = b x 0 x 2 Objective partitioned according to B N as K f = c T B x B + c T N x N = c T B ( b B 1 Nx N ) + c T N x N = f + ĉ T N x N x 1 where f = c T B b and ĉ T N = c T N c T B B 1 N is the vector of reduced costs Partition yields an optimal solution if there is Primal feasibility b 0 Dual feasibility ĉ N 0 Qi Huangfu and Julian Hall Novel update techniques for the revised simplex method 5 / 42

The simplex algorithm: Definition x 3 x K x+αd x 2 [ ] b At a feasible vertex x = corresponding to B N 0 1 If ĉ N 0 then stop: the solution is optimal 2 Scan ĉ j < 0 for q to leave N [ ] 3 Let â q = B 1 âq Ne q and d = e q 4 Scan b i /â iq for α and p to leave B 5 Exchange p and q between B and N x 1 6 Go to 1 Qi Huangfu and Julian Hall Novel update techniques for the revised simplex method 6 / 42

The dual simplex algorithm

Solving dual LP problems: Characterizing the feasible region Consider the dual problem maximize f D = b T y subject to A T y + s = c s 0 For a partition B N of the equations with nonsingular basis matrix B [ ] [ ] [ ] B T s y + B c = B N T s N c N So y = B T (c B s B ) and s N = c N N T y = ĉ N + N T B T s B y B T c B At a vertex of the dual feasible region K D, s N = ĉ N, where ĉ N 0 s B 0 Points in K D are given by s B 0 Qi Huangfu and Julian Hall Novel update techniques for the revised simplex method 8 / 42

Solving dual LP problems: Optimality conditions Consider the dual problem maximize f D = b T y subject to A T y + s = c s 0 Substitute y = B T (c B s B ) into the objective to give f D = b T B T (c B s B ) = f b T s B Partition yields an optimal solution if there is Dual feasibility ĉ N 0 Primal feasibility b 0 Dual simplex algorithm for an LP is primal algorithm applied to the dual problem Structure of dual equations allows dual simplex algorithm to be applied to primal simplex tableau Qi Huangfu and Julian Hall Novel update techniques for the revised simplex method 9 / 42

Dual simplex algorithm Assume ĉ N 0 Seek b 0 N RHS Scan b i < 0 for p to leave B Scan ĉ j /â pj for q to leave N B b bp Qi Huangfu and Julian Hall Novel update techniques for the revised simplex method 10 / 42

Dual simplex algorithm Assume ĉ N 0 Seek b 0 N RHS Scan b i < 0 for p to leave B Scan ĉ j /â pj for q to leave N B â pq â T p ĉ q ĉ T N Qi Huangfu and Julian Hall Novel update techniques for the revised simplex method 11 / 42

Dual simplex algorithm Assume ĉ N 0 Seek b 0 N RHS Scan b i < 0 for p to leave B Scan ĉ j /â pj for q to leave N Update: Exchange p and q between B and N B â q â pq â T p b bp Update b := b α p â q α p = b p /â pq ĉ q ĉ T N Update ĉ T N := ĉ T N α d â T p α d = ĉ q /â pq Data required Pivotal row â T p = e T p B 1 N Pivotal column â q = B 1 a q Why does it work? Objective improves by b p ĉ q â pq each iteration Qi Huangfu and Julian Hall Novel update techniques for the revised simplex method 12 / 42

Simplex method: Computation Standard simplex method (SSM): Major computational component 1 N RHS Update of tableau: N := N â q â T p â pq B N b ĉ T N where N = B 1 N Hopelessly inefficient for sparse LP problems Prohibitively expensive for large LP problems Revised simplex method (RSM): Major computational components Pivotal row via B T π p = e p BTRAN and â T p = π T p N PRICE Pivotal column via B â q = a q FTRAN Invert B Qi Huangfu and Julian Hall Novel update techniques for the revised simplex method 13 / 42

Simplex method: Product form update (PFI) for B Each iteration: Exchange p and q between B and N Column p of B replaced by a q to give B = B + (a q Be p )e T p Take B out as a factor on the left B = B[I + (B 1 a q e p )e T p ] = BE 1 η 1....µ. where E = I + (â q e p )e T p =... η m 1 µ = â pq is the pivot; remaining entries in â q form the eta vector η Can solve Bx = r as Bx = r then x := E 1 x as x p := x p /µ then x := x x p η Dantzig and Orchard-Hays (1954) Qi Huangfu and Julian Hall Novel update techniques for the revised simplex method 14 / 42

Simplex method: Dual simplex algorithm enhancements Row selection: Dual steepest edge (DSE) Weight b i by w i : measure of B T e i 2 Requires B 1 π p (FTRAN-DSE) but can reduce iteration count significantly Column selection: Bound-flipping ratio test (BFRT) For general bounded LPs minimize f = c T x subject to Ax = b l x u Dual feasibility: For j N, s j 0 if x j = l j but s j 0 if x j = u j BFRT maximizes the dual objective whilst remaining dual feasible Dual variables may change sign if corresponding primal variables can flip bounds Requires B 1 a F (FTRAN-BFRT) but can reduce iteration count significantly Qi Huangfu and Julian Hall Novel update techniques for the revised simplex method 15 / 42

Simplex algorithm: Primal or dual? Primal simplex algorithm Traditional variant Solution generally not primal feasible when (primal) LP is tightened Dual simplex algorithm Preferred variant Easier to get dual feasibility More progress in many iterations Solution dual feasible when primal LP is tightened Qi Huangfu and Julian Hall Novel update techniques for the revised simplex method 16 / 42

Parallelising the simplex method History SSM: Good parallel efficiency of N := N 1 â pq â q â T p was achieved Many! (1988 date) Only parallel revised simplex is worthwhile: goal of H and McKinnon in 1992! Parallel primal revised simplex method Overlap computational components for different iterations Wunderling (1996), H and McKinnon (1995-2005) Modest speed-up was achieved on general sparse LP problems Parallel dual revised simplex method Only immediate parallelism is in forming π T p N When n m significant speed-up was achieved Bixby and Martin (2000) Qi Huangfu and Julian Hall Novel update techniques for the revised simplex method 17 / 42

Exploiting hyper-sparsity (1998 2003)

Exploiting hyper-sparsity in the revised simplex method Recall: major computational components BTRAN: Form π p = B T e p PRICE: Form â T p = π T p N FTRAN: Form â q = B 1 a q Phenomenon of hyper-sparsity Vectors e p and a q are sparse Results π p, â T p and â q may be sparse because B 1 is sparse Qi Huangfu and Julian Hall Novel update techniques for the revised simplex method 19 / 42

Exploiting hyper-sparsity: When solving Bx = r do k = 1, K Traditional technique transforms r into x r pk := r pk /µ k r := r r pk η k end do Qi Huangfu and Julian Hall Novel update techniques for the revised simplex method 20 / 42

Exploiting hyper-sparsity: When solving Bx = r When r is sparse skip η k if r pk is zero do k = 1, K if (r pk.ne. 0) then r pk := r pk /µ k r := r r pk η k end if end do When x is sparse, the dominant cost is the test for zero Requires efficient identification of vectors η k to be applied Gilbert and Peierls (1988) H and McKinnon (1998 2005) COAP best paper prize (2005) Qi Huangfu and Julian Hall Novel update techniques for the revised simplex method 21 / 42

Data parallelism for stochastic LPs (2012 13)

Stochastic MIP problems: General Two-stage stochastic LPs have column-linked block angular structure minimize c T 0 x 0 + c T 1 x 1 + c T 2 x 2 +... + c T N x N subject to Ax 0 = b 0 T 1 x 0 + W 1 x 1 = b 1 T 2 x 0 + W 2 x 2 = b 2..... T N x 0 + W N x N = b N x 0 0 x 1 0 x 2 0... x N 0 Variables x 0 R n 0 are first stage decisions Variables x i R n i for i = 1,..., N are second stage decisions Each corresponds to a scenario which occurs with modelled probability The objective is the expected cost of the decisions In stochastic MIP problems, some/all decisions are discrete Qi Huangfu and Julian Hall Novel update techniques for the revised simplex method 23 / 42

Stochastic MIP problems: For Argonne Power systems optimization project at Argonne Integer second-stage decisions Stochasticity from wind generation Solution via branch-and-bound Solve root using parallel IPM solver PIPS Lubin, Petra et al. (2011) Solve nodes using parallel dual simplex solver PIPS-S Qi Huangfu and Julian Hall Novel update techniques for the revised simplex method 24 / 42

Parallel distributed-memory simplex for large-scale stochastic LP problems Scope for parallelism Parallel Gaussian elimination yields block LU decomposition of B Scope for parallelism in block forward and block backward substitution Scope for parallelism in PRICE Implementation Distribute problem data over processes Perform data-parallel BTRAN, FTRAN and PRICE over processes Used MPI Solved LP with 500 million variables/constraints on 8192 Blue Gene cores Lubin, H et al. COAP best paper prize (2013) Qi Huangfu and Julian Hall Novel update techniques for the revised simplex method 25 / 42

Novel update techniques for the revised simplex method (2012 13)

Novel update techniques for the revised simplex method: 1 Alternative product form update (APF) Recall: Column p of B is replaced by a q to give B = B + (a q Be p )e T p Traditional PFI (1954) takes B out as a factor on the left so B = BE Idea: Why not take it out on the right! B = [I + (a q Be p )e T p B 1 ]B = TB where T = I + (a q a p )ê T p T is formed of known data and readily invertible (like E for PFI) But: Is this useful? Qi Huangfu and Julian Hall Novel update techniques for the revised simplex method 27 / 42

Novel update techniques for the revised simplex method: 2 Middle product form update (MPF) Recall: Column p of B is replaced by a q to give B = B + (a q Be p )e T p Idea: Substitute B = LU and take factors L on the left and U on the right! B = LU + (a q Be p )e T p = LU + LL 1 (a q Be p )e T p U 1 U = L(I + (ã q Ue p )ẽ T p )U = LTU where T = I + (ã q u p )ẽ T p T is formed of known data and readily invertible (like E for PFI) But: Is this useful? Qi Huangfu and Julian Hall Novel update techniques for the revised simplex method 28 / 42

Novel update techniques for the revised simplex method: 3 Forrest-Tomlin update (1972) Recall: Column p of B is replaced by a q to give B = B + (a q Be p )e T p Idea: Substitute B = LU and take factor L on the left B = L[U + (L 1 a q Ue p )e T p ] = LU where U = U + (ã q u p )e T p is a spiked upper triangular matrix Elementary elimination operations given by L remove the spike and give B = L LŪ Multiple Forrest-Tomlin update Update Forrest-Tomlin representation of B after multiple basis changes Not just a broad spike to be eliminated But: Is this useful? COAP best paper prize (2015) Qi Huangfu and Julian Hall Novel update techniques for the revised simplex method 29 / 42

Multiple iteration parallelism (2011-14)

Multiple iteration parallelism with pami Perform standard dual simplex minor iterations for rows in set P ( P m) Suggested by Rosander (1975) but never implemented efficiently in serial N RHS B â T P b bp ĉ T N Task-parallel multiple BTRAN to form π P = B 1 e P Data-parallel PRICE to form â T p (as required) Task-parallel multiple FTRAN for primal, dual and weight updates Huangfu and H (2011 2014) Qi Huangfu and Julian Hall Novel update techniques for the revised simplex method 31 / 42

Novel update procedures: are they useful? Update 1: Alternative product form update (APF) Recall: B = TB with T easily invertible Used to get π P = B 1 e P from B 1 e P in pami Used to compute multiple B 1 a F efficiently after multiple BFRT in pami Update 2: Middle product form update (MPF) Recall: B = LTU with T easily invertible Not used by pami! Used by Google in glop Update 3: Multiple Forrest-Tomlin update Used to perform multiple Forrest-Tomlin updates after minor iterations in pami Qi Huangfu and Julian Hall Novel update techniques for the revised simplex method 32 / 42

Multiple iteration parallelism: cplex vs pami vs hsol 100 80 60 40 20 0 1 2 3 4 5 cplex pami (8 cores) hsol pami pami is less efficient than hsol in serial pami speedup more than compensates pami performance approaching cplex Qi Huangfu and Julian Hall Novel update techniques for the revised simplex method 33 / 42

Multiple iteration parallelism: cplex vs xpress 100 80 60 40 20 0 1 1.25 1.5 1.75 2 cplex xpress xpress (8 cores) pami ideas incorporated in FICO Xpress (Huangfu 2014) Xpress simplex solver now fastest commercial simplex solver Qi Huangfu and Julian Hall Novel update techniques for the revised simplex method 34 / 42

The future: hsol, an open source high performance simplex solver

hsol: An open source parallel simplex solver hsol and its pami variant are high performance codes Useful open-source resource? Reliable? Well-written? Better than clp? Limitations No presolve No crash No advanced basis start Qi Huangfu and Julian Hall Novel update techniques for the revised simplex method 36 / 42

hsol: Performance and reliability Extended testing using 159 test problems 98 Netlib 16 Kennington 4 Industrial 41 Mittelmann Exclude 7 which are hard Performance Benchmark against clp (v1.16) and cplex (v12.5) Dual simplex No presolve No crash Ignore results for 82 LPs with minimum solution time below 0.1s Qi Huangfu and Julian Hall Novel update techniques for the revised simplex method 37 / 42

hsol: Performance 100 80 60 40 20 0 1 2 3 4 5 clp hsol pami8 cplex Qi Huangfu and Julian Hall Novel update techniques for the revised simplex method 38 / 42

hsol: Reliability 100 80 60 40 20 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 clp hsol pami8 cplex Qi Huangfu and Julian Hall Novel update techniques for the revised simplex method 39 / 42

hsol: Addressing limitations Presolve Presolve (and corresponding postsolve) has been implemented Remove redundancies in the LP to reduce problem dimension Galabova (2016) Crash Value for dual simplex of standard primal crash procedure is being studied Dual steepest edge is expensive to initialize when B I Dual Devex costs nothing to initialize but is less effective H (2016) Advanced basis start Essential for hsol to be used in MIP and SLP solvers Only complication is dual steepest edge vs dual Devex issue Qi Huangfu and Julian Hall Novel update techniques for the revised simplex method 40 / 42

Conclusions Three COAP Prizes Hyper-sparsity: advance in serial simplex Stochastic LP: large scale data-parallelism for special problems Novel updates: (lead to) task and data parallelism in a leading commercial solver High performance open-source parallel simplex solver in preparation After 70 years, the simplex method still has research potential! Slides: http://www.maths.ed.ac.uk/hall/ergo 16.11.30/ Qi Huangfu and Julian Hall Novel update techniques for the revised simplex method 41 / 42

References J. A. J. Hall and K. I. M. McKinnon. Hyper-sparsity in the revised simplex method and how to exploit it. Computational Optimization and Applications, 32(3):259 283, December 2005. Q. Huangfu and J. A. J. Hall. Parallelizing the dual revised simplex method. Technical Report ERGO-14-011, School of Mathematics, University of Edinburgh, 2014. Accepted for publication in Mathematical Programming Computation. Q. Huangfu and J. A. J. Hall. Novel update techniques for the revised simplex method. Computational Optimization and Applications, 60(4):587 608, 2015. M. Lubin, J. A. J. Hall, C. G. Petra, and M. Anitescu. Parallel distributed-memory simplex for large-scale stochastic LP problems. Computational Optimization and Applications, 55(3):571 596, 2013. Qi Huangfu and Julian Hall Novel update techniques for the revised simplex method 42 / 42