Generated Code
The following is c_ida code generated by the CellML API from this CellML file. (Back to language selection)
The raw code is available.
/* There are a total of 115 entries in the algebraic variable array. There are a total of 30 entries in each of the rate and state variable arrays. There are a total of 83 entries in the constant variable array. */ /* * VOI is time in component environment (millisecond). * STATES[0] is V in component membrane (millivolt). * ALGEBRAIC[0] is i_stim in component membrane (microA_per_microF). * ALGEBRAIC[114] is i_tot in component membrane (microA_per_microF). * ALGEBRAIC[6] is i_Na in component i_Na (microA_per_microF). * ALGEBRAIC[19] is i_Na_L in component i_Na_L (microA_per_microF). * ALGEBRAIC[90] is i_Ca_L in component i_Ca_L (microA_per_microF). * ALGEBRAIC[33] is i_Ca_T in component i_Ca_T (microA_per_microF). * ALGEBRAIC[42] is i_to_1 in component i_to_1 (microA_per_microF). * ALGEBRAIC[98] is i_to_2 in component i_to_2 (microA_per_microF). * ALGEBRAIC[94] is i_Kr in component i_Kr (microA_per_microF). * ALGEBRAIC[95] is i_Ks in component i_Ks (microA_per_microF). * ALGEBRAIC[109] is i_K1 in component i_K1 (microA_per_microF). * ALGEBRAIC[99] is i_NaCa in component i_NaCa (microA_per_microF). * ALGEBRAIC[100] is i_NaK in component i_NaK (microA_per_microF). * ALGEBRAIC[74] is i_Na_b in component background_currents (microA_per_microF). * ALGEBRAIC[77] is i_Ca_b in component background_currents (microA_per_microF). * ALGEBRAIC[75] is i_K_b in component background_currents (microA_per_microF). * ALGEBRAIC[76] is i_Cl_b in component background_currents (microA_per_microF). * ALGEBRAIC[71] is i_Ca_p in component i_Ca_p (microA_per_microF). * ALGEBRAIC[97] is i_K_p in component i_K_p (microA_per_microF). * CONSTANTS[0] is stim_start in component membrane (millisecond). * CONSTANTS[1] is stim_end in component membrane (millisecond). * CONSTANTS[2] is stim_amplitude in component membrane (microA_per_microF). * ALGEBRAIC[1] is E_Na in component equilibrium_potentials (millivolt). * ALGEBRAIC[2] is E_K in component equilibrium_potentials (millivolt). * ALGEBRAIC[3] is E_Ca in component equilibrium_potentials (millivolt). * ALGEBRAIC[4] is E_Cl in component equilibrium_potentials (millivolt). * ALGEBRAIC[5] is E_Ks in component equilibrium_potentials (millivolt). * CONSTANTS[3] is r_NaK in component equilibrium_potentials (dimensionless). * STATES[1] is Na_i in component intracellular_ion_concentrations (millimolar). * CONSTANTS[4] is Na_o in component model_parameters (millimolar). * STATES[2] is Ca_i in component Ca_i (millimolar). * CONSTANTS[5] is Ca_o in component model_parameters (millimolar). * STATES[3] is K_i in component intracellular_ion_concentrations (millimolar). * CONSTANTS[6] is K_o in component model_parameters (millimolar). * STATES[4] is Cl_i in component intracellular_ion_concentrations (millimolar). * CONSTANTS[7] is Cl_o in component model_parameters (millimolar). * CONSTANTS[8] is R in component model_parameters (joule_per_kilomole_kelvin). * CONSTANTS[9] is F in component model_parameters (coulomb_per_mole). * CONSTANTS[10] is T in component model_parameters (kelvin). * CONSTANTS[11] is g_Na in component i_Na (milliS_per_microF). * STATES[5] is m in component i_Na_m_gate (dimensionless). * STATES[6] is h in component i_Na_h_gate (dimensionless). * STATES[7] is j in component i_Na_j_gate (dimensionless). * ALGEBRAIC[10] is tau_m in component i_Na_m_gate (millisecond). * ALGEBRAIC[9] is m_infinity in component i_Na_m_gate (dimensionless). * ALGEBRAIC[7] is alpha_m in component i_Na_m_gate (per_millisecond). * ALGEBRAIC[8] is beta_m in component i_Na_m_gate (per_millisecond). * ALGEBRAIC[14] is tau_h in component i_Na_h_gate (millisecond). * ALGEBRAIC[13] is h_infinity in component i_Na_h_gate (dimensionless). * ALGEBRAIC[11] is alpha_h in component i_Na_h_gate (per_millisecond). * ALGEBRAIC[12] is beta_h in component i_Na_h_gate (per_millisecond). * ALGEBRAIC[18] is tau_j in component i_Na_j_gate (millisecond). * ALGEBRAIC[17] is j_infinity in component i_Na_j_gate (dimensionless). * ALGEBRAIC[15] is alpha_j in component i_Na_j_gate (per_millisecond). * ALGEBRAIC[16] is beta_j in component i_Na_j_gate (per_millisecond). * CONSTANTS[12] is g_Na_L in component i_Na_L (milliS_per_microF). * STATES[8] is m_L in component i_Na_L_m_L_gate (dimensionless). * STATES[9] is h_L in component i_Na_L_h_L_gate (dimensionless). * ALGEBRAIC[23] is tau_m_L in component i_Na_L_m_L_gate (millisecond). * ALGEBRAIC[22] is m_L_infinity in component i_Na_L_m_L_gate (dimensionless). * ALGEBRAIC[20] is alpha_m_L in component i_Na_L_m_L_gate (per_millisecond). * ALGEBRAIC[21] is beta_m_L in component i_Na_L_m_L_gate (per_millisecond). * ALGEBRAIC[25] is tau_h_L in component i_Na_L_h_L_gate (millisecond). * ALGEBRAIC[24] is h_L_infinity in component i_Na_L_h_L_gate (dimensionless). * CONSTANTS[13] is g_Ca_L in component i_Ca_L (dimensionless). * ALGEBRAIC[26] is i_Ca_L_max in component i_Ca_L (microA_per_microF). * CONSTANTS[14] is p_Ca in component i_Ca_L (cm_per_second). * CONSTANTS[15] is z_Ca in component model_parameters (dimensionless). * CONSTANTS[16] is gamma_Cai in component model_parameters (dimensionless). * CONSTANTS[17] is gamma_Cao in component model_parameters (dimensionless). * STATES[10] is Ca_r in component Ca_r (millimolar). * ALGEBRAIC[101] is Ca_MK_act in component Ca_MK_act (dimensionless). * CONSTANTS[18] is km_Ca_MK in component Ca_MK_act (millimolar). * STATES[11] is d in component i_Ca_L_d_gate (dimensionless). * STATES[12] is f in component i_Ca_L_f_gate (dimensionless). * STATES[13] is f2 in component i_Ca_L_f2_gate (dimensionless). * STATES[14] is f_Ca in component i_Ca_L_f_Ca_gate (dimensionless). * STATES[15] is f_Ca2 in component i_Ca_L_f_Ca2_gate (dimensionless). * CONSTANTS[19] is Cm in component model_parameters (microF_per_cm2). * ALGEBRAIC[27] is d_infinity in component i_Ca_L_d_gate (dimensionless). * ALGEBRAIC[28] is tau_d in component i_Ca_L_d_gate (millisecond). * ALGEBRAIC[29] is f_infinity in component i_Ca_L_f_gate (dimensionless). * ALGEBRAIC[30] is tau_f in component i_Ca_L_f_gate (millisecond). * ALGEBRAIC[31] is f2_infinity in component i_Ca_L_f2_gate (dimensionless). * ALGEBRAIC[32] is tau_f2 in component i_Ca_L_f2_gate (millisecond). * ALGEBRAIC[91] is f_Ca_infinity in component i_Ca_L_f_Ca_gate (dimensionless). * ALGEBRAIC[108] is tau_f_Ca in component i_Ca_L_f_Ca_gate (millisecond). * ALGEBRAIC[92] is f_Ca2_infinity in component i_Ca_L_f_Ca2_gate (dimensionless). * ALGEBRAIC[93] is tau_f_Ca2 in component i_Ca_L_f_Ca2_gate (millisecond). * CONSTANTS[20] is g_Ca_T in component i_Ca_T (milliS_per_microF). * STATES[16] is b in component i_Ca_T_b_gate (dimensionless). * STATES[17] is g in component i_Ca_T_g_gate (dimensionless). * ALGEBRAIC[37] is tau_b in component i_Ca_T_b_gate (millisecond). * ALGEBRAIC[36] is b_infinity in component i_Ca_T_b_gate (dimensionless). * ALGEBRAIC[34] is alpha_b in component i_Ca_T_b_gate (per_millisecond). * ALGEBRAIC[35] is beta_b in component i_Ca_T_b_gate (per_millisecond). * ALGEBRAIC[41] is tau_g in component i_Ca_T_g_gate (millisecond). * ALGEBRAIC[40] is g_infinity in component i_Ca_T_g_gate (dimensionless). * ALGEBRAIC[38] is alpha_g in component i_Ca_T_g_gate (per_millisecond). * ALGEBRAIC[39] is beta_g in component i_Ca_T_g_gate (per_millisecond). * CONSTANTS[21] is g_to_1 in component i_to_1 (milliS_per_microF). * STATES[18] is a in component i_to_1_a_gate (dimensionless). * STATES[19] is i in component i_to_1_i_gate (dimensionless). * STATES[20] is i2 in component i_to_1_i2_gate (dimensionless). * ALGEBRAIC[43] is alpha_a in component i_to_1_a_gate (per_millisecond). * ALGEBRAIC[44] is beta_a in component i_to_1_a_gate (per_millisecond). * ALGEBRAIC[45] is tau_a in component i_to_1_a_gate (millisecond). * ALGEBRAIC[46] is a_infinity in component i_to_1_a_gate (dimensionless). * ALGEBRAIC[47] is alpha_i in component i_to_1_i_gate (per_millisecond). * ALGEBRAIC[48] is beta_i in component i_to_1_i_gate (per_millisecond). * ALGEBRAIC[49] is tau_i in component i_to_1_i_gate (millisecond). * ALGEBRAIC[50] is i_infinity in component i_to_1_i_gate (dimensionless). * ALGEBRAIC[51] is alpha_i2 in component i_to_1_i2_gate (per_millisecond). * ALGEBRAIC[52] is beta_i2 in component i_to_1_i2_gate (per_millisecond). * ALGEBRAIC[53] is tau_i2 in component i_to_1_i2_gate (millisecond). * ALGEBRAIC[54] is i2_infinity in component i_to_1_i2_gate (dimensionless). * CONSTANTS[74] is g_Kr in component i_Kr (milliS_per_microF). * ALGEBRAIC[55] is rr_infinity in component i_Kr (dimensionless). * STATES[21] is xr in component i_Kr_xr_gate (dimensionless). * ALGEBRAIC[56] is tau_xr in component i_Kr_xr_gate (millisecond). * ALGEBRAIC[57] is xr_infinity in component i_Kr_xr_gate (dimensionless). * ALGEBRAIC[58] is g_Ks in component i_Ks (milliS_per_microF). * STATES[22] is xs1 in component i_Ks_xs1_gate (dimensionless). * STATES[23] is xs2 in component i_Ks_xs2_gate (dimensionless). * ALGEBRAIC[59] is tau_xs1 in component i_Ks_xs1_gate (millisecond). * ALGEBRAIC[60] is xs1_infinity in component i_Ks_xs1_gate (dimensionless). * ALGEBRAIC[61] is tau_xs2 in component i_Ks_xs2_gate (millisecond). * ALGEBRAIC[62] is xs2_infinity in component i_Ks_xs2_gate (dimensionless). * CONSTANTS[75] is g_K1 in component i_K1 (milliS_per_microF). * ALGEBRAIC[96] is xK1 in component i_K1_xK1_gate (dimensionless). * ALGEBRAIC[64] is alpha_xK1 in component i_K1_xK1_gate (dimensionless). * ALGEBRAIC[63] is beta_xK1 in component i_K1_xK1_gate (dimensionless). * CONSTANTS[22] is g_K_p in component i_K_p (milliS_per_microF). * ALGEBRAIC[65] is kp in component i_K_p (dimensionless). * CONSTANTS[23] is p_Cl in component i_to_2 (cm_per_second). * CONSTANTS[24] is z_Cl in component i_to_2 (dimensionless). * ALGEBRAIC[66] is i_to_2_max in component i_to_2 (microA_per_microF). * STATES[24] is a in component i_to_2_a_gate (dimensionless). * ALGEBRAIC[67] is a_infinity in component i_to_2_a_gate (dimensionless). * CONSTANTS[76] is tau_a in component i_to_2_a_gate (millisecond). * CONSTANTS[25] is km_to_2 in component i_to_2_a_gate (millimolar). * CONSTANTS[26] is X_NaCa in component i_NaCa (dimensionless). * CONSTANTS[27] is i_NaCa_max in component i_NaCa (microA_per_microF). * CONSTANTS[28] is km_Na_i_1 in component i_NaCa (millimolar). * CONSTANTS[29] is km_Na_o in component i_NaCa (millimolar). * CONSTANTS[30] is km_Ca_i in component i_NaCa (millimolar). * CONSTANTS[31] is km_Ca_o in component i_NaCa (millimolar). * CONSTANTS[32] is km_Ca_act in component i_NaCa (millimolar). * CONSTANTS[33] is k_sat in component i_NaCa (dimensionless). * ALGEBRAIC[68] is dNaCa_1 in component i_NaCa (millimolar4). * ALGEBRAIC[69] is dNaCa_2 in component i_NaCa (millimolar4). * CONSTANTS[34] is g_NaK in component i_NaK (microA_per_microF). * CONSTANTS[35] is km_Na_i_2 in component i_NaK (millimolar). * CONSTANTS[36] is km_K_o in component i_NaK (millimolar). * ALGEBRAIC[70] is f_NaK in component i_NaK (dimensionless). * CONSTANTS[77] is sigma in component i_NaK (dimensionless). * CONSTANTS[37] is i_Ca_p_max in component i_Ca_p (microA_per_microF). * CONSTANTS[38] is km_Ca_p in component i_Ca_p (millimolar). * ALGEBRAIC[72] is CT_K_Cl in component CT_K_Cl (millimolar_per_millisecond). * CONSTANTS[39] is CT_K_Cl_max in component CT_K_Cl (millimolar_per_millisecond). * ALGEBRAIC[73] is CT_Na_Cl in component CT_Na_Cl (millimolar_per_millisecond). * CONSTANTS[40] is CT_Na_Cl_max in component CT_Na_Cl (millimolar_per_millisecond). * CONSTANTS[41] is g_Na_b in component background_currents (milliS_per_microF). * CONSTANTS[42] is g_K_b in component background_currents (milliS_per_microF). * CONSTANTS[43] is p_Ca_b in component background_currents (cm_per_second). * CONSTANTS[44] is g_Cl_b in component background_currents (milliS_per_microF). * CONSTANTS[79] is Vol_myo in component model_parameters (microlitre). * CONSTANTS[78] is a_cap in component model_parameters (cm2). * CONSTANTS[45] is km_TRPN in component Ca_i (millimolar). * CONSTANTS[46] is km_CMDN in component Ca_i (millimolar). * CONSTANTS[47] is TRPN_max in component Ca_i (millimolar). * CONSTANTS[48] is CMDN_max in component Ca_i (millimolar). * ALGEBRAIC[79] is TRPN in component Ca_i (dimensionless). * ALGEBRAIC[78] is CMDN in component Ca_i (dimensionless). * ALGEBRAIC[80] is b_myo in component Ca_i (dimensionless). * CONSTANTS[80] is Vol_nsr in component model_parameters (microlitre). * CONSTANTS[82] is Vol_ss in component model_parameters (microlitre). * ALGEBRAIC[113] is q_up in component q_up (millimolar_per_millisecond). * ALGEBRAIC[88] is q_leak in component q_leak (millimolar_per_millisecond). * ALGEBRAIC[82] is q_diff in component Ca_r (millimolar_per_millisecond). * STATES[25] is Ca_MK_trap in component Ca_MK_act (dimensionless). * ALGEBRAIC[81] is Ca_MK_bound in component Ca_MK_act (dimensionless). * CONSTANTS[49] is alpha_Ca_MK in component Ca_MK_act (per_millisecond). * CONSTANTS[50] is beta_Ca_MK in component Ca_MK_act (per_millisecond). * CONSTANTS[51] is Ca_MK_0 in component Ca_MK_act (dimensionless). * STATES[26] is Ca_NSR in component Ca_NSR (millimolar). * CONSTANTS[81] is Vol_jsr in component model_parameters (microlitre). * ALGEBRAIC[89] is q_tr in component q_tr (millimolar_per_millisecond). * STATES[27] is Ca_JSR in component Ca_JSR (millimolar). * CONSTANTS[52] is CSQN_max in component Ca_JSR (millimolar). * CONSTANTS[53] is km_CSQN in component Ca_JSR (millimolar). * ALGEBRAIC[110] is q_rel in component q_rel (millimolar_per_millisecond). * CONSTANTS[54] is km_b_SR in component Ca_r (millimolar). * CONSTANTS[55] is km_b_SL in component Ca_r (millimolar). * CONSTANTS[56] is b_SR_max in component Ca_r (millimolar). * CONSTANTS[57] is b_SL_max in component Ca_r (millimolar). * CONSTANTS[58] is tau_ss in component Ca_r (millisecond). * ALGEBRAIC[84] is b_SR in component Ca_r (dimensionless). * ALGEBRAIC[83] is b_SL in component Ca_r (dimensionless). * ALGEBRAIC[85] is Ca_r_tot in component Ca_r (dimensionless). * ALGEBRAIC[102] is g_rel in component q_rel (per_millisecond). * ALGEBRAIC[86] is vg in component q_rel (dimensionless). * STATES[28] is ri in component q_rel_ri_gate (dimensionless). * STATES[29] is ro in component q_rel_ro_gate (dimensionless). * ALGEBRAIC[111] is tau_ri in component q_rel_ri_gate (millisecond). * ALGEBRAIC[104] is tau_Ca_MK in component q_rel_ri_gate (millisecond). * CONSTANTS[59] is tau_Ca_MK_max in component q_rel_ri_gate (millisecond). * ALGEBRAIC[103] is Ca_fac in component q_rel_ri_gate (millimolar). * ALGEBRAIC[112] is ri_infinity in component q_rel_ri_gate (dimensionless). * CONSTANTS[60] is tau_ro in component q_rel_ro_gate (millisecond). * ALGEBRAIC[105] is ro_infinity in component q_rel_ro_gate (dimensionless). * ALGEBRAIC[87] is ro_infinity_JSR in component q_rel_ro_gate (dimensionless). * CONSTANTS[61] is q_leak_max in component q_leak (millimolar_per_millisecond). * CONSTANTS[62] is NSR_max in component q_leak (millimolar). * CONSTANTS[63] is X_q_up in component q_up (dimensionless). * CONSTANTS[64] is q_up_max in component q_up (millimolar_per_millisecond). * ALGEBRAIC[106] is dq_up_Ca_MK in component q_up (dimensionless). * CONSTANTS[65] is dq_up_Ca_MK_max in component q_up (dimensionless). * ALGEBRAIC[107] is dkm_plb in component q_up (millimolar). * CONSTANTS[66] is dkm_plb_max in component q_up (millimolar). * CONSTANTS[67] is km_up in component q_up (millimolar). * CONSTANTS[68] is tau_tr in component q_tr (millisecond). * CONSTANTS[69] is Vol_cell in component model_parameters (microlitre). * CONSTANTS[73] is a_geo in component model_parameters (cm2). * CONSTANTS[70] is radius in component model_parameters (cm). * CONSTANTS[71] is length in component model_parameters (cm). * CONSTANTS[72] is rcg in component model_parameters (dimensionless). * RATES[0] is d/dt V in component membrane (millivolt). * RATES[5] is d/dt m in component i_Na_m_gate (dimensionless). * RATES[6] is d/dt h in component i_Na_h_gate (dimensionless). * RATES[7] is d/dt j in component i_Na_j_gate (dimensionless). * RATES[8] is d/dt m_L in component i_Na_L_m_L_gate (dimensionless). * RATES[9] is d/dt h_L in component i_Na_L_h_L_gate (dimensionless). * RATES[11] is d/dt d in component i_Ca_L_d_gate (dimensionless). * RATES[12] is d/dt f in component i_Ca_L_f_gate (dimensionless). * RATES[13] is d/dt f2 in component i_Ca_L_f2_gate (dimensionless). * RATES[14] is d/dt f_Ca in component i_Ca_L_f_Ca_gate (dimensionless). * RATES[15] is d/dt f_Ca2 in component i_Ca_L_f_Ca2_gate (dimensionless). * RATES[16] is d/dt b in component i_Ca_T_b_gate (dimensionless). * RATES[17] is d/dt g in component i_Ca_T_g_gate (dimensionless). * RATES[18] is d/dt a in component i_to_1_a_gate (dimensionless). * RATES[19] is d/dt i in component i_to_1_i_gate (dimensionless). * RATES[20] is d/dt i2 in component i_to_1_i2_gate (dimensionless). * RATES[21] is d/dt xr in component i_Kr_xr_gate (dimensionless). * RATES[22] is d/dt xs1 in component i_Ks_xs1_gate (dimensionless). * RATES[23] is d/dt xs2 in component i_Ks_xs2_gate (dimensionless). * RATES[24] is d/dt a in component i_to_2_a_gate (dimensionless). * RATES[1] is d/dt Na_i in component intracellular_ion_concentrations (millimolar). * RATES[3] is d/dt K_i in component intracellular_ion_concentrations (millimolar). * RATES[4] is d/dt Cl_i in component intracellular_ion_concentrations (millimolar). * RATES[2] is d/dt Ca_i in component Ca_i (millimolar). * RATES[25] is d/dt Ca_MK_trap in component Ca_MK_act (dimensionless). * RATES[26] is d/dt Ca_NSR in component Ca_NSR (millimolar). * RATES[27] is d/dt Ca_JSR in component Ca_JSR (millimolar). * RATES[10] is d/dt Ca_r in component Ca_r (millimolar). * RATES[28] is d/dt ri in component q_rel_ri_gate (dimensionless). * RATES[29] is d/dt ro in component q_rel_ro_gate (dimensionless). * There are a total of 6 condition variables. */ void initConsts(double* CONSTANTS, double* RATES, double *STATES) { STATES[0] = -83.43812846286808; CONSTANTS[0] = 0; CONSTANTS[1] = 1; CONSTANTS[2] = -80; CONSTANTS[3] = 0.01833; STATES[1] = 9.927155552932733; CONSTANTS[4] = 140; STATES[2] = 0.00022355433459434943; CONSTANTS[5] = 1.8; STATES[3] = 141.9670801746057; CONSTANTS[6] = 5.4; STATES[4] = 18.904682470140408; CONSTANTS[7] = 100; CONSTANTS[8] = 8314; CONSTANTS[9] = 96485; CONSTANTS[10] = 310; CONSTANTS[11] = 8; STATES[5] = 0.002003390432234504; STATES[6] = 0.9786390933308567; STATES[7] = 0.09866447258167589; CONSTANTS[12] = 0.037375; STATES[8] = 0.002003390432234504; STATES[9] = 0.8946968372659203; CONSTANTS[13] = 0.3392328; CONSTANTS[14] = 0.000243; CONSTANTS[15] = 2; CONSTANTS[16] = 1; CONSTANTS[17] = 0.341; STATES[10] = 0.00022418117117903934; CONSTANTS[18] = 0.15; STATES[11] = 0.000002322223865147363; STATES[12] = 0.9985607329462358; STATES[13] = 0.8173435436674658; STATES[14] = 0.9610551285529658; STATES[15] = 0.868690796671854; CONSTANTS[19] = 1; CONSTANTS[20] = 0.13; STATES[16] = 0.0002563937630984438; STATES[17] = 0.9720432601848331; CONSTANTS[21] = 0.14135944; STATES[18] = 0.0004238729429342389; STATES[19] = 0.9990935802459496; STATES[20] = 0.9777368439681764; STATES[21] = 0.07084939408222911; STATES[22] = 0.0011737654433043125; STATES[23] = 0.001179442867470093; CONSTANTS[22] = 0.00276; CONSTANTS[23] = 0.0000004; CONSTANTS[24] = -1; STATES[24] = 0.0014909437525000811; CONSTANTS[25] = 0.1502; CONSTANTS[26] = 0.4; CONSTANTS[27] = 4.5; CONSTANTS[28] = 12.3; CONSTANTS[29] = 87.5; CONSTANTS[30] = 0.0036; CONSTANTS[31] = 1.3; CONSTANTS[32] = 0.000125; CONSTANTS[33] = 0.27; CONSTANTS[34] = 0.61875; CONSTANTS[35] = 10; CONSTANTS[36] = 1.5; CONSTANTS[37] = 0.0575; CONSTANTS[38] = 0.0005; CONSTANTS[39] = 7.0756e-6; CONSTANTS[40] = 9.8443e-6; CONSTANTS[41] = 0.0025; CONSTANTS[42] = 0.005; CONSTANTS[43] = 1.995084e-7; CONSTANTS[44] = 0.000225; CONSTANTS[45] = 0.0005; CONSTANTS[46] = 0.00238; CONSTANTS[47] = 0.07; CONSTANTS[48] = 0.05; STATES[25] = 0.000008789168284782809; CONSTANTS[49] = 0.05; CONSTANTS[50] = 0.00068; CONSTANTS[51] = 0.05; STATES[26] = 1.2132524695849454; STATES[27] = 1.1433050636518596; CONSTANTS[52] = 10; CONSTANTS[53] = 0.8; CONSTANTS[54] = 0.00087; CONSTANTS[55] = 0.0087; CONSTANTS[56] = 0.047; CONSTANTS[57] = 1.124; CONSTANTS[58] = 0.2; STATES[28] = 0.7802870066567904; STATES[29] = 1.2785734760674763e-9; CONSTANTS[59] = 10; CONSTANTS[60] = 3; CONSTANTS[61] = 0.004375; CONSTANTS[62] = 15; CONSTANTS[63] = 0.5; CONSTANTS[64] = 0.004375; CONSTANTS[65] = 0.75; CONSTANTS[66] = 0.00017; CONSTANTS[67] = 0.00092; CONSTANTS[68] = 120; CONSTANTS[69] = 0.3454; CONSTANTS[70] = 0.0011; CONSTANTS[71] = 0.01; CONSTANTS[72] = 2; CONSTANTS[73] = 2.00000*3.14000*pow(CONSTANTS[70], 2.00000)+ 2.00000*3.14000*CONSTANTS[70]*CONSTANTS[71]; CONSTANTS[74] = 0.0400085* pow((CONSTANTS[6]/5.40000), 1.0 / 2); CONSTANTS[75] = 0.250000* pow((CONSTANTS[6]/5.40000), 1.0 / 2); CONSTANTS[76] = 1.00000; CONSTANTS[77] = (1.00000/7.00000)*(exp(CONSTANTS[4]/67.3000) - 1.00000); CONSTANTS[78] = CONSTANTS[72]*CONSTANTS[73]; CONSTANTS[79] = CONSTANTS[69]*0.680000; CONSTANTS[80] = CONSTANTS[69]*0.0552000; CONSTANTS[81] = CONSTANTS[69]*0.00480000; CONSTANTS[82] = CONSTANTS[69]*0.0200000; RATES[0] = 0.1001; RATES[5] = 0.1001; RATES[6] = 0.1001; RATES[7] = 0.1001; RATES[8] = 0.1001; RATES[9] = 0.1001; RATES[11] = 0.1001; RATES[12] = 0.1001; RATES[13] = 0.1001; RATES[14] = 0.1001; RATES[15] = 0.1001; RATES[16] = 0.1001; RATES[17] = 0.1001; RATES[18] = 0.1001; RATES[19] = 0.1001; RATES[20] = 0.1001; RATES[21] = 0.1001; RATES[22] = 0.1001; RATES[23] = 0.1001; RATES[24] = 0.1001; RATES[1] = 0.1001; RATES[3] = 0.1001; RATES[4] = 0.1001; RATES[2] = 0.1001; RATES[25] = 0.1001; RATES[26] = 0.1001; RATES[27] = 0.1001; RATES[10] = 0.1001; RATES[28] = 0.1001; RATES[29] = 0.1001; } void computeResiduals(double VOI, double* CONSTANTS, double* RATES, double* OLDRATES, double* STATES, double* OLDSTATES, double* ALGEBRAIC, double* CONDVARS) { resid[0] = RATES[0] - - (ALGEBRAIC[114]+ALGEBRAIC[0]); resid[1] = RATES[5] - (ALGEBRAIC[9] - STATES[5])/ALGEBRAIC[10]; resid[2] = RATES[6] - (ALGEBRAIC[13] - STATES[6])/ALGEBRAIC[14]; resid[3] = RATES[7] - (ALGEBRAIC[17] - STATES[7])/ALGEBRAIC[18]; resid[4] = RATES[8] - (ALGEBRAIC[22] - STATES[8])/ALGEBRAIC[23]; resid[5] = RATES[9] - (ALGEBRAIC[24] - STATES[9])/ALGEBRAIC[25]; resid[6] = RATES[11] - (ALGEBRAIC[27] - STATES[11])/ALGEBRAIC[28]; resid[7] = RATES[12] - (ALGEBRAIC[29] - STATES[12])/ALGEBRAIC[30]; resid[8] = RATES[13] - (ALGEBRAIC[31] - STATES[13])/ALGEBRAIC[32]; resid[9] = RATES[14] - (ALGEBRAIC[91] - STATES[14])/ALGEBRAIC[108]; resid[10] = RATES[15] - (ALGEBRAIC[92] - STATES[15])/ALGEBRAIC[93]; resid[11] = RATES[16] - (ALGEBRAIC[36] - STATES[16])/ALGEBRAIC[37]; resid[12] = RATES[17] - (ALGEBRAIC[40] - STATES[17])/ALGEBRAIC[41]; resid[13] = RATES[18] - (ALGEBRAIC[46] - STATES[18])/ALGEBRAIC[45]; resid[14] = RATES[19] - (ALGEBRAIC[50] - STATES[19])/ALGEBRAIC[49]; resid[15] = RATES[20] - (ALGEBRAIC[54] - STATES[20])/ALGEBRAIC[53]; resid[16] = RATES[21] - (ALGEBRAIC[57] - STATES[21])/ALGEBRAIC[56]; resid[17] = RATES[22] - (ALGEBRAIC[60] - STATES[22])/ALGEBRAIC[59]; resid[18] = RATES[23] - (ALGEBRAIC[62] - STATES[23])/ALGEBRAIC[61]; resid[19] = RATES[24] - (ALGEBRAIC[67] - STATES[24])/CONSTANTS[76]; resid[20] = RATES[1] - ( - CONSTANTS[19]*(ALGEBRAIC[6]+ALGEBRAIC[19]+ALGEBRAIC[74]+ 3.00000*ALGEBRAIC[100]+ 3.00000*ALGEBRAIC[99])*CONSTANTS[78])/( CONSTANTS[79]*CONSTANTS[9])+ALGEBRAIC[73]; resid[21] = RATES[3] - ( - CONSTANTS[19]*((ALGEBRAIC[42]+ALGEBRAIC[109]+ALGEBRAIC[94]+ALGEBRAIC[95]+ALGEBRAIC[97]+ALGEBRAIC[75]) - 2.00000*ALGEBRAIC[100])*CONSTANTS[78])/( CONSTANTS[79]*CONSTANTS[9])+ALGEBRAIC[72]; resid[22] = RATES[4] - ( - CONSTANTS[19]*(ALGEBRAIC[98]+ALGEBRAIC[76])*CONSTANTS[78])/( CONSTANTS[79]*CONSTANTS[9])+ALGEBRAIC[73]+ALGEBRAIC[72]; resid[23] = RATES[2] - - ALGEBRAIC[80]*((( CONSTANTS[19]*((ALGEBRAIC[77]+ALGEBRAIC[71]) - 2.00000*ALGEBRAIC[99])*CONSTANTS[78])/( 2.00000*CONSTANTS[79]*CONSTANTS[9])+( (ALGEBRAIC[113] - ALGEBRAIC[88])*CONSTANTS[80])/CONSTANTS[79]) - ( ALGEBRAIC[82]*CONSTANTS[82])/CONSTANTS[79]); resid[24] = RATES[25] - CONSTANTS[49]*ALGEBRAIC[81]*(ALGEBRAIC[81]+STATES[25]) - CONSTANTS[50]*STATES[25]; resid[25] = RATES[26] - ALGEBRAIC[113] - (ALGEBRAIC[88]+( ALGEBRAIC[89]*CONSTANTS[81])/CONSTANTS[80]); resid[26] = RATES[27] - (ALGEBRAIC[89] - ALGEBRAIC[110])/(1.00000+( CONSTANTS[52]*CONSTANTS[53])/pow(CONSTANTS[53]+STATES[27], 2.00000)); resid[27] = RATES[10] - ALGEBRAIC[85]*((( - CONSTANTS[19]*ALGEBRAIC[90]*CONSTANTS[78])/( CONSTANTS[82]*CONSTANTS[15]*CONSTANTS[9])+( ALGEBRAIC[110]*CONSTANTS[81])/CONSTANTS[82]) - ALGEBRAIC[82]); resid[28] = RATES[28] - (ALGEBRAIC[112] - STATES[28])/ALGEBRAIC[111]; resid[29] = RATES[29] - (ALGEBRAIC[105] - STATES[29])/CONSTANTS[60]; } void computeVariables(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC) { ALGEBRAIC[3] = (( CONSTANTS[8]*CONSTANTS[10])/( 2.00000*CONSTANTS[9]))*log(CONSTANTS[5]/STATES[2]); } void computeEssentialVariables(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC) { ALGEBRAIC[0] = (CONDVAR[0]>=0.00000&&CONDVAR[1]<=0.00000 ? CONSTANTS[2] : 0.00000); ALGEBRAIC[1] = (( CONSTANTS[8]*CONSTANTS[10])/CONSTANTS[9])*log(CONSTANTS[4]/STATES[1]); ALGEBRAIC[6] = CONSTANTS[11]*pow(STATES[5], 3.00000)*( 0.800000*STATES[6]+ 0.200000*STATES[7])*(STATES[0] - ALGEBRAIC[1]); ALGEBRAIC[7] = ( 0.320000*(STATES[0]+47.1300))/(1.00000 - exp( - 0.100000*(STATES[0]+47.1300))); ALGEBRAIC[8] = 0.0800000*exp(- STATES[0]/11.0000); ALGEBRAIC[9] = ALGEBRAIC[7]/(ALGEBRAIC[7]+ALGEBRAIC[8]); ALGEBRAIC[10] = 1.00000/(ALGEBRAIC[7]+ALGEBRAIC[8]); ALGEBRAIC[11] = (CONDVAR[2]<0.00000 ? 0.135000*exp((STATES[0]+80.0000)/- 6.80000) : 0.00000); ALGEBRAIC[12] = (CONDVAR[3]<0.00000 ? 3.56000*exp( 0.0790000*STATES[0])+ 310000.*exp( 0.350000*STATES[0]) : 1.00000/( 0.130000*(1.00000+exp((STATES[0]+10.6600)/- 11.1000)))); ALGEBRAIC[13] = ALGEBRAIC[11]/(ALGEBRAIC[11]+ALGEBRAIC[12]); ALGEBRAIC[14] = 1.00000/(ALGEBRAIC[11]+ALGEBRAIC[12]); ALGEBRAIC[15] = (CONDVAR[4]<0.00000 ? ( ( - 127140.*exp( 0.244400*STATES[0]) - 3.47400e-05*exp( - 0.0439100*STATES[0]))*(STATES[0]+37.7800))/(1.00000+exp( 0.311000*(STATES[0]+79.2300))) : 0.00000); ALGEBRAIC[16] = (CONDVAR[5]<0.00000 ? ( 0.121200*exp( - 0.0105200*STATES[0]))/(1.00000+exp( - 0.137800*(STATES[0]+40.1400))) : ( 0.300000*exp( - 2.53500e-07*STATES[0]))/(1.00000+exp( - 0.100000*(STATES[0]+32.0000)))); ALGEBRAIC[17] = ( 0.100000*ALGEBRAIC[15])/(ALGEBRAIC[15]+ALGEBRAIC[16]); ALGEBRAIC[18] = 0.100000/(ALGEBRAIC[15]+ALGEBRAIC[16]); ALGEBRAIC[19] = CONSTANTS[12]*pow(STATES[8], 3.00000)*STATES[9]*(STATES[0] - ALGEBRAIC[1]); ALGEBRAIC[20] = ( 0.320000*(STATES[0]+47.1300))/(1.00000 - exp( - 0.100000*(STATES[0]+47.1300))); ALGEBRAIC[21] = 0.0800000*exp(- STATES[0]/11.0000); ALGEBRAIC[22] = ALGEBRAIC[20]/(ALGEBRAIC[20]+ALGEBRAIC[21]); ALGEBRAIC[23] = 1.00000/(ALGEBRAIC[20]+ALGEBRAIC[21]); ALGEBRAIC[24] = 1.00000/(1.00000+exp((STATES[0]+69.0000)/6.10000)); ALGEBRAIC[25] = 175.000+125.000/(1.00000+exp(- (STATES[0]+25.0000)/6.00000)); ALGEBRAIC[27] = 1.00000/(1.00000+exp(- (STATES[0] - 4.00000)/6.74000)); ALGEBRAIC[28] = 0.590000+( 0.800000*exp( 0.0520000*(STATES[0]+13.0000)))/(1.00000+exp( 0.132000*(STATES[0]+13.0000))); ALGEBRAIC[29] = 1.00000/(1.00000+exp((STATES[0]+18.0000)/10.0000)); ALGEBRAIC[30] = 4.00000+ 0.00500000*pow(STATES[0] - 2.50000, 2.00000); ALGEBRAIC[31] = 1.00000/(1.00000+exp((STATES[0]+18.0000)/10.0000)); ALGEBRAIC[32] = 38.0000+ 0.0700000*pow(STATES[0] - 18.6000, 2.00000); ALGEBRAIC[36] = 1.00000/(1.00000+exp(- (STATES[0]+33.0000)/6.10000)); ALGEBRAIC[34] = 1.06800*exp((STATES[0]+16.3000)/30.0000); ALGEBRAIC[35] = 1.06800*exp(- (STATES[0]+16.3000)/30.0000); ALGEBRAIC[37] = 1.00000/(ALGEBRAIC[34]+ALGEBRAIC[35]); ALGEBRAIC[40] = 1.00000/(1.00000+exp((STATES[0]+60.0000)/6.60000)); ALGEBRAIC[38] = 0.0150000*exp(- (STATES[0]+71.7000)/83.3000); ALGEBRAIC[39] = 0.0150000*exp((STATES[0]+71.7000)/15.4000); ALGEBRAIC[41] = 1.00000/(ALGEBRAIC[38]+ALGEBRAIC[39]); ALGEBRAIC[2] = (( CONSTANTS[8]*CONSTANTS[10])/CONSTANTS[9])*log(CONSTANTS[6]/STATES[3]); ALGEBRAIC[42] = CONSTANTS[21]*STATES[18]*( 0.800000*STATES[19]+ 0.200000*STATES[20])*(STATES[0] - ALGEBRAIC[2]); ALGEBRAIC[43] = ( 25.0000*exp((STATES[0] - 76.0000)/20.0000))/(1.00000+exp((STATES[0] - 76.0000)/20.0000)); ALGEBRAIC[44] = ( 25.0000*exp(- (STATES[0]+54.0000)/20.0000))/(1.00000+exp(- (STATES[0]+54.0000)/20.0000)); ALGEBRAIC[45] = 1.00000/(ALGEBRAIC[43]+ALGEBRAIC[44]); ALGEBRAIC[46] = ALGEBRAIC[43]/(ALGEBRAIC[43]+ALGEBRAIC[44]); ALGEBRAIC[49] = 6.00000+5.00000/(1.00000+exp((STATES[0] - 16.5000)/10.0000)); ALGEBRAIC[47] = 0.0300000/(1.00000+exp((STATES[0]+25.0000)/15.0000)); ALGEBRAIC[48] = ( 0.100000*exp((STATES[0] - 40.0000)/15.0000))/(1.00000+exp((STATES[0] - 40.0000)/15.0000)); ALGEBRAIC[50] = ALGEBRAIC[47]/(ALGEBRAIC[47]+ALGEBRAIC[48]); ALGEBRAIC[53] = 21.5000+30.0000/(1.00000+exp((STATES[0] - 25.0000)/10.0000)); ALGEBRAIC[51] = 0.00442000/(1.00000+exp((STATES[0]+26.0000)/15.0000)); ALGEBRAIC[52] = ( 0.0500000*exp((STATES[0] - 10.0000)/15.0000))/(1.00000+exp((STATES[0] - 10.0000)/15.0000)); ALGEBRAIC[54] = ALGEBRAIC[51]/(ALGEBRAIC[51]+ALGEBRAIC[52]); ALGEBRAIC[56] = 900.000/(1.00000+exp(STATES[0]/5.00000))+100.000; ALGEBRAIC[57] = 1.00000/(1.00000+exp(- (STATES[0]+0.0850000)/12.2500)); ALGEBRAIC[59] = 1.00000/(( 7.61000e-05*(STATES[0]+44.6000))/(1.00000 - exp( - 9.97000*(STATES[0]+44.6000)))+( 0.000360000*(STATES[0] - 0.550000))/(exp( 0.128000*(STATES[0] - 0.550000)) - 1.00000)); ALGEBRAIC[60] = 1.00000/(1.00000+exp(- (STATES[0] - 9.00000)/13.7000)); ALGEBRAIC[61] = ( 2.00000*1.00000)/(( 7.61000e-05*(STATES[0]+44.6000))/(1.00000 - exp( - 9.97000*(STATES[0]+44.6000)))+( 0.000360000*(STATES[0] - 0.550000))/(exp( 0.128000*(STATES[0] - 0.550000)) - 1.00000)); ALGEBRAIC[62] = 1.00000/(1.00000+exp(- (STATES[0] - 9.00000)/13.7000)); ALGEBRAIC[67] = 1.00000/(1.00000+CONSTANTS[25]/STATES[10]); ALGEBRAIC[71] = ( CONSTANTS[37]*STATES[2])/(CONSTANTS[38]+STATES[2]); ALGEBRAIC[4] = (( - CONSTANTS[8]*CONSTANTS[10])/CONSTANTS[9])*log(CONSTANTS[7]/STATES[4]); ALGEBRAIC[72] = ( CONSTANTS[39]*(ALGEBRAIC[2] - ALGEBRAIC[4]))/((ALGEBRAIC[2]+87.8251) - ALGEBRAIC[4]); ALGEBRAIC[73] = ( CONSTANTS[40]*pow(ALGEBRAIC[1] - ALGEBRAIC[4], 4.00000))/(pow(ALGEBRAIC[1] - ALGEBRAIC[4], 4.00000)+pow(87.8251, 4.00000)); ALGEBRAIC[74] = CONSTANTS[41]*(STATES[0] - ALGEBRAIC[1]); ALGEBRAIC[75] = CONSTANTS[42]*(STATES[0] - ALGEBRAIC[2]); ALGEBRAIC[76] = CONSTANTS[44]*(STATES[0] - ALGEBRAIC[4]); ALGEBRAIC[77] = ( (( (( 1.00000*CONSTANTS[43])/CONSTANTS[19])*pow(CONSTANTS[15], 2.00000)*STATES[0]*pow(CONSTANTS[9], 2.00000))/( CONSTANTS[8]*CONSTANTS[10]))*( CONSTANTS[16]*STATES[2]*exp(( CONSTANTS[15]*STATES[0]*CONSTANTS[9])/( CONSTANTS[8]*CONSTANTS[10])) - CONSTANTS[17]*CONSTANTS[5]))/(exp(( CONSTANTS[15]*STATES[0]*CONSTANTS[9])/( CONSTANTS[8]*CONSTANTS[10])) - 1.00000); ALGEBRAIC[79] = ( 2.00000*CONSTANTS[47]*STATES[2])/pow(STATES[2]+CONSTANTS[45], 2.00000); ALGEBRAIC[78] = ( 2.00000*CONSTANTS[48]*STATES[2])/pow(STATES[2]+CONSTANTS[46], 2.00000); ALGEBRAIC[80] = 1.00000/(1.00000+ALGEBRAIC[79]+ALGEBRAIC[78]); ALGEBRAIC[81] = ( CONSTANTS[51]*(1.00000 - STATES[25]))/(1.00000+CONSTANTS[18]/STATES[10]); ALGEBRAIC[82] = (STATES[10] - STATES[2])/CONSTANTS[58]; ALGEBRAIC[84] = ( 2.00000*CONSTANTS[56]*STATES[10])/pow(STATES[10]+CONSTANTS[54], 2.00000); ALGEBRAIC[83] = ( 2.00000*CONSTANTS[57]*STATES[10])/pow(STATES[10]+CONSTANTS[55], 2.00000); ALGEBRAIC[85] = 1.00000/(1.00000+ALGEBRAIC[84]+ALGEBRAIC[83]); ALGEBRAIC[88] = ( CONSTANTS[61]*STATES[26])/CONSTANTS[62]; ALGEBRAIC[89] = (STATES[26] - STATES[27])/CONSTANTS[68]; ALGEBRAIC[26] = ( (( (( 1.00000*CONSTANTS[14])/CONSTANTS[19])*pow(CONSTANTS[15], 2.00000)*(STATES[0] - 15.0000)*pow(CONSTANTS[9], 2.00000))/( CONSTANTS[8]*CONSTANTS[10]))*( CONSTANTS[16]*STATES[10]*exp(( CONSTANTS[15]*CONSTANTS[9]*(STATES[0] - 15.0000))/( CONSTANTS[8]*CONSTANTS[10])) - CONSTANTS[17]*CONSTANTS[5]))/(exp(( CONSTANTS[15]*CONSTANTS[9]*(STATES[0] - 15.0000))/( CONSTANTS[8]*CONSTANTS[10])) - 1.00000); ALGEBRAIC[90] = CONSTANTS[13]*STATES[11]*STATES[12]*STATES[13]*STATES[14]*STATES[15]*ALGEBRAIC[26]; ALGEBRAIC[91] = 0.300000/(1.00000 - ALGEBRAIC[90]/0.0500000)+0.550000/(1.00000+STATES[10]/0.00300000)+0.150000; ALGEBRAIC[92] = 1.00000/(1.00000 - ALGEBRAIC[90]/0.0100000); ALGEBRAIC[93] = 125.000+300.000/(1.00000+exp((- ALGEBRAIC[90] - 0.175000)/0.0400000)); ALGEBRAIC[55] = 1.00000/(1.00000+exp((STATES[0] - 5.40000)/20.4000)); ALGEBRAIC[94] = CONSTANTS[74]*STATES[21]*ALGEBRAIC[55]*(STATES[0] - ALGEBRAIC[2]); ALGEBRAIC[5] = (( CONSTANTS[8]*CONSTANTS[10])/CONSTANTS[9])*log((CONSTANTS[6]+ CONSTANTS[3]*CONSTANTS[4])/(STATES[3]+ CONSTANTS[3]*STATES[1])); ALGEBRAIC[58] = 0.0525813*(1.00000+0.600000/(1.00000+pow(3.80000e-05/STATES[2], 1.40000))); ALGEBRAIC[95] = ALGEBRAIC[58]*STATES[22]*STATES[23]*(STATES[0] - ALGEBRAIC[5]); ALGEBRAIC[65] = 1.00000/(1.00000+exp((7.48800 - STATES[0])/5.98000)); ALGEBRAIC[97] = CONSTANTS[22]*ALGEBRAIC[65]*(STATES[0] - ALGEBRAIC[2]); ALGEBRAIC[66] = ( (( (( 1.00000*CONSTANTS[23])/CONSTANTS[19])*pow(CONSTANTS[24], 2.00000)*STATES[0]*pow(CONSTANTS[9], 2.00000))/( CONSTANTS[8]*CONSTANTS[10]))*(STATES[4] - CONSTANTS[7]*exp(( - CONSTANTS[24]*STATES[0]*CONSTANTS[9])/( CONSTANTS[8]*CONSTANTS[10]))))/(1.00000 - exp(( - CONSTANTS[24]*STATES[0]*CONSTANTS[9])/( CONSTANTS[8]*CONSTANTS[10]))); ALGEBRAIC[98] = 20.0000*ALGEBRAIC[66]*STATES[24]; ALGEBRAIC[68] = CONSTANTS[31]*pow(STATES[1], 3.00000)+ 1.50000*pow(CONSTANTS[29], 3.00000)*STATES[2]+ pow(CONSTANTS[28], 3.00000)*CONSTANTS[5]*(1.00000+( 1.50000*STATES[2])/CONSTANTS[30]); ALGEBRAIC[69] = CONSTANTS[30]*pow(CONSTANTS[4], 3.00000)*(1.00000+STATES[1]/CONSTANTS[28])+ pow(STATES[1], 3.00000)*CONSTANTS[5]+ 1.50000*pow(CONSTANTS[4], 3.00000)*STATES[2]; ALGEBRAIC[99] = ( CONSTANTS[26]*CONSTANTS[27]*pow(STATES[1], 3.00000)*CONSTANTS[5]*exp(( 0.350000*CONSTANTS[9]*STATES[0])/( CONSTANTS[8]*CONSTANTS[10])) - 1.50000*pow(CONSTANTS[4], 3.00000)*STATES[2]*exp(( - 0.650000*CONSTANTS[9]*STATES[0])/( CONSTANTS[8]*CONSTANTS[10])))/( (1.00000+pow(CONSTANTS[32]/( 1.50000*STATES[2]), 2.00000))*(1.00000+ CONSTANTS[33]*exp(( - 0.650000*STATES[0]*CONSTANTS[9])/( CONSTANTS[8]*CONSTANTS[10])))*(ALGEBRAIC[68]+ALGEBRAIC[69])); ALGEBRAIC[70] = 1.00000/(1.00000+ 0.124500*exp(( - 0.100000*CONSTANTS[9]*STATES[0])/( CONSTANTS[8]*CONSTANTS[10]))+ 0.0365000*CONSTANTS[77]*exp(( - CONSTANTS[9]*STATES[0])/( CONSTANTS[8]*CONSTANTS[10]))); ALGEBRAIC[100] = ( (( CONSTANTS[34]*ALGEBRAIC[70]*1.00000)/(1.00000+pow(CONSTANTS[35]/STATES[1], 2.00000)))*CONSTANTS[6])/(CONSTANTS[6]+CONSTANTS[36]); ALGEBRAIC[87] = pow(STATES[27], 1.90000)/(pow(STATES[27], 1.90000)+pow(( 49.2800*STATES[10])/(STATES[10]+0.00280000), 1.90000)); ALGEBRAIC[105] = ( ALGEBRAIC[87]*pow(ALGEBRAIC[90], 2.00000))/(pow(ALGEBRAIC[90], 2.00000)+1.00000); ALGEBRAIC[101] = ALGEBRAIC[81]+STATES[25]; ALGEBRAIC[108] = 0.500000+( 10.0000*1.00000*ALGEBRAIC[101])/( 1.00000*ALGEBRAIC[101]+CONSTANTS[18])+1.00000/(1.00000+STATES[10]/0.00300000); ALGEBRAIC[64] = 1.02000/(1.00000+exp( 0.238500*(STATES[0] - (ALGEBRAIC[2]+59.2150)))); ALGEBRAIC[63] = ( 0.491240*exp( 0.0803200*((STATES[0]+5.47600) - ALGEBRAIC[2]))+exp( 0.0617500*(STATES[0] - (594.310+ALGEBRAIC[2]))))/(1.00000+exp( - 0.514300*((STATES[0]+4.75300) - ALGEBRAIC[2]))); ALGEBRAIC[96] = ALGEBRAIC[64]/(ALGEBRAIC[64]+ALGEBRAIC[63]); ALGEBRAIC[109] = ( CONSTANTS[75]*ALGEBRAIC[96]+0.00400000)*(STATES[0] - ALGEBRAIC[2]); ALGEBRAIC[86] = 1.00000/(1.00000+exp(( CONSTANTS[13]*ALGEBRAIC[26]+13.0000)/5.00000)); ALGEBRAIC[102] = 3000.00*ALGEBRAIC[86]; ALGEBRAIC[110] = ALGEBRAIC[102]*STATES[29]*STATES[28]*(STATES[27] - STATES[10]); ALGEBRAIC[104] = ( CONSTANTS[59]*1.00000*ALGEBRAIC[101])/(CONSTANTS[18]+ 1.00000*ALGEBRAIC[101]); ALGEBRAIC[103] = 1.00000/(1.00000+exp((ALGEBRAIC[90]+0.0500000)/0.0150000)); ALGEBRAIC[111] = (350.000 - ALGEBRAIC[104])/(1.00000+exp(((STATES[10] - 0.00300000)+ 0.00300000*ALGEBRAIC[103])/0.000200000))+3.00000+ALGEBRAIC[104]; ALGEBRAIC[112] = 1.00000/(1.00000+exp(((STATES[10] - 0.000400000)+ 0.00200000*ALGEBRAIC[103])/2.50000e-05)); ALGEBRAIC[106] = ( CONSTANTS[65]*ALGEBRAIC[101]*1.00000)/(CONSTANTS[18]+ ALGEBRAIC[101]*1.00000); ALGEBRAIC[107] = ( CONSTANTS[66]*ALGEBRAIC[101]*1.00000)/(CONSTANTS[18]+ ALGEBRAIC[101]*1.00000); ALGEBRAIC[113] = ( CONSTANTS[63]*(ALGEBRAIC[106]+1.00000)*CONSTANTS[64]*STATES[2])/((STATES[2]+CONSTANTS[67]) - ALGEBRAIC[107]); ALGEBRAIC[33] = CONSTANTS[20]*STATES[16]*STATES[17]*(STATES[0] - 50.0000); ALGEBRAIC[114] = ALGEBRAIC[6]+ALGEBRAIC[19]+ALGEBRAIC[90]+ALGEBRAIC[33]+ALGEBRAIC[42]+ALGEBRAIC[98]+ALGEBRAIC[94]+ALGEBRAIC[95]+ALGEBRAIC[109]+ALGEBRAIC[99]+ALGEBRAIC[100]+ALGEBRAIC[74]+ALGEBRAIC[75]+ALGEBRAIC[77]+ALGEBRAIC[76]+ALGEBRAIC[71]+ALGEBRAIC[97]; } void getStateInformation(double* SI) { SI[0] = 1.0; SI[1] = 1.0; SI[2] = 1.0; SI[3] = 1.0; SI[4] = 1.0; SI[5] = 1.0; SI[6] = 1.0; SI[7] = 1.0; SI[8] = 1.0; SI[9] = 1.0; SI[10] = 1.0; SI[11] = 1.0; SI[12] = 1.0; SI[13] = 1.0; SI[14] = 1.0; SI[15] = 1.0; SI[16] = 1.0; SI[17] = 1.0; SI[18] = 1.0; SI[19] = 1.0; SI[20] = 1.0; SI[21] = 1.0; SI[22] = 1.0; SI[23] = 1.0; SI[24] = 1.0; SI[25] = 1.0; SI[26] = 1.0; SI[27] = 1.0; SI[28] = 1.0; SI[29] = 1.0; } void computeRoots(double VOI, double* CONSTANTS, double* RATES, double* OLDRATES, double* STATES, double* OLDSTATES, double* ALGEBRAIC, double* CONDVARS) { CONDVAR[0] = VOI - CONSTANTS[0]; CONDVAR[1] = VOI - CONSTANTS[1]; CONDVAR[2] = STATES[0] - - 40.0000; CONDVAR[3] = STATES[0] - - 40.0000; CONDVAR[4] = STATES[0] - - 40.0000; CONDVAR[5] = STATES[0] - - 40.0000; }