Generated Code

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

The raw code is available.

/*
   There are a total of 64 entries in the algebraic variable array.
   There are a total of 27 entries in each of the rate and state variable arrays.
   There are a total of 40 entries in the constant variable array.
 */
/*
 * VOI is time in component environment (second).
 * STATES[0] is V in component membrane (millivolt).
 * CONSTANTS[0] is R in component membrane (joule_per_kilomole_kelvin).
 * CONSTANTS[1] is T in component membrane (kelvin).
 * CONSTANTS[2] is F in component membrane (coulomb_per_mole).
 * CONSTANTS[3] is Cm in component membrane (microF).
 * ALGEBRAIC[56] is i_Na in component sodium_current (nanoA).
 * ALGEBRAIC[36] is i_Ca_T in component T_type_Ca_channel (nanoA).
 * ALGEBRAIC[34] is i_Ca_L in component L_type_Ca_channel (nanoA).
 * ALGEBRAIC[59] is i_K in component delayed_rectifying_potassium_current (nanoA).
 * ALGEBRAIC[39] is i_f in component hyperpolarisation_activated_current (nanoA).
 * ALGEBRAIC[63] is i_B in component linear_background_current (nanoA).
 * ALGEBRAIC[40] is i_NaK in component sodium_potassium_pump (nanoA).
 * ALGEBRAIC[42] is i_NaCa in component sodium_calcium_pump (nanoA).
 * ALGEBRAIC[41] is i_Ca_P in component calcium_pump_current (nanoA).
 * CONSTANTS[4] is P_Na in component sodium_current (mul_per_second).
 * ALGEBRAIC[54] is E_Na in component reversal_potentials (millivolt).
 * STATES[1] is Na_c in component cleft_space_equations (millimolar).
 * STATES[2] is m in component sodium_current_m_gate (dimensionless).
 * STATES[3] is h1 in component sodium_current_h_gate (dimensionless).
 * STATES[4] is h2 in component sodium_current_h_gate (dimensionless).
 * ALGEBRAIC[21] is m_infinity in component sodium_current_m_gate (dimensionless).
 * ALGEBRAIC[27] is tau_m in component sodium_current_m_gate (second).
 * ALGEBRAIC[0] is alpha_m in component sodium_current_m_gate (per_second).
 * ALGEBRAIC[11] is beta_m in component sodium_current_m_gate (per_second).
 * ALGEBRAIC[22] is h1_infinity in component sodium_current_h_gate (dimensionless).
 * ALGEBRAIC[33] is h2_infinity in component sodium_current_h_gate (dimensionless).
 * ALGEBRAIC[28] is tau_h1 in component sodium_current_h_gate (second).
 * ALGEBRAIC[35] is tau_h2 in component sodium_current_h_gate (second).
 * ALGEBRAIC[1] is alpha_h1 in component sodium_current_h_gate (per_second).
 * ALGEBRAIC[12] is beta_h1 in component sodium_current_h_gate (per_second).
 * CONSTANTS[5] is g_Ca_L in component L_type_Ca_channel (microS).
 * CONSTANTS[6] is E_Ca_L in component L_type_Ca_channel (millivolt).
 * STATES[5] is d_L in component L_type_Ca_channel_d_gate (dimensionless).
 * ALGEBRAIC[32] is d_L_infinity in component L_type_Ca_channel_d_gate (dimensionless).
 * STATES[6] is f_L in component L_type_Ca_channel_f_gate (dimensionless).
 * ALGEBRAIC[8] is alpha_d_L in component L_type_Ca_channel_d_gate (per_second).
 * ALGEBRAIC[19] is beta_d_L in component L_type_Ca_channel_d_gate (per_second).
 * ALGEBRAIC[26] is tau_d_L in component L_type_Ca_channel_d_gate (second).
 * ALGEBRAIC[2] is alpha_f_L in component L_type_Ca_channel_f_gate (per_second).
 * ALGEBRAIC[13] is beta_f_L in component L_type_Ca_channel_f_gate (per_second).
 * ALGEBRAIC[29] is f_L_infinity in component L_type_Ca_channel_f_gate (dimensionless).
 * ALGEBRAIC[23] is tau_f_L in component L_type_Ca_channel_f_gate (second).
 * CONSTANTS[7] is g_Ca_T in component T_type_Ca_channel (microS).
 * CONSTANTS[8] is E_Ca_T in component T_type_Ca_channel (millivolt).
 * STATES[7] is d_T in component T_type_Ca_channel_d_gate (dimensionless).
 * STATES[8] is f_T in component T_type_Ca_channel_f_gate (dimensionless).
 * ALGEBRAIC[3] is alpha_d_T in component T_type_Ca_channel_d_gate (per_second).
 * ALGEBRAIC[14] is beta_d_T in component T_type_Ca_channel_d_gate (per_second).
 * ALGEBRAIC[30] is d_T_infinity in component T_type_Ca_channel_d_gate (dimensionless).
 * ALGEBRAIC[24] is tau_d_T in component T_type_Ca_channel_d_gate (second).
 * ALGEBRAIC[4] is alpha_f_T in component T_type_Ca_channel_f_gate (per_second).
 * ALGEBRAIC[15] is beta_f_T in component T_type_Ca_channel_f_gate (per_second).
 * ALGEBRAIC[31] is f_T_infinity in component T_type_Ca_channel_f_gate (dimensionless).
 * ALGEBRAIC[25] is tau_f_T in component T_type_Ca_channel_f_gate (second).
 * CONSTANTS[34] is g_K in component delayed_rectifying_potassium_current (microS).
 * ALGEBRAIC[58] is E_K in component reversal_potentials (millivolt).
 * CONSTANTS[9] is K_b in component cleft_space_equations (millimolar).
 * STATES[9] is P_a in component delayed_rectifying_potassium_current_P_a_gate (dimensionless).
 * STATES[10] is P_i in component delayed_rectifying_potassium_current_P_i_gate (dimensionless).
 * ALGEBRAIC[16] is tau_P_a in component delayed_rectifying_potassium_current_P_a_gate (second).
 * ALGEBRAIC[5] is P_a_infinity in component delayed_rectifying_potassium_current_P_a_gate (dimensionless).
 * ALGEBRAIC[6] is alpha_P_i in component delayed_rectifying_potassium_current_P_i_gate (per_second).
 * ALGEBRAIC[17] is beta_P_i in component delayed_rectifying_potassium_current_P_i_gate (per_second).
 * ALGEBRAIC[57] is i_B_Na in component linear_background_current (nanoA).
 * ALGEBRAIC[62] is i_B_Ca in component linear_background_current (nanoA).
 * ALGEBRAIC[60] is i_B_K in component linear_background_current (nanoA).
 * CONSTANTS[10] is g_B_Na in component linear_background_current (microS).
 * CONSTANTS[11] is g_B_Ca in component linear_background_current (microS).
 * CONSTANTS[12] is g_B_K in component linear_background_current (microS).
 * ALGEBRAIC[61] is E_Ca in component reversal_potentials (millivolt).
 * ALGEBRAIC[37] is i_f_Na in component hyperpolarisation_activated_current (nanoA).
 * ALGEBRAIC[38] is i_f_K in component hyperpolarisation_activated_current (nanoA).
 * CONSTANTS[13] is g_f_Na in component hyperpolarisation_activated_current (microS).
 * CONSTANTS[14] is g_f_K in component hyperpolarisation_activated_current (microS).
 * STATES[11] is y in component hyperpolarisation_activated_current_y_gate (dimensionless).
 * ALGEBRAIC[7] is y_infinity in component hyperpolarisation_activated_current_y_gate (dimensionless).
 * ALGEBRAIC[18] is tau_y in component hyperpolarisation_activated_current_y_gate (second).
 * CONSTANTS[15] is K_m_Na in component sodium_potassium_pump (millimolar).
 * CONSTANTS[16] is K_m_K in component sodium_potassium_pump (millimolar).
 * CONSTANTS[17] is i_NaK_max in component sodium_potassium_pump (nanoA).
 * STATES[12] is Na_i in component intracellular_concentrations_and_buffer_equations (millimolar).
 * STATES[13] is K_c in component cleft_space_equations (millimolar).
 * CONSTANTS[18] is i_Ca_P_max in component calcium_pump_current (nanoA).
 * STATES[14] is Ca_i in component intracellular_concentrations_and_buffer_equations (millimolar).
 * CONSTANTS[19] is K_NaCa in component sodium_calcium_pump (nanoA).
 * CONSTANTS[20] is d_NaCa in component sodium_calcium_pump (dimensionless).
 * CONSTANTS[21] is gamma in component sodium_calcium_pump (dimensionless).
 * STATES[15] is Ca_c in component cleft_space_equations (millimolar).
 * STATES[16] is K_i in component intracellular_concentrations_and_buffer_equations (millimolar).
 * STATES[17] is Ca_Calmod in component intracellular_concentrations_and_buffer_equations (dimensionless).
 * STATES[18] is Ca_Trop in component intracellular_concentrations_and_buffer_equations (dimensionless).
 * STATES[19] is Ca_Mg_Trop in component intracellular_concentrations_and_buffer_equations (dimensionless).
 * STATES[20] is Mg_Mg_Trop in component intracellular_concentrations_and_buffer_equations (dimensionless).
 * ALGEBRAIC[43] is phi_C in component intracellular_concentrations_and_buffer_equations (per_second).
 * ALGEBRAIC[44] is phi_TC in component intracellular_concentrations_and_buffer_equations (per_second).
 * ALGEBRAIC[45] is phi_TMgC in component intracellular_concentrations_and_buffer_equations (per_second).
 * ALGEBRAIC[9] is phi_TMgM in component intracellular_concentrations_and_buffer_equations (per_second).
 * ALGEBRAIC[49] is phi_B in component intracellular_concentrations_and_buffer_equations (millimolar_per_second).
 * CONSTANTS[22] is Mg_i in component intracellular_concentrations_and_buffer_equations (millimolar).
 * ALGEBRAIC[46] is F_C in component intracellular_concentrations_and_buffer_equations (millimolar_per_second).
 * ALGEBRAIC[47] is F_TC in component intracellular_concentrations_and_buffer_equations (millimolar_per_second).
 * ALGEBRAIC[48] is F_TMgC in component intracellular_concentrations_and_buffer_equations (millimolar_per_second).
 * CONSTANTS[23] is Vol in component cleft_space_equations (microLitre).
 * CONSTANTS[35] is V_i in component intracellular_concentrations_and_buffer_equations (microLitre).
 * ALGEBRAIC[52] is i_up in component SR_Ca_uptake_and_release (nanoA).
 * ALGEBRAIC[53] is i_rel in component SR_Ca_uptake_and_release (nanoA).
 * CONSTANTS[24] is Na_b in component cleft_space_equations (millimolar).
 * CONSTANTS[25] is Ca_b in component cleft_space_equations (millimolar).
 * CONSTANTS[36] is V_c in component cleft_space_equations (microLitre).
 * CONSTANTS[26] is tau_p in component cleft_space_equations (second).
 * ALGEBRAIC[55] is i_tr in component SR_Ca_uptake_and_release (nanoA).
 * STATES[21] is Ca_up in component SR_Ca_uptake_and_release (millimolar).
 * STATES[22] is Ca_rel in component SR_Ca_uptake_and_release (millimolar).
 * CONSTANTS[27] is alpha_up in component SR_Ca_uptake_and_release (nanoA).
 * CONSTANTS[28] is beta_up in component SR_Ca_uptake_and_release (nanoA).
 * CONSTANTS[29] is alpha_rel in component SR_Ca_uptake_and_release (nanoA_per_millimolar).
 * CONSTANTS[37] is K1 in component SR_Ca_uptake_and_release (dimensionless).
 * ALGEBRAIC[51] is K2 in component SR_Ca_uptake_and_release (millimolar).
 * CONSTANTS[30] is k_cyca in component SR_Ca_uptake_and_release (millimolar).
 * CONSTANTS[31] is k_xcs in component SR_Ca_uptake_and_release (dimensionless).
 * CONSTANTS[32] is k_SRCa in component SR_Ca_uptake_and_release (millimolar).
 * CONSTANTS[33] is k_rel in component SR_Ca_uptake_and_release (millimolar).
 * ALGEBRAIC[10] is r_act in component SR_Ca_uptake_and_release (per_second).
 * ALGEBRAIC[20] is r_inact in component SR_Ca_uptake_and_release (per_second).
 * STATES[23] is Ca_Calse in component SR_Ca_uptake_and_release (dimensionless).
 * ALGEBRAIC[50] is phi_Calse in component SR_Ca_uptake_and_release (per_second).
 * STATES[24] is F1 in component SR_Ca_uptake_and_release (dimensionless).
 * STATES[25] is F2 in component SR_Ca_uptake_and_release (dimensionless).
 * STATES[26] is F3 in component SR_Ca_uptake_and_release (dimensionless).
 * CONSTANTS[38] is V_up in component SR_Ca_uptake_and_release (microLitre).
 * CONSTANTS[39] is V_rel in component SR_Ca_uptake_and_release (microLitre).
 * RATES[0] is d/dt V in component membrane (millivolt).
 * RATES[2] is d/dt m in component sodium_current_m_gate (dimensionless).
 * RATES[3] is d/dt h1 in component sodium_current_h_gate (dimensionless).
 * RATES[4] is d/dt h2 in component sodium_current_h_gate (dimensionless).
 * RATES[5] is d/dt d_L in component L_type_Ca_channel_d_gate (dimensionless).
 * RATES[6] is d/dt f_L in component L_type_Ca_channel_f_gate (dimensionless).
 * RATES[7] is d/dt d_T in component T_type_Ca_channel_d_gate (dimensionless).
 * RATES[8] is d/dt f_T in component T_type_Ca_channel_f_gate (dimensionless).
 * RATES[9] is d/dt P_a in component delayed_rectifying_potassium_current_P_a_gate (dimensionless).
 * RATES[10] is d/dt P_i in component delayed_rectifying_potassium_current_P_i_gate (dimensionless).
 * RATES[11] is d/dt y in component hyperpolarisation_activated_current_y_gate (dimensionless).
 * RATES[17] is d/dt Ca_Calmod in component intracellular_concentrations_and_buffer_equations (dimensionless).
 * RATES[18] is d/dt Ca_Trop in component intracellular_concentrations_and_buffer_equations (dimensionless).
 * RATES[19] is d/dt Ca_Mg_Trop in component intracellular_concentrations_and_buffer_equations (dimensionless).
 * RATES[20] is d/dt Mg_Mg_Trop in component intracellular_concentrations_and_buffer_equations (dimensionless).
 * RATES[12] is d/dt Na_i in component intracellular_concentrations_and_buffer_equations (millimolar).
 * RATES[16] is d/dt K_i in component intracellular_concentrations_and_buffer_equations (millimolar).
 * RATES[14] is d/dt Ca_i in component intracellular_concentrations_and_buffer_equations (millimolar).
 * RATES[1] is d/dt Na_c in component cleft_space_equations (millimolar).
 * RATES[13] is d/dt K_c in component cleft_space_equations (millimolar).
 * RATES[15] is d/dt Ca_c in component cleft_space_equations (millimolar).
 * RATES[23] is d/dt Ca_Calse in component SR_Ca_uptake_and_release (dimensionless).
 * RATES[24] is d/dt F1 in component SR_Ca_uptake_and_release (dimensionless).
 * RATES[25] is d/dt F2 in component SR_Ca_uptake_and_release (dimensionless).
 * RATES[26] is d/dt F3 in component SR_Ca_uptake_and_release (dimensionless).
 * RATES[21] is d/dt Ca_up in component SR_Ca_uptake_and_release (millimolar).
 * RATES[22] is d/dt Ca_rel in component SR_Ca_uptake_and_release (millimolar).
 */
