Presentation is loading. Please wait.

Presentation is loading. Please wait.

This presentation shows how the tableau method is used to solve a simple linear programming problem in two variables: Maximising subject to two  constraints.

Similar presentations


Presentation on theme: "This presentation shows how the tableau method is used to solve a simple linear programming problem in two variables: Maximising subject to two  constraints."— Presentation transcript:

1 This presentation shows how the tableau method is used to solve a simple linear programming problem in two variables: Maximising subject to two  constraints.

2 Setting up problem Constraint equations 2x + y < 10 6x + 24y < 72 The objective function (maximise) P = 4x + 6y

3 6x + 24y < 72 2x + y < 10 x = 0 y = 10 y = 0x = 5 x = 0 y = 3 y = 0x = 12 Note Maximum x value in shaded area is x = 5 Maximum y value in shaded area is y = 3 At intersection x = 4 and y = 2 Profit = 4x + 6y = 18 Profit = 4x + 6y = 20Profit = 4x + 6y = 28 1 2 3 4 5 246810121416180 X-> ^ | Y

4 To find the maximum profit we need to consider each vertex in the shaded area. What the simplex method does is an algebraic method of considering each vertex in turn that can be applied to any number of variables. 2 variables can be represented graphically easily 3 variables can be represented graphically by intersecting planes – but 4 or more variables is impossible to represent graphically

5 Applying the Simplex Algorithm In the Simplex algorithm slack variables are used to convert inequalities into equations which can then be solved using a tableau e.g. 2x + y < 10 6x + 24y < 72 x > 0 y > 0. Maximise the profit P = 4x + 6y.

6 Let 2x + y + s = 10 6x + 24y + t = 72 where s and t are slack variables s > 0 t > 0. The slack variables represent the difference between the amount used and the max amount allowable. In equation (1) 2  3 + 2 = 8 so the slack s is 2 as the maximum allowed is 10. In equation (2) 6  3 + 24  2 = 66 so the slack t is 6 as the maximum allowed is 72. Ex If x = 3 and y = 2

7 Maximisation problems The objective function P = 4x + 6y is rewritten as P - 4x - 6y = 0 Objective equation must equal zero.

8 Setting up problem Constraint equation 1 2x + y < 10 becomes 2x + y + s = 10 s is a slack variable which represents the difference between the amount used and the max amount allowable.

9 Setting up problem Constraint equation 2 6x + 24y < 72 becomes 6x +24y + t = 72 t is a slack variable which represents the difference between the amount used and the max amount allowable.

10 Setting up problem The objective function (maximise) P = 4x + 6y becomes P – 4x – 6y = 0

11 Setting up problem P – 4x – 6y = 0 2x + y + s = 10 6x +24y + t = 72 These equations are all put into a table and the objective is to make all the coefficients in the objective function positive.

12 LINEAR PROGRAMMINGExample 1 Maximise P – 4x – 6y = 0 Subject to 2x + y + s = 10 6x +24y + t = 72 Initial solution: P = 0 at (0, 0) 6x + 24y < 72

13 LINEAR PROGRAMMINGExample 1 Maximise P – 4x – 6y = 0 Subject to 2x + y + s = 10 6x +24y + t = 72 MaximiseP whereP - 4x - 6y = 0 subject to 2x + y + s = 10 6x + 24y + t = 72

14 The table PxystlEquation 1-4-6000(1) 0211010(2) 1P – 4x – 6y = 0 6x +24y + t = 72 2x + y + s = 10 06240172(3)

15 PxystRHS 1-4-6000 0211010 06240172 SIMPLEX TABLEAU P = 0, x = 0, y = 0, s = 10, t = 72 Initial solution

16 PxystRHS 1-4-6000 0211010 06240172 PIVOT 1Choosing the pivot column Choose negative number in objective row

17 PxystRHS 1-4-6000 0211010 10/2=5 06240172 72/6=12 PIVOT 1Choosing the pivot element Ratio test: Min. of 2 ratios gives 2 as pivot element

18 PxystRHS 1-4-6000 01  05 06240172 PIVOT 1Making the pivot Divide through the pivot row by the pivot element

19 PxystRHS 10-6000 01  05 06240172 PIVOT 1Making the pivot Objective row + 4 × pivot row

20 PxystRHS 10-4000 01  05 06240172 PIVOT 1Making the pivot Objective row + 4 × pivot row

21 PxystRHS 10-4200 01  05 06240172 PIVOT 1Making the pivot Objective row + 4 × pivot row

22 PxystRHS 10-42020 01  05 06240172 PIVOT 1Making the pivot Objective row + 4 × pivot row

23 PxystRHS 10-42020 01  05 00240172 PIVOT 1Making the pivot 2nd constraint row - 6 × pivot row

24 PxystRHS 10-42020 01  05 00210172 PIVOT 1Making the pivot 2nd constraint row - 6 × pivot row

25 PxystRHS 10-42020 01  05 0021-3172 PIVOT 1Making the pivot 2nd constraint row - 6 × pivot row

26 PxystRHS 10-42020 01  05 0021-3172 PIVOT 1Making the pivot 2nd constraint row - 6 × pivot row

27 PxystRHS 10-42020 01  05 0021-3142 PIVOT 1Making the pivot 2nd constraint row - 6 × pivot row

28 PxystRHS 10-42020 01  05 0021-3142 PIVOT 1New solution P = 20, x = 5, y = 0, r = 0, s = 0

29 The process PxystlEquation 1-4-6000 (1) 0211010 (2) 06240172 (3) 10 ÷ 2 = 5 72 ÷ 6 = 12 Smallest value (4) = 4 x (5) + (1) making x = 0 (5) = (2) ÷ 2 to obtain a 1, pivot row (6) = (3) - 6 x (5) –making x = 0 0 0 142 20 5 1 0 0 0 1 0 -4 ½ 21 2 ½ -3 Choose a column with a negative objective function for x or y -4 10 2 72 6 This means we have found the smallest x intercept i.e. x = 5

