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 80 entries in the algebraic variable array.
   There are a total of 38 entries in each of the rate and state variable arrays.
   There are a total of 65 entries in the constant variable array.
 */
/*
 * VOI is time in component environment (millisecond).
 * STATES[0] is V in component membrane (millivolt).
 * CONSTANTS[0] is R in component membrane (joule_per_mole_kelvin).
 * CONSTANTS[1] is T in component membrane (kelvin).
 * CONSTANTS[2] is F in component membrane (coulomb_per_millimole).
 * CONSTANTS[3] is Cm in component membrane (picoF).
 * ALGEBRAIC[2] is I_stim in component I_stim (picoA).
 * ALGEBRAIC[79] is i_Na in component sodium_current (picoA).
 * ALGEBRAIC[4] is i_Ca_L in component L_type_Ca_channel (picoA).
 * ALGEBRAIC[28] is i_Ca_T in component T_type_Ca_channel (picoA).
 * ALGEBRAIC[78] is i_Kv in component voltage_dep_K_channel (picoA).
 * ALGEBRAIC[36] is i_BK in component Calcium_voltage_activated_potassium_channel (picoA).
 * ALGEBRAIC[72] is i_NCX in component Na_Ca_exchanger (picoA).
 * ALGEBRAIC[73] is i_NaK in component sodium_potassium_pump (picoA).
 * ALGEBRAIC[77] is i_NsK in component non_specific_K_current (picoA).
 * ALGEBRAIC[75] is i_NsNa in component non_specific_Na_current (picoA).
 * ALGEBRAIC[1] is local_time in component I_stim (millisecond).
 * CONSTANTS[4] is period in component I_stim (millisecond).
 * ALGEBRAIC[0] is stim_start in component I_stim (millisecond).
 * CONSTANTS[5] is Gcouple in component I_stim (nanoS).
 * CONSTANTS[6] is t_ICCpeak in component I_stim (millisecond).
 * CONSTANTS[7] is t_ICCplateau in component I_stim (millisecond).
 * CONSTANTS[8] is t_slope in component I_stim (millisecond).
 * CONSTANTS[9] is f_1 in component I_stim (millisecond).
 * CONSTANTS[10] is f_2 in component I_stim (millisecond).
 * CONSTANTS[11] is V_ICCrest in component I_stim (millivolt).
 * CONSTANTS[12] is V_ICCamp in component I_stim (millivolt).
 * ALGEBRAIC[3] is E_Ca in component L_type_Ca_channel (millivolt).
 * CONSTANTS[13] is g_CaL in component L_type_Ca_channel (nanoS).
 * CONSTANTS[14] is Cao in component ionic_concentrations (millimolar).
 * STATES[1] is Cai in component ionic_concentrations (millimolar).
 * STATES[2] is O_CaL in component L_type_Ca_channel_states (dimensionless).
 * STATES[3] is C0 in component L_type_Ca_channel_states (dimensionless).
 * STATES[4] is C1 in component L_type_Ca_channel_states (dimensionless).
 * STATES[5] is C2 in component L_type_Ca_channel_states (dimensionless).
 * STATES[6] is C3 in component L_type_Ca_channel_states (dimensionless).
 * STATES[7] is C0Ca in component L_type_Ca_channel_states (dimensionless).
 * STATES[8] is C1Ca in component L_type_Ca_channel_states (dimensionless).
 * STATES[9] is C2Ca in component L_type_Ca_channel_states (dimensionless).
 * STATES[10] is C3Ca in component L_type_Ca_channel_states (dimensionless).
 * STATES[11] is ICa in component L_type_Ca_channel_states (dimensionless).
 * STATES[12] is IVs in component L_type_Ca_channel_states (dimensionless).
 * STATES[13] is IVf in component L_type_Ca_channel_states (dimensionless).
 * STATES[14] is IVfCa in component L_type_Ca_channel_states (dimensionless).
 * STATES[15] is IVsCa in component L_type_Ca_channel_states (dimensionless).
 * ALGEBRAIC[5] is alpha in component L_type_Ca_channel_states (per_millisecond).
 * ALGEBRAIC[6] is beta in component L_type_Ca_channel_states (per_millisecond).
 * ALGEBRAIC[7] is alpha_0 in component L_type_Ca_channel_states (per_millisecond).
 * ALGEBRAIC[8] is alpha_1 in component L_type_Ca_channel_states (per_millisecond).
 * ALGEBRAIC[9] is alpha_2 in component L_type_Ca_channel_states (per_millisecond).
 * ALGEBRAIC[10] is alpha_3 in component L_type_Ca_channel_states (per_millisecond).
 * ALGEBRAIC[11] is beta_0 in component L_type_Ca_channel_states (per_millisecond).
 * ALGEBRAIC[12] is beta_1 in component L_type_Ca_channel_states (per_millisecond).
 * ALGEBRAIC[13] is beta_2 in component L_type_Ca_channel_states (per_millisecond).
 * ALGEBRAIC[14] is beta_3 in component L_type_Ca_channel_states (per_millisecond).
 * CONSTANTS[53] is delta in component L_type_Ca_channel_states (per_millisecond).
 * ALGEBRAIC[25] is theta in component L_type_Ca_channel_states (per_millisecond).
 * ALGEBRAIC[16] is phi_s in component L_type_Ca_channel_states (per_millisecond).
 * ALGEBRAIC[15] is phi_f in component L_type_Ca_channel_states (per_millisecond).
 * ALGEBRAIC[22] is omega_s in component L_type_Ca_channel_states (per_millisecond).
 * ALGEBRAIC[21] is omega_f in component L_type_Ca_channel_states (per_millisecond).
 * ALGEBRAIC[24] is omega_fs in component L_type_Ca_channel_states (per_millisecond).
 * ALGEBRAIC[23] is omega_sf in component L_type_Ca_channel_states (per_millisecond).
 * ALGEBRAIC[20] is psi_s in component L_type_Ca_channel_states (per_millisecond).
 * ALGEBRAIC[19] is psi_f in component L_type_Ca_channel_states (per_millisecond).
 * ALGEBRAIC[18] is xi_s in component L_type_Ca_channel_states (per_millisecond).
 * ALGEBRAIC[17] is xi_f in component L_type_Ca_channel_states (per_millisecond).
 * CONSTANTS[44] is T_correction_Ca in component L_type_Ca_channel_states (dimensionless).
 * CONSTANTS[15] is Q10Ca in component L_type_Ca_channel_states (dimensionless).
 * ALGEBRAIC[26] is norm in component L_type_Ca_channel_states (dimensionless).
 * CONSTANTS[16] is g_CaT in component T_type_Ca_channel (nanoS).
 * ALGEBRAIC[27] is E_Ca in component T_type_Ca_channel (millivolt).
 * STATES[16] is d_CaT in component T_type_Ca_channel_d_gate (dimensionless).
 * STATES[17] is f_CaT in component T_type_Ca_channel_f_gate (dimensionless).
 * ALGEBRAIC[29] is d_CaT_inf in component T_type_Ca_channel_d_gate (dimensionless).
 * CONSTANTS[54] is tau_d_CaT in component T_type_Ca_channel_d_gate (millisecond).
 * CONSTANTS[45] is T_correction_Ca in component T_type_Ca_channel_d_gate (dimensionless).
 * CONSTANTS[17] is Q10Ca in component T_type_Ca_channel_d_gate (dimensionless).
 * ALGEBRAIC[30] is f_CaT_inf in component T_type_Ca_channel_f_gate (dimensionless).
 * ALGEBRAIC[31] is tau_f_CaT in component T_type_Ca_channel_f_gate (millisecond).
 * CONSTANTS[46] is T_correction_Ca in component T_type_Ca_channel_f_gate (dimensionless).
 * CONSTANTS[18] is Q10Ca in component T_type_Ca_channel_f_gate (dimensionless).
 * CONSTANTS[19] is g_Kv in component voltage_dep_K_channel (nanoS).
 * ALGEBRAIC[32] is E_K in component voltage_dep_K_channel (millivolt).
 * STATES[18] is x_Kv in component voltage_dep_K_channel_x_gate (dimensionless).
 * STATES[19] is y_Kv in component voltage_dep_K_channel_y_gate (dimensionless).
 * CONSTANTS[20] is Ko in component ionic_concentrations (millimolar).
 * STATES[20] is Ki in component ionic_concentrations (millimolar).
 * ALGEBRAIC[33] is x_Kv_inf in component voltage_dep_K_channel_x_gate (dimensionless).
 * CONSTANTS[55] is tau_x_Kv in component voltage_dep_K_channel_x_gate (millisecond).
 * CONSTANTS[47] is T_correction_K in component voltage_dep_K_channel_x_gate (dimensionless).
 * CONSTANTS[21] is Q10K in component voltage_dep_K_channel_x_gate (dimensionless).
 * ALGEBRAIC[34] is y_Kv_inf in component voltage_dep_K_channel_y_gate (dimensionless).
 * CONSTANTS[56] is tau_y_Kv in component voltage_dep_K_channel_y_gate (millisecond).
 * CONSTANTS[48] is T_correction_K in component voltage_dep_K_channel_y_gate (dimensionless).
 * CONSTANTS[22] is Q10K in component voltage_dep_K_channel_y_gate (dimensionless).
 * ALGEBRAIC[35] is E_K in component Calcium_voltage_activated_potassium_channel (millivolt).
 * CONSTANTS[23] is g_BK in component Calcium_voltage_activated_potassium_channel (nanoS).
 * STATES[21] is O4 in component Calcium_voltage_activated_potassium_channel_states (dimensionless).
 * STATES[22] is C0 in component Calcium_voltage_activated_potassium_channel_states (dimensionless).
 * STATES[23] is C1 in component Calcium_voltage_activated_potassium_channel_states (dimensionless).
 * STATES[24] is C2 in component Calcium_voltage_activated_potassium_channel_states (dimensionless).
 * STATES[25] is C3 in component Calcium_voltage_activated_potassium_channel_states (dimensionless).
 * STATES[26] is C4 in component Calcium_voltage_activated_potassium_channel_states (dimensionless).
 * STATES[27] is O0 in component Calcium_voltage_activated_potassium_channel_states (dimensionless).
 * STATES[28] is O1 in component Calcium_voltage_activated_potassium_channel_states (dimensionless).
 * STATES[29] is O2 in component Calcium_voltage_activated_potassium_channel_states (dimensionless).
 * STATES[30] is O3 in component Calcium_voltage_activated_potassium_channel_states (dimensionless).
 * ALGEBRAIC[37] is alpha in component Calcium_voltage_activated_potassium_channel_states (per_millisecond).
 * ALGEBRAIC[38] is beta in component Calcium_voltage_activated_potassium_channel_states (per_millisecond).
 * CONSTANTS[49] is k_on in component Calcium_voltage_activated_potassium_channel_states (per_millisecond).
 * CONSTANTS[50] is k_off_C in component Calcium_voltage_activated_potassium_channel_states (per_millisecond).
 * CONSTANTS[51] is k_off_O in component Calcium_voltage_activated_potassium_channel_states (per_millisecond).
 * ALGEBRAIC[39] is k_C0O0 in component Calcium_voltage_activated_potassium_channel_states (per_millisecond).
 * ALGEBRAIC[40] is k_C1O1 in component Calcium_voltage_activated_potassium_channel_states (per_millisecond).
 * ALGEBRAIC[41] is k_C2O2 in component Calcium_voltage_activated_potassium_channel_states (per_millisecond).
 * ALGEBRAIC[42] is k_C3O3 in component Calcium_voltage_activated_potassium_channel_states (per_millisecond).
 * ALGEBRAIC[43] is k_C4O4 in component Calcium_voltage_activated_potassium_channel_states (per_millisecond).
 * ALGEBRAIC[44] is k_O0C0 in component Calcium_voltage_activated_potassium_channel_states (per_millisecond).
 * ALGEBRAIC[45] is k_O1C1 in component Calcium_voltage_activated_potassium_channel_states (per_millisecond).
 * ALGEBRAIC[46] is k_O2C2 in component Calcium_voltage_activated_potassium_channel_states (per_millisecond).
 * ALGEBRAIC[47] is k_O3C3 in component Calcium_voltage_activated_potassium_channel_states (per_millisecond).
 * ALGEBRAIC[48] is k_O4C4 in component Calcium_voltage_activated_potassium_channel_states (per_millisecond).
 * ALGEBRAIC[49] is k_C0C1 in component Calcium_voltage_activated_potassium_channel_states (per_millisecond).
 * ALGEBRAIC[50] is k_C1C2 in component Calcium_voltage_activated_potassium_channel_states (per_millisecond).
 * ALGEBRAIC[51] is k_C2C3 in component Calcium_voltage_activated_potassium_channel_states (per_millisecond).
 * ALGEBRAIC[52] is k_C3C4 in component Calcium_voltage_activated_potassium_channel_states (per_millisecond).
 * CONSTANTS[57] is k_C4C3 in component Calcium_voltage_activated_potassium_channel_states (per_millisecond).
 * CONSTANTS[58] is k_C3C2 in component Calcium_voltage_activated_potassium_channel_states (per_millisecond).
 * CONSTANTS[59] is k_C2C1 in component Calcium_voltage_activated_potassium_channel_states (per_millisecond).
 * CONSTANTS[60] is k_C1C0 in component Calcium_voltage_activated_potassium_channel_states (per_millisecond).
 * ALGEBRAIC[53] is k_O0O1 in component Calcium_voltage_activated_potassium_channel_states (per_millisecond).
 * ALGEBRAIC[54] is k_O1O2 in component Calcium_voltage_activated_potassium_channel_states (per_millisecond).
 * ALGEBRAIC[55] is k_O2O3 in component Calcium_voltage_activated_potassium_channel_states (per_millisecond).
 * ALGEBRAIC[56] is k_O3O4 in component Calcium_voltage_activated_potassium_channel_states (per_millisecond).
 * CONSTANTS[61] is k_O4O3 in component Calcium_voltage_activated_potassium_channel_states (per_millisecond).
 * CONSTANTS[62] is k_O3O2 in component Calcium_voltage_activated_potassium_channel_states (per_millisecond).
 * CONSTANTS[63] is k_O2O1 in component Calcium_voltage_activated_potassium_channel_states (per_millisecond).
 * CONSTANTS[64] is k_O1O0 in component Calcium_voltage_activated_potassium_channel_states (per_millisecond).
 * ALGEBRAIC[57] is norm in component Calcium_voltage_activated_potassium_channel_states (dimensionless).
 * ALGEBRAIC[58] is E_Na in component sodium_current (millivolt).
 * CONSTANTS[24] is g_Na in component sodium_current (nanoS).
 * CONSTANTS[25] is Nao in component ionic_concentrations (millimolar).
 * STATES[31] is Nai in component ionic_concentrations (millimolar).
 * STATES[32] is O_Na in component Na_channel_states (dimensionless).
 * STATES[33] is C1 in component Na_channel_states (dimensionless).
 * STATES[34] is C2 in component Na_channel_states (dimensionless).
 * STATES[35] is C3 in component Na_channel_states (dimensionless).
 * STATES[36] is I1 in component Na_channel_states (dimensionless).
 * STATES[37] is I2 in component Na_channel_states (dimensionless).
 * ALGEBRAIC[59] is k_I2I1 in component Na_channel_states (per_millisecond).
 * ALGEBRAIC[60] is k_I1O in component Na_channel_states (per_millisecond).
 * ALGEBRAIC[61] is k_OC1 in component Na_channel_states (per_millisecond).
 * ALGEBRAIC[62] is k_C1C2 in component Na_channel_states (per_millisecond).
 * ALGEBRAIC[63] is k_C2C3 in component Na_channel_states (per_millisecond).
 * ALGEBRAIC[64] is k_C3C2 in component Na_channel_states (per_millisecond).
 * ALGEBRAIC[65] is k_C2C1 in component Na_channel_states (per_millisecond).
 * ALGEBRAIC[66] is k_C1O in component Na_channel_states (per_millisecond).
 * ALGEBRAIC[67] is k_OI1 in component Na_channel_states (per_millisecond).
 * ALGEBRAIC[68] is k_I1I2 in component Na_channel_states (per_millisecond).
 * ALGEBRAIC[69] is k_I1C1 in component Na_channel_states (per_millisecond).
 * ALGEBRAIC[70] is k_C1I1 in component Na_channel_states (per_millisecond).
 * ALGEBRAIC[71] is norm in component Na_channel_states (dimensionless).
 * CONSTANTS[52] is T_correction_Na in component Na_channel_states (dimensionless).
 * CONSTANTS[26] is Q10Na in component Na_channel_states (dimensionless).
 * CONSTANTS[27] is P_NCX in component Na_Ca_exchanger (picoA).
 * CONSTANTS[28] is K_mCa in component Na_Ca_exchanger (millimolar).
 * CONSTANTS[29] is K_mNai in component Na_Ca_exchanger (millimolar).
 * CONSTANTS[30] is k_sat in component Na_Ca_exchanger (dimensionless).
 * CONSTANTS[31] is gamma in component Na_Ca_exchanger (dimensionless).
 * CONSTANTS[32] is P_NaK in component sodium_potassium_pump (picoA).
 * CONSTANTS[33] is K_mK in component sodium_potassium_pump (millimolar).
 * CONSTANTS[34] is K_mNa in component sodium_potassium_pump (millimolar).
 * CONSTANTS[35] is g_NsNa in component non_specific_Na_current (nanoS).
 * ALGEBRAIC[74] is E_Na in component non_specific_Na_current (millivolt).
 * CONSTANTS[36] is g_NsK in component non_specific_K_current (nanoS).
 * ALGEBRAIC[76] is E_K in component non_specific_K_current (millivolt).
 * CONSTANTS[37] is CRT_total in component ionic_concentrations (millimolar).
 * CONSTANTS[38] is CaM_total in component ionic_concentrations (millimolar).
 * CONSTANTS[39] is K_D_CRT in component ionic_concentrations (millimolar).
 * CONSTANTS[40] is K_D_CaM in component ionic_concentrations (millimolar4).
 * CONSTANTS[41] is n_CRT in component ionic_concentrations (dimensionless).
 * CONSTANTS[42] is n_CaM in component ionic_concentrations (dimensionless).
 * CONSTANTS[43] is V_myo in component ionic_concentrations (litre).
 * RATES[0] is d/dt V in component membrane (millivolt).
 * RATES[6] is d/dt C3 in component L_type_Ca_channel_states (dimensionless).
 * RATES[5] is d/dt C2 in component L_type_Ca_channel_states (dimensionless).
 * RATES[4] is d/dt C1 in component L_type_Ca_channel_states (dimensionless).
 * RATES[3] is d/dt C0 in component L_type_Ca_channel_states (dimensionless).
 * RATES[10] is d/dt C3Ca in component L_type_Ca_channel_states (dimensionless).
 * RATES[9] is d/dt C2Ca in component L_type_Ca_channel_states (dimensionless).
 * RATES[8] is d/dt C1Ca in component L_type_Ca_channel_states (dimensionless).
 * RATES[7] is d/dt C0Ca in component L_type_Ca_channel_states (dimensionless).
 * RATES[2] is d/dt O_CaL in component L_type_Ca_channel_states (dimensionless).
 * RATES[11] is d/dt ICa in component L_type_Ca_channel_states (dimensionless).
 * RATES[12] is d/dt IVs in component L_type_Ca_channel_states (dimensionless).
 * RATES[13] is d/dt IVf in component L_type_Ca_channel_states (dimensionless).
 * RATES[15] is d/dt IVsCa in component L_type_Ca_channel_states (dimensionless).
 * RATES[14] is d/dt IVfCa in component L_type_Ca_channel_states (dimensionless).
 * RATES[16] is d/dt d_CaT in component T_type_Ca_channel_d_gate (dimensionless).
 * RATES[17] is d/dt f_CaT in component T_type_Ca_channel_f_gate (dimensionless).
 * RATES[18] is d/dt x_Kv in component voltage_dep_K_channel_x_gate (dimensionless).
 * RATES[19] is d/dt y_Kv in component voltage_dep_K_channel_y_gate (dimensionless).
 * RATES[26] is d/dt C4 in component Calcium_voltage_activated_potassium_channel_states (dimensionless).
 * RATES[25] is d/dt C3 in component Calcium_voltage_activated_potassium_channel_states (dimensionless).
 * RATES[24] is d/dt C2 in component Calcium_voltage_activated_potassium_channel_states (dimensionless).
 * RATES[23] is d/dt C1 in component Calcium_voltage_activated_potassium_channel_states (dimensionless).
 * RATES[22] is d/dt C0 in component Calcium_voltage_activated_potassium_channel_states (dimensionless).
 * RATES[21] is d/dt O4 in component Calcium_voltage_activated_potassium_channel_states (dimensionless).
 * RATES[30] is d/dt O3 in component Calcium_voltage_activated_potassium_channel_states (dimensionless).
 * RATES[29] is d/dt O2 in component Calcium_voltage_activated_potassium_channel_states (dimensionless).
 * RATES[28] is d/dt O1 in component Calcium_voltage_activated_potassium_channel_states (dimensionless).
 * RATES[27] is d/dt O0 in component Calcium_voltage_activated_potassium_channel_states (dimensionless).
 * RATES[35] is d/dt C3 in component Na_channel_states (dimensionless).
 * RATES[34] is d/dt C2 in component Na_channel_states (dimensionless).
 * RATES[33] is d/dt C1 in component Na_channel_states (dimensionless).
 * RATES[32] is d/dt O_Na in component Na_channel_states (dimensionless).
 * RATES[37] is d/dt I2 in component Na_channel_states (dimensionless).
 * RATES[36] is d/dt I1 in component Na_channel_states (dimensionless).
 * RATES[31] is d/dt Nai in component ionic_concentrations (millimolar).
 * RATES[20] is d/dt Ki in component ionic_concentrations (millimolar).
 * RATES[1] is d/dt Cai in component ionic_concentrations (millimolar).
 * There are a total of 9 condition variables.
 */
