function T = static_resid_tt(T, y, x, params)
% function T = static_resid_tt(T, y, x, params)
%
% File created by Dynare Preprocessor from .mod file
%
% Inputs:
%   T         [#temp variables by 1]  double   vector of temporary terms to be filled by function
%   y         [M_.endo_nbr by 1]      double   vector of endogenous variables in declaration order
%   x         [M_.exo_nbr by 1]       double   vector of exogenous variables in declaration order
%   params    [M_.param_nbr by 1]     double   vector of parameter values in declaration order
%
% Output:
%   T         [#temp variables by 1]  double   vector of temporary terms
%

assert(length(T) >= 17);

T(1) = params(9)/(1-params(9));
T(2) = (-1)/params(9);
T(3) = (y(3)/params(10))^T(2);
T(4) = params(1)*(1+T(1)*T(3));
T(5) = (y(4)/params(10))^T(2);
T(6) = exp(y(2))*exp(y(24))*params(1)*(1+T(1)*T(5))*(1-params(8));
T(7) = exp(y(20))*exp(y(8))^params(2);
T(8) = exp(y(9))^(1-params(2));
T(9) = T(3)*(exp(params(14))+y(10)*exp(y(8))+exp(y(24))*exp(y(23))*exp(y(1))*exp(y(8)));
T(10) = T(5)*exp(y(8))*exp(y(1))*exp(y(24))*(1-params(8));
T(11) = y(3)/(1-params(9));
T(12) = params(4)*exp(y(9))^params(5)*exp(y(14));
T(13) = y(5)^(1/params(9));
T(14) = exp(y(24))*(exp(y(23))+(1-params(8))*T(13))/(exp(y(23))+1-params(8));
T(15) = exp(y(21))/exp(params(18));
T(16) = sqrt(((1-y(27))/2)^2+y(26)*y(27));
T(17) = (1-y(27))/2+T(16);

end
