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 34 entries in the algebraic variable array.
   There are a total of 19 entries in each of the rate and state variable arrays.
   There are a total of 60 entries in the constant variable array.
 */
/*
 * VOI is t in component Environment (second).
 * CONSTANTS[0] is Mg_tot in component Environment (molar).
 * CONSTANTS[1] is Pi_e in component Environment (molar).
 * CONSTANTS[2] is ADP_e in component Environment (molar).
 * CONSTANTS[3] is RT in component Fixed_parameters (kilojoule_per_mole).
 * CONSTANTS[4] is F in component Fixed_parameters (kilojoule_per_mole_per_millivolt).
 * CONSTANTS[5] is n_A in component Fixed_parameters (dimensionless).
 * CONSTANTS[6] is dG_C1o in component Fixed_parameters (kilojoule_per_mole).
 * CONSTANTS[7] is dG_C3o in component Fixed_parameters (kilojoule_per_mole).
 * CONSTANTS[8] is dG_C4o in component Fixed_parameters (kilojoule_per_mole).
 * CONSTANTS[9] is dG_F1o in component Fixed_parameters (kilojoule_per_mole).
 * CONSTANTS[10] is pH_e in component Fixed_parameters (dimensionless).
 * CONSTANTS[47] is H_e in component Fixed_parameters (molar).
 * CONSTANTS[11] is K_e in component Fixed_parameters (molar).
 * CONSTANTS[12] is ATP_e in component Fixed_parameters (molar).
 * CONSTANTS[13] is AMP_e in component Fixed_parameters (molar).
 * CONSTANTS[48] is k_dHPi in component Fixed_parameters (molar).
 * CONSTANTS[49] is k_dHatp in component Fixed_parameters (molar).
 * CONSTANTS[50] is k_dHadp in component Fixed_parameters (molar).
 * CONSTANTS[14] is K_DT in component Fixed_parameters (molar).
 * CONSTANTS[15] is K_DD in component Fixed_parameters (molar).
 * CONSTANTS[16] is K_AK in component Fixed_parameters (dimensionless).
 * CONSTANTS[17] is W_m in component Fixed_parameters (l_water_per_l_mito).
 * CONSTANTS[52] is W_x in component Fixed_parameters (l_water_per_l_mito).
 * CONSTANTS[55] is W_i in component Fixed_parameters (l_water_per_l_mito).
 * CONSTANTS[18] is gamma in component Fixed_parameters (per_micron).
 * CONSTANTS[19] is Ctot in component Fixed_parameters (molar).
 * CONSTANTS[20] is Qtot in component Fixed_parameters (molar).
 * CONSTANTS[21] is NADtot in component Fixed_parameters (molar).
 * CONSTANTS[54] is H_i in component Fixed_parameters (molar).
 * CONSTANTS[51] is K_i in component Fixed_parameters (molar).
 * CONSTANTS[22] is k_Pi1 in component Adjustable_parameters (molar).
 * CONSTANTS[23] is k_Pi2 in component Adjustable_parameters (molar).
 * CONSTANTS[24] is k_Pi3 in component Adjustable_parameters (molar).
 * CONSTANTS[25] is k_Pi4 in component Adjustable_parameters (molar).
 * CONSTANTS[26] is k_PiH in component Adjustable_parameters (molar).
 * CONSTANTS[27] is r in component Adjustable_parameters (dimensionless).
 * CONSTANTS[28] is x_DH in component Adjustable_parameters (mole_per_second_per_l_mito_per_molar).
 * CONSTANTS[29] is x_C1 in component Adjustable_parameters (mole_per_second_per_l_mito_per_molar).
 * CONSTANTS[30] is x_C3 in component Adjustable_parameters (mole_per_second_per_l_mito_per_molar).
 * CONSTANTS[31] is x_C4 in component Adjustable_parameters (mole_per_second_per_l_mito_per_molar).
 * CONSTANTS[32] is x_F1 in component Adjustable_parameters (mole_per_second_per_l_mito_per_molar_per_molar).
 * CONSTANTS[33] is x_ANT in component Adjustable_parameters (mole_per_second_per_l_mito).
 * CONSTANTS[34] is x_Pi1 in component Adjustable_parameters (mole_per_second_per_l_mito_per_molar).
 * CONSTANTS[35] is x_KH in component Adjustable_parameters (mole_per_second_per_l_mito_per_molar_per_molar).
 * CONSTANTS[36] is x_Hle in component Adjustable_parameters (mole_per_second_per_l_mito_per_molar_per_millivolt).
 * CONSTANTS[37] is x_K in component Adjustable_parameters (mole_per_second_per_l_mito_per_molar_per_millivolt).
 * CONSTANTS[38] is k_mADP in component Adjustable_parameters (molar).
 * CONSTANTS[39] is x_AK in component Adjustable_parameters (mole_per_second_per_l_mito_per_molar_per_molar).
 * CONSTANTS[40] is p_A in component Adjustable_parameters (micron_per_second).
 * CONSTANTS[41] is k_O2 in component Adjustable_parameters (molar).
 * CONSTANTS[42] is x_buff in component Adjustable_parameters (per_molar).
 * CONSTANTS[43] is x_MgA in component Adjustable_parameters (mole_per_second_per_l_mito_per_molar_per_molar).
 * CONSTANTS[44] is x_Pi2 in component Adjustable_parameters (micron_per_second).
 * ALGEBRAIC[0] is dG_H in component Proton_motive_force (kilojoule_per_mole).
 * STATES[0] is dPsi in component dPsi_dt (millivolt).
 * STATES[1] is H_x in component dH_x_dt (molar).
 * ALGEBRAIC[27] is J_DH in component Dehydrogenase_flux (mole_per_second_per_l_mito).
 * ALGEBRAIC[24] is NAD_x in component NAD_x_concentration (molar).
 * STATES[2] is NADH_x in component dNADH_x_dt (molar).
 * STATES[3] is Pi_x in component dPi_x_dt (molar).
 * ALGEBRAIC[29] is J_C1 in component Electron_flux_complex_I (mole_per_second_per_l_mito).
 * ALGEBRAIC[28] is dG_C1op in component Electron_flux_complex_I (kilojoule_per_mole).
 * ALGEBRAIC[25] is Q in component Q_concentration (molar).
 * STATES[4] is QH2 in component dQH2_dt (molar).
 * ALGEBRAIC[31] is J_C3 in component Electron_flux_complex_III (mole_per_second_per_l_mito).
 * ALGEBRAIC[30] is dG_C3op in component Electron_flux_complex_III (kilojoule_per_mole).
 * ALGEBRAIC[26] is Cox in component Cox_concentration (molar).
 * STATES[5] is Cred in component dCred_dt (molar).
 * ALGEBRAIC[32] is J_C4 in component Electron_flux_complex_IV (mole_per_second_per_l_mito).
 * ALGEBRAIC[1] is dG_C4op in component Electron_flux_complex_IV (kilojoule_per_mole).
 * STATES[6] is O2 in component dO2_dt (molar).
 * ALGEBRAIC[2] is J_F1 in component ATP_synthesis_flux (mole_per_second_per_l_mito).
 * STATES[7] is ADP_mx in component dADP_mx_dt (molar).
 * STATES[8] is ATP_mx in component dATP_mx_dt (molar).
 * ALGEBRAIC[33] is J_ANT in component ANT_flux (mole_per_second_per_l_mito).
 * ALGEBRAIC[3] is Psi_x in component ANT_flux (millivolt).
 * ALGEBRAIC[4] is Psi_i in component ANT_flux (millivolt).
 * ALGEBRAIC[11] is ADP_fi in component MgADPi_binding_flux (molar).
 * ALGEBRAIC[9] is ATP_fi in component MgATPi_binding_flux (molar).
 * ALGEBRAIC[7] is ADP_fx in component MgADPx_binding_flux (molar).
 * ALGEBRAIC[5] is ATP_fx in component MgATPx_binding_flux (molar).
 * CONSTANTS[45] is mincond in component ANT_flux (molar).
 * ALGEBRAIC[6] is J_MgATPx in component MgATPx_binding_flux (mole_per_second_per_l_mito).
 * STATES[9] is ATP_x in component dATP_x_dt (molar).
 * STATES[10] is Mg_x in component dMg_x_dt (molar).
 * ALGEBRAIC[8] is J_MgADPx in component MgADPx_binding_flux (mole_per_second_per_l_mito).
 * STATES[11] is ADP_x in component dADP_x_dt (molar).
 * ALGEBRAIC[10] is J_MgATPi in component MgATPi_binding_flux (mole_per_second_per_l_mito).
 * STATES[12] is ATP_i in component dATP_i_dt (molar).
 * STATES[13] is ATP_mi in component dATP_mi_dt (molar).
 * CONSTANTS[58] is Mg_i in component Mg_binding (molar).
 * ALGEBRAIC[12] is J_MgADPi in component MgADPi_binding_flux (mole_per_second_per_l_mito).
 * STATES[14] is ADP_i in component dADP_i_dt (molar).
 * STATES[15] is ADP_mi in component dADP_mi_dt (molar).
 * ALGEBRAIC[13] is J_ATP in component ATP_substrate_flux (mole_per_second_per_l_mito).
 * ALGEBRAIC[14] is J_ADP in component ADP_substrate_flux (mole_per_second_per_l_mito).
 * ALGEBRAIC[15] is J_AMP in component AMP_substrate_flux (mole_per_second_per_l_mito).
 * STATES[16] is AMP_i in component dAMP_i_dt (molar).
 * ALGEBRAIC[16] is J_Pi2 in component Pi_substrate_flux (mole_per_second_per_l_mito).
 * STATES[17] is Pi_i in component dPi_i_dt (molar).
 * ALGEBRAIC[19] is J_Pi1 in component Phosphate_hydrogen_cotransporter_flux (mole_per_second_per_l_mito).
 * ALGEBRAIC[17] is H2PIi in component Phosphate_hydrogen_cotransporter_flux (molar).
 * ALGEBRAIC[18] is H2PIx in component Phosphate_hydrogen_cotransporter_flux (molar).
 * ALGEBRAIC[20] is J_AKi in component Adenylate_kinase_flux (mole_per_second_per_l_mito).
 * ALGEBRAIC[21] is J_Hle in component Hydrogen_leak_flux (mole_per_second_per_l_mito).
 * ALGEBRAIC[22] is J_K in component Passive_potassium_flux (mole_per_second_per_l_mito).
 * STATES[18] is K_x in component dK_x_dt (molar).
 * ALGEBRAIC[23] is J_KH in component Potassium_hydrogen_flux (mole_per_second_per_l_mito).
 * CONSTANTS[53] is ADP_me in component ADP_binding (molar).
 * CONSTANTS[56] is ADP_fe in component ADP_binding (molar).
 * CONSTANTS[57] is Mg_e in component Mg_binding (molar).
 * CONSTANTS[46] is C_im in component dPsi_dt (mole_per_l_mito_per_millivolt).
 * RATES[1] is d/dt H_x in component dH_x_dt (molar).
 * RATES[18] is d/dt K_x in component dK_x_dt (molar).
 * RATES[10] is d/dt Mg_x in component dMg_x_dt (molar).
 * RATES[2] is d/dt NADH_x in component dNADH_x_dt (molar).
 * RATES[4] is d/dt QH2 in component dQH2_dt (molar).
 * RATES[5] is d/dt Cred in component dCred_dt (molar).
 * RATES[9] is d/dt ATP_x in component dATP_x_dt (molar).
 * RATES[11] is d/dt ADP_x in component dADP_x_dt (molar).
 * RATES[8] is d/dt ATP_mx in component dATP_mx_dt (molar).
 * RATES[7] is d/dt ADP_mx in component dADP_mx_dt (molar).
 * RATES[3] is d/dt Pi_x in component dPi_x_dt (molar).
 * RATES[12] is d/dt ATP_i in component dATP_i_dt (molar).
 * RATES[14] is d/dt ADP_i in component dADP_i_dt (molar).
 * RATES[16] is d/dt AMP_i in component dAMP_i_dt (molar).
 * RATES[13] is d/dt ATP_mi in component dATP_mi_dt (molar).
 * RATES[15] is d/dt ADP_mi in component dADP_mi_dt (molar).
 * RATES[17] is d/dt Pi_i in component dPi_i_dt (molar).
 * RATES[0] is d/dt dPsi in component dPsi_dt (millivolt).
 * RATES[6] is d/dt O2 in component dO2_dt (molar).
 * There are a total of 2 condition variables.
 */
