No BSD License  

Highlights from
Application of Optimization to the Study of Chemical Processes

image thumbnail
cracker2_binous.m
% Title Optimization of a Thermal Cracker via Linear Programming: case study n 2 

% Reference: Edgar, Himmelblau and Lasdon in Optimization of
% Chemical Processes, McGraw-Hill International Edition, 2001

% Author of the matlab file: Housam Binous, PhD, Tunis, Tunisia
% Email: binoushousam@yahoo.com

% The same problem was solved using Mathematica and GAMS.
% GAMS ans Mathematica files are available from the author upon request.


cost=-1*[2.84 -0.22 -3.33 +1.09 +9.39 +9.51 0];
A=zeros(1,7);
A(1,1)=1.1;
A(1,2)=0.9;
A(1,3)=0.9;
A(1,4)=1.0;
A(1,5)=1.1;
A(1,6)=0.9;
A(1,7)=0;
b=200000;
Aeq=zeros(5,7);
Aeq(1,1)=0.5;
Aeq(1,2)=0.35;
Aeq(1,3)=0.25;
Aeq(1,4)=0.25;
Aeq(1,5)=0.5;
Aeq(1,6)=0.35;
Aeq(1,7)=0;
Aeq(2,1)=0.01;
Aeq(2,2)=0.15;
Aeq(2,3)=0.15;
Aeq(2,4)=0.18;
Aeq(2,5)=0.01;
Aeq(2,6)=0.15;
Aeq(2,7)=0;
Aeq(3,1)=0.4;
Aeq(3,2)=0.06;
Aeq(3,3)=0.04;
Aeq(3,4)=0.05;
Aeq(3,5)=-0.6;
Aeq(3,6)=0.06;
Aeq(3,7)=0;
Aeq(4,1)=0;
Aeq(4,2)=0.1;
Aeq(4,3)=0.01;
Aeq(4,4)=0.01;
Aeq(4,5)=0;
Aeq(4,6)=-0.9;
Aeq(4,7)=0;
Aeq(5,1)=-6857.6;
Aeq(5,2)=364;
Aeq(5,3)=2032;
Aeq(5,4)=-1145;
Aeq(5,5)=-6857.6;
Aeq(5,6)=364;
Aeq(5,7)=21520;
beq=[50000 1000 0 0 20000000]';
x0=ones(1,7);
[x,fval] = linprog(cost,A,b,Aeq,beq,x0)
fval=-fval-5.38*x(7)

Contact us at files@mathworks.com