Generated Code

The following is c_ida code generated by the CellML API from this CellML file. (Back to language selection)

The raw code is available.

/*
   There are a total of 124 entries in the algebraic variable array.
   There are a total of 19 entries in each of the rate and state variable arrays.
   There are a total of 58 entries in the constant variable array.
 */
/*
 * VOI is t in component environment (second).
 * CONSTANTS[0] is R in component environment (J_per_K_per_mol).
 * CONSTANTS[1] is T in component environment (kelvin).
 * CONSTANTS[2] is F in component environment (C_per_mol).
 * CONSTANTS[3] is C_m in component environment (fF).
 * STATES[0] is q_Na_o in component environment (fmol).
 * STATES[1] is q_Na_i in component environment (fmol).
 * STATES[2] is q_S000_Na in component environment (fmol).
 * STATES[3] is q_S010_Na in component environment (fmol).
 * STATES[4] is q_S100_Na in component environment (fmol).
 * STATES[5] is q_S110_Na in component environment (fmol).
 * STATES[6] is q_S200_Na in component environment (fmol).
 * STATES[7] is q_S210_Na in component environment (fmol).
 * STATES[8] is q_S300_Na in component environment (fmol).
 * STATES[9] is q_S310_Na in component environment (fmol).
 * STATES[10] is q_S001_Na in component environment (fmol).
 * STATES[11] is q_S011_Na in component environment (fmol).
 * STATES[12] is q_S101_Na in component environment (fmol).
 * STATES[13] is q_S111_Na in component environment (fmol).
 * STATES[14] is q_S201_Na in component environment (fmol).
 * STATES[15] is q_S211_Na in component environment (fmol).
 * STATES[16] is q_S301_Na in component environment (fmol).
 * STATES[17] is q_S311_Na in component environment (fmol).
 * ALGEBRAIC[78] is v_Na in component fast_Na (fmol_per_sec).
 * STATES[18] is q_mem in component environment (fC).
 * ALGEBRAIC[123] is I_mem_Na in component fast_Na (fA).
 * CONSTANTS[4] is K_000_Na in component Na_parameters (per_fmol).
 * CONSTANTS[5] is K_001_Na in component Na_parameters (per_fmol).
 * CONSTANTS[6] is K_010_Na in component Na_parameters (per_fmol).
 * CONSTANTS[7] is K_011_Na in component Na_parameters (per_fmol).
 * CONSTANTS[8] is K_100_Na in component Na_parameters (per_fmol).
 * CONSTANTS[9] is K_101_Na in component Na_parameters (per_fmol).
 * CONSTANTS[10] is K_110_Na in component Na_parameters (per_fmol).
 * CONSTANTS[11] is K_111_Na in component Na_parameters (per_fmol).
 * CONSTANTS[12] is K_200_Na in component Na_parameters (per_fmol).
 * CONSTANTS[13] is K_201_Na in component Na_parameters (per_fmol).
 * CONSTANTS[14] is K_210_Na in component Na_parameters (per_fmol).
 * CONSTANTS[15] is K_211_Na in component Na_parameters (per_fmol).
 * CONSTANTS[16] is K_300_Na in component Na_parameters (per_fmol).
 * CONSTANTS[17] is K_301_Na in component Na_parameters (per_fmol).
 * CONSTANTS[18] is K_310_Na in component Na_parameters (per_fmol).
 * CONSTANTS[19] is K_311_Na in component Na_parameters (per_fmol).
 * CONSTANTS[20] is K_Na_o in component Na_parameters (per_fmol).
 * CONSTANTS[21] is K_Na_i in component Na_parameters (per_fmol).
 * CONSTANTS[22] is kappa_Na in component Na_parameters (fmol_per_sec).
 * CONSTANTS[23] is kappa_h000 in component Na_parameters (fmol_per_sec).
 * CONSTANTS[24] is kappa_h001 in component Na_parameters (fmol_per_sec).
 * CONSTANTS[25] is kappa_h100 in component Na_parameters (fmol_per_sec).
 * CONSTANTS[26] is kappa_h101 in component Na_parameters (fmol_per_sec).
 * CONSTANTS[27] is kappa_h200 in component Na_parameters (fmol_per_sec).
 * CONSTANTS[28] is kappa_h201 in component Na_parameters (fmol_per_sec).
 * CONSTANTS[29] is kappa_h300 in component Na_parameters (fmol_per_sec).
 * CONSTANTS[30] is kappa_h301 in component Na_parameters (fmol_per_sec).
 * CONSTANTS[31] is kappa_j000 in component Na_parameters (fmol_per_sec).
 * CONSTANTS[32] is kappa_j010 in component Na_parameters (fmol_per_sec).
 * CONSTANTS[33] is kappa_j100 in component Na_parameters (fmol_per_sec).
 * CONSTANTS[34] is kappa_j110 in component Na_parameters (fmol_per_sec).
 * CONSTANTS[35] is kappa_j200 in component Na_parameters (fmol_per_sec).
 * CONSTANTS[36] is kappa_j210 in component Na_parameters (fmol_per_sec).
 * CONSTANTS[37] is kappa_j300 in component Na_parameters (fmol_per_sec).
 * CONSTANTS[38] is kappa_j310 in component Na_parameters (fmol_per_sec).
 * CONSTANTS[39] is kappa_m000 in component Na_parameters (fmol_per_sec).
 * CONSTANTS[40] is kappa_m001 in component Na_parameters (fmol_per_sec).
 * CONSTANTS[41] is kappa_m010 in component Na_parameters (fmol_per_sec).
 * CONSTANTS[42] is kappa_m011 in component Na_parameters (fmol_per_sec).
 * CONSTANTS[43] is kappa_m100 in component Na_parameters (fmol_per_sec).
 * CONSTANTS[44] is kappa_m101 in component Na_parameters (fmol_per_sec).
 * CONSTANTS[45] is kappa_m110 in component Na_parameters (fmol_per_sec).
 * CONSTANTS[46] is kappa_m111 in component Na_parameters (fmol_per_sec).
 * CONSTANTS[47] is kappa_m200 in component Na_parameters (fmol_per_sec).
 * CONSTANTS[48] is kappa_m201 in component Na_parameters (fmol_per_sec).
 * CONSTANTS[49] is kappa_m210 in component Na_parameters (fmol_per_sec).
 * CONSTANTS[50] is kappa_m211 in component Na_parameters (fmol_per_sec).
 * CONSTANTS[51] is zNa in component Na_parameters (dimensionless).
 * CONSTANTS[52] is z_fh in component Na_parameters (dimensionless).
 * CONSTANTS[53] is z_fj in component Na_parameters (dimensionless).
 * CONSTANTS[54] is z_fm in component Na_parameters (dimensionless).
 * CONSTANTS[55] is z_rh in component Na_parameters (dimensionless).
 * CONSTANTS[56] is z_rj in component Na_parameters (dimensionless).
 * CONSTANTS[57] is z_rm in component Na_parameters (dimensionless).
 * ALGEBRAIC[1] is mu_Na_o in component fast_Na (J_per_mol).
 * ALGEBRAIC[2] is mu_Na_i in component fast_Na (J_per_mol).
 * ALGEBRAIC[3] is mu_S000_Na in component fast_Na (J_per_mol).
 * ALGEBRAIC[5] is mu_S010_Na in component fast_Na (J_per_mol).
 * ALGEBRAIC[7] is mu_S100_Na in component fast_Na (J_per_mol).
 * ALGEBRAIC[9] is mu_S110_Na in component fast_Na (J_per_mol).
 * ALGEBRAIC[11] is mu_S200_Na in component fast_Na (J_per_mol).
 * ALGEBRAIC[13] is mu_S210_Na in component fast_Na (J_per_mol).
 * ALGEBRAIC[15] is mu_S300_Na in component fast_Na (J_per_mol).
 * ALGEBRAIC[17] is mu_S310_Na in component fast_Na (J_per_mol).
 * ALGEBRAIC[4] is mu_S001_Na in component fast_Na (J_per_mol).
 * ALGEBRAIC[6] is mu_S011_Na in component fast_Na (J_per_mol).
 * ALGEBRAIC[8] is mu_S101_Na in component fast_Na (J_per_mol).
 * ALGEBRAIC[10] is mu_S111_Na in component fast_Na (J_per_mol).
 * ALGEBRAIC[12] is mu_S201_Na in component fast_Na (J_per_mol).
 * ALGEBRAIC[14] is mu_S211_Na in component fast_Na (J_per_mol).
 * ALGEBRAIC[16] is mu_S301_Na in component fast_Na (J_per_mol).
 * ALGEBRAIC[18] is mu_S311_Na in component fast_Na (J_per_mol).
 * ALGEBRAIC[48] is Am_Na in component fast_Na (J_per_mol).
 * ALGEBRAIC[19] is Af_Na in component fast_Na (J_per_mol).
 * ALGEBRAIC[49] is Ar_Na in component fast_Na (J_per_mol).
 * ALGEBRAIC[20] is Af_h000 in component fast_Na (J_per_mol).
 * ALGEBRAIC[50] is Ar_h000 in component fast_Na (J_per_mol).
 * ALGEBRAIC[79] is v_h000 in component fast_Na (fmol_per_sec).
 * ALGEBRAIC[21] is Af_h001 in component fast_Na (J_per_mol).
 * ALGEBRAIC[51] is Ar_h001 in component fast_Na (J_per_mol).
 * ALGEBRAIC[80] is v_h001 in component fast_Na (fmol_per_sec).
 * ALGEBRAIC[22] is Af_h100 in component fast_Na (J_per_mol).
 * ALGEBRAIC[52] is Ar_h100 in component fast_Na (J_per_mol).
 * ALGEBRAIC[81] is v_h100 in component fast_Na (fmol_per_sec).
 * ALGEBRAIC[23] is Af_h101 in component fast_Na (J_per_mol).
 * ALGEBRAIC[53] is Ar_h101 in component fast_Na (J_per_mol).
 * ALGEBRAIC[82] is v_h101 in component fast_Na (fmol_per_sec).
 * ALGEBRAIC[24] is Af_h200 in component fast_Na (J_per_mol).
 * ALGEBRAIC[54] is Ar_h200 in component fast_Na (J_per_mol).
 * ALGEBRAIC[83] is v_h200 in component fast_Na (fmol_per_sec).
 * ALGEBRAIC[25] is Af_h201 in component fast_Na (J_per_mol).
 * ALGEBRAIC[55] is Ar_h201 in component fast_Na (J_per_mol).
 * ALGEBRAIC[84] is v_h201 in component fast_Na (fmol_per_sec).
 * ALGEBRAIC[26] is Af_h300 in component fast_Na (J_per_mol).
 * ALGEBRAIC[56] is Ar_h300 in component fast_Na (J_per_mol).
 * ALGEBRAIC[85] is v_h300 in component fast_Na (fmol_per_sec).
 * ALGEBRAIC[27] is Af_h301 in component fast_Na (J_per_mol).
 * ALGEBRAIC[57] is Ar_h301 in component fast_Na (J_per_mol).
 * ALGEBRAIC[86] is v_h301 in component fast_Na (fmol_per_sec).
 * ALGEBRAIC[28] is Af_j000 in component fast_Na (J_per_mol).
 * ALGEBRAIC[58] is Ar_j000 in component fast_Na (J_per_mol).
 * ALGEBRAIC[87] is v_j000 in component fast_Na (fmol_per_sec).
 * ALGEBRAIC[29] is Af_j010 in component fast_Na (J_per_mol).
 * ALGEBRAIC[59] is Ar_j010 in component fast_Na (J_per_mol).
 * ALGEBRAIC[88] is v_j010 in component fast_Na (fmol_per_sec).
 * ALGEBRAIC[30] is Af_j100 in component fast_Na (J_per_mol).
 * ALGEBRAIC[60] is Ar_j100 in component fast_Na (J_per_mol).
 * ALGEBRAIC[89] is v_j100 in component fast_Na (fmol_per_sec).
 * ALGEBRAIC[31] is Af_j110 in component fast_Na (J_per_mol).
 * ALGEBRAIC[61] is Ar_j110 in component fast_Na (J_per_mol).
 * ALGEBRAIC[90] is v_j110 in component fast_Na (fmol_per_sec).
 * ALGEBRAIC[32] is Af_j200 in component fast_Na (J_per_mol).
 * ALGEBRAIC[62] is Ar_j200 in component fast_Na (J_per_mol).
 * ALGEBRAIC[91] is v_j200 in component fast_Na (fmol_per_sec).
 * ALGEBRAIC[33] is Af_j210 in component fast_Na (J_per_mol).
 * ALGEBRAIC[63] is Ar_j210 in component fast_Na (J_per_mol).
 * ALGEBRAIC[92] is v_j210 in component fast_Na (fmol_per_sec).
 * ALGEBRAIC[34] is Af_j300 in component fast_Na (J_per_mol).
 * ALGEBRAIC[64] is Ar_j300 in component fast_Na (J_per_mol).
 * ALGEBRAIC[93] is v_j300 in component fast_Na (fmol_per_sec).
 * ALGEBRAIC[35] is Af_j310 in component fast_Na (J_per_mol).
 * ALGEBRAIC[65] is Ar_j310 in component fast_Na (J_per_mol).
 * ALGEBRAIC[94] is v_j310 in component fast_Na (fmol_per_sec).
 * ALGEBRAIC[36] is Af_m000 in component fast_Na (J_per_mol).
 * ALGEBRAIC[66] is Ar_m000 in component fast_Na (J_per_mol).
 * ALGEBRAIC[95] is v_m000 in component fast_Na (fmol_per_sec).
 * ALGEBRAIC[37] is Af_m001 in component fast_Na (J_per_mol).
 * ALGEBRAIC[67] is Ar_m001 in component fast_Na (J_per_mol).
 * ALGEBRAIC[96] is v_m001 in component fast_Na (fmol_per_sec).
 * ALGEBRAIC[38] is Af_m010 in component fast_Na (J_per_mol).
 * ALGEBRAIC[68] is Ar_m010 in component fast_Na (J_per_mol).
 * ALGEBRAIC[97] is v_m010 in component fast_Na (fmol_per_sec).
 * ALGEBRAIC[39] is Af_m011 in component fast_Na (J_per_mol).
 * ALGEBRAIC[69] is Ar_m011 in component fast_Na (J_per_mol).
 * ALGEBRAIC[98] is v_m011 in component fast_Na (fmol_per_sec).
 * ALGEBRAIC[40] is Af_m100 in component fast_Na (J_per_mol).
 * ALGEBRAIC[70] is Ar_m100 in component fast_Na (J_per_mol).
 * ALGEBRAIC[99] is v_m100 in component fast_Na (fmol_per_sec).
 * ALGEBRAIC[41] is Af_m101 in component fast_Na (J_per_mol).
 * ALGEBRAIC[71] is Ar_m101 in component fast_Na (J_per_mol).
 * ALGEBRAIC[100] is v_m101 in component fast_Na (fmol_per_sec).
 * ALGEBRAIC[42] is Af_m110 in component fast_Na (J_per_mol).
 * ALGEBRAIC[72] is Ar_m110 in component fast_Na (J_per_mol).
 * ALGEBRAIC[101] is v_m110 in component fast_Na (fmol_per_sec).
 * ALGEBRAIC[43] is Af_m111 in component fast_Na (J_per_mol).
 * ALGEBRAIC[73] is Ar_m111 in component fast_Na (J_per_mol).
 * ALGEBRAIC[102] is v_m111 in component fast_Na (fmol_per_sec).
 * ALGEBRAIC[44] is Af_m200 in component fast_Na (J_per_mol).
 * ALGEBRAIC[74] is Ar_m200 in component fast_Na (J_per_mol).
 * ALGEBRAIC[103] is v_m200 in component fast_Na (fmol_per_sec).
 * ALGEBRAIC[45] is Af_m201 in component fast_Na (J_per_mol).
 * ALGEBRAIC[75] is Ar_m201 in component fast_Na (J_per_mol).
 * ALGEBRAIC[104] is v_m201 in component fast_Na (fmol_per_sec).
 * ALGEBRAIC[46] is Af_m210 in component fast_Na (J_per_mol).
 * ALGEBRAIC[76] is Ar_m210 in component fast_Na (J_per_mol).
 * ALGEBRAIC[105] is v_m210 in component fast_Na (fmol_per_sec).
 * ALGEBRAIC[47] is Af_m211 in component fast_Na (J_per_mol).
 * ALGEBRAIC[77] is Ar_m211 in component fast_Na (J_per_mol).
 * ALGEBRAIC[106] is v_m211 in component fast_Na (fmol_per_sec).
 * ALGEBRAIC[107] is v_S000_Na in component fast_Na (fmol_per_sec).
 * ALGEBRAIC[109] is v_S010_Na in component fast_Na (fmol_per_sec).
 * ALGEBRAIC[111] is v_S100_Na in component fast_Na (fmol_per_sec).
 * ALGEBRAIC[113] is v_S110_Na in component fast_Na (fmol_per_sec).
 * ALGEBRAIC[115] is v_S200_Na in component fast_Na (fmol_per_sec).
 * ALGEBRAIC[117] is v_S210_Na in component fast_Na (fmol_per_sec).
 * ALGEBRAIC[119] is v_S300_Na in component fast_Na (fmol_per_sec).
 * ALGEBRAIC[121] is v_S310_Na in component fast_Na (fmol_per_sec).
 * ALGEBRAIC[108] is v_S001_Na in component fast_Na (fmol_per_sec).
 * ALGEBRAIC[110] is v_S011_Na in component fast_Na (fmol_per_sec).
 * ALGEBRAIC[112] is v_S101_Na in component fast_Na (fmol_per_sec).
 * ALGEBRAIC[114] is v_S111_Na in component fast_Na (fmol_per_sec).
 * ALGEBRAIC[116] is v_S201_Na in component fast_Na (fmol_per_sec).
 * ALGEBRAIC[118] is v_S211_Na in component fast_Na (fmol_per_sec).
 * ALGEBRAIC[120] is v_S301_Na in component fast_Na (fmol_per_sec).
 * ALGEBRAIC[122] is v_S311_Na in component fast_Na (fmol_per_sec).
 * ALGEBRAIC[0] is V_mem in component fast_Na (volt).
 * RATES[0] is d/dt q_Na_o in component environment (fmol).
 * RATES[1] is d/dt q_Na_i in component environment (fmol).
 * RATES[18] is d/dt q_mem in component environment (fC).
 * RATES[2] is d/dt q_S000_Na in component environment (fmol).
 * RATES[3] is d/dt q_S010_Na in component environment (fmol).
 * RATES[4] is d/dt q_S100_Na in component environment (fmol).
 * RATES[5] is d/dt q_S110_Na in component environment (fmol).
 * RATES[6] is d/dt q_S200_Na in component environment (fmol).
 * RATES[7] is d/dt q_S210_Na in component environment (fmol).
 * RATES[8] is d/dt q_S300_Na in component environment (fmol).
 * RATES[9] is d/dt q_S310_Na in component environment (fmol).
 * RATES[10] is d/dt q_S001_Na in component environment (fmol).
 * RATES[11] is d/dt q_S011_Na in component environment (fmol).
 * RATES[12] is d/dt q_S101_Na in component environment (fmol).
 * RATES[13] is d/dt q_S111_Na in component environment (fmol).
 * RATES[14] is d/dt q_S201_Na in component environment (fmol).
 * RATES[15] is d/dt q_S211_Na in component environment (fmol).
 * RATES[16] is d/dt q_S301_Na in component environment (fmol).
 * RATES[17] is d/dt q_S311_Na in component environment (fmol).
 * There are a total of 0 condition variables.
 */
