Chapter 4 The Simplex Algorithm Part II

Similar documents
IE 400: Principles of Engineering Management. Simplex Method Continued

The Simplex Algorithm

Chapter 4 The Simplex Algorithm Part I

Dr. Maddah ENMG 500 Engineering Management I 10/21/07

The Big M Method. Modify the LP

AM 121: Intro to Optimization

IE 400 Principles of Engineering Management. The Simplex Algorithm-I: Set 3

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

Review Solutions, Exam 2, Operations Research

Sensitivity Analysis and Duality

The Simplex Algorithm and Goal Programming

Simplex Algorithm Using Canonical Tableaus

Theory of Linear Programming

Example. 1 Rows 1,..., m of the simplex tableau remain lexicographically positive

Linear Programming. Xi Chen. Department of Management Science and Engineering International Business School Beijing Foreign Studies University

Linear Programming. Dr. Xiaosong DING

ECE 307 Techniques for Engineering Decisions

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

AM 121 Introduction to Optimization: Models and Methods Example Questions for Midterm 1

Simplex Method for LP (II)

Lecture 2: The Simplex method

Variants of Simplex Method

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

MATH 445/545 Homework 2: Due March 3rd, 2016

CO350 Linear Programming Chapter 8: Degeneracy and Finite Termination

1 Review Session. 1.1 Lecture 2

Gauss-Jordan Elimination for Solving Linear Equations Example: 1. Solve the following equations: (3)

The simplex algorithm

9.1 Linear Programs in canonical form

MATH 445/545 Test 1 Spring 2016

Math 273a: Optimization The Simplex method

Linear Programming, Lecture 4

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

Lesson 27 Linear Programming; The Simplex Method

CPS 616 ITERATIVE IMPROVEMENTS 10-1

Linear Programming and the Simplex method

Special cases of linear programming

Simplex method(s) for solving LPs in standard form

Linear & Integer programming

OPERATIONS RESEARCH. Linear Programming Problem

February 17, Simplex Method Continued

IE 5531: Engineering Optimization I

Linear Programming. Linear Programming I. Lecture 1. Linear Programming. Linear Programming

Contents. 4.5 The(Primal)SimplexMethod NumericalExamplesoftheSimplexMethod

The Graphical Method & Algebraic Technique for Solving LP s. Métodos Cuantitativos M. En C. Eduardo Bustos Farías 1

Metode Kuantitatif Bisnis. Week 4 Linear Programming Simplex Method - Minimize

Math Models of OR: Some Definitions

OPRE 6201 : 3. Special Cases

Lecture 4: Algebra, Geometry, and Complexity of the Simplex Method. Reading: Sections 2.6.4, 3.5,

Summary of the simplex method

Ann-Brith Strömberg. Lecture 4 Linear and Integer Optimization with Applications 1/10

AM 121: Intro to Optimization Models and Methods Fall 2018

F 1 F 2 Daily Requirement Cost N N N

ORF 522. Linear Programming and Convex Analysis

The Simplex Method. Standard form (max) z c T x = 0 such that Ax = b.

Dr. S. Bourazza Math-473 Jazan University Department of Mathematics

Optimization (168) Lecture 7-8-9

AM 121: Intro to Optimization Models and Methods

MATH2070 Optimisation

Ω R n is called the constraint set or feasible set. x 1

In Chapters 3 and 4 we introduced linear programming

GETTING STARTED INITIALIZATION

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

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

3 Does the Simplex Algorithm Work?

The Simplex Method: An Example

Section 4.1 Solving Systems of Linear Inequalities

Lecture slides by Kevin Wayne

Prelude to the Simplex Algorithm. The Algebraic Approach The search for extreme point solutions.

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

Chap6 Duality Theory and Sensitivity Analysis

CO 602/CM 740: Fundamentals of Optimization Problem Set 4

Part 1. The Review of Linear Programming

OPTIMISATION 3: NOTES ON THE SIMPLEX ALGORITHM

A = Chapter 6. Linear Programming: The Simplex Method. + 21x 3 x x 2. C = 16x 1. + x x x 1. + x 3. 16,x 2.

