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 94 entries in the algebraic variable array.
   There are a total of 35 entries in each of the rate and state variable arrays.
   There are a total of 80 entries in the constant variable array.
 */
/*
 * VOI is time in component environment (second).
 * STATES[0] is V in component membrane (millivolt).
 * CONSTANTS[0] is R in component membrane (joule_per_kilomole_kelvin).
 * CONSTANTS[1] is T in component membrane (kelvin).
 * CONSTANTS[2] is F in component membrane (coulomb_per_mole).
 * CONSTANTS[3] is Cm in component membrane (microF).
 * ALGEBRAIC[11] is I_st in component membrane (microA_per_microF).
 * ALGEBRAIC[30] is i_Na in component fast_sodium_current (microA_per_microF).
 * ALGEBRAIC[53] is i_Ca_L in component L_type_Ca_channel (microA_per_microF).
 * ALGEBRAIC[78] is i_Ca_T in component T_type_Ca_channel (microA_per_microF).
 * ALGEBRAIC[57] is i_Kr in component rapid_delayed_rectifier_potassium_current (microA_per_microF).
 * ALGEBRAIC[61] is i_Ks in component slow_delayed_rectifier_potassium_current (microA_per_microF).
 * ALGEBRAIC[71] is i_K_Na in component sodium_activated_potassium_current (microA_per_microF).
 * ALGEBRAIC[72] is i_K_ATP in component ATP_sensitive_potassium_current (microA_per_microF).
 * ALGEBRAIC[74] is i_to in component transient_outward_current (microA_per_microF).
 * ALGEBRAIC[87] is i_NaCa in component Na_Ca_exchanger (microA_per_microF).
 * ALGEBRAIC[66] is i_K1 in component time_independent_potassium_current (microA_per_microF).
 * ALGEBRAIC[68] is i_Kp in component plateau_potassium_current (microA_per_microF).
 * ALGEBRAIC[75] is i_p_Ca in component sarcolemmal_calcium_pump (microA_per_microF).
 * ALGEBRAIC[76] is i_Na_b in component sodium_background_current (microA_per_microF).
 * ALGEBRAIC[79] is i_Ca_b in component calcium_background_current (microA_per_microF).
 * ALGEBRAIC[81] is i_NaK in component sodium_potassium_pump (microA_per_microF).
 * ALGEBRAIC[86] is i_ns_Ca in component non_specific_calcium_activated_current (microA_per_microF).
 * ALGEBRAIC[88] is dVdt in component membrane (dimensionless).
 * CONSTANTS[4] is stim_start in component membrane (second).
 * CONSTANTS[5] is stim_end in component membrane (second).
 * CONSTANTS[6] is stim_period in component membrane (dimensionless).
 * CONSTANTS[7] is stim_duration in component membrane (second).
 * CONSTANTS[8] is stim_amplitude in component membrane (microA_per_microF).
 * ALGEBRAIC[23] is E_Na in component fast_sodium_current (millivolt).
 * CONSTANTS[9] is g_Na in component fast_sodium_current (milliS_per_microF).
 * CONSTANTS[10] is Nao in component ionic_concentrations (millimolar).
 * STATES[1] is Nai in component ionic_concentrations (millimolar).
 * STATES[2] is P_O_Na in component Na_channel_states (dimensionless).
 * STATES[3] is P_C1 in component Na_channel_states (dimensionless).
 * STATES[4] is P_C2 in component Na_channel_states (dimensionless).
 * STATES[5] is P_C3 in component Na_channel_states (dimensionless).
 * STATES[6] is P_IF in component Na_channel_states (dimensionless).
 * STATES[7] is P_IC3 in component Na_channel_states (dimensionless).
 * STATES[8] is P_IC2 in component Na_channel_states (dimensionless).
 * STATES[9] is P_IM1 in component Na_channel_states (dimensionless).
 * STATES[10] is P_IM2 in component Na_channel_states (dimensionless).
 * ALGEBRAIC[0] is alpha_11 in component Na_channel_states (per_second).
 * ALGEBRAIC[31] is beta_11 in component Na_channel_states (per_second).
 * ALGEBRAIC[12] is alpha_12 in component Na_channel_states (per_second).
 * ALGEBRAIC[38] is beta_12 in component Na_channel_states (per_second).
 * ALGEBRAIC[24] is alpha_13 in component Na_channel_states (per_second).
 * ALGEBRAIC[42] is beta_13 in component Na_channel_states (per_second).
 * ALGEBRAIC[44] is alpha_2 in component Na_channel_states (per_second).
 * ALGEBRAIC[50] is beta_2 in component Na_channel_states (per_second).
 * ALGEBRAIC[46] is alpha_3 in component Na_channel_states (per_second).
 * ALGEBRAIC[48] is beta_3 in component Na_channel_states (per_second).
 * ALGEBRAIC[52] is alpha_4 in component Na_channel_states (per_second).
 * ALGEBRAIC[54] is beta_4 in component Na_channel_states (per_second).
 * ALGEBRAIC[56] is alpha_5 in component Na_channel_states (per_second).
 * ALGEBRAIC[58] is beta_5 in component Na_channel_states (per_second).
 * ALGEBRAIC[47] is i_CaCa in component L_type_Ca_channel (microA_per_microF).
 * ALGEBRAIC[51] is i_CaK in component L_type_Ca_channel (microA_per_microF).
 * ALGEBRAIC[49] is i_CaNa in component L_type_Ca_channel (microA_per_microF).
 * CONSTANTS[11] is gamma_Nai in component L_type_Ca_channel (dimensionless).
 * CONSTANTS[12] is gamma_Nao in component L_type_Ca_channel (dimensionless).
 * CONSTANTS[13] is gamma_Ki in component L_type_Ca_channel (dimensionless).
 * CONSTANTS[14] is gamma_Ko in component L_type_Ca_channel (dimensionless).
 * ALGEBRAIC[37] is I_CaCa in component L_type_Ca_channel (microA_per_microF).
 * ALGEBRAIC[43] is I_CaK in component L_type_Ca_channel (microA_per_microF).
 * ALGEBRAIC[41] is I_CaNa in component L_type_Ca_channel (microA_per_microF).
 * CONSTANTS[15] is P_Ca in component L_type_Ca_channel (cm_per_second).
 * CONSTANTS[16] is P_Na in component L_type_Ca_channel (cm_per_second).
 * CONSTANTS[17] is P_K in component L_type_Ca_channel (cm_per_second).
 * CONSTANTS[18] is gamma_Cai in component L_type_Ca_channel (dimensionless).
 * CONSTANTS[19] is gamma_Cao in component L_type_Ca_channel (dimensionless).
 * STATES[11] is Cai in component calcium_dynamics (millimolar).
 * CONSTANTS[20] is Cao in component calcium_dynamics (millimolar).
 * CONSTANTS[21] is Ko in component ionic_concentrations (millimolar).
 * STATES[12] is Ki in component ionic_concentrations (millimolar).
 * STATES[13] is d in component L_type_Ca_channel_d_gate (dimensionless).
 * STATES[14] is f in component L_type_Ca_channel_f_gate (dimensionless).
 * ALGEBRAIC[45] is f_Ca in component L_type_Ca_channel_f_Ca_gate (dimensionless).
 * ALGEBRAIC[32] is alpha_d in component L_type_Ca_channel_d_gate (per_second).
 * ALGEBRAIC[39] is beta_d in component L_type_Ca_channel_d_gate (per_second).
 * ALGEBRAIC[13] is d_infinity in component L_type_Ca_channel_d_gate (dimensionless).
 * ALGEBRAIC[25] is tau_d in component L_type_Ca_channel_d_gate (second).
 * ALGEBRAIC[1] is E0_d in component L_type_Ca_channel_d_gate (millivolt).
 * ALGEBRAIC[26] is alpha_f in component L_type_Ca_channel_f_gate (per_second).
 * ALGEBRAIC[33] is beta_f in component L_type_Ca_channel_f_gate (per_second).
 * ALGEBRAIC[2] is f_infinity in component L_type_Ca_channel_f_gate (dimensionless).
 * ALGEBRAIC[14] is tau_f in component L_type_Ca_channel_f_gate (second).
 * CONSTANTS[22] is Km_Ca in component L_type_Ca_channel_f_Ca_gate (millimolar).
 * CONSTANTS[23] is g_CaT in component T_type_Ca_channel (milliS_per_microF).
 * ALGEBRAIC[77] is E_Ca in component calcium_background_current (millivolt).
 * STATES[15] is b in component T_type_Ca_channel_b_gate (dimensionless).
 * STATES[16] is g in component T_type_Ca_channel_g_gate (dimensionless).
 * ALGEBRAIC[3] is b_inf in component T_type_Ca_channel_b_gate (dimensionless).
 * ALGEBRAIC[15] is tau_b in component T_type_Ca_channel_b_gate (second).
 * ALGEBRAIC[4] is g_inf in component T_type_Ca_channel_g_gate (dimensionless).
 * ALGEBRAIC[16] is tau_g in component T_type_Ca_channel_g_gate (second).
 * CONSTANTS[66] is g_Kr in component rapid_delayed_rectifier_potassium_current (milliS_per_microF).
 * ALGEBRAIC[55] is E_Kr in component rapid_delayed_rectifier_potassium_current (millivolt).
 * STATES[17] is P_O in component Kr_channel_states (dimensionless).
 * STATES[18] is P_C1 in component Kr_channel_states (dimensionless).
 * STATES[19] is P_C2 in component Kr_channel_states (dimensionless).
 * STATES[20] is P_C3 in component Kr_channel_states (dimensionless).
 * STATES[21] is P_I in component Kr_channel_states (dimensionless).
 * ALGEBRAIC[5] is alpha in component Kr_channel_states (per_second).
 * ALGEBRAIC[17] is beta in component Kr_channel_states (per_second).
 * CONSTANTS[24] is alpha_in in component Kr_channel_states (per_second).
 * CONSTANTS[25] is beta_in in component Kr_channel_states (per_second).
 * ALGEBRAIC[6] is alpha_alpha in component Kr_channel_states (per_second).
 * ALGEBRAIC[18] is beta_beta in component Kr_channel_states (per_second).
 * ALGEBRAIC[27] is alpha_i in component Kr_channel_states (per_second).
 * ALGEBRAIC[34] is beta_i in component Kr_channel_states (per_second).
 * ALGEBRAIC[40] is mu in component Kr_channel_states (per_second).
 * ALGEBRAIC[60] is g_Ks in component slow_delayed_rectifier_potassium_current (milliS_per_microF).
 * ALGEBRAIC[59] is E_Ks in component slow_delayed_rectifier_potassium_current (millivolt).
 * CONSTANTS[26] is PNaK in component slow_delayed_rectifier_potassium_current (dimensionless).
 * STATES[22] is xs1 in component slow_delayed_rectifier_potassium_current_xs1_gate (dimensionless).
 * STATES[23] is xs2 in component slow_delayed_rectifier_potassium_current_xs2_gate (dimensionless).
 * ALGEBRAIC[7] is xs1_infinity in component slow_delayed_rectifier_potassium_current_xs1_gate (dimensionless).
 * ALGEBRAIC[19] is tau_xs1 in component slow_delayed_rectifier_potassium_current_xs1_gate (second).
 * ALGEBRAIC[8] is xs2_infinity in component slow_delayed_rectifier_potassium_current_xs2_gate (dimensionless).
 * ALGEBRAIC[20] is tau_xs2 in component slow_delayed_rectifier_potassium_current_xs2_gate (second).
 * ALGEBRAIC[62] is E_K in component time_independent_potassium_current (millivolt).
 * CONSTANTS[67] is g_K1 in component time_independent_potassium_current (milliS_per_cm2).
 * ALGEBRAIC[65] is K1_infinity in component time_independent_potassium_current_K1_gate (dimensionless).
 * ALGEBRAIC[63] is alpha_K1 in component time_independent_potassium_current_K1_gate (per_second).
 * ALGEBRAIC[64] is beta_K1 in component time_independent_potassium_current_K1_gate (per_second).
 * CONSTANTS[27] is g_Kp in component plateau_potassium_current (milliS_per_microF).
 * ALGEBRAIC[67] is Kp in component plateau_potassium_current (dimensionless).
 * CONSTANTS[68] is g_K_Na in component sodium_activated_potassium_current (milliS_per_microF).
 * CONSTANTS[28] is nKNa in component sodium_activated_potassium_current (dimensionless).
 * ALGEBRAIC[69] is pona in component sodium_activated_potassium_current (dimensionless).
 * ALGEBRAIC[70] is pov in component sodium_activated_potassium_current (dimensionless).
 * CONSTANTS[29] is kdKNa in component sodium_activated_potassium_current (millimolar).
 * CONSTANTS[69] is g_K_ATP in component ATP_sensitive_potassium_current (milliS_per_microF).
 * CONSTANTS[30] is i_K_ATP_on in component ATP_sensitive_potassium_current (dimensionless).
 * CONSTANTS[31] is nATP in component ATP_sensitive_potassium_current (dimensionless).
 * CONSTANTS[32] is nicholsarea in component ATP_sensitive_potassium_current (dimensionless).
 * CONSTANTS[33] is ATPi in component ATP_sensitive_potassium_current (millimolar).
 * CONSTANTS[34] is hATP in component ATP_sensitive_potassium_current (dimensionless).
 * CONSTANTS[35] is kATP in component ATP_sensitive_potassium_current (millimolar).
 * CONSTANTS[75] is pATP in component ATP_sensitive_potassium_current (dimensionless).
 * CONSTANTS[77] is GKbaraATP in component ATP_sensitive_potassium_current (milliS_per_microF).
 * CONSTANTS[70] is g_to in component transient_outward_current (milliS_per_microF).
 * ALGEBRAIC[73] is rvdv in component transient_outward_current (dimensionless).
 * STATES[24] is zdv in component transient_outward_current_zdv_gate (dimensionless).
 * STATES[25] is ydv in component transient_outward_current_ydv_gate (dimensionless).
 * ALGEBRAIC[9] is alpha_zdv in component transient_outward_current_zdv_gate (per_second).
 * ALGEBRAIC[21] is beta_zdv in component transient_outward_current_zdv_gate (per_second).
 * ALGEBRAIC[28] is tau_zdv in component transient_outward_current_zdv_gate (second).
 * ALGEBRAIC[35] is zdv_ss in component transient_outward_current_zdv_gate (dimensionless).
 * ALGEBRAIC[10] is alpha_ydv in component transient_outward_current_ydv_gate (per_second).
 * ALGEBRAIC[22] is beta_ydv in component transient_outward_current_ydv_gate (per_second).
 * ALGEBRAIC[29] is tau_ydv in component transient_outward_current_ydv_gate (second).
 * ALGEBRAIC[36] is ydv_ss in component transient_outward_current_ydv_gate (dimensionless).
 * CONSTANTS[36] is K_mpCa in component sarcolemmal_calcium_pump (millimolar).
 * CONSTANTS[37] is I_pCa in component sarcolemmal_calcium_pump (microA_per_microF).
 * CONSTANTS[38] is g_Nab in component sodium_background_current (milliS_per_microF).
 * CONSTANTS[39] is g_Cab in component calcium_background_current (milliS_per_microF).
 * CONSTANTS[40] is I_NaK in component sodium_potassium_pump (microA_per_microF).
 * ALGEBRAIC[80] is f_NaK in component sodium_potassium_pump (dimensionless).
 * CONSTANTS[41] is K_mNai in component sodium_potassium_pump (millimolar).
 * CONSTANTS[42] is K_mKo in component sodium_potassium_pump (millimolar).
 * CONSTANTS[71] is sigma in component sodium_potassium_pump (dimensionless).
 * ALGEBRAIC[84] is i_ns_Na in component non_specific_calcium_activated_current (microA_per_microF).
 * ALGEBRAIC[85] is i_ns_K in component non_specific_calcium_activated_current (microA_per_microF).
 * CONSTANTS[72] is P_ns_Ca in component non_specific_calcium_activated_current (cm_per_second).
 * ALGEBRAIC[82] is I_ns_Na in component non_specific_calcium_activated_current (microA_per_microF).
 * ALGEBRAIC[83] is I_ns_K in component non_specific_calcium_activated_current (microA_per_microF).
 * CONSTANTS[43] is K_m_ns_Ca in component non_specific_calcium_activated_current (millimolar).
 * CONSTANTS[44] is c1 in component Na_Ca_exchanger (microA_per_microF).
 * CONSTANTS[45] is c2 in component Na_Ca_exchanger (millimolar).
 * CONSTANTS[46] is gamma in component Na_Ca_exchanger (dimensionless).
 * ALGEBRAIC[90] is i_rel in component calcium_dynamics (millimolar_per_second).
 * ALGEBRAIC[91] is i_up in component calcium_dynamics (millimolar_per_second).
 * ALGEBRAIC[92] is i_leak in component calcium_dynamics (millimolar_per_second).
 * ALGEBRAIC[93] is i_tr in component calcium_dynamics (millimolar_per_second).
 * ALGEBRAIC[89] is G_rel in component calcium_dynamics (per_second).
 * CONSTANTS[47] is G_rel_max in component calcium_dynamics (per_second).
 * CONSTANTS[48] is G_rel_overload in component calcium_dynamics (per_second).
 * CONSTANTS[49] is tau_tr in component calcium_dynamics (second).
 * CONSTANTS[50] is K_mrel in component calcium_dynamics (millimolar).
 * CONSTANTS[51] is delta_Ca_ith in component calcium_dynamics (millimolar).
 * CONSTANTS[52] is CSQN_max in component calcium_dynamics (millimolar).
 * CONSTANTS[53] is K_mCSQN in component calcium_dynamics (millimolar).
 * CONSTANTS[54] is K_mup in component calcium_dynamics (millimolar).
 * CONSTANTS[73] is K_leak in component calcium_dynamics (per_second).
 * CONSTANTS[55] is I_up in component calcium_dynamics (millimolar_per_second).
 * CONSTANTS[56] is Ca_NSR_max in component calcium_dynamics (millimolar).
 * STATES[26] is Ca_JSR in component calcium_dynamics (millimolar).
 * STATES[27] is Ca_NSR in component calcium_dynamics (millimolar).
 * CONSTANTS[76] is V_myo in component ionic_concentrations (micro_litre).
 * CONSTANTS[57] is A_cap in component ionic_concentrations (mm2).
 * CONSTANTS[78] is V_JSR in component calcium_dynamics (micro_litre).
 * CONSTANTS[79] is V_NSR in component calcium_dynamics (micro_litre).
 * CONSTANTS[58] is K_mTn in component calcium_dynamics (millimolar).
 * CONSTANTS[59] is K_mCMDN in component calcium_dynamics (millimolar).
 * CONSTANTS[60] is Tn_max in component calcium_dynamics (millimolar).
 * CONSTANTS[61] is CMDN_max in component calcium_dynamics (millimolar).
 * STATES[28] is APtrack in component calcium_dynamics (dimensionless).
 * STATES[29] is APtrack2 in component calcium_dynamics (dimensionless).
 * STATES[30] is APtrack3 in component calcium_dynamics (dimensionless).
 * STATES[31] is Cainfluxtrack in component calcium_dynamics (dimensionless).
 * STATES[32] is OVRLDtrack in component calcium_dynamics (dimensionless).
 * STATES[33] is OVRLDtrack2 in component calcium_dynamics (dimensionless).
 * STATES[34] is OVRLDtrack3 in component calcium_dynamics (dimensionless).
 * CONSTANTS[62] is CSQNthresh in component calcium_dynamics (millimolar).
 * CONSTANTS[63] is Logicthresh in component calcium_dynamics (dimensionless).
 * CONSTANTS[64] is preplength in component ionic_concentrations (mm).
 * CONSTANTS[65] is radius in component ionic_concentrations (mm).
 * CONSTANTS[74] is volume in component ionic_concentrations (micro_litre).
 * RATES[0] is d/dt V in component membrane (millivolt).
 * RATES[5] is d/dt P_C3 in component Na_channel_states (dimensionless).
 * RATES[4] is d/dt P_C2 in component Na_channel_states (dimensionless).
 * RATES[3] is d/dt P_C1 in component Na_channel_states (dimensionless).
 * RATES[2] is d/dt P_O_Na in component Na_channel_states (dimensionless).
 * RATES[6] is d/dt P_IF in component Na_channel_states (dimensionless).
 * RATES[7] is d/dt P_IC3 in component Na_channel_states (dimensionless).
 * RATES[8] is d/dt P_IC2 in component Na_channel_states (dimensionless).
 * RATES[9] is d/dt P_IM1 in component Na_channel_states (dimensionless).
 * RATES[10] is d/dt P_IM2 in component Na_channel_states (dimensionless).
 * RATES[13] is d/dt d in component L_type_Ca_channel_d_gate (dimensionless).
 * RATES[14] is d/dt f in component L_type_Ca_channel_f_gate (dimensionless).
 * RATES[15] is d/dt b in component T_type_Ca_channel_b_gate (dimensionless).
 * RATES[16] is d/dt g in component T_type_Ca_channel_g_gate (dimensionless).
 * RATES[20] is d/dt P_C3 in component Kr_channel_states (dimensionless).
 * RATES[19] is d/dt P_C2 in component Kr_channel_states (dimensionless).
 * RATES[18] is d/dt P_C1 in component Kr_channel_states (dimensionless).
 * RATES[17] is d/dt P_O in component Kr_channel_states (dimensionless).
 * RATES[21] is d/dt P_I in component Kr_channel_states (dimensionless).
 * RATES[22] is d/dt xs1 in component slow_delayed_rectifier_potassium_current_xs1_gate (dimensionless).
 * RATES[23] is d/dt xs2 in component slow_delayed_rectifier_potassium_current_xs2_gate (dimensionless).
 * RATES[24] is d/dt zdv in component transient_outward_current_zdv_gate (dimensionless).
 * RATES[25] is d/dt ydv in component transient_outward_current_ydv_gate (dimensionless).
 * RATES[28] is d/dt APtrack in component calcium_dynamics (dimensionless).
 * RATES[29] is d/dt APtrack2 in component calcium_dynamics (dimensionless).
 * RATES[30] is d/dt APtrack3 in component calcium_dynamics (dimensionless).
 * RATES[31] is d/dt Cainfluxtrack in component calcium_dynamics (dimensionless).
 * RATES[32] is d/dt OVRLDtrack in component calcium_dynamics (dimensionless).
 * RATES[33] is d/dt OVRLDtrack2 in component calcium_dynamics (dimensionless).
 * RATES[34] is d/dt OVRLDtrack3 in component calcium_dynamics (dimensionless).
 * RATES[26] is d/dt Ca_JSR in component calcium_dynamics (millimolar).
 * RATES[27] is d/dt Ca_NSR in component calcium_dynamics (millimolar).
 * RATES[11] is d/dt Cai in component calcium_dynamics (millimolar).
 * RATES[1] is d/dt Nai in component ionic_concentrations (millimolar).
 * RATES[12] is d/dt Ki in component ionic_concentrations (millimolar).
 */
