1 / 30

10CS661 OPERATION RESEARCH

10CS661 OPERATION RESEARCH. Engineered for Tomorrow. UNIT 3 SIMPLEX METHOD 2. Engineered for Tomorrow. Simplex Method. Simplex : a linear-programming algorithm that can solve problems having more than two decision variables.

robertsa
Download Presentation

10CS661 OPERATION RESEARCH

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 10CS661 OPERATION RESEARCH Engineered for Tomorrow

  2. UNIT 3 SIMPLEX METHOD 2 Engineered for Tomorrow

  3. Simplex Method • Simplex:a linear-programming algorithm that can solve problems having more than two decision variables. • The simplex technique involves generating a series of solutions in tabular form, called tableaus. By inspecting the bottom row of each tableau, one can immediately tell if it represents the optimal solution. Each tableau corresponds to a corner point of the feasible solution space. The first tableau corresponds to the origin. Subsequent tableaus are developed by shifting to an adjacent corner point in the direction that yields the highest (smallest) rate of profit (cost). This process continues as long as a positive (negative) rate of profit (cost) exists. Subject Name: OPERATION RESEARCH Subject Code:10CS661 Prepared By: Mrs.G.Annapoorani,Mrs.Prameladevi,Mrs.Sindhuja Department: CSE Date:23.02.2015

  4. Simplex Method • Simplex:a linear-programming algorithm that can solve problems having more than two decision variables. • The simplex technique involves generating a series of solutions in tabular form, called tableaus. By inspecting the bottom row of each tableau, one can immediately tell if it represents the optimal solution. Each tableau corresponds to a corner point of the feasible solution space. The first tableau corresponds to the origin. Subsequent tableaus are developed by shifting to an adjacent corner point in the direction that yields the highest (smallest) rate of profit (cost). This process continues as long as a positive (negative) rate of profit (cost) exists. • TOPICS COVERED • Adapting to other model forms • Post optimality Analysis • Computer Implementation • Foundation of the Simplex Method

  5. 1.ADAPTING TO OTHER MODEL FORMS • Equality Constraints • Negative Right Hand Sides • Functional Constraints in ≥ form • Minimization problems There is another way to handle these constraints, with an artificial variable.

  6. 1.1 “BIG M METHOD” • Solve the following linear programming problem by using the simplex method: • Min Z =2 X1 + 3 X2 S.t. ½ X1 + ¼ X2 ≤ 4 X1 + 3X2 20 X1 + X2 = 10 X1, X2  0

  7. Contd… • Solution Step 1: standard form Min Z, s.t. Z – 2 X1 – 3 X2 - M A1 -M A2 = 0 ½ X1 + ¼ X2 + S1 = 4 X1 + 3X2 - S2 + A1 = 20 X1 + X2 + A2 = 10 X1, X2 ,S1, S2, A1, A2  0 Where: M is a very large number

  8. Contd… • Notes M, a very large number, is used to ensure that the values of A1 and A2, …, and An will be zero in the final (optimal) tableau as follows: 1. If the objective function is Minimization, then A1, A2, …, and An must be addedto the RHS of the objective function multiplied by a very large number (M). Example: if the objective function is Min Z = X1+2X2, then the obj. function should be Min Z = X1 + X2+ MA1 + MA2+ …+ MAn OR Z – X1 - X2- MA1 - MA2- …- MAn = 0 2. If the objective function is Maximization, then A1, A2, …, and An must be subtracted from the RHS of the objective function multiplied by a very large number (M). Example: if the objective function is Max Z = X1+2X2, then the obj. function should be Max Z = X1 + X2- MA1 - MA2- …- MAn OR Z - X1 - X2+ MA1 + MA2+ …+ MAn = 0 N.B.: When the Z is transformed to a zero equation, the signs are changed

  9. Contd… • Step 2: Initial tableau Note that one of the simplex rules is violated, which is the basic variables A1, and A2 have a non zero value in the z row; therefore, this violation must be corrected before proceeding in the simplex algorithm as follows.

  10. Contd… • To correct this violation before starting the simplex algorithm, the elementary row operations are used as follows: New (Z row) = old (z row) ± M (A1 row) ± M (A2 row) In our case, it will be positive since M is negative in the Z row, as following: Old (Z row): -2 -3 0 0 -M -M 0 M (A1 row): M 3M 0 -M M o 20M M (A2 row): M M 0 0 0 M 10M New (Z row):2M-2 4M-3 0 -M 0 0 30M It becomes zero

  11. Contd… • The initial tableau will be: • Since there is a positive value in the last row, this solution is not optimal • The entering variable is X2 (it has the most positive value in the last row) • The leaving variable is A1 (it has the smallest ratio)

  12. Contd… • First iteration • Since there is a positive value in the last row, this solution is not optimal • The entering variable is X1 (it has the most positive value in the last row) • The leaving variable is A2 (it has the smallest ratio)

  13. Contd… • Second iteration This solution is optimal, since there is no positive value in the last row. The optimal solution is: X1 = 5, X2 = 5, S1 = ¼ A1 = A2 = 0 and Z = 25

  14. Contd… • In the final tableau, if one or more artificial variables (A1, A2, …) still basic and has a nonzero value, then the problem has an infeasible solution. • All other notes are still valid in the Big M method. • In the final tableau, if one or more artificial variables (A1, A2, …) still basic and has a nonzero value, then the problem has an infeasible solution • If there is a zero under one or more nonbasic variables in the last tableau (optimal solution tableau), then there is a multiple optimal solution. • When determining the leaving variable of any tableau, if there is no positive ratio (all the entries in the pivot column are negative and zeroes), then the solution is unbounded.

  15. 1.2. Two-Phase Method • Initialization: Add artificial variables to get an obvious initial solution for the artificial problem. • The objective of this phase is to find a BFS to the real problem. • We minimize the artificial problem. • Example:Artificial Problem Minimize Z = X4 + X6 0.3X1 + 0.1X2 +X3 = 27 0.5X1 + 0.5X2 +X4 = 6 0.6X1 + 0.4X2 -X5 + X6 = 6 The Real problem:Minimize Z = 0.4X1 + 0.5X2 0.3X1 + 0.1X2 +X3 = 27 0.5X1 + 0.5X2 = 6 0.6X1 + 0.4X2 -X5 = 6

  16. Contd… Min Z = X4 + X6 becomes Max -Z = – X4 – X6 Use elementary row operations to zero these out.(E.g. add or subtract multiples of the other rows until the coefficients on X4 and X6 are zero. That gives us –Z -1.1X1 - 0.9X2 +X5 = -12 We perform the usual simplex maximization and find a BFS (6,6,0,3,0,0,0) Min Z = X4 + X6 becomes Max -Z = – X4 – X6 Use elementary row operations to zero these out.(E.g. add or subtract multiples of the other rows until the coefficients on X4 and X6 are zero. That gives us –Z -1.1X1 - 0.9X2 +X5 = -12 We perform the usual simplex maximization and find a BFS (6,6,0,3,0,0,0)

  17. Contd…

  18. Contd… • Start from the final tableau of phase 1 • Drop the artificial variables • Substitute the phase 2 objective function • Restore proper form by eliminating the basic variables X1 and X2 from the objective row (use row operations) • Solve the phase 2 problem

  19. Phase 2 Optimal Solution: X1 = 7.5, X2 = 4.5, X3 (slack)=0, X5 (surplus) = 0.3

  20. Contd… • Artificial variable method can construct a BFS when an obvious one is not available. • Using either the big M method or the two phase method allows simplex to work. • Possible pitfall: There may be no feasible solutions to the real problem, but by constructing artificial variables we may allow the simplex to proceed and report an “optimal solution” • When this happens, one of the artificial variables will have a positive value in the final solution.

  21. 2.Post-Optimality Analysis • Re-optimization • Shadow prices • Sensitivity analysis • Parametric programming

  22. Contd… • Reoptimization: • If we have found an optimal solution for one version of an LP and then want to • Run A slightly different version, it is inefficient to start from scratch. Re-optimization • Involves deducing how changes in the original model get carried into the final • solution (our original optimal solution). The final tableau is then revised in • light of the new information and the iterations start from there. If the tableau that • emerges is not feasible, a dual method can be applied. ) • Sensitivity analysis • Sensitivity parameters are those that can’t be changed without changing • the optimal solution.If a shadow price on a constraint is positive, then an increase • in the RHS of that constraint will change the optimal solution. If it is zero, there • is a range over which it can be changed with no change in the optimal solution. • Also, if a reduced cost is non-zero, there will be a range over which the related • Cj can be changed without affecting the solution

  23. Contd… • Parametric programming Related to sensitivity analysis Involves the systematic study of how the optimal solution changes as many parameters change simultaneously over some range. Trade-offs in parameter values can be studied, e.g. some resources (bi) can be increased if others are reduced. • Shadow Prices: It is the change in the optimum value of the objective function per unit increase of the resources or the shadow prices of a resource is the unit price that is equal to increase in profit to be realized by one additional unit of the resource.

  24. 3.Computer Implementation • Hand calculations of simplex method are difficult.The problem can be solved on desktop computer,personnel computer as well as work stations. The matrix form is the most suitable form to use in computers. • Software/Packages used are: 1. CPLEX 2. LINDO It is the computer evolution that has made possible the wide spread application of linear programming in recent years.

  25. 4.Foundations of the Simplex Method • Simplex method is an algebraic procedure • However, its underlying concepts are geometric • Understanding these geometric concepts helps before going into their algebraic equivalents • With two decision variables, the geometric concepts are easy to visualize • Should understand the generalization of these concepts to higher dimensions Maximize Z = c1x1 + c2x2 + … + cnxn subject to a11x1 + a12x2 + … + a1nxn ≤ b1 a21x1 + a22x2 + … + a2nxn ≤ b2 … am1x1 + am2x2 + … + amnxn ≤ bm x1≥ 0, x2≥ 0, …, xn≥ 0

  26. Contd… • Constraint boundary equation • For any constraint, obtain by replacing its , =,  by = • It defines a “flat” geometric shape: hyperplane • Corner-point solution • Simultaneous solution of n constraint boundary equations Property 1: • If there is exactly one optimal solution, then it must be a corner-point feasible solution • If there are multiple optimal solutions (and a bounded feasible region), then at least two must be adjacent corner-point feasible solutions Property 2: There are only a finite number of corner-point feasible solutions

  27. Contd… • Constraint boundary equation • For any constraint, obtain by replacing its , =,  by = • It defines a “flat” geometric shape: hyperplane • Corner-point solution • Simultaneous solution of n constraint boundary equations Property 1: • If there is exactly one optimal solution, then it must be a corner-point feasible solution • If there are multiple optimal solutions (and a bounded feasible region), then at least two must be adjacent corner-point feasible solutions Property 2: There are only a finite number of corner-point feasible solutions

  28. Assignment-3 • Explain the typical steps in post optimality analysis in linear programming. • Solve the following LPP using Big M method. Maximize Z= 3x1+5x2 STC x1<=4 2x2<=12 3x1+2x2 =18 x1,x2>=0 • Solve the following LPP using Big M method. Minimize Z= 0.4x1+0.5x2 STC 0.3x1 + 0.1x2 <=2.7 0.5x1+0.5x2 =6 0.6x1 + 0.4x2 >=6 x1,x2>=0

  29. Solve the following LPP using Big M method. Minimize Z= 2x1+x2 STC x1 + 2x2 <=4 3x1+x2 =3 4x1 + 3x2 >=6 x1,x2>=0 • Solve the following LPP using Two phase method Maximize Z= 4x1+x2 STC 3x1 + x2 =3 x1+2x2 <=4 4x1 + 3x2 >=6 x1,x2>=0

  30. Solve the following LPP using Two phase method Minimize Z= 7.5x1-3x2 STC 3x1 - x2- x3 > =3 x1 - x2 + x3 >=2 x1,x2, x3>=0 • Solve the following LPP using Two phase method Maximize Z= 3x1-x2 STC 2x1 + x2 > =2 x1 +3x2 <=2 x2 <=4 x1,x2>=0

More Related