1© 2003 by Prentice Hall, Inc. Upper Saddle River, NJ 07458 Linear Programming: The Simplex Method.

Slides:



Advertisements
Similar presentations
The simplex algorithm The simplex algorithm is the classical method for solving linear programs. Its running time is not polynomial in the worst case.
Advertisements

Lecture 3 Linear Programming: Tutorial Simplex Method
Operation Research Chapter 3 Simplex Method.
Linear Programming – Simplex Method
Chapter 6 Linear Programming: The Simplex Method
The Simplex Method The geometric method of solving linear programming problems presented before. The graphical method is useful only for problems involving.
Copyright (c) 2003 Brooks/Cole, a division of Thomson Learning, Inc
Computational Methods for Management and Economics Carla Gomes Module 6a Introduction to Simplex (Textbook – Hillier and Lieberman)
Degeneracy and the Convergence of the Simplex Algorithm LI Xiao-lei.
To accompany Quantitative Analysis for Management, 8e by Render/Stair/Hanna 9-1 © 2003 by Prentice Hall, Inc. Upper Saddle River, NJ Chapter 9 Linear.
Computational Methods for Management and Economics Carla Gomes Module 8b The transportation simplex method.
Computational Methods for Management and Economics Carla Gomes Module 6b Simplex Pitfalls (Textbook – Hillier and Lieberman)
The Simplex Method: Standard Maximization Problems
Operation Research Chapter 3 Simplex Method.
Solving Linear Programs: The Simplex Method
Linear Programming (LP)
The Simplex Method.
D Nagesh Kumar, IIScOptimization Methods: M3L4 1 Linear Programming Simplex method - II.
MIT and James Orlin © Chapter 3. The simplex algorithm Putting Linear Programs into standard form Introduction to Simplex Algorithm.
Chapter 3 An Introduction to Linear Programming
Stevenson and Ozgur First Edition Introduction to Management Science with Spreadsheets McGraw-Hill/Irwin Copyright © 2007 by The McGraw-Hill Companies,
Water Resources Development and Management Optimization (Linear Programming) CVEN 5393 Feb 25, 2013.
LINEAR PROGRAMMING 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 method (algebraic interpretation)
Chapter 6 Linear Programming: The Simplex Method Section 2 The Simplex Method: Maximization with Problem Constraints of the Form ≤
Chapter 3. Pitfalls Initialization Ambiguity in an iteration
Topic III The Simplex Method Setting up the Method Tabular Form Chapter(s): 4.
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.
1 1 © 2003 Thomson  /South-Western Slide Slides Prepared by JOHN S. LOUCKS St. Edward’s University.
Public Policy Modeling Simplex Method Tuesday, October 13, 2015 Hun Myoung Park, Ph.D. Public Management & Policy Analysis Program Graduate School of International.
The big M method LI Xiao-lei.
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.
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
Sensitivity analysis LI Xiao-lei. A graphical introduction to sensitivity analysis Sensitivity analysis is concerned with how changes in an LP’s parameters.
1 Chapter 4 The Simplex Algorithm PART 2 Prof. Dr. M. Arslan ÖRNEK.
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.
University of Colorado at Boulder Yicheng Wang, Phone: , Optimization Techniques for Civil and Environmental Engineering.
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.
1. 2 We studying these special cases to: 1- Present a theoretical explanation of these situations. 2- Provide a practical interpretation of what these.
Business Mathematics MTH-367 Lecture 16. Chapter 11 The Simplex and Computer Solutions Methods continued.
Copyright © 2006 Brooks/Cole, a division of Thomson Learning, Inc. Linear Programming: An Algebraic Approach 4 The Simplex Method with Standard Maximization.
1 Simplex algorithm. 2 The Aim of Linear Programming A Linear Programming model seeks to maximize or minimize a linear function, subject to a set of linear.
Decision Support Systems INF421 & IS Simplex: a linear-programming algorithm that can solve problems having more than two decision variables.
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.
An Introduction to Linear Programming
EMGT 6412/MATH 6665 Mathematical Programming Spring 2016
Solving Linear Program by Simplex Method The Concept
Chap 10. Sensitivity Analysis
Perturbation method, lexicographic method
10CS661 OPERATION RESEARCH Engineered for Tomorrow.
SOLVING LINEAR PROGRAMMING PROBLEMS: The Simplex Method
Chapter 4 Linear Programming: The Simplex Method
ENGM 631 Optimization Ch. 4: Solving Linear Programs: The Simplex Method.
Chap 3. The simplex method
Chapter 3 The Simplex Method and Sensitivity Analysis
Chapter 4 The Simplex Algorithm
Presentation transcript:

