function [residual, g1, g2, g3] = CA_BMZ12_static(y, x, params)
%
% Status : Computes static model for Dynare
%
% Inputs : 
%   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
%
% Outputs:
%   residual  [M_.endo_nbr by 1] double    vector of residuals of the static model equations 
%                                          in order of declaration of the equations.
%                                          Dynare may prepend or append auxiliary equations, see M_.aux_vars
%   g1        [M_.endo_nbr by M_.endo_nbr] double    Jacobian matrix of the static model equations;
%                                                       columns: variables in declaration order
%                                                       rows: equations in order of declaration
%   g2        [M_.endo_nbr by (M_.endo_nbr)^2] double   Hessian matrix of the static model equations;
%                                                       columns: variables in declaration order
%                                                       rows: equations in order of declaration
%   g3        [M_.endo_nbr by (M_.endo_nbr)^3] double   Third derivatives matrix of the static model equations;
%                                                       columns: variables in declaration order
%                                                       rows: equations in order of declaration
%
%
% Warning : this file is generated automatically by Dynare
%           from model file (.mod)

residual = zeros( 90, 1);

%
% Model equations
%

T234 = y(20)^params(51);
T247 = params(41)/2;
T249 = T247*(y(7)/y(8)-params(37))^2;
T250 = y(8)*T249;
T253 = y(7)^2;
T260 = (y(22)*y(6))^params(35);
T261 = y(8)^(1-params(35));
T267 = params(39)*y(6)^params(38);
T280 = y(13)^params(40);
T316 = y(10)*y(21)*(1-params(35))/y(8);
T338 = (y(17)*params(35)/((1-params(35))*y(47)))^(1-params(35));
T349 = y(22)^params(35);
T356 = (y(8)*y(16)/y(12))^params(36);
T385 = y(13)^(params(40)-1);
T442 = T247*(y(26)/y(27)-params(37))^2;
T450 = (y(22)*y(25))^params(35);
T451 = y(27)^(1-params(35));
lhs =y(65);
rhs =log(y(18)/params(59))*400;
residual(1)= lhs-rhs;
lhs =y(67);
rhs =400*log(y(13)/params(54));
residual(2)= lhs-rhs;
lhs =y(66);
rhs =0.25*(y(67)+y(67)+y(67)+y(67));
residual(3)= lhs-rhs;
lhs =y(69);
rhs =log(y(21)/params(72))*100;
residual(4)= lhs-rhs;
lhs =y(68);
rhs =100*log(y(21)/y(34));
residual(5)= lhs-rhs;
lhs =y(64);
rhs =0.5*(0.01*y(68)^2+(y(66)-y(67))^2);
residual(6)= lhs-rhs;
lhs =y(65);
rhs =params(32)*x(5)+y(69)*params(31)+y(69)*params(30)+y(69)*params(29)+y(69)*params(28)+y(69)*params(27)+y(69)*params(26)+y(69)*params(25)+y(69)*params(24)+y(69)*params(23)+y(68)*params(22)+y(68)*params(21)+y(68)*params(20)+y(68)*params(19)+y(68)*params(18)+y(68)*params(17)+y(68)*params(16)+y(68)*params(15)+y(68)*params(14)+y(67)*params(13)+y(67)*params(12)+y(67)*params(11)+y(67)*params(10)+y(67)*params(6)+y(67)*params(5)+y(65)*params(1)+y(65)*params(2)+y(65)*params(3)+y(65)*params(4)+y(67)*params(7)+y(67)*params(8)+y(67)*params(9);
residual(7)= lhs-rhs;
lhs =y(9);
rhs =y(14)/y(4);
residual(8)= lhs-rhs;
lhs =y(9);
rhs =y(18)*params(34)*y(9)/y(13);
residual(9)= lhs-rhs;
lhs =y(17);
rhs =((1-params(35))*y(21)*y(10)/y(8)*y(11)+(1-params(37))*y(16))/y(16);
residual(10)= lhs-rhs;
lhs =y(1);
rhs =y(18)/y(13);
residual(11)= lhs-rhs;
lhs =y(56);
rhs =y(13);
residual(12)= lhs-rhs;
lhs =y(17);
rhs =y(1)*y(19);
residual(13)= lhs-rhs;
lhs =y(61);
rhs =y(1)*y(19);
residual(14)= lhs-rhs;
lhs =y(12);
rhs =params(96)*(y(8)*y(17)*y(16)-y(1)*y(19)*(y(8)*y(16)-y(12)));
residual(15)= lhs-rhs;
lhs =y(59);
rhs =y(12)*(1-params(96));
residual(16)= lhs-rhs;
lhs =y(16)*y(20);
rhs =1+params(41)*(y(7)/y(8)-params(37))+y(7)*params(43)/T234;
residual(17)= lhs-rhs;
lhs =y(8);
rhs =y(8)*(1-params(37))+y(20)*y(7);
residual(18)= lhs-rhs;
lhs =y(5);
rhs =y(7)*params(43)/(2*T234);
residual(19)= lhs-rhs;
lhs =y(21);
rhs =y(4)+y(7)+T250+params(43)/(2*T234)*T253;
residual(20)= lhs-rhs;
lhs =y(21)*y(10);
rhs =T260*T261;
residual(21)= lhs-rhs;
lhs =T267;
rhs =y(11)*y(9)*params(35)*y(21)*y(10)/y(6);
residual(22)= lhs-rhs;
lhs =y(10);
rhs =(1-params(42))*y(15)^(-params(40))+y(10)*params(42)*T280;
residual(23)= lhs-rhs;
lhs =y(36);
rhs =log(y(21))-log(params(72));
residual(24)= lhs-rhs;
lhs =y(37);
rhs =log(y(7))-log(params(71));
residual(25)= lhs-rhs;
lhs =y(62);
rhs =log(y(4))-params(39)*y(6)^(1+params(38))/(1+params(38));
residual(26)= lhs-rhs;
lhs =y(63);
rhs =y(62)+params(34)*y(63);
residual(27)= lhs-rhs;
lhs =y(44);
rhs =y(10)*y(21)*params(35)/y(6);
residual(28)= lhs-rhs;
lhs =y(46);
rhs =T316;
residual(29)= lhs-rhs;
lhs =y(45);
rhs =y(8)/y(6);
residual(30)= lhs-rhs;
lhs =y(47);
rhs =T267/y(9);
residual(31)= lhs-rhs;
lhs =y(48);
rhs =y(47)/y(44);
residual(32)= lhs-rhs;
lhs =y(49);
rhs =y(17)/y(46);
residual(33)= lhs-rhs;
lhs =y(50);
rhs =y(48)+y(49);
residual(34)= lhs-rhs;
lhs =y(51);
rhs =y(47)/params(35)*T338;
residual(35)= lhs-rhs;
lhs =y(52);
rhs =y(47)/y(44);
residual(36)= lhs-rhs;
lhs =y(53);
rhs =(y(17)*y(16)-(1-params(37))*y(16))/T316;
residual(37)= lhs-rhs;
lhs =y(54)^params(35);
rhs =y(21)*y(10)/(T261*T349);
residual(38)= lhs-rhs;
lhs =y(19);
rhs =y(39)*T356*y(40);
residual(39)= lhs-rhs;
lhs =y(60);
rhs =T356;
residual(40)= lhs-rhs;
lhs =y(41);
rhs =y(8)*y(16)-y(12);
residual(41)= lhs-rhs;
lhs =y(40);
rhs =(y(42)/params(108))^params(105);
residual(42)= lhs-rhs;
lhs =y(42);
rhs =y(13);
residual(43)= lhs-rhs;
lhs =y(43);
rhs =1;
residual(44)= lhs-rhs;
lhs =y(57);
rhs =y(8)*y(16)/y(12);
residual(45)= lhs-rhs;
lhs =y(58);
rhs =T250;
residual(46)= lhs-rhs;
lhs =y(15);
rhs =params(40)/(params(40)-1)*y(2)/y(3);
residual(47)= lhs-rhs;
lhs =y(15);
rhs =((1-params(42)*T385)/(1-params(42)))^(1/(1-params(40)));
residual(48)= lhs-rhs;
lhs =y(2);
rhs =y(21)*y(11)+y(2)*T280*params(34)*params(42);
residual(49)= lhs-rhs;
lhs =y(3);
rhs =y(21)+y(3)*T385*params(34)*params(42);
residual(50)= lhs-rhs;
lhs =y(28);
rhs =y(14)/y(24);
residual(51)= lhs-rhs;
lhs =y(28);
rhs =params(34)*y(33)*y(28)/params(54);
residual(52)= lhs-rhs;
lhs =y(32);
rhs =((1-params(35))*y(34)/y(27)*y(30)+(1-params(37))*y(31))/y(31);
residual(53)= lhs-rhs;
lhs =y(23);
rhs =y(33)/params(54);
residual(54)= lhs-rhs;
lhs =y(32);
rhs =y(23)*params(61);
residual(55)= lhs-rhs;
lhs =y(20)*y(31);
rhs =1+params(41)*(y(26)/y(27)-params(37));
residual(56)= lhs-rhs;
lhs =y(27);
rhs =(1-params(37))*y(27)+y(20)*y(26);
residual(57)= lhs-rhs;
lhs =y(34);
rhs =y(24)+y(26)+y(27)*T442;
residual(58)= lhs-rhs;
lhs =y(34)*y(29);
rhs =T450*T451;
residual(59)= lhs-rhs;
lhs =params(39)*y(25)^params(38);
rhs =y(30)*params(35)*y(28)*y(34)*y(29)/y(25);
residual(60)= lhs-rhs;
lhs =y(29);
rhs =1;
residual(61)= lhs-rhs;
lhs =y(35);
rhs =y(21)-y(34);
residual(62)= lhs-rhs;
lhs =y(38);
rhs =log(y(35))-log(params(95));
residual(63)= lhs-rhs;
lhs =y(55);
rhs =y(16)-y(31);
residual(64)= lhs-rhs;
lhs =y(30);
rhs =(params(40)-1)/params(40)*params(93);
residual(65)= lhs-rhs;
lhs =log(y(22));
rhs =log(y(22))*params(47)+x(1);
residual(66)= lhs-rhs;
lhs =log(y(20));
rhs =log(y(20))*params(49)+x(2);
residual(67)= lhs-rhs;
lhs =log(y(14));
rhs =log(y(14))*params(52)+x(3);
residual(68)= lhs-rhs;
lhs =log(y(39));
rhs =log(y(39))*params(103)-x(4);
residual(69)= lhs-rhs;
lhs =y(70);
rhs =y(67);
residual(70)= lhs-rhs;
lhs =y(71);
rhs =y(67);
residual(71)= lhs-rhs;
lhs =y(72);
rhs =y(67);
residual(72)= lhs-rhs;
lhs =y(73);
rhs =y(68);
residual(73)= lhs-rhs;
lhs =y(74);
rhs =y(68);
residual(74)= lhs-rhs;
lhs =y(75);
rhs =y(68);
residual(75)= lhs-rhs;
lhs =y(76);
rhs =y(69);
residual(76)= lhs-rhs;
lhs =y(77);
rhs =y(69);
residual(77)= lhs-rhs;
lhs =y(78);
rhs =y(69);
residual(78)= lhs-rhs;
lhs =y(79);
rhs =y(67);
residual(79)= lhs-rhs;
lhs =y(80);
rhs =y(67);
residual(80)= lhs-rhs;
lhs =y(81);
rhs =y(69);
residual(81)= lhs-rhs;
lhs =y(82);
rhs =y(69);
residual(82)= lhs-rhs;
lhs =y(83);
rhs =y(69);
residual(83)= lhs-rhs;
lhs =y(84);
rhs =y(68);
residual(84)= lhs-rhs;
lhs =y(85);
rhs =y(68);
residual(85)= lhs-rhs;
lhs =y(86);
rhs =y(68);
residual(86)= lhs-rhs;
lhs =y(87);
rhs =y(65);
residual(87)= lhs-rhs;
lhs =y(88);
rhs =y(65);
residual(88)= lhs-rhs;
lhs =y(89);
rhs =y(65);
residual(89)= lhs-rhs;
lhs =y(90);
rhs =y(67);
residual(90)= lhs-rhs;
if ~isreal(residual)
  residual = real(residual)+imag(residual).^2;