void
initConsts(double* CONSTANTS, double* RATES, double *STATES)
{
STATES[0] = -49.54105;
CONSTANTS[0] = 8314.472;
CONSTANTS[1] = 310;
CONSTANTS[2] = 96485.3415;
CONSTANTS[3] = 5.5e-5;
CONSTANTS[4] = 0.00344;
STATES[1] = 139.9988;
STATES[2] = 0.250113;
STATES[3] = 0.001386897;
STATES[4] = 0.002065463;
CONSTANTS[5] = 0.02115;
CONSTANTS[6] = 46.4;
STATES[5] = 0.002572773;
STATES[6] = 0.98651;
CONSTANTS[7] = 0.02521;
CONSTANTS[8] = 45;
STATES[7] = 0.02012114;
STATES[8] = 0.1945111;
CONSTANTS[9] = 5.4;
STATES[9] = 0.02302278;
STATES[10] = 0.3777728;
CONSTANTS[10] = 0.00016;
CONSTANTS[11] = 0.0000364;
CONSTANTS[12] = 0.0000694;
CONSTANTS[13] = 0.0067478;
CONSTANTS[14] = 0.0128821;
STATES[11] = 0.09227776;
CONSTANTS[15] = 5.46;
CONSTANTS[16] = 0.621;
CONSTANTS[17] = 0.2192;
STATES[12] = 9.701621;
STATES[13] = 5.389014;
CONSTANTS[18] = 0.02869;
STATES[14] = 3.787018e-4;
CONSTANTS[19] = 0.00001248;
CONSTANTS[20] = 0.0001;
CONSTANTS[21] = 0.5;
STATES[15] = 2.00474;
STATES[16] = 1.407347e2;
STATES[17] = 0.1411678;
STATES[18] = 0.07331396;
STATES[19] = 0.7618549;
STATES[20] = 0.2097049;
CONSTANTS[22] = 2.5;
CONSTANTS[23] = 3.497e-6;
CONSTANTS[24] = 140;
CONSTANTS[25] = 2;
CONSTANTS[26] = 0.01;
STATES[21] = 16.95311;
STATES[22] = 16.85024;
CONSTANTS[27] = 0.08;
CONSTANTS[28] = 0.072;
CONSTANTS[29] = 0.5;
CONSTANTS[30] = 0.00005;
CONSTANTS[31] = 0.9;
CONSTANTS[32] = 22;
CONSTANTS[33] = 0.004;
STATES[23] = 0.9528726;
STATES[24] = 0.1133251;
STATES[25] = 0.0007594214;
STATES[26] = 0.8859153;
CONSTANTS[34] =  0.00693000*pow(CONSTANTS[9]/1.00000, 0.590000);
CONSTANTS[35] =  0.465000*CONSTANTS[23];
CONSTANTS[36] =  0.136000*CONSTANTS[23];
CONSTANTS[37] = ( CONSTANTS[30]*CONSTANTS[31])/CONSTANTS[32];
CONSTANTS[38] =  0.0116600*CONSTANTS[35];
CONSTANTS[39] =  0.00129600*CONSTANTS[35];
}
void
computeRates(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC)
{
ALGEBRAIC[9] =  1290.00*CONSTANTS[22]*(1.00000 - (STATES[19]+STATES[20])) -  429.000*STATES[20];
RATES[20] = ALGEBRAIC[9];
ALGEBRAIC[10] =  240.000*exp( (STATES[0] - 40.0000)*0.0800000)+ 240.000*pow(STATES[14]/(STATES[14]+CONSTANTS[33]), 4.00000);
RATES[24] =  0.960000*STATES[26] -  ALGEBRAIC[10]*STATES[24];
ALGEBRAIC[16] = 1.00000/( 17.0000*exp( 0.0398000*STATES[0])+ 2.11000*exp( - 0.0510000*STATES[0]));
ALGEBRAIC[5] = 1.00000/(1.00000+exp((STATES[0]+5.10000)/- 7.40000));
RATES[9] = (ALGEBRAIC[5] - STATES[9])/ALGEBRAIC[16];
ALGEBRAIC[6] =  100.000*exp( - 0.0183000*STATES[0]);
ALGEBRAIC[17] =  656.000*exp( 0.00942000*STATES[0]);
RATES[10] =  ALGEBRAIC[6]*(1.00000 - STATES[10]) -  ALGEBRAIC[17]*STATES[10];
ALGEBRAIC[7] = 1.00000/(1.00000+exp((STATES[0]+72.2000)/9.00000));
ALGEBRAIC[18] = 1.00000/( 1.64830*exp((STATES[0]+54.0600)/- 24.3300)+14.0106/(0.700000+exp((STATES[0]+60.0000)/- 5.50000)));
RATES[11] = (ALGEBRAIC[7] - STATES[11])/ALGEBRAIC[18];
ALGEBRAIC[20] = 40.0000+ 240.000*pow(STATES[14]/(STATES[14]+CONSTANTS[33]), 4.00000);
RATES[25] =  ALGEBRAIC[10]*STATES[24] -  ALGEBRAIC[20]*STATES[25];
RATES[26] =  ALGEBRAIC[20]*STATES[25] -  0.960000*STATES[26];
ALGEBRAIC[0] = ( - 824.000*(STATES[0]+51.9000))/(exp((STATES[0]+51.9000)/- 8.90000) - 1.00000);
ALGEBRAIC[11] =  32960.0*exp((STATES[0]+51.9000)/- 8.90000);
ALGEBRAIC[21] = ALGEBRAIC[0]/(ALGEBRAIC[0]+ALGEBRAIC[11]);
ALGEBRAIC[27] = 1.00000/(ALGEBRAIC[0]+ALGEBRAIC[11])+1.50000e-05;
RATES[2] = (ALGEBRAIC[21] - STATES[2])/ALGEBRAIC[27];
ALGEBRAIC[1] =  165.000*exp((STATES[0]+101.300)/- 12.6000);
ALGEBRAIC[12] = 12360.0/( 320.000*exp((STATES[0]+101.300)/- 12.6000)+1.00000);
ALGEBRAIC[22] = ALGEBRAIC[1]/(ALGEBRAIC[1]+ALGEBRAIC[12]);
ALGEBRAIC[28] = 1.00000/(ALGEBRAIC[1]+ALGEBRAIC[12]);
RATES[3] = (ALGEBRAIC[22] - STATES[3])/ALGEBRAIC[28];
ALGEBRAIC[32] = 1.00000/(1.00000+exp((STATES[0]+14.1000)/- 6.00000));
ALGEBRAIC[8] = ( - 28.3900*(STATES[0]+35.0000))/(exp((STATES[0]+35.0000)/- 2.50000) - 1.00000)+( - 84.9000*STATES[0])/(exp( - 0.208000*STATES[0]) - 1.00000);
ALGEBRAIC[19] = ( 11.4300*(STATES[0] - 5.00000))/(exp( 0.400000*(STATES[0] - 5.00000)) - 1.00000);
ALGEBRAIC[26] = 1.00000/(ALGEBRAIC[8]+ALGEBRAIC[19]);
RATES[5] = (ALGEBRAIC[32] - STATES[5])/ALGEBRAIC[26];
ALGEBRAIC[29] = 1.00000/(1.00000+exp((STATES[0]+30.0000)/5.00000));
ALGEBRAIC[2] = ( 3.75000*(STATES[0]+28.0000))/(exp((STATES[0]+28.0000)/4.00000) - 1.00000);
ALGEBRAIC[13] = 30.0000/(1.00000+exp((STATES[0]+28.0000)/- 4.00000));
ALGEBRAIC[23] = 1.00000/(ALGEBRAIC[2]+ALGEBRAIC[13]);
RATES[6] = (ALGEBRAIC[29] - STATES[6])/ALGEBRAIC[23];
ALGEBRAIC[30] = 1.00000/(1.00000+exp((STATES[0]+26.3000)/- 6.00000));
ALGEBRAIC[3] =  1068.00*exp((STATES[0]+26.3000)/30.0000);
ALGEBRAIC[14] =  1068.00*exp((STATES[0]+26.3000)/- 30.0000);
ALGEBRAIC[24] = 1.00000/(ALGEBRAIC[3]+ALGEBRAIC[14]);
RATES[7] = (ALGEBRAIC[30] - STATES[7])/ALGEBRAIC[24];
ALGEBRAIC[31] = 1.00000/(1.00000+exp((STATES[0]+61.7000)/5.60000));
ALGEBRAIC[4] =  15.3000*exp((STATES[0]+61.7000)/- 83.3000);
ALGEBRAIC[15] =  15.0000*exp((STATES[0]+61.7000)/15.3800);
ALGEBRAIC[25] = 1.00000/(ALGEBRAIC[4]+ALGEBRAIC[15]);
RATES[8] = (ALGEBRAIC[31] - STATES[8])/ALGEBRAIC[25];
ALGEBRAIC[33] = ALGEBRAIC[22];
ALGEBRAIC[35] =  20.0000*ALGEBRAIC[28];
RATES[4] = (ALGEBRAIC[33] - STATES[4])/ALGEBRAIC[35];
ALGEBRAIC[43] =  129000.*STATES[14]*(1.00000 - STATES[17]) -  307.000*STATES[17];
RATES[17] = ALGEBRAIC[43];
ALGEBRAIC[44] =  50500.0*STATES[14]*(1.00000 - STATES[18]) -  252.000*STATES[18];
RATES[18] = ALGEBRAIC[44];
ALGEBRAIC[45] =  129000.*STATES[14]*(1.00000 - (STATES[19]+STATES[20])) -  4.25000*STATES[19];
RATES[19] = ALGEBRAIC[45];
ALGEBRAIC[50] =  770.000*STATES[22]*(1.00000 - STATES[23]) -  641.000*STATES[23];
RATES[23] = ALGEBRAIC[50];
ALGEBRAIC[51] = STATES[14]+ STATES[21]*CONSTANTS[37]+ CONSTANTS[30]*CONSTANTS[31]+CONSTANTS[30];
ALGEBRAIC[52] = ( CONSTANTS[27]*STATES[14] -  CONSTANTS[28]*STATES[21]*CONSTANTS[37])/ALGEBRAIC[51];
ALGEBRAIC[55] = ( (STATES[21] - STATES[22])*2.00000*CONSTANTS[2]*CONSTANTS[38])/0.0641800;
RATES[21] = (ALGEBRAIC[52] - ALGEBRAIC[55])/( 2.00000*CONSTANTS[38]*CONSTANTS[2]);
ALGEBRAIC[53] =  CONSTANTS[29]*pow(STATES[25]/(STATES[25]+0.250000), 2.00000)*STATES[22];
RATES[22] = (ALGEBRAIC[55] - ALGEBRAIC[53])/( 2.00000*CONSTANTS[39]*CONSTANTS[2]) -  11.4800*ALGEBRAIC[50];
ALGEBRAIC[54] =  (( CONSTANTS[0]*CONSTANTS[1])/CONSTANTS[2])*log(STATES[1]/STATES[12]);
ALGEBRAIC[56] = ( (( CONSTANTS[4]*pow(STATES[2], 3.00000)*STATES[3]*STATES[4]*STATES[1]*STATES[0]*pow(CONSTANTS[2], 2.00000))/( CONSTANTS[0]*CONSTANTS[1]))*(exp(( (STATES[0] - ALGEBRAIC[54])*CONSTANTS[2])/( CONSTANTS[0]*CONSTANTS[1])) - 1.00000))/(exp(( STATES[0]*CONSTANTS[2])/( CONSTANTS[0]*CONSTANTS[1])) - 1.00000);
ALGEBRAIC[40] = ( CONSTANTS[17]*pow(STATES[12]/(CONSTANTS[15]+STATES[12]), 3.00000)*pow(STATES[13]/(CONSTANTS[16]+STATES[13]), 2.00000)*1.60000)/(1.50000+exp((STATES[0]+60.0000)/- 40.0000));
ALGEBRAIC[42] = ( CONSTANTS[19]*( pow(STATES[12], 3.00000)*STATES[15]*exp( 0.0374300*STATES[0]*CONSTANTS[21]) -  pow(STATES[1], 3.00000)*STATES[14]*exp( 0.0374300*STATES[0]*(CONSTANTS[21] - 1.00000))))/(1.00000+ CONSTANTS[20]*( STATES[14]*pow(STATES[1], 3.00000)+ STATES[15]*pow(STATES[12], 3.00000)));
ALGEBRAIC[57] =  CONSTANTS[10]*(STATES[0] - ALGEBRAIC[54]);
ALGEBRAIC[37] =  CONSTANTS[13]*pow(STATES[11], 2.00000)*(STATES[0] - 75.0000);
RATES[12] = - ( 3.00000*ALGEBRAIC[40]+ 3.00000*ALGEBRAIC[42]+ALGEBRAIC[57]+ALGEBRAIC[37]+ALGEBRAIC[56])/( CONSTANTS[2]*CONSTANTS[35]);
RATES[1] = (CONSTANTS[24] - STATES[1])/CONSTANTS[26]+(ALGEBRAIC[56]+ 3.00000*ALGEBRAIC[42]+ 3.00000*ALGEBRAIC[40]+ALGEBRAIC[57]+ALGEBRAIC[37])/( CONSTANTS[2]*CONSTANTS[36]);
ALGEBRAIC[58] =  (( CONSTANTS[0]*CONSTANTS[1])/CONSTANTS[2])*log(STATES[13]/STATES[16]);
ALGEBRAIC[59] =  CONSTANTS[34]*STATES[9]*STATES[10]*(STATES[0] - ALGEBRAIC[58]);
ALGEBRAIC[60] =  CONSTANTS[12]*(STATES[0] - ALGEBRAIC[58]);
ALGEBRAIC[38] =  CONSTANTS[14]*pow(STATES[11], 2.00000)*(STATES[0]+85.0000);
RATES[16] = ( 2.00000*ALGEBRAIC[40] - (ALGEBRAIC[59]+ALGEBRAIC[38]+ALGEBRAIC[60]))/( CONSTANTS[2]*CONSTANTS[35]);
RATES[13] = (CONSTANTS[9] - STATES[13])/CONSTANTS[26]+( - 2.00000*ALGEBRAIC[40]+ALGEBRAIC[59]+ALGEBRAIC[60]+ALGEBRAIC[38])/( CONSTANTS[2]*CONSTANTS[36]);
ALGEBRAIC[36] =  CONSTANTS[7]*STATES[7]*STATES[8]*(STATES[0] - CONSTANTS[8]);
ALGEBRAIC[34] =  CONSTANTS[5]*( STATES[6]*STATES[5]+ 0.0950000*ALGEBRAIC[32])*(STATES[0] - CONSTANTS[6]);
ALGEBRAIC[41] = ( CONSTANTS[18]*STATES[14])/(STATES[14]+0.000400000);
ALGEBRAIC[61] =  (( 0.500000*CONSTANTS[0]*CONSTANTS[1])/CONSTANTS[2])*log(STATES[15]/STATES[14]);
ALGEBRAIC[62] =  CONSTANTS[11]*(STATES[0] - ALGEBRAIC[61]);
ALGEBRAIC[46] =  0.0900000*ALGEBRAIC[43];
ALGEBRAIC[47] =  0.0310000*ALGEBRAIC[44];
ALGEBRAIC[48] =  0.0620000*ALGEBRAIC[45];
ALGEBRAIC[49] = ALGEBRAIC[46]+ALGEBRAIC[47]+ALGEBRAIC[48];
RATES[14] = (( 2.00000*ALGEBRAIC[42]+ALGEBRAIC[53]) - (ALGEBRAIC[34]+ALGEBRAIC[36]+ALGEBRAIC[41]+ALGEBRAIC[62]+ALGEBRAIC[52]))/( 2.00000*CONSTANTS[35]*CONSTANTS[2]) - ALGEBRAIC[49];
RATES[15] = (CONSTANTS[25] - STATES[15])/CONSTANTS[26]+( - 2.00000*ALGEBRAIC[42]+ALGEBRAIC[34]+ALGEBRAIC[36]+ALGEBRAIC[41]+ALGEBRAIC[62])/( 2.00000*CONSTANTS[2]*CONSTANTS[36]);
ALGEBRAIC[39] = ALGEBRAIC[37]+ALGEBRAIC[38];
ALGEBRAIC[63] = ALGEBRAIC[57]+ALGEBRAIC[62]+ALGEBRAIC[60];
RATES[0] = - (ALGEBRAIC[56]+ALGEBRAIC[36]+ALGEBRAIC[34]+ALGEBRAIC[59]+ALGEBRAIC[39]+ALGEBRAIC[63]+ALGEBRAIC[40]+ALGEBRAIC[42]+ALGEBRAIC[41])/CONSTANTS[3];
}
void
computeVariables(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC)
{
ALGEBRAIC[9] =  1290.00*CONSTANTS[22]*(1.00000 - (STATES[19]+STATES[20])) -  429.000*STATES[20];
ALGEBRAIC[10] =  240.000*exp( (STATES[0] - 40.0000)*0.0800000)+ 240.000*pow(STATES[14]/(STATES[14]+CONSTANTS[33]), 4.00000);
ALGEBRAIC[16] = 1.00000/( 17.0000*exp( 0.0398000*STATES[0])+ 2.11000*exp( - 0.0510000*STATES[0]));
ALGEBRAIC[5] = 1.00000/(1.00000+exp((STATES[0]+5.10000)/- 7.40000));
ALGEBRAIC[6] =  100.000*exp( - 0.0183000*STATES[0]);
ALGEBRAIC[17] =  656.000*exp( 0.00942000*STATES[0]);
ALGEBRAIC[7] = 1.00000/(1.00000+exp((STATES[0]+72.2000)/9.00000));
ALGEBRAIC[18] = 1.00000/( 1.64830*exp((STATES[0]+54.0600)/- 24.3300)+14.0106/(0.700000+exp((STATES[0]+60.0000)/- 5.50000)));
ALGEBRAIC[20] = 40.0000+ 240.000*pow(STATES[14]/(STATES[14]+CONSTANTS[33]), 4.00000);
ALGEBRAIC[0] = ( - 824.000*(STATES[0]+51.9000))/(exp((STATES[0]+51.9000)/- 8.90000) - 1.00000);
ALGEBRAIC[11] =  32960.0*exp((STATES[0]+51.9000)/- 8.90000);
ALGEBRAIC[21] = ALGEBRAIC[0]/(ALGEBRAIC[0]+ALGEBRAIC[11]);
ALGEBRAIC[27] = 1.00000/(ALGEBRAIC[0]+ALGEBRAIC[11])+1.50000e-05;
ALGEBRAIC[1] =  165.000*exp((STATES[0]+101.300)/- 12.6000);
ALGEBRAIC[12] = 12360.0/( 320.000*exp((STATES[0]+101.300)/- 12.6000)+1.00000);
ALGEBRAIC[22] = ALGEBRAIC[1]/(ALGEBRAIC[1]+ALGEBRAIC[12]);
ALGEBRAIC[28] = 1.00000/(ALGEBRAIC[1]+ALGEBRAIC[12]);
ALGEBRAIC[32] = 1.00000/(1.00000+exp((STATES[0]+14.1000)/- 6.00000));
ALGEBRAIC[8] = ( - 28.3900*(STATES[0]+35.0000))/(exp((STATES[0]+35.0000)/- 2.50000) - 1.00000)+( - 84.9000*STATES[0])/(exp( - 0.208000*STATES[0]) - 1.00000);
ALGEBRAIC[19] = ( 11.4300*(STATES[0] - 5.00000))/(exp( 0.400000*(STATES[0] - 5.00000)) - 1.00000);
ALGEBRAIC[26] = 1.00000/(ALGEBRAIC[8]+ALGEBRAIC[19]);
ALGEBRAIC[29] = 1.00000/(1.00000+exp((STATES[0]+30.0000)/5.00000));
ALGEBRAIC[2] = ( 3.75000*(STATES[0]+28.0000))/(exp((STATES[0]+28.0000)/4.00000) - 1.00000);
ALGEBRAIC[13] = 30.0000/(1.00000+exp((STATES[0]+28.0000)/- 4.00000));
ALGEBRAIC[23] = 1.00000/(ALGEBRAIC[2]+ALGEBRAIC[13]);
ALGEBRAIC[30] = 1.00000/(1.00000+exp((STATES[0]+26.3000)/- 6.00000));
ALGEBRAIC[3] =  1068.00*exp((STATES[0]+26.3000)/30.0000);
ALGEBRAIC[14] =  1068.00*exp((STATES[0]+26.3000)/- 30.0000);
ALGEBRAIC[24] = 1.00000/(ALGEBRAIC[3]+ALGEBRAIC[14]);
ALGEBRAIC[31] = 1.00000/(1.00000+exp((STATES[0]+61.7000)/5.60000));
ALGEBRAIC[4] =  15.3000*exp((STATES[0]+61.7000)/- 83.3000);
ALGEBRAIC[15] =  15.0000*exp((STATES[0]+61.7000)/15.3800);
ALGEBRAIC[25] = 1.00000/(ALGEBRAIC[4]+ALGEBRAIC[15]);
ALGEBRAIC[33] = ALGEBRAIC[22];
ALGEBRAIC[35] =  20.0000*ALGEBRAIC[28];
ALGEBRAIC[43] =  129000.*STATES[14]*(1.00000 - STATES[17]) -  307.000*STATES[17];
ALGEBRAIC[44] =  50500.0*STATES[14]*(1.00000 - STATES[18]) -  252.000*STATES[18];
ALGEBRAIC[45] =  129000.*STATES[14]*(1.00000 - (STATES[19]+STATES[20])) -  4.25000*STATES[19];
ALGEBRAIC[50] =  770.000*STATES[22]*(1.00000 - STATES[23]) -  641.000*STATES[23];
ALGEBRAIC[51] = STATES[14]+ STATES[21]*CONSTANTS[37]+ CONSTANTS[30]*CONSTANTS[31]+CONSTANTS[30];
ALGEBRAIC[52] = ( CONSTANTS[27]*STATES[14] -  CONSTANTS[28]*STATES[21]*CONSTANTS[37])/ALGEBRAIC[51];
ALGEBRAIC[55] = ( (STATES[21] - STATES[22])*2.00000*CONSTANTS[2]*CONSTANTS[38])/0.0641800;
ALGEBRAIC[53] =  CONSTANTS[29]*pow(STATES[25]/(STATES[25]+0.250000), 2.00000)*STATES[22];
ALGEBRAIC[54] =  (( CONSTANTS[0]*CONSTANTS[1])/CONSTANTS[2])*log(STATES[1]/STATES[12]);
ALGEBRAIC[56] = ( (( CONSTANTS[4]*pow(STATES[2], 3.00000)*STATES[3]*STATES[4]*STATES[1]*STATES[0]*pow(CONSTANTS[2], 2.00000))/( CONSTANTS[0]*CONSTANTS[1]))*(exp(( (STATES[0] - ALGEBRAIC[54])*CONSTANTS[2])/( CONSTANTS[0]*CONSTANTS[1])) - 1.00000))/(exp(( STATES[0]*CONSTANTS[2])/( CONSTANTS[0]*CONSTANTS[1])) - 1.00000);
ALGEBRAIC[40] = ( CONSTANTS[17]*pow(STATES[12]/(CONSTANTS[15]+STATES[12]), 3.00000)*pow(STATES[13]/(CONSTANTS[16]+STATES[13]), 2.00000)*1.60000)/(1.50000+exp((STATES[0]+60.0000)/- 40.0000));
ALGEBRAIC[42] = ( CONSTANTS[19]*( pow(STATES[12], 3.00000)*STATES[15]*exp( 0.0374300*STATES[0]*CONSTANTS[21]) -  pow(STATES[1], 3.00000)*STATES[14]*exp( 0.0374300*STATES[0]*(CONSTANTS[21] - 1.00000))))/(1.00000+ CONSTANTS[20]*( STATES[14]*pow(STATES[1], 3.00000)+ STATES[15]*pow(STATES[12], 3.00000)));
ALGEBRAIC[57] =  CONSTANTS[10]*(STATES[0] - ALGEBRAIC[54]);
ALGEBRAIC[37] =  CONSTANTS[13]*pow(STATES[11], 2.00000)*(STATES[0] - 75.0000);
ALGEBRAIC[58] =  (( CONSTANTS[0]*CONSTANTS[1])/CONSTANTS[2])*log(STATES[13]/STATES[16]);
ALGEBRAIC[59] =  CONSTANTS[34]*STATES[9]*STATES[10]*(STATES[0] - ALGEBRAIC[58]);
ALGEBRAIC[60] =  CONSTANTS[12]*(STATES[0] - ALGEBRAIC[58]);
ALGEBRAIC[38] =  CONSTANTS[14]*pow(STATES[11], 2.00000)*(STATES[0]+85.0000);
ALGEBRAIC[36] =  CONSTANTS[7]*STATES[7]*STATES[8]*(STATES[0] - CONSTANTS[8]);
ALGEBRAIC[34] =  CONSTANTS[5]*( STATES[6]*STATES[5]+ 0.0950000*ALGEBRAIC[32])*(STATES[0] - CONSTANTS[6]);
ALGEBRAIC[41] = ( CONSTANTS[18]*STATES[14])/(STATES[14]+0.000400000);
ALGEBRAIC[61] =  (( 0.500000*CONSTANTS[0]*CONSTANTS[1])/CONSTANTS[2])*log(STATES[15]/STATES[14]);
ALGEBRAIC[62] =  CONSTANTS[11]*(STATES[0] - ALGEBRAIC[61]);
ALGEBRAIC[46] =  0.0900000*ALGEBRAIC[43];
ALGEBRAIC[47] =  0.0310000*ALGEBRAIC[44];
ALGEBRAIC[48] =  0.0620000*ALGEBRAIC[45];
ALGEBRAIC[49] = ALGEBRAIC[46]+ALGEBRAIC[47]+ALGEBRAIC[48];
ALGEBRAIC[39] = ALGEBRAIC[37]+ALGEBRAIC[38];
ALGEBRAIC[63] = ALGEBRAIC[57]+ALGEBRAIC[62]+ALGEBRAIC[60];
}