Uploaded by Ayanda Bekwa

Linear Programming - Pivoting with Gauss Elimination MLP5 example 1

advertisement
Lecture MLP 5 – Example 1:
Let
x1  the number of type H windows
x2  the number of type R windows
x3  the number of type E windows
Profit :
type H window is R 250  R160  R90 per window
type R window is R 220  R160  R120 per window
type E window is R170  R70  R100 per window
Total Profit = 90 x1  120 x2  100 x3
Constraints:
Machine A:
2 x1  2 x2  x3  36
Machine B:
x1  3x2  2 x3  30
Machine C:
x1  x2  2 x3  24
and
x1 ; x2 ; x3  0
Answer (a)
Let
x1  the number of type H windows
x2  the number of type R windows
x3  the number of type E windows
Maximise z= 90 x1  120 x2  100 x3
Subject to:
Machine A:
2 x1  2 x2  x3  36
Machine B:
x1  3x2  2 x3  30
Machine C:
x1  x2  2 x3  24
and
x1 ; x2 ; x3  0
Answer (b)
Introduce a slack variable for each inequality:
Machine A:
2 x1  2 x2  x3  s1
Machine B:
x1  3x2  2 x3
Machine C:
x1  x2  2 x3
 36
 s2
 30
 s3  24
Let
z - 90 x1  120 x2  100 x3  0
x1
x2
x3
s1
s2
s3
constants
2
2
1
1
0
0
36
1
3
2
0
1
0
30
1
1
2
0
0
1
24
90
120
100
0
0
0
0
x1
x2
x3
s1
s2
s3
constants
quotients
2
2
1
1
0
0
36
36 / 2  18
1
3
2
0
1
0
30
30 / 2  10  smallest
1
1
2
0
0
1
24
24 / 1  24
90
120
100
0
0
0
0
Answer (c)

most -ve indicator
The pivot element is ‘3’ in the second row, second column.
x2 will become basic and s2 will become non-basic.
Row instructions:
r2 will be the pivot row.
r1  r1   2  r2
r2  r2  3
r3  r3  1 r2
r4  r4  120  r2
Working tableau
x1
1
3
1
3
1
1  1
3
1
90  120 
3
2   2
x2
x3
s1
s2
s3
constants
2
3
2
1
3
2
2  1
1  11
3
2
120  120 1 100  120 
3
1   2 0
1
3
1
3
1
0  1
3
1
0  120 
3
0   2 0
36   2 10
0
10
1  1 0
24  110
0  120  0
0  120 10
 2    2 1
1   2
0
0  1 0
0  120  0
0   2
2nd Tableau completed
x1
x2
4
3
1
3
2
3
1
50
0
0
x3

0
1
3
2
3
4
3
20
s1
1
0
0
0
s2
s3
constants
2
3
1
3
1

3
0
16
0
10
1
14
40
0
1200

solution:
x1  0 ; x2  10 ; x3  0 ; s1  16 ; s2  0 ; s3  14 ; z  1200
Some indicators are still negative, hence the value of z can be improved by pivoting again.
x1
x2
4
3
1
3
2
3
1
50
0
0
x3
s1
1
3
2
3
4
3
0
20
0

0
1
0
s2
s3
constants
2
3
1
3
1

3
0
16
0
10
1
14
40
0
1200

ratios
4
 12
3
1
10   30
3
2
14   21
3
16 

most -ve indicator
column1 = pivot column
Hence the new pivot element is in the first row and first column.
x1
x2
x3
s1
4
3
0
1
3
1
1
3
1
2
3
0
2
3
0
4
3
0

50
0
20
0

s2
s3
constants
2
3
0
16
1
3
0
10
1
3
1
14
40
0
1200

r1  3 / 4
 smallest +ve
row intstructions
x1
x2
1
0
1
 
3
2
 
3
 50 
x3
s1
1
4
3
4
1
2
3
0
0
4
3
0

0
20
0

Working tableau:
x1
x2
1
0
1 1
 1
3 3
1
1
0
3
2 2
 1
3 3
0
2
 0
3
 50   50 1
0  50  0 
s2
s3
constants
1
2
0
12
r1  pivot row
1
3
0
10
1
r2    r1
3
1
3
1
14
2
r3    r1
3
40
0
1200
r4   50  r1


x3
s1
s2
s3
constants
 1
 
 4
2 1  1 
  
3 3 4 
4 2  1 
  
3 3 4 
 1
20  50   
 4
3
 
4
13
0  
3 4
23
0  
34
3
0  50  
4
 1
 
 2
1 1  1 
  
3 3 2 
1 2  1 
   
3 3 2 
 1
40  50   
 2
0
12 
0
1
0
3
10 
1
12 
3
1
2
0
3
14 
2
12 
3
0  50  0 
1200  50 12 
3rd Tableau completed
x1
x2
1
0
0
1
0
0
0
0
x3
s1
1
4
3
4
3
2
65

2
3
4
1

4
1

2
75
2

s2
s3
constants
0
12
0
6
0
1
6
15
0
1800

1
2
1
2
solution: x1  12 ; x2  6 ; x3  0 ; s1  0 ; s2  0 ; s3  6 ; z  1800
There is a negative indicator in the 3rd column and hence the value of z can be increased by pivoting
again. The ratios referring to the 3rd column are :
1
ignore this ratio because it is negative.
4
3
Row2 : 6   8
4
3
Row3 : 6   4  smallest ratio
2
Row1:12 
Hence the new pivot element is in the 3rd row and 3rd column:
x1
x2
1
0
0
1
3
4

0
0
3
2

0
0
65
2
Multiply row 3 by
x3
s1
1
4
3
4


s2
s3
constants
1
2
0
12
1
4
1
2
0
6
1
2
0
1
6
75
2
15
0
1800
s3
constants
0
12
0
6
0
2
3
4
15
0
1800

2
in order to make the pivot element = 1.
3
x1
x2
1
0
0
1
0
0
0
0
x3
s1
1
4
3
4
3
4
1

4
1

3
75
2

1

65
2
s2

1
2
1
2
Row instructions will be:
transform r1
1
r1  r3 :
4
x1
1
 0
4
1
 new r1 :
 new r2 :
0
3
 0
4
0
65
r3 :
2
 new r4 :
s1
s2
s3
1 1
  1
4 4
3 1 1
  
4 4 3
1 1
  0
2 4
0
2
3
12
0  
43
1
6
x2
1
3
0
4
65
 0
2
0
65
0
2
0
1
2
s1
s2
s3
3 3
 1
4 4
1 3 1
   
4 4 3
1 3
 0
2 4
0
0
1
2
32
0  
43
1

2
x2
0

x3
1
x1
0
1
0
4
x3
0
x1
transform r4
r4 
0
1
transform r2
3
r2  r3 :
4
x2
x3

65 65
 1
2
2
0
s1
75 65  1 
  
2
2  3
80
3
s2
15 
65
0
2
15
6
12 
1
 4
4
13
3
 4
4
3
s3
0
65  2 
 
2 3
65
3
1800 
65
4
2
1930
4th Tableau
x1
x2
x3
s1
1
0
0
2
3
0
1
0
0
0
0
1
0
0
0
1
3
80
3

s2
s3
1
2
1
2
1
6
1

2
2
3
65
3

0
15
constants
13
3
4
1930
This is the final tableau because all the indicators are non-negative.
solution: x1  13 ; x2  3 ; x3  4 ; s1  0 ; s2  0 ; s3  0 ; zmax  1930
The manufacturer should produce 13 type H windows, 3 type R windows and 4 type E windows in
order to maximise the profit subject to the given constraints.
Download