/* There are a total of 84 entries in the algebraic variable array. There are a total of 68 entries in each of the rate and state variable arrays. There are a total of 134 entries in the constant variable array. */ /* * VOI is time in component environment (second). * CONSTANTS[0] is protocol in component environment (dimensionless). * CONSTANTS[1] is L_totmax in component b1_AR_Gs_parameters (uM). * CONSTANTS[2] is sum_b1_AR in component b1_AR_Gs_parameters (uM). * CONSTANTS[3] is Gs_tot in component b1_AR_Gs_parameters (uM). * CONSTANTS[4] is Kl in component b1_AR_Gs_parameters (uM). * CONSTANTS[5] is Kr in component b1_AR_Gs_parameters (uM). * CONSTANTS[6] is Kc in component b1_AR_Gs_parameters (uM). * CONSTANTS[7] is k_bar_kp in component b1_AR_Gs_parameters (per_sec). * CONSTANTS[8] is k_bar_km in component b1_AR_Gs_parameters (per_sec). * CONSTANTS[9] is k_p_kap in component b1_AR_Gs_parameters (per_uM_per_sec). * CONSTANTS[10] is k_p_kam in component b1_AR_Gs_parameters (per_sec). * CONSTANTS[11] is k_g_act in component b1_AR_Gs_parameters (per_sec). * CONSTANTS[12] is k_hyd in component b1_AR_Gs_parameters (per_sec). * CONSTANTS[13] is k_reassoc in component b1_AR_Gs_parameters (per_uM_per_sec). * CONSTANTS[14] is AC_tot in component cAMP_parameters (uM). * CONSTANTS[15] is ATP in component cAMP_parameters (uM). * CONSTANTS[16] is PDE_tot in component cAMP_parameters (uM). * CONSTANTS[17] is IBMX_tot in component cAMP_parameters (uM). * CONSTANTS[18] is Fsk_tot in component cAMP_parameters (uM). * CONSTANTS[19] is k_ac_basal in component cAMP_parameters (per_sec). * CONSTANTS[20] is k_ac_gsa in component cAMP_parameters (per_sec). * CONSTANTS[21] is k_ac_fsk in component cAMP_parameters (per_sec). * CONSTANTS[22] is k_pde in component cAMP_parameters (per_sec). * CONSTANTS[23] is Km_basal in component cAMP_parameters (uM). * CONSTANTS[24] is Km_gsa in component cAMP_parameters (uM). * CONSTANTS[25] is Km_fsk in component cAMP_parameters (uM). * CONSTANTS[26] is Km_pde in component cAMP_parameters (uM). * CONSTANTS[27] is K_gsa in component cAMP_parameters (uM). * CONSTANTS[28] is K_fsk in component cAMP_parameters (uM). * CONSTANTS[29] is Ki_ibmx in component cAMP_parameters (uM). * CONSTANTS[30] is PKAI_tot in component PKA_parameters (uM). * CONSTANTS[31] is PKAII_tot in component PKA_parameters (uM). * CONSTANTS[32] is PKI_tot in component PKA_parameters (uM). * CONSTANTS[33] is K_a in component PKA_parameters (uM). * CONSTANTS[34] is K_b in component PKA_parameters (uM). * CONSTANTS[35] is K_d in component PKA_parameters (uM). * CONSTANTS[36] is Ki_pki in component PKA_parameters (uM). * CONSTANTS[37] is PLB_tot in component PLB_parameters (uM). * CONSTANTS[38] is PP1_tot in component PLB_parameters (uM). * CONSTANTS[39] is Inhib1_tot in component PLB_parameters (uM). * CONSTANTS[40] is k_pka_plb in component PLB_parameters (per_sec). * CONSTANTS[41] is Km_pka_plb in component PLB_parameters (uM). * CONSTANTS[42] is k_pp1_plb in component PLB_parameters (per_sec). * CONSTANTS[43] is Km_pp1_plb in component PLB_parameters (uM). * CONSTANTS[44] is k_pka_i1 in component PLB_parameters (per_sec). * CONSTANTS[45] is Km_pka_i1 in component PLB_parameters (uM). * CONSTANTS[46] is Vmax_pp2a_i1 in component PLB_parameters (uM_per_sec). * CONSTANTS[47] is Km_pp2a_i1 in component PLB_parameters (uM). * CONSTANTS[48] is Ki_inhib1 in component PLB_parameters (uM). * CONSTANTS[49] is epsilon in component LCC_parameters (dimensionless). * CONSTANTS[50] is LCC_tot in component LCC_parameters (uM). * CONSTANTS[51] is PP1_lcc_tot in component LCC_parameters (uM). * CONSTANTS[52] is PP2A_lcc_tot in component LCC_parameters (uM). * CONSTANTS[53] is k_pka_lcc in component LCC_parameters (per_sec). * CONSTANTS[54] is Km_pka_lcc in component LCC_parameters (uM). * CONSTANTS[55] is k_pp1_lcc in component LCC_parameters (per_sec). * CONSTANTS[56] is Km_pp1_lcc in component LCC_parameters (uM). * CONSTANTS[57] is k_pp2a_lcc in component LCC_parameters (per_sec). * CONSTANTS[58] is Km_pp2a_lcc in component LCC_parameters (uM). * CONSTANTS[59] is V_myo in component EC_Coupling_Parameters (uL). * CONSTANTS[60] is V_nsr in component EC_Coupling_Parameters (uL). * CONSTANTS[61] is V_jsr in component EC_Coupling_Parameters (uL). * CONSTANTS[62] is A_Cap in component EC_Coupling_Parameters (cm2). * CONSTANTS[63] is Temp in component EC_Coupling_Parameters (kelvin). * CONSTANTS[64] is Na_ext in component EC_Coupling_Parameters (mM). * CONSTANTS[65] is K_ext in component EC_Coupling_Parameters (mM). * CONSTANTS[66] is Ca_ext in component EC_Coupling_Parameters (mM). * CONSTANTS[67] is G_Na in component EC_Coupling_Parameters (mS_per_uF). * CONSTANTS[68] is G_to in component EC_Coupling_Parameters (mS_per_uF). * CONSTANTS[69] is G_ss in component EC_Coupling_Parameters (mS_per_uF). * CONSTANTS[70] is G_Ki_bar in component EC_Coupling_Parameters (mS_per_uF). * CONSTANTS[71] is G_Kp in component EC_Coupling_Parameters (mS_per_uF). * CONSTANTS[72] is f in component EC_Coupling_Parameters (per_sec). * CONSTANTS[73] is g in component EC_Coupling_Parameters (per_sec). * CONSTANTS[74] is gamma_o in component EC_Coupling_Parameters (per_mM_per_sec). * CONSTANTS[75] is omega in component EC_Coupling_Parameters (per_sec). * CONSTANTS[76] is p_Ca in component EC_Coupling_Parameters (cm_per_sec). * CONSTANTS[77] is p_K in component EC_Coupling_Parameters (cm_per_sec). * CONSTANTS[78] is N_lcc in component EC_Coupling_Parameters (dimensionless). * CONSTANTS[79] is I_Ca05 in component EC_Coupling_Parameters (uA_per_uF). * CONSTANTS[80] is k_NaCa in component EC_Coupling_Parameters (uA_per_uF). * CONSTANTS[81] is Km_Na in component EC_Coupling_Parameters (mM). * CONSTANTS[82] is Km_Ca in component EC_Coupling_Parameters (mM). * CONSTANTS[83] is k_sat in component EC_Coupling_Parameters (dimensionless). * CONSTANTS[84] is eta in component EC_Coupling_Parameters (dimensionless). * CONSTANTS[85] is I_bar_NaK in component EC_Coupling_Parameters (uA_per_uF). * CONSTANTS[86] is Km_Nai in component EC_Coupling_Parameters (mM). * CONSTANTS[87] is Km_Ko in component EC_Coupling_Parameters (mM). * CONSTANTS[88] is I_bar_PCa in component EC_Coupling_Parameters (uA_per_uF). * CONSTANTS[89] is Km_PCa in component EC_Coupling_Parameters (mM). * CONSTANTS[90] is G_CaB in component EC_Coupling_Parameters (uA_per_uF). * CONSTANTS[91] is G_NaB in component EC_Coupling_Parameters (uA_per_uF). * CONSTANTS[92] is Pns in component EC_Coupling_Parameters (dimensionless). * CONSTANTS[93] is Km_NS in component EC_Coupling_Parameters (mM). * CONSTANTS[94] is I_up_bar in component EC_Coupling_Parameters (mM_per_sec). * CONSTANTS[95] is Km_up0 in component EC_Coupling_Parameters (mM). * CONSTANTS[96] is NSR_bar in component EC_Coupling_Parameters (mM). * CONSTANTS[97] is tau_on in component EC_Coupling_Parameters (second). * CONSTANTS[98] is tau_off in component EC_Coupling_Parameters (second). * CONSTANTS[99] is G_max_rel in component EC_Coupling_Parameters (mM_per_sec). * CONSTANTS[100] is d_Cai_th in component EC_Coupling_Parameters (mM). * CONSTANTS[101] is Km_rel in component EC_Coupling_Parameters (mM). * CONSTANTS[102] is CSQN_th in component EC_Coupling_Parameters (mM). * CONSTANTS[103] is CSQN_bar in component EC_Coupling_Parameters (mM). * CONSTANTS[104] is Km_CSQN in component EC_Coupling_Parameters (mM). * CONSTANTS[105] is tau_tr in component EC_Coupling_Parameters (second). * CONSTANTS[106] is TRPN_bar in component EC_Coupling_Parameters (mM). * CONSTANTS[107] is CMDN_bar in component EC_Coupling_Parameters (mM). * CONSTANTS[108] is INDO_bar in component EC_Coupling_Parameters (mM). * CONSTANTS[109] is Km_TRPN in component EC_Coupling_Parameters (mM). * CONSTANTS[110] is Km_CMDN in component EC_Coupling_Parameters (mM). * CONSTANTS[111] is Km_INDO in component EC_Coupling_Parameters (mM). * STATES[31] is LR in component b1_AR_module (uM). * STATES[32] is LRG in component b1_AR_module (uM). * STATES[33] is RG in component b1_AR_module (uM). * STATES[34] is BARK_DESENS in component b1_AR_module (uM_per_sec). * ALGEBRAIC[0] is BARK_RESENS in component b1_AR_module (uM_per_sec). * STATES[35] is PKA_DESENS in component b1_AR_module (uM_per_sec). * ALGEBRAIC[1] is PKA_RESENS in component b1_AR_module (uM_per_sec). * STATES[36] is G_ACT in component b1_AR_module (uM_per_sec). * ALGEBRAIC[2] is HYD in component b1_AR_module (uM_per_sec). * ALGEBRAIC[3] is REASSOC in component b1_AR_module (uM_per_sec). * STATES[37] is L in component b1_AR_module (uM). * STATES[38] is R in component b1_AR_module (uM). * STATES[39] is Gs in component b1_AR_module (uM). * STATES[0] is b1_AR_tot in component b1_AR_module (uM). * STATES[1] is b1_AR_d in component b1_AR_module (uM). * STATES[2] is b1_AR_p in component b1_AR_module (uM). * STATES[3] is Gs_agtp_tot in component b1_AR_module (uM). * STATES[4] is Gs_agdp in component b1_AR_module (uM). * STATES[5] is Gs_bg in component b1_AR_module (uM). * STATES[40] is PKAC_I in component PKA_module (uM). * STATES[41] is cAMP in component PKA_module (uM). * STATES[42] is Gsa_GTP in component cAMP_module (uM). * STATES[43] is Fsk in component cAMP_module (uM). * STATES[44] is AC in component cAMP_module (uM). * CONSTANTS[131] is PDE in component cAMP_module (uM). * CONSTANTS[132] is IBMX in component cAMP_module (uM). * STATES[6] is cAMP_tot in component cAMP_module (uM). * STATES[45] is Gsa_GTP_AC in component cAMP_module (uM). * STATES[46] is Fsk_AC in component cAMP_module (uM). * STATES[47] is AC_ACT_GSA in component cAMP_module (uM_per_sec). * STATES[48] is AC_ACT_BASAL in component cAMP_module (uM_per_sec). * STATES[49] is AC_ACT_FSK in component cAMP_module (uM_per_sec). * STATES[50] is PDE_ACT in component cAMP_module (uM_per_sec). * CONSTANTS[133] is PDE_IBMX in component cAMP_module (uM). * STATES[51] is PKI in component PKA_module (uM). * STATES[52] is A2RC_I in component PKA_module (uM). * STATES[53] is A2R_I in component PKA_module (uM). * STATES[54] is A2RC_II in component PKA_module (uM). * STATES[55] is A2R_II in component PKA_module (uM). * STATES[56] is ARC_I in component PKA_module (uM). * STATES[57] is ARC_II in component PKA_module (uM). * STATES[58] is PKA_temp in component PKA_module (uM). * STATES[59] is PKAC_II in component PKA_module (uM). * CONSTANTS[112] is zed in component PKA_module (dimensionless). * CONSTANTS[113] is zed1 in component PKA_module (dimensionless). * ALGEBRAIC[4] is PLB in component PLB_module (uM). * STATES[60] is PLB_PHOSPH in component PLB_module (uM_per_sec). * STATES[61] is PLB_DEPHOSPH in component PLB_module (uM_per_sec). * ALGEBRAIC[5] is Inhib1 in component PLB_module (uM). * STATES[62] is Inhib1p_PP1 in component PLB_module (uM). * STATES[63] is Inhib1_PHOSPH in component PLB_module (uM_per_sec). * ALGEBRAIC[6] is Inhib1_DEPHOSPH in component PLB_module (uM_per_sec). * STATES[7] is PLB_p in component PLB_module (uM). * STATES[8] is Inhib1p_tot in component PLB_module (uM). * STATES[64] is Inhib1p in component PLB_module (uM). * STATES[65] is PP1 in component PLB_module (uM). * ALGEBRAIC[7] is frac_PLB_p in component PLB_module (dimensionless). * ALGEBRAIC[8] is frac_PLB in component PLB_module (dimensionless). * CONSTANTS[124] is frac_PLB_o in component PLB_module (dimensionless). * ALGEBRAIC[9] is LCCa in component LCC_module (uM). * STATES[66] is LCCa_PHOSPH in component LCC_module (uM_per_sec). * ALGEBRAIC[10] is LCCa_DEPHOSPH in component LCC_module (uM_per_sec). * ALGEBRAIC[11] is LCCb in component LCC_module (uM). * STATES[67] is LCCb_PHOSPH in component LCC_module (uM_per_sec). * ALGEBRAIC[12] is LCCb_DEPHOSPH in component LCC_module (uM_per_sec). * STATES[9] is LCCa_p in component LCC_module (uM). * STATES[10] is LCCb_p in component LCC_module (uM). * ALGEBRAIC[13] is frac_LCCa_p in component LCC_module (dimensionless). * CONSTANTS[125] is frac_LCCa_po in component LCC_module (dimensionless). * ALGEBRAIC[14] is frac_LCCb_p in component LCC_module (dimensionless). * CONSTANTS[126] is frac_LCCb_po in component LCC_module (dimensionless). * ALGEBRAIC[15] is E_Na in component Nernst_Potentials (mV). * ALGEBRAIC[16] is E_K in component Nernst_Potentials (mV). * ALGEBRAIC[17] is E_Ca in component Nernst_Potentials (mV). * CONSTANTS[127] is E_Cl in component Nernst_Potentials (mV). * CONSTANTS[114] is R in component Nernst_Potentials (joules_per_kmole_kelvin). * CONSTANTS[115] is Frdy in component Nernst_Potentials (coulombs_per_mole). * CONSTANTS[128] is FoRT in component Nernst_Potentials (per_mV). * CONSTANTS[116] is z_Na in component Nernst_Potentials (dimensionless). * CONSTANTS[117] is z_K in component Nernst_Potentials (dimensionless). * CONSTANTS[118] is z_Ca in component Nernst_Potentials (dimensionless). * STATES[11] is Na_i in component Ion_Concentrations_and_Membrane_Potential (mM). * STATES[12] is K_i in component Ion_Concentrations_and_Membrane_Potential (mM). * STATES[13] is Ca_i in component Ion_Concentrations_and_Membrane_Potential (mM). * ALGEBRAIC[18] is am in component Fast_Na_Current (per_sec). * ALGEBRAIC[19] is bm in component Fast_Na_Current (per_sec). * ALGEBRAIC[20] is ah in component Fast_Na_Current (per_sec). * ALGEBRAIC[21] is aj in component Fast_Na_Current (per_sec). * ALGEBRAIC[22] is bh in component Fast_Na_Current (per_sec). * ALGEBRAIC[23] is bj in component Fast_Na_Current (per_sec). * STATES[14] is m in component Fast_Na_Current (dimensionless). * STATES[15] is h in component Fast_Na_Current (dimensionless). * STATES[16] is j in component Fast_Na_Current (dimensionless). * ALGEBRAIC[24] is I_Na in component Fast_Na_Current (uA_per_uF). * STATES[17] is V_m in component Ion_Concentrations_and_Membrane_Potential (mV). * ALGEBRAIC[25] is a_lcc in component L_Type_Calcium_Current (per_sec). * ALGEBRAIC[26] is b_lcc in component L_Type_Calcium_Current (per_sec). * ALGEBRAIC[27] is f_lcc in component L_Type_Calcium_Current (per_sec). * ALGEBRAIC[28] is y_lcc_inf in component L_Type_Calcium_Current (dimensionless). * ALGEBRAIC[29] is tau_y_lcc in component L_Type_Calcium_Current (second). * ALGEBRAIC[30] is gamma in component L_Type_Calcium_Current (per_sec). * ALGEBRAIC[31] is v_gamma in component L_Type_Calcium_Current (per_sec). * ALGEBRAIC[32] is v_omega in component L_Type_Calcium_Current (per_sec). * STATES[18] is v in component L_Type_Calcium_Current (dimensionless). * STATES[19] is w in component L_Type_Calcium_Current (dimensionless). * STATES[20] is x in component L_Type_Calcium_Current (dimensionless). * STATES[21] is y in component L_Type_Calcium_Current (dimensionless). * STATES[22] is z in component L_Type_Calcium_Current (dimensionless). * ALGEBRAIC[33] is i_bar_Ca in component L_Type_Calcium_Current (uA_per_uF). * ALGEBRAIC[34] is i_bar_K in component L_Type_Calcium_Current (uA_per_uF). * ALGEBRAIC[35] is f_avail in component L_Type_Calcium_Current (dimensionless). * ALGEBRAIC[36] is I_Ca in component L_Type_Calcium_Current (uA_per_uF). * ALGEBRAIC[37] is I_CaK in component L_Type_Calcium_Current (uA_per_uF). * ALGEBRAIC[38] is I_Ca_tot in component L_Type_Calcium_Current (uA_per_uF). * CONSTANTS[119] is alpha in component L_Type_Calcium_Current (ibar_to_I). * ALGEBRAIC[39] is r_toss in component Transient_Outward_K_Current (dimensionless). * ALGEBRAIC[40] is s_toss in component Transient_Outward_K_Current (dimensionless). * ALGEBRAIC[41] is tau_r_to in component Transient_Outward_K_Current (second). * ALGEBRAIC[42] is tau_s_to in component Transient_Outward_K_Current (second). * ALGEBRAIC[43] is tau_ss_to in component Transient_Outward_K_Current (second). * STATES[23] is r_to in component Transient_Outward_K_Current (dimensionless). * STATES[24] is s_to in component Transient_Outward_K_Current (dimensionless). * STATES[25] is ss_to in component Transient_Outward_K_Current (dimensionless). * ALGEBRAIC[44] is I_to in component Transient_Outward_K_Current (uA_per_uF). * ALGEBRAIC[45] is r_ss_inf in component Steady_State_K_Current (dimensionless). * ALGEBRAIC[46] is tau_r_ss in component Steady_State_K_Current (second). * ALGEBRAIC[47] is s_ss_inf in component Steady_State_K_Current (dimensionless). * CONSTANTS[129] is tau_s_ss in component Steady_State_K_Current (second). * STATES[26] is r_ss in component Steady_State_K_Current (dimensionless). * STATES[27] is s_ss in component Steady_State_K_Current (dimensionless). * ALGEBRAIC[48] is I_ss in component Steady_State_K_Current (uA_per_uF). * ALGEBRAIC[49] is a_Ki in component Time_Independent_K_Current (dimensionless). * ALGEBRAIC[50] is b_Ki in component Time_Independent_K_Current (dimensionless). * ALGEBRAIC[51] is Ki_ss in component Time_Independent_K_Current (dimensionless). * ALGEBRAIC[52] is I_Ki in component Time_Independent_K_Current (uA_per_uF). * ALGEBRAIC[53] is Kp in component Plateau_K_Current (dimensionless). * ALGEBRAIC[54] is I_Kp in component Plateau_K_Current (uA_per_uF). * ALGEBRAIC[55] is s4 in component Na_Ca_Exchanger_Current (dimensionless). * ALGEBRAIC[56] is s5 in component Na_Ca_Exchanger_Current (dimensionless). * ALGEBRAIC[57] is I_NCX in component Na_Ca_Exchanger_Current (uA_per_uF). * CONSTANTS[130] is sigma in component Na_K_Pump_Current (dimensionless). * ALGEBRAIC[58] is f_NaK in component Na_K_Pump_Current (dimensionless). * ALGEBRAIC[59] is I_NaK in component Na_K_Pump_Current (uA_per_uF). * ALGEBRAIC[60] is I_PCa in component Sarcolemmal_Ca_Pump_Current (uA_per_uF). * ALGEBRAIC[61] is I_CaB in component Ca_Background_Current (uA_per_uF). * ALGEBRAIC[62] is I_NaB in component Na_Background_Current (uA_per_uF). * ALGEBRAIC[63] is I_Na_tot in component Total_Membrane_Currents (uA_per_uF). * ALGEBRAIC[64] is I_K_tot in component Total_Membrane_Currents (uA_per_uF). * ALGEBRAIC[65] is I_Ca_tot in component Total_Membrane_Currents (uA_per_uF). * ALGEBRAIC[66] is t_rel_sub in component Calcium_Induced_Calcium_Release (second). * ALGEBRAIC[67] is ryr_on in component Calcium_Induced_Calcium_Release (dimensionless). * ALGEBRAIC[68] is ryr_off in component Calcium_Induced_Calcium_Release (dimensionless). * ALGEBRAIC[69] is g_rel in component Calcium_Induced_Calcium_Release (per_sec). * ALGEBRAIC[70] is I_rel in component Calcium_Induced_Calcium_Release (mM_per_sec). * STATES[28] is Ca_jsr in component Other_SR_Fluxes_and_Concentrations (mM). * STATES[29] is trel in component Ion_Concentrations_and_Membrane_Potential (second). * ALGEBRAIC[71] is Km_up in component Other_SR_Fluxes_and_Concentrations (mM). * ALGEBRAIC[72] is I_up in component Other_SR_Fluxes_and_Concentrations (mM_per_sec). * ALGEBRAIC[73] is I_leak in component Other_SR_Fluxes_and_Concentrations (mM_per_sec). * ALGEBRAIC[74] is I_tr in component Other_SR_Fluxes_and_Concentrations (mM_per_sec). * ALGEBRAIC[75] is B_jsr in component Other_SR_Fluxes_and_Concentrations (dimensionless). * STATES[30] is Ca_nsr in component Other_SR_Fluxes_and_Concentrations (mM). * ALGEBRAIC[76] is SR_content in component Other_SR_Fluxes_and_Concentrations (uM). * ALGEBRAIC[77] is b_trpn in component Cytoplasmic_Calcium_Buffering (dimensionless). * ALGEBRAIC[78] is b_cmdn in component Cytoplasmic_Calcium_Buffering (dimensionless). * ALGEBRAIC[79] is b_indo in component Cytoplasmic_Calcium_Buffering (dimensionless). * ALGEBRAIC[80] is B_myo in component Cytoplasmic_Calcium_Buffering (dimensionless). * ALGEBRAIC[83] is I_app in component Ion_Concentrations_and_Membrane_Potential (uA_per_uF). * CONSTANTS[120] is V_hold in component Ion_Concentrations_and_Membrane_Potential (mV). * CONSTANTS[121] is V_test in component Ion_Concentrations_and_Membrane_Potential (mV). * ALGEBRAIC[81] is V_clamp in component Ion_Concentrations_and_Membrane_Potential (mV). * CONSTANTS[122] is R_clamp in component Ion_Concentrations_and_Membrane_Potential (ms). * CONSTANTS[123] is lambda in component Ion_Concentrations_and_Membrane_Potential (nFC_per_sAcm2). * ALGEBRAIC[82] is I_pace in component Ion_Concentrations_and_Membrane_Potential (uA_per_uF). * RATES[0] is d/dt b1_AR_tot in component b1_AR_module (uM). * RATES[1] is d/dt b1_AR_d in component b1_AR_module (uM). * RATES[2] is d/dt b1_AR_p in component b1_AR_module (uM). * RATES[3] is d/dt Gs_agtp_tot in component b1_AR_module (uM). * RATES[4] is d/dt Gs_agdp in component b1_AR_module (uM). * RATES[5] is d/dt Gs_bg in component b1_AR_module (uM). * RATES[6] is d/dt cAMP_tot in component cAMP_module (uM). * RATES[7] is d/dt PLB_p in component PLB_module (uM). * RATES[8] is d/dt Inhib1p_tot in component PLB_module (uM). * RATES[9] is d/dt LCCa_p in component LCC_module (uM). * RATES[10] is d/dt LCCb_p in component LCC_module (uM). * RATES[14] is d/dt m in component Fast_Na_Current (dimensionless). * RATES[15] is d/dt h in component Fast_Na_Current (dimensionless). * RATES[16] is d/dt j in component Fast_Na_Current (dimensionless). * RATES[18] is d/dt v in component L_Type_Calcium_Current (dimensionless). * RATES[19] is d/dt w in component L_Type_Calcium_Current (dimensionless). * RATES[20] is d/dt x in component L_Type_Calcium_Current (dimensionless). * RATES[21] is d/dt y in component L_Type_Calcium_Current (dimensionless). * RATES[22] is d/dt z in component L_Type_Calcium_Current (dimensionless). * RATES[23] is d/dt r_to in component Transient_Outward_K_Current (dimensionless). * RATES[24] is d/dt s_to in component Transient_Outward_K_Current (dimensionless). * RATES[25] is d/dt ss_to in component Transient_Outward_K_Current (dimensionless). * RATES[26] is d/dt r_ss in component Steady_State_K_Current (dimensionless). * RATES[27] is d/dt s_ss in component Steady_State_K_Current (dimensionless). * RATES[30] is d/dt Ca_nsr in component Other_SR_Fluxes_and_Concentrations (mM). * RATES[28] is d/dt Ca_jsr in component Other_SR_Fluxes_and_Concentrations (mM). * RATES[11] is d/dt Na_i in component Ion_Concentrations_and_Membrane_Potential (mM). * RATES[12] is d/dt K_i in component Ion_Concentrations_and_Membrane_Potential (mM). * RATES[13] is d/dt Ca_i in component Ion_Concentrations_and_Membrane_Potential (mM). * RATES[17] is d/dt V_m in component Ion_Concentrations_and_Membrane_Potential (mV). * RATES[29] is d/dt trel in component Ion_Concentrations_and_Membrane_Potential (second). * There are a total of 8 condition variables. */ void initConsts(double* CONSTANTS, double* RATES, double *STATES) { CONSTANTS[0] = 1; CONSTANTS[1] = 0.01; CONSTANTS[2] = 0.0132; CONSTANTS[3] = 3.83; CONSTANTS[4] = 0.285; CONSTANTS[5] = 0.062; CONSTANTS[6] = 33; CONSTANTS[7] = 1.1e-3; CONSTANTS[8] = 2.2e-3; CONSTANTS[9] = 3.6e-3; CONSTANTS[10] = 2.2e-3; CONSTANTS[11] = 16; CONSTANTS[12] = 0.8; CONSTANTS[13] = 1.21e3; CONSTANTS[14] = 49.7e-3; CONSTANTS[15] = 5e3; CONSTANTS[16] = 38.9e-3; CONSTANTS[17] = 0; CONSTANTS[18] = 0; CONSTANTS[19] = 0.2; CONSTANTS[20] = 8.5; CONSTANTS[21] = 7.3; CONSTANTS[22] = 5; CONSTANTS[23] = 1.03e3; CONSTANTS[24] = 315; CONSTANTS[25] = 860; CONSTANTS[26] = 1.3; CONSTANTS[27] = 0.4; CONSTANTS[28] = 44; CONSTANTS[29] = 30; CONSTANTS[30] = 0.59; CONSTANTS[31] = 0.025; CONSTANTS[32] = 0.18; CONSTANTS[33] = 9.14; CONSTANTS[34] = 1.64; CONSTANTS[35] = 4.375; CONSTANTS[36] = 0.2e-3; CONSTANTS[37] = 106; CONSTANTS[38] = 0.89; CONSTANTS[39] = 0.3; CONSTANTS[40] = 54; CONSTANTS[41] = 21; CONSTANTS[42] = 8.5; CONSTANTS[43] = 7; CONSTANTS[44] = 60; CONSTANTS[45] = 1; CONSTANTS[46] = 14; CONSTANTS[47] = 1; CONSTANTS[48] = 1e-3; CONSTANTS[49] = 10; CONSTANTS[50] = 25e-3; CONSTANTS[51] = 25e-3; CONSTANTS[52] = 25e-3; CONSTANTS[53] = 54; CONSTANTS[54] = 21; CONSTANTS[55] = 8.52; CONSTANTS[56] = 3; CONSTANTS[57] = 10.1; CONSTANTS[58] = 3; CONSTANTS[59] = 20.8e-6; CONSTANTS[60] = 9.88e-7; CONSTANTS[61] = 9.3e-8; CONSTANTS[62] = 1.534e-4; CONSTANTS[63] = 310; CONSTANTS[64] = 140; CONSTANTS[65] = 5.4; CONSTANTS[66] = 1.8; CONSTANTS[67] = 8; CONSTANTS[68] = 0.35; CONSTANTS[69] = 0.07; CONSTANTS[70] = 0.24; CONSTANTS[71] = 0.008; CONSTANTS[72] = 300; CONSTANTS[73] = 2e3; CONSTANTS[74] = 5187.5; CONSTANTS[75] = 10; CONSTANTS[76] = 1.7469e-8; CONSTANTS[77] = 3.234e-11; CONSTANTS[78] = 3e5; CONSTANTS[79] = -0.458; CONSTANTS[80] = 1483; CONSTANTS[81] = 87.5; CONSTANTS[82] = 1.38; CONSTANTS[83] = 0.1; CONSTANTS[84] = 0.35; CONSTANTS[85] = 1.1; CONSTANTS[86] = 10; CONSTANTS[87] = 1.5; CONSTANTS[88] = 1.15; CONSTANTS[89] = 0.5e-3; CONSTANTS[90] = 2.8e-3; CONSTANTS[91] = 1.18e-3; CONSTANTS[92] = 0; CONSTANTS[93] = 1.2e-3; CONSTANTS[94] = 4.7; CONSTANTS[95] = 3e-4; CONSTANTS[96] = 15; CONSTANTS[97] = 2e-3; CONSTANTS[98] = 2e-3; CONSTANTS[99] = 60e3; CONSTANTS[100] = 0.18e-3; CONSTANTS[101] = 0.8e-3; CONSTANTS[102] = 8.75; CONSTANTS[103] = 15; CONSTANTS[104] = 0.8; CONSTANTS[105] = 5.7e-4; CONSTANTS[106] = 0.07; CONSTANTS[107] = 0.05; CONSTANTS[108] = 0.07; CONSTANTS[109] = 0.5128e-3; CONSTANTS[110] = 2.38e-3; CONSTANTS[111] = 8.44e-4; STATES[0] = 0.01205; STATES[1] = 0; STATES[2] = 1.154e-3; STATES[3] = 0.02505; STATES[4] = 6.446e-4; STATES[5] = 0.02569; STATES[6] = 0.8453; CONSTANTS[112] = 0; CONSTANTS[113] = 0; STATES[7] = 4.105; STATES[8] = 0.0526; STATES[9] = 5.103e-3; STATES[10] = 5.841e-3; CONSTANTS[114] = 8314; CONSTANTS[115] = 96485; CONSTANTS[116] = 1; CONSTANTS[117] = 1; CONSTANTS[118] = 2; STATES[11] = 16; STATES[12] = 145; STATES[13] = 1.58e-4; STATES[14] = 1.4e-3; STATES[15] = 0.99; STATES[16] = 0.99; STATES[17] = -85.66; STATES[18] = 0; STATES[19] = 0; STATES[20] = 0.13; STATES[21] = 0.96; STATES[22] = 0.92; CONSTANTS[119] = 10e5; STATES[23] = 1.4e-3; STATES[24] = 1; STATES[25] = 0.613; STATES[26] = 198e-3; STATES[27] = 0.43; STATES[28] = 1.92; STATES[29] = 0.9; STATES[30] = 1.92; CONSTANTS[120] = -40; CONSTANTS[121] = -10; CONSTANTS[122] = 0.02; CONSTANTS[123] = -1e3; CONSTANTS[124] = 0.961300; CONSTANTS[125] = 0.204100; CONSTANTS[126] = 0.233600; CONSTANTS[127] = - 40.0000; CONSTANTS[128] = (CONSTANTS[115]/CONSTANTS[114])/CONSTANTS[63]; CONSTANTS[129] = 2.10000; CONSTANTS[130] = (exp(CONSTANTS[64]/67.3000) - 1.00000)/7.00000; rootfind_0(VOI, CONSTANTS, RATES, STATES, ALGEBRAIC, pret); STATES[31] = 0.000191562; STATES[32] = 0.0117971; STATES[33] = 6.39347e-06; STATES[34] = 1.31876e-05; STATES[35] = 2.5503e-06; STATES[36] = 0.188856; STATES[37] = 0.988; STATES[38] = 5.5258e-05; STATES[39] = 3.8182; STATES[40] = 0.0588; STATES[41] = 0.227; STATES[42] = 0.0224; STATES[43] = 0; STATES[44] = 0.0471; STATES[45] = 0.00263705; STATES[46] = 0; STATES[47] = 0.0210865; STATES[48] = 0.0078048; STATES[49] = 0; STATES[50] = 0.0289131; STATES[51] = 0.000534718; STATES[52] = 0.00290213; STATES[53] = 0.21597; STATES[54] = 5.83396e-05; STATES[55] = 0.0306208; STATES[56] = 0.116856; STATES[57] = 0.00234908; STATES[58] = 3.91219; STATES[59] = 0.0083; STATES[60] = 2.63217; STATES[61] = 2.63135; STATES[62] = 0.0525373; STATES[63] = 0.699596; STATES[64] = 6.2734e-05; STATES[65] = 0.8375; STATES[66] = 0.00422466; STATES[67] = 0.00406938; RATES[0] = 0.1001; RATES[1] = 0.1001; RATES[2] = 0.1001; RATES[3] = 0.1001; RATES[4] = 0.1001; RATES[5] = 0.1001; RATES[6] = 0.1001; RATES[7] = 0.1001; RATES[8] = 0.1001; RATES[9] = 0.1001; RATES[10] = 0.1001; RATES[14] = 0.1001; RATES[15] = 0.1001; RATES[16] = 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[25] = 0.1001; RATES[26] = 0.1001; RATES[27] = 0.1001; RATES[30] = 0.1001; RATES[28] = 0.1001; RATES[11] = 0.1001; RATES[12] = 0.1001; RATES[13] = 0.1001; RATES[17] = 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] = STATES[31] - ( STATES[37]*STATES[38])/CONSTANTS[4]; resid[1] = STATES[32] - ( STATES[31]*STATES[39])/CONSTANTS[5]; resid[2] = STATES[33] - ( STATES[38]*STATES[39])/CONSTANTS[6]; resid[3] = STATES[34] - CONSTANTS[7]*(STATES[31]+STATES[32]); resid[4] = STATES[35] - CONSTANTS[9]*STATES[40]*STATES[0]; resid[5] = STATES[36] - CONSTANTS[11]*(STATES[33]+STATES[32]); resid[6] = STATES[37] - (CONSTANTS[1] - STATES[31]) - STATES[32]; resid[7] = STATES[38] - ((STATES[0] - STATES[31]) - STATES[32]) - STATES[33]; resid[8] = STATES[39] - (CONSTANTS[3] - STATES[32]) - STATES[33]; resid[9] = RATES[0] - ((ALGEBRAIC[0] - STATES[34])+ALGEBRAIC[1]) - STATES[35]; resid[10] = RATES[1] - STATES[34] - ALGEBRAIC[0]; resid[11] = RATES[2] - STATES[35] - ALGEBRAIC[1]; resid[12] = RATES[3] - STATES[36] - ALGEBRAIC[2]; resid[13] = RATES[4] - ALGEBRAIC[2] - ALGEBRAIC[3]; resid[14] = RATES[5] - STATES[36] - ALGEBRAIC[3]; resid[15] = STATES[45] - ( STATES[42]*STATES[44])/CONSTANTS[27]; resid[16] = STATES[46] - ( STATES[43]*STATES[44])/CONSTANTS[28]; resid[17] = STATES[48] - ( CONSTANTS[19]*STATES[44]*CONSTANTS[15])/(CONSTANTS[23]+CONSTANTS[15]); resid[18] = STATES[47] - ( CONSTANTS[20]*STATES[45]*CONSTANTS[15])/(CONSTANTS[24]+CONSTANTS[15]); resid[19] = STATES[49] - ( CONSTANTS[21]*STATES[46]*CONSTANTS[15])/(CONSTANTS[25]+CONSTANTS[15]); resid[20] = STATES[50] - ( CONSTANTS[22]*CONSTANTS[131]*STATES[41])/(CONSTANTS[26]+STATES[41]); resid[21] = STATES[42] - STATES[3] - STATES[45]; resid[22] = STATES[43] - CONSTANTS[18] - STATES[46]; resid[23] = STATES[44] - CONSTANTS[14] - STATES[45]; resid[24] = RATES[6] - (STATES[48]+STATES[47]+STATES[49]) - STATES[50]; resid[25] = STATES[51] - ( CONSTANTS[32]*CONSTANTS[36])/(CONSTANTS[36]+STATES[40]+STATES[59]); resid[26] = STATES[52] - (STATES[40]/CONSTANTS[35])*STATES[40]*(1.00000+STATES[51]/CONSTANTS[36]); resid[27] = STATES[53] - STATES[40]*(1.00000+STATES[51]/CONSTANTS[36]); resid[28] = STATES[54] - (STATES[59]/CONSTANTS[35])*STATES[59]*(1.00000+STATES[51]/CONSTANTS[36]); resid[29] = STATES[55] - STATES[59]*(1.00000+STATES[51]/CONSTANTS[36]); resid[30] = STATES[56] - (CONSTANTS[33]/STATES[41])*STATES[52]; resid[31] = STATES[57] - (CONSTANTS[33]/STATES[41])*STATES[54]; resid[32] = STATES[58] - ( CONSTANTS[33]*CONSTANTS[34])/CONSTANTS[35]+( CONSTANTS[33]*STATES[41])/CONSTANTS[35]+pow(STATES[41], 2.00000)/CONSTANTS[35]; resid[33] = STATES[41] - (STATES[6] - (STATES[56]+ 2.00000*STATES[52]+ 2.00000*STATES[53])) - (STATES[57]+ 2.00000*STATES[54]+ 2.00000*STATES[55]); resid[34] = CONSTANTS[112] - 2.00000*CONSTANTS[30]*pow(STATES[41], 2.00000) - STATES[40]*(1.00000+STATES[51]/CONSTANTS[36])*( STATES[58]*STATES[40]+pow(STATES[41], 2.00000)); resid[35] = CONSTANTS[113] - 2.00000*CONSTANTS[31]*pow(STATES[41], 2.00000) - STATES[59]*(1.00000+STATES[51]/CONSTANTS[36])*( STATES[58]*STATES[59]+pow(STATES[41], 2.00000)); resid[36] = STATES[60] - ( CONSTANTS[40]*STATES[40]*ALGEBRAIC[4])/(CONSTANTS[41]+ALGEBRAIC[4]); resid[37] = STATES[61] - ( CONSTANTS[42]*STATES[65]*STATES[7])/(CONSTANTS[43]+STATES[7]); resid[38] = STATES[62] - ( STATES[64]*STATES[65])/CONSTANTS[48]; resid[39] = STATES[63] - ( CONSTANTS[44]*STATES[40]*ALGEBRAIC[5])/(CONSTANTS[45]+ALGEBRAIC[5]); resid[40] = RATES[7] - STATES[60] - STATES[61]; resid[41] = RATES[8] - STATES[63] - ALGEBRAIC[6]; resid[42] = STATES[64] - STATES[8] - STATES[62]; resid[43] = STATES[65] - CONSTANTS[38] - STATES[62]; resid[44] = STATES[66] - ( CONSTANTS[49]*CONSTANTS[53]*STATES[59]*ALGEBRAIC[9])/(CONSTANTS[54]+ CONSTANTS[49]*ALGEBRAIC[9]); resid[45] = STATES[67] - ( CONSTANTS[49]*CONSTANTS[53]*STATES[59]*ALGEBRAIC[11])/(CONSTANTS[54]+ CONSTANTS[49]*ALGEBRAIC[11]); resid[46] = RATES[9] - STATES[66] - ALGEBRAIC[10]; resid[47] = RATES[10] - STATES[67] - ALGEBRAIC[12]; resid[48] = RATES[14] - 1000.00*( ALGEBRAIC[18]*(1.00000 - STATES[14]) - ALGEBRAIC[19]*STATES[14]); resid[49] = RATES[15] - 1000.00*( ALGEBRAIC[20]*(1.00000 - STATES[15]) - ALGEBRAIC[22]*STATES[15]); resid[50] = RATES[16] - 1000.00*( ALGEBRAIC[21]*(1.00000 - STATES[16]) - ALGEBRAIC[23]*STATES[16]); resid[51] = RATES[18] - ALGEBRAIC[25]*(1.00000 - STATES[18]) - ALGEBRAIC[26]*STATES[18]; resid[52] = RATES[19] - 2.00000*ALGEBRAIC[25]*(1.00000 - STATES[19]) - (ALGEBRAIC[26]/2.00000)*STATES[19]; resid[53] = RATES[20] - ALGEBRAIC[27]*(1.00000 - STATES[20]) - CONSTANTS[73]*STATES[20]; resid[54] = RATES[21] - (ALGEBRAIC[28] - STATES[21])/ALGEBRAIC[29]; resid[55] = RATES[22] - ALGEBRAIC[32]*(1.00000 - STATES[22]) - ALGEBRAIC[31]*STATES[22]; resid[56] = RATES[23] - (ALGEBRAIC[39] - STATES[23])/ALGEBRAIC[41]; resid[57] = RATES[24] - (ALGEBRAIC[40] - STATES[24])/ALGEBRAIC[42]; resid[58] = RATES[25] - (ALGEBRAIC[40] - STATES[25])/ALGEBRAIC[43]; resid[59] = RATES[26] - (ALGEBRAIC[45] - STATES[26])/ALGEBRAIC[46]; resid[60] = RATES[27] - (ALGEBRAIC[47] - STATES[27])/CONSTANTS[129]; resid[61] = RATES[30] - (ALGEBRAIC[72] - ALGEBRAIC[73]) - ( ALGEBRAIC[74]*CONSTANTS[61])/CONSTANTS[60]; resid[62] = RATES[28] - ALGEBRAIC[75]*(ALGEBRAIC[74] - ALGEBRAIC[70]); resid[63] = RATES[11] - ( CONSTANTS[123]*ALGEBRAIC[63]*CONSTANTS[62])/( CONSTANTS[59]*CONSTANTS[116]*CONSTANTS[115]); resid[64] = RATES[12] - ( CONSTANTS[123]*ALGEBRAIC[64]*CONSTANTS[62])/( CONSTANTS[59]*CONSTANTS[117]*CONSTANTS[115]); resid[65] = RATES[13] - ALGEBRAIC[80]*((( CONSTANTS[123]*ALGEBRAIC[65]*CONSTANTS[62])/( CONSTANTS[59]*CONSTANTS[118]*CONSTANTS[115]) - ( (ALGEBRAIC[72] - ALGEBRAIC[73])*CONSTANTS[60])/CONSTANTS[59])+( ALGEBRAIC[70]*CONSTANTS[61])/CONSTANTS[59]); resid[66] = RATES[17] - - 1000.00*((ALGEBRAIC[65]+ALGEBRAIC[64]+ALGEBRAIC[63]) - ALGEBRAIC[83]); resid[67] = RATES[29] - (CONDVAR[6]>0.00000 ? 1.00000 - 10000.0*STATES[29] : 1.00000); } void computeVariables(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC) { ALGEBRAIC[7] = STATES[7]/CONSTANTS[37]; ALGEBRAIC[38] = ALGEBRAIC[36]+ALGEBRAIC[37]; ALGEBRAIC[76] = 1000.00*(( (STATES[28]+STATES[28]/ALGEBRAIC[75])*CONSTANTS[61])/CONSTANTS[59]+( STATES[30]*CONSTANTS[60])/CONSTANTS[59]); } void computeEssentialVariables(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC) { ALGEBRAIC[0] = CONSTANTS[8]*STATES[1]; ALGEBRAIC[1] = CONSTANTS[10]*STATES[2]; ALGEBRAIC[2] = CONSTANTS[12]*STATES[3]; ALGEBRAIC[3] = CONSTANTS[13]*STATES[4]*STATES[5]; ALGEBRAIC[4] = CONSTANTS[37] - STATES[7]; ALGEBRAIC[5] = CONSTANTS[39] - STATES[8]; ALGEBRAIC[6] = ( CONSTANTS[46]*STATES[8])/(CONSTANTS[47]+STATES[8]); ALGEBRAIC[9] = CONSTANTS[50] - STATES[9]; ALGEBRAIC[10] = ( CONSTANTS[49]*CONSTANTS[57]*CONSTANTS[52]*STATES[9])/(CONSTANTS[58]+ CONSTANTS[49]*STATES[9]); ALGEBRAIC[11] = CONSTANTS[50] - STATES[10]; ALGEBRAIC[12] = ( CONSTANTS[49]*CONSTANTS[55]*CONSTANTS[51]*STATES[10])/(CONSTANTS[56]+ CONSTANTS[49]*STATES[10]); ALGEBRAIC[18] = ( 0.320000*(STATES[17]+47.1300))/(1.00000 - exp( - 0.100000*(STATES[17]+47.1300))); ALGEBRAIC[19] = 0.0800000*exp(- STATES[17]/11.0000); ALGEBRAIC[20] = (CONDVAR[0]>=0.00000 ? 0.00000 : 0.135000*exp((80.0000+STATES[17])/- 6.80000)); ALGEBRAIC[21] = (CONDVAR[1]>=0.00000 ? 0.00000 : ( ( - 127140.*exp( 0.244400*STATES[17]) - 3.47400e-05*exp( - 0.0439100*STATES[17]))*(STATES[17]+37.7800))/(1.00000+exp( 0.311000*(STATES[17]+79.2300)))); ALGEBRAIC[22] = (CONDVAR[2]>=0.00000 ? 1.00000/( 0.130000*(1.00000+exp(- (STATES[17]+10.6600)/11.1000))) : 3.56000*exp( 0.0790000*STATES[17])+ 310000.*exp( 0.350000*STATES[17])); ALGEBRAIC[23] = (CONDVAR[3]>=0.00000 ? ( 0.300000*exp( - 2.57500e-07*STATES[17]))/(1.00000+exp( - 0.100000*(STATES[17]+32.0000))) : ( 0.121200*exp( - 0.0105200*STATES[17]))/(1.00000+exp( - 0.137800*(STATES[17]+40.1400)))); ALGEBRAIC[25] = 400.000*exp((STATES[17]+2.00000)/10.0000); ALGEBRAIC[26] = 50.0000*exp(( - 1.00000*(STATES[17]+2.00000))/13.0000); ALGEBRAIC[13] = STATES[9]/CONSTANTS[50]; ALGEBRAIC[27] = CONSTANTS[72]*(( 0.375000*ALGEBRAIC[13])/CONSTANTS[125]+0.625000); ALGEBRAIC[28] = 1.00000/(1.00000+exp((STATES[17]+55.0000)/7.50000))+0.100000/(1.00000+exp((- STATES[17]+21.0000)/6.00000)); ALGEBRAIC[29] = 0.0200000+0.300000/(1.00000+exp((STATES[17]+30.0000)/9.50000)); ALGEBRAIC[30] = CONSTANTS[74]*STATES[13]; ALGEBRAIC[31] = ALGEBRAIC[30]*(pow(1.00000 - STATES[18], 4.00000)+ 2.00000*STATES[18]*pow(1.00000 - STATES[18], 3.00000)+ 4.00000*pow(STATES[18], 2.00000)*pow(1.00000 - STATES[18], 2.00000)+ 8.00000*pow(STATES[18], 3.00000)*(1.00000 - STATES[18])+ 16.0000*pow(STATES[18], 4.00000)*(1.00000 - ALGEBRAIC[27]/CONSTANTS[73])); ALGEBRAIC[32] = CONSTANTS[75]*(pow(1.00000 - STATES[19], 4.00000)+ 0.500000*STATES[19]*pow(1.00000 - STATES[19], 3.00000)+ 0.250000*pow(STATES[19], 2.00000)*pow(1.00000 - STATES[19], 2.00000)+ 0.125000*pow(STATES[19], 3.00000)*(1.00000 - STATES[19])+ 0.0625000*pow(STATES[19], 4.00000)); ALGEBRAIC[39] = 1.00000/(1.00000+exp((STATES[17]+10.6000)/- 11.4200)); ALGEBRAIC[40] = 1.00000/(1.00000+exp((STATES[17]+43.5000)/6.88410)); ALGEBRAIC[41] = 1.00000/( 45.1600*exp( 0.0357700*(STATES[17]+50.0000))+ 98.9000*exp( - 0.100000*(STATES[17]+38.0000))); ALGEBRAIC[42] = 0.350000*exp( - 1.00000*pow((STATES[17]+70.0000)/15.0000, 2.00000))+0.0350000; ALGEBRAIC[43] = 3.70000*exp( - 1.00000*pow((STATES[17]+70.0000)/30.0000, 2.00000))+0.0350000; ALGEBRAIC[45] = 1.00000/(1.00000+exp((STATES[17]+11.5000)/- 11.8200)); ALGEBRAIC[46] = 10.0000/( 45.1600*exp( 0.0357700*(STATES[17]+50.0000))+ 98.9000*exp( - 0.100000*(STATES[17]+38.0000))); ALGEBRAIC[47] = 1.00000/(1.00000+exp((STATES[17]+87.5000)/10.3000)); ALGEBRAIC[15] = (1.00000/( CONSTANTS[128]*CONSTANTS[116]))*log(CONSTANTS[64]/STATES[11]); ALGEBRAIC[24] = CONSTANTS[67]*pow(STATES[14], 3.00000)*STATES[15]*STATES[16]*(STATES[17] - ALGEBRAIC[15]); ALGEBRAIC[55] = 1.00000*exp( CONSTANTS[84]*STATES[17]*CONSTANTS[128])*pow(STATES[11], 3.00000)*CONSTANTS[66]; ALGEBRAIC[56] = 1.00000*exp( (CONSTANTS[84] - 1.00000)*STATES[17]*CONSTANTS[128])*pow(CONSTANTS[64], 3.00000)*STATES[13]; ALGEBRAIC[57] = (CONSTANTS[80]/( (pow(CONSTANTS[81], 3.00000)+pow(CONSTANTS[64], 3.00000))*(CONSTANTS[82]+CONSTANTS[66])*(1.00000+ CONSTANTS[83]*exp( (CONSTANTS[84] - 1.00000)*STATES[17]*CONSTANTS[128]))))*(ALGEBRAIC[55] - ALGEBRAIC[56]); ALGEBRAIC[58] = 1.00000/(1.00000+ 0.124500*exp( - 0.100000*STATES[17]*CONSTANTS[128])+ 0.0365000*CONSTANTS[130]*exp( - STATES[17]*CONSTANTS[128])); ALGEBRAIC[59] = ( (( CONSTANTS[85]*ALGEBRAIC[58])/(1.00000+pow(CONSTANTS[86]/STATES[11], 1.50000)))*CONSTANTS[65])/(CONSTANTS[65]+CONSTANTS[87]); ALGEBRAIC[62] = CONSTANTS[91]*(STATES[17] - ALGEBRAIC[15]); ALGEBRAIC[63] = ALGEBRAIC[24]+ALGEBRAIC[62]+ 3.00000*ALGEBRAIC[57]+ 3.00000*ALGEBRAIC[59]; ALGEBRAIC[34] = ( CONSTANTS[119]*CONSTANTS[77]*STATES[17]*CONSTANTS[115]*CONSTANTS[128]*( STATES[12]*exp( STATES[17]*CONSTANTS[128]) - CONSTANTS[65]))/(exp( STATES[17]*CONSTANTS[128]) - 1.00000); ALGEBRAIC[14] = STATES[10]/CONSTANTS[50]; ALGEBRAIC[35] = 0.500000*(( 0.400000*ALGEBRAIC[14])/CONSTANTS[126]+0.600000); ALGEBRAIC[33] = ( CONSTANTS[119]*CONSTANTS[76]*4.00000*STATES[17]*CONSTANTS[115]*CONSTANTS[128]*( 0.00100000*exp( 2.00000*STATES[17]*CONSTANTS[128]) - 0.341000*CONSTANTS[66]))/(exp( 2.00000*STATES[17]*CONSTANTS[128]) - 1.00000); ALGEBRAIC[36] = ALGEBRAIC[33]*CONSTANTS[78]*ALGEBRAIC[35]*pow(STATES[18], 4.00000)*STATES[20]*STATES[21]*STATES[22]; ALGEBRAIC[37] = (ALGEBRAIC[34]/(1.00000+ALGEBRAIC[36]/CONSTANTS[79]))*CONSTANTS[78]*ALGEBRAIC[35]*pow(STATES[18], 4.00000)*STATES[20]*STATES[21]*STATES[22]; ALGEBRAIC[16] = (1.00000/( CONSTANTS[128]*CONSTANTS[117]))*log(CONSTANTS[65]/STATES[12]); ALGEBRAIC[44] = CONSTANTS[68]*STATES[23]*( 0.886000*STATES[24]+ 0.114000*STATES[25])*(STATES[17] - ALGEBRAIC[16]); ALGEBRAIC[48] = CONSTANTS[69]*STATES[26]*STATES[27]*(STATES[17] - ALGEBRAIC[16]); ALGEBRAIC[49] = 1.02000/(1.00000+exp( 0.238500*((STATES[17] - ALGEBRAIC[16]) - 59.2150))); ALGEBRAIC[50] = ( 0.491240*exp( 0.0803200*((STATES[17]+5.47600) - ALGEBRAIC[16]))+exp( 0.0617500*((STATES[17] - ALGEBRAIC[16]) - 594.310)))/(1.00000+exp( - 0.514300*((STATES[17] - ALGEBRAIC[16])+4.75300))); ALGEBRAIC[51] = ALGEBRAIC[49]/(ALGEBRAIC[49]+ALGEBRAIC[50]); ALGEBRAIC[52] = CONSTANTS[70]* pow((CONSTANTS[65]/5.40000), 1.0 / 2)*ALGEBRAIC[51]*(STATES[17] - ALGEBRAIC[16]); ALGEBRAIC[53] = 1.00000/(1.00000+exp((7.48800 - STATES[17])/5.98000)); ALGEBRAIC[54] = CONSTANTS[71]*ALGEBRAIC[53]*(STATES[17] - ALGEBRAIC[16]); ALGEBRAIC[64] = ((ALGEBRAIC[44]+ALGEBRAIC[48]+ALGEBRAIC[52]+ALGEBRAIC[54]) - 2.00000*ALGEBRAIC[59])+ALGEBRAIC[37]; ALGEBRAIC[60] = ( CONSTANTS[88]*STATES[13])/(CONSTANTS[89]+STATES[13]); ALGEBRAIC[17] = (1.00000/( CONSTANTS[128]*CONSTANTS[118]))*log(CONSTANTS[66]/STATES[13]); ALGEBRAIC[61] = CONSTANTS[90]*(STATES[17] - ALGEBRAIC[17]); ALGEBRAIC[65] = (ALGEBRAIC[36]+ALGEBRAIC[61]+ALGEBRAIC[60]) - 2.00000*ALGEBRAIC[57]; ALGEBRAIC[66] = STATES[29]+0.00200000; ALGEBRAIC[67] = 1.00000 - exp(- ALGEBRAIC[66]/CONSTANTS[97]); ALGEBRAIC[68] = exp(- ALGEBRAIC[66]/CONSTANTS[98]); ALGEBRAIC[69] = CONSTANTS[99]/( 1.00000*(1.00000+exp((ALGEBRAIC[65]+5.00000)/0.900000))); ALGEBRAIC[70] = ALGEBRAIC[69]*ALGEBRAIC[67]*ALGEBRAIC[68]*(STATES[28] - STATES[13]); ALGEBRAIC[8] = ALGEBRAIC[4]/CONSTANTS[37]; ALGEBRAIC[71] = ( CONSTANTS[95]*(1.00000+ 2.00000*ALGEBRAIC[8]))/(1.00000+ 2.00000*CONSTANTS[124]); ALGEBRAIC[72] = ( CONSTANTS[94]*pow(STATES[13], 2.00000))/(pow(ALGEBRAIC[71], 2.00000)+pow(STATES[13], 2.00000)); ALGEBRAIC[73] = ( CONSTANTS[94]*STATES[30])/CONSTANTS[96]; ALGEBRAIC[74] = (STATES[30] - STATES[28])/CONSTANTS[105]; ALGEBRAIC[75] = 1.00000/(1.00000+( CONSTANTS[103]*CONSTANTS[104])/pow(CONSTANTS[104]+STATES[28], 2.00000)); ALGEBRAIC[77] = ( CONSTANTS[106]*CONSTANTS[109])/pow(CONSTANTS[109]+STATES[13], 2.00000); ALGEBRAIC[78] = ( CONSTANTS[107]*CONSTANTS[110])/pow(CONSTANTS[110]+STATES[13], 2.00000); ALGEBRAIC[79] = ( CONSTANTS[108]*CONSTANTS[111])/pow(CONSTANTS[111]+STATES[13], 2.00000); ALGEBRAIC[80] = 1.00000/(1.00000+ALGEBRAIC[78]+ 2.00000*ALGEBRAIC[77]+ALGEBRAIC[79]); ALGEBRAIC[81] = (CONDVAR[4]>0.00000&&CONDVAR[5]<0.00000 ? CONSTANTS[121] : CONSTANTS[120]); ALGEBRAIC[82] = (CONDVAR[7]>0.00000 ? 10.0000 : 0.00000); ALGEBRAIC[83] = (CONSTANTS[0]==0.00000 ? 0.00000 : CONSTANTS[0]==1.00000 ? ALGEBRAIC[82] : (ALGEBRAIC[81] - STATES[17])/CONSTANTS[122]); } void getStateInformation(double* SI) { SI[31] = 0.0; SI[32] = 0.0; SI[33] = 0.0; SI[34] = 0.0; SI[35] = 0.0; SI[36] = 0.0; SI[37] = 0.0; SI[38] = 0.0; SI[39] = 0.0; 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[40] = 0.0; SI[41] = 0.0; SI[42] = 0.0; SI[43] = 0.0; SI[44] = 0.0; SI[6] = 1.0; SI[45] = 0.0; SI[46] = 0.0; SI[47] = 0.0; SI[48] = 0.0; SI[49] = 0.0; SI[50] = 0.0; SI[51] = 0.0; SI[52] = 0.0; SI[53] = 0.0; SI[54] = 0.0; SI[55] = 0.0; SI[56] = 0.0; SI[57] = 0.0; SI[58] = 0.0; SI[59] = 0.0; SI[60] = 0.0; SI[61] = 0.0; SI[62] = 0.0; SI[63] = 0.0; SI[7] = 1.0; SI[8] = 1.0; SI[64] = 0.0; SI[65] = 0.0; SI[66] = 0.0; SI[67] = 0.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; SI[30] = 1.0; } void computeRoots(double VOI, double* CONSTANTS, double* RATES, double* OLDRATES, double* STATES, double* OLDSTATES, double* ALGEBRAIC, double* CONDVARS) { CONDVAR[0] = STATES[17] - - 40.0000; CONDVAR[1] = STATES[17] - - 40.0000; CONDVAR[2] = STATES[17] - - 40.0000; CONDVAR[3] = STATES[17] - - 40.0000; CONDVAR[4] = VOI - 59.1000; CONDVAR[5] = VOI - 59.5000; CONDVAR[6] = - 1000.00*((ALGEBRAIC[65]+ALGEBRAIC[64]+ALGEBRAIC[63]) - ALGEBRAIC[83]) - 30000.0; CONDVAR[7] = sin( 2.00000* 3.14159265358979*VOI) - 0.999900; } void objfunc_0(double *p, double *hx, int m, int n, void *adata) { struct rootfind_info* rfi = (struct rootfind_info*)adata; #define VOI rfi->aVOI #define CONSTANTS rfi->aCONSTANTS #define RATES rfi->aRATES #define STATES rfi->aSTATES #define ALGEBRAIC rfi->aALGEBRAIC #define pret rfi->aPRET CONSTANTS[131] = p[0]; CONSTANTS[132] = p[1]; CONSTANTS[133] = p[2]; hx[0] = CONSTANTS[133] - ( CONSTANTS[131]*CONSTANTS[132])/CONSTANTS[29]; hx[1] = CONSTANTS[131] - (CONSTANTS[16] - CONSTANTS[133]); hx[2] = CONSTANTS[132] - (CONSTANTS[17] - CONSTANTS[133]); #undef VOI #undef CONSTANTS #undef RATES #undef STATES #undef ALGEBRAIC #undef pret } void rootfind_0(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC, int* pret) { static double p[3] = {0.0389,0,0.1}; double bp[3], work[LM_DIF_WORKSZ(3, 3)]; struct rootfind_info rfi; rfi.aVOI = VOI; rfi.aCONSTANTS = CONSTANTS; rfi.aRATES = RATES; rfi.aSTATES = STATES; rfi.aALGEBRAIC = ALGEBRAIC; rfi.aPRET = pret; do_levmar(objfunc_0, p, bp, work, pret, 3, &rfi); CONSTANTS[131] = p[0]; CONSTANTS[132] = p[1]; CONSTANTS[133] = p[2]; }