30 Interpreting Iterations Pxystl 1-4-6000 0211010 06240172 10-42020 01½½05 0021-3142 If y and s = 0 then x = 5 This means we are at the point x = 5 and y = 0 which was the smallest x intercept on the 2D graph drawn earlier If y and s = 0 then P = 20

31 6x + 24y < 72 2x + y < 10 Profit = 4x + 6y = £20 x = 5 and y = 0

32 Understanding why it is not a maximum –42–13–2100 50 1/21/2 1/21/2 10 2002–401 ltsyxP If y is increased then the profit would increase. So we have not yet reached a maximum profit. P – 4y + 2s = 20 P = 20 + 4y – 2s s and t are slack variables which represent the difference between the amount used and the max amount allowable.

33 PxystRHS 10-42020 01  05 0021-3142 PIVOT 2 Choose negative number in objective row Choosing the pivot column

34 PxystRHS 10-42020 01  05 5/  =10 0021-3142 42/21=2 PIVOT 2Choosing the pivot element Ratio test: Min. of 3 ratios gives 21 as pivot element

35 PxystRHS 10-42020 01  05 001 -3 / 21 1 / 21 2 PIVOT 2Making the pivot Divide the pivot row by the pivot element

36 PxystRHS 10-42020 01  05 001 -3 / 21 1 / 21 2 PIVOT 2Making the pivot Objective row + 4 x pivot row

37 PxystRHS 1002020 01  05 001 -3 / 21 1 / 21 2 PIVOT 2Making the pivot Objective row + 4 x pivot row

38 PxystRHS 100 30 / 21 020 01  05 001 -3 / 21 1 / 21 2 PIVOT 2Making the pivot Objective row + 4 x pivot row

39 PxystRHS 100 30 / 21 4 / 21 20 01  05 001 -3 / 21 1 / 21 2 PIVOT 2Making the pivot Objective row + 4 x pivot row

40 PxystRHS 100 30 / 21 4 / 21 28 01  05 001 -3 / 21 1 / 21 2 PIVOT 2Making the pivot Objective row + 4 x pivot row

41 PxystRHS 100 30 / 21 4 / 21 28 010  05 001 -3 / 21 1 / 21 2 PIVOT 2Making the pivot 1 st constraint row -  x pivot row

42 PxystRHS 100 30 / 21 4 / 21 28 010 24 / 42 05 001 -3 / 21 1 / 21 2 PIVOT 2Making the pivot 1 st constraint row -  x pivot row

43 PxystRHS 100 30 / 21 4 / 21 28 010 24 / 42 -1 / 42 5 001 -3 / 21 1 / 21 2 PIVOT 2Making the pivot 1 st constraint row -  x pivot row

44 PxystRHS 100 30 / 21 4 / 21 28 010 24 / 42 -1 / 42 4 001 -3 / 21 1 / 21 2 PIVOT 2Making the pivot 1 st constraint row -  x pivot row

45 The process PxystlEquation 1-4-6000 0211010 06240172 (4) (6) 42 ÷ 21 = 2 0 0 1 42 20 5 1 0 0 0 1 0 -4 ½ 21 2 ½ -3 Choose a column with a negative objective function for x or y 100 (7) = (4) + 4 x (9) making y =0 30 / 21 4 / 21 24 / 42 -1 / 42 -3 / 21 1 / 21 0 0 0 0 1 28 4 12 (8) = (5) -  x (9) making y = 0 (9) = (6) ÷ 21 to obtain 1, pivot row -4 (5) 5 ÷ ½ = 10 Smallest value 5½ 42 21

46 Interpreting Iterations If s and t = 0 then P = 28 If s and t equal 0 then x = 4 If s and t equal 0 then y = 2 This means we are at the point x = 4 and y = 2 which was the interception of the 2 lines on the 2D graph drawn earlier. P = 4x + 6y = £28 Pxystl 1-4-6000 0211010 06240172 10-42020 01½½05 00-213-42 100 30 / 21 4 / 21 28 010 24 / 42 -1 / 42 4 001 -3 / 21 1 / 21 2

47 6x + 24y < 72 2x + y < 10 Profit = 4x + 6y = £28 x = 4 and y = 2

48 2 1 / 21 -3 / 21 100 4 -1 / 42 24 / 42 010 28 4 / 21 30 / 21 001 ltsyxP Understanding why it is a maximum If either s or t are increased then the profit would decrease. So the maximum profit occurs when s and t = 0 P + 30 / 21 s + 4 / 21 t = 28 P = 28 – 30 / 21 s – 4 / 21 t s and t are slack variables which represent the difference between the amount used and the max amount allowable.

49 Understanding why it is a maximum 2 1 / 21 -3 / 21 100 4 -1 / 42 24 / 42 010 28 4 / 21 30 / 21 001 ltsyxP So obtaining a profit line with positive coefficients will give a maximum. Spreadsheet

50 50 There are 9 steps in the Simplex algorithm 1.Rewrite objective formula so it is equal to zero 2.Add slack variables to remove inequalities 3.Place in a tableau 4.Look at the most negative values to determine pivot column 5.Divide end column by the corresponding pivot value in that column 6.The least value is the pivot row 7.Divide pivotal row by pivot value – so pivot becomes 1 8.Add/subtract multiples of pivot row to other rows to zero 9.When top element are ≥ 0 then optimised solution

51 Summary questions Link to notes


Download ppt "This presentation shows how the tableau method is used to solve a simple linear programming problem in two variables: Maximising subject to two  constraints."

Similar presentations


Ads by Google