void
initConsts(double* CONSTANTS, double* RATES, double *STATES)
{
CONSTANTS[0] = 0.005;
CONSTANTS[1] = 0.000125;
CONSTANTS[2] = 0;
CONSTANTS[3] = 2.4734;
CONSTANTS[4] = 0.096484;
CONSTANTS[5] = 3;
CONSTANTS[6] = -69.37;
CONSTANTS[7] = -32.53;
CONSTANTS[8] = -122.94;
CONSTANTS[9] = 36.03;
CONSTANTS[10] = 7.1;
CONSTANTS[11] = 0.15;
CONSTANTS[12] = 0;
CONSTANTS[13] = 0;
CONSTANTS[14] = 2.4e-5;
CONSTANTS[15] = 3.47e-4;
CONSTANTS[16] = 0.4331;
CONSTANTS[17] = 0.72376;
CONSTANTS[18] = 5.99;
CONSTANTS[19] = 0.0027;
CONSTANTS[20] = 0.00135;
CONSTANTS[21] = 0.00297;
CONSTANTS[22] = 1.3413e-4;
CONSTANTS[23] = 6.7668e-4;
CONSTANTS[24] = 1.9172e-4;
CONSTANTS[25] = 0.02531;
CONSTANTS[26] = 4.5082e-4;
CONSTANTS[27] = 4.5807;
CONSTANTS[28] = 0.09183;
CONSTANTS[29] = 0.36923;
CONSTANTS[30] = 0.091737;
CONSTANTS[31] = 3.2562e-5;
CONSTANTS[32] = 150.93;
CONSTANTS[33] = 0.0079204;
CONSTANTS[34] = 339430;
CONSTANTS[35] = 2.9802e7;
CONSTANTS[36] = 250;
CONSTANTS[37] = 0;
CONSTANTS[38] = 3.5e-6;
CONSTANTS[39] = 0;
CONSTANTS[40] = 85;
CONSTANTS[41] = 1.2e-4;
CONSTANTS[42] = 100;
CONSTANTS[43] = 1000000;
CONSTANTS[44] = 327;
STATES[0] = 160;
STATES[1] = 6.30957344480193e-8;
STATES[2] = 0.0015;
STATES[3] = 0.001;
STATES[4] = 8e-4;
STATES[5] = 0.001;
STATES[6] = 2.6e-5;
STATES[7] = 0;
STATES[8] = 0;
CONSTANTS[45] = 1e-12;
STATES[9] = 0;
STATES[10] = 0.005;
STATES[11] = 0.01;
STATES[12] = 0;
STATES[13] = 0;
STATES[14] = 0;
STATES[15] = 0;
STATES[16] = 0;
STATES[17] = 0.001;
STATES[18] = 0.14;
CONSTANTS[46] = 6.756756756756757e-6;
CONSTANTS[47] =  1.00000*pow(10.0000, - CONSTANTS[10]);
CONSTANTS[48] =  1.00000*pow(10.0000, - 6.75000);
CONSTANTS[49] =  1.00000*pow(10.0000, - 6.48000);
CONSTANTS[50] =  1.00000*pow(10.0000, - 6.29000);
CONSTANTS[51] = CONSTANTS[11];
CONSTANTS[52] =  0.900000*CONSTANTS[17];
CONSTANTS[53] = ((CONSTANTS[15]+CONSTANTS[2]+CONSTANTS[0]) -  pow((pow(CONSTANTS[15]+CONSTANTS[2]+CONSTANTS[0], 2.00000) -  4.00000*CONSTANTS[0]*CONSTANTS[2]), 1.0 / 2))/2.00000;
CONSTANTS[59] = 0.00000;
CONSTANTS[54] = CONSTANTS[47];
CONSTANTS[55] =  0.100000*CONSTANTS[17];
CONSTANTS[56] = CONSTANTS[2] - CONSTANTS[53];
CONSTANTS[57] = CONSTANTS[0] - CONSTANTS[53];
CONSTANTS[58] = CONSTANTS[57];
RATES[1] = 0.1001;
RATES[18] = 0.1001;
RATES[10] = 0.1001;
RATES[2] = 0.1001;
RATES[4] = 0.1001;
RATES[5] = 0.1001;
RATES[9] = 0.1001;
RATES[11] = 0.1001;
RATES[8] = 0.1001;
RATES[7] = 0.1001;
RATES[3] = 0.1001;
RATES[12] = 0.1001;
RATES[14] = 0.1001;
RATES[16] = 0.1001;
RATES[13] = 0.1001;
RATES[15] = 0.1001;
RATES[17] = 0.1001;
RATES[0] = 0.1001;
}
void
computeResiduals(double VOI, double* CONSTANTS, double* RATES, double* OLDRATES, double* STATES,
                 double* OLDSTATES, double* ALGEBRAIC, double* CONDVARS)
{
resid[0] = RATES[1] - ( CONSTANTS[42]*STATES[1]*(((((ALGEBRAIC[27] -  5.00000*ALGEBRAIC[29]) -  2.00000*ALGEBRAIC[31]) -  4.00000*ALGEBRAIC[32])+ (CONSTANTS[5] - 1.00000)*ALGEBRAIC[2]+ 2.00000*ALGEBRAIC[19]+ALGEBRAIC[21]) - ALGEBRAIC[23]))/CONSTANTS[52];
resid[1] = RATES[18] - (ALGEBRAIC[23]+ALGEBRAIC[22])/CONSTANTS[52];
resid[2] = RATES[10] - (- ALGEBRAIC[6] - ALGEBRAIC[8])/CONSTANTS[52];
resid[3] = RATES[2] - (ALGEBRAIC[27] - ALGEBRAIC[29])/CONSTANTS[52];
resid[4] = RATES[4] - (ALGEBRAIC[29] - ALGEBRAIC[31])/CONSTANTS[52];
resid[5] = RATES[5] - ( 2.00000*ALGEBRAIC[31] -  2.00000*ALGEBRAIC[32])/CONSTANTS[55];
resid[6] = RATES[9] - (ALGEBRAIC[2] - ALGEBRAIC[33])/CONSTANTS[52];
resid[7] = RATES[11] - (- ALGEBRAIC[2]+ALGEBRAIC[33])/CONSTANTS[52];
resid[8] = RATES[8] - ALGEBRAIC[6]/CONSTANTS[52];
resid[9] = RATES[7] - ALGEBRAIC[8]/CONSTANTS[52];
resid[10] = RATES[3] - (- ALGEBRAIC[2]+ALGEBRAIC[19])/CONSTANTS[52];
resid[11] = RATES[12] - (ALGEBRAIC[13]+ALGEBRAIC[33]+ALGEBRAIC[20])/CONSTANTS[55];
resid[12] = RATES[14] - ((ALGEBRAIC[14] - ALGEBRAIC[33]) -  2.00000*ALGEBRAIC[20])/CONSTANTS[55];
resid[13] = RATES[16] - (ALGEBRAIC[15]+ALGEBRAIC[20])/CONSTANTS[55];
resid[14] = RATES[13] - ALGEBRAIC[10]/CONSTANTS[55];
resid[15] = RATES[15] - ALGEBRAIC[12]/CONSTANTS[55];
resid[16] = RATES[17] - (- ALGEBRAIC[19]+ALGEBRAIC[16])/CONSTANTS[55];
resid[17] = RATES[0] - ((((( 4.00000*ALGEBRAIC[29]+ 2.00000*ALGEBRAIC[31]+ 4.00000*ALGEBRAIC[32]) -  CONSTANTS[5]*ALGEBRAIC[2]) - ALGEBRAIC[33]) - ALGEBRAIC[21]) - ALGEBRAIC[22])/CONSTANTS[46];
resid[18] = RATES[6] - CONSTANTS[59];
}
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] =  CONSTANTS[4]*STATES[0]+ CONSTANTS[3]*log(CONSTANTS[54]/STATES[1]);
ALGEBRAIC[2] =  CONSTANTS[32]*( (( exp(- (CONSTANTS[9] -  CONSTANTS[5]*ALGEBRAIC[0])/CONSTANTS[3])*CONSTANTS[15])/CONSTANTS[14])*STATES[7]*STATES[3] -  STATES[8]*1.00000);
ALGEBRAIC[5] = STATES[9] - STATES[8];
ALGEBRAIC[6] =  CONSTANTS[43]*( ALGEBRAIC[5]*STATES[10] -  CONSTANTS[14]*STATES[8]);
ALGEBRAIC[7] = STATES[11] - STATES[7];
ALGEBRAIC[8] =  CONSTANTS[43]*( ALGEBRAIC[7]*STATES[10] -  CONSTANTS[15]*STATES[7]);
ALGEBRAIC[9] = STATES[12] - STATES[13];
ALGEBRAIC[10] =  CONSTANTS[43]*( ALGEBRAIC[9]*CONSTANTS[58] -  CONSTANTS[14]*STATES[13]);
ALGEBRAIC[11] = STATES[14] - STATES[15];
ALGEBRAIC[12] =  CONSTANTS[43]*( ALGEBRAIC[11]*CONSTANTS[58] -  CONSTANTS[15]*STATES[15]);
ALGEBRAIC[13] =  CONSTANTS[18]*CONSTANTS[40]*(CONSTANTS[12] - STATES[12]);
ALGEBRAIC[14] =  CONSTANTS[18]*CONSTANTS[40]*(CONSTANTS[2] - STATES[14]);
ALGEBRAIC[15] =  CONSTANTS[18]*CONSTANTS[40]*(CONSTANTS[13] - STATES[16]);
ALGEBRAIC[16] =  CONSTANTS[18]*CONSTANTS[44]*(CONSTANTS[1] - STATES[17]);
ALGEBRAIC[17] = ( STATES[17]*CONSTANTS[54])/(CONSTANTS[54]+CONSTANTS[48]);
ALGEBRAIC[18] = ( STATES[3]*STATES[1])/(STATES[1]+CONSTANTS[48]);
ALGEBRAIC[19] = ( CONSTANTS[34]*( STATES[1]*ALGEBRAIC[17] -  CONSTANTS[54]*ALGEBRAIC[18]))/(ALGEBRAIC[17]+CONSTANTS[26]);
ALGEBRAIC[20] =  CONSTANTS[39]*( CONSTANTS[16]*STATES[14]*STATES[14] -  STATES[16]*STATES[12]);
ALGEBRAIC[21] = ( CONSTANTS[36]*STATES[0]*( CONSTANTS[54]*exp(( CONSTANTS[4]*STATES[0])/CONSTANTS[3]) - STATES[1]))/(exp(( CONSTANTS[4]*STATES[0])/CONSTANTS[3]) - 1.00000);
ALGEBRAIC[22] = ( CONSTANTS[37]*STATES[0]*( CONSTANTS[51]*exp(( CONSTANTS[4]*STATES[0])/CONSTANTS[3]) - STATES[18]))/(exp(( CONSTANTS[4]*STATES[0])/CONSTANTS[3]) - 1.00000);
ALGEBRAIC[23] =  CONSTANTS[35]*( CONSTANTS[51]*STATES[1] -  STATES[18]*CONSTANTS[54]);
ALGEBRAIC[24] = CONSTANTS[21] - STATES[2];
ALGEBRAIC[27] = ( CONSTANTS[28]*( CONSTANTS[27]*ALGEBRAIC[24] - STATES[2])*(1.00000+STATES[3]/CONSTANTS[22]))/(1.00000+STATES[3]/CONSTANTS[23]);
ALGEBRAIC[25] = CONSTANTS[20] - STATES[4];
ALGEBRAIC[28] = (CONSTANTS[6] -  CONSTANTS[3]*log(STATES[1]/1.00000e-07)) -  CONSTANTS[3]*log(ALGEBRAIC[25]/STATES[4]);
ALGEBRAIC[29] =  CONSTANTS[29]*( exp(- (ALGEBRAIC[28]+ 4.00000*ALGEBRAIC[0])/CONSTANTS[3])*STATES[2] - ALGEBRAIC[24]);
ALGEBRAIC[30] = (CONSTANTS[7]+ 2.00000*CONSTANTS[3]*log(STATES[1]/1.00000e-07)) -  CONSTANTS[3]*log(STATES[4]/ALGEBRAIC[25]);
ALGEBRAIC[26] = CONSTANTS[19] - STATES[5];
ALGEBRAIC[31] =  (( CONSTANTS[30]*(1.00000+STATES[3]/CONSTANTS[24]))/(1.00000+STATES[3]/CONSTANTS[25]))*( exp(- ((ALGEBRAIC[30]+ 4.00000*ALGEBRAIC[0]) -  2.00000*CONSTANTS[4]*STATES[0])/( 2.00000*CONSTANTS[3]))*ALGEBRAIC[26] - STATES[5]);
ALGEBRAIC[1] = (CONSTANTS[8] -  2.00000*CONSTANTS[3]*log(STATES[1]/1.00000e-07)) -  (CONSTANTS[3]/2.00000)*log(STATES[6]/1.00000);
ALGEBRAIC[32] =  (( (( CONSTANTS[31]*1.00000)/(1.00000+CONSTANTS[41]/STATES[6]))*STATES[5])/CONSTANTS[19])*( exp(- (ALGEBRAIC[1]+ 2.00000*ALGEBRAIC[0])/( 2.00000*CONSTANTS[3]))*STATES[5] -  ALGEBRAIC[26]*exp(( CONSTANTS[4]*STATES[0])/CONSTANTS[3]));
ALGEBRAIC[3] =  - 0.650000*STATES[0];
ALGEBRAIC[4] =  0.350000*STATES[0];
ALGEBRAIC[33] = (CONDVAR[0]>0.00000||CONDVAR[1]>0.00000 ? ( CONSTANTS[33]*(ALGEBRAIC[11]/(ALGEBRAIC[11]+ ALGEBRAIC[9]*exp(( - CONSTANTS[4]*ALGEBRAIC[4])/CONSTANTS[3])) - ALGEBRAIC[7]/(ALGEBRAIC[7]+ ALGEBRAIC[5]*exp(( - CONSTANTS[4]*ALGEBRAIC[3])/CONSTANTS[3])))*ALGEBRAIC[11])/(CONSTANTS[38]+ALGEBRAIC[11]) : 0.00000);
}
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;
}
void
computeRoots(double VOI, double* CONSTANTS, double* RATES, double* OLDRATES, double* STATES,
             double* OLDSTATES, double* ALGEBRAIC, double* CONDVARS)
{
CONDVAR[0] = ALGEBRAIC[11] - CONSTANTS[45];
CONDVAR[1] = ALGEBRAIC[9] - CONSTANTS[45];
}