Presentation is loading. Please wait.

Presentation is loading. Please wait.

7. Linear Programming (Simplex Method)

Similar presentations


Presentation on theme: "7. Linear Programming (Simplex Method)"— Presentation transcript:

1 7. Linear Programming (Simplex Method)
Objectives: Slack variables Basic solutions - geometry Examples Refs: B&Z

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 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. 5x1+ 2x2=1,200 200 600 400 Consider the example: In this example we have 2 decision variables (x1, x2) and 2 functional constraints. max P = 4x1+ 5x2 subj to 2x1+ 3x2 ≤ 600 5x1+ 2x2 ≤ 1,200 x1 ≥ 0 x2 ≥ 0 2x1+ 3x2=600 feasible region

4 We introduce slack variables which turn our original system
2x x2 ≤ 600 5x x2 ≤ 1,200 into 2x x2 5x x2 + s1 + s2 = 600 = 1,200 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 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. without slack variables max P = 4x1+ 5x2 subj to 2x1+ 3x2 ≤ 600 5x1+ 2x2 ≤ 1,200 x1 ≥ 0 x2 ≥ 0 with slack variables max P = 4x1+ 5x2 subj to 2x1+ 3x2 + s1 = 600 5x1+ 2x s2 =1, 200 x1 ≥ 0, x2 ≥ 0, s1 ≥ 0, s2 ≥ 0

6 Let’s check the values of s1 and s2 at the corner points.
(x1, x2, s1, s2 ) = (0, 0, 600, 1200) P (0, 200) = 1,000 s1 = 0 s2 = 800 (x1, x2, s1, s2 ) = (0, 200, 0, 800) P (240, 0) = 960 s1 = 120 s2 = 0 (x1, x2, s1, s2 ) = (240, 0, 120, 0) P (2400/11, 600/11) = (9, ,000)/11 = 12,600/11 = 1, /11 s1 = 0 s2 = 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 Some of these points will be non-feasible.
For example: (i) x2 = s1 = 0 x1 = 300, s2 = -300 x1 = s2 = 0 x2 = 600, s1 = -1200 (ii) 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 called basic feasible solutions.

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

10 In this example we have 2 equations and 4 variables.
150 100 4x1+2x2=200 x1+3x2=150 feasible region 50 (30, 40) 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 x x s s2 1. feasible 2. Not feasible 3. feasible 4. feasible 5. Not feasible 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.


Download ppt "7. Linear Programming (Simplex Method)"

Similar presentations


Ads by Google