Chapter 5: Linear Programming: The Simplex Method

Slides:



Advertisements
Similar presentations
February 14, 2002 Putting Linear Programs into standard form
Advertisements

Lecture 3 Linear Programming: Tutorial Simplex Method
Operation Research Chapter 3 Simplex Method.
L17 LP part3 Homework Review Multiple Solutions Degeneracy Unbounded problems Summary 1.
SIMPLEX METHOD FOR LP LP Model.
Assignment (6) Simplex Method for solving LP problems with two variables.
LECTURE 14 Minimization Two Phase method by Dr. Arshad zaheer
Chapter 6 Linear Programming: The Simplex Method
Dr. Sana’a Wafa Al-Sayegh
L16 LP part2 Homework Review N design variables, m equations Summary 1.
Computational Methods for Management and Economics Carla Gomes Module 8b The transportation simplex method.
The Simplex Method: Standard Maximization Problems
The Simplex Algorithm An Algorithm for solving Linear Programming Problems.
Operation Research Chapter 3 Simplex Method.
Minimization by Dr. Arshad zaheer
Linear Programming (LP)
5.6 Maximization and Minimization with Mixed Problem Constraints
MIT and James Orlin © Chapter 3. The simplex algorithm Putting Linear Programs into standard form Introduction to Simplex Algorithm.
Stevenson and Ozgur First Edition Introduction to Management Science with Spreadsheets McGraw-Hill/Irwin Copyright © 2007 by The McGraw-Hill Companies,
LINEAR PROGRAMMING SIMPLEX METHOD.
Chapter 3 Linear Programming Methods 高等作業研究 高等作業研究 ( 一 ) Chapter 3 Linear Programming Methods (II)
1. The Simplex Method.
Chapter 6 Linear Programming: The Simplex Method
The Two-Phase Simplex Method LI Xiao-lei. Preview When a basic feasible solution is not readily available, the two-phase simplex method may be used as.
8. Linear Programming (Simplex Method) Objectives: 1.Simplex Method- Standard Maximum problem 2. (i) Greedy Rule (ii) Ratio Test (iii) Pivot Operation.
Simplex Algorithm.Big M Method
This presentation shows how the tableau method is used to solve a simple linear programming problem in two variables: Maximising subject to two  constraints.
Topic III The Simplex Method Setting up the Method Tabular Form Chapter(s): 4.
Barnett/Ziegler/Byleen Finite Mathematics 11e1 Learning Objectives for Section 6.4 The student will be able to set up and solve linear programming problems.
1 1 Slide © 2000 South-Western College Publishing/ITP Slides Prepared by JOHN LOUCKS.
Kerimcan OzcanMNGT 379 Operations Research1 Linear Programming: The Simplex Method Chapter 5.
1 1 © 2003 Thomson  /South-Western Slide Slides Prepared by JOHN S. LOUCKS St. Edward’s University.
The Simplex Method Updated 15 February Main Steps of the Simplex Method 1.Put the problem in Row-Zero Form. 2.Construct the Simplex tableau. 3.Obtain.
1 1 © 2003 Thomson  /South-Western Slide Slides Prepared by JOHN S. LOUCKS St. Edward’s University.
Simplex Method Adapting to Other Forms.  Until now, we have dealt with the standard form of the Simplex method  What if the model has a non-standard.
Solving Linear Programming Problems: The Simplex Method
Business Mathematics MTH-367 Lecture 15. Chapter 11 The Simplex and Computer Solutions Methods continued.
4  The Simplex Method: Standard Maximization Problems  The Simplex Method: Standard Minimization Problems  The Simplex Method: Nonstandard Problems.
Mechanical Engineering Department 1 سورة النحل (78)
 Minimization Problem  First Approach  Introduce the basis variable  To solve minimization problem we simple reverse the rule that is we select the.