Introduce the idea of a nondegenerate tableau and its analogy with nondenegerate vertices.

Linear programs Optimization Geoff Gordon Ryan Tibshirani

Summary of the simplex method

Systems Analysis in Construction

Introduction to the Simplex Algorithm Active Learning Module 3

Lecture 5 Simplex Method. September 2, 2009

Sensitivity Analysis

Week_4: simplex method II

TIM 206 Lecture 3: The Simplex Method

Algebraic Simplex Active Learning Module 4

Chapter 5 Linear Programming (LP)

OPERATIONS RESEARCH. Michał Kulej. Business Information Systems

Introduction to Operations Research Prof. G. Srinivasan Department of Management Studies Indian Institute of Technology, Madras

Notes: Deterministic Models in Operations Research

Linear Programming Redux

4.6 Linear Programming duality

THE UNIVERSITY OF HONG KONG DEPARTMENT OF MATHEMATICS. Operations Research I

CSCI 1951-G Optimization Methods in Finance Part 01: Linear Programming

CSC Design and Analysis of Algorithms. LP Shader Electronics Example

3. THE SIMPLEX ALGORITHM

Chapter 3, Operations Research (OR)

Linear Programming for Planning Applications

c) Place the Coefficients from all Equations into a Simplex Tableau, labeled above with variables indicating their respective columns

A Review of Linear Programming

UNIT-4 Chapter6 Linear Programming

Transcription:

Chapter 4 The Simple Algorithm Part II Based on Introduction to Mathematical Programming: Operations Research, Volume 4th edition, by Wayne L Winston and Munirpallam Venkataramanan Lewis Ntaimo L Ntaimo (c) 005 INEN40 TAMU

So Far Modeling LPs Solving -variable LPs graphically Simple method - Ma LPs Simple method - Min LPs Method : Multiply objective function by - Method : Modify Step 3 of simple algorithm for Ma LPs Simple method Special cases: Alternative optimal solutions Unbounded LPs L Ntaimo (c) 005 INEN40 TAMU

Degeneracy and Convergence of the Simple Algorithm L Ntaimo (c) 005 INEN40 TAMU 3

L Ntaimo (c) 005 INEN40 TAMU 4 4 Convergence of the Simple Method 0 st Ma z = = b A c T Recall: Where, = mn m m n n a a a a a a a a a A = n = c n c c c = b m b b b Assumption: Constraint matri A has n columns and m linearly independent rows So we can form an m m square matri called the basis by setting (n - m) variables to zero (nonbasic variables or nbv s) The remaining variables are the basic variables or bv s

4 Convergence of the Simple Method Recall that for any LP with m constraints, two bfs are said to be adjacent if their sets of bv s have (m - )bv s in common eg bfs of two immediate simple tableaus are adjacent bfs If an LP in standard form has m constraints and n variables, then there may be a basic solution for each choice of nonbasic variables From n variables, in how many different ways can a set of (n - m) nonbasic variables (or equivalently, m basic variables) be chosen? n = m n! ( n m)! m! n m Thus an LP can have at most basic solutions! L Ntaimo (c) 005 INEN40 TAMU 5

4 Convergence of the Simple Method For n = 0 and m = 0 we have: 0 = 0 0! =? (0 0)! 0! 84,756 bfs! Assuming that no bfs is repeated the simple algorithm will find the optimal bfs after a finite number of iterations Vast eperience with the simple algorithm indicates that an optimal solution is found after eamining fewer than 3m bfs (eg 3(0) = 30) Compared with eamining 84,756 bfs, the simple algorithm is quite efficient! L Ntaimo (c) 005 INEN40 TAMU 6

4 Degeneracy and Convergence of the Simple Method Definition: An LP is degenerate if it has at least one bfs in which a basic variable is equal to zero We say that an LP is nondegenerate if all bfs are positive Theoretically, the simple algorithm (as you have learned it so far) can fail to find the optimal solution to an LP However, LPs arising from actual applications seldom ehibit this behavior L Ntaimo (c) 005 INEN40 TAMU 7

