
function [ys,check1]=MME0_SweadySwate(junk, ys)

global M_ options_

for j=1:size(M_.param_names,1)
  eval([deblank(M_.param_names(j,:)),' = M_.params(j);']) 
  assignin('base',deblank(M_.param_names(j,:)),M_.params(j)); 
end
for j=1:size(M_.endo_names,1)
  eval([deblank(M_.endo_names(j,:)),' = NaN;']) 
end

check1=0;

R       = R_ss;
LZ_Z_star = LZ_Z_star_ss ;

LY_Z    =   LPhc_ss ;
LC_Z    =   LC_Z_ss ; 
LI_Z    =   log(I_Y) + LPhc_ss ; 
LZ      =   LY_ss ;
LY      =   LPhc_ss + LZ ;
LC      =   log(C_Y) + LY ;
LI      =   log(I_Y) + LY ;
LI_K    =   log(deltae + G) ;
LL      =   LL_ss ;
LW      =   LW_ss ;
MC      =   MC_ss ;
RK      =   RK_ss ;

Q       =     1 ;
G_Y     =   G ;
G_K     =   G ;
G_C     =   G ;
G_I     =   G ;
G_Z     =   G ;
G_A     =   G ;
G_L     =   0 ;

PIw     =   G ; 
 
PI      =   Infl ; 
PIh     =   Infl ;
PIf     =   Infl ;
LY_star =   LY_star_ss ;
E_A     =   0 ;
E_PI    =   0 ;
E_M     =   0 ;
E_K     =   0 ;
E_P     =   0 ;
E_W     =   0 ;
E_A     =   0 ;
E_L     =   0 ;
E_PIEX    =   0 ;

LA      =   0 ;
G_Y_star =  G_star ;
E_Y_Star =  0 ;
LZ_A    =   LZ ;
LI_A    =   LI ;
MUL     =   - xi*exp(LL_ss)^phi ;
MUC_Z   =   MUC_Z_ss ; 
LK 	=   LI - LI_K ;
TB      =   0 ;
E_PIF   =   0 ;
 

LWop    =   LWop_ss ;
Sw      =   (exp(LWop_ss-LW))^(-etaw) ;
Ld      =   Ld_ss ;
lamda   =   lamda_ss ;
lamda_star = log((C_Y * exp(LY_star)*(1-h))^-sigmae);
PIwop   =   G ;
FAw 	=   ((etaw-1)/etaw*exp(LWop)*lamda*exp(Ld)) / (1-viw*betae* (1+Infl)*(1+G)^-sigmae) ;
FBw     =   ( - MUL_ss * exp(Ld) ) / ( 1 - viw*betae ) ;
FAph    =   exp(LY) * MC_ss * exp(LPhcop_ss)^(-etaph-1)/(1 - viph*betae* (1 / (1+Infl))^-etaph * (1+G)^(1-sigmae)) ;
FBph    =   exp(LY) * exp(LPhcop_ss)^(-etaph) / (1-viph*betae*(1/(1+Infl))^(1-etaph) * (1+G)^(1-sigmae)) ;
LPhcop  =   LPhcop_ss ;
LPhc    =   LPhc_ss ; 
LPfc    =   LPfc_ss ; 
LPfcop  =   LPfcop_ss ;
FApf    =   exp(LY_star)*MC_star_ss*exp(LPfcop_ss)^(-etapf-1)/(1-vipf*betae*(1/(1+Infl))^-etapf*(1+G_star)^(1-sigmae)) ;
FBpf    =   exp(LY_star)*exp(LPfcop_ss)^(-etapf)/(1-vipf*betae*(1/(1+Infl))^(1-etapf)*(1+G_star)^(1-sigmae)) ;
MC_star =   MC_star_ss ;
GUC     =   -sigmae*G ;
TB_Z    =   0 ;

LY_A= LY;
LK_A=LK;
gy  =   G ;
gyea  =   G_star;
gcpi =   Infl ;
gcpiea  =   Infl ;
gc  =   G ;
gi  =  G ;
gl  =   0 ;
gw  =      G ;
r   =     R ;
E_Y_star = 0;
E_TB_Z = 0;
LD_Z = log(0.6);
G_D = R_ss;

ys=[
G_Y_star
LY_A 
LK_A 
TB_Z 
LI 
GUC
LC 
Q 
FApf
FBpf 
MC_star 
LPfcop 
RK 
LY  
FAph 
FBph 
LPhcop  
LA 
PIwop 
Ld 
LWop 
FAw 
FBw 
Sw 
lamda
lamda_star 
PI 
PIh 
PIf 
LPhc 
LPfc  
G_C 
G_I 
G_Z 
G_K 
G_L 
G_A 
G_Y 
PIw 
LY_Z 
LC_Z 
LZ_Z_star 
LI_K 
LI_Z 
LZ 
LK 
LY_star  
LW 
LL  
MC 
MUL 
R 
E_K 
E_PI 
E_P
E_M  
E_L
E_PIF 
E_Y_star 
E_TB_Z 
    LD_Z 
    G_D
%     E_PIEX
];

exs = M_.exo_nbr;

% 