1 1 Slide © 2005 Thomson/South-Western Linear Programming: The Simplex Method n An Overview of the Simplex Method n Standard Form n Tableau Form n Setting.
Chapter 4 Linear Programming: The Simplex Method
Chapter 6 Linear Programming: The Simplex Method Section 4 Maximization and Minimization with Problem Constraints.
1 1 Slide © 2005 Thomson/South-Western Simplex-Based Sensitivity Analysis and Duality n Sensitivity Analysis with the Simplex Tableau n Duality.
1 Simplex Method (created by George Dantzig in late 1940s) A systematic way of searching for an optimal LP solution BMGT 434, Spring 2002 Instructor: Chien-Yu.
OR Chapter 8. General LP Problems Converting other forms to general LP problem : min c’x  - max (-c)’x   = by adding a nonnegative slack variable.
Simplex Method for solving LP problems with two variables.
Simplex method : Tableau Form
An-Najah N. University Faculty of Engineering and Information Technology Department of Management Information systems Operations Research and Applications.
Simplex Method Simplex: a linear-programming algorithm that can solve problems having more than two decision variables. The simplex technique involves.
Copyright © 2006 Brooks/Cole, a division of Thomson Learning, Inc. Linear Programming: An Algebraic Approach 4 The Simplex Method with Standard Maximization.
Decision Support Systems INF421 & IS Simplex: a linear-programming algorithm that can solve problems having more than two decision variables.
(iii) Simplex method - I D Nagesh Kumar, IISc Water Resources Planning and Management: M3L3 Linear Programming and Applications.
GOOD MORNING CLASS! In Operation Research Class, WE MEET AGAIN WITH A TOPIC OF :
Chapter 4 The Simplex Algorithm and Goal Programming
The Simplex Method. and Maximize Subject to From a geometric viewpoint : CPF solutions (Corner-Point Feasible) : Corner-point infeasible solutions 0.
EMGT 6412/MATH 6665 Mathematical Programming Spring 2016
Simplex Algorithm.Big M Method
Chap 10. Sensitivity Analysis
Perturbation method, lexicographic method
10CS661 OPERATION RESEARCH Engineered for Tomorrow.
Linear programming Simplex method.
The Two-Phase Simplex Method
Chapter 4 Linear Programming: The Simplex Method
ISS500E-Quantitiative Decision Tehniques
Linear Programming SIMPLEX METHOD.
The Simplex Method The geometric method of solving linear programming problems presented before. The graphical method is useful only for problems involving.
Linear programming Simplex method.
Chapter 4 The Simplex Algorithm
Presentation transcript:

Chapter 5: Linear Programming: The Simplex Method

Simplex Method Is a iterative method used when number of variables are more than number of constraint s equation Basic Solution Given a linear program in standard form with n variables and m equations , a basis solution is obtained by setting n-m of the variables equal to zero and solving the constrain equation for other values of m variables

Overview of the Simplex Method Steps Leading to the Simplex Method Formulate Problem as LP Put In Standard Form Put In Tableau Form Execute Simplex Method

Example: Initial Formulation MIN 2x1 - 3x2 - 4x3 s. t. x1 + x2 + x3 < 30 2x1 + x2 + 3x3 > 60 x1 - x2 + 2x3 = 20 x1, x2, x3 > 0

Standard Form An LP is in standard form when: All variables are non-negative All constraints are equalities Putting an LP formulation into standard form involves: Adding slack variables to “<“ constraints Subtracting surplus variables from “>” constraints.

Example: Standard Form Problem in Standard Form MIN 2x1 - 3x2 - 4x3 s. t. x1 + x2 + x3 + s1 = 30 2x1 + x2 + 3x3 - s2 = 60 x1 - x2 + 2x3 = 20 x1, x2, x3, s1, s2 > 0

Basic Variables SIMPLEX METHOD Nonbasic Variables One of the n-m variables set equal to zero to obtained a basic solution Basic Variables One of the m variables not required to equal zero in a basic solution Basic Feasible Solution A basis feasible solution corresponds to an extreme point, it should satisfy the non-negativity constraints

Tableau Form A set of equations is in tableau form if for each equation: its right hand side (RHS) is non-negative, and there is a basic variable. (A basic variable for an equation is a variable whose coefficient in the equation is +1 and whose coefficient in all other equations of the problem is 0.) To generate an initial tableau form: An artificial variable must be added to each constraint that does not have a basic variable.

Simplex method Tableau Form A required form in which the given linear problem must be written before starting the initial simplex tableau. c1 c2 …………….. Cn a11 a22 a33…..a1n b1 a21 a22 a33 ….a2n b2 . . .am1 am2 am3…amnbm cj=coefficient of objective function aij =coefficient associated with variable j in ith constraint. The column of aij matrix corresponds to basis variables bi=RHS of ith constraint. It shows the values of basis variables