4 Degeneracy and Convergence of the Simple Method Consider the following relationship for a ma LP: z-value for new bfs = z-value for current bfs (value of entering variable in new bfs)*(coefficient of entering variable in row 0 of current bfs) Recall: (coefficient of entering variable in row 0) < 0 and (value of entering variable in new bfs) >= 0 Two Facts: () If (value of entering variable in new bfs) > 0), then (z-value for new bfs) > (z-value for current bfs) () If (value of entering variable in new bfs) = 0), then (z-value for new bfs) = (z-value for current bfs) L Ntaimo (c) 005 INEN40 TAMU 8

4 Degeneracy and Convergence of the Simple Method Fact implies that each iteration of the simple algorithm will increase z for a nondegenerate LP This means that it is impossible to encounter the same bfs twice So if we use the simple algorithm to solve a nondegenerate LP, we are guaranteed to find the optimal solution in a finite number of iterations Fact implies that the simple algorithm may fail for a degenerate LP In this case the algorithm will encounter the same bfs at least twice This occurrence is called cycling If cycling occurs then the algorithm can loop, or cycle, forever among a set of bfs and never get to the optimal solution! L Ntaimo (c) 005 INEN40 TAMU 9

L Ntaimo (c) 005 INEN40 TAMU 0 4 Degeneracy and Convergence of the Simple Method Eample: Solve the following LP using the simple tableau method 0, 0 6 st 5 Ma + + = z Converting to standard form: 0,,, 0 6 st 5 Ma = + = + + + = s s s s z

4 Degeneracy and Convergence of the Simple Method Eample: Solve using the simple tableau method Initial Tableau Solution Row z s s RHS BV MRT 0-5 - 0 0 0 z = 0 z = 0 0 0 6 s = 6 6 = 0 0-0 0 s = 0 0* = 0 Second Tableau Row z s s RHS BV MRT 0 0-7 0 5 0 z = 0 z = 0 0 0-6 s = 6 3* = 0 0-0 0 = 0 None = 0 Cycling: We encounter same bfs twice! Third (Optimal) Tableau Row z s s RHS BV MRT 0 0 0 35 5 z = z = 0 0 05-05 3 = 3 = 3 0 0 05 05 3 = 3 = 3 Optimal Solution: z =, = 3, =3 L Ntaimo (c) 005 INEN40 TAMU

4 Degeneracy and Convergence of the Simple Method If an LP has many degenerate bfs (or a bfs with many bv s equal to zero), then the simple algorithm is often very inefficient Eample: Solve the previous eample using the graphical method B 6 4 D + C A 4 6 z = z = 0 5 + = 0 6 0 The etreme points of the feasible region are B,C and D Three sets of basic variables correspond to etreme point C BV's BFS Etreme Point, = = 3, s = s = 0 D, s = 0, s = 6, = s = 0 C, s = 6, s = -6, = s = 0 Infeasible, s = 0, s = 6, = s = 0 C, s = 6, s = 6, s = = 0 B s, s s = 6, s = 0, = = 0 C L Ntaimo (c) 005 INEN40 TAMU

4 Degeneracy and Convergence of the Simple Method For an LP with n decision variables to be degenerate, (n+) or more of the LP s constraints (including the sign restrictions i 0 as constraints) must be binding at an etreme point Fortunately, the simple method can be modified to ensure that cycling will never occur Apply the so called anti-cycling rules L Ntaimo (c) 005 INEN40 TAMU 3

4 Degeneracy and Convergence of the Simple Method Bland s Rules for Anti-Cycling: Smallest Subscript Pivoting Rule (Assume that slack and ecess variables are numbered n+, n+, ) Step Choose as the entering variable (in a ma problem) the variable with a negative coefficient in row 0 that has the smallest subscript Step If there is a tie in the minimum ratio test, then break the tie by choosing the winner of the ratio test so that the variable leaving the basis has the smallest subscript L Ntaimo (c) 005 INEN40 TAMU 4

