Generated Code

The following is f77 code generated by the CellML API from this CellML file. (Back to language selection)

The raw code is available.

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