function [ub,lb]=UpLowBounds()

GlobalVars;

ub=zeros(NVar,1);
lb=zeros(NVar,1);

% Stream variables default upper and lower bounds
for i=1:NStr
   ix=IxStr(i);
   ub(ix(1:NC))=ones(NC,1);  % Stream composition
   ub(ix(NC+1))=3;           % Molar flow 
   ub(ix(NC+2))=873;         % Temperature
   ub(ix(NC+3))=13;          % Pressure
   
%   lb(ix(1:NC))=zeros(NC,1); % Stream composition
   lb(ix(1:NC))=-ones(NC,1);% Stream composition
   lb(ix(NC+1))=0;           % Molar flow 
   lb(ix(NC+2))=273;         % Temperature
   lb(ix(NC+3))=5;           % Pressure
end

% CSTR variable default upper and lower bounds
for i=1:NCSTR
   ix=IxCSTR(i);
   ub(ix)=10.0;               % Catalyst efficiency factor
   lb(ix)=0.2;                % Catalyst efficiency factor
end

% Heater variable default upper and lower bounds
for i=1:NHtr
   ix=IxHtr(i);
   ub(ix)=20000;            % Duty
   lb(ix)= 3000;            % Duty
end

% Compressor variable default upper and lower bounds
for i=1:NCmp
   ix=IxCmp(i);
   ub(ix(1))= 1500;         % Compressor work
   ub(ix(2))=    1;         % Compressor efficiency
   ub(ix(3))=  393;         % Compressor isentropic outlet temperature
   
   lb(ix(1))=  200;         % Compressor work
   lb(ix(2))=  0.5;         % Compressor efficiency
   lb(ix(3))=  303;         % Compressor isentropic outlet temperature
end

% Heatexchanger variable default upper and lower bounds
for i=1:NHex
   ix=IxHex(i);
   ub(ix(1))=20000;         % Duty
   lb(ix(1))=10000;         % Duty
end

% Heatexchanger E-1401
for i=1:NHex2
   ix=IxHex2(i);
   ub(ix(1))=60000;         % Duty
   lb(ix(1))=20000;         % Duty
   ub(ix(2))=700;           % U
   lb(ix(2))=100;           % U

end

% Heatexchanger E-1402, D-1405 default upper and lower bounds
for i=1:NHex3
   ix=IxHex3(i);
   ub(ix(1))=15000;          % Duty
   lb(ix(1))= 5000;          % Duty
   ub(ix(2))=20;             % Fcwi
   lb(ix(2))= 0;             % Fcwi
   ub(ix(3))=293;            % Tcwi
   lb(ix(3))=273;            % Tcwi
   ub(ix(4))=373;            % Tcwo
   lb(ix(4))=273;            % Tcwo
   ub(ix(5))=500;            % U
   lb(ix(5))=100;            % U

end

% Condenser variables default upper and lower bounds
for i=1:NCon
   ix=IxCon(i);
   ub(ix(1))=-30000;        % Duty
   lb(ix(1))=-40000;        % Duty
end

% Constraint variables default upper and lower bounds
for i=1:NConstr
   ix=IxConstr(i);
   ub(ix(1))= 150;        % RON
   lb(ix(1))=  50;        % RON
   ub(ix(2))=   10;       % H2/HC
   lb(ix(2))=   1;        % H2/HC
   ub(ix(3))=   150;      % Feed Massflow
   lb(ix(3))=   20;       % Feed Massflow
   ub(ix(4))=   50;       % Recyclegas massflow
   lb(ix(4))=   2;        % Recyclegas massflow
   ub(ix(5))=   20;       % Gas product massflow
   lb(ix(5))=   0;        % Gas product massflow
   ub(ix(6))=   150;      % Reformat product massflow
   lb(ix(6))=   20;       % Reformat product massflow
   ub(ix(7))=   10;       % Hydrogen product massflow
   lb(ix(7))=   0;        % Hydrogen product massflow
   
end