end
if nargout >= 2,
  g1 = zeros(90, 90);

  %
  % Jacobian matrix
  %

T686 = getPowerDeriv(y(22)*y(6),params(35),1);
T691 = params(39)*getPowerDeriv(y(6),params(38),1);
T720 = y(8)*T247*1/y(8)*2*(y(7)/y(8)-params(37));
T748 = (-(T249+y(8)*T247*2*(y(7)/y(8)-params(37))*(-y(7))/(y(8)*y(8))));
T749 = getPowerDeriv(y(8),1-params(35),1);
T769 = getPowerDeriv(y(8)*y(16)/y(12),params(36),1);
T836 = getPowerDeriv(y(13),params(40),1);
T840 = getPowerDeriv(y(13),params(40)-1,1);
T885 = getPowerDeriv(y(17)*params(35)/((1-params(35))*y(47)),1-params(35),1);
T903 = getPowerDeriv(y(20),params(51),1);
T965 = getPowerDeriv(y(22)*y(25),params(35),1);
  g1(1,18)=(-(400*1/params(59)/(y(18)/params(59))));
  g1(1,65)=1;
  g1(2,13)=(-(400*1/params(54)/(y(13)/params(54))));
  g1(2,67)=1;
  g1(3,66)=1;
  g1(3,67)=(-1);
  g1(4,21)=(-(100*1/params(72)/(y(21)/params(72))));
  g1(4,69)=1;
  g1(5,21)=(-(100*1/y(34)/(y(21)/y(34))));
  g1(5,34)=(-(100*(-y(21))/(y(34)*y(34))/(y(21)/y(34))));
  g1(5,68)=1;
  g1(6,64)=1;
  g1(6,66)=(-(0.5*2*(y(66)-y(67))));
  g1(6,67)=(-(0.5*(-(2*(y(66)-y(67))))));
  g1(6,68)=(-(0.5*0.01*2*y(68)));
  g1(7,65)=1-(params(4)+params(3)+params(1)+params(2));
  g1(7,67)=(-(params(13)+params(12)+params(11)+params(10)+params(9)+params(8)+params(7)+params(6)+params(5)));
  g1(7,68)=(-(params(22)+params(21)+params(20)+params(19)+params(18)+params(17)+params(16)+params(15)+params(14)));
  g1(7,69)=(-(params(31)+params(30)+params(29)+params(28)+params(27)+params(26)+params(25)+params(24)+params(23)));
  g1(8,4)=(-((-y(14))/(y(4)*y(4))));
  g1(8,9)=1;
  g1(8,14)=(-(1/y(4)));
  g1(9,9)=1-y(18)*params(34)*1/y(13);
  g1(9,13)=(-(y(18)*params(34)*(-y(9))/(y(13)*y(13))));
  g1(9,18)=(-(params(34)*y(9)/y(13)));
  g1(10,8)=(-(y(11)*(1-params(35))*(-(y(21)*y(10)))/(y(8)*y(8))/y(16)));
  g1(10,10)=(-(y(11)*(1-params(35))*y(21)/y(8)/y(16)));
  g1(10,11)=(-((1-params(35))*y(21)*y(10)/y(8)/y(16)));
  g1(10,16)=(-(((1-params(37))*y(16)-((1-params(35))*y(21)*y(10)/y(8)*y(11)+(1-params(37))*y(16)))/(y(16)*y(16))));
  g1(10,17)=1;
  g1(10,21)=(-(y(11)*(1-params(35))*y(10)/y(8)/y(16)));
  g1(11,1)=1;
  g1(11,13)=(-((-y(18))/(y(13)*y(13))));
  g1(11,18)=(-(1/y(13)));
  g1(12,13)=(-1);
  g1(12,56)=1;
  g1(13,1)=(-y(19));
  g1(13,17)=1;
  g1(13,19)=(-y(1));
  g1(14,1)=(-y(19));
  g1(14,19)=(-y(1));
  g1(14,61)=1;
  g1(15,1)=(-(params(96)*(-(y(19)*(y(8)*y(16)-y(12))))));
  g1(15,8)=(-(params(96)*(y(17)*y(16)-y(16)*y(1)*y(19))));
  g1(15,12)=1-y(1)*y(19)*params(96);
  g1(15,16)=(-(params(96)*(y(17)*y(8)-y(8)*y(1)*y(19))));
  g1(15,17)=(-(params(96)*y(8)*y(16)));
  g1(15,19)=(-(params(96)*(-(y(1)*(y(8)*y(16)-y(12))))));
  g1(16,12)=(-(1-params(96)));
  g1(16,59)=1;
  g1(17,7)=(-(params(41)*1/y(8)+params(43)/T234));
  g1(17,8)=(-(params(41)*(-y(7))/(y(8)*y(8))));
  g1(17,16)=y(20);
  g1(17,20)=y(16)-(-(y(7)*params(43)*T903))/(T234*T234);
  g1(18,7)=(-y(20));
  g1(18,8)=1-(1-params(37));
  g1(18,20)=(-y(7));
  g1(19,5)=1;
  g1(19,7)=(-(params(43)/(2*T234)));
  g1(19,20)=(-((-(y(7)*params(43)*2*T903))/(2*T234*2*T234)));
  g1(20,4)=(-1);
  g1(20,7)=(-(1+T720+params(43)/(2*T234)*2*y(7)));
  g1(20,8)=T748;
  g1(20,20)=(-(T253*(-(params(43)*2*T903))/(2*T234*2*T234)));
  g1(20,21)=1;
  g1(21,6)=(-(T261*y(22)*T686));
  g1(21,8)=(-(T260*T749));
  g1(21,10)=y(21);
  g1(21,21)=y(10);
  g1(21,22)=(-(T261*y(6)*T686));
  g1(22,6)=T691-y(11)*y(9)*params(35)*(-(y(21)*y(10)))/(y(6)*y(6));
  g1(22,9)=(-(y(11)*params(35)*y(21)*y(10)/y(6)));
  g1(22,10)=(-(y(11)*y(9)*params(35)*y(21)/y(6)));
  g1(22,11)=(-(y(9)*params(35)*y(21)*y(10)/y(6)));
  g1(22,21)=(-(y(11)*y(9)*params(35)*y(10)/y(6)));
  g1(23,10)=1-params(42)*T280;
  g1(23,13)=(-(y(10)*params(42)*T836));
  g1(23,15)=(-((1-params(42))*getPowerDeriv(y(15),(-params(40)),1)));
  g1(24,21)=(-(1/y(21)));
  g1(24,36)=1;
  g1(25,7)=(-(1/y(7)));
  g1(25,37)=1;
  g1(26,4)=(-(1/y(4)));
  g1(26,6)=params(39)*getPowerDeriv(y(6),1+params(38),1)/(1+params(38));
  g1(26,62)=1;
  g1(27,62)=(-1);
  g1(27,63)=1-params(34);
  g1(28,6)=(-((-(y(10)*y(21)*params(35)))/(y(6)*y(6))));
  g1(28,10)=(-(y(21)*params(35)/y(6)));
  g1(28,21)=(-(params(35)*y(10)/y(6)));
  g1(28,44)=1;
  g1(29,8)=(-((-(y(10)*y(21)*(1-params(35))))/(y(8)*y(8))));
  g1(29,10)=(-(y(21)*(1-params(35))/y(8)));
  g1(29,21)=(-((1-params(35))*y(10)/y(8)));
  g1(29,46)=1;
  g1(30,6)=(-((-y(8))/(y(6)*y(6))));
  g1(30,8)=(-(1/y(6)));
  g1(30,45)=1;
  g1(31,6)=(-(T691/y(9)));
  g1(31,9)=(-((-T267)/(y(9)*y(9))));
  g1(31,47)=1;
  g1(32,44)=(-((-y(47))/(y(44)*y(44))));
  g1(32,47)=(-(1/y(44)));
  g1(32,48)=1;
  g1(33,17)=(-(1/y(46)));
  g1(33,46)=(-((-y(17))/(y(46)*y(46))));
  g1(33,49)=1;
  g1(34,48)=(-1);
  g1(34,49)=(-1);
  g1(34,50)=1;
  g1(35,17)=(-(y(47)/params(35)*params(35)/((1-params(35))*y(47))*T885));
  g1(35,47)=(-(T338*1/params(35)+y(47)/params(35)*T885*(-((1-params(35))*y(17)*params(35)))/((1-params(35))*y(47)*(1-params(35))*y(47))));
  g1(35,51)=1;
  g1(36,44)=(-((-y(47))/(y(44)*y(44))));
  g1(36,47)=(-(1/y(44)));
  g1(36,52)=1;
  g1(37,8)=(-((-((y(17)*y(16)-(1-params(37))*y(16))*(-(y(10)*y(21)*(1-params(35))))/(y(8)*y(8))))/(T316*T316)));
  g1(37,10)=(-((-((y(17)*y(16)-(1-params(37))*y(16))*y(21)*(1-params(35))/y(8)))/(T316*T316)));
  g1(37,16)=(-((y(17)-(1-params(37)))/T316));
  g1(37,17)=(-(y(16)/T316));
  g1(37,21)=(-((-((y(17)*y(16)-(1-params(37))*y(16))*(1-params(35))*y(10)/y(8)))/(T316*T316)));
  g1(37,53)=1;
  g1(38,8)=(-((-(y(21)*y(10)*T349*T749))/(T261*T349*T261*T349)));
  g1(38,10)=(-(y(21)/(T261*T349)));
  g1(38,21)=(-(y(10)/(T261*T349)));
  g1(38,22)=(-((-(y(21)*y(10)*T261*getPowerDeriv(y(22),params(35),1)))/(T261*T349*T261*T349)));
  g1(38,54)=getPowerDeriv(y(54),params(35),1);
  g1(39,8)=(-(y(40)*y(39)*y(16)/y(12)*T769));
  g1(39,12)=(-(y(40)*y(39)*T769*(-(y(8)*y(16)))/(y(12)*y(12))));
  g1(39,16)=(-(y(40)*y(39)*T769*y(8)/y(12)));
  g1(39,19)=1;
  g1(39,39)=(-(T356*y(40)));
  g1(39,40)=(-(y(39)*T356));
  g1(40,8)=(-(y(16)/y(12)*T769));
  g1(40,12)=(-(T769*(-(y(8)*y(16)))/(y(12)*y(12))));
  g1(40,16)=(-(T769*y(8)/y(12)));
  g1(40,60)=1;
  g1(41,8)=(-y(16));
  g1(41,12)=1;
  g1(41,16)=(-y(8));
  g1(41,41)=1;
  g1(42,40)=1;
  g1(42,42)=(-(1/params(108)*getPowerDeriv(y(42)/params(108),params(105),1)));
  g1(43,13)=(-1);
  g1(43,42)=1;
  g1(44,43)=1;
  g1(45,8)=(-(y(16)/y(12)));
  g1(45,12)=(-((-(y(8)*y(16)))/(y(12)*y(12))));
  g1(45,16)=(-(y(8)/y(12)));
  g1(45,57)=1;
  g1(46,7)=(-T720);
  g1(46,8)=T748;
  g1(46,58)=1;
  g1(47,2)=(-(params(40)/(params(40)-1)*1/y(3)));
  g1(47,3)=(-(params(40)/(params(40)-1)*(-y(2))/(y(3)*y(3))));
  g1(47,15)=1;
  g1(48,13)=(-((-(params(42)*T840))/(1-params(42))*getPowerDeriv((1-params(42)*T385)/(1-params(42)),1/(1-params(40)),1)));
  g1(48,15)=1;
  g1(49,2)=1-T280*params(34)*params(42);
  g1(49,11)=(-y(21));
  g1(49,13)=(-(y(2)*params(34)*params(42)*T836));
  g1(49,21)=(-y(11));
  g1(50,3)=1-T385*params(34)*params(42);
  g1(50,13)=(-(y(3)*params(34)*params(42)*T840));
  g1(50,21)=(-1);
  g1(51,14)=(-(1/y(24)));
  g1(51,24)=(-((-y(14))/(y(24)*y(24))));
  g1(51,28)=1;
  g1(52,28)=1-params(34)*y(33)*1/params(54);
  g1(52,33)=(-(params(34)*y(28)/params(54)));
  g1(53,27)=(-(y(30)*(1-params(35))*(-y(34))/(y(27)*y(27))/y(31)));
  g1(53,30)=(-((1-params(35))*y(34)/y(27)/y(31)));
  g1(53,31)=(-(((1-params(37))*y(31)-((1-params(35))*y(34)/y(27)*y(30)+(1-params(37))*y(31)))/(y(31)*y(31))));
  g1(53,32)=1;
  g1(53,34)=(-(y(30)*(1-params(35))*1/y(27)/y(31)));
  g1(54,23)=1;
  g1(54,33)=(-(1/params(54)));
  g1(55,23)=(-params(61));
  g1(55,32)=1;
  g1(56,20)=y(31);
  g1(56,26)=(-(params(41)*1/y(27)));
  g1(56,27)=(-(params(41)*(-y(26))/(y(27)*y(27))));
  g1(56,31)=y(20);
  g1(57,20)=(-y(26));
  g1(57,26)=(-y(20));
  g1(57,27)=1-(1-params(37));
  g1(58,24)=(-1);
  g1(58,26)=(-(1+y(27)*T247*1/y(27)*2*(y(26)/y(27)-params(37))));
  g1(58,27)=(-(T442+y(27)*T247*2*(y(26)/y(27)-params(37))*(-y(26))/(y(27)*y(27))));
  g1(58,34)=1;
  g1(59,22)=(-(T451*y(25)*T965));
  g1(59,25)=(-(T451*y(22)*T965));
  g1(59,27)=(-(T450*getPowerDeriv(y(27),1-params(35),1)));
  g1(59,29)=y(34);
  g1(59,34)=y(29);
  g1(60,25)=params(39)*getPowerDeriv(y(25),params(38),1)-y(30)*params(35)*y(28)*(-(y(34)*y(29)))/(y(25)*y(25));
  g1(60,28)=(-(y(30)*params(35)*y(34)*y(29)/y(25)));
  g1(60,29)=(-(y(30)*params(35)*y(28)*y(34)/y(25)));
  g1(60,30)=(-(params(35)*y(28)*y(34)*y(29)/y(25)));
  g1(60,34)=(-(y(30)*params(35)*y(28)*y(29)/y(25)));
  g1(61,29)=1;
  g1(62,21)=(-1);
  g1(62,34)=1;
  g1(62,35)=1;
  g1(63,35)=(-(1/y(35)));
  g1(63,38)=1;
  g1(64,16)=(-1);
  g1(64,31)=1;
  g1(64,55)=1;
  g1(65,30)=1;
  g1(66,22)=1/y(22)-params(47)*1/y(22);
  g1(67,20)=1/y(20)-params(49)*1/y(20);
  g1(68,14)=1/y(14)-params(52)*1/y(14);
  g1(69,39)=1/y(39)-params(103)*1/y(39);
  g1(70,67)=(-1);
  g1(70,70)=1;
  g1(71,67)=(-1);
  g1(71,71)=1;
  g1(72,67)=(-1);
  g1(72,72)=1;
  g1(73,68)=(-1);
  g1(73,73)=1;
  g1(74,68)=(-1);
  g1(74,74)=1;
  g1(75,68)=(-1);
  g1(75,75)=1;
  g1(76,69)=(-1);
  g1(76,76)=1;
  g1(77,69)=(-1);
  g1(77,77)=1;
  g1(78,69)=(-1);
  g1(78,78)=1;
  g1(79,67)=(-1);
  g1(79,79)=1;
  g1(80,67)=(-1);
  g1(80,80)=1;
  g1(81,69)=(-1);
  g1(81,81)=1;
  g1(82,69)=(-1);
  g1(82,82)=1;
  g1(83,69)=(-1);
  g1(83,83)=1;
  g1(84,68)=(-1);
  g1(84,84)=1;
  g1(85,68)=(-1);
  g1(85,85)=1;
  g1(86,68)=(-1);
  g1(86,86)=1;
  g1(87,65)=(-1);
  g1(87,87)=1;
  g1(88,65)=(-1);
  g1(88,88)=1;
  g1(89,65)=(-1);
  g1(89,89)=1;
  g1(90,67)=(-1);
  g1(90,90)=1;
  if ~isreal(g1)
    g1 = real(g1)+2*imag(g1);
  end
if nargout >= 3,
  %
  % Hessian matrix
  %

  g2 = sparse([],[],[],90,8100);
if nargout >= 4,
  %
  % Third order derivatives
  %

  g3 = sparse([],[],[],90,729000);
end
end
end
end
