The Simplex Method for Solving a Linear Program Prof. Stephen Graves

Similar documents
IE 5531: Engineering Optimization I

Math Models of OR: Some Definitions

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

AM 121: Intro to Optimization Models and Methods Fall 2018

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

February 17, Simplex Method Continued

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

The Primal-Dual Algorithm P&S Chapter 5 Last Revised October 30, 2006

Simplex Algorithm Using Canonical Tableaus

ECE 307 Techniques for Engineering Decisions

Simplex Method in different guises

3 The Simplex Method. 3.1 Basic Solutions

OPERATIONS RESEARCH. Linear Programming Problem

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

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

Review Solutions, Exam 2, Operations Research

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

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

Farkas Lemma, Dual Simplex and Sensitivity Analysis

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

Chap6 Duality Theory and Sensitivity Analysis

Fundamental Theorems of Optimization

Chapter 4 The Simplex Algorithm Part I

Lecture 2: The Simplex method

Systems Analysis in Construction

Understanding the Simplex algorithm. Standard Optimization Problems.

Simplex Method for LP (II)

Linear Programming and the Simplex method

Linear and Combinatorial Optimization

Note 3: LP Duality. If the primal problem (P) in the canonical form is min Z = n (1) then the dual problem (D) in the canonical form is max W = m (2)

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

Math 273a: Optimization The Simplex method

Chapter 5 Linear Programming (LP)

Lesson 27 Linear Programming; The Simplex Method

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

March 13, Duality 3

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

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

Lecture slides by Kevin Wayne

TIM 206 Lecture 3: The Simplex Method

CO350 Linear Programming Chapter 6: The Simplex Method

Special cases of linear programming

Notes taken by Graham Taylor. January 22, 2005

February 22, Introduction to the 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

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

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

"SYMMETRIC" PRIMAL-DUAL PAIR

Chapter 1 Linear Programming. Paragraph 5 Duality

1 Review Session. 1.1 Lecture 2

CPS 616 ITERATIVE IMPROVEMENTS 10-1

Simplex method(s) for solving LPs in standard form

Chapter 3, Operations Research (OR)

9.1 Linear Programs in canonical form

Lecture 10: Linear programming duality and sensitivity 0-0

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

Today s class. Constrained optimization Linear programming. Prof. Jinbo Bi CSE, UConn. Numerical Methods, Fall 2011 Lecture 12

Summary of the simplex method

1. (7pts) Find the points of intersection, if any, of the following planes. 3x + 9y + 6z = 3 2x 6y 4z = 2 x + 3y + 2z = 1

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

IE 5531: Engineering Optimization I

Week_4: simplex method II

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

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

Going from graphic solutions to algebraic

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

The Simplex Algorithm and Goal Programming

Operations Research Lecture 2: Linear Programming Simplex Method

Lecture 2: The Simplex method. 1. Repetition of the geometrical simplex method. 2. Linear programming problems on standard form.

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

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

Spring 2017 CO 250 Course Notes TABLE OF CONTENTS. richardwu.ca. CO 250 Course Notes. Introduction to Optimization

Lecture 5. x 1,x 2,x 3 0 (1)

Part 1. The Review of Linear Programming

3. THE SIMPLEX ALGORITHM

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

The Simplex Algorithm

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

1 Overview. 2 Extreme Points. AM 221: Advanced Optimization Spring 2016

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

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

Part III: A Simplex pivot

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

LOWER BOUNDS FOR THE MAXIMUM NUMBER OF SOLUTIONS GENERATED BY THE SIMPLEX METHOD

Algebraic Simplex Active Learning Module 4

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

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

LINEAR PROGRAMMING 2. In many business and policy making situations the following type of problem is encountered:

3. Duality: What is duality? Why does it matter? Sensitivity through duality.

Example Problem. Linear Program (standard form) CSCI5654 (Linear Programming, Fall 2013) Lecture-7. Duality

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

Part 1. The Review of Linear Programming Introduction

Introduction to the Simplex Algorithm Active Learning Module 3

MATH 4211/6211 Optimization Linear Programming

Section 4.1 Solving Systems of Linear Inequalities

