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 56 entries in the algebraic variable array.
   There are a total of 6 entries in each of the rate and state variable arrays.
   There are a total of 46 entries in the constant variable array.
 */
/*
 * VOI is time in component environment (ms).
 * CONSTANTS[0] is V_myo in component cell_geometry (um3).
 * CONSTANTS[1] is V_SR in component cell_geometry (um3).
 * CONSTANTS[2] is A_cap in component cell_geometry (um2).
 * ALGEBRAIC[0] is V in component membrane (mV).
 * CONSTANTS[3] is R in component membrane (mJ_per_mole_K).
 * CONSTANTS[4] is T in component membrane (kelvin).
 * CONSTANTS[5] is F in component membrane (C_per_mole).
 * ALGEBRAIC[3] is FVRT in component membrane (dimensionless).
 * ALGEBRAIC[4] is FVRT_Ca in component membrane (dimensionless).
 * CONSTANTS[6] is g_D in component CaRU (um3_per_ms).
 * CONSTANTS[7] is J_R in component CaRU (um3_per_ms).
 * CONSTANTS[8] is J_L in component CaRU (um3_per_ms).
 * CONSTANTS[9] is N in component CaRU (dimensionless).
 * STATES[0] is Ca_i in component intracellular_ion_concentrations (mM).
 * CONSTANTS[10] is Ca_o in component extracellular_ion_concentrations (mM).
 * STATES[1] is Ca_SR in component intracellular_ion_concentrations (mM).
 * ALGEBRAIC[34] is I_RyR in component RyR_current (mM_per_ms).
 * ALGEBRAIC[43] is I_LCC in component LCC_current (mM_per_ms).
 * ALGEBRAIC[15] is C_oc in component DS_Calcium_Concentrations (mM).
 * ALGEBRAIC[13] is C_co in component DS_Calcium_Concentrations (mM).
 * CONSTANTS[11] is V_L in component CaRU_Transitions (mV).
 * CONSTANTS[12] is del_VL in component CaRU_Transitions (mV).
 * CONSTANTS[13] is phi_L in component CaRU_Transitions (dimensionless).
 * CONSTANTS[14] is t_L in component CaRU_Transitions (ms).
 * CONSTANTS[15] is tau_L in component CaRU_Transitions (ms).
 * CONSTANTS[43] is t_R in component CaRU_Transitions (ms).
 * CONSTANTS[16] is tau_R in component CaRU_Transitions (ms).
 * CONSTANTS[17] is phi_R in component CaRU_Transitions (dimensionless).
 * CONSTANTS[18] is theta_R in component CaRU_Transitions (dimensionless).
 * CONSTANTS[19] is K_RyR in component CaRU_Transitions (mM).
 * CONSTANTS[20] is K_L in component CaRU_Transitions (mM).
 * CONSTANTS[21] is a in component CaRU_Transitions (dimensionless).
 * CONSTANTS[22] is b in component CaRU_Transitions (dimensionless).
 * CONSTANTS[23] is c in component CaRU_Transitions (dimensionless).
 * CONSTANTS[24] is d in component CaRU_Transitions (dimensionless).
 * ALGEBRAIC[5] is expVL in component CaRU_Transitions (dimensionless).
 * ALGEBRAIC[7] is alpha_p in component CaRU_Transitions (per_ms).
 * CONSTANTS[44] is alpha_m in component CaRU_Transitions (per_ms).
 * ALGEBRAIC[16] is beta_poc in component CaRU_Transitions (per_ms).
 * ALGEBRAIC[8] is beta_pcc in component CaRU_Transitions (per_ms).
 * CONSTANTS[45] is beta_m in component CaRU_Transitions (per_ms).
 * ALGEBRAIC[14] is epsilon_pco in component CaRU_Transitions (per_ms).
 * ALGEBRAIC[9] is epsilon_pcc in component CaRU_Transitions (per_ms).
 * ALGEBRAIC[10] is epsilon_m in component CaRU_Transitions (per_ms).
 * ALGEBRAIC[17] is mu_poc in component CaRU_Transitions (per_ms).
 * ALGEBRAIC[11] is mu_pcc in component CaRU_Transitions (per_ms).
 * ALGEBRAIC[18] is mu_moc in component CaRU_Transitions (per_ms).
 * ALGEBRAIC[12] is mu_mcc in component CaRU_Transitions (per_ms).
 * ALGEBRAIC[1] is C_cc in component DS_Calcium_Concentrations (mM).
 * ALGEBRAIC[6] is C_oo in component DS_Calcium_Concentrations (mM).
 * ALGEBRAIC[22] is J_Loo in component LCC_and_RyR_fluxes (um3_mM_per_ms).
 * ALGEBRAIC[21] is J_Loc in component LCC_and_RyR_fluxes (um3_mM_per_ms).
 * ALGEBRAIC[19] is J_Rco in component LCC_and_RyR_fluxes (um3_mM_per_ms).
 * ALGEBRAIC[20] is J_Roo in component LCC_and_RyR_fluxes (um3_mM_per_ms).
 * ALGEBRAIC[23] is denom in component CaRU_states (per_ms3).
 * ALGEBRAIC[24] is y_oc in component CaRU_states (dimensionless).
 * ALGEBRAIC[25] is y_co in component CaRU_states (dimensionless).
 * ALGEBRAIC[26] is y_oo in component CaRU_states (dimensionless).
 * ALGEBRAIC[27] is y_cc in component CaRU_states (dimensionless).
 * ALGEBRAIC[29] is y_ci in component CaRU_states (dimensionless).
 * ALGEBRAIC[32] is y_oi in component CaRU_states (dimensionless).
 * ALGEBRAIC[35] is y_ic in component CaRU_states (dimensionless).
 * ALGEBRAIC[38] is y_io in component CaRU_states (dimensionless).
 * ALGEBRAIC[41] is y_ii in component CaRU_states (dimensionless).
 * ALGEBRAIC[30] is r_1 in component CaRU_reduced_states (per_ms).
 * ALGEBRAIC[33] is r_2 in component CaRU_reduced_states (per_ms).
 * ALGEBRAIC[36] is r_3 in component CaRU_reduced_states (per_ms).
 * ALGEBRAIC[39] is r_4 in component CaRU_reduced_states (per_ms).
 * ALGEBRAIC[42] is r_5 in component CaRU_reduced_states (per_ms).
 * ALGEBRAIC[44] is r_6 in component CaRU_reduced_states (per_ms).
 * ALGEBRAIC[46] is r_7 in component CaRU_reduced_states (per_ms).
 * ALGEBRAIC[48] is r_8 in component CaRU_reduced_states (per_ms).
 * STATES[2] is z_1 in component CaRU_reduced_states (dimensionless).
 * STATES[3] is z_2 in component CaRU_reduced_states (dimensionless).
 * STATES[4] is z_3 in component CaRU_reduced_states (dimensionless).
 * ALGEBRAIC[50] is z_4 in component CaRU_reduced_states (dimensionless).
 * ALGEBRAIC[28] is J_R1 in component RyR_current (um3_mM_per_ms).
 * ALGEBRAIC[31] is J_R3 in component RyR_current (um3_mM_per_ms).
 * ALGEBRAIC[37] is J_L1 in component LCC_current (um3_mM_per_ms).
 * ALGEBRAIC[40] is J_L2 in component LCC_current (um3_mM_per_ms).
 * CONSTANTS[25] is K_mNa in component Na_Ca_Exchanger (mM).
 * CONSTANTS[26] is K_mCa in component Na_Ca_Exchanger (mM).
 * CONSTANTS[27] is eta in component Na_Ca_Exchanger (dimensionless).
 * CONSTANTS[28] is k_sat in component Na_Ca_Exchanger (dimensionless).
 * CONSTANTS[29] is g_NCX in component Na_Ca_Exchanger (mM_per_ms).
 * CONSTANTS[30] is Na_i in component intracellular_ion_concentrations (mM).
 * CONSTANTS[31] is Na_o in component extracellular_ion_concentrations (mM).
 * ALGEBRAIC[45] is I_NaCa in component Na_Ca_Exchanger (mM_per_ms).
 * CONSTANTS[32] is g_SERCA in component SERCA (mM_per_ms).
 * CONSTANTS[33] is K_SERCA in component SERCA (mM).
 * ALGEBRAIC[47] is I_SERCA in component SERCA (mM_per_ms).
 * CONSTANTS[34] is g_pCa in component Sarcolemmal_Ca_pump (mM_per_ms).
 * CONSTANTS[35] is K_mpCa in component Sarcolemmal_Ca_pump (mM).
 * ALGEBRAIC[49] is I_pCa in component Sarcolemmal_Ca_pump (mM_per_ms).
 * ALGEBRAIC[51] is E_Ca in component Background_Ca_current (mV).
 * CONSTANTS[36] is g_CaB in component Background_Ca_current (mM_per_mV_ms).
 * ALGEBRAIC[52] is I_CaB in component Background_Ca_current (mM_per_ms).
 * CONSTANTS[37] is g_SRl in component SR_Ca_leak_current (per_ms).
 * ALGEBRAIC[53] is I_SR in component SR_Ca_leak_current (mM_per_ms).
 * CONSTANTS[38] is k_m_TRPN in component troponin_Ca_buffer (per_ms).
 * CONSTANTS[39] is k_p_TRPN in component troponin_Ca_buffer (per_mM_ms).
 * CONSTANTS[40] is B_TRPN in component troponin_Ca_buffer (mM).
 * STATES[5] is TRPN in component intracellular_ion_concentrations (mM).
 * ALGEBRAIC[54] is I_TRPN in component troponin_Ca_buffer (mM_per_ms).
 * CONSTANTS[41] is k_CMDN in component calmodulin_Ca_buffer (mM).
 * CONSTANTS[42] is B_CMDN in component calmodulin_Ca_buffer (mM).
 * ALGEBRAIC[55] is beta_CMDN in component calmodulin_Ca_buffer (dimensionless).
 * ALGEBRAIC[2] is CaSR_plot in component intracellular_ion_concentrations (mM).
 * RATES[2] is d/dt z_1 in component CaRU_reduced_states (dimensionless).
 * RATES[3] is d/dt z_2 in component CaRU_reduced_states (dimensionless).
 * RATES[4] is d/dt z_3 in component CaRU_reduced_states (dimensionless).
 * RATES[5] is d/dt TRPN in component intracellular_ion_concentrations (mM).
 * RATES[0] is d/dt Ca_i in component intracellular_ion_concentrations (mM).
 * RATES[1] is d/dt Ca_SR in component intracellular_ion_concentrations (mM).
 */