4 Degeneracy and Convergence of the Simple Method Additional homework problems have been posted on the course website on degeneracy and convergence of the simple method L Ntaimo (c) 005 INEN40 TAMU 5

The Big M Method L Ntaimo (c) 005 INEN40 TAMU 6

4 The Big M Method Recall that the simple method algorithm requires a starting bfs In all the LPs we have considered so far, we have found starting bfs by using the slack variables as our basic variables If an LP has or = constraints, however, a starting bfs may not be readily apparent In such a case, we need another method to solve the problem L Ntaimo (c) 005 INEN40 TAMU 7

4 The Big M Method Consider the following problem: Bevco manufactures an orange-flavored soft drink called Oranj by combining orange soda and orange juice Each orange soda contains 05 oz of sugar and mg of vitamin C Each ounce of orange juice contains 05 oz of sugar and 3 mg of vitamin C It costs Bevco to produce an ounce of orange soda and 3 to produce an ounce of orange juice Bevco s marketing department has decided that each 0- oz bottle of Oranj must contain at least 0 mg of vitamin C and at most 4 oz of sugar Use linear programming to determine how Bevco can meet the marketing department s requirements at minimum cost L Ntaimo (c) 005 INEN40 TAMU 8

4 The Big M Method Decision variables: = number of ounces of orange soda in a bottle of Oranj = number of ounces of orange juice in a bottle of Oranj LP: Min z = + 3 st 05 + 05 4 (sugar constraint) + 3 0 + = 0, 0 (vitamin C constraint) (0 oz in bottle of Oranj) L Ntaimo (c) 005 INEN40 TAMU 9

4 The Big M Method The LP in standard: Min z = + 3 st 05 + 05 + s = 4 + 3 -e = 0 + = 0,, s, e 0 The LP in standard form has z and s which could be used for BVs but row would violate sign restrictions and row 3 has no readily apparent basic variable L Ntaimo (c) 005 INEN40 TAMU 0

4 The Big M Method In order to use the simple method, a bfs is needed The idea of the Big M method is to create artificial variables to provide an initial bfs and then eliminate them from the final solution The variables will be labeled a i according to the row i in which they are used as follows Row 0: z - - 3 Row : 05 + 05 + s = 4 Row : + 3 -e + a = 0 Row 3: + + a 3 = 0 L Ntaimo (c) 005 INEN40 TAMU

4 The Big M Method In the optimal solution, all artificial variables must be set equal to zero To accomplish this, in a min LP, a term Ma i is added to the objective function for each artificial variable a i For a ma LP, the term Ma i is added to the objective function for each a i M represents some very large number The modified Bevco LP in standard form then becomes: Min z = + 3 + Ma + Ma 3 st 05 + 05 + s = 4 + 3 -e + a = 0 + + a 3 = 0,, s, e, a, a 3 0 Modifying the objective function this way makes it etremely costly for an artificial variable to be positive The optimal solution should force a = a 3 =0 L Ntaimo (c) 005 INEN40 TAMU

4 The Big M Method The rows of the simple tableau would then be: Row 0: z - - 3 - Ma -Ma 3 = 0 Row : 05 + 05 + s = 4 Row : + 3 -e + a = 0 Row 3: + + a 3 = 0 But observe that to have canonical form we need to eliminate a and a 3 from row 0! Simply set new Row 0 to Row 0 + M(Row ) + M(Row 3) z - - 3 - Ma -Ma 3 = 0 M( + 3 - e + a = 0) + M( + + a 3 = 0) z + (M-) +(4M-3) Me = 30M L Ntaimo (c) 005 INEN40 TAMU 3

4 The Big M Method Description of the Big M Method Modify the constraints so that the rhs of each constraint is nonnegative Identify each constraint that is now an = or constraint Convert each inequality constraint to standard form (add a slack variable for constraints, add an ecess variable for constraints) 3 For each or = constraint, add artificial variables Add sign restriction a i 0 4 Let M denote a very large positive number Add (for each artificial variable) Ma i to min problem objective functions or -Ma i to ma problem objective functions 5 Since each artificial variable will be in the starting basis, all artificial variables must be eliminated from row 0 before beginning the simple Remembering M represents a very large number, solve the transformed problem by the simple L Ntaimo (c) 005 INEN40 TAMU 4

