% Title Boiler-Turbo Generator System Optimization via Linear Programming
% 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.
A=zeros(3,16);
A(1,4)=1;
A(1,10)=-1;
A(2,15)=-1;
A(2,16)=-1;
A(3,1)=-1;
A(3,2)=-1;
A(3,15)=-1;
b=zeros(3,1);
b(1)=132000;
b(2)=-12000;
b(3)=-24550;
for i=1:16
ub(1,i)=inf;
end
ub(1,1)=6250;
ub(1,2)=9000;
ub(1,4)=192000;
ub(1,5)=244000;
ub(1,13)=142000;
ub(1,14)=62000;
lb=zeros(1,16);
lb(1,1)=2500;
lb(1,2)=3000;
lb(1,8)=271536;
lb(1,9)=100623;
Aeq=zeros(8,16);
Aeq(1,3)=1;
Aeq(1,4)=-1;
Aeq(1,5)=-1;
Aeq(1,6)=-1;
Aeq(2,4)=1;
Aeq(2,5)=1;
Aeq(2,6)=1;
Aeq(2,8)=-1;
Aeq(2,9)=-1;
Aeq(2,14)=-1;
Aeq(3,4)=1;
Aeq(3,10)=-1;
Aeq(3,12)=-1;
Aeq(3,14)=-1;
Aeq(4,5)=1;
Aeq(4,11)=-1;
Aeq(4,13)=-1;
Aeq(5,6)=1;
Aeq(5,7)=-1;
Aeq(5,8)=-1;
Aeq(5,10)=1;
Aeq(5,11)=1;
Aeq(6,7)=1;
Aeq(6,9)=-1;
Aeq(6,12)=1;
Aeq(6,13)=1;
Aeq(7,1)=-3413;
Aeq(7,4)=1359.8;
Aeq(7,10)=-1267.8;
Aeq(7,12)=-1251.4;
Aeq(7,14)=-192;
Aeq(8,2)=-3413;
Aeq(8,5)=1359.8;
Aeq(8,11)=-1267.8;
Aeq(8,13)=-1251.4;
beq=zeros(8,1);
x0=lb;
cost=zeros(1,16);
cost(3)=0.00261
cost(15)=0.0239
cost(16)=0.00983;
[x,fval] = linprog(cost,A,b,Aeq,beq,lb,ub,x0)