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 62 entries in the algebraic variable array.
   There are a total of 5 entries in each of the rate and state variable arrays.
   There are a total of 45 entries in the constant variable array.
 */
/*
 * VOI is time in component environment (minute).
 * CONSTANTS[0] is ADHMV in component circulatory_dynamics (dimensionless).
 * CONSTANTS[1] is AMM in component circulatory_dynamics (dimensionless).
 * CONSTANTS[2] is ANU in component circulatory_dynamics (dimensionless).
 * CONSTANTS[3] is ANUVN in component circulatory_dynamics (dimensionless).
 * CONSTANTS[4] is ARM in component circulatory_dynamics (dimensionless).
 * CONSTANTS[5] is ATRRFB in component circulatory_dynamics (dimensionless).
 * CONSTANTS[6] is ATRVFB in component circulatory_dynamics (litre).
 * CONSTANTS[7] is AU in component circulatory_dynamics (dimensionless).
 * CONSTANTS[8] is AUH in component circulatory_dynamics (dimensionless).
 * CONSTANTS[9] is AUM in component circulatory_dynamics (dimensionless).
 * CONSTANTS[10] is AVE in component circulatory_dynamics (dimensionless).
 * CONSTANTS[11] is HMD in component circulatory_dynamics (dimensionless).
 * CONSTANTS[12] is HPL in component circulatory_dynamics (dimensionless).
 * CONSTANTS[13] is HPR in component circulatory_dynamics (dimensionless).
 * CONSTANTS[14] is MYOGRS in component circulatory_dynamics (dimensionless).
 * CONSTANTS[15] is OSA in component circulatory_dynamics (dimensionless).
 * CONSTANTS[16] is PAMK in component circulatory_dynamics (dimensionless).
 * CONSTANTS[17] is PC in component circulatory_dynamics (mmHg).
 * CONSTANTS[18] is RBF in component circulatory_dynamics (L_per_minute).
 * CONSTANTS[19] is VIM in component circulatory_dynamics (dimensionless).
 * CONSTANTS[20] is VP in component circulatory_dynamics (litre).
 * CONSTANTS[21] is VRC in component circulatory_dynamics (litre).
 * CONSTANTS[22] is VV6 in component circulatory_dynamics (litre).
 * CONSTANTS[23] is VV7 in component circulatory_dynamics (litre).
 * CONSTANTS[24] is VVR in component circulatory_dynamics (litre).
 * STATES[0] is VVS1 in component venous_blood_volume (litre).
 * STATES[1] is VAS1 in component arterial_blood_volume (litre).
 * STATES[2] is VLA1 in component left_atrial_blood_volume (litre).
 * STATES[3] is VPA1 in component pulmonary_vasculature_blood_volume (litre).
 * STATES[4] is VRA1 in component right_atrial_blood_volume (litre).
 * ALGEBRAIC[0] is VBD in component total_blood_volume_change (litre).
 * ALGEBRAIC[26] is QVO in component rate_of_blood_flow_from_veins_to_right_atrium (L_per_minute).
 * ALGEBRAIC[58] is QRO in component right_ventricular_output (L_per_minute).
 * ALGEBRAIC[1] is VRA in component right_atrial_blood_volume (litre).
 * ALGEBRAIC[61] is DRA in component right_atrial_blood_volume (L_per_minute).
 * ALGEBRAIC[3] is PRA in component right_atrial_pressure (mmHg).
 * ALGEBRAIC[2] is VRE in component right_atrial_pressure (litre).
 * ALGEBRAIC[4] is PRA1 in component autonomic_stimulation_effect_on_right_atrial_pressure (mmHg).
 * CONSTANTS[25] is HTAUML in component parameter_values (dimensionless).
 * ALGEBRAIC[8] is PPA in component pulmonary_vasculature_pressure (mmHg).
 * ALGEBRAIC[44] is RVM in component pressure_effect_on_right_ventricular_pumping (dimensionless).
 * ALGEBRAIC[43] is PP2 in component pressure_effect_on_right_ventricular_pumping (mmHg).
 * ALGEBRAIC[54] is QLO in component left_ventricular_output (L_per_minute).
 * ALGEBRAIC[17] is QLN in component left_ventricular_output (L_per_minute).
 * ALGEBRAIC[57] is HPEF in component pumping_effectiveness_of_right_ventricle (L_per_minute).
 * CONSTANTS[26] is QRF in component parameter_values (L_per_minute).
 * CONSTANTS[27] is HSR in component parameter_values (dimensionless).
 * ALGEBRAIC[5] is QRN in component right_ventricular_output (dimensionless).
 * ALGEBRAIC[49] is QPO in component rate_of_blood_flow_from_pulmonary_veins_to_left_atrium (L_per_minute).
 * ALGEBRAIC[6] is VPA in component pulmonary_vasculature_blood_volume (litre).
 * ALGEBRAIC[59] is DPA in component pulmonary_vasculature_blood_volume (L_per_minute).
 * ALGEBRAIC[7] is VPE in component pulmonary_vasculature_pressure (litre).
 * ALGEBRAIC[12] is RPA in component pulmonary_arterial_resistance (mmHg_minute_per_L).
 * ALGEBRAIC[9] is PP1T in component pulmonary_arterial_resistance (L_per_minute_per_mmHg).
 * ALGEBRAIC[10] is PP1 in component pulmonary_arterial_resistance (L_per_minute_per_mmHg).
 * ALGEBRAIC[11] is CPA in component pulmonary_arterial_resistance (L_per_minute_per_mmHg).
 * ALGEBRAIC[15] is PLA in component left_atrial_pressure (mmHg).
 * ALGEBRAIC[46] is RPV in component pulmonary_venous_resistance (mmHg_minute_per_L).
 * ALGEBRAIC[45] is PL1 in component pulmonary_venous_resistance (mmHg).
 * ALGEBRAIC[47] is RPT in component total_pulmonary_vascular_resistance (mmHg_minute_per_L).
 * ALGEBRAIC[48] is PGL in component pressure_gradient_through_the_lungs (mmHg).
 * ALGEBRAIC[13] is VLA in component left_atrial_blood_volume (litre).
 * ALGEBRAIC[60] is DLA in component left_atrial_blood_volume (L_per_minute).
 * ALGEBRAIC[14] is VLE in component left_atrial_pressure (litre).
 * ALGEBRAIC[16] is PLA1 in component autonomic_stimulation_effect_on_left_atrial_pressure (mmHg).
 * ALGEBRAIC[29] is PA in component arterial_pressure_and_pressure_gradient (mmHg).
 * ALGEBRAIC[51] is LVM in component pumping_effectiveness_of_left_ventricle (dimensionless).
 * ALGEBRAIC[50] is PA2 in component pumping_effectiveness_of_left_ventricle (mmHg).
 * ALGEBRAIC[52] is QLOT in component left_ventricular_output (L_per_minute).
 * CONSTANTS[28] is HSL in component parameter_values (dimensionless).
 * ALGEBRAIC[53] is QLO1 in component left_ventricular_output (L_per_minute).
 * ALGEBRAIC[41] is QAO in component systemic_blood_flow (L_per_minute).
 * ALGEBRAIC[18] is VVS in component venous_blood_volume (litre).
 * ALGEBRAIC[55] is DVS in component venous_blood_volume (L_per_minute).
 * CONSTANTS[40] is VVA in component angiotensin_induced_venous_constriction (litre).
 * CONSTANTS[29] is ANY in component parameter_values (litre).
 * ALGEBRAIC[20] is VVE in component venous_excess_volume (litre).
 * ALGEBRAIC[19] is VVE1 in component venous_excess_volume (litre).
 * ALGEBRAIC[22] is PVS in component venous_average_pressure (mmHg).
 * CONSTANTS[30] is CV in component parameter_values (L_per_mmHg).
 * ALGEBRAIC[21] is PVS1 in component venous_average_pressure (mmHg).
 * ALGEBRAIC[23] is PR1 in component venous_outflow_pressure_into_heart (mmHg).
 * CONSTANTS[31] is PR1LL in component parameter_values (mmHg).
 * ALGEBRAIC[24] is RVG in component resistance_from_veins_to_right_atrium (mmHg_minute_per_L).
 * ALGEBRAIC[25] is PGV in component rate_of_blood_flow_from_veins_to_right_atrium (mmHg).
 * CONSTANTS[43] is RVS in component venous_resistance (mmHg_minute_per_L).
 * CONSTANTS[32] is CN7 in component parameter_values (dimensionless).
 * CONSTANTS[33] is CN2 in component parameter_values (per_mmHg).
 * CONSTANTS[34] is RVSM in component parameter_values (mmHg_minute_per_L).
 * CONSTANTS[41] is CN3 in component venous_resistance (dimensionless).
 * CONSTANTS[42] is RV1 in component venous_resistance (mmHg_minute_per_L).
 * CONSTANTS[44] is NNRVR in component NM_NR_venous_resistance (mmHg_minute_per_L).
 * ALGEBRAIC[27] is VAS in component arterial_blood_volume (litre).
 * ALGEBRAIC[56] is DAS in component arterial_blood_volume (L_per_minute).
 * ALGEBRAIC[30] is PAG in component arterial_pressure_and_pressure_gradient (mmHg).
 * ALGEBRAIC[28] is VAE in component arterial_pressure_and_pressure_gradient (litre).
 * ALGEBRAIC[31] is PAM in component pressure_effect_on_arterial_distention (dimensionless).
 * CONSTANTS[35] is PAEX in component parameter_values (dimensionless).
 * ALGEBRAIC[32] is R1 in component non_renal_systemic_arterial_resistance_multiplier (dimensionless).
 * ALGEBRAIC[33] is NNRAR in component NM_NR_arterial_resistance (mmHg_minute_per_L).
 * CONSTANTS[36] is RAR in component parameter_values (mmHg_minute_per_L).
 * CONSTANTS[37] is RMULT1 in component parameter_values (dimensionless).
 * ALGEBRAIC[34] is PGS in component pressure_gradient_from_arteries_to_veins (mmHg).
 * ALGEBRAIC[35] is RSM in component M_systemic_resistance (mmHg_minute_per_L).
 * CONSTANTS[38] is RAM in component parameter_values (mmHg_minute_per_L).
 * ALGEBRAIC[36] is RSN in component total_NM_NR_systemic_resistance (mmHg_minute_per_L).
 * ALGEBRAIC[37] is BFM in component blood_flow_through_M_tissues (L_per_minute).
 * ALGEBRAIC[38] is BFN in component blood_flow_through_NM_NR_tissues (L_per_minute).
 * ALGEBRAIC[39] is FISFLO in component blood_flow_through_AV_fistulas (L_per_minute).
 * CONSTANTS[39] is FIS in component parameter_values (L_per_minute_per_mmHg).
 * ALGEBRAIC[40] is SYSFLO in component systemic_blood_flow (L_per_minute).
 * ALGEBRAIC[42] is RTP in component total_peripheral_resistance (mmHg_minute_per_L).
 * RATES[4] is d/dt VRA1 in component right_atrial_blood_volume (litre).
 * RATES[3] is d/dt VPA1 in component pulmonary_vasculature_blood_volume (litre).
 * RATES[2] is d/dt VLA1 in component left_atrial_blood_volume (litre).
 * RATES[0] is d/dt VVS1 in component venous_blood_volume (litre).
 * RATES[1] is d/dt VAS1 in component arterial_blood_volume (litre).
 * There are a total of 45 condition variables.
 */