4 The Big M Method If all artificial variables in the optimal solution equal zero, the solution is optimal If any artificial variables are positive in the optimal solution, the problem is infeasible L Ntaimo (c) 005 INEN40 TAMU 5

4 The Big M Method The Bevco eample continued (Using Method for Min LP): Details Iteration z s e a a3 rhs ratio ero 0 00 M - 4M -3 -M 30M Row 0 + M(Row ) + M(Row 3) 050 05 00 400 6 00 3-00 00 000 667 3 00 00 00 000 0 ero z s e a a3 rhs ero 0 00 M - 4M -3 -M 30M 050 05 00 400 033-033 033 667 Row /3 3 00 00 00 000 ero z s e a a3 rhs ero 0 00 (M-3)/3 (M-3)/3 (3-4M)/3 (60+0M)/3 Row 0 - (4M-3)*(Row ) 050 05 00 400 033-033 033 667 3 00 00 00 000 ero 3 z s e a a3 rhs ero 0 00 (M-3)/3 (M-3)/3 (3-4M)/3 (60+0M)/3 04 00 008-008 33 Row - 05*(Row ) 033-033 033 667 3 00 00 00 000 ero 4 z s e a a3 rhs ero 0 00 (M-3)/3 (M-3)/3 (3-4M)/3 (60+0M)/3 04 00 008-008 33 033-033 033 667 3 067 033-033 00 333 Row 3 - Row L Ntaimo (c) 005 INEN40 TAMU 6

4 The Big M Method Iteration z s e a a3 rhs ratio 0 00 (M-3)/3 (M-3)/3 (3-4M)/3 (60+0M)/3 04 00 008-008 33 560 033-033 033 667 000 3 067 033-033 00 333 500 ero z s e a a3 rhs ero 0 00 (M-3)/3 (M-3)/3 (3-4M)/3 (60+0M)/3 04 00 008-008 33 033-033 033 667 3 00 050-050 50 500 (Row 3)*(3/) ero z s e a a3 rhs ero 0 00-050 (-M)/ (3-M)/ 500 Row 0 + (3-M)*(Row 3)/3 04 00 008-008 33 033 00-033 033 667 3 00 050-050 50 500 ero 3 z s e a a3 rhs ero 0 00-050 (-M)/ (3-M)/ 500 00-03 03-063 05 Row - (5/)*Row 3) 033 00-033 033 667 3 00 050-050 50 500 ero 4 z s e a a3 rhs ero 0 00-050 (-M)/ (3-M)/ 500 00-03 03-063 05 00-050 050-050 500 Row -(/3)*Row 3 3 00 050-050 50 500 Optimal Solution: z = 5, = 5, =5 L Ntaimo (c) 005 INEN40 TAMU 7

4 The Big M Method The Bevco eample continued (Using Method for Min LP): Initial Tableau Row z s e a a3 RHS BV MRT 0 M- 4M-3 0 -M 0 0 30M z = 30M 0 05 05 0 0 0 4 s = 4 6 0 3 0-0 0 a = 0 667* 3 0 0 0 0 0 a3 = 0 0 Second Tableau Row z s e a a3 RHS BV MRT 0 (M-3)/3 0 0 (M-3)/3 (3-4M)/3 0 (60+0M)/3 z = (60+0M)/3 0 5/ 0 / -/ 0 7/3 s = 7/3 56 0 /3 0 -/3 /3 0 0/3 = 0/3 0 3 0 /3 0 0 /3 -/3 0/3 a3 = 0/3 5* Third (Optimal) Tableau Row z s e a a3 RHS BV MRT 0 0 0 0 -/ (-M)/ (3-M)/ 5 z = 5 0 0 0 -/8 /8-5/8 /4 s = /4 0 0 0 -/ / -/ 5 = 5 3 0 0 0 / -/ 3/ 5 = 5 Optimal Solution: z = 5, = 5, =5 L Ntaimo (c) 005 INEN40 TAMU 8

4 The Big M Method Issues with the Big M Method ) It is difficult to determine how large M should be Generally chosen to be at least 00 times the largest coefficient in the objective function ) Introduction of such large numbers cause round off errors and other computational difficulties (numerical instability) Read section on Scaling of LPs on page 67 This motivates the need for yet another method! L Ntaimo (c) 005 INEN40 TAMU 9

4 The Big M Method Problem (0 pts) Get with your team and solve the following LP using the Big M method : Min st z = 3 +, 6 = 3 0 L Ntaimo (c) 005 INEN40 TAMU 30

L Ntaimo (c) 005 INEN40 TAMU 3 4 The Big M Method Solution to Problem (0 pts): LP is standard form: 0,, 3 6 st 3 Min = + = + = e e z Big M Formulation: 0,,,, 3 6 st 3 Min = + + = + + + + = a a e a a e Ma Ma z

4 The Big M Method Eliminate a and a from row 0 Simply set new Row 0 to Row 0 + M(Row ) + M(Row 3): z - 3 - Ma -Ma = 0 M( + - e + a = 6) + M( + + a = 3) z + (3M-3) + (3M) Me = 9M L Ntaimo (c) 005 INEN40 TAMU 3

4 The Big M Method Using Method of the simple algorithm for min LPs: pts Initial Tableau Row z e a a RHS BV MRT 0 3M-3 3M -M 0 0 9M z = 9M 0-0 6 a = 6 6 0 0 0 3 a = 3 3/* 3 pts Second Tableau Row z e a a RHS BV MRT 0 (3M-6)/ 0 -M 0-3/M 45M z = 45M 0 5 0 - - 45 a = 45 3* 0 05 0 0 05 5 = 5 3 3 pts Third (Optimal) Tableau Row z e a a RHS BV MRT 0 0 0 - -M -(4+M)/ 9 z = 9 0 0 -/3 /3 -/3 3 = 3 0 0 05-05 0 = 0 Optimal Solution: z = 9, = 3, = 0 pts L Ntaimo (c) 005 INEN40 TAMU 33

The Two-Phase Simple Method L Ntaimo (c) 005 INEN40 TAMU 34

43 The Two-Phase Simple Method When an initial basic feasible solution is not available, the twophase simple method can be used as an alternative to the Big M method In this method we can add artificial variables, and then focus entirely on obtaining an initial basic feasible solution, any basic feasible solution (This is called Phase I) We can then start the simple algorithm with the basic feasible solution we have found (This is called Phase II) L Ntaimo (c) 005 INEN40 TAMU 35

43 The Two-Phase Simple Method Observe that if all we want is a basic feasible solution, then we can select any objective function Once we find a basic feasible solution, we can reconsider the original cost coefficients Also note that it is easy to bring cost coefficients into canonical form It is desirable to choose an objective function such that solving the Phase I LP will force the artificial variables to be zero Minimize the sum of artificial variables! L Ntaimo (c) 005 INEN40 TAMU 36

43 The Two-Phase Simple Method Consider solving the Bevco problem using the two-phase simple method: Decision variables: LP: = number of ounces of orange soda in a bottle of Oranj = number of ounces of orange juice in a bottle of Oranj Min z = + 3 st 05 + 05 4 (sugar constraint) + 3 0 + = 0, 0 (vitamin C constraint) (0 oz in bottle of Oranj) L Ntaimo (c) 005 INEN40 TAMU 37

43 The Two-Phase Simple Method The LP in standard: Min z = + 3 st 05 + 05 + s = 4 + 3 -e = 0 + = 0,, s, e 0 Note again that the LP in standard form has z and s which could be used for BVs but row would violate sign restrictions and row 3 has no readily apparent basic variable L Ntaimo (c) 005 INEN40 TAMU 38

43 The Two-Phase Simple Method Adding artificial variables we get the following: Min z = + 3 st 05 + 05 + s = 4 + 3 -e + a = 0 + + a 3 = 0,, s, e, a, a 3 0 Then the Phase I LP is: Min w = a + a 3 st 05 + 05 + s = 4 + 3 -e + a = 0 + + a 3 = 0,, s, e, a, a 3 0 L Ntaimo (c) 005 INEN40 TAMU 39

43 The Two-Phase Simple Method Note that row 0 for this tableau contains the basic variables a and a 3 : Row 0: w - a -a 3 = 0 Row : 05 + 05 + s = 4 Row : + 3 -e + a = 0 Row 3: + + a 3 = 0 As in the Big M method, we need to eliminate a and a 3 from row 0 to get a canonical form Simply add Row + Row 3 to Row 0: w - a -a 3 = 0 + 3 -e + a = 0 + + + a 3 = 0 w + + 4 e = 30 L Ntaimo (c) 005 INEN40 TAMU 40

43 The Two-Phase Simple Method Description of the Two-Phase Simple Method Modify the constraints so that the rhs of each constraint is nonnegative Identify each constraint that is now an = or constraint Convert each inequality constraint to standard form (add a slack variable for constraints, add an ecess variable for constraints) 3 For each or = constraint, add artificial variables Add sign restriction a i 0 4 For now, ignore the original LP s objective function Instead solve an LP whose objective function is min w = (sum of all artificial variables) This is the Phase I LP Solving the Phase I LP will force the artificial variables to be zero L Ntaimo (c) 005 INEN40 TAMU 4

43 The Two-Phase Simple Method Description of the Two-Phase Simple Method cont Since each a i 0, solving the Phase I LP will result in one of the following three cases: Case : The optimal value of w > 0 In this case the original LP is infeasible Case : The optimal value of w = 0 and no artificial variables are in the optimal Phase I basis Drop all columns in the optimal Phase I tableau that correspond to the artificial variables In this case, combine the original objective function with the constraints from the optimal Phase I tableau This yields the Phase II LP The optimal solution to the Phase II LP is the optimal solution to the original LP Case 3: The optimal value of w = 0 and at least one artificial variable is in the optimal Phase I basis In this case, we can find the optimal solution to the original LP if at the end of Phase I we drop from the optimal Phase I tableau all nonbasic artificial variables and any variable from the original problem that has a negative coefficient in row 0 of the optimal Phase I tableau L Ntaimo (c) 005 INEN40 TAMU 4

43 The Two-Phase Simple Method The Bevco eample continued (Using Method for Min LP): Initial Phase I Tableau Row w' s e a a3 RHS BV MRT 0 4 0-0 0 30 w' = 30 0 05 05 0 0 0 4 s = 4 6 0 3 0-0 0 a = 0 667* 3 0 0 0 0 0 a3 = 0 0 Second Phase I Tableau Row w' s e a a3 RHS BV MRT 0 /3 0 0 /3-4/3 0 0/3 w' = 0/3 0 5/ 0 / -/ 0 7/3 s = 7/3 8/5 0 /3 0 -/3 /3 0 0/3 = 0/3 000 3 0 /3 0 0 /3 -/3 0/3 a3 = 0/3 5* Third (Optimal) Phase I Tableau Row w' s e a a3 RHS BV MRT 0 0 0 0 0 - - 0 w' = 0 0 0 0 -/8 /8-5/8 /4 s = /4 0 0 0 -/ / -/ 5 = 5 3 0 0 0 / -/ 3/ 5 = 5 We will now drop columns a and a 3 L Ntaimo (c) 005 INEN40 TAMU 43

43 The Two-Phase Simple Method We begin Phase II with the following set of equations: Row 0: z - 3 = 0 Row : s -/8e = /4 Row : -/e = 5 Row 3: + /e = 5 We need to eliminate and from row 0 to get a canonical form Add 3(Row ) + (Row 3) to Row 0: z - 3 = 0 3( -/e = 5) + ( + /e = 5) z - /e = 5 L Ntaimo (c) 005 INEN40 TAMU 44

43 The Two-Phase Simple Method Initial (Optimal) Phase II Tableau Row z s e RHS BV MRT 0 0 0 0 -/ 0 z = 5 0 0 0 -/8 /4 s = /4 0 0 0 -/ 5 = 5 3 0 0 0 / 5 = 5 In this case Phase II requires no pivots to find an optimal solution If the Phase II row 0 does not indicate an optimal tableau, then simply continue with the simple until an optimal row 0 is obtained The optimal Phase II tableau shows that the optimal solution to the Bevco problem is: Optimal Solution: z = 5, = 5, = 5 Note that we obtained the same solution using the Big M Method L Ntaimo (c) 005 INEN40 TAMU 45

43 The Two-Phase Simple Method For eamples of Case and Case 3 of the two-phase simple method read Eample 6 and 7 of Chapter 4 Important note: Eample 7 should be a ma problem and not a min problem! L Ntaimo (c) 005 INEN40 TAMU 46

43 The Two-Phase Simple Method Problem (0 pts) Get with your team and solve the following LP using the two-phase simple method : Min st z = 3 +, 6 = 3 0 L Ntaimo (c) 005 INEN40 TAMU 47

L Ntaimo (c) 005 INEN40 TAMU 48 43 The Two-Phase Simple Method Solution to Problem (0 pts): 0, 3 6 st 3 Min = + = + = e z LP is standard form: 0, 3 6 st 3 Min = + + = z Maintaining nonegative RHS: 0, 3 6 st ' Min = + + = + + + = a a e a a w Phase I Formulation:

43 The Two-Phase Simple Method Eliminate a and a from row 0 Add Row + Row 3 to Row 0: w - a -a = 0 + - e + a = 6 + + + a = 3 w + 3 + 3 -e = 9 L Ntaimo (c) 005 INEN40 TAMU 49

43 The Two-Phase Simple Method Using Method of the simple algorithm for min LPs: pts Initial Phase I Tableau Row w' e a a RHS BV MRT 0 3 3-0 0 9 w' = 9 0-0 6 a = 6 3* 0 0 0 3 a = 3 3 pts Second Phase I Tableau Row w' e a a RHS BV MRT 0 0 3/ / -3/ 0 0 w' = 0 0 / -/ / 0 3 = 3 6 0 0 3/ / -/ 0 a = 0 0* pts Third (Optimal) Phase I Tableau Row w' e a a RHS BV MRT 0 0 0 0 -/ - 0 w' = 0 0 0-5/6 7/ -/3 3 = 3 0 0 /3 -/6 /3 0 = 0 We will now drop columns a and a L Ntaimo (c) 005 INEN40 TAMU 50

43 The Two-Phase Simple Method We begin Phase II with the following set of equations: Row 0: z - 3 = 0 Row : -5/6e = 3 Row : + /3e = 0 We need to eliminate from row 0 to get a canonical form Add 3(Row ) to Row 0: z - 3 = 0 + 3( -5/6e = 3) z - 5/e = 9 L Ntaimo (c) 005 INEN40 TAMU 5

43 The Two-Phase Simple Method pts Initial Phase II Tableau Row z e RHS BV MRT 0 0 0-5/ 0 z = 9 0 0-5/6 3 = 3 0 0 /3 0 = 0 In this case Phase II requires no pivots to find an optimal solution If the Phase II row 0 does not indicate an optimal tableau, then simply continue with the simple until an optimal row 0 is obtained The optimal Phase II tableau shows that the optimal solution to the problem is: Optimal Solution: z = 9, = 3, = 0 pts Note that we obtained the same solution using the Big M Method L Ntaimo (c) 005 INEN40 TAMU 5

Summary 43 The Two-Phase Simple Method To get started with the simple method, add an artificial basis, but ensure that the artificial variables do not occur in an optimal solution Big M method: place a large cost (penalty) on each of the artificial variables Two-phase method: In phase I minimize the sum of the artificial variables At the end of phase I, we will have a basic feasible solution to the original problem Use this as a starting point for Phase II, which solves the original problem L Ntaimo (c) 005 INEN40 TAMU 53