function [residual, g1, g2, g3] = DSGE_Col_E_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( 87, 1);

%
% Model equations
%

T24 = ((1-params(29))*y(27)+y(28)+y(29))^params(44);
T27 = (y(26)/T24)^params(27);
T30 = ((1-params(29))*y(27))^params(1);
T31 = x(2)*x(1)*params(4)*T27*T30;
T38 = (params(29)*y(16)+(1-params(29))*y(19))^(1-params(1));
T49 = ((1-params(29))*y(28))^params(2);
T50 = T27*x(1)*x(3)*params(5)*T49;
T57 = (params(29)*y(17)+(1-params(29))*y(20))^(1-params(2));
T68 = ((1-params(29))*y(29))^params(3);
T69 = T27*x(1)*x(4)*params(6)*T68;
T76 = (params(29)*y(18)+(1-params(29))*y(21))^(1-params(3));
T221 = y(50)/y(49);
T223 = params(34)/params(43);
T235 = (params(43)-1)/params(43)+T221*T223*(T221-1)-T221*T221*(T221-1)*T223*params(14);
T236 = T235^(-1);
T241 = y(51)/y(49);
T243 = params(35)/params(43);
T253 = (params(43)-1)/params(43)+T241*T243*(T241-1)-T241*T241*(T241-1)*params(14)*T243;
T254 = T253^(-1);
T260 = params(36)/params(43);
T261 = y(52)/y(49);
T267 = T260*params(14)*y(52)*T260*(T261-1)/y(49);
T270 = y(52)*(T261-1)*T267/y(49);
T273 = (params(43)-1)/params(43)+T261*T270;
T274 = T273^(-1);
T287 = params(8)^(params(65)-1);
T293 = params(31)*T287*(y(38)/y(40))^(-params(65));
T302 = T287*(1-params(31))*(y(39)/y(40))^(-params(65));
T305 = params(8)^(-1);
T311 = params(31)*y(38)^(1-params(65))+(1-params(31))*y(39)^(1-params(65));
T321 = params(11)^(params(66)-1);
T327 = params(33)*T321*(y(40)/y(43))^(-params(66));
T339 = T321*(1-params(33))*(y(44)*(1+x(21))/y(43))^(-params(66));
T342 = params(11)^(-1);
T345 = y(40)^(1-params(64));
T348 = (y(44)*(1+x(21)))^(1-params(66));
T359 = params(7)^(params(64)-1);
T363 = params(30)*T359*y(40)^(-params(64));
T374 = T359*(1-params(30))*(y(44)*(1+x(20)))^(-params(64));
T377 = params(7)^(-1);
T383 = T345*params(30)+(1-params(30))*(y(44)*(1-x(20)))^(1-params(64));
T403 = 1-(y(53)/y(49)-x(5))*y(30);
T408 = y(16)*y(60)+y(17)*y(61)+y(18)*y(62);
T417 = (-y(30))*(-x(5))/params(15);
T426 = (-(y(16)*(-y(60))))-y(17)*(-y(61))-y(18)*(-y(62));
T456 = 1-params(16)+y(23)/y(27)-params(15);
T458 = params(23)/2*T456^2;
T472 = 1-params(17)+y(24)/y(28)-params(15);
T474 = params(24)/2*T472^2;
T488 = 1-params(18)+y(25)/y(29)-params(15);
T490 = params(25)/2*T488^2;
T501 = (1-x(19))/(1+x(16));
T517 = y(43)*(1+x(17))/(1+x(16));
T529 = y(4)-(params(61)*y(19)^(1+params(22))+params(62)*y(20)^(1+params(22))+params(63)*y(21)^(1+params(22)))/(1+params(22));
T538 = params(14)/params(15);
T539 = T538/T529;
T542 = (1-x(18))/(1+x(16));
T550 = 1-params(16)-T458+y(23)*params(23)*T456/y(27);
T552 = y(57)*T542+T517/(1-params(23)*T456)*T550;
T570 = 1-params(16)-T474+y(24)*params(24)*T472/y(28);
T572 = y(58)*T542+T517/(1-params(24)*T472)*T570;
T590 = 1-params(18)-T490+y(25)*params(25)*T488/y(29);
T592 = y(59)*T542+T517/(1-params(25)*T488)*T590;
T597 = T538*(1-x(16))/(1+x(16));
T630 = params(26)/2*(1-params(19)+y(22)/y(26)-params(15))^2;
T739 = params(9)*y(10)^params(32);
T742 = y(11)^(1-params(32));
T784 = exp(params(39)*y(55)*(y(7)+y(8))/(y(37)*y(45))-params(20));
T796 = y(55)*y(7)*y(2)/(y(37)*y(45))/params(21);
T799 = T796^(-params(41));
T835 = y(9)*y(41)+y(42)*y(14)+params(29)*y(3)+(1-params(29))*y(4)+y(43)*(1-params(29))*(y(22)+y(25)+y(23)+y(24))-y(44)*y(31);
lhs =y(78);
rhs =T31*T38;
residual(1)= lhs-rhs;
lhs =y(79);
rhs =T50*T57;
residual(2)= lhs-rhs;
lhs =y(80);
rhs =T69*T76;
residual(3)= lhs-rhs;
lhs =y(57);
rhs =(y(46)-y(46)*(1+x(25))*(params(46)+params(49)+params(52))-params(55)*(1+x(22))*y(44))*y(78)*params(1)/((1-params(29))*y(27));
residual(4)= lhs-rhs;
lhs =y(58);
rhs =(y(47)-y(47)*(params(46)+params(49)+params(52))*(1+x(26))-y(44)*params(56)*(1+x(23)))*y(79)*params(2)/((1-params(29))*y(28));
residual(5)= lhs-rhs;
lhs =y(59);
rhs =(y(48)-y(48)*(params(46)+params(49)+params(52))*(1+x(27))-y(44)*params(57)*(1+x(24)))*y(80)*params(3)/((1-params(29))*y(29));
residual(6)= lhs-rhs;
lhs =y(60);
rhs =(y(46)-y(46)*(1+x(25))*(params(46)+params(49)+params(52))-params(55)*(1+x(22))*y(44))*y(78)*(1-params(1))/(params(29)*y(16)+(1-params(29))*y(16));
residual(7)= lhs-rhs;
lhs =y(61);
rhs =(y(47)-y(47)*(1+x(26))*(params(47)+params(50)+params(53))-y(44)*params(56)*(1+x(23)))*y(79)*(1-params(2))/(params(29)*y(17)+(1-params(29))*y(17));
residual(8)= lhs-rhs;
lhs =y(62);
rhs =(y(48)-(1+y(48)*x(27)*(params(48)+params(51)+params(54))-y(44)*params(57)*(1+x(24))))*y(80)*(1-params(3))/(params(29)*y(18)+(1-params(29))*y(18));
residual(9)= lhs-rhs;
lhs =y(63);
rhs =y(78)*params(46);
residual(10)= lhs-rhs;
lhs =y(64);
rhs =y(78)*params(47);
residual(11)= lhs-rhs;
lhs =y(65);
rhs =y(78)*params(48);
residual(12)= lhs-rhs;
lhs =y(66);
rhs =y(79)*params(49);
residual(13)= lhs-rhs;
lhs =y(67);
rhs =y(79)*params(50);
residual(14)= lhs-rhs;
lhs =y(68);
rhs =y(79)*params(51);
residual(15)= lhs-rhs;
lhs =y(69);
rhs =y(80)*params(52);
residual(16)= lhs-rhs;
lhs =y(70);
rhs =y(80)*params(53);
residual(17)= lhs-rhs;
lhs =y(71);
rhs =y(80)*params(54);
residual(18)= lhs-rhs;
lhs =y(32);
rhs =y(78)*params(55);
residual(19)= lhs-rhs;
lhs =y(33);
rhs =y(79)*params(56);
residual(20)= lhs-rhs;
lhs =y(34);
rhs =y(80)*params(57);
residual(21)= lhs-rhs;
lhs =y(48);
rhs =x(11)*y(55);
residual(22)= lhs-rhs;
lhs =y(46);
rhs =T236*y(38);
residual(23)= lhs-rhs;
lhs =y(47);
rhs =T254*y(39);
residual(24)= lhs-rhs;
lhs =y(44);
rhs =y(55)*T274*x(13);
residual(25)= lhs-rhs;
lhs =y(50);
rhs =y(49);
residual(26)= lhs-rhs;
lhs =y(51);
rhs =y(49);
residual(27)= lhs-rhs;
lhs =y(52);
rhs =y(49);
residual(28)= lhs-rhs;
lhs =y(81);
rhs =T293*y(73);
residual(29)= lhs-rhs;
lhs =y(82);
rhs =y(73)*T302;
residual(30)= lhs-rhs;
lhs =y(40);
rhs =T305*T311^(1/(1-params(65)));
residual(31)= lhs-rhs;
lhs =y(6);
rhs =T327*y(75);
residual(32)= lhs-rhs;
lhs =y(36);
rhs =y(75)*T339;
residual(33)= lhs-rhs;
lhs =y(43);
rhs =T342*(params(33)*T345+(1-params(33))*(T348)^(1/(1-params(66))));
residual(34)= lhs-rhs;
lhs =y(5);
rhs =T363*y(72);
residual(35)= lhs-rhs;
lhs =y(35);
rhs =y(72)*T374;
residual(36)= lhs-rhs;
lhs =1;
rhs =T377*T383^(1/(1-params(64)));
residual(37)= lhs-rhs;
lhs =y(74);
rhs =params(10)*y(83);
residual(38)= lhs-rhs;
lhs =y(42);
rhs =y(39)/params(10);
residual(39)= lhs-rhs;
lhs =y(3);
rhs =T403*T408+x(28);
residual(40)= lhs-rhs;
lhs =y(30);
rhs =T417*T426/T408;
residual(41)= lhs-rhs;
lhs =params(58)*y(16)^params(22);
rhs =y(60)*T403;
residual(42)= lhs-rhs;
lhs =params(59)*y(17)^params(22);
rhs =y(61)*T403;
residual(43)= lhs-rhs;
lhs =params(60)*y(18)^params(22);
rhs =y(62)*T403;
residual(44)= lhs-rhs;
lhs =y(27)*params(15);
rhs =y(27)*(1-params(16))+y(23)-y(27)*T458;
residual(45)= lhs-rhs;
lhs =y(28)*params(15);
rhs =y(28)*(1-params(17))+y(24)-y(28)*T474;
residual(46)= lhs-rhs;
lhs =y(29)*params(15);
rhs =y(29)*(1-params(18))+y(25)-y(29)*T490;
residual(47)= lhs-rhs;
lhs =params(61)*y(19)^params(22);
rhs =y(60)*T501;
residual(48)= lhs-rhs;
lhs =params(62)*y(20)^params(22);
rhs =y(61)*T501;
residual(49)= lhs-rhs;
lhs =params(63)*y(21)^params(22);
rhs =y(62)*T501;
residual(50)= lhs-rhs;
lhs =T517/(T529*(1-params(23)*T456));
rhs =T539*T552;
residual(51)= lhs-rhs;
lhs =T517/(T529*(1-params(24)*T472));
rhs =T539*T572;
residual(52)= lhs-rhs;
lhs =T517/(T529*(1-params(25)*T488));
rhs =T539*T592;
residual(53)= lhs-rhs;
lhs =1;
rhs =y(55)*T597*y(54)/x(12)/y(55);
residual(54)= lhs-rhs;
lhs =1;
rhs =y(53)*T597/y(49);
residual(55)= lhs-rhs;
lhs =y(84);
rhs =((1+x(16))*T529)^(-1);
residual(56)= lhs-rhs;
lhs =y(43)*y(22);
rhs =x(8)*y(37)*y(45);
residual(57)= lhs-rhs;
lhs =y(26)*params(15);
rhs =y(22)+y(26)*(1-params(19))-y(26)*T630;
residual(58)= lhs-rhs;
lhs =y(42)*y(14);
rhs =y(45)*y(37)*y(15);
residual(59)= lhs-rhs;
lhs =params(15)*y(2);
rhs =x(7)*y(12);
residual(60)= lhs-rhs;
lhs =y(55)*params(15)*y(7);
rhs =y(12)*(1-x(7));
residual(61)= lhs-rhs;
lhs =y(12);
rhs =x(28)+y(43)*y(22)+y(42)*y(14)+y(55)*y(7)*y(54)/x(12)+y(53)/y(49)*y(2)+x(29)-y(4)*(1-params(29))*x(16)-(1-params(29))*y(43)*x(17)*(y(25)+y(23)+y(24))-(1-params(29))*x(19)*(y(19)*y(60)+y(20)*y(61)+y(21)*y(62))-(1-params(29))*x(18)*(y(27)*y(57)+y(28)*y(58)+y(29)*y(59))-y(44)*(x(22)*y(32)+x(23)*y(33)+x(24)*y(34)+y(35)*x(20)+y(36)*x(21))-x(25)*(y(46)*y(63)+y(47)*y(66)+y(48)*y(69))+x(26)*(y(46)*y(64)+y(47)*y(67)+y(48)*y(70))+x(27)*(y(46)*y(65)+y(47)*y(68)+y(46)*y(71))-y(29)*(1-params(29))*y(59)*x(30);
residual(62)= lhs-rhs;
lhs =y(10);
rhs =params(13)*(1/y(55))^(-params(42))*x(31);
residual(63)= lhs-rhs;
lhs =y(9);
rhs =T739*T742;
residual(64)= lhs-rhs;
lhs =y(41);
rhs =(x(11)/y(55))^(1-params(32));
residual(65)= lhs-rhs;
lhs =y(31);
rhs =y(36)+y(32)+y(35)+y(36)+y(33)+y(35)+y(36)+y(34)+y(35);
residual(66)= lhs-rhs;
lhs =y(1);
rhs =y(10)+y(55)*x(11)*y(11)-y(44)*(y(36)+y(32)+y(35))-y(44)*(y(36)+y(33)+y(35))-y(44)*(y(36)+y(34)+y(35));
residual(67)= lhs-rhs;
lhs =y(56);
rhs =y(41)/y(44);
residual(68)= lhs-rhs;
lhs =y(54);
rhs =x(14)*params(12)*T784;
residual(69)= lhs-rhs;
lhs =y(15);
rhs =x(9)*x(6)+y(15)*(1-x(9))*T799;
residual(70)= lhs-rhs;
lhs =y(53);
rhs =x(10)*x(15)+(1-x(10))*(y(53)*(1-params(40))+y(53)*params(40));
residual(71)= lhs-rhs;
lhs =y(37)*y(45);
rhs =y(42)*y(14)+params(29)*y(3)+(1-params(29))*y(4)+y(43)*(y(22)+(1-params(29))*(y(25)+y(23)+y(24)))+y(9)*y(41)-y(44)*y(31);
residual(72)= lhs-rhs;
lhs =y(13);
rhs =params(15)*(y(42)*y(14)+params(29)*y(3)+(1-params(29))*y(4)+y(43)*(y(22)+(1-params(29))*(y(25)+y(23)+y(24)))+y(9)*y(41)-y(44)*y(31)/T835);
residual(73)= lhs-rhs;
lhs =y(37);
rhs =y(37)*y(13)/params(15);
residual(74)= lhs-rhs;
lhs =y(72);
rhs =y(10)+params(29)*y(3)+(1-params(29))*y(4)+y(35)*y(44)*x(20);
residual(75)= lhs-rhs;
lhs =y(75);
rhs =y(22)+(1-params(29))*(y(25)+y(23)+y(24))+y(36)*x(21)*y(44)/y(43);
residual(76)= lhs-rhs;
lhs =y(74);
rhs =y(14);
residual(77)= lhs-rhs;
lhs =y(78);
rhs =y(76)+y(65)+y(63)+y(64);
residual(78)= lhs-rhs;
lhs =y(79);
rhs =y(77)+y(68)+y(66)+y(67);
residual(79)= lhs-rhs;
lhs =y(80);
rhs =y(11)+y(71)+y(69)+y(70);
residual(80)= lhs-rhs;
lhs =y(73);
rhs =y(6)+y(5);
residual(81)= lhs-rhs;
lhs =y(76);
rhs =y(38)*y(81);
residual(82)= lhs-rhs;
lhs =y(77);
rhs =y(39)*(y(82)+y(83));
residual(83)= lhs-rhs;
lhs =y(55)*params(15)*(y(7)+y(8));
rhs =y(9)*y(41)+y(44)*y(31)+y(55)*y(54)/x(12)*(y(7)+y(8));
residual(84)= lhs-rhs;
lhs =y(85);
rhs =y(27);
residual(85)= lhs-rhs;
lhs =y(86);
rhs =y(28);
residual(86)= lhs-rhs;
lhs =y(87);
rhs =y(29);
residual(87)= lhs-rhs;
if ~isreal(residual)
  residual = real(residual)+imag(residual).^2;
