function [ys,check] = NKopen_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




options=optimset(); 

tau_c = 0.17;
tau_k =0.30;
tau_l = 0.20;
af=1;
ip=0.47;
R = 1/betta;                     
        

rk = (R-(1-deltta))/(1-tau_k);
wf = (alppha/rk)^((alppha)/(1-alppha))*(1-alppha);
wi = ip;
yf = ((((1-tau_l)*wf)*(1+tau_c))/((gamma_l^(-siggma)*(1-alppha)^(siggma)*wf^(-siggma))*(gamma_l+(1-gamma_l)*(wi/(wf*(1-tau_l)))^((1+thetta)/thetta))^((1+siggma)/(1+thetta)-1)*(1+tau_c)*gammaa^(-1)*(gammaa+(1-gammaa)*(1+tau_c)^(muu-1)*ip^(1-muu))*(1-(1-alppha)*tau_l-alppha*tau_k-phii*(1-R)-(alppha*deltta)/rk)))^(1/(1+siggma))
cf = ((1-tau_l)*wf)/((yf^(siggma)*gamma_l^(-siggma)*(1-alppha)^(siggma)*wf^(-siggma))*(gamma_l+(1-gamma_l)*(wi/(wf*(1-tau_l)))^((1+thetta)/thetta))^((1+siggma)/(1+thetta)-1)*(1+tau_c)*(gammaa+(1-gammaa)*(1+tau_c)^(muu-1)*ip^(1-muu))/(gammaa));
k = (alppha*yf)/rk;
i = deltta*alppha*yf/rk;
b = phii*yf;
lf = (1-alppha)*yf/wf;
g = tau_c*((1-tau_l)*wf)/((yf^(siggma)*gamma_l^(-siggma)*(1-alppha)^(siggma)*wf^(-siggma))*(gamma_l+(1-gamma_l)*(wi/(wf*(1-tau_l)))^((1+thetta)/thetta))^((1+siggma)/(1+thetta)-1)*(1+tau_c)*(gammaa+(1-gammaa)*(1+tau_c)^(muu-1)*ip^(1-muu))/(gammaa))+tau_l*wf*lf + tau_k*rk*k+b*(1-R);
ci = ((1-gammaa)/gammaa)*cf*(1+tau_c)^muu*ip^(-muu);
yi=ci;
li = ((1-gamma_l)/gamma_l)*lf*(wi/(wf*(1-tau_l)))^(1/thetta);



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
