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 70 entries in the algebraic variable array.
   There are a total of 18 entries in each of the rate and state variable arrays.
   There are a total of 49 entries in the constant variable array.
 */
/*
 * VOI is time in component environment (second).
 * STATES[0] is Vm in component Membrane (volt).
 * ALGEBRAIC[51] is i_CaL in component i_CaL (A_per_F).
 * ALGEBRAIC[57] is i_K1 in component i_K1 (A_per_F).
 * ALGEBRAIC[58] is i_f in component i_f (A_per_F).
 * ALGEBRAIC[48] is i_Na in component i_Na (A_per_F).
 * ALGEBRAIC[52] is i_Kr in component i_Kr (A_per_F).
 * ALGEBRAIC[53] is i_Ks in component i_Ks (A_per_F).
 * ALGEBRAIC[64] is i_to in component i_to (A_per_F).
 * ALGEBRAIC[63] is i_PCa in component i_PCa (A_per_F).
 * ALGEBRAIC[61] is i_NaK in component i_NaK (A_per_F).
 * ALGEBRAIC[62] is i_NaCa in component i_NaCa (A_per_F).
 * ALGEBRAIC[60] is i_b_Ca in component i_b_Ca (A_per_F).
 * ALGEBRAIC[59] is i_b_Na in component i_b_Na (A_per_F).
 * ALGEBRAIC[10] is E_Na in component electric_potentials (volt).
 * CONSTANTS[46] is E_K in component electric_potentials (volt).
 * ALGEBRAIC[25] is E_Ks in component electric_potentials (volt).
 * ALGEBRAIC[39] is E_Ca in component electric_potentials (volt).
 * CONSTANTS[0] is R in component model_parameters (joule_per_mole_kelvin).
 * CONSTANTS[1] is T in component model_parameters (kelvin).
 * CONSTANTS[2] is F in component model_parameters (coulomb_per_mole).
 * STATES[1] is Nai in component sodium_dynamics (millimolar).
 * CONSTANTS[3] is Nao in component model_parameters (millimolar).
 * STATES[2] is Cai in component calcium_dynamics (millimolar).
 * CONSTANTS[4] is Cao in component model_parameters (millimolar).
 * CONSTANTS[5] is Ki in component model_parameters (millimolar).
 * CONSTANTS[6] is Ko in component model_parameters (millimolar).
 * CONSTANTS[7] is PkNa in component electric_potentials (dimensionless).
 * CONSTANTS[8] is g_Na in component i_Na (S_per_F).
 * STATES[3] is m in component i_Na_m_gate (dimensionless).
 * STATES[4] is h in component i_Na_h_gate (dimensionless).
 * STATES[5] is j in component i_Na_j_gate (dimensionless).
 * ALGEBRAIC[0] is m_inf in component i_Na_m_gate (dimensionless).
 * ALGEBRAIC[40] is tau_m in component i_Na_m_gate (second).
 * ALGEBRAIC[15] is alpha_m in component i_Na_m_gate (dimensionless).
 * ALGEBRAIC[30] is beta_m in component i_Na_m_gate (dimensionless).
 * ALGEBRAIC[1] is h_inf in component i_Na_h_gate (dimensionless).
 * ALGEBRAIC[16] is alpha_h in component i_Na_h_gate (dimensionless).
 * ALGEBRAIC[31] is beta_h in component i_Na_h_gate (dimensionless).
 * ALGEBRAIC[41] is tau_h in component i_Na_h_gate (second).
 * ALGEBRAIC[2] is j_inf in component i_Na_j_gate (dimensionless).
 * ALGEBRAIC[17] is alpha_j in component i_Na_j_gate (dimensionless).
 * ALGEBRAIC[32] is beta_j in component i_Na_j_gate (dimensionless).
 * ALGEBRAIC[42] is tau_j in component i_Na_j_gate (second).
 * CONSTANTS[9] is g_CaL in component i_CaL (metre_cube_per_F_per_s).
 * STATES[6] is d in component i_CaL_d_gate (dimensionless).
 * STATES[7] is f1 in component i_CaL_f1_gate (dimensionless).
 * STATES[8] is f2 in component i_CaL_f2_gate (dimensionless).
 * STATES[9] is fCa in component i_CaL_fCa_gate (dimensionless).
 * ALGEBRAIC[3] is d_infinity in component i_CaL_d_gate (dimensionless).
 * ALGEBRAIC[49] is tau_d in component i_CaL_d_gate (second).
 * ALGEBRAIC[18] is alpha_d in component i_CaL_d_gate (dimensionless).
 * ALGEBRAIC[33] is beta_d in component i_CaL_d_gate (dimensionless).
 * ALGEBRAIC[43] is gamma_d in component i_CaL_d_gate (dimensionless).
 * ALGEBRAIC[4] is f1_inf in component i_CaL_f1_gate (dimensionless).
 * ALGEBRAIC[34] is tau_f1 in component i_CaL_f1_gate (second).
 * ALGEBRAIC[19] is constf1 in component i_CaL_f1_gate (dimensionless).
 * ALGEBRAIC[5] is f2_inf in component i_CaL_f2_gate (dimensionless).
 * ALGEBRAIC[20] is tau_f2 in component i_CaL_f2_gate (second).
 * CONSTANTS[47] is constf2 in component i_CaL_f2_gate (dimensionless).
 * ALGEBRAIC[50] is constfCa in component i_CaL_fCa_gate (dimensionless).
 * ALGEBRAIC[6] is alpha_fCa in component i_CaL_fCa_gate (dimensionless).
 * ALGEBRAIC[21] is beta_fCa in component i_CaL_fCa_gate (dimensionless).
 * ALGEBRAIC[35] is gamma_fCa in component i_CaL_fCa_gate (dimensionless).
 * ALGEBRAIC[44] is fCa_inf in component i_CaL_fCa_gate (dimensionless).
 * CONSTANTS[10] is tau_fCa in component i_CaL_fCa_gate (second).
 * CONSTANTS[11] is g_Kr in component i_Kr (S_per_F).
 * STATES[10] is Xr1 in component i_Kr_Xr1_gate (dimensionless).
 * STATES[11] is Xr2 in component i_Kr_Xr2_gate (dimensionless).
 * ALGEBRAIC[7] is Xr1_inf in component i_Kr_Xr1_gate (dimensionless).
 * ALGEBRAIC[22] is alpha_Xr1 in component i_Kr_Xr1_gate (dimensionless).
 * ALGEBRAIC[36] is beta_Xr1 in component i_Kr_Xr1_gate (dimensionless).
 * ALGEBRAIC[45] is tau_Xr1 in component i_Kr_Xr1_gate (second).
 * CONSTANTS[12] is L0 in component i_Kr_Xr1_gate (dimensionless).
 * CONSTANTS[48] is V_half in component i_Kr_Xr1_gate (millivolt).
 * CONSTANTS[13] is Q in component i_Kr_Xr1_gate (dimensionless).
 * ALGEBRAIC[8] is Xr2_infinity in component i_Kr_Xr2_gate (dimensionless).
 * ALGEBRAIC[23] is alpha_Xr2 in component i_Kr_Xr2_gate (dimensionless).
 * ALGEBRAIC[37] is beta_Xr2 in component i_Kr_Xr2_gate (dimensionless).
 * ALGEBRAIC[46] is tau_Xr2 in component i_Kr_Xr2_gate (second).
 * CONSTANTS[14] is g_Ks in component i_Ks (S_per_F).
 * STATES[12] is Xs in component i_Ks_Xs_gate (dimensionless).
 * ALGEBRAIC[9] is Xs_infinity in component i_Ks_Xs_gate (dimensionless).
 * ALGEBRAIC[24] is alpha_Xs in component i_Ks_Xs_gate (dimensionless).
 * ALGEBRAIC[38] is beta_Xs in component i_Ks_Xs_gate (dimensionless).
 * ALGEBRAIC[47] is tau_Xs in component i_Ks_Xs_gate (second).
 * CONSTANTS[15] is g_K1 in component i_K1 (S_per_F).
 * ALGEBRAIC[56] is XK1_inf in component i_K1 (dimensionless).
 * ALGEBRAIC[54] is alpha_K1 in component i_K1 (dimensionless).
 * ALGEBRAIC[55] is beta_K1 in component i_K1 (dimensionless).
 * CONSTANTS[16] is g_f in component i_f (S_per_F).
 * CONSTANTS[17] is E_f in component i_f (volt).
 * STATES[13] is Xf in component i_f_Xf_gate (dimensionless).
 * ALGEBRAIC[11] is Xf_infinity in component i_f_Xf_gate (dimensionless).
 * ALGEBRAIC[26] is tau_Xf in component i_f_Xf_gate (second).
 * CONSTANTS[18] is g_b_Na in component i_b_Na (S_per_F).
 * CONSTANTS[19] is g_b_Ca in component i_b_Ca (S_per_F).
 * CONSTANTS[20] is Km_K in component i_NaK (millimolar).
 * CONSTANTS[21] is Km_Na in component i_NaK (millimolar).
 * CONSTANTS[22] is PNaK in component i_NaK (A_per_F).
 * CONSTANTS[23] is kNaCa in component i_NaCa (A_per_F).
 * CONSTANTS[24] is alpha in component i_NaCa (dimensionless).
 * CONSTANTS[25] is gamma in component i_NaCa (dimensionless).
 * CONSTANTS[26] is Ksat in component i_NaCa (dimensionless).
 * CONSTANTS[27] is KmCa in component i_NaCa (millimolar).
 * CONSTANTS[28] is KmNai in component i_NaCa (millimolar).
 * CONSTANTS[29] is g_PCa in component i_PCa (A_per_F).
 * CONSTANTS[30] is KPCa in component i_PCa (millimolar).
 * CONSTANTS[31] is g_to in component i_to (S_per_F).
 * STATES[14] is q in component i_to_q_gate (dimensionless).
 * STATES[15] is r in component i_to_r_gate (dimensionless).
 * ALGEBRAIC[12] is q_inf in component i_to_q_gate (dimensionless).
 * ALGEBRAIC[27] is tau_q in component i_to_q_gate (second).
 * ALGEBRAIC[13] is r_inf in component i_to_r_gate (dimensionless).
 * ALGEBRAIC[28] is tau_r in component i_to_r_gate (second).
 * CONSTANTS[32] is Cm in component model_parameters (farad).
 * CONSTANTS[33] is Vc in component model_parameters (micrometre_cube).
 * CONSTANTS[34] is V_SR in component model_parameters (micrometre_cube).
 * STATES[16] is Ca_SR in component calcium_dynamics (millimolar).
 * CONSTANTS[35] is a_rel in component calcium_dynamics (millimolar_per_second).
 * CONSTANTS[36] is b_rel in component calcium_dynamics (millimolar).
 * CONSTANTS[37] is c_rel in component calcium_dynamics (millimolar_per_second).
 * STATES[17] is g in component calcium_dynamics (dimensionless).
 * CONSTANTS[38] is tau_g in component calcium_dynamics (second).
 * ALGEBRAIC[14] is g_inf in component calcium_dynamics (dimensionless).
 * CONSTANTS[39] is Kup in component calcium_dynamics (millimolar).
 * CONSTANTS[40] is Buf_C in component calcium_dynamics (millimolar).
 * CONSTANTS[41] is Buf_SR in component calcium_dynamics (millimolar).
 * CONSTANTS[42] is Kbuf_C in component calcium_dynamics (millimolar).
 * CONSTANTS[43] is Kbuf_SR in component calcium_dynamics (millimolar).
 * ALGEBRAIC[68] is Cai_bufc in component calcium_dynamics (dimensionless).
 * ALGEBRAIC[69] is Ca_SR_bufSR in component calcium_dynamics (dimensionless).
 * CONSTANTS[44] is VmaxUp in component calcium_dynamics (millimolar_per_second).
 * ALGEBRAIC[29] is const2 in component calcium_dynamics (dimensionless).
 * CONSTANTS[45] is V_leak in component calcium_dynamics (per_second).
 * ALGEBRAIC[65] is i_rel in component calcium_dynamics (millimolar_per_second).
 * ALGEBRAIC[66] is i_up in component calcium_dynamics (millimolar_per_second).
 * ALGEBRAIC[67] is i_leak in component calcium_dynamics (millimolar_per_second).
 * RATES[0] is d/dt Vm in component Membrane (volt).
 * RATES[3] is d/dt m in component i_Na_m_gate (dimensionless).
 * RATES[4] is d/dt h in component i_Na_h_gate (dimensionless).
 * RATES[5] is d/dt j in component i_Na_j_gate (dimensionless).
 * RATES[6] is d/dt d in component i_CaL_d_gate (dimensionless).
 * RATES[7] is d/dt f1 in component i_CaL_f1_gate (dimensionless).
 * RATES[8] is d/dt f2 in component i_CaL_f2_gate (dimensionless).
 * RATES[9] is d/dt fCa in component i_CaL_fCa_gate (dimensionless).
 * RATES[10] is d/dt Xr1 in component i_Kr_Xr1_gate (dimensionless).
 * RATES[11] is d/dt Xr2 in component i_Kr_Xr2_gate (dimensionless).
 * RATES[12] is d/dt Xs in component i_Ks_Xs_gate (dimensionless).
 * RATES[13] is d/dt Xf in component i_f_Xf_gate (dimensionless).
 * RATES[14] is d/dt q in component i_to_q_gate (dimensionless).
 * RATES[15] is d/dt r in component i_to_r_gate (dimensionless).
 * RATES[1] is d/dt Nai in component sodium_dynamics (millimolar).
 * RATES[17] is d/dt g in component calcium_dynamics (dimensionless).
 * RATES[2] is d/dt Cai in component calcium_dynamics (millimolar).
 * RATES[16] is d/dt Ca_SR in component calcium_dynamics (millimolar).
 */