void
initConsts(double* CONSTANTS, double* RATES, double *STATES)
{
STATES[0] = -73.5049651455872;
CONSTANTS[0] = 8.314;
CONSTANTS[1] = 310;
CONSTANTS[2] = 96.48534;
CONSTANTS[3] = 50;
CONSTANTS[4] = 10000;
CONSTANTS[5] = 2.6;
CONSTANTS[6] = 300;
CONSTANTS[7] = 9700;
CONSTANTS[8] = 600;
CONSTANTS[9] = 12000;
CONSTANTS[10] = 300;
CONSTANTS[11] = -57;
CONSTANTS[12] = 33.5;
CONSTANTS[13] = 1.44;
CONSTANTS[14] = 2;
STATES[1] = 5.38843941249284e-5;
STATES[2] = 3.88576045134351e-6;
STATES[3] = 0.815464741971086;
STATES[4] = 0.152399266235657;
STATES[5] = 0.0106805060777161;
STATES[6] = 0.000332673548872087;
STATES[7] = 0.0175888495282545;
STATES[8] = 0.00328711668724504;
STATES[9] = 0.000230369020877669;
STATES[10] = 7.1754726923539e-6;
STATES[11] = 8.38123983500905e-8;
STATES[12] = 1.1193313274705e-6;
STATES[13] = 4.0998751301597e-6;
STATES[14] = 8.84306615061238e-8;
STATES[15] = 2.41429816075123e-8;
CONSTANTS[15] = 2.1;
CONSTANTS[16] = 0.0425;
STATES[16] = 0.0791635737410974;
STATES[17] = 0.377831534375835;
CONSTANTS[17] = 2.1;
CONSTANTS[18] = 2.1;
CONSTANTS[19] = 1.0217;
STATES[18] = 0.14714161078933;
STATES[19] = 0.99994773314105;
CONSTANTS[20] = 5.4;
STATES[20] = 153.604280337996;
CONSTANTS[21] = 3.1;
CONSTANTS[22] = 3.1;
CONSTANTS[23] = 80;
STATES[21] = 1.82113764497095e-6;
STATES[22] = 0.48379087935899;
STATES[23] = 0.385183559520031;
STATES[24] = 0.115002824567753;
STATES[25] = 0.0152602714149774;
STATES[26] = 0.000759264410974374;
STATES[27] = 6.94960798375172e-7;
STATES[28] = 5.55636826398253e-8;
STATES[29] = 2.85143702125325e-8;
STATES[30] = 1.59832806123435e-6;
CONSTANTS[24] = 25.1;
CONSTANTS[25] = 140;
STATES[31] = 10.5731241425458;
STATES[32] = 1.96760342050475e-6;
STATES[33] = 0.0119443135223679;
STATES[34] = 0.0109545368437155;
STATES[35] = 0.973782548650071;
STATES[36] = 0.000126882921013389;
STATES[37] = 0.00318975045717667;
CONSTANTS[26] = 2.45;
CONSTANTS[27] = 1992.335;
CONSTANTS[28] = 1.38;
CONSTANTS[29] = 87.5;
CONSTANTS[30] = 0.1;
CONSTANTS[31] = 0.35;
CONSTANTS[32] = 9.26;
CONSTANTS[33] = 1;
CONSTANTS[34] = 40;
CONSTANTS[35] = 0.022488;
CONSTANTS[36] = 0.017512;
CONSTANTS[37] = 0.034;
CONSTANTS[38] = 0.012;
CONSTANTS[39] = 0.0009;
CONSTANTS[40] = 0.0001;
CONSTANTS[41] = 1;
CONSTANTS[42] = 4;
CONSTANTS[43] = 3.50000e-12;
CONSTANTS[44] = pow(CONSTANTS[15], (CONSTANTS[1] - 310.000)/10.0000);
CONSTANTS[45] = pow(CONSTANTS[17], (CONSTANTS[1] - 297.000)/10.0000);
CONSTANTS[46] = pow(CONSTANTS[18], (CONSTANTS[1] - 297.000)/10.0000);
CONSTANTS[47] = pow(CONSTANTS[21], (CONSTANTS[1] - 297.000)/10.0000);
CONSTANTS[48] = pow(CONSTANTS[22], (CONSTANTS[1] - 297.000)/10.0000);
CONSTANTS[49] = 40633.0;
CONSTANTS[50] = 11.0000;
CONSTANTS[51] = 1.10000;
CONSTANTS[52] =  1.00000*pow(CONSTANTS[26], (CONSTANTS[1] - 297.000)/10.0000);
CONSTANTS[53] =  CONSTANTS[44]*0.0100000;
CONSTANTS[54] = 1.90580/CONSTANTS[45];
CONSTANTS[55] = 4.78030/CONSTANTS[47];
CONSTANTS[56] = 763.756/CONSTANTS[48];
CONSTANTS[57] =  4.00000*CONSTANTS[50];
CONSTANTS[58] =  3.00000*CONSTANTS[50];
CONSTANTS[59] =  2.00000*CONSTANTS[50];
CONSTANTS[60] =  1.00000*CONSTANTS[50];
CONSTANTS[61] =  4.00000*CONSTANTS[51];
CONSTANTS[62] =  3.00000*CONSTANTS[51];
CONSTANTS[63] =  2.00000*CONSTANTS[51];
CONSTANTS[64] =  1.00000*CONSTANTS[51];
RATES[0] = 0.1;
RATES[6] = 0.1;
RATES[5] = 0.1;
RATES[4] = 0.1;
RATES[3] = 0.1;
RATES[10] = 0.1;
RATES[9] = 0.1;
RATES[8] = 0.1;
RATES[7] = 0.1;
RATES[2] = 0.1;
RATES[11] = 0.1;
RATES[12] = 0.1;
RATES[13] = 0.1;
RATES[15] = 0.1;
RATES[14] = 0.1;
RATES[16] = 0.1;
RATES[17] = 0.1;
RATES[18] = 0.1;
RATES[19] = 0.1;
RATES[26] = 0.1;
RATES[25] = 0.1;
RATES[24] = 0.1;
RATES[23] = 0.1;
RATES[22] = 0.1;
RATES[21] = 0.1;
RATES[30] = 0.1;
RATES[29] = 0.1;
RATES[28] = 0.1;
RATES[27] = 0.1;
RATES[35] = 0.1;
RATES[34] = 0.1;
RATES[33] = 0.1;
RATES[32] = 0.1;
RATES[37] = 0.1;
RATES[36] = 0.1;
RATES[31] = 0.1;
RATES[20] = 0.1;
RATES[1] = 0.1;
}
void
computeResiduals(double VOI, double* CONSTANTS, double* RATES, double* OLDRATES, double* STATES,
                 double* OLDSTATES, double* ALGEBRAIC, double* CONDVARS)
{
resid[0] = RATES[0] -  (- 1.00000/CONSTANTS[3])*(ALGEBRAIC[79]+ALGEBRAIC[4]+ALGEBRAIC[28]+ALGEBRAIC[78]+ALGEBRAIC[36]+ALGEBRAIC[72]+ALGEBRAIC[73]+ALGEBRAIC[77]+ALGEBRAIC[75]+ALGEBRAIC[2]);
resid[1] = RATES[6] - (( ALGEBRAIC[9]*STATES[5])/ALGEBRAIC[26] - ( (ALGEBRAIC[10]+ALGEBRAIC[13]+ALGEBRAIC[16]+ALGEBRAIC[15]+ALGEBRAIC[25])*STATES[6])/ALGEBRAIC[26])+( ALGEBRAIC[14]*STATES[2])/ALGEBRAIC[26]+( ALGEBRAIC[21]*STATES[13])/ALGEBRAIC[26]+( ALGEBRAIC[22]*STATES[12])/ALGEBRAIC[26]+( CONSTANTS[53]*STATES[10])/ALGEBRAIC[26];
resid[2] = RATES[5] - (( ALGEBRAIC[8]*STATES[4])/ALGEBRAIC[26] - ( (ALGEBRAIC[9]+ALGEBRAIC[12]+ALGEBRAIC[25])*STATES[5])/ALGEBRAIC[26])+( ALGEBRAIC[13]*STATES[6])/ALGEBRAIC[26]+( CONSTANTS[53]*STATES[9])/ALGEBRAIC[26];
resid[3] = RATES[4] - (( ALGEBRAIC[7]*STATES[3])/ALGEBRAIC[26] - ( (ALGEBRAIC[8]+ALGEBRAIC[11]+ALGEBRAIC[25])*STATES[4])/ALGEBRAIC[26])+( ALGEBRAIC[12]*STATES[5])/ALGEBRAIC[26]+( CONSTANTS[53]*STATES[8])/ALGEBRAIC[26];
resid[4] = RATES[3] - ( - (ALGEBRAIC[7]+ALGEBRAIC[25])*STATES[3])/ALGEBRAIC[26]+( ALGEBRAIC[11]*STATES[4])/ALGEBRAIC[26]+( CONSTANTS[53]*STATES[7])/ALGEBRAIC[26];
resid[5] = RATES[10] - ((( ALGEBRAIC[25]*STATES[6])/ALGEBRAIC[26]+( ALGEBRAIC[9]*STATES[9])/ALGEBRAIC[26]) - ( (ALGEBRAIC[10]+ALGEBRAIC[13]+ALGEBRAIC[15]+ALGEBRAIC[16]+CONSTANTS[53])*STATES[10])/ALGEBRAIC[26])+( ALGEBRAIC[14]*STATES[11])/ALGEBRAIC[26]+( ALGEBRAIC[21]*STATES[14])/ALGEBRAIC[26]+( ALGEBRAIC[22]*STATES[15])/ALGEBRAIC[26];
resid[6] = RATES[9] - ((( ALGEBRAIC[25]*STATES[5])/ALGEBRAIC[26]+( ALGEBRAIC[8]*STATES[8])/ALGEBRAIC[26]) - ( (ALGEBRAIC[9]+ALGEBRAIC[12]+CONSTANTS[53])*STATES[9])/ALGEBRAIC[26])+( ALGEBRAIC[13]*STATES[10])/ALGEBRAIC[26];
resid[7] = RATES[8] - ((( ALGEBRAIC[25]*STATES[4])/ALGEBRAIC[26]+( ALGEBRAIC[7]*STATES[7])/ALGEBRAIC[26]) - ( (ALGEBRAIC[8]+ALGEBRAIC[11]+CONSTANTS[53])*STATES[8])/ALGEBRAIC[26])+( ALGEBRAIC[12]*STATES[9])/ALGEBRAIC[26];
resid[8] = RATES[7] - (( ALGEBRAIC[25]*STATES[3])/ALGEBRAIC[26] - ( (ALGEBRAIC[7]+CONSTANTS[53])*STATES[7])/ALGEBRAIC[26])+( ALGEBRAIC[11]*STATES[8])/ALGEBRAIC[26];
resid[9] = RATES[2] - (( ALGEBRAIC[10]*STATES[6])/ALGEBRAIC[26] - ( (ALGEBRAIC[14]+ALGEBRAIC[19]+ALGEBRAIC[20]+ALGEBRAIC[25])*STATES[2])/ALGEBRAIC[26])+( ALGEBRAIC[17]*STATES[13])/ALGEBRAIC[26]+( ALGEBRAIC[18]*STATES[12])/ALGEBRAIC[26]+( CONSTANTS[53]*STATES[11])/ALGEBRAIC[26];
resid[10] = RATES[11] - ((( ALGEBRAIC[25]*STATES[2])/ALGEBRAIC[26]+( ALGEBRAIC[10]*STATES[10])/ALGEBRAIC[26]) - ( (ALGEBRAIC[14]+ALGEBRAIC[19]+ALGEBRAIC[20]+CONSTANTS[53])*STATES[11])/ALGEBRAIC[26])+( ALGEBRAIC[17]*STATES[14])/ALGEBRAIC[26]+( ALGEBRAIC[18]*STATES[15])/ALGEBRAIC[26];
resid[11] = RATES[12] - ((( ALGEBRAIC[16]*STATES[6])/ALGEBRAIC[26]+( ALGEBRAIC[20]*STATES[2])/ALGEBRAIC[26]+( ALGEBRAIC[24]*STATES[13])/ALGEBRAIC[26]) - ( (ALGEBRAIC[22]+ALGEBRAIC[18]+ALGEBRAIC[23]+ALGEBRAIC[25])*STATES[12])/ALGEBRAIC[26])+( CONSTANTS[53]*STATES[15])/ALGEBRAIC[26];
resid[12] = RATES[13] - ((( ALGEBRAIC[15]*STATES[6])/ALGEBRAIC[26]+( ALGEBRAIC[19]*STATES[2])/ALGEBRAIC[26]) - ( (ALGEBRAIC[21]+ALGEBRAIC[17]+ALGEBRAIC[24]+ALGEBRAIC[25])*STATES[13])/ALGEBRAIC[26])+( ALGEBRAIC[23]*STATES[12])/ALGEBRAIC[26]+( CONSTANTS[53]*STATES[14])/ALGEBRAIC[26];
resid[13] = RATES[15] - (( ALGEBRAIC[25]*STATES[12])/ALGEBRAIC[26]+( ALGEBRAIC[16]*STATES[10])/ALGEBRAIC[26]+( ALGEBRAIC[20]*STATES[11])/ALGEBRAIC[26]+( ALGEBRAIC[24]*STATES[14])/ALGEBRAIC[26]) - ( (ALGEBRAIC[22]+ALGEBRAIC[18]+ALGEBRAIC[23]+CONSTANTS[53])*STATES[15])/ALGEBRAIC[26];
resid[14] = RATES[14] - ((( ALGEBRAIC[25]*STATES[13])/ALGEBRAIC[26]+( ALGEBRAIC[15]*STATES[10])/ALGEBRAIC[26]+( ALGEBRAIC[19]*STATES[11])/ALGEBRAIC[26]) - ( (ALGEBRAIC[21]+ALGEBRAIC[17]+ALGEBRAIC[24]+CONSTANTS[53])*STATES[14])/ALGEBRAIC[26])+( ALGEBRAIC[23]*STATES[15])/ALGEBRAIC[26];
resid[15] = RATES[16] - (ALGEBRAIC[29] - STATES[16])/CONSTANTS[54];
resid[16] = RATES[17] - (ALGEBRAIC[30] - STATES[17])/ALGEBRAIC[31];
resid[17] = RATES[18] - (ALGEBRAIC[33] - STATES[18])/CONSTANTS[55];
resid[18] = RATES[19] - (ALGEBRAIC[34] - STATES[19])/CONSTANTS[56];
resid[19] = RATES[26] - ( - (CONSTANTS[57]+ALGEBRAIC[43])*STATES[26])/ALGEBRAIC[57]+( ALGEBRAIC[52]*STATES[25])/ALGEBRAIC[57]+( ALGEBRAIC[48]*STATES[21])/ALGEBRAIC[57];
resid[20] = RATES[25] - ( - (CONSTANTS[58]+ALGEBRAIC[42]+ALGEBRAIC[52])*STATES[25])/ALGEBRAIC[57]+( ALGEBRAIC[51]*STATES[24])/ALGEBRAIC[57]+( ALGEBRAIC[47]*STATES[30])/ALGEBRAIC[57]+( CONSTANTS[57]*STATES[26])/ALGEBRAIC[57];
resid[21] = RATES[24] - ( - (CONSTANTS[59]+ALGEBRAIC[41]+ALGEBRAIC[51])*STATES[24])/ALGEBRAIC[57]+( ALGEBRAIC[50]*STATES[23])/ALGEBRAIC[57]+( ALGEBRAIC[46]*STATES[29])/ALGEBRAIC[57]+( CONSTANTS[58]*STATES[25])/ALGEBRAIC[57];
resid[22] = RATES[23] - ( - (CONSTANTS[60]+ALGEBRAIC[40]+ALGEBRAIC[50])*STATES[23])/ALGEBRAIC[57]+( ALGEBRAIC[49]*STATES[22])/ALGEBRAIC[57]+( ALGEBRAIC[45]*STATES[28])/ALGEBRAIC[57]+( CONSTANTS[59]*STATES[24])/ALGEBRAIC[57];
resid[23] = RATES[22] - ( - (ALGEBRAIC[49]+ALGEBRAIC[39])*STATES[22])/ALGEBRAIC[57]+( CONSTANTS[60]*STATES[23])/ALGEBRAIC[57]+( ALGEBRAIC[44]*STATES[27])/ALGEBRAIC[57];
resid[24] = RATES[21] - ( - (CONSTANTS[61]+ALGEBRAIC[48])*STATES[21])/ALGEBRAIC[57]+( ALGEBRAIC[56]*STATES[30])/ALGEBRAIC[57]+( ALGEBRAIC[43]*STATES[26])/ALGEBRAIC[57];
resid[25] = RATES[30] - ( - (CONSTANTS[62]+ALGEBRAIC[47]+ALGEBRAIC[56])*STATES[30])/ALGEBRAIC[57]+( ALGEBRAIC[55]*STATES[29])/ALGEBRAIC[57]+( ALGEBRAIC[42]*STATES[25])/ALGEBRAIC[57]+( CONSTANTS[61]*STATES[21])/ALGEBRAIC[57];
resid[26] = RATES[29] - ( - (CONSTANTS[63]+ALGEBRAIC[46]+ALGEBRAIC[55])*STATES[29])/ALGEBRAIC[57]+( ALGEBRAIC[54]*STATES[28])/ALGEBRAIC[57]+( ALGEBRAIC[41]*STATES[24])/ALGEBRAIC[57]+( CONSTANTS[62]*STATES[30])/ALGEBRAIC[57];
resid[27] = RATES[28] - ( - (CONSTANTS[64]+ALGEBRAIC[45]+ALGEBRAIC[54])*STATES[28])/ALGEBRAIC[57]+( ALGEBRAIC[53]*STATES[27])/ALGEBRAIC[57]+( ALGEBRAIC[40]*STATES[23])/ALGEBRAIC[57]+( CONSTANTS[63]*STATES[29])/ALGEBRAIC[57];
resid[28] = RATES[27] - ( - (ALGEBRAIC[53]+ALGEBRAIC[44])*STATES[27])/ALGEBRAIC[57]+( CONSTANTS[64]*STATES[28])/ALGEBRAIC[57]+( ALGEBRAIC[39]*STATES[22])/ALGEBRAIC[57];
resid[29] = RATES[35] - ( - ALGEBRAIC[64]*STATES[35])/ALGEBRAIC[71]+( ALGEBRAIC[63]*STATES[34])/ALGEBRAIC[71];
resid[30] = RATES[34] - ( - (ALGEBRAIC[65]+ALGEBRAIC[63])*STATES[34])/ALGEBRAIC[71]+( ALGEBRAIC[62]*STATES[33])/ALGEBRAIC[71]+( ALGEBRAIC[64]*STATES[35])/ALGEBRAIC[71];
resid[31] = RATES[33] - ( - (ALGEBRAIC[62]+ALGEBRAIC[66]+ALGEBRAIC[70])*STATES[33])/ALGEBRAIC[71]+( ALGEBRAIC[61]*STATES[32])/ALGEBRAIC[71]+( ALGEBRAIC[65]*STATES[34])/ALGEBRAIC[71]+( ALGEBRAIC[69]*STATES[36])/ALGEBRAIC[71];
resid[32] = RATES[32] - ( - (ALGEBRAIC[61]+ALGEBRAIC[67])*STATES[32])/ALGEBRAIC[71]+( ALGEBRAIC[66]*STATES[33])/ALGEBRAIC[71]+( ALGEBRAIC[60]*STATES[36])/ALGEBRAIC[71];
resid[33] = RATES[37] - ( - ALGEBRAIC[59]*STATES[37])/ALGEBRAIC[71]+( ALGEBRAIC[68]*STATES[36])/ALGEBRAIC[71];
resid[34] = RATES[36] - ( - (ALGEBRAIC[60]+ALGEBRAIC[68]+ALGEBRAIC[69])*STATES[36])/ALGEBRAIC[71]+( ALGEBRAIC[59]*STATES[37])/ALGEBRAIC[71]+( ALGEBRAIC[70]*STATES[33])/ALGEBRAIC[71]+( ALGEBRAIC[67]*STATES[32])/ALGEBRAIC[71];
resid[35] = RATES[31] - ( (- 1.00000/1.00000e+15)*(ALGEBRAIC[79]+ALGEBRAIC[75]+ ALGEBRAIC[72]*3.00000+ ALGEBRAIC[73]*3.00000))/( CONSTANTS[43]*CONSTANTS[2]);
resid[36] = RATES[20] - ( - 1.00000e-15*((ALGEBRAIC[78]+ALGEBRAIC[36]+ALGEBRAIC[77]+ALGEBRAIC[2]) -  ALGEBRAIC[73]*2.00000))/( CONSTANTS[43]*CONSTANTS[2]);
resid[37] = RATES[1] - (( - 1.00000e-15*((ALGEBRAIC[4]+ALGEBRAIC[28]) -  ALGEBRAIC[72]*2.00000))/( 2.00000*CONSTANTS[43]*CONSTANTS[2]))/(1.00000+( CONSTANTS[41]*CONSTANTS[37]*CONSTANTS[39]*pow(STATES[1], CONSTANTS[41] - 1.00000))/pow(pow(STATES[1], CONSTANTS[41])+CONSTANTS[39], 2.00000)+( CONSTANTS[42]*CONSTANTS[38]*CONSTANTS[40]*pow(STATES[1], CONSTANTS[42] - 1.00000))/pow(pow(STATES[1], CONSTANTS[42])+CONSTANTS[40], 2.00000));
}
void
computeVariables(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC)
{
}
void
computeEssentialVariables(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC)
{
ALGEBRAIC[0] = (CONDVAR[0]>=0.00000&&CONDVAR[1]<=0.00000 ?  CONSTANTS[4]*0.00000 : CONDVAR[2]>=0.00000&&CONDVAR[3]<=0.00000 ?  CONSTANTS[4]*1.00000 : CONDVAR[4]>=0.00000&&CONDVAR[5]<0.00000 ?  CONSTANTS[4]*2.00000 : CONDVAR[6]>=0.00000&&CONDVAR[7]<0.00000 ?  CONSTANTS[4]*3.00000 : 0.00000);
ALGEBRAIC[1] = VOI - ALGEBRAIC[0];
ALGEBRAIC[2] = (CONDVAR[8]<0.00000 ?  CONSTANTS[5]*(STATES[0] - (CONSTANTS[11]+( CONSTANTS[12]*ALGEBRAIC[1])/CONSTANTS[10])) :  CONSTANTS[5]*(STATES[0] - (CONSTANTS[11]+( CONSTANTS[12]*(1.00000+exp(- CONSTANTS[9]/( 2.00000*CONSTANTS[8])))*1.00000)/(1.00000+exp(((ALGEBRAIC[1] - CONSTANTS[10]) -  0.500000*CONSTANTS[9])/CONSTANTS[8])))));
ALGEBRAIC[3] =  (( CONSTANTS[0]*CONSTANTS[1])/( 2.00000*CONSTANTS[2]))*log(CONSTANTS[14]/STATES[1]);
ALGEBRAIC[4] =  CONSTANTS[13]*STATES[2]*(STATES[0] - ALGEBRAIC[3]);
ALGEBRAIC[5] =  CONSTANTS[44]*0.731000*exp(STATES[0]/30.0000);
ALGEBRAIC[7] =  4.00000*ALGEBRAIC[5];
ALGEBRAIC[8] =  3.00000*ALGEBRAIC[5];
ALGEBRAIC[9] =  2.00000*ALGEBRAIC[5];
ALGEBRAIC[10] =  1.00000*ALGEBRAIC[5];
ALGEBRAIC[6] =  CONSTANTS[44]*0.214900*exp(- STATES[0]/40.0000);
ALGEBRAIC[11] =  1.00000*ALGEBRAIC[6];
ALGEBRAIC[12] =  2.00000*ALGEBRAIC[6];
ALGEBRAIC[13] =  3.00000*ALGEBRAIC[6];
ALGEBRAIC[14] =  4.00000*ALGEBRAIC[6];
ALGEBRAIC[15] =  CONSTANTS[44]*0.474200*exp(STATES[0]/10.0000);
ALGEBRAIC[16] =  CONSTANTS[44]*0.0595600*exp(- STATES[0]/40.0000);
ALGEBRAIC[17] =  CONSTANTS[44]*0.0140700*exp(- STATES[0]/300.000);
ALGEBRAIC[18] =  CONSTANTS[44]*0.0121300*exp(STATES[0]/500.000);
ALGEBRAIC[19] =  CONSTANTS[44]*0.0219700*exp(STATES[0]/500.000);
ALGEBRAIC[20] =  CONSTANTS[44]*0.00232000*exp(- STATES[0]/280.000);
ALGEBRAIC[21] = ( ALGEBRAIC[14]*ALGEBRAIC[17]*ALGEBRAIC[15])/( ALGEBRAIC[10]*ALGEBRAIC[19]);
ALGEBRAIC[22] = ( ALGEBRAIC[14]*ALGEBRAIC[18]*ALGEBRAIC[16])/( ALGEBRAIC[10]*ALGEBRAIC[20]);
ALGEBRAIC[23] = ( ALGEBRAIC[18]*ALGEBRAIC[19])/ALGEBRAIC[17];
ALGEBRAIC[24] = ALGEBRAIC[20];
ALGEBRAIC[25] = ( CONSTANTS[44]*4.00000)/(1.00000+1.00000/STATES[1]);
ALGEBRAIC[26] = STATES[6]+STATES[5]+STATES[4]+STATES[3]+STATES[10]+STATES[9]+STATES[8]+STATES[7]+STATES[2]+STATES[11]+STATES[12]+STATES[13]+STATES[15]+STATES[14];
ALGEBRAIC[27] =  (( CONSTANTS[0]*CONSTANTS[1])/( 2.00000*CONSTANTS[2]))*log(CONSTANTS[14]/STATES[1]);
ALGEBRAIC[28] =  CONSTANTS[16]*STATES[16]*STATES[17]*(STATES[0] - ALGEBRAIC[27]);
ALGEBRAIC[29] = 1.00000/(1.00000+exp(- (STATES[0]+60.5000)/5.30000));
ALGEBRAIC[30] = 1.00000/(1.00000+exp((STATES[0]+75.5000)/4.00000));
ALGEBRAIC[31] = ( 0.381170*(8.60000+ 14.7000*exp(( - (STATES[0]+50.0000)*(STATES[0]+50.0000))/900.000)))/CONSTANTS[46];
ALGEBRAIC[33] = 1.00000/(1.00000+exp(- (STATES[0]+43.0000)/17.3600));
ALGEBRAIC[34] = 1.00000/(1.00000+exp((STATES[0] - 44.9000)/12.0096));
ALGEBRAIC[35] =  (( CONSTANTS[0]*CONSTANTS[1])/CONSTANTS[2])*log(CONSTANTS[20]/STATES[20]);
ALGEBRAIC[36] =  CONSTANTS[23]*STATES[21]*(STATES[0] - ALGEBRAIC[35]);
ALGEBRAIC[37] =  1.00000*exp(( 8.47188*STATES[0])/( 1.00000*CONSTANTS[1]));
ALGEBRAIC[39] =  0.0216200*ALGEBRAIC[37];
ALGEBRAIC[40] =  0.000869000*ALGEBRAIC[37];
ALGEBRAIC[41] =  2.81000e-05*ALGEBRAIC[37];
ALGEBRAIC[42] =  0.000781000*ALGEBRAIC[37];
ALGEBRAIC[43] =  0.0443240*ALGEBRAIC[37];
ALGEBRAIC[38] =  1.00000*exp(( - 7.77556*STATES[0])/( 1.00000*CONSTANTS[1]));
ALGEBRAIC[44] =  318.108*ALGEBRAIC[38];
ALGEBRAIC[45] =  144.174*ALGEBRAIC[38];
ALGEBRAIC[46] =  32.6594*ALGEBRAIC[38];
ALGEBRAIC[47] =  0.0953120*ALGEBRAIC[38];
ALGEBRAIC[48] =  0.000106000*ALGEBRAIC[38];
ALGEBRAIC[49] =  4.00000*CONSTANTS[49]*STATES[1];
ALGEBRAIC[50] =  3.00000*CONSTANTS[49]*STATES[1];
ALGEBRAIC[51] =  2.00000*CONSTANTS[49]*STATES[1];
ALGEBRAIC[52] =  1.00000*CONSTANTS[49]*STATES[1];
ALGEBRAIC[53] =  4.00000*CONSTANTS[49]*STATES[1];
ALGEBRAIC[54] =  3.00000*CONSTANTS[49]*STATES[1];
ALGEBRAIC[55] =  2.00000*CONSTANTS[49]*STATES[1];
ALGEBRAIC[56] =  1.00000*CONSTANTS[49]*STATES[1];
ALGEBRAIC[57] = STATES[22]+STATES[23]+STATES[24]+STATES[25]+STATES[26]+STATES[27]+STATES[28]+STATES[29]+STATES[30]+STATES[21];
ALGEBRAIC[59] =  CONSTANTS[52]*0.00392390*exp(2.67930+ 0.00614680*STATES[0]);
ALGEBRAIC[60] =  CONSTANTS[52]*0.120520*exp(- 9.60280+ 0.0830250*STATES[0]);
ALGEBRAIC[61] =  CONSTANTS[52]*2.39100*exp(- 13.3350 -  0.252890*STATES[0]);
ALGEBRAIC[62] =  CONSTANTS[52]*3.15660*exp(0.363520+ 0.0771930*STATES[0]);
ALGEBRAIC[63] =  CONSTANTS[52]*0.554320*exp(- 0.0990740+ 0.0364410*STATES[0]);
ALGEBRAIC[64] =  CONSTANTS[52]*0.000525480*exp(- 0.0691020+ 0.00319450*STATES[0]);
ALGEBRAIC[65] =  CONSTANTS[52]*1.44960*exp(- 0.156600+ 0.0583530*STATES[0]);
ALGEBRAIC[66] =  CONSTANTS[52]*1.53290*exp(0.00931930+ 0.0410750*STATES[0]);
ALGEBRAIC[67] =  CONSTANTS[52]*1.61640*exp(0.307630+ 0.00605350*STATES[0]);
ALGEBRAIC[68] =  CONSTANTS[52]*0.0277350*exp(0.0514900 -  0.0468650*STATES[0]);
ALGEBRAIC[69] =  CONSTANTS[52]*1.90460*exp(- 2.48400+ 0.0204060*STATES[0]);
ALGEBRAIC[70] =  CONSTANTS[52]*0.000216880*exp(- 0.0634380+ 0.00466830*STATES[0]);
ALGEBRAIC[71] = STATES[32]+STATES[33]+STATES[34]+STATES[35]+STATES[36]+STATES[37];
ALGEBRAIC[72] = ( CONSTANTS[27]*( exp(( CONSTANTS[31]*STATES[0]*CONSTANTS[2])/( CONSTANTS[0]*CONSTANTS[1]))*pow(STATES[31], 3.00000)*CONSTANTS[14] -  2.50000*exp(( (CONSTANTS[31] - 1.00000)*STATES[0]*CONSTANTS[2])/( CONSTANTS[0]*CONSTANTS[1]))*pow(CONSTANTS[25], 3.00000)*STATES[1]))/( (pow(CONSTANTS[29], 3.00000)+pow(CONSTANTS[25], 3.00000))*(CONSTANTS[28]+CONSTANTS[14])*(1.00000+ CONSTANTS[30]*exp(( (CONSTANTS[31] - 1.00000)*STATES[0]*CONSTANTS[2])/( CONSTANTS[0]*CONSTANTS[1]))));
ALGEBRAIC[73] = ( CONSTANTS[32]*CONSTANTS[20]*STATES[31])/( (CONSTANTS[20]+CONSTANTS[33])*(CONSTANTS[34]+STATES[31])*(1.00000+ 0.124500*exp(( - 0.100000*STATES[0]*CONSTANTS[2])/( CONSTANTS[0]*CONSTANTS[1]))+ 0.0353000*exp(( - STATES[0]*CONSTANTS[2])/( CONSTANTS[0]*CONSTANTS[1]))));
ALGEBRAIC[74] =  (( CONSTANTS[0]*CONSTANTS[1])/CONSTANTS[2])*log(CONSTANTS[25]/STATES[31]);
ALGEBRAIC[75] =  CONSTANTS[35]*(STATES[0] - ALGEBRAIC[74]);
ALGEBRAIC[76] =  (( CONSTANTS[0]*CONSTANTS[1])/CONSTANTS[2])*log(CONSTANTS[20]/STATES[20]);
ALGEBRAIC[77] =  CONSTANTS[36]*(STATES[0] - ALGEBRAIC[76]);
ALGEBRAIC[32] =  (( CONSTANTS[0]*CONSTANTS[1])/CONSTANTS[2])*log(CONSTANTS[20]/STATES[20]);
ALGEBRAIC[78] =  CONSTANTS[19]*STATES[18]*STATES[19]*(STATES[0] - ALGEBRAIC[32]);
ALGEBRAIC[58] =  (( CONSTANTS[0]*CONSTANTS[1])/CONSTANTS[2])*log(CONSTANTS[25]/STATES[31]);
ALGEBRAIC[79] =  CONSTANTS[24]*STATES[32]*(STATES[0] - ALGEBRAIC[58]);
}
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;
SI[30] = 1.0;
SI[31] = 1.0;
SI[32] = 1.0;
SI[33] = 1.0;
SI[34] = 1.0;
SI[35] = 1.0;
SI[36] = 1.0;
SI[37] = 1.0;
}
void
computeRoots(double VOI, double* CONSTANTS, double* RATES, double* OLDRATES, double* STATES,
             double* OLDSTATES, double* ALGEBRAIC, double* CONDVARS)
{
CONDVAR[0] = VOI -  CONSTANTS[4]*0.00000;
CONDVAR[1] = VOI -  CONSTANTS[4]*1.00000;
CONDVAR[2] = VOI -  CONSTANTS[4]*1.00000;
CONDVAR[3] = VOI -  CONSTANTS[4]*2.00000;
CONDVAR[4] = VOI -  CONSTANTS[4]*2.00000;
CONDVAR[5] = VOI -  CONSTANTS[4]*3.00000;
CONDVAR[6] = VOI -  CONSTANTS[4]*3.00000;
CONDVAR[7] = VOI -  CONSTANTS[4]*4.00000;
CONDVAR[8] = ALGEBRAIC[1] - CONSTANTS[6];
}