void
initConsts(double* CONSTANTS, double* RATES, double *STATES)
{
CONSTANTS[0] = 25.84e3;
CONSTANTS[1] = 2.098e3;
CONSTANTS[2] = 1.534e4;
CONSTANTS[3] = 8314.5;
CONSTANTS[4] = 295;
CONSTANTS[5] = 96487;
CONSTANTS[6] = 0.065;
CONSTANTS[7] = 0.02;
CONSTANTS[8] = 9.13e-4;
CONSTANTS[9] = 50000;
STATES[0] = 0.0001;
CONSTANTS[10] = 1;
STATES[1] = 700e-3;
CONSTANTS[11] = -2;
CONSTANTS[12] = 7;
CONSTANTS[13] = 2.35;
CONSTANTS[14] = 1;
CONSTANTS[15] = 650;
CONSTANTS[16] = 2.43;
CONSTANTS[17] = 0.05;
CONSTANTS[18] = 0.012;
CONSTANTS[19] = 41e-3;
CONSTANTS[20] = 0.22e-3;
CONSTANTS[21] = 0.0625;
CONSTANTS[22] = 14;
CONSTANTS[23] = 0.01;
CONSTANTS[24] = 100;
STATES[2] = 0.98859;
STATES[3] = 0.0087302;
STATES[4] = 0.0026566;
CONSTANTS[25] = 87.5;
CONSTANTS[26] = 1.38;
CONSTANTS[27] = 0.35;
CONSTANTS[28] = 0.1;
CONSTANTS[29] = 38.5e-3;
CONSTANTS[30] = 10;
CONSTANTS[31] = 140;
CONSTANTS[32] = 0.45e-3;
CONSTANTS[33] = 0.5e-3;
CONSTANTS[34] = 0.0035e-3;
CONSTANTS[35] = 0.5e-3;
CONSTANTS[36] = 2.6875e-8;
CONSTANTS[37] = 1.8951e-5;
CONSTANTS[38] = 0.04;
CONSTANTS[39] = 0.04e3;
CONSTANTS[40] = 70e-3;
STATES[5] = 0.0636364;
CONSTANTS[41] = 2.382e-3;
CONSTANTS[42] = 50e-3;
CONSTANTS[43] =  1.17000*CONSTANTS[14];
CONSTANTS[44] = CONSTANTS[13]/CONSTANTS[14];
CONSTANTS[45] = CONSTANTS[17]/CONSTANTS[43];
}
void
computeRates(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC)
{
ALGEBRAIC[0] = (VOI>=0.00000&&VOI<=200.000 ? 0.00000 : - 80.0000);
ALGEBRAIC[3] = ( CONSTANTS[5]*ALGEBRAIC[0])/( CONSTANTS[3]*CONSTANTS[4]);
ALGEBRAIC[4] =  2.00000*ALGEBRAIC[3];
ALGEBRAIC[15] = (fabs(ALGEBRAIC[4])>1.00000e-09 ? (STATES[0]+( (CONSTANTS[8]/CONSTANTS[6])*CONSTANTS[10]*ALGEBRAIC[4]*exp(- ALGEBRAIC[4]))/(1.00000 - exp(- ALGEBRAIC[4])))/(1.00000+( (CONSTANTS[8]/CONSTANTS[6])*ALGEBRAIC[4])/(1.00000 - exp(- ALGEBRAIC[4]))) : (STATES[0]+ (CONSTANTS[8]/CONSTANTS[6])*CONSTANTS[10])/(1.00000+CONSTANTS[8]/CONSTANTS[6]));
ALGEBRAIC[17] = (pow(ALGEBRAIC[15], 2.00000)+ CONSTANTS[23]*pow(CONSTANTS[19], 2.00000))/( CONSTANTS[16]*(pow(ALGEBRAIC[15], 2.00000)+pow(CONSTANTS[19], 2.00000)));
ALGEBRAIC[11] = (pow(STATES[0], 2.00000)+ CONSTANTS[23]*pow(CONSTANTS[19], 2.00000))/( CONSTANTS[16]*(pow(STATES[0], 2.00000)+pow(CONSTANTS[19], 2.00000)));
ALGEBRAIC[5] = exp((ALGEBRAIC[0] - CONSTANTS[11])/CONSTANTS[12]);
ALGEBRAIC[7] = ALGEBRAIC[5]/( CONSTANTS[14]*(ALGEBRAIC[5]+1.00000));
ALGEBRAIC[8] = pow(STATES[0], 2.00000)/( CONSTANTS[43]*(pow(STATES[0], 2.00000)+pow(CONSTANTS[19], 2.00000)));
ALGEBRAIC[16] = pow(ALGEBRAIC[15], 2.00000)/( CONSTANTS[43]*(pow(ALGEBRAIC[15], 2.00000)+pow(CONSTANTS[19], 2.00000)));
ALGEBRAIC[23] =  (ALGEBRAIC[7]+CONSTANTS[44])*( (CONSTANTS[44]+CONSTANTS[45]+ALGEBRAIC[16])*(CONSTANTS[45]+ALGEBRAIC[8])+ ALGEBRAIC[7]*(CONSTANTS[45]+ALGEBRAIC[16]));
ALGEBRAIC[24] = ( ALGEBRAIC[7]*CONSTANTS[45]*(ALGEBRAIC[7]+CONSTANTS[44]+CONSTANTS[45]+ALGEBRAIC[8]))/ALGEBRAIC[23];
ALGEBRAIC[27] = ( CONSTANTS[44]*CONSTANTS[45]*(CONSTANTS[44]+ALGEBRAIC[7]+CONSTANTS[45]+ALGEBRAIC[16]))/ALGEBRAIC[23];
ALGEBRAIC[30] =  ALGEBRAIC[24]*ALGEBRAIC[17]+ ALGEBRAIC[27]*ALGEBRAIC[11];
ALGEBRAIC[18] = ( CONSTANTS[18]*CONSTANTS[24]*(pow(ALGEBRAIC[15], 2.00000)+ CONSTANTS[23]*pow(CONSTANTS[19], 2.00000)))/( CONSTANTS[16]*( CONSTANTS[24]*pow(ALGEBRAIC[15], 2.00000)+ CONSTANTS[23]*pow(CONSTANTS[19], 2.00000)));
ALGEBRAIC[12] = ( CONSTANTS[18]*CONSTANTS[24]*(pow(STATES[0], 2.00000)+ CONSTANTS[23]*pow(CONSTANTS[19], 2.00000)))/( CONSTANTS[16]*( CONSTANTS[24]*pow(STATES[0], 2.00000)+ CONSTANTS[23]*pow(CONSTANTS[19], 2.00000)));
ALGEBRAIC[33] = ( ALGEBRAIC[7]*ALGEBRAIC[18]+ CONSTANTS[44]*ALGEBRAIC[12])/(ALGEBRAIC[7]+CONSTANTS[44]);
ALGEBRAIC[13] = (STATES[0]+ (CONSTANTS[7]/CONSTANTS[6])*STATES[1])/(1.00000+CONSTANTS[7]/CONSTANTS[6]);
ALGEBRAIC[14] = ( ALGEBRAIC[13]*(ALGEBRAIC[5]+CONSTANTS[21]))/( CONSTANTS[15]*CONSTANTS[20]*(ALGEBRAIC[5]+1.00000));
ALGEBRAIC[9] = ( STATES[0]*(ALGEBRAIC[5]+CONSTANTS[21]))/( CONSTANTS[15]*CONSTANTS[20]*(ALGEBRAIC[5]+1.00000));
ALGEBRAIC[25] = ( CONSTANTS[44]*( ALGEBRAIC[8]*(CONSTANTS[44]+CONSTANTS[45]+ALGEBRAIC[16])+ ALGEBRAIC[16]*ALGEBRAIC[7]))/ALGEBRAIC[23];
ALGEBRAIC[42] =  ALGEBRAIC[25]*ALGEBRAIC[14]+ ALGEBRAIC[27]*ALGEBRAIC[9];
ALGEBRAIC[10] = ( CONSTANTS[22]*(ALGEBRAIC[5]+CONSTANTS[21]))/( CONSTANTS[15]*( CONSTANTS[22]*ALGEBRAIC[5]+CONSTANTS[21]));
ALGEBRAIC[44] = ALGEBRAIC[10];
RATES[2] =  - (ALGEBRAIC[30]+ALGEBRAIC[42])*STATES[2]+ ALGEBRAIC[33]*STATES[3]+ ALGEBRAIC[44]*STATES[4];
ALGEBRAIC[46] = ( CONSTANTS[44]*ALGEBRAIC[9])/(ALGEBRAIC[7]+CONSTANTS[44]);
ALGEBRAIC[48] = ALGEBRAIC[10];
ALGEBRAIC[50] = ((1.00000 - STATES[2]) - STATES[3]) - STATES[4];
RATES[3] = ( ALGEBRAIC[30]*STATES[2] -  (ALGEBRAIC[33]+ALGEBRAIC[46])*STATES[3])+ ALGEBRAIC[48]*ALGEBRAIC[50];
ALGEBRAIC[36] = ( CONSTANTS[45]*ALGEBRAIC[11])/(CONSTANTS[45]+ALGEBRAIC[8]);
ALGEBRAIC[39] = ALGEBRAIC[12];
RATES[4] = ( ALGEBRAIC[42]*STATES[2] -  (ALGEBRAIC[44]+ALGEBRAIC[36])*STATES[4])+ ALGEBRAIC[39]*ALGEBRAIC[50];
ALGEBRAIC[19] = ( CONSTANTS[7]*(STATES[1] - STATES[0]))/(1.00000+CONSTANTS[7]/CONSTANTS[6]);
ALGEBRAIC[20] = (fabs(ALGEBRAIC[4])>1.00000e-05 ? ( CONSTANTS[7]*((STATES[1] - STATES[0])+ (( (CONSTANTS[8]/CONSTANTS[6])*ALGEBRAIC[4])/(1.00000 - exp(- ALGEBRAIC[4])))*(STATES[1] -  CONSTANTS[10]*exp(- ALGEBRAIC[4]))))/(1.00000+CONSTANTS[7]/CONSTANTS[6]+( (CONSTANTS[8]/CONSTANTS[6])*ALGEBRAIC[4])/(1.00000 - exp(- ALGEBRAIC[4]))) : ( CONSTANTS[7]*((STATES[1] - STATES[0])+ (( (CONSTANTS[8]/CONSTANTS[6])*1.00000e-05)/(1.00000 - exp(- 1.00000e-05)))*(STATES[1] -  CONSTANTS[10]*exp(- 1.00000e-05))))/(1.00000+CONSTANTS[7]/CONSTANTS[6]+( (CONSTANTS[8]/CONSTANTS[6])*1.00000e-05)/(1.00000 - exp(- 1.00000e-05))));
ALGEBRAIC[26] = ( ALGEBRAIC[7]*( ALGEBRAIC[16]*(ALGEBRAIC[7]+CONSTANTS[45]+ALGEBRAIC[8])+ ALGEBRAIC[8]*CONSTANTS[44]))/ALGEBRAIC[23];
ALGEBRAIC[28] =  ALGEBRAIC[26]*ALGEBRAIC[20]+ ALGEBRAIC[19]*ALGEBRAIC[25];
ALGEBRAIC[31] = ( ALGEBRAIC[19]*ALGEBRAIC[8])/(CONSTANTS[45]+ALGEBRAIC[8]);
ALGEBRAIC[34] = ( ( STATES[2]*ALGEBRAIC[28]+ STATES[4]*ALGEBRAIC[31])*CONSTANTS[9])/CONSTANTS[0];
ALGEBRAIC[47] = ( CONSTANTS[32]*pow(STATES[0], 2.00000))/(pow(CONSTANTS[33], 2.00000)+pow(STATES[0], 2.00000));
ALGEBRAIC[53] =  CONSTANTS[37]*(STATES[1] - STATES[0]);
RATES[1] =  (CONSTANTS[0]/CONSTANTS[1])*((- ALGEBRAIC[34]+ALGEBRAIC[47]) - ALGEBRAIC[53]);
ALGEBRAIC[54] =  CONSTANTS[38]*(CONSTANTS[40] - STATES[5]) -  CONSTANTS[39]*STATES[5]*STATES[0];
RATES[5] = ALGEBRAIC[54];
ALGEBRAIC[22] = (fabs(ALGEBRAIC[4])>1.00000e-05 ? ( (( CONSTANTS[8]*ALGEBRAIC[4])/(1.00000 - exp(- ALGEBRAIC[4])))*(( CONSTANTS[10]*exp(- ALGEBRAIC[4]) - STATES[0])+ (CONSTANTS[7]/CONSTANTS[6])*( CONSTANTS[10]*exp(- ALGEBRAIC[4]) - STATES[1])))/(1.00000+CONSTANTS[7]/CONSTANTS[6]+( (CONSTANTS[8]/CONSTANTS[6])*ALGEBRAIC[4])/(1.00000 - exp(ALGEBRAIC[4]))) : ( (( CONSTANTS[8]*1.00000e-05)/(1.00000 - exp(- 1.00000e-05)))*(( CONSTANTS[10]*exp(- 1.00000e-05) - STATES[0])+ (CONSTANTS[7]/CONSTANTS[6])*( CONSTANTS[10]*exp(- 1.00000e-05) - STATES[1])))/(1.00000+CONSTANTS[7]/CONSTANTS[6]+( (CONSTANTS[8]/CONSTANTS[6])*1.00000e-05)/(1.00000 - exp(- 1.00000e-05))));
ALGEBRAIC[21] = (fabs(ALGEBRAIC[4])>1.00000e-05 ? ( (( CONSTANTS[8]*ALGEBRAIC[4])/(1.00000 - exp(- ALGEBRAIC[4])))*( CONSTANTS[10]*exp(- ALGEBRAIC[4]) - STATES[0]))/(1.00000+( (CONSTANTS[8]/CONSTANTS[6])*ALGEBRAIC[4])/(1.00000 - exp(- ALGEBRAIC[4]))) : ( (( CONSTANTS[8]*1.00000e-05)/(1.00000 - exp(- 1.00000e-05)))*( CONSTANTS[10]*exp(- 1.00000e-05) - STATES[0]))/(1.00000+( (CONSTANTS[8]/CONSTANTS[6])*1.00000e-05)/(1.00000 - exp(- 1.00000e-05))));
ALGEBRAIC[37] =  ALGEBRAIC[22]*ALGEBRAIC[26]+ ALGEBRAIC[21]*ALGEBRAIC[24];
ALGEBRAIC[40] = ( ALGEBRAIC[21]*ALGEBRAIC[7])/(ALGEBRAIC[7]+CONSTANTS[44]);
ALGEBRAIC[43] = ( ( STATES[2]*ALGEBRAIC[37]+ STATES[3]*ALGEBRAIC[40])*CONSTANTS[9])/CONSTANTS[0];
ALGEBRAIC[45] = ( CONSTANTS[29]*( exp( CONSTANTS[27]*ALGEBRAIC[3])*pow(CONSTANTS[30], 3.00000)*CONSTANTS[10] -  exp( (CONSTANTS[27] - 1.00000)*ALGEBRAIC[3])*pow(CONSTANTS[31], 3.00000)*STATES[0]))/( (pow(CONSTANTS[31], 3.00000)+pow(CONSTANTS[25], 3.00000))*(CONSTANTS[10]+CONSTANTS[26])*(1.00000+ CONSTANTS[28]*exp( (CONSTANTS[27] - 1.00000)*ALGEBRAIC[3])));
ALGEBRAIC[49] = ( CONSTANTS[34]*STATES[0])/(CONSTANTS[35]+STATES[0]);
ALGEBRAIC[51] =  (( CONSTANTS[3]*CONSTANTS[4])/( 2.00000*CONSTANTS[5]))*log(CONSTANTS[10]/STATES[0]);
ALGEBRAIC[52] =  CONSTANTS[36]*(ALGEBRAIC[51] - ALGEBRAIC[0]);
ALGEBRAIC[55] = pow(1.00000+( CONSTANTS[41]*CONSTANTS[42])/pow(CONSTANTS[41]+STATES[0], 2.00000), - 1.00000);
RATES[0] =  ALGEBRAIC[55]*(((((ALGEBRAIC[43]+ALGEBRAIC[34]) - ALGEBRAIC[47])+ALGEBRAIC[53]+ALGEBRAIC[45]) - ALGEBRAIC[49])+ALGEBRAIC[52]+ALGEBRAIC[54]);
}
void
computeVariables(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC)
{
ALGEBRAIC[0] = (VOI>=0.00000&&VOI<=200.000 ? 0.00000 : - 80.0000);
ALGEBRAIC[3] = ( CONSTANTS[5]*ALGEBRAIC[0])/( CONSTANTS[3]*CONSTANTS[4]);
ALGEBRAIC[4] =  2.00000*ALGEBRAIC[3];
ALGEBRAIC[15] = (fabs(ALGEBRAIC[4])>1.00000e-09 ? (STATES[0]+( (CONSTANTS[8]/CONSTANTS[6])*CONSTANTS[10]*ALGEBRAIC[4]*exp(- ALGEBRAIC[4]))/(1.00000 - exp(- ALGEBRAIC[4])))/(1.00000+( (CONSTANTS[8]/CONSTANTS[6])*ALGEBRAIC[4])/(1.00000 - exp(- ALGEBRAIC[4]))) : (STATES[0]+ (CONSTANTS[8]/CONSTANTS[6])*CONSTANTS[10])/(1.00000+CONSTANTS[8]/CONSTANTS[6]));
ALGEBRAIC[17] = (pow(ALGEBRAIC[15], 2.00000)+ CONSTANTS[23]*pow(CONSTANTS[19], 2.00000))/( CONSTANTS[16]*(pow(ALGEBRAIC[15], 2.00000)+pow(CONSTANTS[19], 2.00000)));
ALGEBRAIC[11] = (pow(STATES[0], 2.00000)+ CONSTANTS[23]*pow(CONSTANTS[19], 2.00000))/( CONSTANTS[16]*(pow(STATES[0], 2.00000)+pow(CONSTANTS[19], 2.00000)));
ALGEBRAIC[5] = exp((ALGEBRAIC[0] - CONSTANTS[11])/CONSTANTS[12]);
ALGEBRAIC[7] = ALGEBRAIC[5]/( CONSTANTS[14]*(ALGEBRAIC[5]+1.00000));
ALGEBRAIC[8] = pow(STATES[0], 2.00000)/( CONSTANTS[43]*(pow(STATES[0], 2.00000)+pow(CONSTANTS[19], 2.00000)));
ALGEBRAIC[16] = pow(ALGEBRAIC[15], 2.00000)/( CONSTANTS[43]*(pow(ALGEBRAIC[15], 2.00000)+pow(CONSTANTS[19], 2.00000)));
ALGEBRAIC[23] =  (ALGEBRAIC[7]+CONSTANTS[44])*( (CONSTANTS[44]+CONSTANTS[45]+ALGEBRAIC[16])*(CONSTANTS[45]+ALGEBRAIC[8])+ ALGEBRAIC[7]*(CONSTANTS[45]+ALGEBRAIC[16]));
ALGEBRAIC[24] = ( ALGEBRAIC[7]*CONSTANTS[45]*(ALGEBRAIC[7]+CONSTANTS[44]+CONSTANTS[45]+ALGEBRAIC[8]))/ALGEBRAIC[23];
ALGEBRAIC[27] = ( CONSTANTS[44]*CONSTANTS[45]*(CONSTANTS[44]+ALGEBRAIC[7]+CONSTANTS[45]+ALGEBRAIC[16]))/ALGEBRAIC[23];
ALGEBRAIC[30] =  ALGEBRAIC[24]*ALGEBRAIC[17]+ ALGEBRAIC[27]*ALGEBRAIC[11];
ALGEBRAIC[18] = ( CONSTANTS[18]*CONSTANTS[24]*(pow(ALGEBRAIC[15], 2.00000)+ CONSTANTS[23]*pow(CONSTANTS[19], 2.00000)))/( CONSTANTS[16]*( CONSTANTS[24]*pow(ALGEBRAIC[15], 2.00000)+ CONSTANTS[23]*pow(CONSTANTS[19], 2.00000)));
ALGEBRAIC[12] = ( CONSTANTS[18]*CONSTANTS[24]*(pow(STATES[0], 2.00000)+ CONSTANTS[23]*pow(CONSTANTS[19], 2.00000)))/( CONSTANTS[16]*( CONSTANTS[24]*pow(STATES[0], 2.00000)+ CONSTANTS[23]*pow(CONSTANTS[19], 2.00000)));
ALGEBRAIC[33] = ( ALGEBRAIC[7]*ALGEBRAIC[18]+ CONSTANTS[44]*ALGEBRAIC[12])/(ALGEBRAIC[7]+CONSTANTS[44]);
ALGEBRAIC[13] = (STATES[0]+ (CONSTANTS[7]/CONSTANTS[6])*STATES[1])/(1.00000+CONSTANTS[7]/CONSTANTS[6]);
ALGEBRAIC[14] = ( ALGEBRAIC[13]*(ALGEBRAIC[5]+CONSTANTS[21]))/( CONSTANTS[15]*CONSTANTS[20]*(ALGEBRAIC[5]+1.00000));
ALGEBRAIC[9] = ( STATES[0]*(ALGEBRAIC[5]+CONSTANTS[21]))/( CONSTANTS[15]*CONSTANTS[20]*(ALGEBRAIC[5]+1.00000));
ALGEBRAIC[25] = ( CONSTANTS[44]*( ALGEBRAIC[8]*(CONSTANTS[44]+CONSTANTS[45]+ALGEBRAIC[16])+ ALGEBRAIC[16]*ALGEBRAIC[7]))/ALGEBRAIC[23];
ALGEBRAIC[42] =  ALGEBRAIC[25]*ALGEBRAIC[14]+ ALGEBRAIC[27]*ALGEBRAIC[9];
ALGEBRAIC[10] = ( CONSTANTS[22]*(ALGEBRAIC[5]+CONSTANTS[21]))/( CONSTANTS[15]*( CONSTANTS[22]*ALGEBRAIC[5]+CONSTANTS[21]));
ALGEBRAIC[44] = ALGEBRAIC[10];
ALGEBRAIC[46] = ( CONSTANTS[44]*ALGEBRAIC[9])/(ALGEBRAIC[7]+CONSTANTS[44]);
ALGEBRAIC[48] = ALGEBRAIC[10];
ALGEBRAIC[50] = ((1.00000 - STATES[2]) - STATES[3]) - STATES[4];
ALGEBRAIC[36] = ( CONSTANTS[45]*ALGEBRAIC[11])/(CONSTANTS[45]+ALGEBRAIC[8]);
ALGEBRAIC[39] = ALGEBRAIC[12];
ALGEBRAIC[19] = ( CONSTANTS[7]*(STATES[1] - STATES[0]))/(1.00000+CONSTANTS[7]/CONSTANTS[6]);
ALGEBRAIC[20] = (fabs(ALGEBRAIC[4])>1.00000e-05 ? ( CONSTANTS[7]*((STATES[1] - STATES[0])+ (( (CONSTANTS[8]/CONSTANTS[6])*ALGEBRAIC[4])/(1.00000 - exp(- ALGEBRAIC[4])))*(STATES[1] -  CONSTANTS[10]*exp(- ALGEBRAIC[4]))))/(1.00000+CONSTANTS[7]/CONSTANTS[6]+( (CONSTANTS[8]/CONSTANTS[6])*ALGEBRAIC[4])/(1.00000 - exp(- ALGEBRAIC[4]))) : ( CONSTANTS[7]*((STATES[1] - STATES[0])+ (( (CONSTANTS[8]/CONSTANTS[6])*1.00000e-05)/(1.00000 - exp(- 1.00000e-05)))*(STATES[1] -  CONSTANTS[10]*exp(- 1.00000e-05))))/(1.00000+CONSTANTS[7]/CONSTANTS[6]+( (CONSTANTS[8]/CONSTANTS[6])*1.00000e-05)/(1.00000 - exp(- 1.00000e-05))));
ALGEBRAIC[26] = ( ALGEBRAIC[7]*( ALGEBRAIC[16]*(ALGEBRAIC[7]+CONSTANTS[45]+ALGEBRAIC[8])+ ALGEBRAIC[8]*CONSTANTS[44]))/ALGEBRAIC[23];
ALGEBRAIC[28] =  ALGEBRAIC[26]*ALGEBRAIC[20]+ ALGEBRAIC[19]*ALGEBRAIC[25];
ALGEBRAIC[31] = ( ALGEBRAIC[19]*ALGEBRAIC[8])/(CONSTANTS[45]+ALGEBRAIC[8]);
ALGEBRAIC[34] = ( ( STATES[2]*ALGEBRAIC[28]+ STATES[4]*ALGEBRAIC[31])*CONSTANTS[9])/CONSTANTS[0];
ALGEBRAIC[47] = ( CONSTANTS[32]*pow(STATES[0], 2.00000))/(pow(CONSTANTS[33], 2.00000)+pow(STATES[0], 2.00000));
ALGEBRAIC[53] =  CONSTANTS[37]*(STATES[1] - STATES[0]);
ALGEBRAIC[54] =  CONSTANTS[38]*(CONSTANTS[40] - STATES[5]) -  CONSTANTS[39]*STATES[5]*STATES[0];
ALGEBRAIC[22] = (fabs(ALGEBRAIC[4])>1.00000e-05 ? ( (( CONSTANTS[8]*ALGEBRAIC[4])/(1.00000 - exp(- ALGEBRAIC[4])))*(( CONSTANTS[10]*exp(- ALGEBRAIC[4]) - STATES[0])+ (CONSTANTS[7]/CONSTANTS[6])*( CONSTANTS[10]*exp(- ALGEBRAIC[4]) - STATES[1])))/(1.00000+CONSTANTS[7]/CONSTANTS[6]+( (CONSTANTS[8]/CONSTANTS[6])*ALGEBRAIC[4])/(1.00000 - exp(ALGEBRAIC[4]))) : ( (( CONSTANTS[8]*1.00000e-05)/(1.00000 - exp(- 1.00000e-05)))*(( CONSTANTS[10]*exp(- 1.00000e-05) - STATES[0])+ (CONSTANTS[7]/CONSTANTS[6])*( CONSTANTS[10]*exp(- 1.00000e-05) - STATES[1])))/(1.00000+CONSTANTS[7]/CONSTANTS[6]+( (CONSTANTS[8]/CONSTANTS[6])*1.00000e-05)/(1.00000 - exp(- 1.00000e-05))));
ALGEBRAIC[21] = (fabs(ALGEBRAIC[4])>1.00000e-05 ? ( (( CONSTANTS[8]*ALGEBRAIC[4])/(1.00000 - exp(- ALGEBRAIC[4])))*( CONSTANTS[10]*exp(- ALGEBRAIC[4]) - STATES[0]))/(1.00000+( (CONSTANTS[8]/CONSTANTS[6])*ALGEBRAIC[4])/(1.00000 - exp(- ALGEBRAIC[4]))) : ( (( CONSTANTS[8]*1.00000e-05)/(1.00000 - exp(- 1.00000e-05)))*( CONSTANTS[10]*exp(- 1.00000e-05) - STATES[0]))/(1.00000+( (CONSTANTS[8]/CONSTANTS[6])*1.00000e-05)/(1.00000 - exp(- 1.00000e-05))));
ALGEBRAIC[37] =  ALGEBRAIC[22]*ALGEBRAIC[26]+ ALGEBRAIC[21]*ALGEBRAIC[24];
ALGEBRAIC[40] = ( ALGEBRAIC[21]*ALGEBRAIC[7])/(ALGEBRAIC[7]+CONSTANTS[44]);
ALGEBRAIC[43] = ( ( STATES[2]*ALGEBRAIC[37]+ STATES[3]*ALGEBRAIC[40])*CONSTANTS[9])/CONSTANTS[0];
ALGEBRAIC[45] = ( CONSTANTS[29]*( exp( CONSTANTS[27]*ALGEBRAIC[3])*pow(CONSTANTS[30], 3.00000)*CONSTANTS[10] -  exp( (CONSTANTS[27] - 1.00000)*ALGEBRAIC[3])*pow(CONSTANTS[31], 3.00000)*STATES[0]))/( (pow(CONSTANTS[31], 3.00000)+pow(CONSTANTS[25], 3.00000))*(CONSTANTS[10]+CONSTANTS[26])*(1.00000+ CONSTANTS[28]*exp( (CONSTANTS[27] - 1.00000)*ALGEBRAIC[3])));
ALGEBRAIC[49] = ( CONSTANTS[34]*STATES[0])/(CONSTANTS[35]+STATES[0]);
ALGEBRAIC[51] =  (( CONSTANTS[3]*CONSTANTS[4])/( 2.00000*CONSTANTS[5]))*log(CONSTANTS[10]/STATES[0]);
ALGEBRAIC[52] =  CONSTANTS[36]*(ALGEBRAIC[51] - ALGEBRAIC[0]);
ALGEBRAIC[55] = pow(1.00000+( CONSTANTS[41]*CONSTANTS[42])/pow(CONSTANTS[41]+STATES[0], 2.00000), - 1.00000);
ALGEBRAIC[1] = STATES[0];
ALGEBRAIC[2] = ( STATES[1]*CONSTANTS[1])/CONSTANTS[0];
ALGEBRAIC[6] = (fabs(ALGEBRAIC[4])>1.00000e-09 ? (STATES[0]+ (CONSTANTS[7]/CONSTANTS[6])*STATES[1]+( (CONSTANTS[8]/CONSTANTS[6])*CONSTANTS[10]*ALGEBRAIC[4]*exp(- ALGEBRAIC[4]))/(1.00000 - exp(- ALGEBRAIC[4])))/(1.00000+CONSTANTS[7]/CONSTANTS[6]+( (CONSTANTS[8]/CONSTANTS[6])*ALGEBRAIC[4])/(1.00000 - exp(- ALGEBRAIC[4]))) : (STATES[0]+ (CONSTANTS[7]/CONSTANTS[6])*STATES[1]+ (CONSTANTS[8]/CONSTANTS[6])*CONSTANTS[10])/(1.00000+CONSTANTS[7]/CONSTANTS[6]+CONSTANTS[8]/CONSTANTS[6]));
ALGEBRAIC[29] = CONSTANTS[44]/(ALGEBRAIC[7]+CONSTANTS[44]);
ALGEBRAIC[32] = ALGEBRAIC[7]/(ALGEBRAIC[7]+CONSTANTS[44]);
ALGEBRAIC[35] = CONSTANTS[45]/(ALGEBRAIC[8]+CONSTANTS[45]);
ALGEBRAIC[38] = ALGEBRAIC[8]/(ALGEBRAIC[8]+CONSTANTS[45]);
ALGEBRAIC[41] = (((((((1.00000 - ALGEBRAIC[24]) - ALGEBRAIC[25]) - ALGEBRAIC[26]) - ALGEBRAIC[27]) - ALGEBRAIC[29]) - ALGEBRAIC[35]) - ALGEBRAIC[32]) - ALGEBRAIC[38];
}