1© 2003 by Prentice Hall, Inc. Upper Saddle River, NJ Linear Programming: The Simplex Method

2© 2003 by Prentice Hall, Inc. Upper Saddle River, NJ Introduction  Graphical methods are fine for 2 variables.  But most LP problems are too complex for simple graphical procedures.  The Simplex Method: oexamines corner points, like in graphing; osystematically examines corner points, using algebra, until an optimal solution is found; odoes its searching iteratively.

3© 2003 by Prentice Hall, Inc. Upper Saddle River, NJ Introduction Why study the Simplex Method?  The Simplex Method: oProvides the optimal solution to the X i variables and the maximum profit (or minimum cost). oProvides important economic information.  Understanding how the Simplex Method works is important because oit allows for understanding how to interpret LP computer printouts.

4© 2003 by Prentice Hall, Inc. Upper Saddle River, NJ Setting UP the Simplex Method The algebraic procedure is based on solving systems of equations. The first step in setting up the simplex method is to convert the functional inequality constraints to equivalent equality constraints. This conversion is accomplished by introducing slack variables. To illustrate, consider this constraint: X 1  4 The slack variable for this constraint is defined to be S 1 =4 - X 1 which is the amount of slack in the left-hand side of the inequality. Thus X 1 +S 1 =4

5© 2003 by Prentice Hall, Inc. Upper Saddle River, NJ Example Objective Function Max. Z=3X 1 +5X 2 Subject to: X 1  4  X 1 +S 1 =4 2X 2  12  2X 2 +S 2 =12 3X 1 +2X 2  18  3X 1 +2X 2 +S 3 =18 X 1,X 2  0

6© 2003 by Prentice Hall, Inc. Upper Saddle River, NJ The Standard Form of the Model Z-3X 1 -5X 2 =0..………(0) X 1 +S 1 =4...……...(1) 2X 2 +S 2 =12..………(2) 3X 1 +2X 2 +X 5 =18 ………...(3)

7© 2003 by Prentice Hall, Inc. Upper Saddle River, NJ The Simplex Method in Tabular Form Tabular form Eq.Basic variable Coefficient of:Right side ZX1X1 X2X2 S1S1 S2S2 S3S3 (0)Z (1)S1S (2)S2S (3)S3S

8© 2003 by Prentice Hall, Inc. Upper Saddle River, NJ Summary of the Simplex Method Initialization: Introduce slack variables, then constructing the initial simplex tableau. Optimality Test: The current basic feasible solution is optimal if and only if every coefficient in row (0) is nonegative (  0). If it is, stop; otherwise, go to an iteration to obtain the next basic feasible solution. Iteration: Step1 Determine the entering basic variable by selecting the variable with negative coefficient having the largest absolute value (i,e., the “most negative” coefficient) in Eq. (0). Put a box around the column below this coefficient, and call this the pivot column.

9© 2003 by Prentice Hall, Inc. Upper Saddle River, NJ Summary of the Simplex Method/ continued Step 2 Determine the leaving basic variable by applying the minimum ratio test. Minimum Ratio Test 1.Pick out each coefficient in the pivot column that is strictly positive (>0). 2.Divide each of these coefficients into the right side entry for the same row. 3.Identify the row that has the smallest of these ratios. 4.The basic variable for that row is the leaving basic variable, so replace that variable by the entering basic variable in the basic variable column of the next simplex tableau. Put a box around this row and call it the pivot row. Also call the number that is in both boxes the pivot number.

