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 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[57] is i_Na in component sodium_current (nanoA).
 * ALGEBRAIC[18] is i_Ca_T in component T_type_Ca_channel (nanoA).
 * ALGEBRAIC[58] is i_Ca_L in component L_type_Ca_channel (nanoA).
 * ALGEBRAIC[59] is i_K in component delayed_rectifying_potassium_current (nanoA).
 * ALGEBRAIC[33] is i_f in component hyperpolarisation_activated_current (nanoA).
 * ALGEBRAIC[63] is i_B in component linear_background_current (nanoA).
 * ALGEBRAIC[36] is i_NaK in component sodium_potassium_pump (nanoA).
 * ALGEBRAIC[38] is i_NaCa in component sodium_calcium_pump (nanoA).
 * ALGEBRAIC[37] 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[2] is m_infinity in component sodium_current_m_gate (dimensionless).
 * ALGEBRAIC[3] is tau_m in component sodium_current_m_gate (second).
 * ALGEBRAIC[0] is alpha_m in component sodium_current_m_gate (per_second).
 * ALGEBRAIC[1] is beta_m in component sodium_current_m_gate (per_second).
 * ALGEBRAIC[6] is h1_infinity in component sodium_current_h_gate (dimensionless).
 * ALGEBRAIC[8] is h2_infinity in component sodium_current_h_gate (dimensionless).
 * ALGEBRAIC[7] is tau_h1 in component sodium_current_h_gate (second).
 * ALGEBRAIC[9] is tau_h2 in component sodium_current_h_gate (second).
 * ALGEBRAIC[4] is alpha_h1 in component sodium_current_h_gate (per_second).
 * ALGEBRAIC[5] 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[13] 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[10] is alpha_d_L in component L_type_Ca_channel_d_gate (per_second).
 * ALGEBRAIC[11] is beta_d_L in component L_type_Ca_channel_d_gate (per_second).
 * ALGEBRAIC[12] is tau_d_L in component L_type_Ca_channel_d_gate (second).
 * ALGEBRAIC[14] is alpha_f_L in component L_type_Ca_channel_f_gate (per_second).
 * ALGEBRAIC[15] is beta_f_L in component L_type_Ca_channel_f_gate (per_second).
 * ALGEBRAIC[17] is f_L_infinity in component L_type_Ca_channel_f_gate (dimensionless).
 * ALGEBRAIC[16] 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[19] is alpha_d_T in component T_type_Ca_channel_d_gate (per_second).
 * ALGEBRAIC[20] is beta_d_T in component T_type_Ca_channel_d_gate (per_second).
 * ALGEBRAIC[22] is d_T_infinity in component T_type_Ca_channel_d_gate (dimensionless).
 * ALGEBRAIC[21] is tau_d_T in component T_type_Ca_channel_d_gate (second).
 * ALGEBRAIC[23] is alpha_f_T in component T_type_Ca_channel_f_gate (per_second).
 * ALGEBRAIC[24] is beta_f_T in component T_type_Ca_channel_f_gate (per_second).
 * ALGEBRAIC[26] 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[55] 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[28] is tau_P_a in component delayed_rectifying_potassium_current_P_a_gate (second).
 * ALGEBRAIC[27] is P_a_infinity in component delayed_rectifying_potassium_current_P_a_gate (dimensionless).
 * ALGEBRAIC[29] is alpha_P_i in component delayed_rectifying_potassium_current_P_i_gate (per_second).
 * ALGEBRAIC[30] is beta_P_i in component delayed_rectifying_potassium_current_P_i_gate (per_second).
 * ALGEBRAIC[60] is i_B_Na in component linear_background_current (nanoA).
 * ALGEBRAIC[61] is i_B_Ca in component linear_background_current (nanoA).
 * ALGEBRAIC[62] 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[56] is E_Ca in component reversal_potentials (millivolt).
 * ALGEBRAIC[31] is i_f_Na in component hyperpolarisation_activated_current (nanoA).
 * ALGEBRAIC[32] 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[34] is y_infinity in component hyperpolarisation_activated_current_y_gate (dimensionless).
 * ALGEBRAIC[35] 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[39] is phi_C in component intracellular_concentrations_and_buffer_equations (per_second).
 * ALGEBRAIC[40] is phi_TC in component intracellular_concentrations_and_buffer_equations (per_second).
 * ALGEBRAIC[41] is phi_TMgC in component intracellular_concentrations_and_buffer_equations (per_second).
 * ALGEBRAIC[42] is phi_TMgM in component intracellular_concentrations_and_buffer_equations (per_second).
 * ALGEBRAIC[46] 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[43] is F_C in component intracellular_concentrations_and_buffer_equations (millimolar_per_second).
 * ALGEBRAIC[44] is F_TC in component intracellular_concentrations_and_buffer_equations (millimolar_per_second).
 * ALGEBRAIC[45] 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[51] is i_up in component SR_Ca_uptake_and_release (nanoA).
 * ALGEBRAIC[52] 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[53] 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[50] 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[47] is r_act in component SR_Ca_uptake_and_release (per_second).
 * ALGEBRAIC[48] 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[49] 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).
 * There are a total of 0 condition variables.
 */
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];
RATES[0] = 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[17] = 0.1001;
RATES[18] = 0.1001;
RATES[19] = 0.1001;
RATES[20] = 0.1001;
RATES[12] = 0.1001;
RATES[16] = 0.1001;
RATES[14] = 0.1001;
RATES[1] = 0.1001;
RATES[13] = 0.1001;
RATES[15] = 0.1001;
RATES[23] = 0.1001;
RATES[24] = 0.1001;
RATES[25] = 0.1001;
RATES[26] = 0.1001;
RATES[21] = 0.1001;
RATES[22] = 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[57]+ALGEBRAIC[18]+ALGEBRAIC[58]+ALGEBRAIC[59]+ALGEBRAIC[33]+ALGEBRAIC[63]+ALGEBRAIC[36]+ALGEBRAIC[38]+ALGEBRAIC[37])/CONSTANTS[3];
resid[1] = RATES[2] - (ALGEBRAIC[2] - STATES[2])/ALGEBRAIC[3];
resid[2] = RATES[3] - (ALGEBRAIC[6] - STATES[3])/ALGEBRAIC[7];
resid[3] = RATES[4] - (ALGEBRAIC[8] - STATES[4])/ALGEBRAIC[9];
resid[4] = RATES[5] - (ALGEBRAIC[13] - STATES[5])/ALGEBRAIC[12];
resid[5] = RATES[6] - (ALGEBRAIC[17] - STATES[6])/ALGEBRAIC[16];
resid[6] = RATES[7] - (ALGEBRAIC[22] - STATES[7])/ALGEBRAIC[21];
resid[7] = RATES[8] - (ALGEBRAIC[26] - STATES[8])/ALGEBRAIC[25];
resid[8] = RATES[9] - (ALGEBRAIC[27] - STATES[9])/ALGEBRAIC[28];
resid[9] = RATES[10] -  ALGEBRAIC[29]*(1.00000 - STATES[10]) -  ALGEBRAIC[30]*STATES[10];
resid[10] = RATES[11] - (ALGEBRAIC[34] - STATES[11])/ALGEBRAIC[35];
resid[11] = RATES[17] - ALGEBRAIC[39];
resid[12] = RATES[18] - ALGEBRAIC[40];
resid[13] = RATES[19] - ALGEBRAIC[41];
resid[14] = RATES[20] - ALGEBRAIC[42];
resid[15] = RATES[12] - - ( 3.00000*ALGEBRAIC[36]+ 3.00000*ALGEBRAIC[38]+ALGEBRAIC[60]+ALGEBRAIC[31]+ALGEBRAIC[57])/( CONSTANTS[2]*CONSTANTS[35]);
resid[16] = RATES[16] - ( 2.00000*ALGEBRAIC[36] - (ALGEBRAIC[59]+ALGEBRAIC[32]+ALGEBRAIC[62]))/( CONSTANTS[2]*CONSTANTS[35]);
resid[17] = RATES[14] - (( 2.00000*ALGEBRAIC[38]+ALGEBRAIC[52]) - (ALGEBRAIC[58]+ALGEBRAIC[18]+ALGEBRAIC[37]+ALGEBRAIC[61]+ALGEBRAIC[51]))/( 2.00000*CONSTANTS[35]*CONSTANTS[2]) - ALGEBRAIC[46];
resid[18] = RATES[1] - (CONSTANTS[24] - STATES[1])/CONSTANTS[26]+(ALGEBRAIC[57]+ 3.00000*ALGEBRAIC[38]+ 3.00000*ALGEBRAIC[36]+ALGEBRAIC[60]+ALGEBRAIC[31])/( CONSTANTS[2]*CONSTANTS[36]);
resid[19] = RATES[13] - (CONSTANTS[9] - STATES[13])/CONSTANTS[26]+( - 2.00000*ALGEBRAIC[36]+ALGEBRAIC[59]+ALGEBRAIC[62]+ALGEBRAIC[32])/( CONSTANTS[2]*CONSTANTS[36]);
resid[20] = RATES[15] - (CONSTANTS[25] - STATES[15])/CONSTANTS[26]+( - 2.00000*ALGEBRAIC[38]+ALGEBRAIC[58]+ALGEBRAIC[18]+ALGEBRAIC[37]+ALGEBRAIC[61])/( 2.00000*CONSTANTS[2]*CONSTANTS[36]);
resid[21] = RATES[23] - ALGEBRAIC[49];
resid[22] = RATES[24] -  0.960000*STATES[26] -  ALGEBRAIC[47]*STATES[24];
resid[23] = RATES[25] -  ALGEBRAIC[47]*STATES[24] -  ALGEBRAIC[48]*STATES[25];
resid[24] = RATES[26] -  ALGEBRAIC[48]*STATES[25] -  0.960000*STATES[26];
resid[25] = RATES[21] - (ALGEBRAIC[51] - ALGEBRAIC[53])/( 2.00000*CONSTANTS[38]*CONSTANTS[2]);
resid[26] = RATES[22] - (ALGEBRAIC[53] - ALGEBRAIC[52])/( 2.00000*CONSTANTS[39]*CONSTANTS[2]) -  11.4800*ALGEBRAIC[49];
}
void
computeVariables(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC)
{
}
void
computeEssentialVariables(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC)
{
ALGEBRAIC[0] = ( - 824.000*(STATES[0]+51.9000))/(exp((STATES[0]+51.9000)/- 8.90000) - 1.00000);
ALGEBRAIC[1] =  32960.0*exp((STATES[0]+51.9000)/- 8.90000);
ALGEBRAIC[2] = ALGEBRAIC[0]/(ALGEBRAIC[0]+ALGEBRAIC[1]);
ALGEBRAIC[3] = 1.00000/(ALGEBRAIC[0]+ALGEBRAIC[1])+1.50000e-05;
ALGEBRAIC[4] =  165.000*exp((STATES[0]+101.300)/- 12.6000);
ALGEBRAIC[5] = 12360.0/( 320.000*exp((STATES[0]+101.300)/- 12.6000)+1.00000);
ALGEBRAIC[6] = ALGEBRAIC[4]/(ALGEBRAIC[4]+ALGEBRAIC[5]);
ALGEBRAIC[7] = 1.00000/(ALGEBRAIC[4]+ALGEBRAIC[5]);
ALGEBRAIC[8] = ALGEBRAIC[6];
ALGEBRAIC[9] =  20.0000*ALGEBRAIC[7];
ALGEBRAIC[10] = ( - 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[11] = ( 11.4300*(STATES[0] - 5.00000))/(exp( 0.400000*(STATES[0] - 5.00000)) - 1.00000);
ALGEBRAIC[12] = 1.00000/(ALGEBRAIC[10]+ALGEBRAIC[11]);
ALGEBRAIC[13] = 1.00000/(1.00000+exp((STATES[0]+14.1000)/- 6.00000));
ALGEBRAIC[14] = ( 3.75000*(STATES[0]+28.0000))/(exp((STATES[0]+28.0000)/4.00000) - 1.00000);
ALGEBRAIC[15] = 30.0000/(1.00000+exp((STATES[0]+28.0000)/- 4.00000));
ALGEBRAIC[16] = 1.00000/(ALGEBRAIC[14]+ALGEBRAIC[15]);
ALGEBRAIC[17] = 1.00000/(1.00000+exp((STATES[0]+30.0000)/5.00000));
ALGEBRAIC[18] =  CONSTANTS[7]*STATES[7]*STATES[8]*(STATES[0] - CONSTANTS[8]);
ALGEBRAIC[19] =  1068.00*exp((STATES[0]+26.3000)/30.0000);
ALGEBRAIC[20] =  1068.00*exp((STATES[0]+26.3000)/- 30.0000);
ALGEBRAIC[21] = 1.00000/(ALGEBRAIC[19]+ALGEBRAIC[20]);
ALGEBRAIC[22] = 1.00000/(1.00000+exp((STATES[0]+26.3000)/- 6.00000));
ALGEBRAIC[23] =  15.3000*exp((STATES[0]+61.7000)/- 83.3000);
ALGEBRAIC[24] =  15.0000*exp((STATES[0]+61.7000)/15.3800);
ALGEBRAIC[25] = 1.00000/(ALGEBRAIC[23]+ALGEBRAIC[24]);
ALGEBRAIC[26] = 1.00000/(1.00000+exp((STATES[0]+61.7000)/5.60000));
ALGEBRAIC[27] = 1.00000/(1.00000+exp((STATES[0]+5.10000)/- 7.40000));
ALGEBRAIC[28] = 1.00000/( 17.0000*exp( 0.0398000*STATES[0])+ 2.11000*exp( - 0.0510000*STATES[0]));
ALGEBRAIC[29] =  100.000*exp( - 0.0183000*STATES[0]);
ALGEBRAIC[30] =  656.000*exp( 0.00942000*STATES[0]);
ALGEBRAIC[31] =  CONSTANTS[13]*pow(STATES[11], 2.00000)*(STATES[0] - 75.0000);
ALGEBRAIC[32] =  CONSTANTS[14]*pow(STATES[11], 2.00000)*(STATES[0]+85.0000);
ALGEBRAIC[33] = ALGEBRAIC[31]+ALGEBRAIC[32];
ALGEBRAIC[34] = 1.00000/(1.00000+exp((STATES[0]+72.2000)/9.00000));
ALGEBRAIC[35] = 1.00000/( 1.64830*exp((STATES[0]+54.0600)/- 24.3300)+14.0106/(0.700000+exp((STATES[0]+60.0000)/- 5.50000)));
ALGEBRAIC[36] = ( 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[37] = ( CONSTANTS[18]*STATES[14])/(STATES[14]+0.000400000);
ALGEBRAIC[38] = ( 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[39] =  129000.*STATES[14]*(1.00000 - STATES[17]) -  307.000*STATES[17];
ALGEBRAIC[40] =  50500.0*STATES[14]*(1.00000 - STATES[18]) -  252.000*STATES[18];
ALGEBRAIC[41] =  129000.*STATES[14]*(1.00000 - (STATES[19]+STATES[20])) -  4.25000*STATES[19];
ALGEBRAIC[42] =  1290.00*CONSTANTS[22]*(1.00000 - (STATES[19]+STATES[20])) -  429.000*STATES[20];
ALGEBRAIC[43] =  0.0900000*ALGEBRAIC[39];
ALGEBRAIC[44] =  0.0310000*ALGEBRAIC[40];
ALGEBRAIC[45] =  0.0620000*ALGEBRAIC[41];
ALGEBRAIC[46] = ALGEBRAIC[43]+ALGEBRAIC[44]+ALGEBRAIC[45];
ALGEBRAIC[47] =  240.000*exp( (STATES[0] - 40.0000)*0.0800000)+ 240.000*pow(STATES[14]/(STATES[14]+CONSTANTS[33]), 4.00000);
ALGEBRAIC[48] = 40.0000+ 240.000*pow(STATES[14]/(STATES[14]+CONSTANTS[33]), 4.00000);
ALGEBRAIC[49] =  770.000*STATES[22]*(1.00000 - STATES[23]) -  641.000*STATES[23];
ALGEBRAIC[50] = STATES[14]+ STATES[21]*CONSTANTS[37]+ CONSTANTS[30]*CONSTANTS[31]+CONSTANTS[30];
ALGEBRAIC[51] = ( CONSTANTS[27]*STATES[14] -  CONSTANTS[28]*STATES[21]*CONSTANTS[37])/ALGEBRAIC[50];
ALGEBRAIC[52] =  CONSTANTS[29]*pow(STATES[25]/(STATES[25]+0.250000), 2.00000)*STATES[22];
ALGEBRAIC[53] = ( (STATES[21] - STATES[22])*2.00000*CONSTANTS[2]*CONSTANTS[38])/0.0641800;
ALGEBRAIC[54] =  (( CONSTANTS[0]*CONSTANTS[1])/CONSTANTS[2])*log(STATES[1]/STATES[12]);
ALGEBRAIC[57] = ( (( 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[58] =  CONSTANTS[5]*( STATES[6]*STATES[5]+ 0.0950000*ALGEBRAIC[13])*(STATES[0] - CONSTANTS[6]);
ALGEBRAIC[55] =  (( CONSTANTS[0]*CONSTANTS[1])/CONSTANTS[2])*log(STATES[13]/STATES[16]);
ALGEBRAIC[59] =  CONSTANTS[34]*STATES[9]*STATES[10]*(STATES[0] - ALGEBRAIC[55]);
ALGEBRAIC[60] =  CONSTANTS[10]*(STATES[0] - ALGEBRAIC[54]);
ALGEBRAIC[56] =  (( 0.500000*CONSTANTS[0]*CONSTANTS[1])/CONSTANTS[2])*log(STATES[15]/STATES[14]);
ALGEBRAIC[61] =  CONSTANTS[11]*(STATES[0] - ALGEBRAIC[56]);
ALGEBRAIC[62] =  CONSTANTS[12]*(STATES[0] - ALGEBRAIC[55]);
ALGEBRAIC[63] = ALGEBRAIC[60]+ALGEBRAIC[61]+ALGEBRAIC[62];
}
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;
SI[19] = 1.0;
SI[20] = 1.0;
SI[21] = 1.0;
SI[22] = 1.0;
SI[23] = 1.0;
SI[24] = 1.0;
SI[25] = 1.0;
SI[26] = 1.0;
}
void
computeRoots(double VOI, double* CONSTANTS, double* RATES, double* OLDRATES, double* STATES,
             double* OLDSTATES, double* ALGEBRAIC, double* CONDVARS)
{
}