
function [ys,check1]=MME0_SteadyState(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= 1/betae-1;
LZ_Z_star = -log(alphae/alphae_st);
LYhf_Z_star = log(alphae)-log(alphae/alphae_st);
LYhh_Z = log(1-alphae);
LYfh_Z = log(alphae);
LYhf = 1+log(alphae);
LYhh = 1+log(1-alphae);
LYfh = 1+log(alphae);

LY_Z = 0;
LC_Z = log(C_Y); %log(C_Y)+LY_Z;
LI_Z = log(I_Y); %log(I_Y)+LY_Z;
LZ = 1;
LY = 1;
LC = log(C_Y)+LY;
LI = log(I_Y)+LY;
LI_K = log(delta + Tech_G_star);
LA = 0;
LL = 1/(gamap)*(1-(1-gamap)*(LI_K-LI));
LMUC_Z = -sigmae*log(C_Y*(1-h)); 
LW = LY - LL + log(alphae);
MC = MC_ss;
LRK = log(1/betae-1 + delta+Tech_G_star);

Q = 1;
G_Y = Tech_G_star;
G_K = Tech_G_star;
G_C = Tech_G_star;
G_Z = Tech_G_star;
G_A = Tech_G_star;
G_L = 0;
GUC = 0;
PIw = Infl+Tech_G_star;
LPh = 0;
LPf = 0; 
PI = Infl; 
PIh = Infl;
PIf = Infl;
% LZ_star =1+log(alphae/alphae_st);
LY_star =1+log(alphae/alphae_st);
E_A = 0;
E_PI = 0;
E_R = 0;
E_K = 0;
E_D = 0;
E_P = 0;
E_W = 0;
PI_obs = Infl;
Y_obs = Tech_G_star; 
        
LMRS =-phi*LL_ss+sigmae-sigmae*log(C_Y*(1-h));
% sigmae*log(C_Y*(1-h))-sigmae + phi*LL_ss;


ys=[ 
    R
    LZ_Z_star
    LYhf_Z_star
    LYhh_Z
    LYfh_Z
    LYhf
    LYhh
    LYfh
    LY_Z
    LC_Z
    LI_Z
    LZ
    LY
    LC
    LI
    LI_K
    LA
    LL
    LMUC_Z
    LMRS
    LW
    MC
    LRK
    Q
    G_Y
    G_K
    G_C
    G_Z
    G_A
    G_L
    GUC
    PIw
    LPh
    LPf
    PI 
    PIh
    PIf
%     LZ_star
    LY_star
    E_A
    E_PI
    E_R
    E_K
    E_D
    E_P
    E_W
    PI_obs
    Y_obs  
];

exs = M_.exo_nbr;
ex_ = zeros(1,exs);

% eval(['[fmax, iff] = max(abs(',M_.fname,'_static(ys, ex_, M_.params)));'])
% 
% if fmax>1.e-8; %options_.dynatol;
% %     [fmax, iff] = max(abs(quest3h_static(ys, ex_)));
%     disp(['The analytic steady state is not correct! ',num2str(fmax)])
%     disp(['Equation ',int2str(iff),', discrepancy ',num2str(fmax)])
%     check1=1;
% end