Constraints having less than equal to at RHS Simplex method Three different simplex method exist for three different type of constraints. Constraints having less than equal to at RHS Ax1+bx2 <=c Constraints having greater or equal to at RHS AX1+bx2 >=c Constraints having equal to at RHS AX1 +bx2=c

Simplex method for <= constraint Formulate a linear programming model of the problem Add slack variable to each constraint to obtained standard form Obtained a basic feasible solution by putting the nonbasis variable equal to zero ensuring that all of the nonbasis variables should be positive thus satisfying non-negativity constraints. …….

Max 50x1+ 40x2 S.t 3x1+5x2+ 1s1<=150 1x2+ 1s2<=20 8x1+5x2 + 1s3<=300

Standard form with slack variables Max 50x1+ 40x2 +0s1 +0s2 +0s3 S.t 3x1+5x2+ 1s1=150 1x2+ 1s2=20 8x1+5x2 + 1s3=300 X1,x2,s1,s2,s3 >=0

Determine basic solution Chose non-basic variables : n-m= 2 variables x2=0 s1=0 3X1=150 1s2=20 8X1+1s3=300 X1=50;x2=0;s1=0;s2=20;s3=-100 Not a feasible basic solution because s3=-100 does not satisfy the non-negativity condition

Lets put x1=0 x2= 0 so now the basic variables are s1,s2,s3 It is feasible basic solution as all variables satisfy the non-negativity condition

TABLEAU FORM For each constraint equation , the coefficient of one of m basic variables in that equation must be 1 and coefficient for all remaining basic variables in that equation must be 0 The coefficient for each basis variable must be 1 in only one constraint equation. In Present case s1,s2,s3 are basic variables and x1 and x2 are nonbasis variable.

TABLEAU FORM Objective function coefficient X1 x2 s1 s2 s3 50 40 0 0 0 3 5 1 0 0 150 0 1 0 1 0 20 8 5 0 0 1 300 B column Each column of the basis variable is a unit vector, a row is associated with basis variable. Value of each basis variable is then given by bi value bi value in the row associated with basic variable A matrix; m rows and n columns of coefficient of variable in constraint equation S1=b1=150;s2=b2=20;s3=b3=300

Step 3:Moving From Initial Basic to better basic Feasible Requires changing of set of basic variables One of nonbasic variable is made basic One of current basic variable is made non-basic Add two New Columns to simplex tableau One Column is labelled Basic ( in present case S1,S2,S3) , other column is labelled ‘Cb’ (coefficient of objective function for each of basic variables) Add two Row Zj,Cj-Zj Zj:is decrease in coefficient of objective function when one unit of variable corresponding to jth column of A matrix is brought in to basis.

Calcultion of Zj Multiply the element in the cb column by the corresponding element in jth column of A matrix Z1=0(3)+0(0)+0(8)=0 Z2=0(5)+0(1)+0(5)=0 Z3=0(1)+0(0)+0(0)=0 Z4=0(0)+0(1)+0(0)=0 Z5=0(0)+0(0)+0(1)=0 Value of objective function associated with current basic variable: It is obtained by multiplying the objective function coefficient in ‘Cb’ column by corresponding value of basic variable in ‘B’ Column. 0(150)+0(20)+0(300)=0

TABLEAU FORM Basic cb X1 x2 s1 s2 s3 50 40 0 0 0 s1 0 3 5 1 0 0 150 The initial simplex tableau: X1=0;x2=0;s1=150 ;s2=20;s3=300, objective function value=0 Basic cb X1 x2 s1 s2 s3 50 40 0 0 0 s1 0 3 5 1 0 0 150 s2 0 0 1 0 1 0 20 s3 0 8 5 0 0 1 300 Zj 0 0 0 0 0 0 Cj-Zj 50 40 0 0 0 Coefficient in X1 column indicate amount of decrease in current basic variables when nonbasic variable x1 is increased from 0 to 1. it is true for all other columns i.e. X2,X3. If X1 is increased by 1 then s1 is decreased by 3,s2=0,S3 by 8 keeping X2=0 If X2 is increased by 1 then s1 decreased by 5,s2 by 1,s3 by 5 keeping X1=0

Improving solution Criteria for Entering a new variable into basis Each unit of x1 increases the value of objective function by 50 Each unit x2 increased the value of objective function by 40 Looking in cj-zj row select the variable to enter the basis that will cause largest per unit improvement value in objective function.

