Simplex tableau CE 377K. April 2, 2015

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

Lesson 27 Linear Programming; The Simplex Method

Math Models of OR: Some Definitions

Part 1. The Review of Linear Programming

AM 121: Intro to Optimization Models and Methods Fall 2018

The dual simplex method with bounds

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

(includes both Phases I & II)

Part 1. The Review of Linear Programming

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

Math Models of OR: Sensitivity Analysis

(includes both Phases I & II)

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

Systems Analysis in Construction

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

Chap6 Duality Theory and Sensitivity Analysis

Chapter 4 The Simplex Algorithm Part I

ECE 307 Techniques for Engineering Decisions

9.1 Linear Programs in canonical form

4.4 The Simplex Method and the Standard Minimization Problem

CSC Design and Analysis of Algorithms. LP Shader Electronics Example

Math Models of OR: The Revised Simplex Method

CPS 616 ITERATIVE IMPROVEMENTS 10-1

Special cases of linear programming

The Simplex Method. Formulate Constrained Maximization or Minimization Problem. Convert to Standard Form. Convert to Canonical Form

min3x 1 + 4x 2 + 5x 3 2x 1 + 2x 2 + x 3 6 x 1 + 2x 2 + 3x 3 5 x 1, x 2, x 3 0.

Week_4: simplex method II

Section 4.1 Solving Systems of Linear Inequalities

Operations Research Lecture 2: Linear Programming Simplex Method

Linear Programming in Matrix Form

TIM 206 Lecture 3: The Simplex Method

Lecture 5 Simplex Method. September 2, 2009

Chapter 5 Linear Programming (LP)

MAT016: Optimization

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

The Simplex Algorithm and Goal Programming

Math Models of OR: Handling Upper Bounds in Simplex

IE 5531: Engineering Optimization I

CO350 Linear Programming Chapter 6: The Simplex Method

Introduction to Mathematical Programming IE406. Lecture 13. Dr. Ted Ralphs

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

Deterministic Operations Research, ME 366Q and ORI 391 Chapter 2: Homework #2 Solutions

OPERATIONS RESEARCH. Michał Kulej. Business Information Systems

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

The Simplex Method: An Example

Chapter 7 Network Flow Problems, I

Lecture 14 Transportation Algorithm. October 9, 2009

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

The Simplex Algorithm

Sensitivity Analysis

MATH 373 Section A1. Final Exam. Dr. J. Bowman 17 December :00 17:00

The Simplex Method of Linear Programming

TRANSPORTATION PROBLEMS

UNIVERSITY of LIMERICK

Relation of Pure Minimum Cost Flow Model to Linear Programming

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

Linear Programming, Lecture 4

IP Cut Homework from J and B Chapter 9: 14, 15, 16, 23, 24, You wish to solve the IP below with a cutting plane technique.

1. Introduce slack variables for each inequaility to make them equations and rewrite the objective function in the form ax by cz... + P = 0.

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

56:270 Final Exam - May

In Chapters 3 and 4 we introduced linear programming

3 The Simplex Method. 3.1 Basic Solutions

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

CO350 Linear Programming Chapter 8: Degeneracy and Finite Termination

AM 121: Intro to Optimization

maxz = 3x 1 +4x 2 2x 1 +x 2 6 2x 1 +3x 2 9 x 1,x 2

CHAPTER 2. The Simplex Method

Linear programming: algebra

Section Notes 9. IP: Cutting Planes. Applied Math 121. Week of April 12, 2010

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

Review Solutions, Exam 2, Operations Research

Operations Research Lecture 6: Integer Programming

9.5 THE SIMPLEX METHOD: MIXED CONSTRAINTS

Contents. 4.5 The(Primal)SimplexMethod NumericalExamplesoftheSimplexMethod

Transportation Problem

The Dual Simplex Algorithm

Summary of the simplex method

Sensitivity Analysis and Duality in LP

Econ 172A, Fall 2012: Final Examination Solutions (I) 1. The entries in the table below describe the costs associated with an assignment

