function [ys,check] = ModelWithSteadyStateFile_steadystate(ys,exe)
% function [ys,check] = NK_baseline_steadystate(ys,exo)
% computes the steady state for the NK_baseline.mod and uses a numerical
% solver to do so
% Inputs: 
%   - ys        [vector] vector of initial values for the steady state of
%                   the endogenous variables
%   - exo       [vector] vector of values for the exogenous variables
%
% Output: 
%   - ys        [vector] vector of steady state values fpr the the endogenous variables
%   - check     [scalar] set to 0 if steady state computation worked and to
%                    1 of not (allows to impos restriction on parameters)

global M_ 

% read out parameters to access them with their name
NumberOfParameters = M_.param_nbr;
for ii = 1:NumberOfParameters
  paramname = deblank(M_.param_names(ii,:));
  eval([ paramname ' = M_.params(' int2str(ii) ');']);
end
% initialize indicator
check = 0;


%% Enter model equations here

sigmaa_a         = sigmaa_bar
Pii              = 1
r                = 1/Beta
z                = 1
acti             = 0.63 
empl             = 0.94 
u                = 1-empl    
markup           = 6/5    

y                = 1*acti*empl
q                = 0.7     

search           = acti-(1-rho)*empl*acti

v                = 0.0553
kappa            = (0.007*y)/v

theta            = v/search               
omega            = q/(theta^(-alphaa))    

find             = omega*theta^(1-alphaa)

c                = y - kappa*theta*search 
lambda           = (c*(1-h))^(-sigmaa)*(1-Beta*h)
w                = (1/markup)-((kappa/omega)*theta^alphaa)*(1-Beta*(1-rho))
b                = 0.4*w 
xi               = (lambda/acti^varphi)*( ( (1-find)*b*(1-Beta*(1-rho)) + find*w) / (1 - Beta*(1-rho)*(1-find)) )
eta              = (w-b) / (1/markup + Beta*(1-rho)*kappa*theta - b)
empl             = 0.94*0.63 



%% end own model equations

for iter = 1:length(M_.params) %update parameters set in the file
  eval([ 'M_.params(' num2str(iter) ') = ' M_.param_names(iter,:) ';' ])
end

NumberOfEndogenousVariables = M_.orig_endo_nbr; %auxiliary variables are set automatically
for ii = 1:NumberOfEndogenousVariables
  varname = deblank(M_.endo_names(ii,:));
  eval(['ys(' int2str(ii) ') = ' varname ';']);
end