Improving solution Criteria for Removing a variable from current basis If incoming basic variable is from column j For each row i, compute the ratio bi/aij for each aij greater than zero. the basic variable that will be removed from the basis corresponds to minimum of these ratios. 150/3= 50; 300/8= 37.5 X1 is new basic variable, and variable associated with row 3 i.e s3 will be leaving . Thus a31=8 corresponding to first column to is to enter the basic variable and basic variable corresponding to third row is leaving the basic variable. A31 is called pivot element

Calculating the next tableau Make the column of new basic variable a unit column, the column should look like exactly the column s3 the incoming nonbasic variable. A11=0;a21=0;a31=1 Elementary operation Convert the pivot column to 1 i.e set a31=1 Row operation multiple pivot row by 1/8-> 1X1+5/8x2+ 0s1+0s2+1/8s3=75/2--- > new pivot roe To set a11=0 multiply new pivot row by 3 and subtract it from row 1 (3x1-5x2+1s1)-(3x1+15/8x2+3/8s3)=150-225/2 0X1+25/8x2+1s1-3/8s3=75/2 a21 is already zero so do nt need to do any row operation

TABLEAU FORM Basic cb X1 x2 s1 s2 s3 50 40 0 0 0 50 40 0 0 0 s1 0 0 25/8 1 0 -3/8 75/2 s2 0 0 0 0 1 0 20 X1 50 1 5/8 0 0 1/8 75/2 Zj 1875 Cj-Zj New solution after 1 iteration: S1=75/2 S2=20;s3=0 X1=75/2;X2=0 Obj function value: 0(75/2)+0(20)+50(75/2)=1875

Next iteration Calcualte Zj and cj-zj again after first iteration

TABLEAU FORM Basic cb X1 x2 s1 s2 s3 50 40 0 0 0 50 40 0 0 0 s1 0 0 25/8 1 0 -3/8 75/2 s2 0 0 0 0 1 0 20 X1 50 1 5/8 0 0 1/8 75/2 Zj 50 250/8 0 0 50/8 1875 Cj-Zj 0 70/8 0 0 -50/8 Now again choose which variable will be used as new basis: checking the rule we select x2 because it has highest cofficient in cj-zj row

Selecting new basis and nonbasis variable To determine which variable will removed from the basis when x2 enters we need to compute bi/aij. In this case j is 2 because X2 lies in second column B1/a12=75/2*8/25=12 B2/a22=20/1=20 B3/a23=75/2*8/5=60 The smallest one is b1/a12 hence s1 will leave the basis. the pivot element is a21=25/8 Nonbasic variable X2 must be made basic which means we a21=1,a22=0 ;a23=0

ROW operation Step1: multiply every element in row 1by 8/25 for a12=1 Step2: subtract new row from row 2 to make a22=0 Step3 multiply the new pivot row by 5/8 and subtract from row 3 to make a32=0

TABLEAU FORM Basic cb X1 x2 s1 s2 s3 50 40 0 0 0 50 40 0 0 0 X2 40 0 1 8/25 0 -3/25 12 s2 0 0 0 -8/25 1 3/25 8 X1 50 1 0 -5/25 0 5/25 30 Zj 50 40 14/5 0 26/5 1980 Cj-Zj 0 0 -14/5 0 -26/5 Objfunction: 40(12)+0(8)+50(30)=1980 Third itertation is not possible becaz cj-zj is either zero or negative. Final solution: X1=30;X2=12;S1=0;S2=8;S3=0

Simplex method Greater than or equal to constraint ( Artificial Variable technique) Add an artificial variable in the >= constraint Add an artificial variable to the objective function Adding an artificial variable would violates the constraint and hence it should not be appear in final solution. This is achieved by a very high penalty –M for maximization and +M for Minimization problem Assume highest negative contribution to the profit due to this artificial variable, hence this variable should be removed ASAP. why

Create the initial tableau using the artificial table Start the iteration of changing the basis variable to non basic variable Check on every iteration if the artificial variable is equal to zero, if yes remove it from the tableau Repeat the iteration without the artificial variable until cj-zj row has non positive number left.

Revised Problem with >0 constraint Max 50x1+ 40x2 S.t 3x1+5x2+ <=150 1x2+ <=20 8x1+5x2 <=300 1x1+1x2>=25 X1,x2>=0

