
function [ys,check]=smnl_steadystate(junk,ys);

global M_

paramfile_sm1

nparams = size(M_.param_names,1);
for icount = 1:nparams
    eval(['M_.params(icount) = ',M_.param_names(icount,:),';'])
end


check=0;

ASS = 1;
KSS = (0.1203)^(1/(calpha-1));
YSS = (KSS)^(calpha);
GSS=cg_bar*YSS; 
ISS =cdelta_0*KSS;
IhatSS = ISS; 
CSS= YSS-ISS -GSS;
LSS = 1;
R_sup_DSS =  1/cbeta;
R_sup_BSS = R_sup_DSS +0.0025; 
R_sup_FSS = R_sup_DSS +0.0075;
Q_sub_BSS = 1/(R_sup_BSS - ckappa);
QSS = 1/(R_sup_FSS - ckappa);
R_sup_RESS =  R_sup_DSS;
R_sup_TRSS = R_sup_DSS;
f_sub_CBSS = 0;
b_sub_CBSS = 0.06;
reSS = QSS*f_sub_CBSS+ Q_sub_BSS*b_sub_CBSS;
T_sub_CBSS = (1+ckappa*QSS)*f_sub_CBSS + (1+ckappa*Q_sub_BSS)*b_sub_CBSS-R_sup_RESS*reSS ;
TSS = GSS +cb_bar_G - T_sub_CBSS - Q_sub_BSS*cb_bar_G*(1-ckappa);
Y_sub_MSS =YSS;
bSS = cb_bar_G - b_sub_CBSS;
thetaSS = 0.5948;
p_sub_MSS = (cepsilon_p - 1)/cepsilon_p;
wSS = (1-calpha)*p_sub_MSS*KSS^calpha;
w_starSS = wSS ;
mrsSS = (w_starSS)/((cepsilon_w/(cepsilon_w - 1)));
uSS =1;
f_sub_1SS = (1/(1 - cphi_w*cbeta))*(mrsSS*(wSS)^cepsilon_w);
f_sub_2SS = (1/(1 - cphi_w*cbeta))*((wSS)^cepsilon_w);
p_starSS = (cepsilon_p/(cepsilon_p - 1))*p_sub_MSS;
p_sup_KSS = 1;
x_sub_1SS = (1/(1-cphi_p*cbeta))*p_sub_MSS*YSS;
x_sub_2SS = (1/(1-cphi_p*cbeta))*YSS;
LambdaSS = cbeta;
PiSS = 1;
f_sub_MSS = (cpsi*p_sup_KSS*IhatSS)/(QSS*(1-ckappa));
fSS =f_sub_MSS;
phiSS = 4;
nSS = (QSS*fSS + cDelta*Q_sub_BSS*bSS)/phiSS;
OmegaSS = 1-csigma + csigma*thetaSS*phiSS;
lambdaSS = (LambdaSS*OmegaSS*(PiSS^(-1))*(R_sup_FSS-R_sup_DSS))/(thetaSS -(LambdaSS*OmegaSS*(PiSS^(-1))*(R_sup_FSS-R_sup_DSS)));
muSS = (1-cbeta*cb)/(CSS*(1-cb));
upsilon_sup_PSS =1;
upsilon_sup_WSS = (w_starSS/wSS)^(-cepsilon_w);
L_sub_DSS =LSS/ upsilon_sup_WSS;
omegaSS = 0;
dSS = QSS*fSS + Q_sub_BSS*bSS+reSS - nSS;
M_sub_2SS = LambdaSS/(QSS*(1-ckappa*LambdaSS));
M_sub_1SS = cpsi*(M_sub_2SS - 1)+1;




ys = [ ASS
YSS 
CSS
GSS
ISS
IhatSS
KSS
L_sub_DSS 
LSS
R_sup_DSS 
R_sup_BSS 
R_sup_FSS
Q_sub_BSS 
QSS 
R_sup_RESS
R_sup_TRSS 
f_sub_CBSS 
b_sub_CBSS 
reSS 
T_sub_CBSS 
TSS 
Y_sub_MSS 
bSS 
mrsSS
thetaSS 
p_sub_MSS 
uSS 
wSS 
f_sub_1SS
f_sub_2SS 
p_starSS 
p_sup_KSS 
w_starSS 
x_sub_1SS 
x_sub_2SS 
LambdaSS 
PiSS 
f_sub_MSS
fSS 
nSS 
phiSS 
OmegaSS 
lambdaSS 
muSS 
upsilon_sup_PSS 
upsilon_sup_WSS 
omegaSS 
dSS 
M_sub_1SS 
M_sub_2SS  
] ;

save ys ASS CSS GSS IhatSS ISS KSS L_sub_DSS LSS M_sub_1SS M_sub_2SS Q_sub_BSS QSS R_sup_BSS R_sup_FSS R_sup_DSS R_sup_RESS R_sup_TRSS T_sub_CBSS TSS Y_sub_MSS b_sub_CBSS bSS mrsSS thetaSS phiSS wSS f_sub_1SS f_sub_2SS f_sub_CBSS p_starSS p_sup_KSS p_sub_MSS reSS uSS w_starSS w_starSS x_sub_1SS x_sub_2SS LambdaSS PiSS OmegaSS lambdaSS omegaSS muSS upsilon_sup_PSS upsilon_sup_WSS nSS dSS fSS f_sub_MSS

