%Design Project 1
%Case A

clear;clc;close all
format short g, format compact

x_g=[1 1 1 1 1 1 1 1 1]*1000; % initial guess vector for flowrates 
optimize=optimset('Diagnostics','off','MaxFunEvals',1100,'TolFun',1e-10,'TolX',1e-10,'Display','off'); 
x=fsolve(@Evaluationfunc,x_g,optimize); 
f=Evaluationfunc(x);

%Flowrates

disp('All in thousands of pound mass per hour')

Q_12=x(1);
Q_13=x(2);
Q_2A=x(3);
Q_24=x(4);
Q_34=x(5);
Q_45=x(6);
Q_46=x(7);
Q_5A=x(8);
Q_67=x(9);

Q=[Q_12 Q_13 Q_2A Q_24 Q_34 Q_45 Q_46 Q_5A Q_67]*1000/3600