Non-Standard Constraints. Setting up Phase 1 Phase 2

SELECT TWO PROBLEMS (OF A POSSIBLE FOUR) FROM PART ONE, AND FOUR PROBLEMS (OF A POSSIBLE FIVE) FROM PART TWO. PART ONE: TOTAL GRAND

Algebraic Simplex Active Learning Module 4

x 1 + 4x 2 = 5, 7x 1 + 5x 2 + 2x 3 4,

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

Math Homework 3: solutions. 1. Consider the region defined by the following constraints: x 1 + x 2 2 x 1 + 2x 2 6

Econ 172A, Fall 2012: Final Examination Solutions (II) 1. The entries in the table below describe the costs associated with an assignment

56:171 Operations Research Midterm Exam--15 October 2002

Simplex Algorithm Using Canonical Tableaus

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

UNIT-4 Chapter6 Linear Programming

MS-E2140. Lecture 1. (course book chapters )

4.3 Minimizing & Mixed Constraints

CO350 Linear Programming Chapter 6: The Simplex Method

Gomory Cuts. Chapter 5. Linear Arithmetic. Decision Procedures. An Algorithmic Point of View. Revision 1.0

1 Simplex and Matrices

MS-E2140. Lecture 1. (course book chapters )

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

Simplex Method in different guises

MATH 445/545 Test 1 Spring 2016

Transcription:

CE 377K April 2, 2015

Review Reduced costs Basic and nonbasic variables

OUTLINE

Review by example: simplex method demonstration Outline

Example You own a small firm producing construction materials for the EERC building. Your firm produces three materials: concrete, mortar, and grout. Producing one ton of each these materials requires the use of a limited resource, as shown in the following table: Resource Concrete Mortar Grout Availability Labor 1 hour 2 hours 2 hours 20 hours Blending time 2 hours 1 hour 2 hours 20 hours Storage capacity 2 m 3 2 m 3 1 m 3 20 m 3 Sales price $20 $30 $40 Manufacturing cost $10 $18 $28 What is your optimal production strategy? Outline

A first attempt at writing down the optimization problem is: max x 1,x 2,x 3 10x 1 + 12x 2 + 12x 3 s.t. x 1 + 2x 2 + 2x 3 20 2x 1 + x 2 + 2x 3 20 2x 1 + 2x 2 + x 3 20 x 1, x 2, x 3 0 Outline

After putting the problem in standard form we have: min x 1,...,x 6 10x 1 12x 2 12x 3 s.t. x 1 + 2x 2 + 2x 3 + x 4 = 20 2x 1 + x 2 + 2x 3 + x 5 = 20 2x 1 + 2x 2 + x 3 + x 6 = 20 x 1, x 2, x 3, x 4, x 5, x 6 0 Outline

Simplex method 1 Identify an initial feasible basis {x B 1,..., x B m}. 2 Calculate the reduced cost c k = c k c B B 1 A k for each nonbasic decision variable. 3 If all of the reduced costs are nonnegative, the current basis is optimal. STOP. 4 Otherwise, choose some nonbasic decision variable x k with a negative reduced cost to enter the basis. 5 Set x k = min i: xi <0 x i / x i ; the basic variable leaving the basis is one where this minimum is obtained. 6 Return to step 2. Outline

By inspection, a feasible basis is {x 4, x 5, x 6 }, which corresponds to the the extreme point (0, 0, 0, 20, 20, 20). We have 1 0 0 B = 0 1 0 0 0 1 Therefore B 1 = B and the reduced cost vector is c = c c B B 1 A = [ 10 12 12 0 0 0 ] [ ] 1 0 0 1 2 2 1 0 0 0 0 0 0 1 0 2 1 2 0 1 0 0 0 1 2 2 1 0 0 1 = [ 10 10 12 0 0 0 ] Outline

The reduced cost of x 1 is negative, so we choose it to enter the basis. We calculate the change in the existing basic variables: 1 x B = B 1 A 1 = A 1 = 2 2 Outline

Checking the ratio test, we see that x 4 / x 4 = 20, x 5 / x 5 = 10, and x 6 / x 6 = 10, so one of x 5 and x 6 must leave the basis; let s assume that x 5 leaves, so the new basis is {x 4, x 1, x 6 }. Now 1 1 0 1 0.5 0 B = 0 2 0 B 1 = 0 0.5 0 0 2 1 0 1 1 Outline

The current solution is B 1 b = [ 10 0 0 10 0 0 ] and c = [ 10 12 12 0 0 0 ] [ ] 1 0.5 0 1 2 2 1 0 0 0 10 0 0 0.5 0 2 1 2 0 1 0 0 1 1 2 2 1 0 0 1 = [ 0 7 2 0 5 0 ] Outline

The reduced cost of x 3 is negative, so we choose it to enter the basis. We calculate 1 0.5 0 2 1 x B = B 1A 3 = 0 0.5 0 1 = 1 0 1 1 1 1 Checking the ratio test, we see that x 4 / x 4 = 10 and x 1 / x 1 = 10, so one of x 4 and x 1 must leave the basis; let s assume that x 4 leaves, so the new basis is {x 3, x 1, x 6 }. Outline

Now 2 1 0 1 0.5 0 B = 2 2 0 B 1 = 1 1 0 1 2 1 1 1.5 1 so the current solution is B 1 b = [ 0 0 10 0 0 10 ] and c = [ 10 12 12 0 0 0 ] [ ] 1 0.5 0 1 2 2 1 0 0 12 10 0 1 1 0 2 1 2 0 1 0 1 1.5 1 2 2 1 0 0 1 = [ 0 4 0 2 4 0 ] Outline

The reduced cost of x 2 is negative, so we choose it to enter the basis. We calculate 1 0.5 0 2 1.5 x B = B 1 A 2 = 1 1 0 1 = 1 1 1.5 1 2 2.5 Checking the ratio test, we see that x 3 / x 3 = 6.67 and x 6 / x 6 = 4, so x 6 must leave the basis, and the new basis is {x 3, x 1, x 2 }. Outline

Now 2 1 2 0.4 0.4 0.6 B = 2 2 1 B 1 = 0.6 0.4 0.4 1 2 2 0.4 0.6 0.4 so the current solution is B 1 b = [ 4 4 4 0 0 0 ] and c = [ 10 12 12 0 0 0 ] [ ] 0.4 0.4 0.6 1 2 2 1 0 0 12 10 12 0.6 0.4 0.4 2 1 2 0 1 0 0.4 0.6 0.4 2 2 1 0 0 1 = [ 0 0 0 3.6 1.6 1.6 ] All reduced costs are nonnegative, so the current basis is optimal. Outline

The optimal solution is x = [ 4 4 4 0 0 0 ], and the optimal objective function value is c x = 136. Outline

SIMPLEX TABLEAU

The simplex tableau is a more convenient way to perform the computations needed by the simplex method. The tableau is a table containing the following elements: Z... c k c B B 1 A k.... xi B... B 1 A k....

Z... c k c B B 1 A k.... xi B... B 1 A k.... 1 There are n + 1 columns and m + 1 rows, numbered starting from zero. 2 T ij is the value in the i-th row and the j-th column. 3 T 00 is the negative of the objective function value. 4 T 0j is the reduced cost of x j. 5 T i0 has the current value of the i-th basic variable. 6 The other entries T ij show the rate by which x i would decrease if x j is added to the basis.

After finding an initial feasible basis, all remaining steps of the simplex method can be computed using the tableau. 1 Reduced costs for all variables are already shown in the first row. 2 We can see by inspection whether reduced costs are all nonnegative, in which case we are done. 3 If not, we can visually pick one of the x k with negative reduced cost to enter the basis. 4 To see which variable leaves the basis, compare the ratio of the values in the zero-th column to the k-th column. 5 Changing the basis, updating B 1 A and reduced costs. All steps but the last are easy.

The initial tableau corresponding to the example problem is: 0 10 12 12 0 0 0 20 1 2 2 1 0 0 20 2 1 2 0 1 0 20 2 2 1 0 0 0 By choosing x 4, x 5, x 6 as the initial basis, B 1 = I and c B = 0 so the tableau was easy to write down. Next class we ll see how we can start off in general.

0 10 12 12 0 0 0 20 1 2 2 1 0 0 20 2 1 2 0 1 0 20 2 2 1 0 0 0 The reduced cost of x 1 is negative, so choose it to enter the basis.

0 10 12 12 0 0 0 20 1 2 2 1 0 0 20 2 1 2 0 1 0 20 2 2 1 0 0 0 In the ratio test, T 10 /T 11 = 20, T 20 /T 21 = 10, and T 30 /T 31 = 10 so we could choose either x 5 or x 6 to leave the basis.

Since x 1 is entering the basis and x 5 is leaving, we want to make column x 1 of the tableau look like x 5 does currently. We accomplish this with the following matrix row manipulations (performed in this order): Divide every element in the second row by 2. Add ten times the second row to the zero-th row. Subtract the second row from the first row. Subtract twice the second row from the third row.

0 10 12 12 0 0 0 20 1 2 2 1 0 0 10 1 0.5 1 0 0.5 0 20 2 2 1 0 0 0

100 0 7 2 0 5 0 10 0 1.5 1 1 0.5 0 10 1 0.5 1 0 0.5 0 0 0 1 1 0 1 1

This is the end of the first iteration. In general, to change the basis, assume that x k is entering the basis, and that x l is leaving. 1 Divide every element in the l-th row by T lk. This sets T lk = 1 2 For each of the other rows i, multiply the l-th row by T ik and subtract it from the i-th row. This sets T ik = 0 for all i l.

Here is the tableau at the end of the first iteration: 100 0 7 2 0 5 0 10 0 1.5 1 1 0.5 0 10 1 0.5 1 0 0.5 0 0 0 1 1 0 1 1 1 The basic variables correspond to the columns which form the identity matrix (x 4, x 1, x 6 ) 2 The reduced costs of x 2 and x 3 are still negative, so we can choose one of them to enter the basis.

Say we chose x 3 to enter the basis. Based on the ratio test, we force x 4 (row 1) to leave the basis. 100 0 7 2 0 5 0 10 0 1.5 1 1 0.5 0 10 1 0.5 1 0 0.5 0 0 0 1 1 0 1 1 1 Divide the first row by 1 (no change) 2 Add twice the first row to the zero-th row 3 Subtract the first row from the second row 4 Add the first row to the third row

Here is the tableau at the end of the second iteration: 120 0 4 0 2 4 0 10 0 1.5 1 1 0.5 0 0 1 1 0 1 1 0 10 0 2.5 0 1 1.5 1 1 The basic variables correspond to the columns which form the identity matrix (x 3, x 1, x 6 ) 2 The reduced cost of x 2 is still negative, so it enters the basis.

Since x 2 is entering the basis, the ratio test forces x 6 (row 3) to leave the basis. 120 0 4 0 2 4 0 10 0 1.5 1 1 0.5 0 0 1 1 0 1 1 0 10 0 2.5 0 1 1.5 1 1 Divide the third row by 2.5 2 Add four times the third row to the zero-th row. 3 Subtract 1.5 times the third row to the first row. 4 Add the third row to the second row.

Here is the tableau at the end of the third iteration: 136 0 0 0 3.6 1.6 1.6 4 0 0 1 0.4 0.4 0.6 4 1 0 0 0.6 0.4 0.4 4 0 1 0 0.4 0.6 0.4 All reduced costs are nonnegative, so this is the optimal solution. The basis is x 3 = 4, x 1 = 4, x 2 = 4 and the objective function value is 136.