Standard form with slack variables Max 50x1+ 40x2 +0s1 +0s2 +0s3 S.t 3x1+5x2+ 1s1=150 1x2+ 1s2=20 8x1+5x2 + 1s3=300 1x1+1x2+ - 1s4>=25 X1,x2,s1,s2,s3 >=0

Setting non basic vaiables X1=x2=0 X1=0;x2=0;s1=150;s2=20;s3=300;s4=-25 Is it basis solution ???? Addition of an artificial variable a4 in >=0 constraint 3x1+5x2+ 1s1=150 1x2+ 1s2=20 8x1+5x2 + 1s3=300 1x1+1x2+ -1s4 +a4 >=25

S1,s2,s3 and a4 appear in different constraint with coefficient of 1 and RHS is non negative both requirement of tableau has satisfied Initial basic feasible solution X1=x2=0;s1=150;s2=20;s3=300;s4=0;a4=25

TABLEAU FORM Basic cb X1 x2 s1 s2 s3 s4 a4 50 40 0 0 0 0 -M

TABLEAU FORM Is this is a basic feasible solution ???? Basic cb X1 x2 s1 s2 s3 s4 a4 50 40 0 0 0 0 -M s1 0 3 5 1 0 0 0 0 150 s2 0 0 1 0 1 0 0 0 20 s3 0 8 5 0 0 1 0 0 300 a4 0 1 1 0 0 0 -1 0 25 Zj -M -M 0 0 0 M -M -25M Cj-zj 50+M 40+M 0 0 0 -M 0 Is this is a basic feasible solution ????

X1=x2=s4=0 (Non basis) S1=150;s2=20;s3=300;a4=25 (basic) Which is basic and non basic variable to leave and enter the tableau. Largest value in the cj-zj ??? X1 has to leave non basic to become the basis variable

Divide the ‘b’ column matrix with x1 column matrix and find the lowest value 150/3=50;300/8=37.5;25/1 a4 has to go to non basis variable.

TABLEAU FORM A4=0 , now drop its associated column from tableau Basic cb X1 x2 s1 s2 s3 s4 a4 50 40 0 0 0 0 -M s1 0 0 2 1 0 0 3 -3 75 s2 0 0 1 0 1 0 0 0 20 s3 0 0 -3 0 0 1 8 -8 100 x1 50 1 1 0 0 0 -1 1 25 Zj 50 50 0 0 0 -50 50 1250 Cj-zj 0 -10 0 0 0 50 -M-50 A4=0 , now drop its associated column from tableau as it has been eliminated . Now the simplex tableau is

TABLEAU FORM Start the new iteration find the new basic and non Basic cb X1 x2 s1 s2 s3 s4 50 40 0 0 0 0 s1 0 0 2 1 0 0 3 75 s2 0 0 1 0 1 0 0 20 s3 0 0 -3 0 0 1 8 100 x1 50 1 1 0 0 0 -1 25 Zj 50 50 0 0 0 -50 1250 Cj-zj 0 -10 0 0 0 50 Start the new iteration find the new basic and non basic variable ???

S4 is new non basic variable as cj-zj is highest Divide b column matrix with s4 column matrix 75/3=25;100/8=12.525/-1 This means s3 will be going to non basic We need to find A16=0;a26=0;a36=1;a46=0 Applying row operation

TABLEAU FORM Require one more iteration Basic cb X1 x2 s1 s2 s3 s4 50 40 0 0 0 0 s1 0 0 25/8 1 0 -3/8 0 75/2 s2 0 0 1 0 1 0 0 20 s4 0 0 -3/8 0 0 1/8 1 25/2 x1 50 1 5/8 0 0 1/8 0 75/2 Zj 50 250/8 0 0 50/8 0 1875 Cj-zj 0 70/8 0 0 -50/8 0 Require one more iteration Basis and non basic variable ????

TABLEAU FORM X2 and S1 Basic cb X1 x2 s1 s2 s3 s4 50 40 0 0 0 0 50 40 0 0 0 0 x2 40 0 1 8/25 0 -3/25 0 12 s2 0 0 0 -8/25 1 3/25 0 8 s4 0 0 -3/25 0 2/25 1 17 x1 50 1 0 -5/25 0 5/25 0 30 Zj 50 40 14/5 0 26/5 0 1980 Cj-zj 0 0 -14/5 0 -26/5 0 X2 and S1