1 / 13

7. Linear Programming (Simplex Method)

7. Linear Programming (Simplex Method). Objectives :. Slack variables Basic solutions - geometry Examples. Refs: B&Z 5.3. Last week we saw how to solve a Linear Programming problem geometrically. This method, however, has limitations.

Download Presentation

7. Linear Programming (Simplex Method)

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. 7. Linear Programming(Simplex Method) Objectives: Slack variables Basic solutions - geometry Examples Refs: B&Z 5.3.

  2. Last week we saw how to solve a Linear Programming problem geometrically. This method, however, has limitations. If we increase the number of constraints we may have hundreds of corner points. If we have more than two decision variables we will not even be able to sketch the graph. Fortunately, a procedure known as the Simplex Method will handle all these cases efficiently.

  3. 600 P = 4x1+ 5x2 max 5x1+ 2x2=1,200 subj to 2x1+ 3x2 ≤ 600 400 5x1+ 2x2 ≤ 1,200 x1 ≥ 0 x2 ≥ 0 200 200 400 600 feasible region 2x1+ 3x2=600 Slack Variables In week 1 we learnt techniques to solve systems of linear equations. However we don’t have good techniques for handling systems of inequalities. Our task is to transform a system we can’t handle into one that we can. Consider the example: In this example we have 2 decision variables (x1, x2) and 2 functional constraints.

  4. 2x1 + 3x2 ≤ 600 5x1 + 2x2 ≤ 1,200 = 600 2x1 + 3x2 + s1 = 1,200 5x1 + 2x2 + s2 We introduce slack variables which turn our original system into The slack variables “pick up the slack” on the LHS of the inequalities. You should use a different slack variable in each constraint. Notice that we are adding a positive value on the LHS to obtain the equality so we should say s1≥ 0, s2≥ 0

  5. without slack variables P = 4x1+ 5x2 P = 4x1+ 5x2 max max subj to subj to 2x1+ 3x2 + s1 = 600 2x1+ 3x2 ≤ 600 5x1+ 2x2 ≤ 1,200 5x1+ 2x2 + s2 =1, 200 x1 ≥ 0 x1 ≥ 0, x2 ≥ 0 x2 ≥ 0, s1 ≥ 0, s2 ≥ 0 with slack variables So now we have an L.P. problem which is equivalent to the original (in the sense that they have the same optimal solution) but with no inequalities.

  6. P (0, 0) = 0 s1 = 600 s2 = 1200 P (0, 200) = 1,000 s1 = 0 s2 = 800 P (240, 0) = 960 s1 = 120 s2 = 0 P (2400/11, 600/11) = (9,600 + 3,000)/11 = 12,600/11 = 1,145 5/11 s1 = 0 s2 = 0 Let’s check the values of s1 and s2 at the corner points. (x1, x2, s1, s2 ) = (0, 0, 600, 1200) (x1, x2, s1, s2 ) = (0, 200, 0, 800) (x1, x2, s1, s2 ) = (240, 0, 120, 0) (x1, x2, s1, s2 ) = (2400/11, 600/11, 0, 0)

  7. Observation: In this example there are two zeroes occurring at each corner point. In general, if we have n variables and m constraints we will have n-m zeroes at each corner point. In the previous example we had 4 variables (2 decision variables and 2 slack variables) and 2 constraints: n=4, m=2 so n-m=2 zeroes. These solutions are called basic solutions. In fact if we have an L.P. problem with n variables and m equations, and set any n-m variables equal to 0, we have a basic solution.

  8. For example: (i) x2 = s1 = 0 x1 = 300, s2 = -300 (ii) x1 = s2 = 0 x2 = 600, s1 = -1200 Some of these points will be non-feasible. The non-feasibility is indicated by the negativity of some variables. The basic solutions consist of all corner points of the feasible region and some non-feasible points. The corner points are those with non-negative co-ordinates. They are calledbasic feasible solutions.

  9. Max P = 5x1 + 6x2 Subj to 4x1 + 2x2≤ 200 x1 + 3x2≤ 150 x1≥ 0 x2≥ 0 x1≥ 0 x2≥ 0 s1≥ 0 s2≥ 0 Example 1: Find all basic feasible solutions of the following system: First add slack variables so that our new constraints are: 4x1 + 2x2 + s1 = 200 x1 + 3x2 + s2= 150

  10. (30, 40) 4x1+2x2=200 100 feasible region x1+3x2=150 50 50 100 150 In this example we have 2 equations and 4 variables. We find basic solutions by setting 2 variables at a time equal to zero.

  11. x1 x2 s1 s2 0 0 200 150 1. feasible 0 100 0 -150 2. Not feasible 0 50 100 0 3. feasible 50 0 0 100 4. feasible 150 0 -400 0 5. Not feasible 30 40 0 0 6. feasible Basic feasible solutions are: (0,0,200,150), (0,50,100,0), (50,0,0,100), (30,40,0,0)

  12. To solve the L.P. problem we need to evaluate the objective function at each of the basic feasible solutions. However, in practice this becomes impractical. Say for example we had an L.P. problem with 3 decision variables and 3 constraints (hence 3 slack variables). Putting 6-3=3 variables equal to zero at a time gives basic solutions. For 4 decision variables and 5 constraints, we have basic solutions………and so on. Luckily there is a better way!

  13. You should now be able to complete Q’s 1(a), (b) and (c) Example Sheet 3 from the Orange Book.

More Related