revised simplex method
play

Revised Simplex Method Marco Chiarandini Department of Mathematics - PowerPoint PPT Presentation

DM545 Linear and Integer Programming Lecture 7 Revised Simplex Method Marco Chiarandini Department of Mathematics & Computer Science University of Southern Denmark Revised Simplex Method Outline Efficiency Issues 1. Revised Simplex


  1. DM545 Linear and Integer Programming Lecture 7 Revised Simplex Method Marco Chiarandini Department of Mathematics & Computer Science University of Southern Denmark

  2. Revised Simplex Method Outline Efficiency Issues 1. Revised Simplex Method 2. Efficiency Issues 2

  3. Revised Simplex Method Motivation Efficiency Issues Complexity of single pivot operation in standard simplex: • entering variable O ( n ) • leaving variable O ( m ) • updating the tableau O ( mn ) Problems with this: • Time: we are doing operations that are not actually needed Space: we need to store the whole tableau: O ( mn ) floating point numbers • Most problems have sparse matrices (many zeros) sparse matrices are typically handled efficiently the standard simplex has the "Fill in"effect: sparse matrices are lost • accumulation of Floating Point Errors over the iterations 3

  4. Revised Simplex Method Outline Efficiency Issues 1. Revised Simplex Method 2. Efficiency Issues 4

  5. Revised Simplex Method Revised Simplex Method Efficiency Issues Several ways to improve wrt pitfalls in the previous slide, requires matrix description of the simplex. n max c T x max { c T x | A x = b , x ≥ 0 } � max c j x j A x = b j = 1 n x ≥ 0 � a ij x j ≤ b i i = 1 .. m A ∈ R m × ( n + m ) j = 1 c ∈ R ( n + m ) , b ∈ R m , x ∈ R n + m x j ≥ 0 j = 1 .. n At each iteration the simplex moves from a basic feasible solution to another. For each basic feasible solution: • x N = 0 • B = { 1 . . . m } basis • x B ≥ 0 • N = { m + 1 . . . m + n } • A B = [ a 1 . . . a m ] basis matrix • A N = [ a m + 1 . . . a m + n ] 5

  6. Revised Simplex Method Efficiency Issues       A N A B 0 b           c T c T 1 0 N B A x = A N x N + A B x B = b A B x B = b − A N x N Theorem Basic feasible solution ⇐ ⇒ A B is non-singular x B = A − 1 B b − A − 1 B A N x N 6

  7. for the objective function: z = c T x = c T B x B + c T N x N Substituting for x B from above: z = c T B ( A − 1 B b − A − 1 B A N x N ) + c T N x N = B A − 1 B A − 1 = c T B b + ( c T N − c T B A N ) x N Collecting together: x B = A − 1 B b − A − 1 B A N x N B A − 1 B A − 1 z = c T B b + ( c T N − c T B A N ) x N � �� � ¯ A In tableau form, for a basic feasible solution corresponding to B we have:       We do not need to A − 1 A − 1 B A N I 0 B b     compute all elements   of ¯   A   B A − 1 B A − 1 c T N − c T − c T B A N 0 1 B b

  8. Revised Simplex Method Example Efficiency Issues max x 1 + x 2 max x 1 + x 2 − x 1 + x 2 ≤ 1 − x 1 + x 2 + x 3 = 1 x 1 ≤ 3 x 1 + x 4 = 3 x 2 ≤ 2 x 2 + x 5 = 2 x 1 , x 2 ≥ 0 x 1 , x 2 , x 3 , x 4 , x 5 ≥ 0 Initial tableau After two iterations x 1 x 2 x 3 x 4 x 5 − z b x 1 x 2 x 3 x 4 x 5 − z b − 1 1 1 0 0 0 1 1 0 − 1 0 1 0 1 1 0 0 1 0 0 3 0 1 0 0 1 0 2 0 1 0 0 1 0 2 0 0 1 1 − 1 0 2 1 1 0 0 0 1 0 0 0 1 0 − 2 1 3 Basic variables x 1 , x 2 , x 4 . Non basic: x 3 , x 5 . From the initial tableau:       − 1 1 0 1 0 x 1 � x 3 � A B = 1 0 1 A N = 0 0 x B = x 2 x N =       x 5 0 1 0 0 1 x 4 � � � � c T c T B = 1 1 0 N = 0 0 8

  9. Revised Simplex Method Efficiency Issues • Entering variable : in std. we look at tableau, in revised we need to compute: B A − 1 c T N − c T B A N 1. find y T = c T B A − 1 (by solving y T A B = c T B , the latter can be done B more efficiently) 2. calculate c T N − y T A N 9

  10. Revised Simplex Method Efficiency Issues Step 1:   − 1 1 0 � y 1 y 2 y 3 � � 1 1 0 �  = y T A B = c T 1 0 1  B 0 1 0     − 1 0 1 − 1 � 1 1 0 �  = B A − 1 c T = y T 0 0 1 0    B 1 1 − 1 2 Step 2:   1 0 � 0 0 � � − 1 0 2 � � 1 − 2 �  = c T N − y T A N − 0 0  0 1 (Note that they can be computed individually: c j − y T a j > 0) Let’s take the first we encounter x 3 10

  11. • Leaving variable we increase variable by largest feasible amount θ R1: x 1 − x 3 + x 5 = 1 x 1 = 1 + x 3 ≥ 0 R2: x 2 + 0 x 3 + x 5 = 2 x 2 = 2 ≥ 0 R3: − x 3 + x 4 − x 5 = 2 x 4 = 2 − x 3 ≥ 0 B − A − 1 x B = x ∗ B A N x N d is the column of A − 1 B A N that x B = x ∗ B − d θ corresponds to the entering variable, ie, d = A − 1 B a where a is the entering column 3. Find θ such that x B stays positive: Find d = A − 1 B a (by solving A B d = a ) Step 3:             d 1 − 1 0 1 1 − 1 1 − 1  =  =  =  θ ≥ 0 d 2 0 0 1 0 ⇒ d = 0 ⇒ x B = 2  − 0        d 3 1 1 − 1 0 1 2 1 2 − θ ≥ 0 = ⇒ θ ≤ 2 � x 4 leaves

  12. Revised Simplex Method Efficiency Issues • So far we have done computations, but now we save the pivoting update. The update of A B is done by replacing the leaving column by the entering column       x 1 − d 1 θ 3 − 1 1 1  = x ∗ B = x 2 − d 2 θ 2 A B = 1 0 0      2 0 1 0 θ • Many implementations depending on how y T A B = c T B and A B d = a are solved. They are in fact solved from scratch. • many operations saved especially if many variables! • special ways to call the matrix A from memory • better control over numerical issues since A − 1 can be recomputed. B 12

  13. Revised Simplex Method Outline Efficiency Issues 1. Revised Simplex Method 2. Efficiency Issues 13

  14. Revised Simplex Method Solving the two Systems of Equations Efficiency Issues A B x = b solved without computing A − 1 B (costly and likely to introduce numerical inaccuracy) Recall how the inverse is computed: For a 2 × 2 matrix the matrix inverse is � d � d � T � a b � A − 1 = 1 1 � − c − b A = = c d | A | − b a ad − bc − c a For a 3 × 3 matrix the matrix inverse is T   a 11 a 12 a 13 � � � � � � a 22 a 23 a 21 a 23 a 21 a 22   � � � � � � + � − � + A = a 21 a 22 a 23 � � � � � � a 32 a 33 a 31 a 33 a 31 a 32   � � � �   a 31 a 32 a 33    � � � � � �  1 a 12 a 13 a 11 a 13 a 11 a 12 A − 1 =  � � � � � �  − � + � −  � � � � � �  | A | a 32 a 33 a 31 a 33 a 31 a 32  � � � �      � � � � � � a 12 a 13 a 11 a 13 a 11 a 12   � � � � � � + � − � + � � � � � � a 22 a 23 a 21 a 23 a 21 a 22 � � � � 14

  15. Revised Simplex Method Eta Factorization of the Basis Efficiency Issues Let A B = B , k th iteration B k be the matrix with col p differing from B k − 1 Column p is the a column appearing in B k − 1 d = a solved at 3) Hence: B k = B k − 1 E k E k is the eta matrix differing from id. matrix in only one column       − 1 1 1 − 1 1 0 1 − 1  = 1 0 0 1 0 1 1 0      0 1 0 0 1 0 1 No matter how we solve y T B k − 1 = c T B and B k − 1 d = a , their update always relays on B k = B k − 1 E k with E k available. Plus when initial basis by slack variable B 0 = I and B 1 = E 1 , B 2 = E 1 E 2 · · · : B k = E 1 E 2 . . . E k eta factorization (((( y T E 1 ) E 2 ) E 3 ) · · · ) E k = c T u T E 4 = c T B , v T E 3 = u T , w T E 2 = v T , y T E 1 = w T B , ( E 1 ( E 2 · · · E k d )) = a , E 1 u = a , E 2 v = u , E 3 w = v , E 4 d = w 15

  16. Revised Simplex Method LU factorization Efficiency Issues Worth to consider also the case of B 0 � = I : B k = B 0 E 1 E 2 . . . E k eta factorization (((( y T B 0 ) E 1 ) E 2 ) · · · ) E k = c T B ( B 0 ( E 1 · · · E k d )) = a We need an LU factorization of B 0 16

  17. Revised Simplex Method LU Factorization Efficiency Issues To solve the system A x = b by Gaussian Elimination we put the A matrix in row echelon form by means of elementary row operations. Each row operation corresponds to multiply left and right side by a lower triangular matrix L and a permuation matrix P . Hence, the method: A x = b L 1 P 1 A x = L 1 P 1 b L 2 P 2 L 1 P 1 A x = L 2 P 2 L 1 P 1 b . . . L m P m . . . L 2 P 2 L 1 P 1 A x = L m P m . . . L 2 P 2 L 1 P 1 b thus U = L m P m . . . L 2 P 2 L 1 P 1 A triangular factorization of A where U is an upper triangular matrix whose entries in the diagonal are ones. (if A is nonsingular such triangularization is unique) [see numerical example in Va sc 8.1] 17

  18. We can compute the triangular factorization of B 0 before the initial iterations of the simplex: L m P m . . . L 2 P 2 L 1 P 1 B 0 = U We can then rewrite U as U = U m U m − 1 . . . , U 1 Hence, for B k = B 0 E 1 E 2 . . . E k : L m P m . . . L 2 P 2 L 1 P 1 B k = U m U m − 1 . . . U 1 E 1 E 2 · · · E k Then y T B k = c T B can be solved by − 1 U m · · · E k first solving: B k = ( L m P m · · · L 1 P 1 ) � �� � � �� � U L (((( y T U m ) U m − 1 ) · · · ) E k = c T B y L − 1 U = c and then replacing y T by (( y T L m P m ) · · · ) L 1 P 1 w U = c w = y L − 1 = ⇒ y = L w

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend