0% found this document useful (0 votes)
760 views5 pages

Simplex Method Using MATLAB PDF

The document describes an optimization problem to maximize profit from mixing three grades of coal (A, B, C) subject to constraints on ash and phosphorous content. The optimal solution is to use 40 tons of grade A coal, 40 tons of grade B coal, and 20 tons of grade C coal, resulting in maximum profit of Rs. 1360 per ton. A MATLAB solution is provided that uses the simplex method to solve the linear programming problem.

Uploaded by

Ehsan Elahi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
760 views5 pages

Simplex Method Using MATLAB PDF

The document describes an optimization problem to maximize profit from mixing three grades of coal (A, B, C) subject to constraints on ash and phosphorous content. The optimal solution is to use 40 tons of grade A coal, 40 tons of grade B coal, and 20 tons of grade C coal, resulting in maximum profit of Rs. 1360 per ton. A MATLAB solution is provided that uses the simplex method to solve the linear programming problem.

Uploaded by

Ehsan Elahi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Problem No 1:

Three grades of coal A, B and C contain phosphorous and ash as impurities. In a


particular industrial process, fuel up to 100 tons (maximum) is required which
should contain ash not more than 3% and phosphorous not more than 0.03%. It is
desired to maximize the profit while satisfying these conditions. There is an
unlimited supply of each grade. The percentage of impurities and the profits of
grades are given below:
Coal Phosphorous Ash Profit
(%) (%) In Rupees/Ton
A 0.02 3.0 12.00
B 0.04 2.0 15.00
C 0.03 5.0 14.00

Find the proportion in which the three grades be used.


Manual Solution:
Let x1, x2 & x3 be the amounts in tons of grades A, B & C, respectively.
i. Phosphorous content must not exceeds 0.03%,
0.02x1+0.04x2+0.03x3<=0.03(x1+x2+x3)
ii. Ash content must not exceeds 3%,
3x1+2x2+5x3<=3(x1+x2+x3)
iii. Total quantity of fuel required is not more than 100 ton.
X1+x2+x3<=100

Max Z = 12x1+15x2+14x3
-X1+X2 <= 0
-X2+2X3 <= 0
X1+X2+X3 <=100
And now solve it using techniques.

MATLAB Solution:
Make a matrix as we make a table for simplex method
A=[-12 -15 -14; -1 1 0; 0 -1 2; 1 1 1];
B=[0;0;0;100];
C=[A diag([1 1 1 1]) B]

We will get following table


C2 is pivot column and R2 is pivot row and 1 whose position is (2,2) is pivot
element, So C(1,2) C(3,2) & C(4,2) to zero i.e all the entries below -15 should be
zero . For this we typed.
r1=15*C(2, :)+C(1,:);
r3=C(2,:)+C(3,:);
r4=-C(2,:)+C(4,:);
C1=[r1;C(2,:);r3;r4]

Now here C1 is pivot column and R4 is pivot row i.e 2 is pivot element which
should be one in next matrix for this we have to divide all the entries of fourth row
by 2 and the rest of table will remain same.
C1=[C1(1,:);C1(2,:);C1(3,:);C1(4,:)/2]

Now here 1st column is pivot column and 4th row is pivot row and pivot element is
already one and we have to make zero all the entries of pivot column other than
pivot element.
r2=C1 (4,:)+C1(2,:);
r3=C1 (4,:)+C1(3,:);
format bank
C2 = [r1;r2;r3;C1(4,:)]
The result is
Now here C3 and R3 are pivot row and pivot column respectively where 2.50 is
pivot element and our next task is ta make this 2.50 is one.
C2=[C2(1,:);C2(2,:);C2(3,:)/2.5;C2(4,:)]

r1=0.5*C2(3,:)+C2(1,:);
r2=-0.5*C2(3,:)+C2(2,:);
r4=-0.5*C2(3,:)+C2(4,:);
C3=[r1;r2;C2(3,:);r4]

Summary of Inputs:

Summary of output:
Hence 40 tons of A grade, 40 tons of B grade and 20 tons of C grade coal should
be made to have a Maximum profit of Rs. 1360.00 per ton.
Problem no 2:
Max Z = 5x1+2x2
X1-X2 <= 2
2X1+X2 <= 7
X1, X2 => 0

You might also like