10© 2003 by Prentice Hall, Inc. Upper Saddle River, NJ Summary of the Simplex Method/ continued Step 3 Solve for the new basic feasible solution by using elementary row operations (by applying Gauss-jordan method), The method effects a change in basis by using two types of computations: 1. Type 1 (pivot equation): new pivot Eq.=old pivot Eq. ÷ pivot number 2. Type 2 (all other eqautions, including Z): new Eq. = old Eq. – (its entering column coefficient) X (new pivot Eq.)

11© 2003 by Prentice Hall, Inc. Upper Saddle River, NJ Example Solve this model using the simplex method: Objective Function Max. Z=3X 1 +5X 2 Subject to: X 1  4 2X 2  12 3X 1 +2X 2  18 X 1,X 2  0

12© 2003 by Prentice Hall, Inc. Upper Saddle River, NJ Solution First, the Standard Form of the model: Z-3X1-5X2=0..……….(0) X1+S1=4...……....(1) 2X2+S2=12..…….…(2) 3X1+2X2+X5=18 ………...(3)

13© 2003 by Prentice Hall, Inc. Upper Saddle River, NJ The Simplex Method in Tabular Form Tabular form Eq.Basic variable Coefficient of:Right side ZX1X1 X2X2 S1S1 S2S2 S3S3 (0)Z (1)S1S (2)S2S (3)S3S

14© 2003 by Prentice Hall, Inc. Upper Saddle River, NJ # (0) Iteration Tabular form Eq.Basic variable Coefficient of:Right side ZX1X1 X2X2 S1S1 S2S2 S3S3 (0)Z (1)S1S (2)S2S (3)S3S

15© 2003 by Prentice Hall, Inc. Upper Saddle River, NJ # (1) Iteration Tabular form Eq.Basic variable Coefficient of:Right side ZX1X1 X2X2 S1S1 S2S2 S3S3 (0)Z1-3002\5030 (1)S1S (2)X2X \206 (3)S3S

16© 2003 by Prentice Hall, Inc. Upper Saddle River, NJ # (2) Iteration Tabular form Eq.Basic variable Coefficient of:Right side ZX1X1 X2X2 S1S1 S2S2 S3S3 (0)Z10002\3136 (1)S1S \3-1\32 (2)X2X \206 (3)X1X \31\32

17© 2003 by Prentice Hall, Inc. Upper Saddle River, NJ Going to the optimality test, we find that this solution is optimal because none of the coefficients in row (0) is negative, so the algorithm is finished. Consequently, the optimal solution for this problem is X 1 =2, X 2 =6.

18© 2003 by Prentice Hall, Inc. Upper Saddle River, NJ Artificial Starting Solution (The M-Technique) In our presentation of the simplex method we have used the slack variable as starting basic solutions. However, If the original constraint is an equation or of the type (  ), we no longer have a ready starting basic feasible solution. The idea of using artificial variables is quite simple. The added variable will play the same role as that of a slack variable, in providing a starting basic variable. However, since such artificial variables have no physical meaning from the standpoint of the original problem (hence the name “artificial”), the procedure will be valid only if we force these variables to be zero when the optimum is reached.

19© 2003 by Prentice Hall, Inc. Upper Saddle River, NJ In other words, we use them only to start the solution and must subsequently force them to be zero in the final solution; otherwise, the resulting solution will be infeasible. Let us consider the next example:

20© 2003 by Prentice Hall, Inc. Upper Saddle River, NJ Example Objective Function Min. Z=4X 1 +X 2 ST 3X 1 +X 2 =3 4X 1 +3X 2  6 X 1 +2X 2  4 X 1,X 2  0 The standard form is obtained by augmenting a surplus (A1) and adding a slack (S1) to the left sides of constraints 2 and 3.Thus, we have:

21© 2003 by Prentice Hall, Inc. Upper Saddle River, NJ Example\continued The standard form: Min. Z=4X 1 +X 2 ST 3X 1 +X 2 =3 4X 1 +3X 2 –A 1 =6 X 1 +2X 2 +S 1 = 4 X 1,X 2, A, S 1  0 The first and second equations do not have variables that play the role of a slack. Hence we augment the two artificial variables R1 and R2 in these two equations as follows:

22© 2003 by Prentice Hall, Inc. Upper Saddle River, NJ Example\continued 3X 1 + X 2 +R 1 =3 4X 1 +3X 2 -A 1 +R 2 =6 We can penalize R1 and R2 in the objective function by assigning them very large positive coefficients in the objective function. Let M>0 be a very large constant; then the LP with its artificial variables becomes: Min. Z=4X 1 +X 2 +MR 1 +MR 2 ST 3X 1 + X 2 +R 1 =3 4X 1 +3X 2 -A 1 +R 2 =6 X 1 +2X 2 +S 1 =4 X 1, X 2, S 1, A 1, R 1, R 2  0

23© 2003 by Prentice Hall, Inc. Upper Saddle River, NJ Example\continued How does the M-technique change if we are maximizing instead of minimizing? Using the same logic of penalizing the artificial variable, we must assign them the coefficient (-M) in the objective function (M>0), thus making it unattractive to maintain the artificial variable at a positive level in the optimum solution. Having constructed a starting feasible solution, we must “condition” the problem so that when we put it in tabular form, the right-side column will render the starting solution directly. This is done by using the constraint equations to substitute out R1 and R2 in the objective function. Thus R 1 =3-3X 1 -X 2 R 2 =6-4X 1 -3X 2 +A 1

24© 2003 by Prentice Hall, Inc. Upper Saddle River, NJ Example\continued The objective function thus becomes Z=4X 1 +X 2 +M(3-3X 1 -X 2 )+M(6-4X 1 -3X 2 +A 1 ) =(4-7M)X 1 +(1-4M)X 2 +MA 1 +9M The sequence of tableaus leading to the optimum solution is shown in the next slides. Observe that this is a minimization problem so that the entering variable must have the most positive coefficient in the Z-equation. The optimum is reached when all the nonbasic variables have nonpositive z-coefficients. (remember that M is a very large positive constant).

25© 2003 by Prentice Hall, Inc. Upper Saddle River, NJ Example\continued The final standard form: Z-(4-7M)X 1 -(1-4M)X 2 -MA 1 =9M (0) ST 3X 1 + X 2 +R 1 = (1) 4X 1 +3X 2 -A 1 +R 2 = (2) X 1 +2X 2 +S 1 = (3) X 1, X 2, S 1, A 1, R 1, R 2  0

26© 2003 by Prentice Hall, Inc. Upper Saddle River, NJ Example\continued (The tabular form) Tabular form Eq.Basic variable Coefficient of: Right side X1X1 X2X2 A1A1 R1R1 R2R2 S1S1 (0)Z -4+7M-1+4M-M 000 9M (1)R1R (2)R2R (3)S1S

27© 2003 by Prentice Hall, Inc. Upper Saddle River, NJ Example\continued (Iteration #1) Tabular form Eq. Basic variable Coefficient of: Right side X1X1 X2X2 A1A1 R1R1 R2R2 S1S1 (0)Z 0(1+5M)/3-M(4-7M)/ M (1)X1X1 113/01/31/3001 (2)R2R2 05/35/3-4/3102 (3)S1S1 05/35/30-1/3013

28© 2003 by Prentice Hall, Inc. Upper Saddle River, NJ Example\continued (Iteration #2) Tabular form Eq. Basic variable Coefficient of: Right side X1X1 X2X2 A1A1 R1R1 R2R2 S1S1 (0)Z 0 0 1/51/58/5-M-1/5-M 0 18/5 (1)X1X1 10 1/51/5 3/53/5-1/5-1/5 03/53/5 (2)X2X2 01-3/5-4/53/53/506/56/5 (3)S1S

29© 2003 by Prentice Hall, Inc. Upper Saddle River, NJ Example\continued (Iteration #3 optimum) Tabular form Eq. Basic variable Coefficient of: Right side X1X1 X2X2 A1A1 R1R1 R2R2 S1S1 (0)Z /5-M-M -1/5 17/5 (1)X1X /52/50-1/52/52/5 (2)X2X /503/53/59/59/5 (3)A1A

30© 2003 by Prentice Hall, Inc. Upper Saddle River, NJ Example\continued The optimum solution is X 1 =2/5, X 2 =9/5, Z=17/5. Since it contains no artificial variables at positive level, the solution is feasible with respect to the original problem before the artificials are added. (If the problem has no feasible solution, at least one artificial variable will be positive in the optimum solution).

31© 2003 by Prentice Hall, Inc. Upper Saddle River, NJ Example #1 Consider the following linear program problem: Min. Z=3X 1 +8X 2 +X 3 ST 6X 1 +2X 2 +6X 3  6 6X 1 +4X 2 =12 2X 1 -2X 2  2 X 1,X 2, X 3  0 1.Construct the starting feasible solution (Set Up The Initial Simplex Tableau). 2.Determine the entering column and the leaving row.

32© 2003 by Prentice Hall, Inc. Upper Saddle River, NJ Example #2 Consider the following linear program problem: Max. Z=3X 1 +5X 2 ST X 1  4 2X 2  12 3X 1 +2X 2 =18 X 1,X 2  0 1.Construct the starting feasible solution (Set Up The Initial Simplex Tableau). 2.Determine the entering column and the leaving row.

33© 2003 by Prentice Hall, Inc. Upper Saddle River, NJ Special Cases in Simplex Method Application We will consider special cases that can arise in the application of the simplex method, which include: 1.Degeneracy. 2.Alternative optima (more than one optimum solution). 3.Unbounded solutions. 4.Nonexisting (or infeasible) solutions.

34© 2003 by Prentice Hall, Inc. Upper Saddle River, NJ Degeneracy In the application of the feasibility condition, a tie for the minimum ratio may be broken for the purpose of determining the leaving variable. When this happens, however, one or more of the basic variables will necessarily equal zero in the next iteration. In this case, we say that the new solution is degenerate. (In all LP examples we have solved so far, the basic variables always assumed strictly positive values). The degeneracy has two implications: The first deals with the phenomenon of cycling or circling (If you look at iterations 1 and 2 in the next example you will find that the objective value has not improved (Z=18)), in general, the simplex procedure would repeat the same sequence of iterations, never improving the objective value and never terminating the computations.

35© 2003 by Prentice Hall, Inc. Upper Saddle River, NJ Degeneracy The second theoretical point arises in the examination of iterations 1 and 2. Both iterations, although differing in classifying the variables as basic and nonbasic, yield identical values of all variables and objective. An argument thus arises as to the possibility of stopping the computations at iteration 1 (when degeneracy first appears), even though it is not optimum. This argument is not valid because, in general, a solution may be temporarily degenerate.

36© 2003 by Prentice Hall, Inc. Upper Saddle River, NJ Degeneracy/example Max. Z=3X 1 +9X 2 ST X 1 +4X 2  8 X 1 +2X 2  4 X 1,X 2  0

37© 2003 by Prentice Hall, Inc. Upper Saddle River, NJ Degeneracy/example R.S.S2S2 S1S1 X2X2 X1X1 BasicIteration Z 0 (starting) X 2 enters S 1 leaves 80141S1S S2S2 1804/904/3-Z 1 X 1 enters S 2 leaves 204/11 X2X2 012/1-02/1S2S2 182/3 00Z 2 (optimum) 22/1-2/110X2X X1X1

38© 2003 by Prentice Hall, Inc. Upper Saddle River, NJ Alternative Optima When the objective function is parallel to a binding constraint, the objective function will assume the same optimal value at more than one solution point. For this reason they are called alternative optima. Algebraically, after the simplex method finds one optimal basic feasible (BF) solution, you can detect if there any others and, if so, find them as follows: Whenever a problem has more than one optimal BF solution, at least one of the nonbasic variables has a coefficient of zero in the final row (0), so increasing any such variable will not change the value of Z. Therefore, these other optimal BF solutions can be identified (if desired) by performing additional iterations of the simplex method, each time choosing a nonbasic variable with a zero coefficient as the entering basic variable.

39© 2003 by Prentice Hall, Inc. Upper Saddle River, NJ Alternative Optima/example Max. Z=2X 1 +4X 2 ST X 1 +2X 2  5 X 1 + X 2  4 X 1,X 2  0

40© 2003 by Prentice Hall, Inc. Upper Saddle River, NJ Alternative Optima/example R.S.S2S2 S1S1 X2X2 X1X1 BasicIteration Z 0 (starting) X 2 enters S 1 leaves 50121S1S S2S Z 1 (optimum) X 1 enters S 2 leaves 2/502/11 X2X2 2/312/1-02/1S2S Z 2 ( alternate optimum) X2X X1X1

41© 2003 by Prentice Hall, Inc. Upper Saddle River, NJ (2, 6) (4, 3) Every point on this darker line segment is optimal, each with z = 18. As in this case, any problem having multiple optimal solutions will have an infinite number of them, each with the same optimal value of the objective function.

42© 2003 by Prentice Hall, Inc. Upper Saddle River, NJ Unbounded Solution In some LP models, the values of the variables may be increased indefinitely without violating any of the constraints, meaning that the solution space is unbounded in at least one direction. Unboundedness in a model can point to one thing only. The model is poor constructed. The general rule for recognizing unboundedness is as follows: If at any iteration the constraint coefficients of a nonbasic variable are nonpositive, then the solution space is unbounded in that direction.

43© 2003 by Prentice Hall, Inc. Upper Saddle River, NJ Unbounded Solution/example Max. Z=2X 1 +X 2 ST X 1 -X 2  10 2X 1  40 X 1,X 2  0

44© 2003 by Prentice Hall, Inc. Upper Saddle River, NJ Unbounded Solution/example R.S.S2S2 S1S1 X2X2 X1X1 Basic Z S1S S2S2

45© 2003 by Prentice Hall, Inc. Upper Saddle River, NJ Infeasible Solution If the constraints cannot be satisfied, the model is said to have no feasible solution. This situation can never occur if all the constraints are of the type  (assuming nonegative right-side constants), since the slack variable always provides a feasible solution. However, when we employ the other types of constraints, we resort to the use of artificial variables which may do not provide a feasible solution to the original model. Although provisions are made to force the artificial variables to zero at the optimum, this can occur only if the model has a feasible space. If it does not, at least one artificial variable will be positive in the optimum iteration. See the next example, the artificial variable R is positive (=4) in the optimal solution.

46© 2003 by Prentice Hall, Inc. Upper Saddle River, NJ Infeasible Solution/example Max. Z=3X 1 +2X 2 ST 2X 1 +X 2  2 3X 1 +4X 2  12 X 1,X 2  0

47© 2003 by Prentice Hall, Inc. Upper Saddle River, NJ Infeasible Solution/example R.S.RA1S1S1 X2X2 X1X1 Basic Iteration 00M0-2-4M-3-3MZ 0 (starting) X 2 enters S 1 leaves S1S R 4-4M0M2+4M01+5MZ 1 (optimum) X 1 enters S 2 leaves X2X R