void
initConsts(double* CONSTANTS, double* RATES, double *STATES)
{
CONSTANTS[0] = 8.314;
CONSTANTS[1] = 310;
CONSTANTS[2] = 96485;
CONSTANTS[3] = 153400;
STATES[0] = 725.48;
STATES[1] = 380;
STATES[2] = 1.72572E-05;
STATES[3] = 1.91747E-06;
STATES[4] = 5.75256E-06;
STATES[5] = 6.39176E-07;
STATES[6] = 6.39176E-07;
STATES[7] = 7.10196E-08;
STATES[8] = 2.36737E-08;
STATES[9] = 2.63039E-09;
STATES[10] = 1.91747E-06;
STATES[11] = 2.13059E-07;
STATES[12] = 6.39176E-07;
STATES[13] = 7.10196E-08;
STATES[14] = 7.10196E-08;
STATES[15] = 7.89103E-09;
STATES[16] = 2.63039E-09;
STATES[17] = 2.92267E-10;
STATES[18] = -13039;
CONSTANTS[4] = 0.0073376;
CONSTANTS[5] = 23718.0222;
CONSTANTS[6] = 17499.8767;
CONSTANTS[7] = 56566767727.4036;
CONSTANTS[8] = 1.5633e-05;
CONSTANTS[9] = 50.5317;
CONSTANTS[10] = 37.2839;
CONSTANTS[11] = 120516694.0958;
CONSTANTS[12] = 9.9918e-08;
CONSTANTS[13] = 0.32298;
CONSTANTS[14] = 0.2383;
CONSTANTS[15] = 770290.0911;
CONSTANTS[16] = 1.9159e-09;
CONSTANTS[17] = 0.006193;
CONSTANTS[18] = 0.0045694;
CONSTANTS[19] = 14770.0739;
CONSTANTS[20] = 0.017678;
CONSTANTS[21] = 0.0024108;
CONSTANTS[22] = 32.858;
CONSTANTS[23] = 0.045709;
CONSTANTS[24] = 1.4141e-08;
CONSTANTS[25] = 21.4544;
CONSTANTS[26] = 6.6373e-06;
CONSTANTS[27] = 3356.675;
CONSTANTS[28] = 0.0010384;
CONSTANTS[29] = 175057.5863;
CONSTANTS[30] = 0.054157;
CONSTANTS[31] = 0.017824;
CONSTANTS[32] = 7.4736e-09;
CONSTANTS[33] = 8.3662;
CONSTANTS[34] = 3.5079e-06;
CONSTANTS[35] = 1308.9427;
CONSTANTS[36] = 0.00054883;
CONSTANTS[37] = 68264.0876;
CONSTANTS[38] = 0.028623;
CONSTANTS[39] = 5117405.6443;
CONSTANTS[40] = 1.5832;
CONSTANTS[41] = 2.1457;
CONSTANTS[42] = 6.6381e-07;
CONSTANTS[43] = 1601300127.6001;
CONSTANTS[44] = 495.389;
CONSTANTS[45] = 671.4132;
CONSTANTS[46] = 0.00020771;
CONSTANTS[47] = 125266701374.7363;
CONSTANTS[48] = 38753.3515;
CONSTANTS[49] = 52523.3901;
CONSTANTS[50] = 0.016249;
CONSTANTS[51] = 1;
CONSTANTS[52] = -4.1892;
CONSTANTS[53] = -4.0381;
CONSTANTS[54] = 0.49541;
CONSTANTS[55] = 1.2995;
CONSTANTS[56] = 1.4281;
CONSTANTS[57] = -2.4284;
RATES[0] = 0.1001;
RATES[1] = 0.1001;
RATES[18] = 0.1001;
RATES[2] = 0.1001;
RATES[3] = 0.1001;
RATES[4] = 0.1001;
RATES[5] = 0.1001;
RATES[6] = 0.1001;
RATES[7] = 0.1001;
RATES[8] = 0.1001;
RATES[9] = 0.1001;
RATES[10] = 0.1001;
RATES[11] = 0.1001;
RATES[12] = 0.1001;
RATES[13] = 0.1001;
RATES[14] = 0.1001;
RATES[15] = 0.1001;
RATES[16] = 0.1001;
RATES[17] = 0.1001;
}
void
computeResiduals(double VOI, double* CONSTANTS, double* RATES, double* OLDRATES, double* STATES,
                 double* OLDSTATES, double* ALGEBRAIC, double* CONDVARS)
{
resid[0] = RATES[0] - ALGEBRAIC[78];
resid[1] = RATES[1] - - ALGEBRAIC[78];
resid[2] = RATES[18] - ALGEBRAIC[123];
resid[3] = RATES[2] - ALGEBRAIC[107];
resid[4] = RATES[3] - ALGEBRAIC[109];
resid[5] = RATES[4] - ALGEBRAIC[111];
resid[6] = RATES[5] - ALGEBRAIC[113];
resid[7] = RATES[6] - ALGEBRAIC[115];
resid[8] = RATES[7] - ALGEBRAIC[117];
resid[9] = RATES[8] - ALGEBRAIC[119];
resid[10] = RATES[9] - ALGEBRAIC[121];
resid[11] = RATES[10] - ALGEBRAIC[108];
resid[12] = RATES[11] - ALGEBRAIC[110];
resid[13] = RATES[12] - ALGEBRAIC[112];
resid[14] = RATES[13] - ALGEBRAIC[114];
resid[15] = RATES[14] - ALGEBRAIC[116];
resid[16] = RATES[15] - ALGEBRAIC[118];
resid[17] = RATES[16] - ALGEBRAIC[120];
resid[18] = RATES[17] - ALGEBRAIC[122];
}
void
computeVariables(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC)
{
ALGEBRAIC[3] =  CONSTANTS[0]*CONSTANTS[1]*log( CONSTANTS[4]*STATES[2]);
ALGEBRAIC[4] =  CONSTANTS[0]*CONSTANTS[1]*log( CONSTANTS[5]*STATES[10]);
ALGEBRAIC[5] =  CONSTANTS[0]*CONSTANTS[1]*log( CONSTANTS[6]*STATES[3]);
ALGEBRAIC[6] =  CONSTANTS[0]*CONSTANTS[1]*log( CONSTANTS[7]*STATES[11]);
ALGEBRAIC[7] =  CONSTANTS[0]*CONSTANTS[1]*log( CONSTANTS[8]*STATES[4]);
ALGEBRAIC[8] =  CONSTANTS[0]*CONSTANTS[1]*log( CONSTANTS[9]*STATES[12]);
ALGEBRAIC[9] =  CONSTANTS[0]*CONSTANTS[1]*log( CONSTANTS[10]*STATES[5]);
ALGEBRAIC[10] =  CONSTANTS[0]*CONSTANTS[1]*log( CONSTANTS[11]*STATES[13]);
ALGEBRAIC[11] =  CONSTANTS[0]*CONSTANTS[1]*log( CONSTANTS[12]*STATES[6]);
ALGEBRAIC[12] =  CONSTANTS[0]*CONSTANTS[1]*log( CONSTANTS[13]*STATES[14]);
ALGEBRAIC[13] =  CONSTANTS[0]*CONSTANTS[1]*log( CONSTANTS[14]*STATES[7]);
ALGEBRAIC[14] =  CONSTANTS[0]*CONSTANTS[1]*log( CONSTANTS[15]*STATES[15]);
ALGEBRAIC[15] =  CONSTANTS[0]*CONSTANTS[1]*log( CONSTANTS[16]*STATES[8]);
ALGEBRAIC[16] =  CONSTANTS[0]*CONSTANTS[1]*log( CONSTANTS[17]*STATES[16]);
ALGEBRAIC[17] =  CONSTANTS[0]*CONSTANTS[1]*log( CONSTANTS[18]*STATES[9]);
}
void
computeEssentialVariables(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC)
{
ALGEBRAIC[0] = STATES[18]/CONSTANTS[3];
ALGEBRAIC[48] =  CONSTANTS[51]*CONSTANTS[2]*ALGEBRAIC[0];
ALGEBRAIC[2] =  CONSTANTS[0]*CONSTANTS[1]*log( CONSTANTS[21]*STATES[1]);
ALGEBRAIC[18] =  CONSTANTS[0]*CONSTANTS[1]*log( CONSTANTS[19]*STATES[17]);
ALGEBRAIC[19] = ALGEBRAIC[2]+ CONSTANTS[51]*CONSTANTS[2]*ALGEBRAIC[0]+ALGEBRAIC[18];
ALGEBRAIC[1] =  CONSTANTS[0]*CONSTANTS[1]*log( CONSTANTS[20]*STATES[0]);
ALGEBRAIC[49] = ALGEBRAIC[1]+ALGEBRAIC[18];
ALGEBRAIC[78] = (ALGEBRAIC[48]==0.00000 ?  CONSTANTS[22]*(exp(ALGEBRAIC[19]/( CONSTANTS[0]*CONSTANTS[1])) - exp(ALGEBRAIC[49]/( CONSTANTS[0]*CONSTANTS[1]))) :  ((( CONSTANTS[22]*ALGEBRAIC[48])/( CONSTANTS[0]*CONSTANTS[1]))/(exp(ALGEBRAIC[48]/( CONSTANTS[0]*CONSTANTS[1])) - 1.00000))*(exp(ALGEBRAIC[19]/( CONSTANTS[0]*CONSTANTS[1])) - exp(ALGEBRAIC[49]/( CONSTANTS[0]*CONSTANTS[1]))));
ALGEBRAIC[20] =  CONSTANTS[0]*CONSTANTS[1]*log( CONSTANTS[4]*STATES[2])+ CONSTANTS[52]*CONSTANTS[2]*ALGEBRAIC[0];
ALGEBRAIC[50] =  CONSTANTS[0]*CONSTANTS[1]*log( CONSTANTS[6]*STATES[3])+ CONSTANTS[55]*CONSTANTS[2]*ALGEBRAIC[0];
ALGEBRAIC[79] =  CONSTANTS[23]*(exp(ALGEBRAIC[20]/( CONSTANTS[0]*CONSTANTS[1])) - exp(ALGEBRAIC[50]/( CONSTANTS[0]*CONSTANTS[1])));
ALGEBRAIC[28] =  CONSTANTS[0]*CONSTANTS[1]*log( CONSTANTS[4]*STATES[2])+ CONSTANTS[53]*CONSTANTS[2]*ALGEBRAIC[0];
ALGEBRAIC[58] =  CONSTANTS[0]*CONSTANTS[1]*log( CONSTANTS[5]*STATES[10])+ CONSTANTS[56]*CONSTANTS[2]*ALGEBRAIC[0];
ALGEBRAIC[87] =  CONSTANTS[31]*(exp(ALGEBRAIC[28]/( CONSTANTS[0]*CONSTANTS[1])) - exp(ALGEBRAIC[58]/( CONSTANTS[0]*CONSTANTS[1])));
ALGEBRAIC[36] =  CONSTANTS[0]*CONSTANTS[1]*log( CONSTANTS[4]*STATES[2])+ CONSTANTS[54]*CONSTANTS[2]*ALGEBRAIC[0];
ALGEBRAIC[66] =  CONSTANTS[0]*CONSTANTS[1]*log( CONSTANTS[8]*STATES[4])+ CONSTANTS[57]*CONSTANTS[2]*ALGEBRAIC[0];
ALGEBRAIC[95] =  CONSTANTS[39]*(exp(ALGEBRAIC[36]/( CONSTANTS[0]*CONSTANTS[1])) - exp(ALGEBRAIC[66]/( CONSTANTS[0]*CONSTANTS[1])));
ALGEBRAIC[107] = (- ALGEBRAIC[95] - ALGEBRAIC[79]) - ALGEBRAIC[87];
ALGEBRAIC[21] =  CONSTANTS[0]*CONSTANTS[1]*log( CONSTANTS[5]*STATES[10])+ CONSTANTS[52]*CONSTANTS[2]*ALGEBRAIC[0];
ALGEBRAIC[51] =  CONSTANTS[0]*CONSTANTS[1]*log( CONSTANTS[7]*STATES[11])+ CONSTANTS[55]*CONSTANTS[2]*ALGEBRAIC[0];
ALGEBRAIC[80] =  CONSTANTS[24]*(exp(ALGEBRAIC[21]/( CONSTANTS[0]*CONSTANTS[1])) - exp(ALGEBRAIC[51]/( CONSTANTS[0]*CONSTANTS[1])));
ALGEBRAIC[37] =  CONSTANTS[0]*CONSTANTS[1]*log( CONSTANTS[5]*STATES[10])+ CONSTANTS[54]*CONSTANTS[2]*ALGEBRAIC[0];
ALGEBRAIC[67] =  CONSTANTS[0]*CONSTANTS[1]*log( CONSTANTS[9]*STATES[12])+ CONSTANTS[57]*CONSTANTS[2]*ALGEBRAIC[0];
ALGEBRAIC[96] =  CONSTANTS[40]*(exp(ALGEBRAIC[37]/( CONSTANTS[0]*CONSTANTS[1])) - exp(ALGEBRAIC[67]/( CONSTANTS[0]*CONSTANTS[1])));
ALGEBRAIC[108] = (- ALGEBRAIC[96] - ALGEBRAIC[80]) - - ALGEBRAIC[87];
ALGEBRAIC[29] =  CONSTANTS[0]*CONSTANTS[1]*log( CONSTANTS[6]*STATES[3])+ CONSTANTS[53]*CONSTANTS[2]*ALGEBRAIC[0];
ALGEBRAIC[59] =  CONSTANTS[0]*CONSTANTS[1]*log( CONSTANTS[7]*STATES[11])+ CONSTANTS[56]*CONSTANTS[2]*ALGEBRAIC[0];
ALGEBRAIC[88] =  CONSTANTS[32]*(exp(ALGEBRAIC[29]/( CONSTANTS[0]*CONSTANTS[1])) - exp(ALGEBRAIC[59]/( CONSTANTS[0]*CONSTANTS[1])));
ALGEBRAIC[38] =  CONSTANTS[0]*CONSTANTS[1]*log( CONSTANTS[6]*STATES[3])+ CONSTANTS[54]*CONSTANTS[2]*ALGEBRAIC[0];
ALGEBRAIC[68] =  CONSTANTS[0]*CONSTANTS[1]*log( CONSTANTS[10]*STATES[5])+ CONSTANTS[57]*CONSTANTS[2]*ALGEBRAIC[0];
ALGEBRAIC[97] =  CONSTANTS[41]*(exp(ALGEBRAIC[38]/( CONSTANTS[0]*CONSTANTS[1])) - exp(ALGEBRAIC[68]/( CONSTANTS[0]*CONSTANTS[1])));
ALGEBRAIC[109] = (- ALGEBRAIC[97]+ALGEBRAIC[79]) - ALGEBRAIC[88];
ALGEBRAIC[39] =  CONSTANTS[0]*CONSTANTS[1]*log( CONSTANTS[7]*STATES[11])+ CONSTANTS[54]*CONSTANTS[2]*ALGEBRAIC[0];
ALGEBRAIC[69] =  CONSTANTS[0]*CONSTANTS[1]*log( CONSTANTS[11]*STATES[13])+ CONSTANTS[57]*CONSTANTS[2]*ALGEBRAIC[0];
ALGEBRAIC[98] =  CONSTANTS[42]*(exp(ALGEBRAIC[39]/( CONSTANTS[0]*CONSTANTS[1])) - exp(ALGEBRAIC[69]/( CONSTANTS[0]*CONSTANTS[1])));
ALGEBRAIC[110] = (- ALGEBRAIC[98]+ALGEBRAIC[80]) - - ALGEBRAIC[88];
ALGEBRAIC[22] =  CONSTANTS[0]*CONSTANTS[1]*log( CONSTANTS[8]*STATES[4])+ CONSTANTS[52]*CONSTANTS[2]*ALGEBRAIC[0];
ALGEBRAIC[52] =  CONSTANTS[0]*CONSTANTS[1]*log( CONSTANTS[10]*STATES[5])+ CONSTANTS[55]*CONSTANTS[2]*ALGEBRAIC[0];
ALGEBRAIC[81] =  CONSTANTS[25]*(exp(ALGEBRAIC[22]/( CONSTANTS[0]*CONSTANTS[1])) - exp(ALGEBRAIC[52]/( CONSTANTS[0]*CONSTANTS[1])));
ALGEBRAIC[30] =  CONSTANTS[0]*CONSTANTS[1]*log( CONSTANTS[8]*STATES[4])+ CONSTANTS[53]*CONSTANTS[2]*ALGEBRAIC[0];
ALGEBRAIC[60] =  CONSTANTS[0]*CONSTANTS[1]*log( CONSTANTS[9]*STATES[12])+ CONSTANTS[56]*CONSTANTS[2]*ALGEBRAIC[0];
ALGEBRAIC[89] =  CONSTANTS[33]*(exp(ALGEBRAIC[30]/( CONSTANTS[0]*CONSTANTS[1])) - exp(ALGEBRAIC[60]/( CONSTANTS[0]*CONSTANTS[1])));
ALGEBRAIC[40] =  CONSTANTS[0]*CONSTANTS[1]*log( CONSTANTS[8]*STATES[4])+ CONSTANTS[54]*CONSTANTS[2]*ALGEBRAIC[0];
ALGEBRAIC[70] =  CONSTANTS[0]*CONSTANTS[1]*log( CONSTANTS[12]*STATES[6])+ CONSTANTS[57]*CONSTANTS[2]*ALGEBRAIC[0];
ALGEBRAIC[99] =  CONSTANTS[43]*(exp(ALGEBRAIC[40]/( CONSTANTS[0]*CONSTANTS[1])) - exp(ALGEBRAIC[70]/( CONSTANTS[0]*CONSTANTS[1])));
ALGEBRAIC[111] = ((ALGEBRAIC[95] - ALGEBRAIC[99]) - ALGEBRAIC[81]) - ALGEBRAIC[89];
ALGEBRAIC[23] =  CONSTANTS[0]*CONSTANTS[1]*log( CONSTANTS[9]*STATES[12])+ CONSTANTS[52]*CONSTANTS[2]*ALGEBRAIC[0];
ALGEBRAIC[53] =  CONSTANTS[0]*CONSTANTS[1]*log( CONSTANTS[11]*STATES[13])+ CONSTANTS[55]*CONSTANTS[2]*ALGEBRAIC[0];
ALGEBRAIC[82] =  CONSTANTS[26]*(exp(ALGEBRAIC[23]/( CONSTANTS[0]*CONSTANTS[1])) - exp(ALGEBRAIC[53]/( CONSTANTS[0]*CONSTANTS[1])));
ALGEBRAIC[41] =  CONSTANTS[0]*CONSTANTS[1]*log( CONSTANTS[9]*STATES[12])+ CONSTANTS[54]*CONSTANTS[2]*ALGEBRAIC[0];
ALGEBRAIC[71] =  CONSTANTS[0]*CONSTANTS[1]*log( CONSTANTS[13]*STATES[14])+ CONSTANTS[57]*CONSTANTS[2]*ALGEBRAIC[0];
ALGEBRAIC[100] =  CONSTANTS[44]*(exp(ALGEBRAIC[41]/( CONSTANTS[0]*CONSTANTS[1])) - exp(ALGEBRAIC[71]/( CONSTANTS[0]*CONSTANTS[1])));
ALGEBRAIC[112] = ((ALGEBRAIC[96] - ALGEBRAIC[100]) - ALGEBRAIC[82]) - - ALGEBRAIC[89];
ALGEBRAIC[31] =  CONSTANTS[0]*CONSTANTS[1]*log( CONSTANTS[10]*STATES[5])+ CONSTANTS[53]*CONSTANTS[2]*ALGEBRAIC[0];
ALGEBRAIC[61] =  CONSTANTS[0]*CONSTANTS[1]*log( CONSTANTS[11]*STATES[13])+ CONSTANTS[56]*CONSTANTS[2]*ALGEBRAIC[0];
ALGEBRAIC[90] =  CONSTANTS[34]*(exp(ALGEBRAIC[31]/( CONSTANTS[0]*CONSTANTS[1])) - exp(ALGEBRAIC[61]/( CONSTANTS[0]*CONSTANTS[1])));
ALGEBRAIC[42] =  CONSTANTS[0]*CONSTANTS[1]*log( CONSTANTS[10]*STATES[5])+ CONSTANTS[54]*CONSTANTS[2]*ALGEBRAIC[0];
ALGEBRAIC[72] =  CONSTANTS[0]*CONSTANTS[1]*log( CONSTANTS[14]*STATES[7])+ CONSTANTS[57]*CONSTANTS[2]*ALGEBRAIC[0];
ALGEBRAIC[101] =  CONSTANTS[45]*(exp(ALGEBRAIC[42]/( CONSTANTS[0]*CONSTANTS[1])) - exp(ALGEBRAIC[72]/( CONSTANTS[0]*CONSTANTS[1])));
ALGEBRAIC[113] = ((ALGEBRAIC[97] - ALGEBRAIC[101])+ALGEBRAIC[81]) - ALGEBRAIC[90];
ALGEBRAIC[43] =  CONSTANTS[0]*CONSTANTS[1]*log( CONSTANTS[11]*STATES[13])+ CONSTANTS[54]*CONSTANTS[2]*ALGEBRAIC[0];
ALGEBRAIC[73] =  CONSTANTS[0]*CONSTANTS[1]*log( CONSTANTS[15]*STATES[15])+ CONSTANTS[57]*CONSTANTS[2]*ALGEBRAIC[0];
ALGEBRAIC[102] =  CONSTANTS[46]*(exp(ALGEBRAIC[43]/( CONSTANTS[0]*CONSTANTS[1])) - exp(ALGEBRAIC[73]/( CONSTANTS[0]*CONSTANTS[1])));
ALGEBRAIC[114] = ((ALGEBRAIC[98] - ALGEBRAIC[102])+ALGEBRAIC[82]) - - ALGEBRAIC[90];
ALGEBRAIC[24] =  CONSTANTS[0]*CONSTANTS[1]*log( CONSTANTS[12]*STATES[6])+ CONSTANTS[52]*CONSTANTS[2]*ALGEBRAIC[0];
ALGEBRAIC[54] =  CONSTANTS[0]*CONSTANTS[1]*log( CONSTANTS[14]*STATES[7])+ CONSTANTS[55]*CONSTANTS[2]*ALGEBRAIC[0];
ALGEBRAIC[83] =  CONSTANTS[27]*(exp(ALGEBRAIC[24]/( CONSTANTS[0]*CONSTANTS[1])) - exp(ALGEBRAIC[54]/( CONSTANTS[0]*CONSTANTS[1])));
ALGEBRAIC[32] =  CONSTANTS[0]*CONSTANTS[1]*log( CONSTANTS[12]*STATES[6])+ CONSTANTS[53]*CONSTANTS[2]*ALGEBRAIC[0];
ALGEBRAIC[62] =  CONSTANTS[0]*CONSTANTS[1]*log( CONSTANTS[13]*STATES[14])+ CONSTANTS[56]*CONSTANTS[2]*ALGEBRAIC[0];
ALGEBRAIC[91] =  CONSTANTS[35]*(exp(ALGEBRAIC[32]/( CONSTANTS[0]*CONSTANTS[1])) - exp(ALGEBRAIC[62]/( CONSTANTS[0]*CONSTANTS[1])));
ALGEBRAIC[44] =  CONSTANTS[0]*CONSTANTS[1]*log( CONSTANTS[12]*STATES[6])+ CONSTANTS[54]*CONSTANTS[2]*ALGEBRAIC[0];
ALGEBRAIC[74] =  CONSTANTS[0]*CONSTANTS[1]*log( CONSTANTS[16]*STATES[8])+ CONSTANTS[57]*CONSTANTS[2]*ALGEBRAIC[0];
ALGEBRAIC[103] =  CONSTANTS[47]*(exp(ALGEBRAIC[44]/( CONSTANTS[0]*CONSTANTS[1])) - exp(ALGEBRAIC[74]/( CONSTANTS[0]*CONSTANTS[1])));
ALGEBRAIC[115] = ((ALGEBRAIC[99] - ALGEBRAIC[103]) - ALGEBRAIC[83]) - ALGEBRAIC[91];
ALGEBRAIC[25] =  CONSTANTS[0]*CONSTANTS[1]*log( CONSTANTS[13]*STATES[14])+ CONSTANTS[52]*CONSTANTS[2]*ALGEBRAIC[0];
ALGEBRAIC[55] =  CONSTANTS[0]*CONSTANTS[1]*log( CONSTANTS[15]*STATES[15])+ CONSTANTS[55]*CONSTANTS[2]*ALGEBRAIC[0];
ALGEBRAIC[84] =  CONSTANTS[28]*(exp(ALGEBRAIC[25]/( CONSTANTS[0]*CONSTANTS[1])) - exp(ALGEBRAIC[55]/( CONSTANTS[0]*CONSTANTS[1])));
ALGEBRAIC[45] =  CONSTANTS[0]*CONSTANTS[1]*log( CONSTANTS[13]*STATES[14])+ CONSTANTS[54]*CONSTANTS[2]*ALGEBRAIC[0];
ALGEBRAIC[75] =  CONSTANTS[0]*CONSTANTS[1]*log( CONSTANTS[17]*STATES[16])+ CONSTANTS[57]*CONSTANTS[2]*ALGEBRAIC[0];
ALGEBRAIC[104] =  CONSTANTS[48]*(exp(ALGEBRAIC[45]/( CONSTANTS[0]*CONSTANTS[1])) - exp(ALGEBRAIC[75]/( CONSTANTS[0]*CONSTANTS[1])));
ALGEBRAIC[116] = ((ALGEBRAIC[100] - ALGEBRAIC[104]) - ALGEBRAIC[84]) - - ALGEBRAIC[91];
ALGEBRAIC[33] =  CONSTANTS[0]*CONSTANTS[1]*log( CONSTANTS[14]*STATES[7])+ CONSTANTS[53]*CONSTANTS[2]*ALGEBRAIC[0];
ALGEBRAIC[63] =  CONSTANTS[0]*CONSTANTS[1]*log( CONSTANTS[15]*STATES[15])+ CONSTANTS[56]*CONSTANTS[2]*ALGEBRAIC[0];
ALGEBRAIC[92] =  CONSTANTS[36]*(exp(ALGEBRAIC[33]/( CONSTANTS[0]*CONSTANTS[1])) - exp(ALGEBRAIC[63]/( CONSTANTS[0]*CONSTANTS[1])));
ALGEBRAIC[46] =  CONSTANTS[0]*CONSTANTS[1]*log( CONSTANTS[14]*STATES[7])+ CONSTANTS[54]*CONSTANTS[2]*ALGEBRAIC[0];
ALGEBRAIC[76] =  CONSTANTS[0]*CONSTANTS[1]*log( CONSTANTS[18]*STATES[9])+ CONSTANTS[57]*CONSTANTS[2]*ALGEBRAIC[0];
ALGEBRAIC[105] =  CONSTANTS[49]*(exp(ALGEBRAIC[46]/( CONSTANTS[0]*CONSTANTS[1])) - exp(ALGEBRAIC[76]/( CONSTANTS[0]*CONSTANTS[1])));
ALGEBRAIC[117] = ((ALGEBRAIC[101] - ALGEBRAIC[105])+ALGEBRAIC[83]) - ALGEBRAIC[92];
ALGEBRAIC[47] =  CONSTANTS[0]*CONSTANTS[1]*log( CONSTANTS[15]*STATES[15])+ CONSTANTS[54]*CONSTANTS[2]*ALGEBRAIC[0];
ALGEBRAIC[77] =  CONSTANTS[0]*CONSTANTS[1]*log( CONSTANTS[19]*STATES[17])+ CONSTANTS[57]*CONSTANTS[2]*ALGEBRAIC[0];
ALGEBRAIC[106] =  CONSTANTS[50]*(exp(ALGEBRAIC[47]/( CONSTANTS[0]*CONSTANTS[1])) - exp(ALGEBRAIC[77]/( CONSTANTS[0]*CONSTANTS[1])));
ALGEBRAIC[118] = ((ALGEBRAIC[102] - ALGEBRAIC[106])+ALGEBRAIC[84]) - - ALGEBRAIC[92];
ALGEBRAIC[26] =  CONSTANTS[0]*CONSTANTS[1]*log( CONSTANTS[16]*STATES[8])+ CONSTANTS[52]*CONSTANTS[2]*ALGEBRAIC[0];
ALGEBRAIC[56] =  CONSTANTS[0]*CONSTANTS[1]*log( CONSTANTS[18]*STATES[9])+ CONSTANTS[55]*CONSTANTS[2]*ALGEBRAIC[0];
ALGEBRAIC[85] =  CONSTANTS[29]*(exp(ALGEBRAIC[26]/( CONSTANTS[0]*CONSTANTS[1])) - exp(ALGEBRAIC[56]/( CONSTANTS[0]*CONSTANTS[1])));
ALGEBRAIC[34] =  CONSTANTS[0]*CONSTANTS[1]*log( CONSTANTS[16]*STATES[8])+ CONSTANTS[53]*CONSTANTS[2]*ALGEBRAIC[0];
ALGEBRAIC[64] =  CONSTANTS[0]*CONSTANTS[1]*log( CONSTANTS[17]*STATES[16])+ CONSTANTS[56]*CONSTANTS[2]*ALGEBRAIC[0];
ALGEBRAIC[93] =  CONSTANTS[37]*(exp(ALGEBRAIC[34]/( CONSTANTS[0]*CONSTANTS[1])) - exp(ALGEBRAIC[64]/( CONSTANTS[0]*CONSTANTS[1])));
ALGEBRAIC[119] = (ALGEBRAIC[103] - ALGEBRAIC[85]) - ALGEBRAIC[93];
ALGEBRAIC[27] =  CONSTANTS[0]*CONSTANTS[1]*log( CONSTANTS[17]*STATES[16])+ CONSTANTS[52]*CONSTANTS[2]*ALGEBRAIC[0];
ALGEBRAIC[57] =  CONSTANTS[0]*CONSTANTS[1]*log( CONSTANTS[19]*STATES[17])+ CONSTANTS[55]*CONSTANTS[2]*ALGEBRAIC[0];
ALGEBRAIC[86] =  CONSTANTS[30]*(exp(ALGEBRAIC[27]/( CONSTANTS[0]*CONSTANTS[1])) - exp(ALGEBRAIC[57]/( CONSTANTS[0]*CONSTANTS[1])));
ALGEBRAIC[120] = (ALGEBRAIC[104] - ALGEBRAIC[86]) - - ALGEBRAIC[93];
ALGEBRAIC[35] =  CONSTANTS[0]*CONSTANTS[1]*log( CONSTANTS[18]*STATES[9])+ CONSTANTS[53]*CONSTANTS[2]*ALGEBRAIC[0];
ALGEBRAIC[65] =  CONSTANTS[0]*CONSTANTS[1]*log( CONSTANTS[19]*STATES[17])+ CONSTANTS[56]*CONSTANTS[2]*ALGEBRAIC[0];
ALGEBRAIC[94] =  CONSTANTS[38]*(exp(ALGEBRAIC[35]/( CONSTANTS[0]*CONSTANTS[1])) - exp(ALGEBRAIC[65]/( CONSTANTS[0]*CONSTANTS[1])));
ALGEBRAIC[121] = (ALGEBRAIC[105]+ALGEBRAIC[85]) - ALGEBRAIC[94];
ALGEBRAIC[122] = (ALGEBRAIC[106]+ALGEBRAIC[86]) - ((- ALGEBRAIC[94]+ALGEBRAIC[78]) - ALGEBRAIC[78]);
ALGEBRAIC[123] =  CONSTANTS[2]*(((((((((((((((((((((((((((((((((((((((((((((((((((((((( - CONSTANTS[51]*ALGEBRAIC[78]+ CONSTANTS[57]*ALGEBRAIC[95]) -  CONSTANTS[54]*ALGEBRAIC[95])+ CONSTANTS[57]*ALGEBRAIC[99]) -  CONSTANTS[54]*ALGEBRAIC[99])+ CONSTANTS[57]*ALGEBRAIC[97]) -  CONSTANTS[54]*ALGEBRAIC[97])+ CONSTANTS[57]*ALGEBRAIC[101]) -  CONSTANTS[54]*ALGEBRAIC[101])+ CONSTANTS[57]*ALGEBRAIC[105]) -  CONSTANTS[54]*ALGEBRAIC[105])+ CONSTANTS[55]*ALGEBRAIC[79]) -  CONSTANTS[52]*ALGEBRAIC[79])+ CONSTANTS[55]*ALGEBRAIC[83]) -  CONSTANTS[52]*ALGEBRAIC[83])+ CONSTANTS[56]*ALGEBRAIC[89]) -  CONSTANTS[53]*ALGEBRAIC[89])+ CONSTANTS[56]*ALGEBRAIC[91]) -  CONSTANTS[53]*ALGEBRAIC[91])+ CONSTANTS[56]*ALGEBRAIC[93]) -  CONSTANTS[53]*ALGEBRAIC[93])+ CONSTANTS[57]*ALGEBRAIC[103]) -  CONSTANTS[54]*ALGEBRAIC[103])+ CONSTANTS[55]*ALGEBRAIC[81]) -  CONSTANTS[52]*ALGEBRAIC[81])+ CONSTANTS[55]*ALGEBRAIC[85]) -  CONSTANTS[52]*ALGEBRAIC[85])+ CONSTANTS[56]*ALGEBRAIC[87]) -  CONSTANTS[53]*ALGEBRAIC[87])+ CONSTANTS[57]*ALGEBRAIC[96]) -  CONSTANTS[54]*ALGEBRAIC[96])+ CONSTANTS[57]*ALGEBRAIC[100]) -  CONSTANTS[54]*ALGEBRAIC[100])+ CONSTANTS[57]*ALGEBRAIC[98]) -  CONSTANTS[54]*ALGEBRAIC[98])+ CONSTANTS[57]*ALGEBRAIC[102]) -  CONSTANTS[54]*ALGEBRAIC[102])+ CONSTANTS[57]*ALGEBRAIC[106]) -  CONSTANTS[54]*ALGEBRAIC[106])+ CONSTANTS[55]*ALGEBRAIC[80]) -  CONSTANTS[52]*ALGEBRAIC[80])+ CONSTANTS[55]*ALGEBRAIC[84]) -  CONSTANTS[52]*ALGEBRAIC[84])+ CONSTANTS[56]*ALGEBRAIC[88]) -  CONSTANTS[53]*ALGEBRAIC[88])+ CONSTANTS[56]*ALGEBRAIC[90]) -  CONSTANTS[53]*ALGEBRAIC[90])+ CONSTANTS[56]*ALGEBRAIC[92]) -  CONSTANTS[53]*ALGEBRAIC[92])+ CONSTANTS[56]*ALGEBRAIC[94]) -  CONSTANTS[53]*ALGEBRAIC[94])+ CONSTANTS[57]*ALGEBRAIC[104]) -  CONSTANTS[54]*ALGEBRAIC[104])+ CONSTANTS[55]*ALGEBRAIC[82]) -  CONSTANTS[52]*ALGEBRAIC[82])+ CONSTANTS[55]*ALGEBRAIC[86]) -  CONSTANTS[52]*ALGEBRAIC[86]);
}
void
getStateInformation(double* SI)
{
SI[0] = 1.0;
SI[1] = 1.0;
SI[2] = 1.0;
SI[3] = 1.0;
SI[4] = 1.0;
SI[5] = 1.0;
SI[6] = 1.0;
SI[7] = 1.0;
SI[8] = 1.0;
SI[9] = 1.0;
SI[10] = 1.0;
SI[11] = 1.0;
SI[12] = 1.0;
SI[13] = 1.0;
SI[14] = 1.0;
SI[15] = 1.0;
SI[16] = 1.0;
SI[17] = 1.0;
SI[18] = 1.0;
}
void
computeRoots(double VOI, double* CONSTANTS, double* RATES, double* OLDRATES, double* STATES,
             double* OLDSTATES, double* ALGEBRAIC, double* CONDVARS)
{
}