void
initConsts(double* CONSTANTS, double* RATES, double *STATES)
{
STATES[0] = -88.998;
CONSTANTS[0] = 8314;
CONSTANTS[1] = 310;
CONSTANTS[2] = 96485;
CONSTANTS[3] = 0.001;
CONSTANTS[4] = 3;
CONSTANTS[5] = 9;
CONSTANTS[6] = 1;
CONSTANTS[7] = 0.002;
CONSTANTS[8] = -50;
CONSTANTS[9] = 23.5;
CONSTANTS[10] = 132;
STATES[1] = 11.544;
STATES[2] = 3.491e-13;
STATES[3] = 4.539e-10;
STATES[4] = 9.592e-8;
STATES[5] = 7.617e-6;
STATES[6] = 7.571e-11;
STATES[7] = 1.271e-6;
STATES[8] = 1.6e-8;
STATES[9] = 8.73e-12;
STATES[10] = 5.326e-14;
CONSTANTS[11] = 0.75;
CONSTANTS[12] = 0.75;
CONSTANTS[13] = 0.75;
CONSTANTS[14] = 0.75;
CONSTANTS[15] = 0.00054;
CONSTANTS[16] = 6.75e-7;
CONSTANTS[17] = 1.93e-7;
CONSTANTS[18] = 1;
CONSTANTS[19] = 0.341;
STATES[11] = 0.000114;
CONSTANTS[20] = 1.8;
CONSTANTS[21] = 4.5;
STATES[12] = 140.275;
STATES[13] = 3.176e-6;
STATES[14] = 0.9998;
CONSTANTS[22] = 0.0006;
CONSTANTS[23] = 0.05;
STATES[15] = 0.000963;
STATES[16] = 0.9944;
STATES[17] = 1.064e-10;
STATES[18] = 3.341e-8;
STATES[19] = 1.657e-8;
STATES[20] = 4.95e-6;
STATES[21] = 3.246e-11;
CONSTANTS[24] = 2172;
CONSTANTS[25] = 1077;
CONSTANTS[26] = 0.01833;
STATES[22] = 0.00441;
STATES[23] = 0.00441;
CONSTANTS[27] = 0.00552;
CONSTANTS[28] = 2.8;
CONSTANTS[29] = 66;
CONSTANTS[30] = 1;
CONSTANTS[31] = 0.24;
CONSTANTS[32] = 5e-5;
CONSTANTS[33] = 3;
CONSTANTS[34] = 2;
CONSTANTS[35] = 0.00025;
STATES[24] = 0.01152;
STATES[25] = 0.99998;
CONSTANTS[36] = 0.0005;
CONSTANTS[37] = 1.15;
CONSTANTS[38] = 0.004;
CONSTANTS[39] = 0.003016;
CONSTANTS[40] = 2.25;
CONSTANTS[41] = 10;
CONSTANTS[42] = 1.5;
CONSTANTS[43] = 0.0012;
CONSTANTS[44] = 0.00025;
CONSTANTS[45] = 0.0001;
CONSTANTS[46] = 0.15;
CONSTANTS[47] = 60000;
CONSTANTS[48] = 4000;
CONSTANTS[49] = 0.18;
CONSTANTS[50] = 0.0008;
CONSTANTS[51] = 0.00018;
CONSTANTS[52] = 10;
CONSTANTS[53] = 0.8;
CONSTANTS[54] = 0.00092;
CONSTANTS[55] = 8.75;
CONSTANTS[56] = 15;
STATES[26] = 1.643;
STATES[27] = 1.645;
CONSTANTS[57] = 1.434e-7;
CONSTANTS[58] = 0.0005;
CONSTANTS[59] = 0.00238;
CONSTANTS[60] = 0.07;
CONSTANTS[61] = 0.05;
STATES[28] = 0;
STATES[29] = 0;
STATES[30] = 0;
STATES[31] = 0;
STATES[32] = 0;
STATES[33] = 0;
STATES[34] = 0;
CONSTANTS[62] = 0.7;
CONSTANTS[63] = 0.98;
CONSTANTS[64] = 0.001;
CONSTANTS[65] = 1.1e-4;
CONSTANTS[66] =  0.0135000*pow(CONSTANTS[21], 0.590000);
CONSTANTS[67] =  0.750000* pow((CONSTANTS[21]/5.40000), 1.0 / 2);
CONSTANTS[68] =  0.00000*0.128480;
CONSTANTS[69] = ( CONSTANTS[30]*0.000193000)/CONSTANTS[32];
CONSTANTS[70] = 0.500000;
CONSTANTS[71] =  (1.00000/7.00000)*(exp(CONSTANTS[10]/67.3000) - 1.00000);
CONSTANTS[72] =  0.00000*1.75000e-07;
CONSTANTS[73] = CONSTANTS[55]/CONSTANTS[56];
CONSTANTS[74] =   3.14159265358979*CONSTANTS[64]*pow(CONSTANTS[65], 2.00000);
CONSTANTS[75] = 1.00000/(1.00000+pow(CONSTANTS[33]/CONSTANTS[35], CONSTANTS[34]));
CONSTANTS[76] =  0.680000*CONSTANTS[74];
CONSTANTS[77] =  CONSTANTS[69]*CONSTANTS[75]*pow(CONSTANTS[21]/4.00000, CONSTANTS[31]);
CONSTANTS[78] =  (0.00480000/0.680000)*CONSTANTS[76];
CONSTANTS[79] =  (0.0552000/0.680000)*CONSTANTS[76];
}
void
computeRates(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC)
{
RATES[29] = (STATES[28]<0.200000&&STATES[28]>0.180000 ?  100000.*(1.00000 - STATES[29]) -  500.000*STATES[29] :  - 500.000*STATES[29]);
RATES[30] = (STATES[28]<0.200000&&STATES[28]>0.180000 ?  100000.*(1.00000 - STATES[30]) -  500.000*STATES[30] :  - 10.0000*STATES[30]);
RATES[32] = (1.00000/(1.00000+CONSTANTS[53]/STATES[27])>CONSTANTS[62]&&STATES[34]<0.370000&&STATES[30]<0.370000 ?  50000.0*(1.00000 - STATES[32]) :  - 500.000*STATES[32]);
RATES[33] = (STATES[32]>CONSTANTS[63]&&STATES[33]<CONSTANTS[63] ?  50000.0*(1.00000 - STATES[33]) :  - 500.000*STATES[33]);
RATES[34] = (STATES[32]>CONSTANTS[63]&&STATES[34]<CONSTANTS[63] ?  50000.0*(1.00000 - STATES[34]) :  - 10.0000*STATES[34]);
ALGEBRAIC[3] = 1.00000/(1.00000+exp(- (STATES[0]+14.0000)/10.8000));
ALGEBRAIC[15] = 0.00370000+0.00610000/(1.00000+exp((STATES[0]+25.0000)/4.50000));
RATES[15] = (ALGEBRAIC[3] - STATES[15])/ALGEBRAIC[15];
ALGEBRAIC[4] = 1.00000/(1.00000+exp((STATES[0]+60.0000)/5.60000));
ALGEBRAIC[16] = (STATES[0]<=0.00000 ?  - 0.000875000*STATES[0]+0.0120000 : 0.0120000);
RATES[16] = (ALGEBRAIC[4] - STATES[16])/ALGEBRAIC[16];
ALGEBRAIC[5] =  55.5000*exp( 0.0554715*(STATES[0] - 12.0000));
ALGEBRAIC[17] =  2.35700*exp( - 0.0365880*STATES[0]);
RATES[20] =  ALGEBRAIC[17]*STATES[19] -  ALGEBRAIC[5]*STATES[20];
RATES[19] =  - (ALGEBRAIC[17]+CONSTANTS[24])*STATES[19]+ ALGEBRAIC[5]*STATES[20]+ CONSTANTS[25]*STATES[18];
ALGEBRAIC[7] = 1.00000/(1.00000+exp(- (STATES[0] - 1.50000)/16.7000));
ALGEBRAIC[19] = 0.00100000/(( 7.19000e-05*(STATES[0]+30.0000))/(1.00000 - exp( - 0.148000*(STATES[0]+30.0000)))+( 0.000131000*(STATES[0]+30.0000))/(exp( 0.0687000*(STATES[0]+30.0000)) - 1.00000));
RATES[22] = (ALGEBRAIC[7] - STATES[22])/ALGEBRAIC[19];
ALGEBRAIC[8] = 1.00000/(1.00000+exp(- (STATES[0] - 1.50000)/16.7000));
ALGEBRAIC[20] = ( 4.00000*0.00100000)/(( 7.19000e-05*(STATES[0]+30.0000))/(1.00000 - exp( - 0.148000*(STATES[0]+30.0000)))+( 0.000131000*(STATES[0]+30.0000))/(exp( 0.0687000*(STATES[0]+30.0000)) - 1.00000));
RATES[23] = (ALGEBRAIC[8] - STATES[23])/ALGEBRAIC[20];
ALGEBRAIC[2] = 1.00000/(1.00000+exp((STATES[0]+32.0000)/8.00000))+0.600000/(1.00000+exp((50.0000 - STATES[0])/20.0000));
ALGEBRAIC[14] = 0.00100000/( 0.0197000*exp(- pow( 0.0337000*(STATES[0]+10.0000), 2.00000))+0.0200000);
ALGEBRAIC[26] = ALGEBRAIC[2]/ALGEBRAIC[14];
ALGEBRAIC[33] = (1.00000 - ALGEBRAIC[2])/ALGEBRAIC[14];
RATES[14] =  ALGEBRAIC[26]*(1.00000 - STATES[14]) -  ALGEBRAIC[33]*STATES[14];
ALGEBRAIC[6] =  65.5000*exp( 0.0554715*(STATES[0] - 36.0000));
ALGEBRAIC[18] =  2.93570*exp( - 0.0215800*STATES[0]);
ALGEBRAIC[27] = ( 439.000*exp( - 0.0235200*(STATES[0]+25.0000))*4.50000)/CONSTANTS[21];
ALGEBRAIC[34] = ( 656.000*exp( 0.000942000*STATES[0])*pow(4.50000, 0.300000))/pow(CONSTANTS[21], 0.300000);
RATES[17] =  - (ALGEBRAIC[18]+ALGEBRAIC[34])*STATES[17]+ ALGEBRAIC[6]*STATES[18]+ ALGEBRAIC[27]*STATES[21];
ALGEBRAIC[9] = ( 10000.0*exp((STATES[0] - 40.0000)/25.0000))/(1.00000+exp((STATES[0] - 40.0000)/25.0000));
ALGEBRAIC[21] = ( 10000.0*exp(- (STATES[0]+90.0000)/25.0000))/(1.00000+exp(- (STATES[0]+90.0000)/25.0000));
ALGEBRAIC[28] = 1.00000/(ALGEBRAIC[9]+ALGEBRAIC[21]);
ALGEBRAIC[35] = ALGEBRAIC[9]/(ALGEBRAIC[9]+ALGEBRAIC[21]);
RATES[24] = (ALGEBRAIC[35] - STATES[24])/ALGEBRAIC[28];
ALGEBRAIC[10] = 15.0000/(1.00000+exp((STATES[0]+60.0000)/5.00000));
ALGEBRAIC[22] = ( 100.000*exp((STATES[0]+25.0000)/5.00000))/(1.00000+exp((STATES[0]+25.0000)/5.00000));
ALGEBRAIC[29] = 1.00000/(ALGEBRAIC[10]+ALGEBRAIC[22]);
ALGEBRAIC[36] = ALGEBRAIC[10]/(ALGEBRAIC[10]+ALGEBRAIC[22]);
RATES[25] = (ALGEBRAIC[36] - STATES[25])/ALGEBRAIC[29];
ALGEBRAIC[1] = STATES[0]+10.0000;
ALGEBRAIC[13] = 1.00000/(1.00000+exp(- ALGEBRAIC[1]/6.24000));
ALGEBRAIC[25] = (fabs(ALGEBRAIC[1])<1.00000e-05 ? 0.00100000/( 0.0350000*6.24000) : ( 0.00100000*ALGEBRAIC[13]*(1.00000 - exp(- ALGEBRAIC[1]/6.24000)))/( 0.0350000*ALGEBRAIC[1]));
ALGEBRAIC[32] = ALGEBRAIC[13]/ALGEBRAIC[25];
ALGEBRAIC[39] = (1.00000 - ALGEBRAIC[13])/ALGEBRAIC[25];
RATES[13] =  ALGEBRAIC[32]*(1.00000 - STATES[13]) -  ALGEBRAIC[39]*STATES[13];
ALGEBRAIC[40] = ( ALGEBRAIC[27]*ALGEBRAIC[18]*ALGEBRAIC[6])/( ALGEBRAIC[6]*ALGEBRAIC[34]);
RATES[18] =  - (CONSTANTS[25]+ALGEBRAIC[6]+ALGEBRAIC[6])*STATES[18]+ CONSTANTS[24]*STATES[19]+ ALGEBRAIC[18]*STATES[17]+ ALGEBRAIC[40]*STATES[21];
RATES[21] =  - (ALGEBRAIC[40]+ALGEBRAIC[27])*STATES[21]+ ALGEBRAIC[6]*STATES[18]+ ALGEBRAIC[34]*STATES[17];
ALGEBRAIC[0] = 3802.00/( 0.102700*exp(- STATES[0]/17.0000)+ 0.200000*exp(- STATES[0]/150.000));
ALGEBRAIC[31] =  191.700*exp(- STATES[0]/20.3000);
ALGEBRAIC[46] =  0.000379330*exp(- STATES[0]/7.70000);
ALGEBRAIC[48] = 8.40000+ 0.0200000*STATES[0];
RATES[5] =  - (ALGEBRAIC[48]+ALGEBRAIC[0])*STATES[5]+ ALGEBRAIC[46]*STATES[7]+ ALGEBRAIC[31]*STATES[4];
ALGEBRAIC[12] = 3802.00/( 0.102700*exp(- STATES[0]/15.0000)+ 0.230000*exp(- STATES[0]/150.000));
ALGEBRAIC[38] =  200.000*exp(- (STATES[0] - 5.00000)/20.3000);
RATES[4] =  - (ALGEBRAIC[31]+ALGEBRAIC[48]+ALGEBRAIC[12])*STATES[4]+ ALGEBRAIC[0]*STATES[5]+ ALGEBRAIC[38]*STATES[3]+ ALGEBRAIC[46]*STATES[8];
ALGEBRAIC[24] = 3802.00/( 0.102700*exp(- STATES[0]/12.0000)+ 0.250000*exp(- STATES[0]/150.000));
ALGEBRAIC[42] =  220.000*exp(- (STATES[0] - 10.0000)/20.3000);
RATES[3] =  - (ALGEBRAIC[38]+ALGEBRAIC[24]+ALGEBRAIC[48])*STATES[3]+ ALGEBRAIC[12]*STATES[4]+ ALGEBRAIC[42]*STATES[2]+ ALGEBRAIC[46]*STATES[6];
RATES[7] =  - (ALGEBRAIC[46]+ALGEBRAIC[0])*STATES[7]+ ALGEBRAIC[48]*STATES[5]+ ALGEBRAIC[31]*STATES[8];
RATES[8] =  - (ALGEBRAIC[46]+ALGEBRAIC[12]+ALGEBRAIC[31])*STATES[8]+ ALGEBRAIC[48]*STATES[4]+ ALGEBRAIC[38]*STATES[6]+ ALGEBRAIC[0]*STATES[7];
ALGEBRAIC[44] =  9178.00*exp(STATES[0]/29.6800);
ALGEBRAIC[50] = ( ALGEBRAIC[24]*ALGEBRAIC[44]*ALGEBRAIC[46])/( ALGEBRAIC[42]*ALGEBRAIC[48]);
RATES[2] =  - (ALGEBRAIC[44]+ALGEBRAIC[42])*STATES[2]+ ALGEBRAIC[50]*STATES[6]+ ALGEBRAIC[24]*STATES[3];
ALGEBRAIC[52] = ALGEBRAIC[44]/100.000;
ALGEBRAIC[54] = ALGEBRAIC[46];
RATES[6] =  - (ALGEBRAIC[50]+ALGEBRAIC[46]+ALGEBRAIC[52]+ALGEBRAIC[38])*STATES[6]+ ALGEBRAIC[48]*STATES[3]+ ALGEBRAIC[54]*STATES[9]+ ALGEBRAIC[44]*STATES[2]+ ALGEBRAIC[12]*STATES[8];
ALGEBRAIC[56] = ALGEBRAIC[44]/95000.0;
ALGEBRAIC[58] = ALGEBRAIC[46]/50.0000;
RATES[9] =  - (ALGEBRAIC[56]+ALGEBRAIC[54])*STATES[9]+ ALGEBRAIC[58]*STATES[10]+ ALGEBRAIC[52]*STATES[6];
RATES[10] =  ALGEBRAIC[56]*STATES[9] -  ALGEBRAIC[58]*STATES[10];
ALGEBRAIC[55] =  (( CONSTANTS[0]*CONSTANTS[1])/CONSTANTS[2])*log(CONSTANTS[21]/STATES[12]);
ALGEBRAIC[57] =  CONSTANTS[66]*STATES[17]*(STATES[0] - ALGEBRAIC[55]);
ALGEBRAIC[60] =  0.866000*0.433000*(1.00000+0.600000/(1.00000+pow(3.80000e-05/STATES[11], 1.40000)));
ALGEBRAIC[59] =  (( CONSTANTS[0]*CONSTANTS[1])/CONSTANTS[2])*log((CONSTANTS[21]+ CONSTANTS[26]*CONSTANTS[10])/(STATES[12]+ CONSTANTS[26]*STATES[1]));
ALGEBRAIC[61] =  ALGEBRAIC[60]*STATES[22]*STATES[23]*(STATES[0] - ALGEBRAIC[59]);
ALGEBRAIC[62] =  (( CONSTANTS[0]*CONSTANTS[1])/CONSTANTS[2])*log(CONSTANTS[21]/STATES[12]);
ALGEBRAIC[69] = 0.850000/(1.00000+pow(CONSTANTS[29]/STATES[1], CONSTANTS[28]));
ALGEBRAIC[70] = 0.800000 - 0.650000/(1.00000+exp((STATES[0]+125.000)/15.0000));
ALGEBRAIC[71] =  CONSTANTS[68]*ALGEBRAIC[69]*ALGEBRAIC[70]*(STATES[0] - ALGEBRAIC[62]);
ALGEBRAIC[72] =  CONSTANTS[77]*(STATES[0] - ALGEBRAIC[62]);
ALGEBRAIC[73] = exp(STATES[0]/100.000);
ALGEBRAIC[74] =  CONSTANTS[70]*pow(STATES[24], 3.00000)*STATES[25]*ALGEBRAIC[73]*(STATES[0] - ALGEBRAIC[62]);
ALGEBRAIC[63] = 1020.00/(1.00000+exp( 0.238500*((STATES[0] - ALGEBRAIC[62]) - 59.2150)));
ALGEBRAIC[64] = ( 1000.00*( 0.491240*exp( 0.0803200*((STATES[0] - ALGEBRAIC[62])+5.47600))+exp( 0.0617500*((STATES[0] - ALGEBRAIC[62]) - 594.310))))/(1.00000+exp( - 0.514300*((STATES[0] - ALGEBRAIC[62])+4.75300)));
ALGEBRAIC[65] = ALGEBRAIC[63]/(ALGEBRAIC[63]+ALGEBRAIC[64]);
ALGEBRAIC[66] =  CONSTANTS[67]*ALGEBRAIC[65]*(STATES[0] - ALGEBRAIC[62]);
ALGEBRAIC[67] = 1.00000/(1.00000+exp((7.48800 - STATES[0])/5.98000));
ALGEBRAIC[68] =  CONSTANTS[27]*ALGEBRAIC[67]*(STATES[0] - ALGEBRAIC[62]);
ALGEBRAIC[80] = 1.00000/(1.00000+ 0.124500*exp(( - 0.100000*STATES[0]*CONSTANTS[2])/( CONSTANTS[0]*CONSTANTS[1]))+ 0.0365000*CONSTANTS[71]*exp(( - STATES[0]*CONSTANTS[2])/( CONSTANTS[0]*CONSTANTS[1])));
ALGEBRAIC[81] = ( (( CONSTANTS[40]*ALGEBRAIC[80]*1.00000)/(1.00000+pow(CONSTANTS[41]/STATES[1], 2.00000)))*CONSTANTS[21])/(CONSTANTS[21]+CONSTANTS[42]);
ALGEBRAIC[43] = ( (( CONSTANTS[17]*pow(1.00000, 2.00000)*STATES[0]*pow(CONSTANTS[2], 2.00000))/( CONSTANTS[0]*CONSTANTS[1]))*( CONSTANTS[13]*STATES[12]*exp(( 1.00000*STATES[0]*CONSTANTS[2])/( CONSTANTS[0]*CONSTANTS[1])) -  CONSTANTS[14]*CONSTANTS[21]))/(exp(( 1.00000*STATES[0]*CONSTANTS[2])/( CONSTANTS[0]*CONSTANTS[1])) - 1.00000);
ALGEBRAIC[45] = 1.00000/(1.00000+STATES[11]/CONSTANTS[22]);
ALGEBRAIC[51] =  STATES[13]*STATES[14]*ALGEBRAIC[45]*ALGEBRAIC[43];
ALGEBRAIC[83] = ( (( CONSTANTS[72]*pow(1.00000, 2.00000)*STATES[0]*pow(CONSTANTS[2], 2.00000))/( CONSTANTS[0]*CONSTANTS[1]))*( CONSTANTS[13]*STATES[12]*exp(( 1.00000*STATES[0]*CONSTANTS[2])/( CONSTANTS[0]*CONSTANTS[1])) -  CONSTANTS[14]*CONSTANTS[21]))/(exp(( 1.00000*STATES[0]*CONSTANTS[2])/( CONSTANTS[0]*CONSTANTS[1])) - 1.00000);
ALGEBRAIC[85] = ( ALGEBRAIC[83]*1.00000)/(1.00000+pow(CONSTANTS[43]/STATES[11], 3.00000));
RATES[12] = ( - (ALGEBRAIC[51]+ALGEBRAIC[57]+ALGEBRAIC[61]+ALGEBRAIC[66]+ALGEBRAIC[68]+ALGEBRAIC[71]+ALGEBRAIC[72]+ALGEBRAIC[74]+ALGEBRAIC[85]+ - ALGEBRAIC[81]*2.00000)*CONSTANTS[57])/( CONSTANTS[76]*CONSTANTS[2]);
ALGEBRAIC[11] = (VOI>=CONSTANTS[4]&&VOI<=CONSTANTS[5]&&(VOI - CONSTANTS[4]) -  floor((VOI - CONSTANTS[4])/CONSTANTS[6])*CONSTANTS[6]<=CONSTANTS[7] ? CONSTANTS[8] : 0.00000);
ALGEBRAIC[23] =  (( CONSTANTS[0]*CONSTANTS[1])/CONSTANTS[2])*log(CONSTANTS[10]/STATES[1]);
ALGEBRAIC[30] =  CONSTANTS[9]*STATES[2]*(STATES[0] - ALGEBRAIC[23]);
ALGEBRAIC[37] = ( (( CONSTANTS[15]*pow(2.00000, 2.00000)*STATES[0]*pow(CONSTANTS[2], 2.00000))/( CONSTANTS[0]*CONSTANTS[1]))*( CONSTANTS[18]*STATES[11]*exp(( 2.00000*STATES[0]*CONSTANTS[2])/( CONSTANTS[0]*CONSTANTS[1])) -  CONSTANTS[19]*CONSTANTS[20]))/(exp(( 2.00000*STATES[0]*CONSTANTS[2])/( CONSTANTS[0]*CONSTANTS[1])) - 1.00000);
ALGEBRAIC[47] =  STATES[13]*STATES[14]*ALGEBRAIC[45]*ALGEBRAIC[37];
ALGEBRAIC[41] = ( (( CONSTANTS[16]*pow(1.00000, 2.00000)*STATES[0]*pow(CONSTANTS[2], 2.00000))/( CONSTANTS[0]*CONSTANTS[1]))*( CONSTANTS[11]*STATES[1]*exp(( 1.00000*STATES[0]*CONSTANTS[2])/( CONSTANTS[0]*CONSTANTS[1])) -  CONSTANTS[12]*CONSTANTS[10]))/(exp(( 1.00000*STATES[0]*CONSTANTS[2])/( CONSTANTS[0]*CONSTANTS[1])) - 1.00000);
ALGEBRAIC[49] =  STATES[13]*STATES[14]*ALGEBRAIC[45]*ALGEBRAIC[41];
ALGEBRAIC[53] = ALGEBRAIC[47]+ALGEBRAIC[51]+ALGEBRAIC[49];
ALGEBRAIC[77] =  (( CONSTANTS[0]*CONSTANTS[1])/( 2.00000*CONSTANTS[2]))*log(CONSTANTS[20]/STATES[11]);
ALGEBRAIC[78] =  CONSTANTS[23]*STATES[15]*STATES[15]*STATES[16]*(STATES[0] - ALGEBRAIC[77]);
ALGEBRAIC[87] = ( CONSTANTS[44]*exp(( (CONSTANTS[46] - 1.00000)*STATES[0]*CONSTANTS[2])/( CONSTANTS[0]*CONSTANTS[1]))*( exp(( STATES[0]*CONSTANTS[2])/( CONSTANTS[0]*CONSTANTS[1]))*pow(STATES[1], 3.00000)*CONSTANTS[20] -  pow(CONSTANTS[10], 3.00000)*STATES[11]))/(1.00000+ CONSTANTS[45]*exp(( (CONSTANTS[46] - 1.00000)*STATES[0]*CONSTANTS[2])/( CONSTANTS[0]*CONSTANTS[1]))*( exp(( STATES[0]*CONSTANTS[2])/( CONSTANTS[0]*CONSTANTS[1]))*pow(STATES[1], 3.00000)*CONSTANTS[20]+ pow(CONSTANTS[10], 3.00000)*STATES[11]));
ALGEBRAIC[75] = ( CONSTANTS[37]*STATES[11])/(CONSTANTS[36]+STATES[11]);
ALGEBRAIC[76] =  CONSTANTS[38]*(STATES[0] - ALGEBRAIC[23]);
ALGEBRAIC[79] =  CONSTANTS[39]*(STATES[0] - ALGEBRAIC[77]);
ALGEBRAIC[82] = ( (( CONSTANTS[72]*pow(1.00000, 2.00000)*STATES[0]*pow(CONSTANTS[2], 2.00000))/( CONSTANTS[0]*CONSTANTS[1]))*( CONSTANTS[11]*STATES[1]*exp(( 1.00000*STATES[0]*CONSTANTS[2])/( CONSTANTS[0]*CONSTANTS[1])) -  CONSTANTS[12]*CONSTANTS[10]))/(exp(( 1.00000*STATES[0]*CONSTANTS[2])/( CONSTANTS[0]*CONSTANTS[1])) - 1.00000);
ALGEBRAIC[84] = ( ALGEBRAIC[82]*1.00000)/(1.00000+pow(CONSTANTS[43]/STATES[11], 3.00000));
ALGEBRAIC[86] = ALGEBRAIC[84]+ALGEBRAIC[85];
RATES[0] =  (- 1.00000/CONSTANTS[3])*(ALGEBRAIC[30]+ALGEBRAIC[53]+ALGEBRAIC[78]+ALGEBRAIC[57]+ALGEBRAIC[61]+ALGEBRAIC[71]+ALGEBRAIC[72]+ALGEBRAIC[74]+ALGEBRAIC[66]+ALGEBRAIC[68]+ALGEBRAIC[87]+ALGEBRAIC[75]+ALGEBRAIC[76]+ALGEBRAIC[79]+ALGEBRAIC[81]+ALGEBRAIC[86]+ALGEBRAIC[11]);
RATES[31] = (STATES[28]>0.200000 ? ( - CONSTANTS[57]*(((ALGEBRAIC[47]+ALGEBRAIC[78]) - ALGEBRAIC[87])+ALGEBRAIC[75]+ALGEBRAIC[79]))/( 2.00000*CONSTANTS[76]*CONSTANTS[2]) : STATES[29]>0.0100000&&STATES[28]<=0.200000 ? 0.00000 :  - 500.000*STATES[31]);
RATES[1] = ( - (ALGEBRAIC[30]+ALGEBRAIC[49]+ALGEBRAIC[76]+ALGEBRAIC[84]+ ALGEBRAIC[87]*3.00000+ ALGEBRAIC[81]*3.00000)*CONSTANTS[57])/( CONSTANTS[76]*CONSTANTS[2]);
ALGEBRAIC[88] =  (- 1.00000/CONSTANTS[3])*(ALGEBRAIC[30]+ALGEBRAIC[53]+ALGEBRAIC[78]+ALGEBRAIC[57]+ALGEBRAIC[61]+ALGEBRAIC[71]+ALGEBRAIC[72]+ALGEBRAIC[74]+ALGEBRAIC[66]+ALGEBRAIC[68]+ALGEBRAIC[87]+ALGEBRAIC[75]+ALGEBRAIC[76]+ALGEBRAIC[79]+ALGEBRAIC[81]+ALGEBRAIC[86]+ALGEBRAIC[11]);
RATES[28] = (ALGEBRAIC[88]>150000. ?  100000.*(1.00000 - STATES[28]) -  500.000*STATES[28] :  - 500.000*STATES[28]);
ALGEBRAIC[89] = (STATES[31]>CONSTANTS[51] ?  (( CONSTANTS[47]*(STATES[31] - CONSTANTS[51]))/((CONSTANTS[50]+STATES[31]) - CONSTANTS[51]))*(1.00000 - STATES[29])*STATES[29] : STATES[31]<=CONSTANTS[51]&&STATES[33]>0.00000 ?  CONSTANTS[48]*(1.00000 - STATES[33])*STATES[33] : 0.00000);
ALGEBRAIC[90] =  ALGEBRAIC[89]*(STATES[26] - STATES[11]);
ALGEBRAIC[91] = ( CONSTANTS[55]*STATES[11])/(STATES[11]+CONSTANTS[54]);
ALGEBRAIC[92] =  CONSTANTS[73]*STATES[27];
RATES[11] =  (1.00000/(1.00000+( CONSTANTS[61]*CONSTANTS[59])/pow(CONSTANTS[59]+STATES[11], 2.00000)+( CONSTANTS[60]*CONSTANTS[58])/pow(CONSTANTS[58]+STATES[11], 2.00000)))*(( - CONSTANTS[57]*(((ALGEBRAIC[47]+ALGEBRAIC[78]) -  2.00000*ALGEBRAIC[87])+ALGEBRAIC[75]+ALGEBRAIC[79]))/( 2.00000*CONSTANTS[76]*CONSTANTS[2])+( ALGEBRAIC[90]*CONSTANTS[78])/CONSTANTS[76]+( (ALGEBRAIC[92] - ALGEBRAIC[91])*CONSTANTS[79])/CONSTANTS[76]);
ALGEBRAIC[93] = (STATES[27] - STATES[26])/CONSTANTS[49];
RATES[26] =  (1.00000/(1.00000+( CONSTANTS[52]*CONSTANTS[53])/pow(CONSTANTS[53]+STATES[26], 2.00000)))*(ALGEBRAIC[93] - ALGEBRAIC[90]);
RATES[27] = (( - ALGEBRAIC[93]*CONSTANTS[78])/CONSTANTS[79] - ALGEBRAIC[92])+ALGEBRAIC[91];
}
void
computeVariables(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC)
{
ALGEBRAIC[3] = 1.00000/(1.00000+exp(- (STATES[0]+14.0000)/10.8000));
ALGEBRAIC[15] = 0.00370000+0.00610000/(1.00000+exp((STATES[0]+25.0000)/4.50000));
ALGEBRAIC[4] = 1.00000/(1.00000+exp((STATES[0]+60.0000)/5.60000));
ALGEBRAIC[16] = (STATES[0]<=0.00000 ?  - 0.000875000*STATES[0]+0.0120000 : 0.0120000);
ALGEBRAIC[5] =  55.5000*exp( 0.0554715*(STATES[0] - 12.0000));
ALGEBRAIC[17] =  2.35700*exp( - 0.0365880*STATES[0]);
ALGEBRAIC[7] = 1.00000/(1.00000+exp(- (STATES[0] - 1.50000)/16.7000));
ALGEBRAIC[19] = 0.00100000/(( 7.19000e-05*(STATES[0]+30.0000))/(1.00000 - exp( - 0.148000*(STATES[0]+30.0000)))+( 0.000131000*(STATES[0]+30.0000))/(exp( 0.0687000*(STATES[0]+30.0000)) - 1.00000));
ALGEBRAIC[8] = 1.00000/(1.00000+exp(- (STATES[0] - 1.50000)/16.7000));
ALGEBRAIC[20] = ( 4.00000*0.00100000)/(( 7.19000e-05*(STATES[0]+30.0000))/(1.00000 - exp( - 0.148000*(STATES[0]+30.0000)))+( 0.000131000*(STATES[0]+30.0000))/(exp( 0.0687000*(STATES[0]+30.0000)) - 1.00000));
ALGEBRAIC[2] = 1.00000/(1.00000+exp((STATES[0]+32.0000)/8.00000))+0.600000/(1.00000+exp((50.0000 - STATES[0])/20.0000));
ALGEBRAIC[14] = 0.00100000/( 0.0197000*exp(- pow( 0.0337000*(STATES[0]+10.0000), 2.00000))+0.0200000);
ALGEBRAIC[26] = ALGEBRAIC[2]/ALGEBRAIC[14];
ALGEBRAIC[33] = (1.00000 - ALGEBRAIC[2])/ALGEBRAIC[14];
ALGEBRAIC[6] =  65.5000*exp( 0.0554715*(STATES[0] - 36.0000));
ALGEBRAIC[18] =  2.93570*exp( - 0.0215800*STATES[0]);
ALGEBRAIC[27] = ( 439.000*exp( - 0.0235200*(STATES[0]+25.0000))*4.50000)/CONSTANTS[21];
ALGEBRAIC[34] = ( 656.000*exp( 0.000942000*STATES[0])*pow(4.50000, 0.300000))/pow(CONSTANTS[21], 0.300000);
ALGEBRAIC[9] = ( 10000.0*exp((STATES[0] - 40.0000)/25.0000))/(1.00000+exp((STATES[0] - 40.0000)/25.0000));
ALGEBRAIC[21] = ( 10000.0*exp(- (STATES[0]+90.0000)/25.0000))/(1.00000+exp(- (STATES[0]+90.0000)/25.0000));
ALGEBRAIC[28] = 1.00000/(ALGEBRAIC[9]+ALGEBRAIC[21]);
ALGEBRAIC[35] = ALGEBRAIC[9]/(ALGEBRAIC[9]+ALGEBRAIC[21]);
ALGEBRAIC[10] = 15.0000/(1.00000+exp((STATES[0]+60.0000)/5.00000));
ALGEBRAIC[22] = ( 100.000*exp((STATES[0]+25.0000)/5.00000))/(1.00000+exp((STATES[0]+25.0000)/5.00000));
ALGEBRAIC[29] = 1.00000/(ALGEBRAIC[10]+ALGEBRAIC[22]);
ALGEBRAIC[36] = ALGEBRAIC[10]/(ALGEBRAIC[10]+ALGEBRAIC[22]);
ALGEBRAIC[1] = STATES[0]+10.0000;
ALGEBRAIC[13] = 1.00000/(1.00000+exp(- ALGEBRAIC[1]/6.24000));
ALGEBRAIC[25] = (fabs(ALGEBRAIC[1])<1.00000e-05 ? 0.00100000/( 0.0350000*6.24000) : ( 0.00100000*ALGEBRAIC[13]*(1.00000 - exp(- ALGEBRAIC[1]/6.24000)))/( 0.0350000*ALGEBRAIC[1]));
ALGEBRAIC[32] = ALGEBRAIC[13]/ALGEBRAIC[25];
ALGEBRAIC[39] = (1.00000 - ALGEBRAIC[13])/ALGEBRAIC[25];
ALGEBRAIC[40] = ( ALGEBRAIC[27]*ALGEBRAIC[18]*ALGEBRAIC[6])/( ALGEBRAIC[6]*ALGEBRAIC[34]);
ALGEBRAIC[0] = 3802.00/( 0.102700*exp(- STATES[0]/17.0000)+ 0.200000*exp(- STATES[0]/150.000));
ALGEBRAIC[31] =  191.700*exp(- STATES[0]/20.3000);
ALGEBRAIC[46] =  0.000379330*exp(- STATES[0]/7.70000);
ALGEBRAIC[48] = 8.40000+ 0.0200000*STATES[0];
ALGEBRAIC[12] = 3802.00/( 0.102700*exp(- STATES[0]/15.0000)+ 0.230000*exp(- STATES[0]/150.000));
ALGEBRAIC[38] =  200.000*exp(- (STATES[0] - 5.00000)/20.3000);
ALGEBRAIC[24] = 3802.00/( 0.102700*exp(- STATES[0]/12.0000)+ 0.250000*exp(- STATES[0]/150.000));
ALGEBRAIC[42] =  220.000*exp(- (STATES[0] - 10.0000)/20.3000);
ALGEBRAIC[44] =  9178.00*exp(STATES[0]/29.6800);
ALGEBRAIC[50] = ( ALGEBRAIC[24]*ALGEBRAIC[44]*ALGEBRAIC[46])/( ALGEBRAIC[42]*ALGEBRAIC[48]);
ALGEBRAIC[52] = ALGEBRAIC[44]/100.000;
ALGEBRAIC[54] = ALGEBRAIC[46];
ALGEBRAIC[56] = ALGEBRAIC[44]/95000.0;
ALGEBRAIC[58] = ALGEBRAIC[46]/50.0000;
ALGEBRAIC[55] =  (( CONSTANTS[0]*CONSTANTS[1])/CONSTANTS[2])*log(CONSTANTS[21]/STATES[12]);
ALGEBRAIC[57] =  CONSTANTS[66]*STATES[17]*(STATES[0] - ALGEBRAIC[55]);
ALGEBRAIC[60] =  0.866000*0.433000*(1.00000+0.600000/(1.00000+pow(3.80000e-05/STATES[11], 1.40000)));
ALGEBRAIC[59] =  (( CONSTANTS[0]*CONSTANTS[1])/CONSTANTS[2])*log((CONSTANTS[21]+ CONSTANTS[26]*CONSTANTS[10])/(STATES[12]+ CONSTANTS[26]*STATES[1]));
ALGEBRAIC[61] =  ALGEBRAIC[60]*STATES[22]*STATES[23]*(STATES[0] - ALGEBRAIC[59]);
ALGEBRAIC[62] =  (( CONSTANTS[0]*CONSTANTS[1])/CONSTANTS[2])*log(CONSTANTS[21]/STATES[12]);
ALGEBRAIC[69] = 0.850000/(1.00000+pow(CONSTANTS[29]/STATES[1], CONSTANTS[28]));
ALGEBRAIC[70] = 0.800000 - 0.650000/(1.00000+exp((STATES[0]+125.000)/15.0000));
ALGEBRAIC[71] =  CONSTANTS[68]*ALGEBRAIC[69]*ALGEBRAIC[70]*(STATES[0] - ALGEBRAIC[62]);
ALGEBRAIC[72] =  CONSTANTS[77]*(STATES[0] - ALGEBRAIC[62]);
ALGEBRAIC[73] = exp(STATES[0]/100.000);
ALGEBRAIC[74] =  CONSTANTS[70]*pow(STATES[24], 3.00000)*STATES[25]*ALGEBRAIC[73]*(STATES[0] - ALGEBRAIC[62]);
ALGEBRAIC[63] = 1020.00/(1.00000+exp( 0.238500*((STATES[0] - ALGEBRAIC[62]) - 59.2150)));
ALGEBRAIC[64] = ( 1000.00*( 0.491240*exp( 0.0803200*((STATES[0] - ALGEBRAIC[62])+5.47600))+exp( 0.0617500*((STATES[0] - ALGEBRAIC[62]) - 594.310))))/(1.00000+exp( - 0.514300*((STATES[0] - ALGEBRAIC[62])+4.75300)));
ALGEBRAIC[65] = ALGEBRAIC[63]/(ALGEBRAIC[63]+ALGEBRAIC[64]);
ALGEBRAIC[66] =  CONSTANTS[67]*ALGEBRAIC[65]*(STATES[0] - ALGEBRAIC[62]);
ALGEBRAIC[67] = 1.00000/(1.00000+exp((7.48800 - STATES[0])/5.98000));
ALGEBRAIC[68] =  CONSTANTS[27]*ALGEBRAIC[67]*(STATES[0] - ALGEBRAIC[62]);
ALGEBRAIC[80] = 1.00000/(1.00000+ 0.124500*exp(( - 0.100000*STATES[0]*CONSTANTS[2])/( CONSTANTS[0]*CONSTANTS[1]))+ 0.0365000*CONSTANTS[71]*exp(( - STATES[0]*CONSTANTS[2])/( CONSTANTS[0]*CONSTANTS[1])));
ALGEBRAIC[81] = ( (( CONSTANTS[40]*ALGEBRAIC[80]*1.00000)/(1.00000+pow(CONSTANTS[41]/STATES[1], 2.00000)))*CONSTANTS[21])/(CONSTANTS[21]+CONSTANTS[42]);
ALGEBRAIC[43] = ( (( CONSTANTS[17]*pow(1.00000, 2.00000)*STATES[0]*pow(CONSTANTS[2], 2.00000))/( CONSTANTS[0]*CONSTANTS[1]))*( CONSTANTS[13]*STATES[12]*exp(( 1.00000*STATES[0]*CONSTANTS[2])/( CONSTANTS[0]*CONSTANTS[1])) -  CONSTANTS[14]*CONSTANTS[21]))/(exp(( 1.00000*STATES[0]*CONSTANTS[2])/( CONSTANTS[0]*CONSTANTS[1])) - 1.00000);
ALGEBRAIC[45] = 1.00000/(1.00000+STATES[11]/CONSTANTS[22]);
ALGEBRAIC[51] =  STATES[13]*STATES[14]*ALGEBRAIC[45]*ALGEBRAIC[43];
ALGEBRAIC[83] = ( (( CONSTANTS[72]*pow(1.00000, 2.00000)*STATES[0]*pow(CONSTANTS[2], 2.00000))/( CONSTANTS[0]*CONSTANTS[1]))*( CONSTANTS[13]*STATES[12]*exp(( 1.00000*STATES[0]*CONSTANTS[2])/( CONSTANTS[0]*CONSTANTS[1])) -  CONSTANTS[14]*CONSTANTS[21]))/(exp(( 1.00000*STATES[0]*CONSTANTS[2])/( CONSTANTS[0]*CONSTANTS[1])) - 1.00000);
ALGEBRAIC[85] = ( ALGEBRAIC[83]*1.00000)/(1.00000+pow(CONSTANTS[43]/STATES[11], 3.00000));
ALGEBRAIC[11] = (VOI>=CONSTANTS[4]&&VOI<=CONSTANTS[5]&&(VOI - CONSTANTS[4]) -  floor((VOI - CONSTANTS[4])/CONSTANTS[6])*CONSTANTS[6]<=CONSTANTS[7] ? CONSTANTS[8] : 0.00000);
ALGEBRAIC[23] =  (( CONSTANTS[0]*CONSTANTS[1])/CONSTANTS[2])*log(CONSTANTS[10]/STATES[1]);
ALGEBRAIC[30] =  CONSTANTS[9]*STATES[2]*(STATES[0] - ALGEBRAIC[23]);
ALGEBRAIC[37] = ( (( CONSTANTS[15]*pow(2.00000, 2.00000)*STATES[0]*pow(CONSTANTS[2], 2.00000))/( CONSTANTS[0]*CONSTANTS[1]))*( CONSTANTS[18]*STATES[11]*exp(( 2.00000*STATES[0]*CONSTANTS[2])/( CONSTANTS[0]*CONSTANTS[1])) -  CONSTANTS[19]*CONSTANTS[20]))/(exp(( 2.00000*STATES[0]*CONSTANTS[2])/( CONSTANTS[0]*CONSTANTS[1])) - 1.00000);
ALGEBRAIC[47] =  STATES[13]*STATES[14]*ALGEBRAIC[45]*ALGEBRAIC[37];
ALGEBRAIC[41] = ( (( CONSTANTS[16]*pow(1.00000, 2.00000)*STATES[0]*pow(CONSTANTS[2], 2.00000))/( CONSTANTS[0]*CONSTANTS[1]))*( CONSTANTS[11]*STATES[1]*exp(( 1.00000*STATES[0]*CONSTANTS[2])/( CONSTANTS[0]*CONSTANTS[1])) -  CONSTANTS[12]*CONSTANTS[10]))/(exp(( 1.00000*STATES[0]*CONSTANTS[2])/( CONSTANTS[0]*CONSTANTS[1])) - 1.00000);
ALGEBRAIC[49] =  STATES[13]*STATES[14]*ALGEBRAIC[45]*ALGEBRAIC[41];
ALGEBRAIC[53] = ALGEBRAIC[47]+ALGEBRAIC[51]+ALGEBRAIC[49];
ALGEBRAIC[77] =  (( CONSTANTS[0]*CONSTANTS[1])/( 2.00000*CONSTANTS[2]))*log(CONSTANTS[20]/STATES[11]);
ALGEBRAIC[78] =  CONSTANTS[23]*STATES[15]*STATES[15]*STATES[16]*(STATES[0] - ALGEBRAIC[77]);
ALGEBRAIC[87] = ( CONSTANTS[44]*exp(( (CONSTANTS[46] - 1.00000)*STATES[0]*CONSTANTS[2])/( CONSTANTS[0]*CONSTANTS[1]))*( exp(( STATES[0]*CONSTANTS[2])/( CONSTANTS[0]*CONSTANTS[1]))*pow(STATES[1], 3.00000)*CONSTANTS[20] -  pow(CONSTANTS[10], 3.00000)*STATES[11]))/(1.00000+ CONSTANTS[45]*exp(( (CONSTANTS[46] - 1.00000)*STATES[0]*CONSTANTS[2])/( CONSTANTS[0]*CONSTANTS[1]))*( exp(( STATES[0]*CONSTANTS[2])/( CONSTANTS[0]*CONSTANTS[1]))*pow(STATES[1], 3.00000)*CONSTANTS[20]+ pow(CONSTANTS[10], 3.00000)*STATES[11]));
ALGEBRAIC[75] = ( CONSTANTS[37]*STATES[11])/(CONSTANTS[36]+STATES[11]);
ALGEBRAIC[76] =  CONSTANTS[38]*(STATES[0] - ALGEBRAIC[23]);
ALGEBRAIC[79] =  CONSTANTS[39]*(STATES[0] - ALGEBRAIC[77]);
ALGEBRAIC[82] = ( (( CONSTANTS[72]*pow(1.00000, 2.00000)*STATES[0]*pow(CONSTANTS[2], 2.00000))/( CONSTANTS[0]*CONSTANTS[1]))*( CONSTANTS[11]*STATES[1]*exp(( 1.00000*STATES[0]*CONSTANTS[2])/( CONSTANTS[0]*CONSTANTS[1])) -  CONSTANTS[12]*CONSTANTS[10]))/(exp(( 1.00000*STATES[0]*CONSTANTS[2])/( CONSTANTS[0]*CONSTANTS[1])) - 1.00000);
ALGEBRAIC[84] = ( ALGEBRAIC[82]*1.00000)/(1.00000+pow(CONSTANTS[43]/STATES[11], 3.00000));
ALGEBRAIC[86] = ALGEBRAIC[84]+ALGEBRAIC[85];
ALGEBRAIC[88] =  (- 1.00000/CONSTANTS[3])*(ALGEBRAIC[30]+ALGEBRAIC[53]+ALGEBRAIC[78]+ALGEBRAIC[57]+ALGEBRAIC[61]+ALGEBRAIC[71]+ALGEBRAIC[72]+ALGEBRAIC[74]+ALGEBRAIC[66]+ALGEBRAIC[68]+ALGEBRAIC[87]+ALGEBRAIC[75]+ALGEBRAIC[76]+ALGEBRAIC[79]+ALGEBRAIC[81]+ALGEBRAIC[86]+ALGEBRAIC[11]);
ALGEBRAIC[89] = (STATES[31]>CONSTANTS[51] ?  (( CONSTANTS[47]*(STATES[31] - CONSTANTS[51]))/((CONSTANTS[50]+STATES[31]) - CONSTANTS[51]))*(1.00000 - STATES[29])*STATES[29] : STATES[31]<=CONSTANTS[51]&&STATES[33]>0.00000 ?  CONSTANTS[48]*(1.00000 - STATES[33])*STATES[33] : 0.00000);
ALGEBRAIC[90] =  ALGEBRAIC[89]*(STATES[26] - STATES[11]);
ALGEBRAIC[91] = ( CONSTANTS[55]*STATES[11])/(STATES[11]+CONSTANTS[54]);
ALGEBRAIC[92] =  CONSTANTS[73]*STATES[27];
ALGEBRAIC[93] = (STATES[27] - STATES[26])/CONSTANTS[49];
}
Source
Derived from workspace Clancy, Rudy, 2002 at changeset 2bd2a331ca0c.
Collaboration
To begin collaborating on this work, please use your git client and issue this command:
License

This work is licensed under a Creative Commons Attribution 3.0 Unported License.