void
initConsts(double* CONSTANTS, double* RATES, double *STATES)
{
CONSTANTS[0] = 1.0;
CONSTANTS[1] = 1.0;
CONSTANTS[2] = 0.925271;
CONSTANTS[3] = 1.0;
CONSTANTS[4] = 1.16463;
CONSTANTS[5] = 1.0;
CONSTANTS[6] = 0.0;
CONSTANTS[7] = 1.00022;
CONSTANTS[8] = 1.00012;
CONSTANTS[9] = 1.00066;
CONSTANTS[10] = 1.0;
CONSTANTS[11] = 1.0;
CONSTANTS[12] = 1.00163;
CONSTANTS[13] = 1.00237;
CONSTANTS[14] = 1.0;
CONSTANTS[15] = 0.97287;
CONSTANTS[16] = 1.0;
CONSTANTS[17] = 16.9144;
CONSTANTS[18] = 1.22057;
CONSTANTS[19] = 1.00076;
CONSTANTS[20] = 3.00449;
CONSTANTS[21] = 2.00439;
CONSTANTS[22] = 0.0101913;
CONSTANTS[23] = 0.00366525;
CONSTANTS[24] = 2.50967;
STATES[0] = 3.28246;
STATES[1] = 0.862514;
STATES[2] = 0.379883;
STATES[3] = 0.38131;
STATES[4] = 0.100043;
CONSTANTS[25] = 0.4;
CONSTANTS[26] = 0.15;
CONSTANTS[27] = 1;
CONSTANTS[28] = 1;
CONSTANTS[29] = -0.2;
CONSTANTS[30] = 0.1;
CONSTANTS[31] = 0;
CONSTANTS[32] = 0.2;
CONSTANTS[33] = 0.0212;
CONSTANTS[34] = 1;
CONSTANTS[35] = 2;
CONSTANTS[36] = 30.52;
CONSTANTS[37] = 1;
CONSTANTS[38] = 96.3;
CONSTANTS[39] = 0;
CONSTANTS[40] =  (CONSTANTS[2] - 1.00000)*CONSTANTS[29];
CONSTANTS[41] =  ( (CONSTANTS[17] - 17.0000)*CONSTANTS[32]+17.0000)*CONSTANTS[33];
CONSTANTS[42] = CONSTANTS[34]/CONSTANTS[41];
CONSTANTS[43] =  CONSTANTS[10]*CONSTANTS[42]*CONSTANTS[19]*CONSTANTS[3];
CONSTANTS[44] =  CONSTANTS[43]*1.79000;
RATES[4] = 0.1001;
RATES[3] = 0.1001;
RATES[2] = 0.1001;
RATES[0] = 0.1001;
RATES[1] = 0.1001;
}
void
computeResiduals(double VOI, double* CONSTANTS, double* RATES, double* OLDRATES, double* STATES,
                 double* OLDSTATES, double* ALGEBRAIC, double* CONDVARS)
{
resid[0] = RATES[4] - ALGEBRAIC[61];
resid[1] = RATES[3] - ALGEBRAIC[59];
resid[2] = RATES[2] - ALGEBRAIC[60];
resid[3] = RATES[0] - ALGEBRAIC[55];
resid[4] = RATES[1] - ALGEBRAIC[56];
}
void
computeVariables(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC)
{
ALGEBRAIC[42] = ALGEBRAIC[30]/ALGEBRAIC[41];
}
void
computeEssentialVariables(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC)
{
ALGEBRAIC[0] = ((((((CONSTANTS[20]+CONSTANTS[21]) - STATES[0]) - STATES[1]) - STATES[2]) - STATES[3]) - STATES[4])/2.00000;
ALGEBRAIC[18] = STATES[0]+ ALGEBRAIC[0]*0.398600;
ALGEBRAIC[19] = ((((ALGEBRAIC[18] - CONSTANTS[24]) - CONSTANTS[40]) - CONSTANTS[23]) - CONSTANTS[22]) - CONSTANTS[6];
ALGEBRAIC[20] = (CONDVAR[42]<0.00000 ? 0.000100000 : ALGEBRAIC[19]);
ALGEBRAIC[21] = 3.70000+(ALGEBRAIC[20] - 0.740000)/CONSTANTS[30];
ALGEBRAIC[22] = (CONDVAR[43]<0.00000 ? 0.000100000 : ALGEBRAIC[21]);
ALGEBRAIC[24] = 0.740000/pow(ALGEBRAIC[22]/( CONSTANTS[19]*3.70000), 0.500000);
ALGEBRAIC[1] = STATES[4]+ ALGEBRAIC[0]*0.0574000;
ALGEBRAIC[2] = ALGEBRAIC[1] - 0.100000;
ALGEBRAIC[3] = ALGEBRAIC[2]/0.00500000;
ALGEBRAIC[23] = (CONDVAR[44]<0.00000 ? CONSTANTS[31] : ALGEBRAIC[3]);
ALGEBRAIC[25] = ALGEBRAIC[22] - ALGEBRAIC[23];
ALGEBRAIC[26] = ALGEBRAIC[25]/ALGEBRAIC[24];
ALGEBRAIC[27] = STATES[1]+ ALGEBRAIC[0]*0.261000;
ALGEBRAIC[28] = ALGEBRAIC[27] - 0.495000;
ALGEBRAIC[29] = ALGEBRAIC[28]/0.00355000;
ALGEBRAIC[30] = ALGEBRAIC[29] - ALGEBRAIC[3];
ALGEBRAIC[39] =  ALGEBRAIC[30]*CONSTANTS[39];
ALGEBRAIC[34] = ALGEBRAIC[29] - ALGEBRAIC[22];
ALGEBRAIC[31] = pow(ALGEBRAIC[29]/100.000, CONSTANTS[35]);
ALGEBRAIC[32] = (( CONSTANTS[2]*CONSTANTS[0]*CONSTANTS[9]*CONSTANTS[19]*CONSTANTS[16])/ALGEBRAIC[31])/CONSTANTS[5];
ALGEBRAIC[35] =  CONSTANTS[38]*CONSTANTS[1]*ALGEBRAIC[32]*CONSTANTS[14]*CONSTANTS[37];
ALGEBRAIC[37] = ALGEBRAIC[34]/ALGEBRAIC[35];
ALGEBRAIC[33] =  CONSTANTS[36]*CONSTANTS[4]*ALGEBRAIC[32]*CONSTANTS[14]*CONSTANTS[37];
ALGEBRAIC[36] = ALGEBRAIC[33]+CONSTANTS[44];
ALGEBRAIC[38] = ALGEBRAIC[34]/ALGEBRAIC[36];
ALGEBRAIC[40] = ALGEBRAIC[37]+ALGEBRAIC[38]+CONSTANTS[18];
ALGEBRAIC[41] = ALGEBRAIC[40]+ALGEBRAIC[39];
ALGEBRAIC[55] = ALGEBRAIC[41] - ALGEBRAIC[26];
ALGEBRAIC[13] = STATES[2]+ ALGEBRAIC[0]*0.128000;
ALGEBRAIC[14] = ALGEBRAIC[13] - 0.380000;
ALGEBRAIC[15] = ALGEBRAIC[14]/0.0100000;
ALGEBRAIC[16] =  (ALGEBRAIC[15]+4.00000)*( CONSTANTS[25]*(CONSTANTS[7] - 1.00000)+1.00000) - 4.00000;
ALGEBRAIC[17] = (CONDVAR[32]<=0.00000 ? 0.0100000 : CONDVAR[33]>0.00000&&CONDVAR[34]<=0.00000 ? 0.0100000+( (3.60000 - 0.0100000)*(ALGEBRAIC[16] - - 2.00000))/(1.00000 - - 2.00000) : CONDVAR[35]>0.00000&&CONDVAR[36]<=0.00000 ? 3.60000+( (9.40000 - 3.60000)*(ALGEBRAIC[16] - 1.00000))/(5.00000 - 1.00000) : CONDVAR[37]>0.00000&&CONDVAR[38]<=0.00000 ? 9.40000+( (11.6000 - 9.40000)*(ALGEBRAIC[16] - 5.00000))/(8.00000 - 5.00000) : CONDVAR[39]>0.00000&&CONDVAR[40]<=0.00000 ? 11.6000+( (13.5000 - 11.6000)*(ALGEBRAIC[16] - 8.00000))/(12.0000 - 8.00000) : 13.5000);
ALGEBRAIC[50] = ALGEBRAIC[29]/( CONSTANTS[8]*CONSTANTS[15]);
ALGEBRAIC[51] = (CONDVAR[21]<=0.00000 ? 1.04000 : CONDVAR[22]>0.00000&&CONDVAR[23]<=0.00000 ? 1.04000+( (1.02500 - 1.04000)*(ALGEBRAIC[50] - 0.00000))/(60.0000 - 0.00000) : CONDVAR[24]>0.00000&&CONDVAR[25]<=0.00000 ? 1.02500+( (0.970000 - 1.02500)*(ALGEBRAIC[50] - 60.0000))/(125.000 - 60.0000) : CONDVAR[26]>0.00000&&CONDVAR[27]<=0.00000 ? 0.970000+( (0.880000 - 0.970000)*(ALGEBRAIC[50] - 125.000))/(160.000 - 125.000) : CONDVAR[28]>0.00000&&CONDVAR[29]<=0.00000 ? 0.880000+( (0.590000 - 0.880000)*(ALGEBRAIC[50] - 160.000))/(200.000 - 160.000) : CONDVAR[30]>0.00000&&CONDVAR[31]<=0.00000 ? 0.590000+( (0.00000 - 0.590000)*(ALGEBRAIC[50] - 200.000))/(240.000 - 200.000) : 0.00000);
ALGEBRAIC[52] =  ALGEBRAIC[51]*ALGEBRAIC[17]*CONSTANTS[8]*CONSTANTS[28]*CONSTANTS[11]*CONSTANTS[12];
ALGEBRAIC[53] = (ALGEBRAIC[15] - ALGEBRAIC[29])/3.00000;
ALGEBRAIC[54] = (CONDVAR[41]>0.00000 ? ALGEBRAIC[52]+ALGEBRAIC[53] : ALGEBRAIC[52]);
ALGEBRAIC[56] = ALGEBRAIC[54] - ALGEBRAIC[41];
ALGEBRAIC[6] = STATES[3]+ ALGEBRAIC[0]*0.155000;
ALGEBRAIC[7] = ALGEBRAIC[6] - 0.306250;
ALGEBRAIC[8] = ALGEBRAIC[7]/0.00480000;
ALGEBRAIC[43] = (ALGEBRAIC[8]/CONSTANTS[8])/CONSTANTS[15];
ALGEBRAIC[44] = (CONDVAR[0]<=0.00000 ? 1.06000 : CONDVAR[1]>0.00000&&CONDVAR[2]<=0.00000 ? 1.06000+( (0.970000 - 1.06000)*(ALGEBRAIC[43] - 0.00000))/(32.0000 - 0.00000) : CONDVAR[3]>0.00000&&CONDVAR[4]<=0.00000 ? 0.970000+( (0.930000 - 0.970000)*(ALGEBRAIC[43] - 32.0000))/(38.4000 - 32.0000) : CONDVAR[5]>0.00000&&CONDVAR[6]<=0.00000 ? 0.930000+( (0.800000 - 0.930000)*(ALGEBRAIC[43] - 38.4000))/(48.0000 - 38.4000) : CONDVAR[7]>0.00000&&CONDVAR[8]<=0.00000 ? 0.800000+( (0.460000 - 0.800000)*(ALGEBRAIC[43] - 48.0000))/(60.8000 - 48.0000) : CONDVAR[9]>0.00000&&CONDVAR[10]<=0.00000 ? 0.460000+( (0.00000 - 0.460000)*(ALGEBRAIC[43] - 60.8000))/(72.0000 - 60.8000) : 0.00000);
ALGEBRAIC[57] =  (1.00000 - CONSTANTS[26])*CONSTANTS[8]*ALGEBRAIC[44]*CONSTANTS[27]*CONSTANTS[11]*CONSTANTS[13]+( CONSTANTS[26]*ALGEBRAIC[54])/ALGEBRAIC[17];
ALGEBRAIC[4] =  (ALGEBRAIC[3]+8.00000)*( CONSTANTS[25]*(CONSTANTS[7] - 1.00000)+1.00000) - 8.00000;
ALGEBRAIC[5] = (CONDVAR[11]<=0.00000 ? 0.00000 : CONDVAR[12]>0.00000&&CONDVAR[13]<=0.00000 ? 0.00000+( (0.750000 - 0.00000)*(ALGEBRAIC[4] - - 8.00000))/(- 6.00000 - - 8.00000) : CONDVAR[14]>0.00000&&CONDVAR[15]<=0.00000 ? 0.750000+( (2.60000 - 0.750000)*(ALGEBRAIC[4] - - 6.00000))/(- 2.00000 - - 6.00000) : CONDVAR[16]>0.00000&&CONDVAR[17]<=0.00000 ? 2.60000+( (9.80000 - 2.60000)*(ALGEBRAIC[4] - - 2.00000))/(4.00000 - - 2.00000) : CONDVAR[18]>0.00000&&CONDVAR[19]<=0.00000 ? 9.80000+( (13.5000 - 9.80000)*(ALGEBRAIC[4] - 4.00000))/(12.0000 - 4.00000) : 13.5000);
ALGEBRAIC[58] =  ALGEBRAIC[5]*ALGEBRAIC[57];
ALGEBRAIC[9] =  0.0260000*ALGEBRAIC[8];
ALGEBRAIC[10] = (CONDVAR[20]<0.00000 ? 1.00000e-05 : ALGEBRAIC[9]);
ALGEBRAIC[11] = pow(ALGEBRAIC[10], 0.500000);
ALGEBRAIC[12] = 1.00000/ALGEBRAIC[11];
ALGEBRAIC[45] = ALGEBRAIC[15]+18.0000;
ALGEBRAIC[46] = 1.00000/( ALGEBRAIC[45]*0.0357000);
ALGEBRAIC[47] = ALGEBRAIC[46]+ALGEBRAIC[12];
ALGEBRAIC[48] = ALGEBRAIC[8] - ALGEBRAIC[15];
ALGEBRAIC[49] = ALGEBRAIC[48]/ALGEBRAIC[47];
ALGEBRAIC[59] = ALGEBRAIC[58] - ALGEBRAIC[49];
ALGEBRAIC[60] = ALGEBRAIC[49] - ALGEBRAIC[54];
ALGEBRAIC[61] = ALGEBRAIC[26] - 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;
}
void
computeRoots(double VOI, double* CONSTANTS, double* RATES, double* OLDRATES, double* STATES,
             double* OLDSTATES, double* ALGEBRAIC, double* CONDVARS)
{
CONDVAR[0] = ALGEBRAIC[43] - 0.00000;
CONDVAR[1] = ALGEBRAIC[43] - 0.00000;
CONDVAR[2] = ALGEBRAIC[43] - 32.0000;
CONDVAR[3] = ALGEBRAIC[43] - 32.0000;
CONDVAR[4] = ALGEBRAIC[43] - 38.4000;
CONDVAR[5] = ALGEBRAIC[43] - 38.4000;
CONDVAR[6] = ALGEBRAIC[43] - 48.0000;
CONDVAR[7] = ALGEBRAIC[43] - 48.0000;
CONDVAR[8] = ALGEBRAIC[43] - 60.8000;
CONDVAR[9] = ALGEBRAIC[43] - 60.8000;
CONDVAR[10] = ALGEBRAIC[43] - 72.0000;
CONDVAR[11] = ALGEBRAIC[4] - - 8.00000;
CONDVAR[12] = ALGEBRAIC[4] - - 8.00000;
CONDVAR[13] = ALGEBRAIC[4] - - 6.00000;
CONDVAR[14] = ALGEBRAIC[4] - - 6.00000;
CONDVAR[15] = ALGEBRAIC[4] - - 2.00000;
CONDVAR[16] = ALGEBRAIC[4] - - 2.00000;
CONDVAR[17] = ALGEBRAIC[4] - 4.00000;
CONDVAR[18] = ALGEBRAIC[4] - 4.00000;
CONDVAR[19] = ALGEBRAIC[4] - 12.0000;
CONDVAR[20] = ALGEBRAIC[9] - 1.00000e-05;
CONDVAR[21] = ALGEBRAIC[50] - 0.00000;
CONDVAR[22] = ALGEBRAIC[50] - 0.00000;
CONDVAR[23] = ALGEBRAIC[50] - 60.0000;
CONDVAR[24] = ALGEBRAIC[50] - 60.0000;
CONDVAR[25] = ALGEBRAIC[50] - 125.000;
CONDVAR[26] = ALGEBRAIC[50] - 125.000;
CONDVAR[27] = ALGEBRAIC[50] - 160.000;
CONDVAR[28] = ALGEBRAIC[50] - 160.000;
CONDVAR[29] = ALGEBRAIC[50] - 200.000;
CONDVAR[30] = ALGEBRAIC[50] - 200.000;
CONDVAR[31] = ALGEBRAIC[50] - 240.000;
CONDVAR[32] = ALGEBRAIC[16] - - 2.00000;
CONDVAR[33] = ALGEBRAIC[16] - - 2.00000;
CONDVAR[34] = ALGEBRAIC[16] - 1.00000;
CONDVAR[35] = ALGEBRAIC[16] - 1.00000;
CONDVAR[36] = ALGEBRAIC[16] - 5.00000;
CONDVAR[37] = ALGEBRAIC[16] - 5.00000;
CONDVAR[38] = ALGEBRAIC[16] - 8.00000;
CONDVAR[39] = ALGEBRAIC[16] - 8.00000;
CONDVAR[40] = ALGEBRAIC[16] - 12.0000;
CONDVAR[41] = ALGEBRAIC[53] - 0.00000;
CONDVAR[42] = ALGEBRAIC[19] - 0.000100000;
CONDVAR[43] = ALGEBRAIC[21] - 0.000100000;
CONDVAR[44] = ALGEBRAIC[3] - CONSTANTS[31];
}