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

Similar documents
The Simplex Method. Formulate Constrained Maximization or Minimization Problem. Convert to Standard Form. Convert to 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

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

Systems Analysis in Construction

Sensitivity Analysis

In Chapters 3 and 4 we introduced linear programming

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

Simplex Method for LP (II)

Linear Programming, Lecture 4

9.1 Linear Programs in canonical form

The Big M Method. Modify the LP

Summary of the simplex method

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

Non-Standard Constraints. Setting up Phase 1 Phase 2

CO350 Linear Programming Chapter 6: The Simplex Method

AM 121: Intro to Optimization

Week_4: simplex method II

Lesson 27 Linear Programming; The Simplex Method

Simplex Algorithm Using Canonical Tableaus

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

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

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

IE 5531: Engineering Optimization I

IE 400: Principles of Engineering Management. Simplex Method Continued

(includes both Phases I & II)

Math Models of OR: Some Definitions

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

Lecture 5 Simplex Method. September 2, 2009

(includes both Phases I & II)

TIM 206 Lecture 3: The Simplex Method

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.

OPERATIONS RESEARCH. Linear Programming Problem

Algebraic Simplex Active Learning Module 4

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

ENGI 5708 Design of Civil Engineering Systems

MATH2070 Optimisation

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

Math Models of OR: Sensitivity Analysis

Introduction to the Simplex Algorithm Active Learning Module 3

Chapter 4 The Simplex Algorithm Part I

AM 121: Intro to Optimization Models and Methods

AM 121: Intro to Optimization Models and Methods Fall 2018

Worked Examples for Chapter 5

Lecture 11 Linear programming : The Revised Simplex Method

Simplex tableau CE 377K. April 2, 2015

ECE 307 Techniques for Engineering Decisions

CSC Design and Analysis of Algorithms. LP Shader Electronics Example

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.

Math 354 Summer 2004 Solutions to review problems for Midterm #1

ORF 307: Lecture 2. Linear Programming: Chapter 2 Simplex Methods

Special cases of linear programming

Chap6 Duality Theory and Sensitivity Analysis

Farkas Lemma, Dual Simplex and Sensitivity Analysis

1 Review Session. 1.1 Lecture 2

February 22, Introduction to the Simplex Algorithm

Week 3: Simplex Method I

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

CPS 616 ITERATIVE IMPROVEMENTS 10-1

MATH 4211/6211 Optimization Linear Programming

LINEAR PROGRAMMING. Relation to the Text (cont.) Relation to Material in Text. Relation to the Text. Relation to the Text (cont.

4. Duality and Sensitivity

The Dual Simplex Algorithm

February 17, Simplex Method Continued

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

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

Review Solutions, Exam 2, Operations Research

CO350 Linear Programming Chapter 6: The Simplex Method

Water Resources Systems: Modeling Techniques and Analysis

Part 1. The Review of Linear Programming

Chapter 4 The Simplex Algorithm Part II

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 2. In many business and policy making situations the following type of problem is encountered:

Linear Programming and the Simplex method

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

Part III: A Simplex pivot

9.5 THE SIMPLEX METHOD: MIXED CONSTRAINTS

Variants of Simplex Method

56:270 Final Exam - May

"SYMMETRIC" PRIMAL-DUAL PAIR

Part 1. The Review of Linear Programming

MATH 445/545 Test 1 Spring 2016

The Simplex Method of Linear Programming

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

OPERATIONS RESEARCH. Michał Kulej. Business Information Systems

Summary of the simplex method

Math 210 Finite Mathematics Chapter 4.2 Linear Programming Problems Minimization - The Dual Problem

Operations Research Lecture 2: Linear Programming Simplex Method

CO350 Linear Programming Chapter 5: Basic Solutions

Answer the following questions: Q1: Choose the correct answer ( 20 Points ):

Math Models of OR: Extreme Points and Basic Feasible Solutions

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

Lecture 2: The Simplex method

Distributed Real-Time Control Systems. Lecture Distributed Control Linear Programming

Linear programs Optimization Geoff Gordon Ryan Tibshirani

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

Math Models of OR: Handling Upper Bounds in Simplex

Chapter 5 Linear Programming (LP)

Understanding the Simplex algorithm. Standard Optimization Problems.

Slide 1 Math 1520, Lecture 10

Chapter 2: Linear Programming Basics. (Bertsimas & Tsitsiklis, Chapter 1)

Transcription:

The Simplex Method Lecture 5 Standard and Canonical Forms and Setting up the Tableau Lecture 5 Slide 1

The Simplex Method Formulate Constrained Maximization or Minimization Problem Convert to Standard Form Convert to Canonical Form Set Up the Tableau and the Initial Basic Feasible Solution Apply The Simplex Algorithm Perform Sensitivity Analysis Lecture 5 Slide 2

Simple Mathematical Operations on Constraints Any constraint may be multiplied or divided through by a positive number without changing the constraint. x + y => 2 is the same as 2x + 2y => 4 Lecture 5 Slide 3

x + y => 2 is the same as 2x + 2y => 4 2 2 y y 1.5 1.5 1 1 0.5 0.5 0.5 1 1.5 2 0.5 1 1.5 2 x x Lecture 5 Slide 4

Simple Mathematical Operations on Constraints When a >, =>, <= or < constraint is multiplied or divided through by a negative number, the direction of the constraint must be changed. Lecture 5 Slide 5

Multiply x + y => 2 by -1 (x + y => 2) * (-1) -x y <= -2 and they are equivalent. 2 2 y y 1.5 1.5 1 1 0.5 0.5 0.5 1 1.5 2 0.5 1 1.5 2 x x Lecture 5 Slide 6

Standard Form A Linear Program is in Standard Form if: All the constraints are written as equalities. All variables are required to be non-negative. This involves the addition of Slack variables and Surplus variables. Lecture 5 Slide 7

Adding Slack Variables When a Constraint is in the form: x + y <= v, x => 0, y => 0. We add a Slack Variable to take up the slack between the value of (x + y) and the value of v. Thus x + y + s = v. Note that s => 0 since x + y <= v. Lecture 5 Slide 8

Adding Surplus Variables When a Constraint is in the form: x + y => v, x => 0, y => 0. We add a Surplus Variable to account for the surplus left over when the value of v is deducted from the values of (x + y). Thus x + y = v + s. Lecture 5 Slide 9

Adding Surplus Variables cont We then shuffle s to the left hand side of the equality by subtracting s from both sides, giving: x + y s = v Note that s => 0 since v <= x + y. Lecture 5 Slide 10

Conversion to Standard Form, An Example Let our problem be: Maximize 4x + 5y + 2z Subject to (1) 2x - y - 2z => 8 (2) x + 2y - z = 16 (3) x - 2y + z <= 12 x => 0, y => 0, z => 0 Lecture 5 Slide 11

Constraint (1) This is a => constraint, so we need to add a surplus variable (S1). Maximize 4x + 5y + 2z Subject to (1) 2x - y - 2z - S1 = 8 (2) x + 2y - z = 16 (3) x - 2y + z <= 12 x => 0, y => 0, z => 0, s1 => 0 Lecture 5 Slide 12

Constraint (2) This was an equality in the original problem, so no change. Maximize 4x + 5y + 2z Subject to (1) 2x - y - 2z - S1 = 8 (2) x + 2y - z = 16 (3) x - 2y + z <= 12 x => 0, y => 0, z => 0, s1 => 0 Lecture 5 Slide 13

Constraint (3) This is a <= constraint, so we need to add a slack variable (S3). Maximize 4x + 5y + 2z Subject to (1) 2x - y - 2z - S1 = 8 (2) x + 2y - z = 16 (3) x - 2y + z + S3 = 12 x => 0, y => 0, z => 0, s1 => 0, s3 => 0 Lecture 5 Slide 14

Conventional Presentation Use x1, x2, x3 etc in place of x,y or z. Slack or Surplus Variables are denoted by: S concatenated with the constraint number Hence S1 and S3 in the example. Lecture 5 Slide 15

Negative Values on RHS If any RHS values are negative we multiply through the equality by (-1) to make the RHS value positive. e.g. 2x 1 3x 2 S = -12 becomes -2x 1 + 3x 2 + S = 12. Lecture 5 Slide 16

Canonical Form A Linear Program is in Canonical Form if: It is in Standard Form, and For each constraint, there exists a variable that appears only in the constraint, and its coefficient in that constraint is +1. Lecture 5 Slide 17

Example of Canonical Form Maximize 4x1 + 5x2 + 2x3 Subject to (1) 2x1 - x2-2x3 - S1 + A1 = 8 (2) x1 + 2x2 - x3 + A2 = 16 (3) x1-2x2 + x3 + S3 = 12 x1 => 0, x2 => 0, x3 => 0, s1 => 0, s3 => 0, A1 => 0, A2 => 0 Lecture 5 Slide 18

Artificial Variables Addition of a Slack variable to a constraint results in a constraint that satisfies the Canonical Form. Addition of a Surplus variable was not sufficient since the coefficient is (-1), so we add in an artificial variable (A1). If the original constraint was an equality we need to add in an artificial variable (A2). Lecture 5 Slide 19

Artificial Variables cont We want to drive the values of the Artificial variables down to zero and to accomplish this we add them into the objective function. We use a coefficient -M or +M representing a very large ve or +ve number. For a maximization problem use -M. For a minimization problem use +M. Lecture 5 Slide 20

Our Example in Full Canonical Form Maximize 4x1 + 5x2 + 2x3 - M*A1 - M*A2 Subject to (1) 2x1 - x2-2x3 - S1 + A1 = 8 (2) x1 + 2x2 - x3 + A2 = 16 (3) x1-2x2 + x3 + S3 = 12 x1 => 0, x2 => 0, x3 => 0, s1 => 0, s3 => 0, A1 => 0, A2 => 0 Lecture 5 Slide 21

Setting up The Simplex Tableau To set up the Simplex Tableau we will: Identify the Basic and Nonbasic variables. Set up a Basic Feasible Solution. Look at the form of the Simplex Tableau, and Enter the LP and values of the Initial Basic Solution into the Simplex Tableau. Lecture 5 Slide 22

Basic and Nonbasic Variables Recall from the definition of the Canonical Form. For each constraint, there exists a variable that appears only in the constraint, and its coefficient in that constraint is +1. These variables are the initial Basic Variables. The other variables are the Nonbasic Variables. Lecture 5 Slide 23

Basic and Nonbasic Variables cont In our example we added S3, A1 and A2 to satisfy the condition for the Canonical Form. These are the Basic Variables. Maximize 4x1 + 5x2 + 2x3 Subject to (1) 2x1 - x2-2x3 - S1 + A1 = 8 (2) x1 + 2x2 - x3 + A2 = 16 (3) x1-2x2 + x3 + S3 = 12 x1 => 0, x2 => 0, x3 => 0, s1 => 0, s3 => 0, A1 => 0, A2 => 0 The Nonbasic Variables are x1, x2, x3, and S1. Lecture 5 Slide 24

Setting up the Basic (Feasible) Solution A Basic Feasible Solution for an LP in the Canonical form is one where: The Nonbasic variables are set to zero, and The Basic variables take on the values of the RHS of their constraint. Lecture 5 Slide 25

Setting up the Basic (Feasible) Solution cont A Basic Solution is a Basic Feasible Solution if:- All of the variables (Basic and Nonbasic) are greater than or equal to zero. Lecture 5 Slide 26

The Basic Feasible Solution to Our Example Problem. Maximize 4x1 + 5x2 + 2x3 - M*A1 - M*A2 Subject to (1) 2x1 - x2-2x3 - S1 + A1 = 8 (2) x1 + 2x2 - x3 + A2 = 16 (3) x1-2x2 + x3 + S3 = 12 x1 => 0, x2 => 0, x3 => 0, s1 => 0, s3 => 0, A1 => 0, A2 => 0 A1 = 8, A2 = 16, S3 = 12. x1 = 0, x2 = 0, x3 = 0, s1 = 0. The Objective Function Value: z = -24M. [(8 * -M)+(16 * -M)+(1 * 0)] Lecture 5 Slide 27

Graphical Equivalence The Basic Feasible Solution is equivalent to our first Objective Function line in the graphical solution. 7 y 6 5 4 3 2 1 x 1 2 3 4 5 6 Lecture 5 Slide 28

The Form of The Simplex Tableau Names of the Variables Basis Cj Objective Function Coefficients. Bi Names of the Basic Variables Objective Function Coefficients of Basic Variables Coefficients of the Left Hand Sides of the Constraints. Right Hand Side Values of Constraints Zj Sum of Each Column * Cj Column. Sum of RHS * Cj for all j Cj - Zj Cj row value less Zj row value. Lecture 5 Slide 29

Names of Variables x1 x2 x3 S1 S3 A1 A2 Basis Cj Objective Function Coefficients. Bi Names of the Basic Variables Objective Function Coefficients of Basic Variables Coefficients of the Left Hand Sides of the Constraints. Right Hand Side Values of Constraints Zj Sum of Each Column * Cj Column. Sum of RHS * Cj for all j Cj - Zj Cj row value less Zj row value. Lecture 5 Slide 30

Basic Variables x1 x2 x3 S1 S3 A1 A2 Basis Cj Objective Function Coefficients. Bi A1 A2 S3 Objective Function Coefficients of Basic Variables Coefficients of the Left Hand Sides of the Constraints. Right Hand Side Values of Constraints Zj Sum of Each Column * Cj Column. Sum of RHS * Cj for all j Cj - Zj Cj row value less Zj row value. Lecture 5 Slide 31

Objective Function Coefficients x1 x2 x3 S1 S3 A1 A2 Basis Cj 4 5 2 0 0 -M -M Bi A1 -M A2 -M S3 0 Coefficients of the Left Hand Sides of the Constraints. Right Hand Side Values of Constraints Sum of RHS * Zj Sum of Each Column * Cj Column. Cj for all j Maximize 4x1 + 5x2 + 2x3 - M*A1 - M*A2 Cj - Zj Cj row value less Zj row value. Lecture 5 Slide 32

Coefficients and RHS Values of the Constraints x1 x2 x3 S1 S3 A1 A2 Basis Cj 4 5 2 0 0 -M -M Bi A1 -M 2-1 -2-1 1 8 A2 -M 1 2-1 1 16 S3 0 1-2 1 1 12 (1) 2x1 Zj - x2 Sum - 2x3of Each - S1 Column * Cj + Column. A1 Sum of RHS * Cj = for all 8 j (2) x1 + 2x2 - x3 + A2 = 16 Cj - Zj Cj row value less Zj row value. (3) x1-2x2 + x3 + S3 = 12 Lecture 5 Slide 33

The Zj Row x1 x2 x3 S1 S3 A1 A2 Basis Cj 4 5 2 0 0 -M -M Bi * A1 -M 2-1 -2-1 0 1 0 8 * A2 -M 1 2-1 0 0 0 1 16 * + + S3 0 1-2 1 0 1 0 0 12 = Zj -3M -M 3M M 0 -M -M sum of RHS * Cj for all j Cj - Zj Cj row value less Zj row value Lecture 5 Slide 34

The Objective Function Value x1 x2 x3 S1 S3 A1 A2 Basis Cj 4 5 2 0 0 -M -M Bi A1 -M 2-1 -2-1 0 1 0 8 -M * 8 + -M * 16 + 0 * 12 = A2 -M 1 2-1 0 0 0 1 16 S3 0 1-2 1 0 1 0 0 12 Zj -3M -M 3M M 0 -M -M -24M Cj - Zj Cj row value less Zj row value Lecture 5 Slide 35

The Cj Zj Row x1 x2 x3 S1 S3 A1 A2 Basis Cj 4 5 2 0 0 -M -M Bi A1 -M 2-1 -2-1 0 1 0 8 A2 -M 1 2-1 0 0 0 1 16 S3 0 1-2 1 0 1 0 0 12 Zj -3M -M 3M M 0 -M -M -24M Cj - Zj 4 - (-3M) 5 - (-M) 2-3M - M 0 -M - (-M) -M - (-M) Lecture 5 Slide 36

The Initial Basic Feasible Solution in the Simplex Tableau x1 x2 x3 S1 S3 A1 A2 Basis Cj 4 5 2 0 0 -M -M Bi A1 -M 2-1 -2-1 0 1 0 8 A2 -M 1 2-1 0 0 0 1 16 S3 0 1-2 1 0 1 0 0 12 Zj -3M -M 3M M 0 -M -M -24M Cj - Zj 4 + 3M 5 + M 2-3M - M 0 0 0 Lecture 5 Slide 37