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 86 entries in the algebraic variable array. There are a total of 41 entries in each of the rate and state variable arrays. There are a total of 90 entries in the constant variable array. */ /* * VOI is time in component environment (second). * CONSTANTS[0] is R in component model_parameters (joule_per_kilomole_kelvin). * CONSTANTS[1] is T in component model_parameters (kelvin). * CONSTANTS[2] is F in component model_parameters (coulomb_per_mole). * CONSTANTS[3] is Nae in component model_parameters (millimolar). * CONSTANTS[4] is Cae in component model_parameters (millimolar). * CONSTANTS[5] is Ke in component model_parameters (millimolar). * CONSTANTS[87] is Vt in component model_parameters (cm3). * CONSTANTS[54] is Vd in component model_parameters (cm3). * CONSTANTS[56] is Vmyo in component model_parameters (cm3). * CONSTANTS[58] is Sms in component model_parameters (cm2). * CONSTANTS[59] is Smt in component model_parameters (cm2). * CONSTANTS[89] is Cms in component model_parameters (microF). * CONSTANTS[88] is Cmt in component model_parameters (microF). * CONSTANTS[86] is Rst in component model_parameters (ohm). * CONSTANTS[55] is VSRrel in component model_parameters (cm3). * CONSTANTS[57] is VSRup in component model_parameters (cm3). * CONSTANTS[51] is Vc in component model_parameters (cm3). * CONSTANTS[84] is pt in component model_parameters (dimensionless). * CONSTANTS[85] is Lt in component model_parameters (cm). * CONSTANTS[6] is Rot in component model_parameters (ohm_cm). * CONSTANTS[7] is radiust in component model_parameters (cm). * CONSTANTS[8] is ptcm in component model_parameters (per_cm2). * CONSTANTS[9] is Smtot in component model_parameters (cm2). * ALGEBRAIC[22] is i_circ in component i_circ (microA). * STATES[0] is Vms in component Vms (millivolt). * STATES[1] is Vmt in component Vmt (millivolt). * ALGEBRAIC[46] is i_Stim in component i_Stim (microA). * CONSTANTS[10] is stim_offset in component i_Stim (second). * CONSTANTS[11] is stim_period in component i_Stim (second). * CONSTANTS[12] is stim_duration in component i_Stim (second). * CONSTANTS[13] is stim_amplitude in component i_Stim (microA). * ALGEBRAIC[43] is past in component i_Stim (second). * CONSTANTS[60] is gNas in component membrane_permeabilities (milliS). * CONSTANTS[61] is gCas in component membrane_permeabilities (cm3_per_second). * CONSTANTS[62] is gKfs in component membrane_permeabilities (milliS). * CONSTANTS[63] is gKsts in component membrane_permeabilities (milliS). * CONSTANTS[64] is gK1s in component membrane_permeabilities (milliS). * CONSTANTS[65] is gKbs in component membrane_permeabilities (milliS). * CONSTANTS[66] is gKtos in component membrane_permeabilities (milliS). * CONSTANTS[67] is gNabs in component membrane_permeabilities (milliS). * CONSTANTS[68] is gCabs in component membrane_permeabilities (milliS). * CONSTANTS[69] is i_pCa_maxs in component membrane_permeabilities (microA). * CONSTANTS[70] is i_NaK_maxs in component membrane_permeabilities (microA). * CONSTANTS[71] is i_NaCa_maxs in component membrane_permeabilities (microA). * CONSTANTS[72] is gNat in component membrane_permeabilities (milliS). * CONSTANTS[73] is gCat in component membrane_permeabilities (cm3_per_second). * CONSTANTS[74] is gKft in component membrane_permeabilities (milliS). * CONSTANTS[75] is gKstt in component membrane_permeabilities (milliS). * CONSTANTS[76] is gK1t in component membrane_permeabilities (milliS). * CONSTANTS[77] is gKbt in component membrane_permeabilities (milliS). * CONSTANTS[78] is gKtot in component membrane_permeabilities (milliS). * CONSTANTS[79] is gNabt in component membrane_permeabilities (milliS). * CONSTANTS[80] is gCabt in component membrane_permeabilities (milliS). * CONSTANTS[81] is i_pCa_maxt in component membrane_permeabilities (microA). * CONSTANTS[82] is i_NaK_maxt in component membrane_permeabilities (microA). * CONSTANTS[83] is i_NaCa_maxt in component membrane_permeabilities (microA). * CONSTANTS[14] is gNa in component membrane_permeabilities (milliS_per_cm2). * CONSTANTS[15] is fNat in component membrane_permeabilities (dimensionless). * CONSTANTS[16] is gKf in component membrane_permeabilities (milliS_per_cm2). * CONSTANTS[17] is fKft in component membrane_permeabilities (dimensionless). * CONSTANTS[18] is gKst in component membrane_permeabilities (milliS_per_cm2). * CONSTANTS[19] is fKstt in component membrane_permeabilities (dimensionless). * CONSTANTS[20] is gK1 in component membrane_permeabilities (milliS_per_cm2). * CONSTANTS[21] is fK1t in component membrane_permeabilities (dimensionless). * CONSTANTS[22] is gKb in component membrane_permeabilities (milliS_per_cm2). * CONSTANTS[23] is fKbt in component membrane_permeabilities (dimensionless). * CONSTANTS[24] is gKto in component membrane_permeabilities (milliS_per_cm2). * CONSTANTS[25] is fKtot in component membrane_permeabilities (dimensionless). * CONSTANTS[26] is gNab in component membrane_permeabilities (milliS_per_cm2). * CONSTANTS[27] is fNabt in component membrane_permeabilities (dimensionless). * CONSTANTS[28] is gCab in component membrane_permeabilities (milliS_per_cm2). * CONSTANTS[29] is fCabt in component membrane_permeabilities (dimensionless). * CONSTANTS[30] is gCa in component membrane_permeabilities (cm_per_second). * CONSTANTS[31] is fCat in component membrane_permeabilities (dimensionless). * CONSTANTS[32] is i_NaCa_max in component membrane_permeabilities (microA_per_cm2). * CONSTANTS[33] is fNaCat in component membrane_permeabilities (dimensionless). * CONSTANTS[34] is i_NaK_max in component membrane_permeabilities (microA_per_cm2). * CONSTANTS[35] is fNaKt in component membrane_permeabilities (dimensionless). * CONSTANTS[36] is i_pCa_max in component membrane_permeabilities (microA_per_cm2). * CONSTANTS[37] is fpCat in component membrane_permeabilities (dimensionless). * ALGEBRAIC[48] is i_Nas in component i_Nas (microA). * ALGEBRAIC[47] is E_Nas in component i_Nas (millivolt). * STATES[2] is Nai in component ion_concentrations (millimolar). * STATES[3] is Ki in component ion_concentrations (millimolar). * STATES[4] is m in component i_Nas_m_gate (dimensionless). * STATES[5] is h in component i_Nas_h_gate (dimensionless). * ALGEBRAIC[0] is alpha_m in component i_Nas_m_gate (per_second). * ALGEBRAIC[23] is beta_m in component i_Nas_m_gate (per_second). * ALGEBRAIC[1] is alpha_h in component i_Nas_h_gate (per_second). * ALGEBRAIC[24] is beta_h in component i_Nas_h_gate (per_second). * ALGEBRAIC[50] is i_Nat in component i_Nat (microA). * ALGEBRAIC[49] is E_Nat in component i_Nat (millivolt). * STATES[6] is Nat in component ion_concentrations (millimolar). * STATES[7] is Kt in component ion_concentrations (millimolar). * STATES[8] is m in component i_Nat_m_gate (dimensionless). * STATES[9] is h in component i_Nat_h_gate (dimensionless). * ALGEBRAIC[2] is alpha_m in component i_Nat_m_gate (per_second). * ALGEBRAIC[25] is beta_m in component i_Nat_m_gate (per_second). * ALGEBRAIC[3] is alpha_h in component i_Nat_h_gate (per_second). * ALGEBRAIC[26] is beta_h in component i_Nat_h_gate (per_second). * ALGEBRAIC[52] is i_Cas in component i_Cas (microA). * ALGEBRAIC[51] is E_Cas in component i_Cas (millivolt). * STATES[10] is Co in component i_Cas (dimensionless). * STATES[11] is C1 in component i_Cas (dimensionless). * STATES[12] is C2 in component i_Cas (dimensionless). * ALGEBRAIC[27] is tauCo in component i_Cas (second). * CONSTANTS[38] is tauCcast in component i_Cas (second). * ALGEBRAIC[28] is tauC1 in component i_Cas (second). * ALGEBRAIC[44] is tauC2 in component i_Cas (second). * STATES[13] is Ccast in component i_Cas (dimensionless). * ALGEBRAIC[4] is Coinf in component i_Cas (dimensionless). * ALGEBRAIC[5] is Ccastinf in component i_Cas (dimensionless). * ALGEBRAIC[6] is C1inf in component i_Cas (dimensionless). * ALGEBRAIC[29] is C2inf in component i_Cas (dimensionless). * STATES[14] is Cass in component ion_concentrations (millimolar). * STATES[15] is Cai in component ion_concentrations (millimolar). * ALGEBRAIC[54] is i_Cat in component i_Cat (microA). * ALGEBRAIC[53] is E_Cat in component i_Cat (millivolt). * STATES[16] is Co in component i_Cat (dimensionless). * STATES[17] is C1 in component i_Cat (dimensionless). * STATES[18] is C2 in component i_Cat (dimensionless). * ALGEBRAIC[30] is tauCo in component i_Cat (second). * CONSTANTS[39] is tauCcast in component i_Cat (second). * ALGEBRAIC[31] is tauC1 in component i_Cat (second). * ALGEBRAIC[45] is tauC2 in component i_Cat (second). * ALGEBRAIC[7] is Coinf in component i_Cat (dimensionless). * STATES[19] is Ccast in component i_Cat (dimensionless). * ALGEBRAIC[8] is Ccastinf in component i_Cat (dimensionless). * ALGEBRAIC[9] is C1inf in component i_Cat (dimensionless). * ALGEBRAIC[32] is C2inf in component i_Cat (dimensionless). * STATES[20] is Cat in component ion_concentrations (millimolar). * ALGEBRAIC[56] is i_Ktos in component i_Ktos (microA). * ALGEBRAIC[55] is E_Ks in component i_Ktos (millivolt). * STATES[21] is rs in component i_Ktos_rs_gate (dimensionless). * STATES[22] is ss in component i_Ktos_ss_gate (dimensionless). * STATES[23] is sss in component i_Ktos_sss_gate (dimensionless). * ALGEBRAIC[33] is taurs in component i_Ktos_rs_gate (second). * ALGEBRAIC[10] is rinfs in component i_Ktos_rs_gate (dimensionless). * ALGEBRAIC[34] is tauss in component i_Ktos_ss_gate (second). * ALGEBRAIC[11] is sinfs in component i_Ktos_ss_gate (dimensionless). * ALGEBRAIC[35] is tausss in component i_Ktos_sss_gate (second). * ALGEBRAIC[12] is ssinfs in component i_Ktos_sss_gate (dimensionless). * ALGEBRAIC[58] is i_Ktot in component i_Ktot (microA). * ALGEBRAIC[57] is E_Kt in component i_Ktot (millivolt). * STATES[24] is rt in component i_Ktot_rt_gate (dimensionless). * STATES[25] is st in component i_Ktot_st_gate (dimensionless). * STATES[26] is sst in component i_Ktot_sst_gate (dimensionless). * ALGEBRAIC[36] is taurt in component i_Ktot_rt_gate (second). * ALGEBRAIC[13] is rinft in component i_Ktot_rt_gate (dimensionless). * ALGEBRAIC[37] is taust in component i_Ktot_st_gate (second). * ALGEBRAIC[14] is sinft in component i_Ktot_st_gate (dimensionless). * ALGEBRAIC[38] is tausst in component i_Ktot_sst_gate (second). * ALGEBRAIC[15] is ssinft in component i_Ktot_sst_gate (dimensionless). * ALGEBRAIC[59] is i_Ksts in component i_Ksts (microA). * STATES[27] is rsts in component i_Ksts_rsts_gate (dimensionless). * STATES[28] is ssts in component i_Ksts_ssts_gate (dimensionless). * ALGEBRAIC[39] is taursts in component i_Ksts_rsts_gate (second). * ALGEBRAIC[16] is rstinfs in component i_Ksts_rsts_gate (dimensionless). * CONSTANTS[40] is taussts in component i_Ksts_ssts_gate (second). * ALGEBRAIC[17] is sstinfs in component i_Ksts_ssts_gate (dimensionless). * ALGEBRAIC[60] is i_Kstt in component i_Kstt (microA). * STATES[29] is rstt in component i_Kstt_rstt_gate (dimensionless). * STATES[30] is sstt in component i_Kstt_sstt_gate (dimensionless). * ALGEBRAIC[40] is taurstt in component i_Kstt_rstt_gate (second). * ALGEBRAIC[18] is rstinft in component i_Kstt_rstt_gate (dimensionless). * CONSTANTS[41] is tausstt in component i_Kstt_sstt_gate (second). * ALGEBRAIC[19] is sstinft in component i_Kstt_sstt_gate (dimensionless). * ALGEBRAIC[61] is i_Kfs in component i_Kfs (microA). * STATES[31] is qs in component i_Kfs_qs_gate (dimensionless). * ALGEBRAIC[41] is tauqs in component i_Kfs_qs_gate (second). * ALGEBRAIC[20] is qinfs in component i_Kfs_qs_gate (dimensionless). * ALGEBRAIC[62] is i_Kft in component i_Kft (microA). * STATES[32] is qt in component i_Kft_qt_gate (dimensionless). * ALGEBRAIC[42] is tauqt in component i_Kft_qt_gate (second). * ALGEBRAIC[21] is qinft in component i_Kft_qt_gate (dimensionless). * ALGEBRAIC[63] is i_K1s in component i_K1s (microA). * ALGEBRAIC[64] is i_K1t in component i_K1t (microA). * ALGEBRAIC[65] is i_Nabs in component i_Nabs (microA). * ALGEBRAIC[66] is i_Nabt in component i_Nabt (microA). * ALGEBRAIC[67] is i_Cabs in component i_Cabs (microA). * ALGEBRAIC[68] is i_Cabt in component i_Cabt (microA). * ALGEBRAIC[69] is i_Kbs in component i_Kbs (microA). * ALGEBRAIC[70] is i_Kbt in component i_Kbt (microA). * ALGEBRAIC[71] is i_NaCas in component i_NaCas (microA). * ALGEBRAIC[72] is i_NaCat in component i_NaCat (microA). * ALGEBRAIC[73] is i_NaKs in component i_NaKs (microA). * ALGEBRAIC[74] is i_NaKt in component i_NaKt (microA). * ALGEBRAIC[77] is i_pCas in component i_pCas (microA). * ALGEBRAIC[78] is i_pCat in component i_pCat (microA). * ALGEBRAIC[75] is JteNa in component t_tubular_ion_fluxes (millimolar_per_second). * ALGEBRAIC[79] is JteCa in component t_tubular_ion_fluxes (millimolar_per_second). * ALGEBRAIC[76] is JteK in component t_tubular_ion_fluxes (millimolar_per_second). * CONSTANTS[42] is tauNa in component t_tubular_ion_fluxes (second). * CONSTANTS[43] is tauCa in component t_tubular_ion_fluxes (second). * CONSTANTS[44] is tauK in component t_tubular_ion_fluxes (second). * ALGEBRAIC[80] is JCaSRup in component JCaSRup (millimolar_per_second). * STATES[33] is CaSRup in component CaSRup (millimolar). * ALGEBRAIC[81] is Jtr in component Jtr (millimolar_per_second). * CONSTANTS[45] is tautr in component Jtr (second). * STATES[34] is CaSRrel in component CaSRrel (millimolar). * ALGEBRAIC[82] is JCaSRrel in component JCaSRrel (millimolar_per_second). * CONSTANTS[52] is kap in component JCaSRrel (per_millimolar4_per_second). * CONSTANTS[46] is kam in component JCaSRrel (per_second). * CONSTANTS[53] is kbp in component JCaSRrel (per_millimolar3_per_second). * CONSTANTS[47] is kbm in component JCaSRrel (per_second). * CONSTANTS[48] is kcp in component JCaSRrel (per_second). * CONSTANTS[49] is kcm in component JCaSRrel (per_second). * STATES[35] is F1 in component JCaSRrel (dimensionless). * STATES[36] is F2 in component JCaSRrel (dimensionless). * STATES[37] is F3 in component JCaSRrel (dimensionless). * STATES[38] is F4 in component JCaSRrel (dimensionless). * ALGEBRAIC[83] is JCad in component JCad (millimolar_per_second). * CONSTANTS[50] is taud in component JCad (second). * STATES[39] is BTRH in component ion_concentrations (millimolar). * STATES[40] is BTRL in component ion_concentrations (millimolar). * ALGEBRAIC[84] is dBTRH in component ion_concentrations (millimolar_per_second). * ALGEBRAIC[85] is dBTRL in component ion_concentrations (millimolar_per_second). * RATES[4] is d/dt m in component i_Nas_m_gate (dimensionless). * RATES[5] is d/dt h in component i_Nas_h_gate (dimensionless). * RATES[8] is d/dt m in component i_Nat_m_gate (dimensionless). * RATES[9] is d/dt h in component i_Nat_h_gate (dimensionless). * RATES[11] is d/dt C1 in component i_Cas (dimensionless). * RATES[12] is d/dt C2 in component i_Cas (dimensionless). * RATES[10] is d/dt Co in component i_Cas (dimensionless). * RATES[13] is d/dt Ccast in component i_Cas (dimensionless). * RATES[17] is d/dt C1 in component i_Cat (dimensionless). * RATES[18] is d/dt C2 in component i_Cat (dimensionless). * RATES[16] is d/dt Co in component i_Cat (dimensionless). * RATES[19] is d/dt Ccast in component i_Cat (dimensionless). * RATES[21] is d/dt rs in component i_Ktos_rs_gate (dimensionless). * RATES[22] is d/dt ss in component i_Ktos_ss_gate (dimensionless). * RATES[23] is d/dt sss in component i_Ktos_sss_gate (dimensionless). * RATES[24] is d/dt rt in component i_Ktot_rt_gate (dimensionless). * RATES[25] is d/dt st in component i_Ktot_st_gate (dimensionless). * RATES[26] is d/dt sst in component i_Ktot_sst_gate (dimensionless). * RATES[27] is d/dt rsts in component i_Ksts_rsts_gate (dimensionless). * RATES[28] is d/dt ssts in component i_Ksts_ssts_gate (dimensionless). * RATES[29] is d/dt rstt in component i_Kstt_rstt_gate (dimensionless). * RATES[30] is d/dt sstt in component i_Kstt_sstt_gate (dimensionless). * RATES[31] is d/dt qs in component i_Kfs_qs_gate (dimensionless). * RATES[32] is d/dt qt in component i_Kft_qt_gate (dimensionless). * RATES[35] is d/dt F1 in component JCaSRrel (dimensionless). * RATES[36] is d/dt F2 in component JCaSRrel (dimensionless). * RATES[37] is d/dt F3 in component JCaSRrel (dimensionless). * RATES[38] is d/dt F4 in component JCaSRrel (dimensionless). * RATES[33] is d/dt CaSRup in component CaSRup (millimolar). * RATES[34] is d/dt CaSRrel in component CaSRrel (millimolar). * RATES[39] is d/dt BTRH in component ion_concentrations (millimolar). * RATES[40] is d/dt BTRL in component ion_concentrations (millimolar). * RATES[14] is d/dt Cass in component ion_concentrations (millimolar). * RATES[15] is d/dt Cai in component ion_concentrations (millimolar). * RATES[2] is d/dt Nai in component ion_concentrations (millimolar). * RATES[3] is d/dt Ki in component ion_concentrations (millimolar). * RATES[6] is d/dt Nat in component ion_concentrations (millimolar). * RATES[20] is d/dt Cat in component ion_concentrations (millimolar). * RATES[7] is d/dt Kt in component ion_concentrations (millimolar). * RATES[0] is d/dt Vms in component Vms (millivolt). * RATES[1] is d/dt Vmt in component Vmt (millivolt). */ void initConsts(double* CONSTANTS, double* RATES, double *STATES) { CONSTANTS[0] = 8310; CONSTANTS[1] = 295; CONSTANTS[2] = 96500; CONSTANTS[3] = 140; CONSTANTS[4] = 1.2; CONSTANTS[5] = 5.4; CONSTANTS[6] = 83.33; CONSTANTS[7] = 150e-7; CONSTANTS[8] = 30000000; CONSTANTS[9] = 0.0001; STATES[0] = -7.9709547e1; STATES[1] = -7.9709536e1; CONSTANTS[10] = 0; CONSTANTS[11] = 1; CONSTANTS[12] = 0.001; CONSTANTS[13] = 0.0052; CONSTANTS[14] = 10; CONSTANTS[15] = 0.56; CONSTANTS[16] = 0.0145; CONSTANTS[17] = 0.56; CONSTANTS[18] = 0.07; CONSTANTS[19] = 0.76; CONSTANTS[20] = 0.24; CONSTANTS[21] = 0.56; CONSTANTS[22] = 0.00138; CONSTANTS[23] = 0.56; CONSTANTS[24] = 0.35; CONSTANTS[25] = 0.56; CONSTANTS[26] = 0.0008015; CONSTANTS[27] = 0.56; CONSTANTS[28] = 0.000648; CONSTANTS[29] = 0.56; CONSTANTS[30] = 0.00021; CONSTANTS[31] = 0.87; CONSTANTS[32] = 0.00018; CONSTANTS[33] = 0.81; CONSTANTS[34] = 1; CONSTANTS[35] = 0.59; CONSTANTS[36] = 0.85; CONSTANTS[37] = 0.56; STATES[2] = 6.9435814e0; STATES[3] = 1.3753311e2; STATES[4] = 2.1832558e-6; STATES[5] = 5.8232781e-1; STATES[6] = 1.4001386e2; STATES[7] = 5.3627676e0; STATES[8] = 2.1832694e-6; STATES[9] = 5.8232717e-1; STATES[10] = 2.5436465e-6; STATES[11] = 9.9994546e-1; STATES[12] = 9.9994546e-1; CONSTANTS[38] = 0.009; STATES[13] = 9.9570063e-1; STATES[14] = 4.3112114e-5; STATES[15] = 3.5486498e-5; STATES[16] = 2.543652e-6; STATES[17] = 9.9994546e-1; STATES[18] = 9.9994546e-1; CONSTANTS[39] = 0.009; STATES[19] = 9.9570063e-1; STATES[20] = 1.2271399e0; STATES[21] = 2.3485072e-3; STATES[22] = 9.8315843e-1; STATES[23] = 6.748337e-1; STATES[24] = 2.3485094e-3; STATES[25] = 9.8315865e-1; STATES[26] = 6.7478532e-1; STATES[27] = 3.1079213e-3; STATES[28] = 3.0773393e-1; CONSTANTS[40] = 2.1; STATES[29] = 3.1079241e-3; STATES[30] = 3.0773368e-1; CONSTANTS[41] = 2.1; STATES[31] = 3.4357356e-3; STATES[32] = 3.4357175e-3; CONSTANTS[42] = 0.15; CONSTANTS[43] = 0.5; CONSTANTS[44] = 0.15; STATES[33] = 2.2755058e-1; CONSTANTS[45] = 0.03448; STATES[34] = 2.2638169e-1; CONSTANTS[46] = 576; CONSTANTS[47] = 1930; CONSTANTS[48] = 18; CONSTANTS[49] = 0.8; STATES[35] = 6.7606483e-1; STATES[36] = 3.8333331e-4; STATES[37] = 6.4516879e-11; STATES[38] = 3.2355462e-1; CONSTANTS[50] = 0.003125; STATES[39] = 9.2804169e-1; STATES[40] = 3.4317829e-2; CONSTANTS[51] = CONSTANTS[9]/7850.00; CONSTANTS[52] = 1.21500e+13; CONSTANTS[53] = 4.05000e+09; CONSTANTS[54] = CONSTANTS[51]*7.50000e-05; CONSTANTS[55] = CONSTANTS[51]*0.00350000; CONSTANTS[56] = CONSTANTS[51]*0.585000; CONSTANTS[57] = CONSTANTS[51]*0.0315000; CONSTANTS[58] = CONSTANTS[9] - 4400.00*CONSTANTS[51]; CONSTANTS[59] = CONSTANTS[9] - CONSTANTS[58]; CONSTANTS[60] = CONSTANTS[14]*(CONSTANTS[58]+CONSTANTS[59])*(1.00000 - CONSTANTS[15]); CONSTANTS[61] = CONSTANTS[30]*(CONSTANTS[58]+CONSTANTS[59])*(1.00000 - CONSTANTS[31]); CONSTANTS[62] = CONSTANTS[16]*(CONSTANTS[58]+CONSTANTS[59])*(1.00000 - CONSTANTS[17]); CONSTANTS[63] = CONSTANTS[18]*(CONSTANTS[58]+CONSTANTS[59])*(1.00000 - CONSTANTS[19]); CONSTANTS[64] = CONSTANTS[20]*(CONSTANTS[58]+CONSTANTS[59])*(1.00000 - CONSTANTS[21]); CONSTANTS[65] = CONSTANTS[22]*(CONSTANTS[58]+CONSTANTS[59])*(1.00000 - CONSTANTS[23]); CONSTANTS[66] = CONSTANTS[24]*(CONSTANTS[58]+CONSTANTS[59])*(1.00000 - CONSTANTS[25]); CONSTANTS[67] = CONSTANTS[26]*(CONSTANTS[58]+CONSTANTS[59])*(1.00000 - CONSTANTS[27]); CONSTANTS[68] = CONSTANTS[28]*(CONSTANTS[58]+CONSTANTS[59])*(1.00000 - CONSTANTS[29]); CONSTANTS[69] = CONSTANTS[36]*(CONSTANTS[58]+CONSTANTS[59])*(1.00000 - CONSTANTS[37]); CONSTANTS[70] = CONSTANTS[34]*(CONSTANTS[58]+CONSTANTS[59])*(1.00000 - CONSTANTS[35]); CONSTANTS[71] = CONSTANTS[32]*(CONSTANTS[58]+CONSTANTS[59])*(1.00000 - CONSTANTS[33]); CONSTANTS[72] = CONSTANTS[14]*(CONSTANTS[58]+CONSTANTS[59])*CONSTANTS[15]; CONSTANTS[73] = CONSTANTS[30]*(CONSTANTS[58]+CONSTANTS[59])*CONSTANTS[31]; CONSTANTS[74] = CONSTANTS[16]*(CONSTANTS[58]+CONSTANTS[59])*CONSTANTS[17]; CONSTANTS[75] = CONSTANTS[18]*(CONSTANTS[58]+CONSTANTS[59])*CONSTANTS[19]; CONSTANTS[76] = CONSTANTS[20]*(CONSTANTS[58]+CONSTANTS[59])*CONSTANTS[21]; CONSTANTS[77] = CONSTANTS[22]*(CONSTANTS[58]+CONSTANTS[59])*CONSTANTS[23]; CONSTANTS[78] = CONSTANTS[24]*(CONSTANTS[58]+CONSTANTS[59])*CONSTANTS[25]; CONSTANTS[79] = CONSTANTS[26]*(CONSTANTS[58]+CONSTANTS[59])*CONSTANTS[27]; CONSTANTS[80] = CONSTANTS[28]*(CONSTANTS[58]+CONSTANTS[59])*CONSTANTS[29]; CONSTANTS[81] = CONSTANTS[36]*(CONSTANTS[58]+CONSTANTS[59])*CONSTANTS[37]; CONSTANTS[82] = CONSTANTS[34]*(CONSTANTS[58]+CONSTANTS[59])*CONSTANTS[35]; CONSTANTS[83] = CONSTANTS[32]*(CONSTANTS[58]+CONSTANTS[59])*CONSTANTS[33]; CONSTANTS[84] = CONSTANTS[8]*CONSTANTS[58]; CONSTANTS[85] = CONSTANTS[59]/( 2.00000*3.14159*CONSTANTS[7]*CONSTANTS[84]); CONSTANTS[86] = (( CONSTANTS[6]*CONSTANTS[85])/2.00000)/( 3.14159*pow(CONSTANTS[7], 2.00000)*CONSTANTS[84]); CONSTANTS[87] = 3.14159*pow(CONSTANTS[7], 2.00000)*CONSTANTS[85]*CONSTANTS[84]; CONSTANTS[88] = CONSTANTS[59]*1.00000; CONSTANTS[89] = CONSTANTS[58]*1.00000; } void computeRates(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC) { RATES[35] = STATES[36]*CONSTANTS[46] - STATES[35]*CONSTANTS[52]*pow(STATES[14], 4.00000); RATES[36] = ( STATES[35]*CONSTANTS[52]*pow(STATES[14], 4.00000)+ STATES[37]*CONSTANTS[47]+ STATES[38]*CONSTANTS[49]) - STATES[36]*(CONSTANTS[46]+ CONSTANTS[53]*pow(STATES[14], 3.00000)+CONSTANTS[48]); RATES[37] = STATES[36]*CONSTANTS[53]*pow(STATES[14], 3.00000) - STATES[37]*CONSTANTS[47]; RATES[38] = STATES[36]*CONSTANTS[48] - STATES[38]*CONSTANTS[49]; ALGEBRAIC[5] = 1.00000/(1.00000+STATES[14]/0.0100000); RATES[13] = (ALGEBRAIC[5] - STATES[13])/CONSTANTS[38]; ALGEBRAIC[8] = 1.00000/(1.00000+STATES[14]/0.0100000); RATES[19] = (ALGEBRAIC[8] - STATES[19])/CONSTANTS[39]; ALGEBRAIC[17] = 1.00000/(1.00000+exp((STATES[0]+87.5000)/10.3000)); RATES[28] = (ALGEBRAIC[17] - STATES[28])/CONSTANTS[40]; ALGEBRAIC[19] = 1.00000/(1.00000+exp((STATES[1]+87.5000)/10.3000)); RATES[30] = (ALGEBRAIC[19] - STATES[30])/CONSTANTS[41]; ALGEBRAIC[0] = ( 117.260*(STATES[0]+59.3000))/(1.00000 - exp( - 0.550000*(STATES[0]+59.3000))); ALGEBRAIC[23] = 3800.00*exp( - 0.0720000*(STATES[0]+61.0000)); RATES[4] = ALGEBRAIC[0]*(1.00000 - STATES[4]) - ALGEBRAIC[23]*STATES[4]; ALGEBRAIC[1] = 284.400/(1.00000+exp( 0.0812000*(STATES[0]+115.900))); ALGEBRAIC[24] = ( 18.7700*(STATES[0]+64.4000))/(1.00000 - exp( - 0.220000*(STATES[0]+64.4000))); RATES[5] = ALGEBRAIC[1]*(1.00000 - STATES[5]) - ALGEBRAIC[24]*STATES[5]; ALGEBRAIC[2] = ( 117.260*(STATES[1]+59.3000))/(1.00000 - exp( - 0.550000*(STATES[1]+59.3000))); ALGEBRAIC[25] = 3800.00*exp( - 0.0720000*(STATES[1]+61.0000)); RATES[8] = ALGEBRAIC[2]*(1.00000 - STATES[8]) - ALGEBRAIC[25]*STATES[8]; ALGEBRAIC[3] = 284.400/(1.00000+exp( 0.0812000*(STATES[1]+115.900))); ALGEBRAIC[26] = ( 18.7700*(STATES[1]+64.4000))/(1.00000 - exp( - 0.220000*(STATES[1]+64.4000))); RATES[9] = ALGEBRAIC[3]*(1.00000 - STATES[9]) - ALGEBRAIC[26]*STATES[9]; ALGEBRAIC[28] = 0.105000*exp(- pow((STATES[0]+45.0000)/12.0000, 2.00000))+0.0400000/(1.00000+exp((- STATES[0]+25.0000)/25.0000))+0.0150000/(1.00000+exp((STATES[0]+75.0000)/25.0000)); ALGEBRAIC[6] = 1.00000/(1.00000+exp((STATES[0]+26.7000)/5.40000)); RATES[11] = (ALGEBRAIC[6] - STATES[11])/ALGEBRAIC[28]; ALGEBRAIC[27] = 0.000250000+ 0.00305000*exp( - 0.00450000*pow(STATES[0]+7.00000, 2.00000))+ 0.00105000*exp( - 0.00200000*pow(STATES[0] - 18.0000, 2.00000)); ALGEBRAIC[4] = 1.00000/(1.00000+exp(- (STATES[0]+15.3000)/5.00000)); RATES[10] = (ALGEBRAIC[4] - STATES[10])/ALGEBRAIC[27]; ALGEBRAIC[31] = 0.105000*exp(- pow((STATES[1]+45.0000)/12.0000, 2.00000))+0.0400000/(1.00000+exp((- STATES[1]+25.0000)/25.0000))+0.0150000/(1.00000+exp((STATES[1]+75.0000)/25.0000)); ALGEBRAIC[9] = 1.00000/(1.00000+exp((STATES[1]+26.7000)/5.40000)); RATES[17] = (ALGEBRAIC[9] - STATES[17])/ALGEBRAIC[31]; ALGEBRAIC[30] = 0.000250000+ 0.00305000*exp( - 0.00450000*pow(STATES[1]+7.00000, 2.00000))+ 0.00105000*exp( - 0.00200000*pow(STATES[1] - 18.0000, 2.00000)); ALGEBRAIC[7] = 1.00000/(1.00000+exp(- (STATES[1]+15.3000)/5.00000)); RATES[16] = (ALGEBRAIC[7] - STATES[16])/ALGEBRAIC[30]; ALGEBRAIC[33] = 1.00000/( 45.1600*exp( 0.0357700*(STATES[0]+50.0000))+ 98.9000*exp( - 0.100000*(STATES[0]+38.0000))); ALGEBRAIC[10] = 1.00000/(1.00000+exp((STATES[0]+10.6000)/- 11.4200)); RATES[21] = (ALGEBRAIC[10] - STATES[21])/ALGEBRAIC[33]; ALGEBRAIC[34] = 0.350000*exp(- pow( 0.0666000*(STATES[0]+70.0000), 2.00000))+0.0350000; ALGEBRAIC[11] = 1.00000/(1.00000+exp((STATES[0]+45.3000)/6.88410)); RATES[22] = (ALGEBRAIC[11] - STATES[22])/ALGEBRAIC[34]; ALGEBRAIC[35] = 3.70000*exp(- pow( 0.0333000*(STATES[0]+70.0000), 2.00000))+0.0350000; ALGEBRAIC[12] = 1.00000/(1.00000+exp((STATES[0]+45.3000)/6.88410)); RATES[23] = (ALGEBRAIC[12] - STATES[23])/ALGEBRAIC[35]; ALGEBRAIC[36] = 1.00000/( 45.1600*exp( 0.0357700*(STATES[1]+50.0000))+ 98.9000*exp( - 0.100000*(STATES[1]+38.0000))); ALGEBRAIC[13] = 1.00000/(1.00000+exp((STATES[1]+10.6000)/- 11.4200)); RATES[24] = (ALGEBRAIC[13] - STATES[24])/ALGEBRAIC[36]; ALGEBRAIC[37] = 0.350000*exp(- pow( 0.0666000*(STATES[1]+70.0000), 2.00000))+0.0350000; ALGEBRAIC[14] = 1.00000/(1.00000+exp((STATES[1]+45.3000)/6.88410)); RATES[25] = (ALGEBRAIC[14] - STATES[25])/ALGEBRAIC[37]; ALGEBRAIC[38] = 3.70000*exp(- pow( 0.0333000*(STATES[1]+70.0000), 2.00000))+0.0350000; ALGEBRAIC[15] = 1.00000/(1.00000+exp((STATES[1]+45.3000)/6.88410)); RATES[26] = (ALGEBRAIC[15] - STATES[26])/ALGEBRAIC[38]; ALGEBRAIC[39] = 10.0000/( 45.1600*exp( 0.0357700*(STATES[0]+50.0000))+ 98.9000*exp( - 0.100000*(STATES[0]+38.0000))); ALGEBRAIC[16] = 1.00000/(1.00000+exp(- (STATES[0]+11.5000)/11.8200)); RATES[27] = (ALGEBRAIC[16] - STATES[27])/ALGEBRAIC[39]; ALGEBRAIC[40] = 10.0000/( 45.1600*exp( 0.0357700*(STATES[1]+50.0000))+ 98.9000*exp( - 0.100000*(STATES[1]+38.0000))); ALGEBRAIC[18] = 1.00000/(1.00000+exp(- (STATES[1]+11.5000)/11.8200)); RATES[29] = (ALGEBRAIC[18] - STATES[29])/ALGEBRAIC[40]; ALGEBRAIC[41] = 1.00000/( 0.118850*exp((STATES[0]+80.0000)/28.3700)+ 0.562300*exp(- (STATES[0]+80.0000)/14.1900)); ALGEBRAIC[20] = 1.00000/(1.00000+exp((STATES[0]+138.600)/10.4800)); RATES[31] = (ALGEBRAIC[20] - STATES[31])/ALGEBRAIC[41]; ALGEBRAIC[42] = 1.00000/( 0.118850*exp((STATES[1]+80.0000)/28.3700)+ 0.562300*exp(- (STATES[1]+80.0000)/14.1900)); ALGEBRAIC[21] = 1.00000/(1.00000+exp((STATES[1]+138.600)/10.4800)); RATES[32] = (ALGEBRAIC[21] - STATES[32])/ALGEBRAIC[42]; ALGEBRAIC[44] = 0.0410000*exp(- pow((STATES[0]+47.0000)/12.0000, 2.00000))+0.0800000/(1.00000+exp(- (STATES[0]+55.0000)/5.00000))+0.0150000/(1.00000+exp((STATES[0]+75.0000)/25.0000)); ALGEBRAIC[29] = ALGEBRAIC[6]; RATES[12] = (ALGEBRAIC[29] - STATES[12])/ALGEBRAIC[44]; ALGEBRAIC[45] = 0.0410000*exp(- pow((STATES[1]+47.0000)/12.0000, 2.00000))+0.0800000/(1.00000+exp(- (STATES[1]+55.0000)/5.00000))+0.0150000/(1.00000+exp((STATES[1]+75.0000)/25.0000)); ALGEBRAIC[32] = ALGEBRAIC[9]; RATES[18] = (ALGEBRAIC[32] - STATES[18])/ALGEBRAIC[45]; ALGEBRAIC[48] = CONSTANTS[60]*pow(STATES[4], 3.00000)*STATES[5]*(STATES[0] - ( log((CONSTANTS[3]+ 0.120000*CONSTANTS[5])/(STATES[2]+ 0.120000*STATES[3]))*CONSTANTS[0]*CONSTANTS[1])/CONSTANTS[2]); ALGEBRAIC[50] = CONSTANTS[72]*pow(STATES[8], 3.00000)*STATES[9]*(STATES[1] - ( log((STATES[6]+ 0.120000*STATES[7])/(STATES[2]+ 0.120000*STATES[3]))*CONSTANTS[0]*CONSTANTS[1])/CONSTANTS[2]); ALGEBRAIC[47] = ( log(CONSTANTS[3]/STATES[2])*CONSTANTS[0]*CONSTANTS[1])/CONSTANTS[2]; ALGEBRAIC[65] = CONSTANTS[67]*(STATES[0] - ALGEBRAIC[47]); ALGEBRAIC[49] = ( log(STATES[6]/STATES[2])*CONSTANTS[0]*CONSTANTS[1])/CONSTANTS[2]; ALGEBRAIC[66] = CONSTANTS[79]*(STATES[1] - ALGEBRAIC[49]); ALGEBRAIC[71] = ( CONSTANTS[71]*( exp( 0.0187000*STATES[0])*pow(STATES[2], 3.00000)*CONSTANTS[4] - exp( - 0.0187000*STATES[0])*pow(CONSTANTS[3], 3.00000)*STATES[15]))/(1.00000+ 0.000100000*( pow(CONSTANTS[3], 3.00000)*STATES[15]+ pow(STATES[2], 3.00000)*CONSTANTS[4])); ALGEBRAIC[72] = ( CONSTANTS[83]*( exp( 0.0187000*STATES[1])*pow(STATES[2], 3.00000)*STATES[20] - exp( - 0.0187000*STATES[1])*pow(STATES[6], 3.00000)*STATES[15]))/(1.00000+ 0.000100000*( pow(STATES[6], 3.00000)*STATES[15]+ pow(STATES[2], 3.00000)*STATES[20])); ALGEBRAIC[73] = ( (( (CONSTANTS[70]/(1.00000+ 0.124500*exp(( - 0.100000*STATES[0]*CONSTANTS[2])/( CONSTANTS[0]*CONSTANTS[1]))+ (( 0.0365000*1.00000)/7.00000)*(exp(CONSTANTS[3]/67.3000) - 1.00000)*exp(( - STATES[0]*CONSTANTS[2])/( CONSTANTS[0]*CONSTANTS[1]))))*1.00000)/(1.00000+pow(10.0000/STATES[2], 1.50000)))*CONSTANTS[5])/(CONSTANTS[5]+1.50000); ALGEBRAIC[74] = ( (( (CONSTANTS[82]/(1.00000+ 0.124500*exp(( - 0.100000*STATES[1]*CONSTANTS[2])/( CONSTANTS[0]*CONSTANTS[1]))+ (( 0.0365000*1.00000)/7.00000)*(exp(STATES[6]/67.3000) - 1.00000)*exp(( - STATES[1]*CONSTANTS[2])/( CONSTANTS[0]*CONSTANTS[1]))))*1.00000)/(1.00000+pow(10.0000/STATES[2], 1.50000)))*STATES[7])/(STATES[7]+1.50000); RATES[2] = - (ALGEBRAIC[48]+ALGEBRAIC[50]+ALGEBRAIC[65]+ALGEBRAIC[66]+ 3.00000*ALGEBRAIC[71]+ 3.00000*ALGEBRAIC[72]+ 3.00000*ALGEBRAIC[73]+ 3.00000*ALGEBRAIC[74])/( CONSTANTS[2]*CONSTANTS[56]); ALGEBRAIC[43] = floor(VOI/CONSTANTS[11])*CONSTANTS[11]; ALGEBRAIC[46] = (VOI - ALGEBRAIC[43]>=CONSTANTS[10]&&VOI - ALGEBRAIC[43]<=CONSTANTS[10]+CONSTANTS[12] ? CONSTANTS[13] : 0.00000); ALGEBRAIC[55] = ( log(CONSTANTS[5]/STATES[3])*CONSTANTS[0]*CONSTANTS[1])/CONSTANTS[2]; ALGEBRAIC[56] = CONSTANTS[66]*STATES[21]*( 0.886000*STATES[22]+ 0.114000*STATES[23])*(STATES[0] - ALGEBRAIC[55]); ALGEBRAIC[57] = ( log(STATES[7]/STATES[3])*CONSTANTS[0]*CONSTANTS[1])/CONSTANTS[2]; ALGEBRAIC[58] = CONSTANTS[78]*STATES[24]*( 0.886000*STATES[25]+ 0.114000*STATES[26])*(STATES[1] - ALGEBRAIC[57]); ALGEBRAIC[59] = CONSTANTS[63]*STATES[27]*STATES[28]*(STATES[0] - ALGEBRAIC[55]); ALGEBRAIC[60] = CONSTANTS[75]*STATES[29]*STATES[30]*(STATES[1] - ALGEBRAIC[57]); ALGEBRAIC[61] = CONSTANTS[62]*STATES[31]*( 0.200000*(STATES[0] - ALGEBRAIC[47])+ 0.800000*(STATES[0] - ALGEBRAIC[55])); ALGEBRAIC[62] = CONSTANTS[74]*STATES[32]*( 0.200000*(STATES[1] - ALGEBRAIC[49])+ 0.800000*(STATES[1] - ALGEBRAIC[57])); ALGEBRAIC[63] = ( CONSTANTS[64]*((STATES[0] - ALGEBRAIC[55]) - 1.73000))/(1.00000+ exp( (( 1.61300*CONSTANTS[2])/( CONSTANTS[0]*CONSTANTS[1]))*((STATES[0] - ALGEBRAIC[55]) - 1.73000))*(1.00000+exp((CONSTANTS[5] - 0.998800)/- 0.124000))); ALGEBRAIC[64] = ( CONSTANTS[76]*((STATES[1] - ALGEBRAIC[57]) - 1.73000))/(1.00000+ exp( (( 1.61300*CONSTANTS[2])/( CONSTANTS[0]*CONSTANTS[1]))*((STATES[1] - ALGEBRAIC[57]) - 1.73000))*(1.00000+exp((STATES[7] - 0.998800)/- 0.124000))); ALGEBRAIC[69] = CONSTANTS[65]*(STATES[0] - ALGEBRAIC[55]); ALGEBRAIC[70] = CONSTANTS[77]*(STATES[1] - ALGEBRAIC[57]); RATES[3] = - ((((- ALGEBRAIC[46]+ALGEBRAIC[61]+ALGEBRAIC[62]+ALGEBRAIC[59]+ALGEBRAIC[60]+ALGEBRAIC[63]+ALGEBRAIC[64]+ALGEBRAIC[69]+ALGEBRAIC[70]) - 2.00000*ALGEBRAIC[73]) - 2.00000*ALGEBRAIC[74])+ALGEBRAIC[56]+ALGEBRAIC[58])/( CONSTANTS[2]*CONSTANTS[56]); ALGEBRAIC[75] = (( 1.00000*CONSTANTS[87])/CONSTANTS[42])*(STATES[6] - CONSTANTS[3]); RATES[6] = ((ALGEBRAIC[50]+ALGEBRAIC[66]+ 3.00000*ALGEBRAIC[72]+ 3.00000*ALGEBRAIC[74])/CONSTANTS[2] - 1.00000*ALGEBRAIC[75])/CONSTANTS[87]; ALGEBRAIC[76] = (( 1.00000*CONSTANTS[87])/CONSTANTS[44])*(STATES[7] - CONSTANTS[5]); RATES[7] = ((((ALGEBRAIC[62]+ALGEBRAIC[60]+ALGEBRAIC[64]+ALGEBRAIC[70]) - 2.00000*ALGEBRAIC[74])+ALGEBRAIC[58])/CONSTANTS[2] - 1.00000*ALGEBRAIC[76])/CONSTANTS[87]; ALGEBRAIC[22] = 1000.00*(STATES[1]/CONSTANTS[86] - STATES[0]/CONSTANTS[86]); ALGEBRAIC[52] = (( (( CONSTANTS[61]*4.00000*STATES[0]*pow(CONSTANTS[2], 2.00000))/( CONSTANTS[0]*CONSTANTS[1]))*( STATES[14]*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[10]*( (0.900000+STATES[13]/10.0000)*STATES[11]+ (0.100000 - STATES[13]/10.0000)*STATES[12]); ALGEBRAIC[51] = ( log(CONSTANTS[4]/STATES[15])*CONSTANTS[0]*CONSTANTS[1])/( 2.00000*CONSTANTS[2]); ALGEBRAIC[67] = CONSTANTS[68]*(STATES[0] - ALGEBRAIC[51]); ALGEBRAIC[77] = ( CONSTANTS[69]*STATES[15])/(0.000400000+STATES[15]); RATES[0] = ( 1000.00*((ALGEBRAIC[46]+ALGEBRAIC[22]) - (ALGEBRAIC[48]+ALGEBRAIC[52]+ALGEBRAIC[56]+ALGEBRAIC[59]+ALGEBRAIC[61]+ALGEBRAIC[63]+ALGEBRAIC[65]+ALGEBRAIC[67]+ALGEBRAIC[69]+ALGEBRAIC[73]+ALGEBRAIC[71]+ALGEBRAIC[77])))/CONSTANTS[89]; ALGEBRAIC[54] = (( (( CONSTANTS[73]*4.00000*STATES[1]*pow(CONSTANTS[2], 2.00000))/( CONSTANTS[0]*CONSTANTS[1]))*( STATES[14]*exp(( 2.00000*STATES[1]*CONSTANTS[2])/( CONSTANTS[0]*CONSTANTS[1])) - 0.341000*STATES[20]))/(exp(( 2.00000*STATES[1]*CONSTANTS[2])/( CONSTANTS[0]*CONSTANTS[1])) - 1.00000))*STATES[16]*( (0.900000+STATES[19]/10.0000)*STATES[17]+ (0.100000 - STATES[19]/10.0000)*STATES[18]); ALGEBRAIC[53] = ( log(STATES[20]/STATES[15])*CONSTANTS[0]*CONSTANTS[1])/( 2.00000*CONSTANTS[2]); ALGEBRAIC[68] = CONSTANTS[80]*(STATES[1] - ALGEBRAIC[53]); ALGEBRAIC[78] = ( CONSTANTS[81]*STATES[15])/(0.000400000+STATES[15]); RATES[1] = ( 1000.00*- (ALGEBRAIC[22]+ALGEBRAIC[50]+ALGEBRAIC[54]+ALGEBRAIC[58]+ALGEBRAIC[60]+ALGEBRAIC[62]+ALGEBRAIC[64]+ALGEBRAIC[66]+ALGEBRAIC[68]+ALGEBRAIC[70]+ALGEBRAIC[74]+ALGEBRAIC[72]+ALGEBRAIC[78]))/CONSTANTS[88]; ALGEBRAIC[79] = (( 1.00000*CONSTANTS[87])/CONSTANTS[43])*(STATES[20] - CONSTANTS[4]); RATES[20] = (( - 2.00000*ALGEBRAIC[72]+ALGEBRAIC[54]+ALGEBRAIC[68]+ALGEBRAIC[78])/( 2.00000*CONSTANTS[2]) - 1.00000*ALGEBRAIC[79])/CONSTANTS[87]; ALGEBRAIC[80] = ( 1.00000*CONSTANTS[56]*( 0.0400000*10.0000*pow(STATES[15]/0.000168000, 1.20000) - ( 0.900000*STATES[33])/3.29000))/(1.00000+pow(STATES[15]/0.000168000, 1.20000)+STATES[33]/3.29000); ALGEBRAIC[81] = (( 1.00000*CONSTANTS[55])/CONSTANTS[45])*(STATES[33] - STATES[34]); RATES[33] = (ALGEBRAIC[80] - ALGEBRAIC[81])/( 1.00000*CONSTANTS[57]); ALGEBRAIC[82] = 1800.00*CONSTANTS[55]*(STATES[36]+STATES[37])*(STATES[34] - STATES[14]); RATES[34] = ( (1.00000/(1.00000+( 15.0000*0.800000)/pow(0.800000+STATES[34], 2.00000)))*(ALGEBRAIC[81] - ALGEBRAIC[82]))/CONSTANTS[55]; ALGEBRAIC[83] = ( 1.00000*(STATES[14] - STATES[15])*CONSTANTS[56])/CONSTANTS[50]; RATES[14] = (1.00000/(1.00000+( 0.0500000*0.00238000)/pow(0.00238000+STATES[14], 2.00000)))*((- (ALGEBRAIC[52]+ALGEBRAIC[54])/( 2.00000*CONSTANTS[2]*CONSTANTS[54])+( 1.00000*ALGEBRAIC[82])/CONSTANTS[54]) - ( 1.00000*ALGEBRAIC[83])/CONSTANTS[54]); ALGEBRAIC[84] = 20000.0*STATES[15]*(1.00000 - STATES[39]) - 0.0700000*STATES[39]; RATES[39] = ALGEBRAIC[84]; ALGEBRAIC[85] = 40000.0*STATES[15]*(1.00000 - STATES[40]) - STATES[40]*40.0000; RATES[40] = ALGEBRAIC[85]; RATES[15] = (1.00000/(1.00000+( 0.0500000*0.00238000)/pow(0.00238000+STATES[15], 2.00000)))*(((( - 2.00000*(ALGEBRAIC[71]+ALGEBRAIC[72])+ALGEBRAIC[67]+ALGEBRAIC[68]+ALGEBRAIC[77]+ALGEBRAIC[78])/( - 2.00000*CONSTANTS[2]*CONSTANTS[56])+( 1.00000*(ALGEBRAIC[83] - ALGEBRAIC[80]))/CONSTANTS[56]) - ALGEBRAIC[84]*0.140000) - ALGEBRAIC[85]*0.0700000); } void computeVariables(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC) { ALGEBRAIC[5] = 1.00000/(1.00000+STATES[14]/0.0100000); ALGEBRAIC[8] = 1.00000/(1.00000+STATES[14]/0.0100000); ALGEBRAIC[17] = 1.00000/(1.00000+exp((STATES[0]+87.5000)/10.3000)); ALGEBRAIC[19] = 1.00000/(1.00000+exp((STATES[1]+87.5000)/10.3000)); ALGEBRAIC[0] = ( 117.260*(STATES[0]+59.3000))/(1.00000 - exp( - 0.550000*(STATES[0]+59.3000))); ALGEBRAIC[23] = 3800.00*exp( - 0.0720000*(STATES[0]+61.0000)); ALGEBRAIC[1] = 284.400/(1.00000+exp( 0.0812000*(STATES[0]+115.900))); ALGEBRAIC[24] = ( 18.7700*(STATES[0]+64.4000))/(1.00000 - exp( - 0.220000*(STATES[0]+64.4000))); ALGEBRAIC[2] = ( 117.260*(STATES[1]+59.3000))/(1.00000 - exp( - 0.550000*(STATES[1]+59.3000))); ALGEBRAIC[25] = 3800.00*exp( - 0.0720000*(STATES[1]+61.0000)); ALGEBRAIC[3] = 284.400/(1.00000+exp( 0.0812000*(STATES[1]+115.900))); ALGEBRAIC[26] = ( 18.7700*(STATES[1]+64.4000))/(1.00000 - exp( - 0.220000*(STATES[1]+64.4000))); ALGEBRAIC[28] = 0.105000*exp(- pow((STATES[0]+45.0000)/12.0000, 2.00000))+0.0400000/(1.00000+exp((- STATES[0]+25.0000)/25.0000))+0.0150000/(1.00000+exp((STATES[0]+75.0000)/25.0000)); ALGEBRAIC[6] = 1.00000/(1.00000+exp((STATES[0]+26.7000)/5.40000)); ALGEBRAIC[27] = 0.000250000+ 0.00305000*exp( - 0.00450000*pow(STATES[0]+7.00000, 2.00000))+ 0.00105000*exp( - 0.00200000*pow(STATES[0] - 18.0000, 2.00000)); ALGEBRAIC[4] = 1.00000/(1.00000+exp(- (STATES[0]+15.3000)/5.00000)); ALGEBRAIC[31] = 0.105000*exp(- pow((STATES[1]+45.0000)/12.0000, 2.00000))+0.0400000/(1.00000+exp((- STATES[1]+25.0000)/25.0000))+0.0150000/(1.00000+exp((STATES[1]+75.0000)/25.0000)); ALGEBRAIC[9] = 1.00000/(1.00000+exp((STATES[1]+26.7000)/5.40000)); ALGEBRAIC[30] = 0.000250000+ 0.00305000*exp( - 0.00450000*pow(STATES[1]+7.00000, 2.00000))+ 0.00105000*exp( - 0.00200000*pow(STATES[1] - 18.0000, 2.00000)); ALGEBRAIC[7] = 1.00000/(1.00000+exp(- (STATES[1]+15.3000)/5.00000)); ALGEBRAIC[33] = 1.00000/( 45.1600*exp( 0.0357700*(STATES[0]+50.0000))+ 98.9000*exp( - 0.100000*(STATES[0]+38.0000))); ALGEBRAIC[10] = 1.00000/(1.00000+exp((STATES[0]+10.6000)/- 11.4200)); ALGEBRAIC[34] = 0.350000*exp(- pow( 0.0666000*(STATES[0]+70.0000), 2.00000))+0.0350000; ALGEBRAIC[11] = 1.00000/(1.00000+exp((STATES[0]+45.3000)/6.88410)); ALGEBRAIC[35] = 3.70000*exp(- pow( 0.0333000*(STATES[0]+70.0000), 2.00000))+0.0350000; ALGEBRAIC[12] = 1.00000/(1.00000+exp((STATES[0]+45.3000)/6.88410)); ALGEBRAIC[36] = 1.00000/( 45.1600*exp( 0.0357700*(STATES[1]+50.0000))+ 98.9000*exp( - 0.100000*(STATES[1]+38.0000))); ALGEBRAIC[13] = 1.00000/(1.00000+exp((STATES[1]+10.6000)/- 11.4200)); ALGEBRAIC[37] = 0.350000*exp(- pow( 0.0666000*(STATES[1]+70.0000), 2.00000))+0.0350000; ALGEBRAIC[14] = 1.00000/(1.00000+exp((STATES[1]+45.3000)/6.88410)); ALGEBRAIC[38] = 3.70000*exp(- pow( 0.0333000*(STATES[1]+70.0000), 2.00000))+0.0350000; ALGEBRAIC[15] = 1.00000/(1.00000+exp((STATES[1]+45.3000)/6.88410)); ALGEBRAIC[39] = 10.0000/( 45.1600*exp( 0.0357700*(STATES[0]+50.0000))+ 98.9000*exp( - 0.100000*(STATES[0]+38.0000))); ALGEBRAIC[16] = 1.00000/(1.00000+exp(- (STATES[0]+11.5000)/11.8200)); ALGEBRAIC[40] = 10.0000/( 45.1600*exp( 0.0357700*(STATES[1]+50.0000))+ 98.9000*exp( - 0.100000*(STATES[1]+38.0000))); ALGEBRAIC[18] = 1.00000/(1.00000+exp(- (STATES[1]+11.5000)/11.8200)); ALGEBRAIC[41] = 1.00000/( 0.118850*exp((STATES[0]+80.0000)/28.3700)+ 0.562300*exp(- (STATES[0]+80.0000)/14.1900)); ALGEBRAIC[20] = 1.00000/(1.00000+exp((STATES[0]+138.600)/10.4800)); ALGEBRAIC[42] = 1.00000/( 0.118850*exp((STATES[1]+80.0000)/28.3700)+ 0.562300*exp(- (STATES[1]+80.0000)/14.1900)); ALGEBRAIC[21] = 1.00000/(1.00000+exp((STATES[1]+138.600)/10.4800)); ALGEBRAIC[44] = 0.0410000*exp(- pow((STATES[0]+47.0000)/12.0000, 2.00000))+0.0800000/(1.00000+exp(- (STATES[0]+55.0000)/5.00000))+0.0150000/(1.00000+exp((STATES[0]+75.0000)/25.0000)); ALGEBRAIC[29] = ALGEBRAIC[6]; ALGEBRAIC[45] = 0.0410000*exp(- pow((STATES[1]+47.0000)/12.0000, 2.00000))+0.0800000/(1.00000+exp(- (STATES[1]+55.0000)/5.00000))+0.0150000/(1.00000+exp((STATES[1]+75.0000)/25.0000)); ALGEBRAIC[32] = ALGEBRAIC[9]; ALGEBRAIC[48] = CONSTANTS[60]*pow(STATES[4], 3.00000)*STATES[5]*(STATES[0] - ( log((CONSTANTS[3]+ 0.120000*CONSTANTS[5])/(STATES[2]+ 0.120000*STATES[3]))*CONSTANTS[0]*CONSTANTS[1])/CONSTANTS[2]); ALGEBRAIC[50] = CONSTANTS[72]*pow(STATES[8], 3.00000)*STATES[9]*(STATES[1] - ( log((STATES[6]+ 0.120000*STATES[7])/(STATES[2]+ 0.120000*STATES[3]))*CONSTANTS[0]*CONSTANTS[1])/CONSTANTS[2]); ALGEBRAIC[47] = ( log(CONSTANTS[3]/STATES[2])*CONSTANTS[0]*CONSTANTS[1])/CONSTANTS[2]; ALGEBRAIC[65] = CONSTANTS[67]*(STATES[0] - ALGEBRAIC[47]); ALGEBRAIC[49] = ( log(STATES[6]/STATES[2])*CONSTANTS[0]*CONSTANTS[1])/CONSTANTS[2]; ALGEBRAIC[66] = CONSTANTS[79]*(STATES[1] - ALGEBRAIC[49]); ALGEBRAIC[71] = ( CONSTANTS[71]*( exp( 0.0187000*STATES[0])*pow(STATES[2], 3.00000)*CONSTANTS[4] - exp( - 0.0187000*STATES[0])*pow(CONSTANTS[3], 3.00000)*STATES[15]))/(1.00000+ 0.000100000*( pow(CONSTANTS[3], 3.00000)*STATES[15]+ pow(STATES[2], 3.00000)*CONSTANTS[4])); ALGEBRAIC[72] = ( CONSTANTS[83]*( exp( 0.0187000*STATES[1])*pow(STATES[2], 3.00000)*STATES[20] - exp( - 0.0187000*STATES[1])*pow(STATES[6], 3.00000)*STATES[15]))/(1.00000+ 0.000100000*( pow(STATES[6], 3.00000)*STATES[15]+ pow(STATES[2], 3.00000)*STATES[20])); ALGEBRAIC[73] = ( (( (CONSTANTS[70]/(1.00000+ 0.124500*exp(( - 0.100000*STATES[0]*CONSTANTS[2])/( CONSTANTS[0]*CONSTANTS[1]))+ (( 0.0365000*1.00000)/7.00000)*(exp(CONSTANTS[3]/67.3000) - 1.00000)*exp(( - STATES[0]*CONSTANTS[2])/( CONSTANTS[0]*CONSTANTS[1]))))*1.00000)/(1.00000+pow(10.0000/STATES[2], 1.50000)))*CONSTANTS[5])/(CONSTANTS[5]+1.50000); ALGEBRAIC[74] = ( (( (CONSTANTS[82]/(1.00000+ 0.124500*exp(( - 0.100000*STATES[1]*CONSTANTS[2])/( CONSTANTS[0]*CONSTANTS[1]))+ (( 0.0365000*1.00000)/7.00000)*(exp(STATES[6]/67.3000) - 1.00000)*exp(( - STATES[1]*CONSTANTS[2])/( CONSTANTS[0]*CONSTANTS[1]))))*1.00000)/(1.00000+pow(10.0000/STATES[2], 1.50000)))*STATES[7])/(STATES[7]+1.50000); ALGEBRAIC[43] = floor(VOI/CONSTANTS[11])*CONSTANTS[11]; ALGEBRAIC[46] = (VOI - ALGEBRAIC[43]>=CONSTANTS[10]&&VOI - ALGEBRAIC[43]<=CONSTANTS[10]+CONSTANTS[12] ? CONSTANTS[13] : 0.00000); ALGEBRAIC[55] = ( log(CONSTANTS[5]/STATES[3])*CONSTANTS[0]*CONSTANTS[1])/CONSTANTS[2]; ALGEBRAIC[56] = CONSTANTS[66]*STATES[21]*( 0.886000*STATES[22]+ 0.114000*STATES[23])*(STATES[0] - ALGEBRAIC[55]); ALGEBRAIC[57] = ( log(STATES[7]/STATES[3])*CONSTANTS[0]*CONSTANTS[1])/CONSTANTS[2]; ALGEBRAIC[58] = CONSTANTS[78]*STATES[24]*( 0.886000*STATES[25]+ 0.114000*STATES[26])*(STATES[1] - ALGEBRAIC[57]); ALGEBRAIC[59] = CONSTANTS[63]*STATES[27]*STATES[28]*(STATES[0] - ALGEBRAIC[55]); ALGEBRAIC[60] = CONSTANTS[75]*STATES[29]*STATES[30]*(STATES[1] - ALGEBRAIC[57]); ALGEBRAIC[61] = CONSTANTS[62]*STATES[31]*( 0.200000*(STATES[0] - ALGEBRAIC[47])+ 0.800000*(STATES[0] - ALGEBRAIC[55])); ALGEBRAIC[62] = CONSTANTS[74]*STATES[32]*( 0.200000*(STATES[1] - ALGEBRAIC[49])+ 0.800000*(STATES[1] - ALGEBRAIC[57])); ALGEBRAIC[63] = ( CONSTANTS[64]*((STATES[0] - ALGEBRAIC[55]) - 1.73000))/(1.00000+ exp( (( 1.61300*CONSTANTS[2])/( CONSTANTS[0]*CONSTANTS[1]))*((STATES[0] - ALGEBRAIC[55]) - 1.73000))*(1.00000+exp((CONSTANTS[5] - 0.998800)/- 0.124000))); ALGEBRAIC[64] = ( CONSTANTS[76]*((STATES[1] - ALGEBRAIC[57]) - 1.73000))/(1.00000+ exp( (( 1.61300*CONSTANTS[2])/( CONSTANTS[0]*CONSTANTS[1]))*((STATES[1] - ALGEBRAIC[57]) - 1.73000))*(1.00000+exp((STATES[7] - 0.998800)/- 0.124000))); ALGEBRAIC[69] = CONSTANTS[65]*(STATES[0] - ALGEBRAIC[55]); ALGEBRAIC[70] = CONSTANTS[77]*(STATES[1] - ALGEBRAIC[57]); ALGEBRAIC[75] = (( 1.00000*CONSTANTS[87])/CONSTANTS[42])*(STATES[6] - CONSTANTS[3]); ALGEBRAIC[76] = (( 1.00000*CONSTANTS[87])/CONSTANTS[44])*(STATES[7] - CONSTANTS[5]); ALGEBRAIC[22] = 1000.00*(STATES[1]/CONSTANTS[86] - STATES[0]/CONSTANTS[86]); ALGEBRAIC[52] = (( (( CONSTANTS[61]*4.00000*STATES[0]*pow(CONSTANTS[2], 2.00000))/( CONSTANTS[0]*CONSTANTS[1]))*( STATES[14]*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[10]*( (0.900000+STATES[13]/10.0000)*STATES[11]+ (0.100000 - STATES[13]/10.0000)*STATES[12]); ALGEBRAIC[51] = ( log(CONSTANTS[4]/STATES[15])*CONSTANTS[0]*CONSTANTS[1])/( 2.00000*CONSTANTS[2]); ALGEBRAIC[67] = CONSTANTS[68]*(STATES[0] - ALGEBRAIC[51]); ALGEBRAIC[77] = ( CONSTANTS[69]*STATES[15])/(0.000400000+STATES[15]); ALGEBRAIC[54] = (( (( CONSTANTS[73]*4.00000*STATES[1]*pow(CONSTANTS[2], 2.00000))/( CONSTANTS[0]*CONSTANTS[1]))*( STATES[14]*exp(( 2.00000*STATES[1]*CONSTANTS[2])/( CONSTANTS[0]*CONSTANTS[1])) - 0.341000*STATES[20]))/(exp(( 2.00000*STATES[1]*CONSTANTS[2])/( CONSTANTS[0]*CONSTANTS[1])) - 1.00000))*STATES[16]*( (0.900000+STATES[19]/10.0000)*STATES[17]+ (0.100000 - STATES[19]/10.0000)*STATES[18]); ALGEBRAIC[53] = ( log(STATES[20]/STATES[15])*CONSTANTS[0]*CONSTANTS[1])/( 2.00000*CONSTANTS[2]); ALGEBRAIC[68] = CONSTANTS[80]*(STATES[1] - ALGEBRAIC[53]); ALGEBRAIC[78] = ( CONSTANTS[81]*STATES[15])/(0.000400000+STATES[15]); ALGEBRAIC[79] = (( 1.00000*CONSTANTS[87])/CONSTANTS[43])*(STATES[20] - CONSTANTS[4]); ALGEBRAIC[80] = ( 1.00000*CONSTANTS[56]*( 0.0400000*10.0000*pow(STATES[15]/0.000168000, 1.20000) - ( 0.900000*STATES[33])/3.29000))/(1.00000+pow(STATES[15]/0.000168000, 1.20000)+STATES[33]/3.29000); ALGEBRAIC[81] = (( 1.00000*CONSTANTS[55])/CONSTANTS[45])*(STATES[33] - STATES[34]); ALGEBRAIC[82] = 1800.00*CONSTANTS[55]*(STATES[36]+STATES[37])*(STATES[34] - STATES[14]); ALGEBRAIC[83] = ( 1.00000*(STATES[14] - STATES[15])*CONSTANTS[56])/CONSTANTS[50]; ALGEBRAIC[84] = 20000.0*STATES[15]*(1.00000 - STATES[39]) - 0.0700000*STATES[39]; ALGEBRAIC[85] = 40000.0*STATES[15]*(1.00000 - STATES[40]) - STATES[40]*40.0000; }