Part 1. The Review of Linear Programming

IE 400: Principles of Engineering Management. Simplex Method Continued

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

Optimization (168) Lecture 7-8-9

Linear Programming: Simplex

Transcription:

The Simplex Method for Solving a Linear Program Prof. Stephen Graves Observations from Geometry feasible region is a convex polyhedron an optimum occurs at a corner point possible algorithm - search over corner points Issues: how to identify or characterize a corner point? how to find a corner point to get started? how to search efficiently over the corner points? how to know when to stop? Consider Standard Form for LP: All constraints are expressed as equalities. All variables are restricted to be non negative. 51

ORIGINAL LP PROBLEM - ADD SLACKS AND PUT INTO STD FORM: Max Z = 40 S + 50 E s.t. 4/5 S + 6/5 E <= 16 2 S + 3 E <= 30 2/3 S + 2 E <= 16 16/3 S + 4 E <= 64 S, E >= 0 E ( S, E, X1, X2, X3, X4) (0, 8, 6.4, 6, 0, 32) (6, 6, 4, 0, 0, 8) (9, 4, 4, 0, 2, 0) (0, 0, 16, 30, 16, 64) (12, 0, 6.4, 6, 8, 0) S 52

In Standard Form, the constraints (exclusive of the non negativity constraints) for the LP can be expressed as a linear system, Ax = b. A Basic Solution to Ax = b (where A is an m by n matrix and m < n) is obtained by setting n - m variables equal to zero and solving the resulting m by m linear system of equations. In a Basic Solution, the n - m variables at zero are called non- basic variables, while the remaining m variables are called basic variables. If all of the basic variables take non negative values, then the Basic Solution is called a Basic Feasible Solution (BFS). Key Property: There is a unique corner point corresponding to each Basic Feasible Solution; and there is at least one Basic Feasible Solution corresponding to each corner point (also known as extreme points). Canonical Form All constraints are expressed as equalities. All variables are restricted to be non negative. RHS's for all constraints are non negative. Each constraint equation has an isolated (basic) variable. Intent of the Canonical Form - allows one to identify BFS's, and to move from one BFS's to another easily through a "pivot operation." To identify the BFS, we set all of the nonisolated (non basic) variables to zero, and read off the values for the isolated (basic) variables from the canonical form. 53

Overview of Simplex Method 1. Somehow find a BFS (canonical form) to start the algorithm. If you can't find a place to start, then possibly the LP formulation has no feasible solution. For most problems we actually need to solve a 'fabricated' LP to find an initial BFS for the problem of interest. 2. Determine whether or not the current BFS can be improved. This is done by asking whether there is a way to improve the objective function by making a marginal change at the corner point - namely by increasing from zero the value of one of the non isolated (non basic) variables. 3. Stop if the current BFS is optimal (no improvement possible). Otherwise, identify an adjacent BFS with a better objective value and perform the pivot operations necessary to change the canonical form. The pivot is performed by elementary row operations. [In some cases, improvement may be possible and it may be possible to improve the objective indefinitely (i.e., make infinite profits). In such cases, the algorithm stops and reports that the solution is unbounded. You should either quit school and cash in your fortune, or take a look at the LP you have tried to solve and understand why it is mis-formulated.] 4. Repeat step 2 with the new BFS. 54

SIMPLEX METHOD - EXAMPLE ORIGINAL LP PROBLEM - ADD SLACKS, PUT INTO STANDARD (AND CANONICAL) FORM Z - 40 S - 50 E = 0 4/5 S + 6/5 E + X1 = 16 2 S + 3 E + X2 = 30 2/3 S + 2 E + X3 = 16 16/3 S + 4 E + X4 = 64 Note from the canonical form, we identify a BFS (a corner point) by setting the nonisolated variables equal to zero. From the above, we identify the solution: S=0, E=0, X1 = 16, X2 = 30, X3 = 16, X4 = 64. and objective value Z = 0 Can we improve this solution by increasing one of the non-isolated variables? From the objective row we see that if we increase S by 1 and hold E at 0, then Z increases by 40. Similarly, if we increase E by 1 and hold S at 0, then Z increases by 50. Thus, it appears that we can improve the solution by increasing either S or E. Since the rate of increase is greater for E, we select E to increase. By how much can we increase E? To answer this question we examine each of the constraint rows to see what happens to the isolated variables as we increase E, holding S at 0. To facilitate this assessment, we can re-write the constraint equations as follows (dropping S): X1 = 16-6/5 E X2 = 30-3 E X3 = 16-2 E X4 = 64-4 E We will increase E until one of the isolated variables reaches 0 which occurs when E = 8, and X3 = 0. This also tells us how to identify the adjacent BFS (corner point): the next corner point will have S and X3 as non-isolated variables. 55