void
initConsts(double* CONSTANTS, double* RATES, double *STATES)
{
STATES[0] = -0.068733823452164;
CONSTANTS[0] = 8.314472;
CONSTANTS[1] = 310;
CONSTANTS[2] = 96485.3415;
STATES[1] = 14.4424010544424;
CONSTANTS[3] = 151;
STATES[2] = 4.49232909234503e-5;
CONSTANTS[4] = 1.8;
CONSTANTS[5] = 150;
CONSTANTS[6] = 5.4;
CONSTANTS[7] = 0.03;
CONSTANTS[8] = 6646.185;
STATES[3] = 0.141183142078492;
STATES[4] = 0.642108593994587;
STATES[5] = 0.173566329483423;
CONSTANTS[9] = 8.635702e-5;
STATES[6] = 0.000127632520741878;
STATES[7] = 0.98038400433601;
STATES[8] = 0.999953006710394;
STATES[9] = 0.997346890768643;
CONSTANTS[10] = 0.002;
CONSTANTS[11] = 29.8667;
STATES[10] = 0.0257889110986083;
STATES[11] = 0.405046678739985;
CONSTANTS[12] = 0.025;
CONSTANTS[13] = 2.3;
CONSTANTS[14] = 2.041;
STATES[12] = 0.0447460799149437;
CONSTANTS[15] = 19.1925;
CONSTANTS[16] = 30.10312;
CONSTANTS[17] = -0.017;
STATES[13] = 0.0607988713874682;
CONSTANTS[18] = 0.9;
CONSTANTS[19] = 0.69264;
CONSTANTS[20] = 1;
CONSTANTS[21] = 40;
CONSTANTS[22] = 1.4731392;
CONSTANTS[23] = 2450;
CONSTANTS[24] = 2.8571432;
CONSTANTS[25] = 0.35;
CONSTANTS[26] = 0.1;
CONSTANTS[27] = 1.38;
CONSTANTS[28] = 87.5;
CONSTANTS[29] = 0.4125;
CONSTANTS[30] = 0.0005;
CONSTANTS[31] = 59.8077;
STATES[14] = 0.776163826643278;
STATES[15] = 0.000503296941001262;
CONSTANTS[32] = 7.86671e-11;
CONSTANTS[33] = 7012;
CONSTANTS[34] = 465.2;
STATES[16] = 0.149980051221604;
CONSTANTS[35] = 16.464;
CONSTANTS[36] = 0.25;
CONSTANTS[37] = 8.232;
STATES[17] = 1;
CONSTANTS[38] = 0.002;
CONSTANTS[39] = 0.00025;
CONSTANTS[40] = 0.25;
CONSTANTS[41] = 10;
CONSTANTS[42] = 0.001;
CONSTANTS[43] = 0.3;
CONSTANTS[44] = 0.22;
CONSTANTS[45] = 0.00044444;
CONSTANTS[46] =  (( CONSTANTS[0]*CONSTANTS[1])/CONSTANTS[2])*log(CONSTANTS[6]/CONSTANTS[5]);
CONSTANTS[47] = 2.00000;
CONSTANTS[48] =  1000.00*( (( - CONSTANTS[0]*CONSTANTS[1])/( CONSTANTS[2]*CONSTANTS[13]))*log(pow(1.00000+CONSTANTS[4]/2.60000, 4.00000)/( CONSTANTS[12]*pow(1.00000+CONSTANTS[4]/0.580000, 4.00000))) - 0.0190000);
}
void
computeRates(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC)
{
ALGEBRAIC[5] = 0.330000+0.670000/(1.00000+exp(( STATES[0]*1000.00+31.2260)/4.00000));
ALGEBRAIC[20] = ( ( 600.000*exp(- pow( STATES[0]*1000.00+25.0000, 2.00000)/170.000)+(31.0000/(1.00000+exp((25.0000 -  STATES[0]*1000.00)/10.0000))+16.0000/(1.00000+exp((30.0000+ STATES[0]*1000.00)/10.0000))))*CONSTANTS[47])/1000.00;
RATES[8] = (ALGEBRAIC[5] - STATES[8])/ALGEBRAIC[20];
ALGEBRAIC[11] = 1.00000/(1.00000+exp(( STATES[0]*1000.00+77.8500)/5.00000));
ALGEBRAIC[26] = (1900.00/(1.00000+exp(( STATES[0]*1000.00+15.0000)/10.0000)))/1000.00;
RATES[13] = (ALGEBRAIC[11] - STATES[13])/ALGEBRAIC[26];
ALGEBRAIC[12] = 1.00000/(1.00000+exp(( STATES[0]*1000.00+53.0000)/13.0000));
ALGEBRAIC[27] = (6.06000+39.1020/( 0.570000*exp( - 0.0800000*( STATES[0]*1000.00+44.0000))+ 0.0650000*exp( 0.100000*( STATES[0]*1000.00+45.9300))))/1000.00;
RATES[14] = (ALGEBRAIC[12] - STATES[14])/ALGEBRAIC[27];
ALGEBRAIC[13] = 1.00000/(1.00000+exp(- ( STATES[0]*1000.00 - 22.3000)/18.7500));
ALGEBRAIC[28] = (2.75352+14.4052/( 1.03700*exp( 0.0900000*( STATES[0]*1000.00+30.6100))+ 0.369000*exp( - 0.120000*( STATES[0]*1000.00+23.8400))))/1000.00;
RATES[15] = (ALGEBRAIC[13] - STATES[15])/ALGEBRAIC[28];
ALGEBRAIC[14] = (STATES[2]<=0.000350000 ? 1.00000/(1.00000+pow(STATES[2]/0.000350000, 6.00000)) : 1.00000/(1.00000+pow(STATES[2]/0.000350000, 16.0000)));
ALGEBRAIC[29] = (ALGEBRAIC[14]>STATES[17]&&STATES[0]>- 0.0600000 ? 0.00000 : 1.00000);
RATES[17] = ( ALGEBRAIC[29]*(ALGEBRAIC[14] - STATES[17]))/CONSTANTS[38];
ALGEBRAIC[4] = 1.00000/(1.00000+exp(( STATES[0]*1000.00+25.2260)/3.00000));
ALGEBRAIC[19] = (ALGEBRAIC[4] - STATES[7]>0.00000 ? 1.00000+ 1433.00*(STATES[2] -  50.0000*1.00000e-06) : 1.00000);
ALGEBRAIC[34] = ( (20.0000+( 1102.50*exp(- pow(pow( STATES[0]*1000.00+27.0000, 2.00000)/15.0000, 2.00000))+(200.000/(1.00000+exp((13.0000 -  STATES[0]*1000.00)/10.0000))+180.000/(1.00000+exp((30.0000+ STATES[0]*1000.00)/10.0000)))))*ALGEBRAIC[19])/1000.00;
RATES[7] = (ALGEBRAIC[4] - STATES[7])/ALGEBRAIC[34];
ALGEBRAIC[0] = 1.00000/pow(1.00000+exp(( - STATES[0]*1000.00 - 34.1000)/5.90000), 1.00000/3.00000);
ALGEBRAIC[15] = 1.00000/(1.00000+exp(( - STATES[0]*1000.00 - 60.0000)/5.00000));
ALGEBRAIC[30] = 0.100000/(1.00000+exp(( STATES[0]*1000.00+35.0000)/5.00000))+0.100000/(1.00000+exp(( STATES[0]*1000.00 - 50.0000)/200.000));
ALGEBRAIC[40] = ( 1.00000*( ALGEBRAIC[15]*ALGEBRAIC[30]))/1000.00;
RATES[3] = (ALGEBRAIC[0] - STATES[3])/ALGEBRAIC[40];
ALGEBRAIC[1] = 1.00000/ pow((1.00000+exp(( STATES[0]*1000.00+72.1000)/5.70000)), 1.0 / 2);
ALGEBRAIC[16] = (STATES[0]<- 0.0400000 ?  0.0570000*exp(- ( STATES[0]*1000.00+80.0000)/6.80000) : 0.00000);
ALGEBRAIC[31] = (STATES[0]<- 0.0400000 ?  2.70000*exp( 0.0790000*( STATES[0]*1000.00))+ 3.10000*( pow(10.0000, 5.00000)*exp( 0.348500*( STATES[0]*1000.00))) : 0.770000/( 0.130000*(1.00000+exp(( STATES[0]*1000.00+10.6600)/- 11.1000))));
ALGEBRAIC[41] = (STATES[0]<- 0.0400000 ? 1.50000/( (ALGEBRAIC[16]+ALGEBRAIC[31])*1000.00) : 2.54200/1000.00);
RATES[4] = (ALGEBRAIC[1] - STATES[4])/ALGEBRAIC[41];
ALGEBRAIC[2] = 1.00000/ pow((1.00000+exp(( STATES[0]*1000.00+72.1000)/5.70000)), 1.0 / 2);
ALGEBRAIC[17] = (STATES[0]<- 0.0400000 ? ( ( - 25428.0*exp( 0.244400*( STATES[0]*1000.00)) -  6.94800*( pow(10.0000, - 6.00000)*exp( - 0.0439100*( STATES[0]*1000.00))))*( STATES[0]*1000.00+37.7800))/(1.00000+exp( 0.311000*( STATES[0]*1000.00+79.2300))) : 0.00000);
ALGEBRAIC[32] = (STATES[0]<- 0.0400000 ? ( 0.0242400*exp( - 0.0105200*( STATES[0]*1000.00)))/(1.00000+exp( - 0.137800*( STATES[0]*1000.00+40.1400))) : ( 0.600000*exp( 0.0570000*( STATES[0]*1000.00)))/(1.00000+exp( - 0.100000*( STATES[0]*1000.00+32.0000))));
ALGEBRAIC[42] = 7.00000/( (ALGEBRAIC[17]+ALGEBRAIC[32])*1000.00);
RATES[5] = (ALGEBRAIC[2] - STATES[5])/ALGEBRAIC[42];
ALGEBRAIC[7] = 1.00000/(1.00000+exp((CONSTANTS[48] -  STATES[0]*1000.00)/4.90000));
ALGEBRAIC[22] = 450.000/(1.00000+exp((- 45.0000 -  STATES[0]*1000.00)/10.0000));
ALGEBRAIC[36] = 6.00000/(1.00000+exp((30.0000+ STATES[0]*1000.00)/11.5000));
ALGEBRAIC[45] = ( 1.00000*( ALGEBRAIC[22]*ALGEBRAIC[36]))/1000.00;
RATES[10] = (ALGEBRAIC[7] - STATES[10])/ALGEBRAIC[45];
ALGEBRAIC[8] = 1.00000/(1.00000+exp(( STATES[0]*1000.00+88.0000)/50.0000));
ALGEBRAIC[23] = 3.00000/(1.00000+exp((- 60.0000 -  STATES[0]*1000.00)/20.0000));
ALGEBRAIC[37] = 1.12000/(1.00000+exp((- 60.0000+ STATES[0]*1000.00)/20.0000));
ALGEBRAIC[46] = ( 1.00000*( ALGEBRAIC[23]*ALGEBRAIC[37]))/1000.00;
RATES[11] = (ALGEBRAIC[8] - STATES[11])/ALGEBRAIC[46];
ALGEBRAIC[9] = 1.00000/(1.00000+exp(( - STATES[0]*1000.00 - 20.0000)/16.0000));
ALGEBRAIC[24] = 1100.00/ pow((1.00000+exp((- 10.0000 -  STATES[0]*1000.00)/6.00000)), 1.0 / 2);
ALGEBRAIC[38] = 1.00000/(1.00000+exp((- 60.0000+ STATES[0]*1000.00)/20.0000));
ALGEBRAIC[47] = ( 1.00000*( ALGEBRAIC[24]*ALGEBRAIC[38]))/1000.00;
RATES[12] = (ALGEBRAIC[9] - STATES[12])/ALGEBRAIC[47];
ALGEBRAIC[3] = 1.00000/(1.00000+exp(- ( STATES[0]*1000.00+5.98600)/7.00000));
ALGEBRAIC[18] = 0.250000+1.40000/(1.00000+exp(( - STATES[0]*1000.00 - 35.0000)/13.0000));
ALGEBRAIC[33] = 1.40000/(1.00000+exp(( STATES[0]*1000.00+5.00000)/5.00000));
ALGEBRAIC[43] = 1.00000/(1.00000+exp(( - STATES[0]*1000.00+50.0000)/20.0000));
ALGEBRAIC[49] = ( ( ALGEBRAIC[18]*ALGEBRAIC[33]+ALGEBRAIC[43])*1.00000)/1000.00;
RATES[6] = (ALGEBRAIC[3] - STATES[6])/ALGEBRAIC[49];
ALGEBRAIC[6] = 1.00000/(1.00000+pow(STATES[2]/0.000600000, 8.00000));
ALGEBRAIC[21] = 0.100000/(1.00000+exp((STATES[2] - 0.000900000)/0.000100000));
ALGEBRAIC[35] = 0.300000/(1.00000+exp((STATES[2] - 0.000750000)/0.000800000));
ALGEBRAIC[44] = (ALGEBRAIC[6]+(ALGEBRAIC[21]+ALGEBRAIC[35]))/1.31560;
ALGEBRAIC[50] = (STATES[0]>- 0.0600000&&ALGEBRAIC[44]>STATES[9] ? 0.00000 : 1.00000);
RATES[9] = ( ALGEBRAIC[50]*(ALGEBRAIC[44] - STATES[9]))/CONSTANTS[10];
ALGEBRAIC[10] =  (( CONSTANTS[0]*CONSTANTS[1])/CONSTANTS[2])*log(CONSTANTS[3]/STATES[1]);
ALGEBRAIC[48] =  CONSTANTS[8]*( pow(STATES[3], 3.00000)*( STATES[4]*( STATES[5]*(STATES[0] - ALGEBRAIC[10]))));
ALGEBRAIC[61] = (( (( CONSTANTS[22]*CONSTANTS[6])/(CONSTANTS[6]+CONSTANTS[20]))*STATES[1])/(STATES[1]+CONSTANTS[21]))/(1.00000+( 0.124500*exp(( - 0.100000*( STATES[0]*CONSTANTS[2]))/( CONSTANTS[0]*CONSTANTS[1]))+ 0.0353000*exp(( - STATES[0]*CONSTANTS[2])/( CONSTANTS[0]*CONSTANTS[1]))));
ALGEBRAIC[62] = ( CONSTANTS[23]*( exp(( CONSTANTS[25]*( STATES[0]*CONSTANTS[2]))/( CONSTANTS[0]*CONSTANTS[1]))*( pow(STATES[1], 3.00000)*CONSTANTS[4]) -  exp(( (CONSTANTS[25] - 1.00000)*( STATES[0]*CONSTANTS[2]))/( CONSTANTS[0]*CONSTANTS[1]))*( pow(CONSTANTS[3], 3.00000)*( STATES[2]*CONSTANTS[24]))))/( (pow(CONSTANTS[28], 3.00000)+pow(CONSTANTS[3], 3.00000))*( (CONSTANTS[27]+CONSTANTS[4])*(1.00000+ CONSTANTS[26]*exp(( (CONSTANTS[25] - 1.00000)*( STATES[0]*CONSTANTS[2]))/( CONSTANTS[0]*CONSTANTS[1])))));
ALGEBRAIC[59] =  CONSTANTS[18]*(STATES[0] - ALGEBRAIC[10]);
RATES[1] = ( - CONSTANTS[32]*(ALGEBRAIC[48]+(ALGEBRAIC[59]+( 3.00000*ALGEBRAIC[61]+ 3.00000*ALGEBRAIC[62]))))/( CONSTANTS[2]*( CONSTANTS[33]*1.00000e-18));
ALGEBRAIC[51] =  (( (( CONSTANTS[9]*( 4.00000*( STATES[0]*pow(CONSTANTS[2], 2.00000))))/( CONSTANTS[0]*CONSTANTS[1]))*( STATES[2]*exp(( 2.00000*( STATES[0]*CONSTANTS[2]))/( CONSTANTS[0]*CONSTANTS[1])) -  0.341000*CONSTANTS[4]))/(exp(( 2.00000*( STATES[0]*CONSTANTS[2]))/( CONSTANTS[0]*CONSTANTS[1])) - 1.00000))*( STATES[6]*( STATES[7]*( STATES[8]*STATES[9])));
ALGEBRAIC[54] = 3.91000/(1.00000+exp( 0.594200*(( STATES[0]*1000.00 -  CONSTANTS[46]*1000.00) - 200.000)));
ALGEBRAIC[55] = ( - 1.50900*exp( 0.000200000*(( STATES[0]*1000.00 -  CONSTANTS[46]*1000.00)+100.000))+exp( 0.588600*(( STATES[0]*1000.00 -  CONSTANTS[46]*1000.00) - 10.0000)))/(1.00000+exp( 0.454700*( STATES[0]*1000.00 -  CONSTANTS[46]*1000.00)));
ALGEBRAIC[56] = ALGEBRAIC[54]/(ALGEBRAIC[54]+ALGEBRAIC[55]);
ALGEBRAIC[57] =  CONSTANTS[15]*( ALGEBRAIC[56]*( (STATES[0] - CONSTANTS[46])* pow((CONSTANTS[6]/5.40000), 1.0 / 2)));
ALGEBRAIC[58] =  CONSTANTS[16]*( STATES[13]*(STATES[0] - CONSTANTS[17]));
ALGEBRAIC[52] =  CONSTANTS[11]*( (STATES[0] - CONSTANTS[46])*( STATES[10]*( STATES[11]* pow((CONSTANTS[6]/5.40000), 1.0 / 2))));
ALGEBRAIC[25] =  (( CONSTANTS[0]*CONSTANTS[1])/CONSTANTS[2])*log((CONSTANTS[6]+ CONSTANTS[7]*CONSTANTS[3])/(CONSTANTS[5]+ CONSTANTS[7]*STATES[1]));
ALGEBRAIC[53] =  CONSTANTS[14]*( (STATES[0] - ALGEBRAIC[25])*( pow(STATES[12], 2.00000)*(1.00000+0.600000/(1.00000+pow(( 3.80000*1.00000e-05)/STATES[2], 1.40000)))));
ALGEBRAIC[64] =  CONSTANTS[31]*( (STATES[0] - CONSTANTS[46])*( STATES[14]*STATES[15]));
ALGEBRAIC[63] = ( CONSTANTS[29]*STATES[2])/(STATES[2]+CONSTANTS[30]);
ALGEBRAIC[39] =  (( 0.500000*( CONSTANTS[0]*CONSTANTS[1]))/CONSTANTS[2])*log(CONSTANTS[4]/STATES[2]);
ALGEBRAIC[60] =  CONSTANTS[19]*(STATES[0] - ALGEBRAIC[39]);
RATES[0] = - (ALGEBRAIC[57]+(ALGEBRAIC[64]+(ALGEBRAIC[52]+(ALGEBRAIC[53]+(ALGEBRAIC[51]+(ALGEBRAIC[61]+(ALGEBRAIC[48]+(ALGEBRAIC[62]+(ALGEBRAIC[63]+(ALGEBRAIC[58]+(ALGEBRAIC[59]+ALGEBRAIC[60])))))))))));
ALGEBRAIC[68] = 1.00000/(1.00000+( CONSTANTS[40]*CONSTANTS[42])/pow(STATES[2]+CONSTANTS[42], 2.00000));
ALGEBRAIC[65] =  (CONSTANTS[37]+( CONSTANTS[35]*pow(STATES[16], 2.00000))/(pow(CONSTANTS[36], 2.00000)+pow(STATES[16], 2.00000)))*( STATES[6]*( STATES[17]*0.0556000));
ALGEBRAIC[66] = CONSTANTS[44]/(1.00000+pow(CONSTANTS[39], 2.00000)/pow(STATES[2], 2.00000));
ALGEBRAIC[67] =  (STATES[16] - STATES[2])*CONSTANTS[45];
RATES[2] =  ALGEBRAIC[68]*(((ALGEBRAIC[67] - ALGEBRAIC[66])+ALGEBRAIC[65]) - ( ((ALGEBRAIC[51]+(ALGEBRAIC[60]+ALGEBRAIC[63])) -  2.00000*ALGEBRAIC[62])*CONSTANTS[32])/( 2.00000*( CONSTANTS[33]*( CONSTANTS[2]*1.00000e-18))));
ALGEBRAIC[69] = 1.00000/(1.00000+( CONSTANTS[41]*CONSTANTS[43])/pow(STATES[16]+CONSTANTS[43], 2.00000));
RATES[16] =  (( ALGEBRAIC[69]*CONSTANTS[33])/CONSTANTS[34])*(ALGEBRAIC[66] - (ALGEBRAIC[65]+ALGEBRAIC[67]));
}
void
computeVariables(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC)
{
ALGEBRAIC[5] = 0.330000+0.670000/(1.00000+exp(( STATES[0]*1000.00+31.2260)/4.00000));
ALGEBRAIC[20] = ( ( 600.000*exp(- pow( STATES[0]*1000.00+25.0000, 2.00000)/170.000)+(31.0000/(1.00000+exp((25.0000 -  STATES[0]*1000.00)/10.0000))+16.0000/(1.00000+exp((30.0000+ STATES[0]*1000.00)/10.0000))))*CONSTANTS[47])/1000.00;
ALGEBRAIC[11] = 1.00000/(1.00000+exp(( STATES[0]*1000.00+77.8500)/5.00000));
ALGEBRAIC[26] = (1900.00/(1.00000+exp(( STATES[0]*1000.00+15.0000)/10.0000)))/1000.00;
ALGEBRAIC[12] = 1.00000/(1.00000+exp(( STATES[0]*1000.00+53.0000)/13.0000));
ALGEBRAIC[27] = (6.06000+39.1020/( 0.570000*exp( - 0.0800000*( STATES[0]*1000.00+44.0000))+ 0.0650000*exp( 0.100000*( STATES[0]*1000.00+45.9300))))/1000.00;
ALGEBRAIC[13] = 1.00000/(1.00000+exp(- ( STATES[0]*1000.00 - 22.3000)/18.7500));
ALGEBRAIC[28] = (2.75352+14.4052/( 1.03700*exp( 0.0900000*( STATES[0]*1000.00+30.6100))+ 0.369000*exp( - 0.120000*( STATES[0]*1000.00+23.8400))))/1000.00;
ALGEBRAIC[14] = (STATES[2]<=0.000350000 ? 1.00000/(1.00000+pow(STATES[2]/0.000350000, 6.00000)) : 1.00000/(1.00000+pow(STATES[2]/0.000350000, 16.0000)));
ALGEBRAIC[29] = (ALGEBRAIC[14]>STATES[17]&&STATES[0]>- 0.0600000 ? 0.00000 : 1.00000);
ALGEBRAIC[4] = 1.00000/(1.00000+exp(( STATES[0]*1000.00+25.2260)/3.00000));
ALGEBRAIC[19] = (ALGEBRAIC[4] - STATES[7]>0.00000 ? 1.00000+ 1433.00*(STATES[2] -  50.0000*1.00000e-06) : 1.00000);
ALGEBRAIC[34] = ( (20.0000+( 1102.50*exp(- pow(pow( STATES[0]*1000.00+27.0000, 2.00000)/15.0000, 2.00000))+(200.000/(1.00000+exp((13.0000 -  STATES[0]*1000.00)/10.0000))+180.000/(1.00000+exp((30.0000+ STATES[0]*1000.00)/10.0000)))))*ALGEBRAIC[19])/1000.00;
ALGEBRAIC[0] = 1.00000/pow(1.00000+exp(( - STATES[0]*1000.00 - 34.1000)/5.90000), 1.00000/3.00000);
ALGEBRAIC[15] = 1.00000/(1.00000+exp(( - STATES[0]*1000.00 - 60.0000)/5.00000));
ALGEBRAIC[30] = 0.100000/(1.00000+exp(( STATES[0]*1000.00+35.0000)/5.00000))+0.100000/(1.00000+exp(( STATES[0]*1000.00 - 50.0000)/200.000));
ALGEBRAIC[40] = ( 1.00000*( ALGEBRAIC[15]*ALGEBRAIC[30]))/1000.00;
ALGEBRAIC[1] = 1.00000/ pow((1.00000+exp(( STATES[0]*1000.00+72.1000)/5.70000)), 1.0 / 2);
ALGEBRAIC[16] = (STATES[0]<- 0.0400000 ?  0.0570000*exp(- ( STATES[0]*1000.00+80.0000)/6.80000) : 0.00000);
ALGEBRAIC[31] = (STATES[0]<- 0.0400000 ?  2.70000*exp( 0.0790000*( STATES[0]*1000.00))+ 3.10000*( pow(10.0000, 5.00000)*exp( 0.348500*( STATES[0]*1000.00))) : 0.770000/( 0.130000*(1.00000+exp(( STATES[0]*1000.00+10.6600)/- 11.1000))));
ALGEBRAIC[41] = (STATES[0]<- 0.0400000 ? 1.50000/( (ALGEBRAIC[16]+ALGEBRAIC[31])*1000.00) : 2.54200/1000.00);
ALGEBRAIC[2] = 1.00000/ pow((1.00000+exp(( STATES[0]*1000.00+72.1000)/5.70000)), 1.0 / 2);
ALGEBRAIC[17] = (STATES[0]<- 0.0400000 ? ( ( - 25428.0*exp( 0.244400*( STATES[0]*1000.00)) -  6.94800*( pow(10.0000, - 6.00000)*exp( - 0.0439100*( STATES[0]*1000.00))))*( STATES[0]*1000.00+37.7800))/(1.00000+exp( 0.311000*( STATES[0]*1000.00+79.2300))) : 0.00000);
ALGEBRAIC[32] = (STATES[0]<- 0.0400000 ? ( 0.0242400*exp( - 0.0105200*( STATES[0]*1000.00)))/(1.00000+exp( - 0.137800*( STATES[0]*1000.00+40.1400))) : ( 0.600000*exp( 0.0570000*( STATES[0]*1000.00)))/(1.00000+exp( - 0.100000*( STATES[0]*1000.00+32.0000))));
ALGEBRAIC[42] = 7.00000/( (ALGEBRAIC[17]+ALGEBRAIC[32])*1000.00);
ALGEBRAIC[7] = 1.00000/(1.00000+exp((CONSTANTS[48] -  STATES[0]*1000.00)/4.90000));
ALGEBRAIC[22] = 450.000/(1.00000+exp((- 45.0000 -  STATES[0]*1000.00)/10.0000));
ALGEBRAIC[36] = 6.00000/(1.00000+exp((30.0000+ STATES[0]*1000.00)/11.5000));
ALGEBRAIC[45] = ( 1.00000*( ALGEBRAIC[22]*ALGEBRAIC[36]))/1000.00;
ALGEBRAIC[8] = 1.00000/(1.00000+exp(( STATES[0]*1000.00+88.0000)/50.0000));
ALGEBRAIC[23] = 3.00000/(1.00000+exp((- 60.0000 -  STATES[0]*1000.00)/20.0000));
ALGEBRAIC[37] = 1.12000/(1.00000+exp((- 60.0000+ STATES[0]*1000.00)/20.0000));
ALGEBRAIC[46] = ( 1.00000*( ALGEBRAIC[23]*ALGEBRAIC[37]))/1000.00;
ALGEBRAIC[9] = 1.00000/(1.00000+exp(( - STATES[0]*1000.00 - 20.0000)/16.0000));
ALGEBRAIC[24] = 1100.00/ pow((1.00000+exp((- 10.0000 -  STATES[0]*1000.00)/6.00000)), 1.0 / 2);
ALGEBRAIC[38] = 1.00000/(1.00000+exp((- 60.0000+ STATES[0]*1000.00)/20.0000));
ALGEBRAIC[47] = ( 1.00000*( ALGEBRAIC[24]*ALGEBRAIC[38]))/1000.00;
ALGEBRAIC[3] = 1.00000/(1.00000+exp(- ( STATES[0]*1000.00+5.98600)/7.00000));
ALGEBRAIC[18] = 0.250000+1.40000/(1.00000+exp(( - STATES[0]*1000.00 - 35.0000)/13.0000));
ALGEBRAIC[33] = 1.40000/(1.00000+exp(( STATES[0]*1000.00+5.00000)/5.00000));
ALGEBRAIC[43] = 1.00000/(1.00000+exp(( - STATES[0]*1000.00+50.0000)/20.0000));
ALGEBRAIC[49] = ( ( ALGEBRAIC[18]*ALGEBRAIC[33]+ALGEBRAIC[43])*1.00000)/1000.00;
ALGEBRAIC[6] = 1.00000/(1.00000+pow(STATES[2]/0.000600000, 8.00000));
ALGEBRAIC[21] = 0.100000/(1.00000+exp((STATES[2] - 0.000900000)/0.000100000));
ALGEBRAIC[35] = 0.300000/(1.00000+exp((STATES[2] - 0.000750000)/0.000800000));
ALGEBRAIC[44] = (ALGEBRAIC[6]+(ALGEBRAIC[21]+ALGEBRAIC[35]))/1.31560;
ALGEBRAIC[50] = (STATES[0]>- 0.0600000&&ALGEBRAIC[44]>STATES[9] ? 0.00000 : 1.00000);
ALGEBRAIC[10] =  (( CONSTANTS[0]*CONSTANTS[1])/CONSTANTS[2])*log(CONSTANTS[3]/STATES[1]);
ALGEBRAIC[48] =  CONSTANTS[8]*( pow(STATES[3], 3.00000)*( STATES[4]*( STATES[5]*(STATES[0] - ALGEBRAIC[10]))));
ALGEBRAIC[61] = (( (( CONSTANTS[22]*CONSTANTS[6])/(CONSTANTS[6]+CONSTANTS[20]))*STATES[1])/(STATES[1]+CONSTANTS[21]))/(1.00000+( 0.124500*exp(( - 0.100000*( STATES[0]*CONSTANTS[2]))/( CONSTANTS[0]*CONSTANTS[1]))+ 0.0353000*exp(( - STATES[0]*CONSTANTS[2])/( CONSTANTS[0]*CONSTANTS[1]))));
ALGEBRAIC[62] = ( CONSTANTS[23]*( exp(( CONSTANTS[25]*( STATES[0]*CONSTANTS[2]))/( CONSTANTS[0]*CONSTANTS[1]))*( pow(STATES[1], 3.00000)*CONSTANTS[4]) -  exp(( (CONSTANTS[25] - 1.00000)*( STATES[0]*CONSTANTS[2]))/( CONSTANTS[0]*CONSTANTS[1]))*( pow(CONSTANTS[3], 3.00000)*( STATES[2]*CONSTANTS[24]))))/( (pow(CONSTANTS[28], 3.00000)+pow(CONSTANTS[3], 3.00000))*( (CONSTANTS[27]+CONSTANTS[4])*(1.00000+ CONSTANTS[26]*exp(( (CONSTANTS[25] - 1.00000)*( STATES[0]*CONSTANTS[2]))/( CONSTANTS[0]*CONSTANTS[1])))));
ALGEBRAIC[59] =  CONSTANTS[18]*(STATES[0] - ALGEBRAIC[10]);
ALGEBRAIC[51] =  (( (( CONSTANTS[9]*( 4.00000*( STATES[0]*pow(CONSTANTS[2], 2.00000))))/( CONSTANTS[0]*CONSTANTS[1]))*( STATES[2]*exp(( 2.00000*( STATES[0]*CONSTANTS[2]))/( CONSTANTS[0]*CONSTANTS[1])) -  0.341000*CONSTANTS[4]))/(exp(( 2.00000*( STATES[0]*CONSTANTS[2]))/( CONSTANTS[0]*CONSTANTS[1])) - 1.00000))*( STATES[6]*( STATES[7]*( STATES[8]*STATES[9])));
ALGEBRAIC[54] = 3.91000/(1.00000+exp( 0.594200*(( STATES[0]*1000.00 -  CONSTANTS[46]*1000.00) - 200.000)));
ALGEBRAIC[55] = ( - 1.50900*exp( 0.000200000*(( STATES[0]*1000.00 -  CONSTANTS[46]*1000.00)+100.000))+exp( 0.588600*(( STATES[0]*1000.00 -  CONSTANTS[46]*1000.00) - 10.0000)))/(1.00000+exp( 0.454700*( STATES[0]*1000.00 -  CONSTANTS[46]*1000.00)));
ALGEBRAIC[56] = ALGEBRAIC[54]/(ALGEBRAIC[54]+ALGEBRAIC[55]);
ALGEBRAIC[57] =  CONSTANTS[15]*( ALGEBRAIC[56]*( (STATES[0] - CONSTANTS[46])* pow((CONSTANTS[6]/5.40000), 1.0 / 2)));
ALGEBRAIC[58] =  CONSTANTS[16]*( STATES[13]*(STATES[0] - CONSTANTS[17]));
ALGEBRAIC[52] =  CONSTANTS[11]*( (STATES[0] - CONSTANTS[46])*( STATES[10]*( STATES[11]* pow((CONSTANTS[6]/5.40000), 1.0 / 2))));
ALGEBRAIC[25] =  (( CONSTANTS[0]*CONSTANTS[1])/CONSTANTS[2])*log((CONSTANTS[6]+ CONSTANTS[7]*CONSTANTS[3])/(CONSTANTS[5]+ CONSTANTS[7]*STATES[1]));
ALGEBRAIC[53] =  CONSTANTS[14]*( (STATES[0] - ALGEBRAIC[25])*( pow(STATES[12], 2.00000)*(1.00000+0.600000/(1.00000+pow(( 3.80000*1.00000e-05)/STATES[2], 1.40000)))));
ALGEBRAIC[64] =  CONSTANTS[31]*( (STATES[0] - CONSTANTS[46])*( STATES[14]*STATES[15]));
ALGEBRAIC[63] = ( CONSTANTS[29]*STATES[2])/(STATES[2]+CONSTANTS[30]);
ALGEBRAIC[39] =  (( 0.500000*( CONSTANTS[0]*CONSTANTS[1]))/CONSTANTS[2])*log(CONSTANTS[4]/STATES[2]);
ALGEBRAIC[60] =  CONSTANTS[19]*(STATES[0] - ALGEBRAIC[39]);
ALGEBRAIC[68] = 1.00000/(1.00000+( CONSTANTS[40]*CONSTANTS[42])/pow(STATES[2]+CONSTANTS[42], 2.00000));
ALGEBRAIC[65] =  (CONSTANTS[37]+( CONSTANTS[35]*pow(STATES[16], 2.00000))/(pow(CONSTANTS[36], 2.00000)+pow(STATES[16], 2.00000)))*( STATES[6]*( STATES[17]*0.0556000));
ALGEBRAIC[66] = CONSTANTS[44]/(1.00000+pow(CONSTANTS[39], 2.00000)/pow(STATES[2], 2.00000));
ALGEBRAIC[67] =  (STATES[16] - STATES[2])*CONSTANTS[45];
ALGEBRAIC[69] = 1.00000/(1.00000+( CONSTANTS[41]*CONSTANTS[43])/pow(STATES[16]+CONSTANTS[43], 2.00000));
}