Topic 7 - Optimisation - Simplex Method

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 48

Quantitative Methods for

Decision Making:

SYSTEM OPTIMISATION _ LINEAR


PROGRAMMING: SIMPLEX METHOD
Dr Adrian Bown

Room: CC NT 104 / Tel. Ext. 27629


Summary of the Graphical Method

Resource 1, R 1 Resource 2, R 2 Profit

Commodity 1, C 1 3 2 2

Commodity 2, C 2 2 4 3

Maximum Resources 7 10

Resource
Design1, R 1 Resource 2, R 2
Drawing Profit

Commodity 1, C 1
Retaining wall 3 hours
3 2 hours
2 £ 100
2

Commodity
Portal 2, C 2
frame structure 2 hours
2 4
4 hours 3
£ 150

Maximum Resources 7
7 hours 10 10
hours
Summary of the Graphical Method

R1 R2 P

x 3 2 2

y 2 4 3

Maximum Resources 7 10

• Summary:
– Resource Equation 1: 3 x  2 y  7
– Resource Equation 2: 2 x  4 y  10
– The profit equation: P  2x  3y
– As there is only positive production, x  0 and y  0
Summary of the Graphical Method
Y

0 X
0 1 2 3 4 5 6
Summary of the Graphical Method

Corners of shaded region


Profit , P
x y ( P  2x  3y )

0 2.5 7.5
1 2 8
2.33 0 4.66

• The solution is: Pmax = 8, with resources of x = 1 and y = 2


• It is possible to use the Graphical Method to solve linear
programmes problems with three commodities

• This will generate equations with x, y and z terms

• These can be plotted as a three-dimensional curve with each


term represented by a plane, i.e. a x-plane, y-plane and a z-
plane

• It is easier to use this method to solve problems with three


resources but only two commodities

• This will result in three resource equations ( R1, R2 and R3 )


but in terms of x and y only
There are numerous different methods for linear programming

which range from the simple to the complex

Only two relatively simple methods will be considered in this

module:

• The Graphical method in Weeks 1 and 2;

• The Simplex method in Week 3


Example using the Simplex Method:
A structural steelwork fabricator classifies their products as heavy ( X ) or

light ( Y ). Both types undergo the 3 distinct processes; cutting, welding, and
surface treatment. The times (hours) required for each process to produce
one tonne of each product are :-

cutting welding Surface


treatment

heavy ( X ) 2 8 5

light ( Y ) 5 5 2

Per tonne of each product, there are 250 hours available for cutting, 310
hours for welding and 160 hours for surface treatment. Determine the
maximum profit if the profit per tonne of X is £9 and £10 for Y.
If the Graphical Method is used, the problem is set-out as follows:

` R1 R2 R3 Profit

X 2 8 5 9

Y 5 5 2 10

Maximum
250 310 160
Resources

And, the resource and profit equations would be:

– Resource Equation R 1 : 2 x  5 y  250


8 x  5 y  310
R2 :
5 x  2 y  160
R3 :
P  9 x  10 y
2 x  5 y  250
The limits of R1 ( ) are, x = 0, y = 50 and, x = 125, y = 0
8 x  5 y  310
R2 ( ) are, x = 0, y = 62 and, x = 38.75, y = 0
5 x  2 y  160
R3 ( ) are, x = 0, y = 80 and, x = 32, y = 0
Y

120

100

80

60

40

20

0 X
0 20 40 60 80 100 120
Y

120

100

80

60

40

20

0 X
0 20 40 60 80 100 120

The optimum solution can be found by determining the co-ordinates of


the four intersection points. These are then substituted into the Profit
Equation. The pair of co-ordinates which produce the maximum profit
are the optimal solution.
If the Graphical Method is used, the following constraints, and resource
and profit equations are generated:
– Resource Equation R : 2 x  5 y  250
1

8 x  5 y  310
R2 :
5 x  2 y  160
R3 :
P  9 x  10 y
– The profit equation :
With the Simplex Method, ‘ slack ’ variables are used to replace inequalities

with ‘ equals ’ in resource equations. Also, ensure that the right hand side
of the expressions are positive, i.e.:
– Resource Equation R : 2 x  5 y  w 1  250
1

8 x  5 y  w 2  310
R2 :
5 x  2 y  w 3  160
R3 :
P  9 x  10 y  0
– The profit equation :
• The next stage is to set up a Simplex Table

– Resource Equation R 1 : 2 x  5 y  w 1  250


8x  5 y  w 2  310
R2 :
5x  2 y  w 3  160
R3 :
P  9x  10 y  0
– The profit equation Max.
Problem: Slack
resources
variables variables
Table 1:
Basis x y w1 w2 w3 b check

R1 2 5 1 0 0 250 258

R2 8 5 0 1 0 310 324

R3 5 2 0 0 1 160 168

P -9 - 10 0 0 0 0 - 19
• Identify the Key Column _ [ the column containing the entry with the
most negative value in the profit row ]

Basis x y w1 w2 w3 b check

R1 2 5 1 0 0 250 258

R2 8 5 0 1 0 310 324

R3 5 2 0 0 1 160 168

P -9 - 10 0 0 0 0 - 19
• Identify the Key Column _ [ the column containing the entry with the
most negative value in the profit row ]

Basis x y w1 w2 w3 b check

R1 2 5 1 0 0 250 258

R2 8 5 0 1 0 310 324

R3 5 2 0 0 1 160 168

P -9 - 10 0 0 0 0 - 19
• Identify the Key Row _ this is determined by dividing each entry in the ‘

b ’ column by the corresponding positive entry in the key column. The


Key Row is the one which generates the lowest (positive) value

Basis x y w1 w2 w3 b check

R1 2 5 1 0 0 250 258

R2 8 5 0 1 0 310 324

R3 5 2 0 0 1 160 168

P -9 - 10 0 0 0 0 - 19

250 310 160


Row 1 ;  50 Row 2 ;  62 Row 3 ;  80
5 5 2
• Identify the Key Row _ this is determined by dividing each entry in the ‘

b ’ column by the corresponding positive entry in the key column. The


Key Row is the one which generates the lowest (positive) value

Pivot Basis x y w1 w2 w3 b check


value
R1 2 5 1 0 0 250 258

R2 8 5 0 1 0 310 324

R3 5 2 0 0 1 160 168

P -9 - 10 0 0 0 0 - 19

250 310 160


Row 1 ;  50 Row 2 ;  62 Row 3 ;  80
5 5 2
• Each value of the Key Row is then divided by the pivot value [ 5 ] to

obtain a new pivot of unity [ one ]

Basis x y w1 w2 w3 b check

R1 2 5 1 0 0 250 258
5 5 5 5 5
R2 8 5 0 1 0 310 324

R3 5 2 0 0 1 160 168

P -9 - 10 0 0 0 0 - 19
• Each value of the Key Row is then divided by the pivot value [ 5 ] to

obtain a new pivot of unity [ one ]. The new table is renamed Table 2

Table 2: Basis x y w1 w2 w3 b check

R1 0.4 1 0.2 0 0 50 51.6

R2 8 5 0 1 0 310 324

R3 5 2 0 0 1 160 168

P -9 - 10 0 0 0 0 - 19
• Perform computations to reduce non-pivot elements of the Key Column
to zero, i.e. excluding those in the main row, manipulate all the cells in
the table to reduce the non-pivot elements of the key column to zero
Basis x y w1 w2 w3 b check

R1 0.4 1 0.2 0 0 50 51.6

R2 8 5 0 1 0 310 324

R3 5 2 0 0 1 160 168

P -9 - 10 0 0 0 0 - 19

To calculate the new number, subtract the product of the


corresponding entries of the main row and key column from
the old number
Basis x y w1 w2 w3 b check

R1 0.4 1 0.2 0 0 50 51.6

R2 8 5 0 1 0 310 324

R3 5 2 0 0 1 160 168

P -9 - 10 0 0 0 0 - 19

Operating on the second row, R 2


• 8 - ( 0.4 * 5 ) = 6
Basis x y w1 w2 w3 b check

R1 0.4 1 0.2 0 0 50 51.6

R2 8 5 0 1 0 310 324

R3 5 2 0 0 1 160 168

P -9 - 10 0 0 0 0 - 19

Operating on the second row, R 2


• 8 - ( 0.4 * 5 ) = 6
• 5-(1*5)=0
Basis x y w1 w2 w3 b check

R1 0.4 1 0.2 0 0 50 51.6

R2 8 5 0 1 0 310 324

R3 5 2 0 0 1 160 168

P -9 - 10 0 0 0 0 - 19

Operating on the second row, R 2


• 8 - ( 0.4 * 5 ) = 6
• 5-(1*5)=0
• 0 - ( 0.2 * 5 ) = -1
Basis x y w1 w2 w3 b check

R1 0.4 1 0.2 0 0 50 51.6

R2 8 5 0 1 0 310 324

R3 5 2 0 0 1 160 168

P -9 - 10 0 0 0 0 - 19

Operating on the second row, R 2


• 8 - ( 0.4 * 5 ) = 6 • 1-(0*5)=1

• 5-(1*5)=0
• 0 - ( 0.2 * 5 ) = -1
Basis x y w1 w2 w3 b check

R1 0.4 1 0.2 0 0 50 51.6

R2 8 5 0 1 0 310 324

R3 5 2 0 0 1 160 168

P -9 - 10 0 0 0 0 - 19

Operating on the second row, R 2


• 8 - ( 0.4 * 5 ) = 6 • 1-(0*5)=1

• 5-(1*5)=0 • 0-(0*5)=0

• 0 - ( 0.2 * 5 ) = -1
Basis x y w1 w2 w3 b check

R1 0.4 1 0.2 0 0 50 51.6

R2 8 5 0 1 0 310 324

R3 5 2 0 0 1 160 168

P -9 - 10 0 0 0 0 - 19

Operating on the second row, R 2


• 8 - ( 0.4 * 5 ) = 6 • 1-(0*5)=1

• 5-(1*5)=0 • 0-(0*5)=0

• 0 - ( 0.2 * 5 ) = -1 • 310 - ( 50 * 5 ) = 60
Basis x y w1 w2 w3 b check

R1 0.4 1 0.2 0 0 50 51.6

R2 8 5 0 1 0 310 324

R3 5 2 0 0 1 160 168

P -9 - 10 0 0 0 0 - 19

Operating on the second row, R 2


• 8 - ( 0.4 * 5 ) = 6 • 1-(0*5)=1

• 5-(1*5)=0 • 0-(0*5)=0

• 0 - ( 0.2 * 5 ) = -1 • 310 - ( 50 * 5 ) = 60
• 324 - ( 51.6 * 5 ) = 66
Basis x y w1 w2 w3 b check

R1 0.4 1 0.2 0 0 50 51.6

R2 8 5 0 1 0 310 324

R3 5 2 0 0 1 160 168

P -9 - 10 0 0 0 0 - 19

Operating on the third row, R 3


• 5 - ( 0.4 * 2 ) = 4.2 • 0-(0*2)=0

• 2-(1*2)=0 • 1-(0*2)=1

• 0 - ( 0.2 * 2 ) = -0.4 • 160 - ( 50 * 2 ) = 60


• 168 - ( 51.6 * 2 ) = 64.8
Basis x y w1 w2 w3 b check

R1 0.4 1 0.2 0 0 50 51.6

R2 8 5 0 1 0 310 324

R3 5 2 0 0 1 160 168

P -9 - 10 0 0 0 0 - 19

Operating on the forth row, P


• -9 - ( 0.4 * - 10 ) = -5 • 0 - ( 0 * -10 ) = 0

• -10 - ( 1 * -10 ) = 0 • 0 - ( 0 * -10 ) = 0

• 0 - ( 0.2 * -10 ) = 2 • 0 - ( 50 * -10 ) = 500


• -19 - ( 51.6 * -10 ) = 497
• The new values are substituted into the table which becomes Table 3

Table 3: Basis x y w1 w2 w3 b check

y 0.4 1 0.2 0 0 50 51.6

R2 6 0 -1 1 0 60 66

R3 4.2 0 - 0.4 0 1 60 64.8

P -5 0 2 0 0 500 497

• The key column has a single 1 and other entries all 0

• This indicates ‘ R 1 ’ can be replaced by ‘ y ’


• The process is repeated until there are no negative values in the profit row
• The Key Column is the column containing the entry with the most negative
value in the profit row
• The Key Row is determined by dividing each entry in the ‘ b ’ column by the
corresponding positive entry in the key column and is the one which generates
the lowest (positive) value

Basis x y w1 w2 w3 b check

y 0.4 1 0.2 0 0 50 51.6

R2 6 0 -1 1 0 60 66

R3 4.2 0 - 0.4 0 1 60 64.8

P -5 0 2 0 0 500 497
• The process is repeated until there are no negative values in the profit row
• The Key Column is the column containing the entry with the most negative
value in the profit row
• The Key Row is determined by dividing each entry in the ‘ b ’ column by the
corresponding positive entry in the key column and is the one which generates
the lowest (positive) value

Basis x y w1 w2 w3 b check

y 0.4 1 0.2 0 0 50 51.6

R2 6 0 -1 1 0 60 66

R3 4.2 0 - 0.4 0 1 60 64.8

P -5 0 2 0 0 500 497
• Determine the unit pivot by dividing all the values in the key row by the
pivot value [ 6 ]
Table 4:
Basis x y w1 w2 w3 b check

y 0.4 1 0.2 0 0 50 51.6

R2 1 0 - 0.17 0.17 0 10 11

R3 4.2 0 - 0.4 0 1 60 64.8

P -5 0 2 0 0 500 497

• Perform computations to reduce non-pivot elements of the Key


Column to zero, i.e. excluding those in the main row, manipulate all the
cells in the table to reduce the non-pivot elements of the key column
to zero
• The final table, Table 5, should look something like the following:

Table 5:
Basis x y w1 w2 w3 b check

y 0 1 0.27 - 0.07 0 46 47.17

R2 1 0 - 0.17 0.17 0 10 11

R3 0 0 0.3 0.7 1 18 18.6

P 0 0 1.17 0.83 0 550 552


• The final table, Table 5, should look something like the following:

Table 5:
Basis x y w1 w2 w3 b check

y 0 1 0.27 - 0.07 0 46 47.17

R2 1 0 - 0.17 0.17 0 10 11

R3 0 0 0.3 0.7 1 18 18.6

P 0 0 1.17 0.83 0 550 552

• As before, the key column has a single 1 and other entries all 0
• This indicates ‘ R 2 ’ can be replaced by ‘ x ’
• The final table, Table 5, should look something like the following:

Table 5:
Basis x y w1 w2 w3 b check

y 0 1 0.27 - 0.07 0 46 47.17

x 1 0 - 0.17 0.17 0 10 11

R3 0 0 0.3 - 0.7 1 18 18.6

P 0 0 1.17 0.83 0 550 552

• As before, the key column has a single 1 and other entries all 0
• This indicates ‘ R 2 ’ can be replaced by ‘ x ’
• No negative values in the profit row indicate that an optimal solution
has been reached
• The final table, Table 5, should look something like the following:

Table 5:
Basis x y w1 w2 w3 b check

y 0 1 0.27 - 0.07 0 46 47.17

x 1 0 - 0.17 0.17 0 10 11

R3 0 0 0.3 0.7 1 18 18.6

P 0 0 1.17 0.83 0 550 552

• As before, the key column has a single 1 and other entries all 0
• This indicates ‘ R 2 ’ can be replaced by ‘ x ’
• No negative values in the profit row indicate that an optimal solution
10 x  46 y  550
has been reached -
Table 1: Basis x y w1 w2 w3 b check

R1 2 5 1 0 0 250 258

R2 8 5 0 1 0 310 324

R3 5 2 0 0 1 160 168

P -9 - 10 0 0 0 0 - 19

Table 2: Basis x y w1 w2 w3 b check

R1 0.4 1 0.2 0 0 50 51.6

R2 8 5 0 1 0 310 324

R3 5 2 0 0 1 160 168

P -9 - 10 0 0 0 0 - 19

Table 3: Basis x y w1 w2 w3 b check

y 0.4 1 0.2 0 0 50 51.6

R2 6 0 -1 1 0 60 66

R3 4.2 0 - 0.4 0 1 60 64.8

P -5 0 2 0 0 500 497
Table 4: Basis x y w1 w2 w3 b check

y 0.4 1 0.2 0 0 50 51.6

R2 1 0 - 0.17 0.17 0 10 11

R3 4.2 0 - 0.4 0 1 60 64.8

P -5 0 2 0 0 500 497

Table 5: Basis x y w1 w2 w3 b check

y 0 1 0.27 - 0.07 0 46 47.17

x 1 0 - 0.17 0.17 0 10 11

R3 0 0 0.3 - 0.7 1 18 18.6

P 0 0 1.17 0.83 0 550 552


SUMMARY:
Table 1: Initial information from resource and profit equations
Key column, key row and pivot row determined
Table 2: Each row in the key row is transformed so that the pivot
value equals unity the other rows remain as Table 1
Table 3: The key row remains as Table 2 but the other rows are
manipulated
New Key column, key row and pivot row determined
Table 4: As Table 2
Table 5: As Table 3
Repeat the equivalent of Tables 4 and 5 until all the values in
the profit row are positive
CLASS EXAMPLE – TO BE COMPLETED DURING THE LECTURE PERIOD

A manufacturing firm produces three types of couplings, x, y and z, each


of which requires processing time on machines (lathes, grinders and
polishers). The machine times needed for each type of coupling are:-

Time required (hours)


Coupling type
Lathe Grinder Polisher
x 2 4 1
y 5 2 3
z 2 3 5
Max.
resources 38 57 57
(hours)

• The net profits for each type of coupling are x = £ 2, y = £ 6 and z = £ 4


• Determine the number of each type of coupling to be produced to
maximise profit and the maximum profit
Time required (hours)
Coupling type
Lathe Grinder Polisher
x 2 4 1
y 5 2 3
z 2 3 5
Max.
resources 38 57 57
(hours)

• The net profits for each type of coupling are x = £ 2, y = £ 6 and z = £ 4

The first step is to formulate the problem:


– Resource Equation R : 2 x  5 y  2 z  38
1

4 x  2 y  3 z  57
R2 :
1 x  3 y  5 y  57
R3 :
P  2x  6y  4z
– The profit equation :
– Resource Equation R 1 : 2 x  5 y  2 z  38
4 x  2 y  3 z  57
R2 :
1 x  3 y  5 y  57
R3 :
P  2x  6y  4z
– The profit equation :
Introduce the ‘ slack ’ variables and ensure that the right hand side of the
expressions are positive.

– Resource Equation R 1 : 2 x  5 y  2 z  w 1  38
4 x  2 y  3 z  w 2  57
R2 :
1 x  3 y  5 z  w 3  57
R3 :
P  2x  6y  4z  0
– The profit equation :
The simplex tables are now ready to be setup, therefore, generate the
solution
Basis x y z w1 w2 w3 b check

R1 2 5 2 1 0 0 38 48

R2 4 2 3 0 1 0 57 67

R3 1 3 5 0 0 1 57 67

P -2 -6 -4 0 0 0 0 -12
Basis x y z w1 w2 w3 b check

R1 2 5 2 1 0 0 38 48

R2 4 2 3 0 1 0 57 67

R3 1 3 5 0 0 1 57 67

P -2 -6 -4 0 0 0 0 -12

Basis x y z w1 w2 w3 b check

R1 0.4 1 0.4 0.2 0 0 7.6 9.6

R2 4 2 3 0 1 0 57 67

R3 1 3 5 0 0 1 57 67

P -2 -6 -4 0 0 0 0 -12
Basis x y z w1 w2 w3 b check

R1 2 5 2 1 0 0 38 48

R2 4 2 3 0 1 0 57 67

R3 1 3 5 0 0 1 57 67

P -2 -6 -4 0 0 0 0 -12

Basis x y z w1 w2 w3 b check

R1 0.4 1 0.4 0.2 0 0 7.6 9.6

R2 4 2 3 0 1 0 57 67

R3 1 3 5 0 0 1 57 67

P -2 -6 -4 0 0 0 0 -12

Basis x y z w1 w2 w3 b check

y 0.4 1 0.4 0.2 0 0 7.6 9.6

R2 3.2 0 2.2 - 0.4 1 0 41.8 47.8

R3 - 0.2 0 3.8 - 0.6 0 1 34.2 38.2

P 0.4 0 - 1.6 1.2 0 0 45.6 45.6


Basis x y z w1 w2 w3 b check

y 0.4 1 0.4 0.2 0 0 7.6 9.6

R2 3.2 0 2.2 - 0.4 1 0 41.8 47.8

R3 - 0.053 0 1 - 0.158 0 0.263 9 10.052

P 0.4 0 -1.6 1.2 0 0 45.6 45.6


Basis x y z w1 w2 w3 b check

y 0.4 1 0.4 0.2 0 0 7.6 9.6

R2 3.2 0 2.2 - 0.4 1 0 41.8 47.8

R3 - 0.053 0 1 - 0.158 0 0.263 9 10.052

P 0.4 0 -1.6 1.2 0 0 45.6 45.6

Basis x y z w1 w2 w3 b check

y 0.421 1 0 0.263 0 - 0.105 4 5.579

R2 3.317 0 0 - 0.052 1 - 0.579 22 25.686

z - 0.053 0 1 - 0.158 0 0.263 9 10.052

P 0.315 0 0 0.947 0 0.421 60 61.683

• As there is no further negative entries in the profit row, the optimal solution has been
reached
• Because the x term has not been resolved, x = 0
• The solution is: y = 4, z = 9, x = 0 and P max = 60

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy