function [ys,check] = cia_estim_trsimple_steadystate(ys,exe)
global M_ lgy_

if isfield(M_,'param_nbr') == 1
NumberOfParameters = M_.param_nbr;
for i = 1:NumberOfParameters
  paramname = deblank(M_.param_names(i,:));
  eval([ paramname ' = M_.params(' int2str(i) ');']);
end
check = 0;
end

%%%% Model equations to be entered here
r = (1/bet)-1+delt;
w = (1-alph)*((r/alph)^(alph/(alph-1)));
f = @(l) (l^(-gamm/sigm))*((piis/(bet*w))^(-1/sigm)) - w*l - (r-delt)*l*((r/alph)^(1/(alph-1)));
l = fzero(f, 0.1);
c = (l^(-gamm/sigm))*((piis/(bet*w))^(-1/sigm));
k = l*((r/alph)^(1/(alph-1)));
m = piis*c;
iis = piis/bet;
b = m*(piis-1)*iis/(iis-piis);
a = 1;
inv = delt*k;
y = r*k + w*l;

%%%%Needed variables
rs = r;
cs = c;
ys = y;
invs = inv;
ms = m;
bs = b;

%%%%Zeroing
pii = 0;
ii = 0;
a = 0;
e = 0;
c = 0;
l = 0;
w = 0;
k = 0;
b = 0;
r = 0;
ii = 0;
pii = 0;
y = 0;
invt = 0;
m = 0;
e_pii = 0;
e_cs = 0;
e_c = 0;

for iter = 1:length(M_.params)
    eval([ 'M_.params(' num2str(iter) ') = ' M_.param_names(iter,:) ';' ])
end

if isfield(M_,'param_nbr') == 1

if isfield(M_,'orig_endo_nbr') == 1
NumberOfEndogenousVariables = M_.orig_endo_nbr;
else
NumberOfEndogenousVariables = M_.endo_nbr;
end
ys = zeros(NumberOfEndogenousVariables,1);
for i = 1:NumberOfEndogenousVariables
varname = deblank(M_.endo_names(i,:));
eval(['ys(' int2str(i) ') = ' varname ';']);
end
else
ys=zeros(length(lgy_),1);
for i = 1:length(lgy_)
ys(i) = eval(lgy_(i,:));
end
check = 0;
end
end