end
if nargout >= 2,
  g1 = zeros(87, 87);

  %
  % Jacobian matrix
  %

T920 = getPowerDeriv(T796,(-params(41)),1);
T934 = T529*(1-params(23)*T456)*T529*(1-params(23)*T456);
T943 = T529*(1-params(24)*T472)*T529*(1-params(24)*T472);
T949 = T529*(1-params(25)*T488)*T529*(1-params(25)*T488);
T953 = getPowerDeriv((1+x(16))*T529,(-1),1);
T971 = (-(x(14)*params(12)*T784*params(39)*y(55)/(y(37)*y(45))));
T1008 = getPowerDeriv(params(29)*y(16)+(1-params(29))*y(19),1-params(1),1);
T1028 = getPowerDeriv(params(29)*y(17)+(1-params(29))*y(20),1-params(2),1);
T1046 = getPowerDeriv(params(29)*y(18)+(1-params(29))*y(21),1-params(3),1);
T1072 = (-(params(61)*getPowerDeriv(y(19),1+params(22),1)/(1+params(22))));
T1079 = (-(T538*T1072))/(T529*T529);
T1107 = (-(params(62)*getPowerDeriv(y(20),1+params(22),1)/(1+params(22))));
T1114 = (-(T538*T1107))/(T529*T529);
T1142 = (-(params(63)*getPowerDeriv(y(21),1+params(22),1)/(1+params(22))));
T1149 = (-(T538*T1142))/(T529*T529);
T1187 = params(23)/2*1/y(27)*2*T456;
T1215 = (-(params(15)*((1-params(29))*y(43)-(-(y(44)*y(31)*(1-params(29))*y(43)))/(T835*T835))));
T1219 = params(24)/2*1/y(28)*2*T472;
T1246 = params(25)/2*1/y(29)*2*T488;
T1271 = getPowerDeriv(y(26)/T24,params(27),1);
T1294 = getPowerDeriv((1-params(29))*y(27)+y(28)+y(29),params(44),1);
T1300 = T1271*(-(y(26)*(1-params(29))*T1294))/(T24*T24);
T1326 = params(23)/2*2*T456*(-y(23))/(y(27)*y(27));
T1356 = T1271*(-(y(26)*T1294))/(T24*T24);
T1360 = (-(T38*T30*x(2)*x(1)*params(4)*T1356));
T1382 = params(24)/2*2*T472*(-y(24))/(y(28)*y(28));
T1426 = params(25)/2*2*T488*(-y(25))/(y(29)*y(29));
T1455 = (-(y(53)/y(49)-x(5)));
T1513 = getPowerDeriv(y(38)/y(40),(-params(65)),1);
T1520 = getPowerDeriv(T311,1/(1-params(65)),1);
T1526 = getPowerDeriv(y(39)/y(40),(-params(65)),1);
T1553 = getPowerDeriv(y(40)/y(43),(-params(66)),1);
T1558 = getPowerDeriv(y(40),1-params(64),1);
T1567 = getPowerDeriv(T383,1/(1-params(64)),1);
T1596 = getPowerDeriv(y(44)*(1+x(21))/y(43),(-params(66)),1);
T1601 = (1+x(17))/(1+x(16));
T1758 = (-y(50))/(y(49)*y(49));
T1771 = getPowerDeriv(T235,(-1),1);
T1776 = (-y(51))/(y(49)*y(49));
T1789 = getPowerDeriv(T253,(-1),1);
T1812 = getPowerDeriv(T273,(-1),1);
T1820 = (-(y(30)*(-y(53))/(y(49)*y(49))));
T1834 = 1/y(49);
  g1(1,16)=(-(T31*params(29)*T1008));
  g1(1,19)=(-(T31*(1-params(29))*T1008));
  g1(1,26)=(-(T38*T30*x(2)*x(1)*params(4)*1/T24*T1271));
  g1(1,27)=(-(T38*(T30*x(2)*x(1)*params(4)*T1300+x(2)*x(1)*params(4)*T27*(1-params(29))*getPowerDeriv((1-params(29))*y(27),params(1),1))));
  g1(1,28)=T1360;
  g1(1,29)=T1360;
  g1(1,78)=1;
  g1(2,17)=(-(T50*params(29)*T1028));
  g1(2,20)=(-(T50*(1-params(29))*T1028));
  g1(2,26)=(-(T57*T49*x(1)*x(3)*params(5)*1/T24*T1271));
  g1(2,27)=(-(T57*T49*x(1)*x(3)*params(5)*T1300));
  g1(2,28)=(-(T57*(T49*x(1)*x(3)*params(5)*T1356+T27*x(1)*x(3)*params(5)*(1-params(29))*getPowerDeriv((1-params(29))*y(28),params(2),1))));
  g1(2,29)=(-(T57*T49*x(1)*x(3)*params(5)*T1356));
  g1(2,79)=1;
  g1(3,18)=(-(T69*params(29)*T1046));
  g1(3,21)=(-(T69*(1-params(29))*T1046));
  g1(3,26)=(-(T76*T68*x(1)*x(4)*params(6)*1/T24*T1271));
  g1(3,27)=(-(T76*T68*x(1)*x(4)*params(6)*T1300));
  g1(3,28)=(-(T76*T68*x(1)*x(4)*params(6)*T1356));
  g1(3,29)=(-(T76*(T68*x(1)*x(4)*params(6)*T1356+T27*x(1)*x(4)*params(6)*(1-params(29))*getPowerDeriv((1-params(29))*y(29),params(3),1))));
  g1(3,80)=1;
  g1(4,27)=(-((-((1-params(29))*(y(46)-y(46)*(1+x(25))*(params(46)+params(49)+params(52))-params(55)*(1+x(22))*y(44))*y(78)*params(1)))/((1-params(29))*y(27)*(1-params(29))*y(27))));
  g1(4,44)=(-(y(78)*params(1)*(-(params(55)*(1+x(22))))/((1-params(29))*y(27))));
  g1(4,46)=(-(y(78)*params(1)*(1-(1+x(25))*(params(46)+params(49)+params(52)))/((1-params(29))*y(27))));
  g1(4,57)=1;
  g1(4,78)=(-(params(1)*(y(46)-y(46)*(1+x(25))*(params(46)+params(49)+params(52))-params(55)*(1+x(22))*y(44))/((1-params(29))*y(27))));
  g1(5,28)=(-((-((1-params(29))*(y(47)-y(47)*(params(46)+params(49)+params(52))*(1+x(26))-y(44)*params(56)*(1+x(23)))*y(79)*params(2)))/((1-params(29))*y(28)*(1-params(29))*y(28))));
  g1(5,44)=(-(y(79)*params(2)*(-(params(56)*(1+x(23))))/((1-params(29))*y(28))));
  g1(5,47)=(-(y(79)*params(2)*(1-(params(46)+params(49)+params(52))*(1+x(26)))/((1-params(29))*y(28))));
  g1(5,58)=1;
  g1(5,79)=(-(params(2)*(y(47)-y(47)*(params(46)+params(49)+params(52))*(1+x(26))-y(44)*params(56)*(1+x(23)))/((1-params(29))*y(28))));
  g1(6,29)=(-((-((1-params(29))*(y(48)-y(48)*(params(46)+params(49)+params(52))*(1+x(27))-y(44)*params(57)*(1+x(24)))*y(80)*params(3)))/((1-params(29))*y(29)*(1-params(29))*y(29))));
  g1(6,44)=(-(y(80)*params(3)*(-(params(57)*(1+x(24))))/((1-params(29))*y(29))));
  g1(6,48)=(-(y(80)*params(3)*(1-(params(46)+params(49)+params(52))*(1+x(27)))/((1-params(29))*y(29))));
  g1(6,59)=1;
  g1(6,80)=(-(params(3)*(y(48)-y(48)*(params(46)+params(49)+params(52))*(1+x(27))-y(44)*params(57)*(1+x(24)))/((1-params(29))*y(29))));
  g1(7,16)=(-((-((y(46)-y(46)*(1+x(25))*(params(46)+params(49)+params(52))-params(55)*(1+x(22))*y(44))*y(78)*(1-params(1))*(params(29)+1-params(29))))/((params(29)*y(16)+(1-params(29))*y(16))*(params(29)*y(16)+(1-params(29))*y(16)))));
  g1(7,44)=(-(y(78)*(1-params(1))*(-(params(55)*(1+x(22))))/(params(29)*y(16)+(1-params(29))*y(16))));
  g1(7,46)=(-(y(78)*(1-params(1))*(1-(1+x(25))*(params(46)+params(49)+params(52)))/(params(29)*y(16)+(1-params(29))*y(16))));
  g1(7,60)=1;
  g1(7,78)=(-((1-params(1))*(y(46)-y(46)*(1+x(25))*(params(46)+params(49)+params(52))-params(55)*(1+x(22))*y(44))/(params(29)*y(16)+(1-params(29))*y(16))));
  g1(8,17)=(-((-((y(47)-y(47)*(1+x(26))*(params(47)+params(50)+params(53))-y(44)*params(56)*(1+x(23)))*y(79)*(1-params(2))*(params(29)+1-params(29))))/((params(29)*y(17)+(1-params(29))*y(17))*(params(29)*y(17)+(1-params(29))*y(17)))));
  g1(8,44)=(-(y(79)*(1-params(2))*(-(params(56)*(1+x(23))))/(params(29)*y(17)+(1-params(29))*y(17))));
  g1(8,47)=(-(y(79)*(1-params(2))*(1-(1+x(26))*(params(47)+params(50)+params(53)))/(params(29)*y(17)+(1-params(29))*y(17))));
  g1(8,61)=1;
  g1(8,79)=(-((1-params(2))*(y(47)-y(47)*(1+x(26))*(params(47)+params(50)+params(53))-y(44)*params(56)*(1+x(23)))/(params(29)*y(17)+(1-params(29))*y(17))));
  g1(9,18)=(-((-((y(48)-(1+y(48)*x(27)*(params(48)+params(51)+params(54))-y(44)*params(57)*(1+x(24))))*y(80)*(1-params(3))*(params(29)+1-params(29))))/((params(29)*y(18)+(1-params(29))*y(18))*(params(29)*y(18)+(1-params(29))*y(18)))));
  g1(9,44)=(-(params(57)*(1+x(24))*y(80)*(1-params(3))/(params(29)*y(18)+(1-params(29))*y(18))));
  g1(9,48)=(-(y(80)*(1-params(3))*(1-x(27)*(params(48)+params(51)+params(54)))/(params(29)*y(18)+(1-params(29))*y(18))));
  g1(9,62)=1;
  g1(9,80)=(-((1-params(3))*(y(48)-(1+y(48)*x(27)*(params(48)+params(51)+params(54))-y(44)*params(57)*(1+x(24))))/(params(29)*y(18)+(1-params(29))*y(18))));
  g1(10,63)=1;
  g1(10,78)=(-params(46));
  g1(11,64)=1;
  g1(11,78)=(-params(47));
  g1(12,65)=1;
  g1(12,78)=(-params(48));
  g1(13,66)=1;
  g1(13,79)=(-params(49));
  g1(14,67)=1;
  g1(14,79)=(-params(50));
  g1(15,68)=1;
  g1(15,79)=(-params(51));
  g1(16,69)=1;
  g1(16,80)=(-params(52));
  g1(17,70)=1;
  g1(17,80)=(-params(53));
  g1(18,71)=1;
  g1(18,80)=(-params(54));
  g1(19,32)=1;
  g1(19,78)=(-params(55));
  g1(20,33)=1;
  g1(20,79)=(-params(56));
  g1(21,34)=1;
  g1(21,80)=(-params(57));
  g1(22,48)=1;
  g1(22,55)=(-x(11));
  g1(23,38)=(-T236);
  g1(23,46)=1;
  g1(23,49)=(-(y(38)*(T223*(T221-1)*T1758+T221*T223*T1758-(T221*(T221-1)*T223*params(14)*T1758+T221*((T221-1)*T223*params(14)*T1758+T221*T223*params(14)*T1758)))*T1771));
  g1(23,50)=(-(y(38)*T1771*(T223*(T221-1)*T1834+T221*T223*T1834-(T221*(T221-1)*T223*params(14)*T1834+T221*((T221-1)*T223*params(14)*T1834+T221*T223*params(14)*T1834)))));
  g1(24,39)=(-T254);
  g1(24,47)=1;
  g1(24,49)=(-(y(39)*(T243*(T241-1)*T1776+T241*T243*T1776-(T241*(T241-1)*params(14)*T243*T1776+T241*((T241-1)*params(14)*T243*T1776+T241*params(14)*T243*T1776)))*T1789));
  g1(24,51)=(-(y(39)*T1789*(T243*(T241-1)*T1834+T241*T243*T1834-(T241*(T241-1)*params(14)*T243*T1834+T241*((T241-1)*params(14)*T243*T1834+T241*params(14)*T243*T1834)))));
  g1(25,44)=1;
  g1(25,49)=(-(x(13)*y(55)*(T270*(-y(52))/(y(49)*y(49))+T261*(y(49)*y(52)*(T267*(-y(52))/(y(49)*y(49))+(T261-1)*T260*params(14)*(y(49)*y(52)*T260*(-y(52))/(y(49)*y(49))-y(52)*T260*(T261-1))/(y(49)*y(49)))-y(52)*(T261-1)*T267)/(y(49)*y(49)))*T1812));
  g1(25,52)=(-(x(13)*y(55)*T1812*(T270*T1834+T261*((T261-1)*T267+y(52)*(T267*T1834+(T261-1)*T260*params(14)*(T260*(T261-1)+y(52)*T260*T1834)/y(49)))/y(49))));
  g1(25,55)=(-(T274*x(13)));
  g1(26,49)=(-1);
  g1(26,50)=1;
  g1(27,49)=(-1);
  g1(27,51)=1;
  g1(28,49)=(-1);
  g1(28,52)=1;
  g1(29,38)=(-(y(73)*params(31)*T287*1/y(40)*T1513));
  g1(29,40)=(-(y(73)*params(31)*T287*T1513*(-y(38))/(y(40)*y(40))));
  g1(29,73)=(-T293);
  g1(29,81)=1;
  g1(30,39)=(-(y(73)*T287*(1-params(31))*1/y(40)*T1526));
  g1(30,40)=(-(y(73)*T287*(1-params(31))*T1526*(-y(39))/(y(40)*y(40))));
  g1(30,73)=(-T302);
  g1(30,82)=1;
  g1(31,38)=(-(T305*params(31)*getPowerDeriv(y(38),1-params(65),1)*T1520));
  g1(31,39)=(-(T305*T1520*(1-params(31))*getPowerDeriv(y(39),1-params(65),1)));
  g1(31,40)=1;
  g1(32,6)=1;
  g1(32,40)=(-(y(75)*params(33)*T321*1/y(43)*T1553));
  g1(32,43)=(-(y(75)*params(33)*T321*T1553*(-y(40))/(y(43)*y(43))));
  g1(32,75)=(-T327);
  g1(33,36)=1;
  g1(33,43)=(-(y(75)*T321*(1-params(33))*(-(y(44)*(1+x(21))))/(y(43)*y(43))*T1596));
  g1(33,44)=(-(y(75)*T321*(1-params(33))*T1596*(1+x(21))/y(43)));
  g1(33,75)=(-T339);
  g1(34,40)=(-(T342*params(33)*T1558));
  g1(34,43)=1;
  g1(34,44)=(-(T342*(1-params(33))*(1+x(21))*getPowerDeriv(y(44)*(1+x(21)),1-params(66),1)*getPowerDeriv(T348,1/(1-params(66)),1)));
  g1(35,5)=1;
  g1(35,40)=(-(y(72)*params(30)*T359*getPowerDeriv(y(40),(-params(64)),1)));
  g1(35,72)=(-T363);
  g1(36,35)=1;
  g1(36,44)=(-(y(72)*T359*(1-params(30))*(1+x(20))*getPowerDeriv(y(44)*(1+x(20)),(-params(64)),1)));
  g1(36,72)=(-T374);
  g1(37,40)=(-(T377*params(30)*T1558*T1567));
  g1(37,44)=(-(T377*T1567*(1-params(30))*(1-x(20))*getPowerDeriv(y(44)*(1-x(20)),1-params(64),1)));
  g1(38,74)=1;
  g1(38,83)=(-params(10));
  g1(39,39)=(-(1/params(10)));
  g1(39,42)=1;
  g1(40,3)=1;
  g1(40,16)=(-(y(60)*T403));
  g1(40,17)=(-(y(61)*T403));
  g1(40,18)=(-(y(62)*T403));
  g1(40,30)=(-(T408*T1455));
  g1(40,49)=(-(T408*T1820));
  g1(40,53)=(-(T408*(-(y(30)*T1834))));
  g1(40,60)=(-(y(16)*T403));
  g1(40,61)=(-(y(17)*T403));
  g1(40,62)=(-(y(18)*T403));
  g1(41,16)=(-(T417*(y(60)*T408-y(60)*T426)/(T408*T408)));
  g1(41,17)=(-(T417*(y(61)*T408-y(61)*T426)/(T408*T408)));
  g1(41,18)=(-(T417*(y(62)*T408-y(62)*T426)/(T408*T408)));
  g1(41,30)=1-T426/T408*(-((-x(5))/params(15)));
  g1(41,60)=(-(T417*(y(16)*T408-y(16)*T426)/(T408*T408)));
  g1(41,61)=(-(T417*(y(17)*T408-y(17)*T426)/(T408*T408)));
  g1(41,62)=(-(T417*(y(18)*T408-y(18)*T426)/(T408*T408)));
  g1(42,16)=params(58)*getPowerDeriv(y(16),params(22),1);
  g1(42,30)=(-(y(60)*T1455));
  g1(42,49)=(-(y(60)*T1820));
  g1(42,53)=(-(y(60)*(-(y(30)*T1834))));
  g1(42,60)=(-T403);
  g1(43,17)=params(59)*getPowerDeriv(y(17),params(22),1);
  g1(43,30)=(-(y(61)*T1455));
  g1(43,49)=(-(y(61)*T1820));
  g1(43,53)=(-(y(61)*(-(y(30)*T1834))));
  g1(43,61)=(-T403);
  g1(44,18)=params(60)*getPowerDeriv(y(18),params(22),1);
  g1(44,30)=(-(y(62)*T1455));
  g1(44,49)=(-(y(62)*T1820));
  g1(44,53)=(-(y(62)*(-(y(30)*T1834))));
  g1(44,62)=(-T403);
  g1(45,23)=(-(1-y(27)*T1187));
  g1(45,27)=params(15)-(1-params(16)-(T458+y(27)*T1326));
  g1(46,24)=(-(1-y(28)*T1219));
  g1(46,28)=params(15)-(1-params(17)-(T474+y(28)*T1382));
  g1(47,25)=(-(1-y(29)*T1246));
  g1(47,29)=params(15)-(1-params(18)-(T490+y(29)*T1426));
  g1(48,19)=params(61)*getPowerDeriv(y(19),params(22),1);
  g1(48,60)=(-T501);
  g1(49,20)=params(62)*getPowerDeriv(y(20),params(22),1);
  g1(49,61)=(-T501);
  g1(50,21)=params(63)*getPowerDeriv(y(21),params(22),1);
  g1(50,62)=(-T501);
  g1(51,4)=(-(T517*(1-params(23)*T456)))/T934-T552*(-T538)/(T529*T529);
  g1(51,19)=(-(T517*(1-params(23)*T456)*T1072))/T934-T552*T1079;
  g1(51,20)=(-(T517*(1-params(23)*T456)*T1107))/T934-T552*T1114;
  g1(51,21)=(-(T517*(1-params(23)*T456)*T1142))/T934-T552*T1149;
  g1(51,23)=(-(T517*T529*(-(params(23)*1/y(27)))))/T934-T539*(T550*(-(T517*(-(params(23)*1/y(27)))))/((1-params(23)*T456)*(1-params(23)*T456))+T517/(1-params(23)*T456)*((-T1187)+(params(23)*T456+y(23)*params(23)*1/y(27))/y(27)));
  g1(51,27)=(-(T517*T529*(-(params(23)*(-y(23))/(y(27)*y(27))))))/T934-T539*(T550*(-(T517*(-(params(23)*(-y(23))/(y(27)*y(27))))))/((1-params(23)*T456)*(1-params(23)*T456))+T517/(1-params(23)*T456)*((-T1326)+(y(27)*y(23)*params(23)*(-y(23))/(y(27)*y(27))-y(23)*params(23)*T456)/(y(27)*y(27))));
  g1(51,43)=T1601/(T529*(1-params(23)*T456))-T539*T550*T1601/(1-params(23)*T456);
  g1(51,57)=(-(T539*T542));
  g1(52,4)=(-(T517*(1-params(24)*T472)))/T943-T572*(-T538)/(T529*T529);
  g1(52,19)=(-(T517*(1-params(24)*T472)*T1072))/T943-T572*T1079;
  g1(52,20)=(-(T517*(1-params(24)*T472)*T1107))/T943-T572*T1114;
  g1(52,21)=(-(T517*(1-params(24)*T472)*T1142))/T943-T572*T1149;
  g1(52,24)=(-(T517*T529*(-(params(24)*1/y(28)))))/T943-T539*(T570*(-(T517*(-(params(24)*1/y(28)))))/((1-params(24)*T472)*(1-params(24)*T472))+T517/(1-params(24)*T472)*((-T1219)+(params(24)*T472+y(24)*params(24)*1/y(28))/y(28)));
  g1(52,28)=(-(T517*T529*(-(params(24)*(-y(24))/(y(28)*y(28))))))/T943-T539*(T570*(-(T517*(-(params(24)*(-y(24))/(y(28)*y(28))))))/((1-params(24)*T472)*(1-params(24)*T472))+T517/(1-params(24)*T472)*((-T1382)+(y(28)*y(24)*params(24)*(-y(24))/(y(28)*y(28))-y(24)*params(24)*T472)/(y(28)*y(28))));
  g1(52,43)=T1601/(T529*(1-params(24)*T472))-T539*T570*T1601/(1-params(24)*T472);
  g1(52,58)=(-(T539*T542));
  g1(53,4)=(-(T517*(1-params(25)*T488)))/T949-T592*(-T538)/(T529*T529);
  g1(53,19)=(-(T517*(1-params(25)*T488)*T1072))/T949-T592*T1079;
  g1(53,20)=(-(T517*(1-params(25)*T488)*T1107))/T949-T592*T1114;
  g1(53,21)=(-(T517*(1-params(25)*T488)*T1142))/T949-T592*T1149;
  g1(53,25)=(-(T517*T529*(-(params(25)*1/y(29)))))/T949-T539*(T590*(-(T517*(-(params(25)*1/y(29)))))/((1-params(25)*T488)*(1-params(25)*T488))+T517/(1-params(25)*T488)*((-T1246)+(params(25)*T488+y(25)*params(25)*1/y(29))/y(29)));
  g1(53,29)=(-(T517*T529*(-(params(25)*(-y(25))/(y(29)*y(29))))))/T949-T539*(T590*(-(T517*(-(params(25)*(-y(25))/(y(29)*y(29))))))/((1-params(25)*T488)*(1-params(25)*T488))+T517/(1-params(25)*T488)*((-T1426)+(y(29)*y(25)*params(25)*(-y(25))/(y(29)*y(29))-y(25)*params(25)*T488)/(y(29)*y(29))));
  g1(53,43)=T1601/(T529*(1-params(25)*T488))-T539*T590*T1601/(1-params(25)*T488);
  g1(53,59)=(-(T539*T542));
  g1(54,54)=(-(y(55)*T597/x(12)/y(55)));
  g1(55,49)=(-((-(y(53)*T597))/(y(49)*y(49))));
  g1(55,53)=(-(T597/y(49)));
  g1(56,4)=(-((1+x(16))*T953));
  g1(56,19)=(-(T953*(1+x(16))*T1072));
  g1(56,20)=(-(T953*(1+x(16))*T1107));
  g1(56,21)=(-(T953*(1+x(16))*T1142));
  g1(56,84)=1;
  g1(57,22)=y(43);
  g1(57,37)=(-(x(8)*y(45)));
  g1(57,43)=y(22);
  g1(57,45)=(-(x(8)*y(37)));
  g1(58,22)=(-(1-y(26)*params(26)/2*1/y(26)*2*(1-params(19)+y(22)/y(26)-params(15))));
  g1(58,26)=params(15)-(1-params(19)-(T630+y(26)*params(26)/2*2*(1-params(19)+y(22)/y(26)-params(15))*(-y(22))/(y(26)*y(26))));
  g1(59,14)=y(42);
  g1(59,15)=(-(y(37)*y(45)));
  g1(59,37)=(-(y(45)*y(15)));
  g1(59,42)=y(14);
  g1(59,45)=(-(y(37)*y(15)));
  g1(60,2)=params(15);
  g1(60,12)=(-x(7));
  g1(61,7)=y(55)*params(15);
  g1(61,12)=(-(1-x(7)));
  g1(61,55)=params(15)*y(7);
  g1(62,2)=(-(y(53)/y(49)));
  g1(62,4)=(1-params(29))*x(16);
  g1(62,7)=(-(y(55)*y(54)/x(12)));
  g1(62,12)=1;
  g1(62,14)=(-y(42));
  g1(62,19)=y(60)*(1-params(29))*x(19);
  g1(62,20)=y(61)*(1-params(29))*x(19);
  g1(62,21)=y(62)*(1-params(29))*x(19);
  g1(62,22)=(-y(43));
  g1(62,23)=(1-params(29))*y(43)*x(17);
  g1(62,24)=(1-params(29))*y(43)*x(17);
  g1(62,25)=(1-params(29))*y(43)*x(17);
  g1(62,27)=y(57)*(1-params(29))*x(18);
  g1(62,28)=y(58)*(1-params(29))*x(18);
  g1(62,29)=(-((-(y(59)*(1-params(29))*x(18)))-(1-params(29))*y(59)*x(30)));
  g1(62,32)=x(22)*y(44);
  g1(62,33)=y(44)*x(23);
  g1(62,34)=y(44)*x(24);
  g1(62,35)=y(44)*x(20);
  g1(62,36)=y(44)*x(21);
  g1(62,42)=(-y(14));
  g1(62,43)=(-(y(22)-(y(25)+y(23)+y(24))*(1-params(29))*x(17)));
  g1(62,44)=x(22)*y(32)+x(23)*y(33)+x(24)*y(34)+y(35)*x(20)+y(36)*x(21);
  g1(62,46)=(-((-(x(25)*y(63)))+x(26)*y(64)+x(27)*(y(65)+y(71))));
  g1(62,47)=(-((-(x(25)*y(66)))+x(26)*y(67)+x(27)*y(68)));
  g1(62,48)=(-((-(x(25)*y(69)))+x(26)*y(70)));
  g1(62,49)=(-(y(2)*(-y(53))/(y(49)*y(49))));
  g1(62,53)=(-(y(2)*T1834));
  g1(62,54)=(-(y(55)*y(7)*1/x(12)));
  g1(62,55)=(-(y(7)*y(54)/x(12)));
  g1(62,57)=y(27)*(1-params(29))*x(18);
  g1(62,58)=y(28)*(1-params(29))*x(18);
  g1(62,59)=(-((-(y(29)*(1-params(29))*x(18)))-y(29)*(1-params(29))*x(30)));
  g1(62,60)=y(19)*(1-params(29))*x(19);
  g1(62,61)=y(20)*(1-params(29))*x(19);
  g1(62,62)=y(21)*(1-params(29))*x(19);
  g1(62,63)=y(46)*x(25);
  g1(62,64)=(-(y(46)*x(26)));
  g1(62,65)=(-(y(46)*x(27)));
  g1(62,66)=x(25)*y(47);
  g1(62,67)=(-(y(47)*x(26)));
  g1(62,68)=(-(y(47)*x(27)));
  g1(62,69)=x(25)*y(48);
  g1(62,70)=(-(x(26)*y(48)));
  g1(62,71)=(-(y(46)*x(27)));
  g1(63,10)=1;
  g1(63,55)=(-(x(31)*params(13)*(-1)/(y(55)*y(55))*getPowerDeriv(1/y(55),(-params(42)),1)));
  g1(64,9)=1;
  g1(64,10)=(-(T742*params(9)*getPowerDeriv(y(10),params(32),1)));
  g1(64,11)=(-(T739*getPowerDeriv(y(11),1-params(32),1)));
  g1(65,41)=1;
  g1(65,55)=(-((-x(11))/(y(55)*y(55))*getPowerDeriv(x(11)/y(55),1-params(32),1)));
  g1(66,31)=1;
  g1(66,32)=(-1);
  g1(66,33)=(-1);
  g1(66,34)=(-1);
  g1(66,35)=(-3);
  g1(66,36)=(-3);
  g1(67,1)=1;
  g1(67,10)=(-1);
  g1(67,11)=(-(x(11)*y(55)));
  g1(67,32)=y(44);
  g1(67,33)=y(44);
  g1(67,34)=y(44);
  g1(67,35)=(-((-y(44))-y(44)-y(44)));
  g1(67,36)=(-((-y(44))-y(44)-y(44)));
  g1(67,44)=(-((-(y(36)+y(32)+y(35)))-(y(36)+y(33)+y(35))-(y(36)+y(34)+y(35))));
  g1(67,55)=(-(x(11)*y(11)));
  g1(68,41)=(-(1/y(44)));
  g1(68,44)=(-((-y(41))/(y(44)*y(44))));
  g1(68,56)=1;
  g1(69,7)=T971;
  g1(69,8)=T971;
  g1(69,37)=(-(x(14)*params(12)*T784*params(39)*(-(y(45)*y(55)*(y(7)+y(8))))/(y(37)*y(45)*y(37)*y(45))));
  g1(69,45)=(-(x(14)*params(12)*T784*params(39)*(-(y(37)*y(55)*(y(7)+y(8))))/(y(37)*y(45)*y(37)*y(45))));
  g1(69,54)=1;
  g1(69,55)=(-(x(14)*params(12)*T784*params(39)*(y(7)+y(8))/(y(37)*y(45))));
  g1(70,2)=(-(y(15)*(1-x(9))*y(55)*y(7)*1/(y(37)*y(45))/params(21)*T920));
  g1(70,7)=(-(y(15)*(1-x(9))*T920*y(55)*y(2)/(y(37)*y(45))/params(21)));
  g1(70,15)=1-(1-x(9))*T799;
  g1(70,37)=(-(y(15)*(1-x(9))*T920*y(55)*y(7)*(-(y(45)*y(2)))/(y(37)*y(45)*y(37)*y(45))/params(21)));
  g1(70,45)=(-(y(15)*(1-x(9))*T920*y(55)*y(7)*(-(y(37)*y(2)))/(y(37)*y(45)*y(37)*y(45))/params(21)));
  g1(70,55)=(-(y(15)*(1-x(9))*T920*y(7)*y(2)/(y(37)*y(45))/params(21)));
  g1(71,53)=1-(1-x(10))*(params(40)+1-params(40));
  g1(72,3)=(-params(29));
  g1(72,4)=(-(1-params(29)));
  g1(72,9)=(-y(41));
  g1(72,14)=(-y(42));
  g1(72,22)=(-y(43));
  g1(72,23)=(-((1-params(29))*y(43)));
  g1(72,24)=(-((1-params(29))*y(43)));
  g1(72,25)=(-((1-params(29))*y(43)));
  g1(72,31)=y(44);
  g1(72,37)=y(45);
  g1(72,41)=(-y(9));
  g1(72,42)=(-y(14));
  g1(72,43)=(-(y(22)+(1-params(29))*(y(25)+y(23)+y(24))));
  g1(72,44)=y(31);
  g1(72,45)=y(37);
  g1(73,3)=(-(params(15)*(params(29)-(-(params(29)*y(44)*y(31)))/(T835*T835))));
  g1(73,4)=(-(params(15)*(1-params(29)-(-((1-params(29))*y(44)*y(31)))/(T835*T835))));
  g1(73,9)=(-(params(15)*(y(41)-(-(y(41)*y(44)*y(31)))/(T835*T835))));
  g1(73,13)=1;
  g1(73,14)=(-(params(15)*(y(42)-(-(y(42)*y(44)*y(31)))/(T835*T835))));
  g1(73,22)=(-(params(15)*(y(43)-(-(y(44)*y(31)*(1-params(29))*y(43)))/(T835*T835))));
  g1(73,23)=T1215;
  g1(73,24)=T1215;
  g1(73,25)=T1215;
  g1(73,31)=(-(params(15)*(-((y(44)*T835-y(44)*y(31)*(-y(44)))/(T835*T835)))));
  g1(73,41)=(-(params(15)*(y(9)-(-(y(9)*y(44)*y(31)))/(T835*T835))));
  g1(73,42)=(-(params(15)*(y(14)-(-(y(14)*y(44)*y(31)))/(T835*T835))));
  g1(73,43)=(-(params(15)*(y(22)+(1-params(29))*(y(25)+y(23)+y(24))-(-(y(44)*y(31)*(1-params(29))*(y(22)+y(25)+y(23)+y(24))))/(T835*T835))));
  g1(73,44)=(-(params(15)*(-((y(31)*T835-y(44)*y(31)*(-y(31)))/(T835*T835)))));
  g1(74,13)=(-(y(37)*1/params(15)));
  g1(74,37)=1-y(13)/params(15);
  g1(75,3)=(-params(29));
  g1(75,4)=(-(1-params(29)));
  g1(75,10)=(-1);
  g1(75,35)=(-(y(44)*x(20)));
  g1(75,44)=(-(y(35)*x(20)));
  g1(75,72)=1;
  g1(76,22)=(-1);
  g1(76,23)=(-(1-params(29)));
  g1(76,24)=(-(1-params(29)));
  g1(76,25)=(-(1-params(29)));
  g1(76,36)=(-(x(21)*y(44)/y(43)));
  g1(76,43)=(-(y(36)*x(21)*(-y(44))/(y(43)*y(43))));
  g1(76,44)=(-(y(36)*x(21)*1/y(43)));
  g1(76,75)=1;
  g1(77,14)=(-1);
  g1(77,74)=1;
  g1(78,63)=(-1);
  g1(78,64)=(-1);
  g1(78,65)=(-1);
  g1(78,76)=(-1);
  g1(78,78)=1;
  g1(79,66)=(-1);
  g1(79,67)=(-1);
  g1(79,68)=(-1);
  g1(79,77)=(-1);
  g1(79,79)=1;
  g1(80,11)=(-1);
  g1(80,69)=(-1);
  g1(80,70)=(-1);
  g1(80,71)=(-1);
  g1(80,80)=1;
  g1(81,5)=(-1);
  g1(81,6)=(-1);
  g1(81,73)=1;
  g1(82,38)=(-y(81));
  g1(82,76)=1;
  g1(82,81)=(-y(38));
  g1(83,39)=(-(y(82)+y(83)));
  g1(83,77)=1;
  g1(83,82)=(-y(39));
  g1(83,83)=(-y(39));
  g1(84,7)=y(55)*params(15)-y(55)*y(54)/x(12);
  g1(84,8)=y(55)*params(15)-y(55)*y(54)/x(12);
  g1(84,9)=(-y(41));
  g1(84,31)=(-y(44));
  g1(84,41)=(-y(9));
  g1(84,44)=(-y(31));
  g1(84,54)=(-(y(55)*(y(7)+y(8))*1/x(12)));
  g1(84,55)=params(15)*(y(7)+y(8))-y(54)/x(12)*(y(7)+y(8));
  g1(85,27)=(-1);
  g1(85,85)=1;
  g1(86,28)=(-1);
  g1(86,86)=1;
  g1(87,29)=(-1);
  g1(87,87)=1;
  if ~isreal(g1)
    g1 = real(g1)+2*imag(g1);
  end
if nargout >= 3,
  %
  % Hessian matrix
  %

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

  g3 = sparse([],[],[],87,658503);
end
end
end
end
