% computes the steady state of dog.mod (growthless deterministic growth model). 
% stephane [DOT] adjemian [AT] ens [DOT] fr

function [ys,check] = dog_steadystate(ys,exe)
global M_

%% DO NOT CHANGE THIS PART.
%%
%% Here we load the values of the deep parameters in a loop.
%%
NumberOfParameters = M_.param_nbr;                            % Number of deep parameters.
for i = 1:NumberOfParameters                                  % Loop...
  paramname = deblank(M_.param_names(i,:));                   %    Get the name of parameter i. 
  eval([ paramname ' = M_.params(' int2str(i) ');']);         %    Get the value of parameter i.
end                                                           % End of the loop.  
check = 0;
%%
%% END OF THE FIRST MODEL INDEPENDENT BLOCK.


%% THIS BLOCK IS MODEL SPECIFIC.
%%
%% Here the user has to define the steady state.
%%
q = 1;
v = 1;
R = 1/beta;
R_k = ((1/beta) - (1-delta0))/(1-tau_k);
delta1= R_k*(1-tau_k);
I = delta0*K;
s_g=G/Y;
Y= C + I + G;
Y= (K^alpha)* L^(1-alpha);
R_k=alpha*Y/K;
(1+tau_c)*(L^(1+kappa)) = (C-h*C)^(-gamma)* (1-tau_l)*(1-alpha)*Y;
s_b = B/Y;
Z = tau_k*alpha*Y + tau_l*(1-alpha)*Y + tau_c*C - Y*(s_g + (1-beta)*s_b/beta));

%%
%% END OF THE MODEL SPECIFIC BLOCK.


%% DO NOT CHANGE THIS PART.
%%
%% Here we define the steady state values of the endogenous variables of
%% the model.
%%
NumberOfEndogenousVariables = M_.endo_nbr;                    % Number of endogenous variables.
ys = zeros(NumberOfEndogenousVariables,1);                    % Initialization of ys (steady state).
for i = 1:NumberOfEndogenousVariables                         % Loop...
  varname = deblank(M_.endo_names(i,:));                      %    Get the name of endogenous variable i.                     
  eval(['ys(' int2str(i) ') = ' varname ';']);                %    Get the steady state value of this variable.
end                                                           % End of the loop.
%%
%% END OF THE SECOND MODEL INDEPENDENT BLOCK.