Slideshare.net (beta)

 

All comments

Add a comment on Slide 1

If you have a SlideShare account, login to comment; else you can comment as a guest


Showing 1-50 of 3 (more)

Simplex Algorithm

From sbishop2, 1 year ago

2071 views  |  2 comments  |  2 favorites  |  137 downloads  |  1 embed (Stats)
Embed
options

More Info

This slideshow is Public
Total Views: 2071
on Slideshare: 1996
from embeds: 75

Slideshow transcript

Slide 1: Linear programming simplex method This presentation will help you to solve linear programming problems using the Simplex tableau Steve Bishop 2004 1

Slide 2: This is a typical linear programming problem Keep left clicking the mouse to reveal the next part The objective Maximise P = 2x + 3y+ 4z function Subject to 3x +2y + z < 10 The constraints 2x + 5y+ 3z <15 x, y > 0 Steve Bishop 2004 2

Slide 3: The first step is to rewrite objective formula so it is equal to zero We then need to rewrite P = 2x + 3y + 4z as: P – 2x – 3y – 4z = 0 This is called the objective equation Steve Bishop 2004 3

Slide 4: Next we need to remove the inequalities from the constraints This is done by adding slack variables Adding slack variables s and t to the inequalities, we can write them as equalities: 3x +2y + z + s = 10 2x + 5y+ 3z + t = 15 These are called the constraint equations Steve Bishop 2004 4

Slide 5: Next, these equations are placed in a tableau P x y z s t values Steve Bishop 2004 5

Slide 6: First the Objective equation P – 2x – 3y – 4z =0 P x y z s t values 1 -2 -3 -4 0 0 0 Steve Bishop 2004 6

Slide 7: Next, the constraint equations 3x +2y +z +s = 10 2x + 5y + 3z + t = 15 P x y z s t values 1 -2 -3 -4 0 0 0 0 3 2 1 1 0 10 0 2 5 3 0 1 15 Steve Bishop 2004 7

Slide 8: We now have to identify the pivot First, we find the pivot column The pivot column is the column with the largest negative value in the objective equation Mark this column with an arrow P x y z s t values 1 -2 -3 -4 0 0 0 0 3 2 1 1 0 10 0 2 5 3 0 1 15 Steve Bishop 2004 8

Slide 9: The next step in identifying the pivot is to find the pivot row This is done by dividing the values of the constraints by the value in the pivot column P x y z s t values 1 -2 -3 -4 0 0 0 0 3 2 1 1 0 10 0 2 5 3 0 1 15 Steve Bishop 2004 9

Slide 10: 10 divided by 1 = 10 15 divided by 3 = 5 The lowest value gives the pivot row This is marked with an arrow P x y z s t values 1 -2 -3 -4 0 0 0 0 3 2 1 1 0 10 0 2 5 3 0 1 15 Steve Bishop 2004 10

Slide 11: The pivot is where the pivot column and pivot row intersect This is normally marked with a circle P x y z s t values 1 -2 -3 -4 0 0 0 0 3 2 1 1 0 10 0 2 5 3 0 1 15 Steve Bishop 2004 11

Slide 12: We now need to make the pivot equal to zero To do this divide the pivot row by the pivot value P x y z s t values 1 -2 -3 -4 0 0 0 0 3 2 1 1 0 10 0 2 5 3 0 1 15 Steve Bishop 2004 12

Slide 13: P x y z s t values 1 -2 -3 -4 0 0 0 0 3 2 1 1 0 10 0 2/3 5/3 3/3 0 1/3 15/3 Steve Bishop 2004 13

Slide 14: It is best to keep the values as fractions P x y z s t values 1 -2 -3 -4 0 0 0 0 3 2 1 1 0 10 0 2/3 5/3 1 0 1/3 5 Steve Bishop 2004 14

Slide 15: Next we need to make the pivot column values into zeros To do this we add or subtract multiples of the pivot column P x y z s t values 1 -2 -3 -4 0 0 0 0 3 2 1 1 0 10 0 2/3 5/3 1 0 1/3 5 Steve Bishop 2004 15

Slide 16: The pivot column in the objective function will go to zero if we add four times the pivot row The pivot column value in the other constraint will go to zero if we subtract the pivot row P x y z s t values 1 -2 -3 -4 0 0 0 0 3 2 1 1 0 10 0 2/3 5/3 1 0 1/3 5 Steve Bishop 2004 16

Slide 17: Subtracting 4 X the pivot row from the objective function gives: P x y z s t values 1+ -2+ -3+ -4+ 0+ 0+ 0+ 4(2/3) 4(5/3) 4(0) 4(1) 4(0) 4(1/3) 4(5) 0 3 2 1 1 0 10 0 2/3 5/3 1 0 1/3 5 Steve Bishop 2004 17

Slide 18: Subtracting 4 X the pivot row from the objective function gives: P x y z s t values 1 2/3 11/3 0 0 4/3 20 0 3 2 1 1 0 10 0 2/3 5/3 1 0 1/3 5 Steve Bishop 2004 18

Slide 19: Subtracting 1 X the pivot row from the other constraint gives: P x y z s t values 1 2/3 11/3 0 0 4/3 20 0 3- 2- 1- 1- 0- 10- 2/3 5/3 1 0 1/3 5 0 2/3 5/3 1 0 1/3 5 Steve Bishop 2004 19

Slide 20: Subtracting 1 times the pivot row from the other constraint gives: P x y z s t values 1 2/3 11/3 0 0 4/3 20 0 7/3 1/3 1 1 -1/3 5 0 2/3 5/3 1 0 1/3 5 Steve Bishop 2004 20

Slide 21: This then is the first iteration of the Simplex algorithm P x y z s t values 1 2/3 11/3 0 0 4/3 20 0 7/3 1/3 1 1 -1/3 5 0 2/3 5/3 1 0 1/3 5 Steve Bishop 2004 21

Slide 22: If any values in the objective equation are negative we have to repeat the whole process Here, there are no negative values. This is then the optimal solution. P x y z s t values 1 2/3 11/3 0 0 4/3 20 0 7/3 1/3 1 1 -1/3 5 0 2/3 5/3 1 0 1/3 5 Steve Bishop 2004 22

Slide 23: We now have to determine the values of the variables that give the optimum solution P x y z s t values 1 2/3 11/3 0 0 4/3 20 0 7/3 1/3 1 1 -1/3 5 0 2/3 5/3 1 0 1/3 5 Steve Bishop 2004 23

Slide 24: Reading the objective function: 2 11 4 1P  x y  t  20 3 3 3 P x y z s t values 1 2/3 11/3 0 0 4/3 20 0 7/3 1/3 1 1 -1/3 5 0 2/3 5/3 1 0 1/3 5 Steve Bishop 2004 24

Slide 25: Reading the objective function: 2 11 4 1P  x y  t  20 3 3 3 The maximum value for P is then 20 For this to be the case x, y and t must be zero In general any variable that has a value in the objective function is zero. Steve Bishop 2004 25

Slide 26: From the objective function x, y and t are zero – substituting these values in to the constraint rows gives: s = 5 and z = 5 P x y z s t values 1 2/3 11/3 0 0 4/3 20 0 7/3 1/3 0 1 -1/3 5 0 2/3 5/3 1 0 1/3 5 Steve Bishop 2004 26

Slide 27: The solution to the linear programming problem: maximise: P = 2x + 3y+ 4z subject to: 3x +2y + z < 10 2x + 5y+ 3z <15 x, y > 0 is: P=5 x = 0, y = 0 and z = 5 Steve Bishop 2004 27

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

Slide 29: Go to this web site to solve any linear programme problem using the simplex method: For on-line exercises go here: Steve Bishop 2004 29