function [ys,params,check] = G_1109_steadystate(ys,exo,M_,options_)
% Inputs: 
%   - ys        [vector] vector of initial values for the steady state of the endogenous variables
%   - exo       [vector] vector of values for the exogenous variables
%   - M_        [structure] Dynare model structure
%   - options   [structure] Dynare options structure
%
% Output: 
%   - ys        [vector] vector of steady state values for the the endogenous variables
%   - params    [vector] vector of parameter values
%   - check     [scalar] 0 if steady state computation worked and to
%                        1 of not (allows to impose restrictions on parameters)

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
%%epsilontheta theta om c cr cw l lw lr lambda a hr hw y ii w R k Z
options=optimset(); % set options for numerical solver

Z=1;
R=1/beta;
epsilontheta=1-gamma*R^rho/(1-rho)*beta^1/(1-rho)*(1/(1+x))^rho(1-nu)/(1-rho);
om=omega+(1-omega)*(epsilontheta/theta)^(rho-1)/rho*(1/xi)^(1-nu);
theta=1-(R*om)^rho/(1-rho)*beta^1/(1-rho)*(1/1+x)^rho*(1-nu)/(1-rho);
c=cr+cw;
cr=epsilontheta*(R*lambda*k+hr);
cw=epsilontheta/theta*(R(1-lambda)*k+hw);
a=k;
l=lw+xi*lr;
lr=Gamma-(1-nu)*cr/nu*xi*w;
lw=1-(1-nu)*cw/nu*w;
lambda=(omega*((1-epsilontheta)*hr+w*xi*lr-hr)+(1-omega)*a*(1+x+n))/a*((1+x+n)-omega(1-epsilontheta)*R);
hr=w*xi*lr/(1-gamma*(1+x)/R);
hw=(w*lw+(1-omega)*(epsilontheta/theta)^(rho-1)/rho*(1/xi)^(1-v)*hr*(1+x)/R*om)/(1-omega*(1+x)/R*om);
y=l^(1-alpha)*k^alpha;
k=ii/(x+n+delta);
w=(1-alpha)*y/l;
ii=y-c;


%% end own model equations

for iter = 1:length(M_.params) %update parameters set in the file
  eval([ 'params(' num2str(iter) ',1) = ' 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


