global dyndata

indmat_Yes_S1


[Nz,n] = size([dyndata.x_nom;dyndata.u_nom]);

%Feed rate, composition & quality
Ns=6;
As=zeros(Ns,Nz);bs=zeros(Ns,1);
% Ain=-eye(4,Nz);bin=zeros(4,1);


As(1,6)=1;
As(2,7)=1;
As(3,8)=1;
As(4,9)=1;


bs(1:4)=dyndata.u_nom([6:9]);
% 
% Levels, totally unnecessary constraints

As(5,11+im_mt)=1;bs(5)=x_nom(im_mt);
As(6,11+im_mr)=1;bs(6)=x_nom(im_mr);

%%%%%%%%%%
Ain=-eye(Nz+4,Nz);bin=zeros(Nz+4,1); %Non-negativity of state, helps optimizer

%Compostion constraints (3) as in the paper

Ain(Nz+1,11+im_xt(2))=1;bin(Nz+1)=0.005;
Ain(Nz+2,11+im_xS1(1))=1;bin(Nz+2)=0.005;

Ain(Nz+3,11+im_xr(2))=1;
bin(Nz+3)=0.005;

Ain(Nz+4,11+im_xS1(1))=-1;
Ain(Nz+4,11+im_xS1(2))=-1;
bin(Nz+4)=-(1-0.005);