To create the next canonical form we perform a series of elementary row operations so as to replace X3 with E in the set of isolated variables. This can be done as follows: Give E a coefficient of 1 by multiplying constraint 3 by ½ : New Constraint 3: 1/3 S + E + ½X3 = 8 Eliminate E from constraint 1 by subtracting 6/5 * constraint 3 from constraint 1: Old Constraint 1: 4/5 S + 6/5 E + X1 = 16-6/5* New Constraint 3: -2/5 S - 6/5E -3/5 X3 = -48/5 ------------------------------------------------------------------------------------------------ New Constraint 1: 2/5 S + X1-3/5 X3 = 32/5 Do the same for constraints 2 and 4 Eliminate E from objective row by adding 50* constraint 3 to the objective row: Old Objective: Z - 40 S - 50 E = 0 50*New Constraint 3 50/3 S + 50 E + 25 X3 = 400 ------------------------------------------------------------------------------------------------ New Objective: Z -70/3 S + 25 X3 = 400 56

The result from these operations is a new canonical form: Z - 70/3 S + 25 X3 = 400 2/5 S + X1-3/5 X3 = 32/5 S + X2-3/2 X3 = 6 1/3 S + E + 1/2 X3 = 8 4 S - 2 X3 + X4 = 32 From the canonical form, we identify a BFS (a corner point) by setting the non-isolated variables equal to zero, namely set S = X3 = 0. Thus, we identify the solution: S=0, E=8, X1 = 32/5, X2 = 6, X3 = 0, X4 = 32. and objective value Z = 400. Can we improve this solution by increasing one of the non-isolated variables? From the objective row we see that if we increase S by 1 and hold X3 at 0, then Z increases by 70/3. If we increase X3 by 1 and hold S at 0, then Z decreases by 25. Thus, it appears that we can improve the solution, but only by increasing S. By how much can we increase S? To answer this question we examine each of the constraint rows to see what happens to the isolated variables as we increase S, holding X3 at 0. We re-write the constraint equations as follows (dropping X3): X1 = 32/5-2/5 S X2 = 6 - S E = 8-1/3 S X4 = 32-4 S We will increase S until one of the isolated variables reaches 0 which occurs when S = 6, and X2 = 0. This also tells us how to identify the adjacent BFS (corner point): the next corner point will have X2 and X3 as non-isolated variables. To create the next canonical form we perform a series of elementary row operations so as to replace X2 with S in the set of isolated variables. This can be done as before: 57

After a series of elementary row operations to isolate S in constraint 2: Z + 70/3 X2-10 X3 = 540 X1-2/5 X2 = 4 S + X2-3/2 X3 = 6 E - 1/3 X2 + X3 = 6-4 X2 + 4 X3 + X4 = 8 From this canonical form we identify the solution: S=6, E=6, X1 = 4, X2 = 0, X3 = 0, X4 = 8. and objective value Z = 540. We see that we can improve this solution by increasing X3, and we find that we can increase X3 until X4 reaches 0. We then replace X4 by X3 in the set of isolated variables: Z + 40/3 X2 + 5/2 X4 = 560 X1-2/5 X2 = 4 S - 1/2 X2 + 3/8 X4 = 9 E + 2/3 X2-1/4 X4 = 4 - X2 + X3 + 1/4 X4 = 2 From this canonical form we identify the solution: S=9, E=4, X1 = 4, X2 = 0, X3 = 2, X4 = 0. and objective value Z = 560. We see that we cannot improve this solution by increasing either X2 or X4. This is the optimal solution. 58