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 31 entries in each of the rate and state variable arrays.
C There are a total of 70 entries in the constant variable array.
C
C
C VOI is time in component environment (ms).
C STATES(1) is V in component membrane (mV).
C CONSTS(1) is R in component membrane (gas_constant_units).
C CONSTS(2) is T in component membrane (kelvin).
C CONSTS(3) is F in component membrane (faradays_constant_units).
C ALGBRC(16) is i_Na in component fast_sodium_current (uA_per_mm2).
C ALGBRC(20) is i_Ca_L_Ca in component L_type_Ca_channel (uA_per_mm2).
C ALGBRC(22) is i_Ca_L_K in component L_type_Ca_channel (uA_per_mm2).
C ALGBRC(26) is i_K in component time_dependent_potassium_current (uA_per_mm2).
C ALGBRC(32) is i_K1 in component time_independent_potassium_current (uA_per_mm2).
C ALGBRC(36) is i_NaCa in component Na_Ca_exchanger (uA_per_mm2).
C ALGBRC(35) is i_Kp in component plateau_potassium_current (uA_per_mm2).
C ALGBRC(37) is i_p_Ca in component sarcolemmal_calcium_pump (uA_per_mm2).
C ALGBRC(39) is i_Na_b in component sodium_background_current (uA_per_mm2).
C ALGBRC(41) is i_Ca_b in component calcium_background_current (uA_per_mm2).
C ALGBRC(44) is i_NaK in component sodium_potassium_pump (uA_per_mm2).
C ALGBRC(61) is i_ns_Ca in component non_specific_calcium_activated_current (uA_per_mm2).
C CONSTS(4) is Cm in component membrane (uF_per_mm2).
C ALGBRC(7) is I_stim in component membrane (uA_per_mm2).
C CONSTS(5) is stim_start in component membrane (ms).
C CONSTS(6) is stim_end in component membrane (ms).
C CONSTS(7) is stim_period in component membrane (ms).
C CONSTS(8) is stim_duration in component membrane (ms).
C CONSTS(9) is stim_amplitude in component membrane (uA_per_mm2).
C ALGBRC(14) is E_Na in component fast_sodium_current (mV).
C CONSTS(10) is g_Na in component fast_sodium_current (mS_per_mm2).
C STATES(2) is Nai in component ionic_concentrations (mM).
C CONSTS(11) is Nao in component ionic_concentrations (mM).
C STATES(3) is m in component fast_sodium_current_m_gate (dimensionless).
C STATES(4) is h in component fast_sodium_current_h_gate (dimensionless).
C STATES(5) is j in component fast_sodium_current_j_gate (dimensionless).
C ALGBRC(1) is alpha_m in component fast_sodium_current_m_gate (per_ms).
C ALGBRC(8) is beta_m in component fast_sodium_current_m_gate (per_ms).
C ALGBRC(2) is alpha_h in component fast_sodium_current_h_gate (per_ms).
C ALGBRC(9) is beta_h in component fast_sodium_current_h_gate (per_ms).
C ALGBRC(3) is alpha_j in component fast_sodium_current_j_gate (per_ms).
C ALGBRC(10) is beta_j in component fast_sodium_current_j_gate (per_ms).
C CONSTS(12) is P_Ca in component L_type_Ca_channel (mm_per_ms).
C CONSTS(13) is P_K in component L_type_Ca_channel (mm_per_ms).
C ALGBRC(21) is p_k in component L_type_Ca_channel (mm_per_ms).
C CONSTS(14) is i_Ca_L_Ca_half in component L_type_Ca_channel (uA_per_mm2).
C ALGBRC(18) is i_Ca_L_Ca_max in component L_type_Ca_channel (uA_per_mm2).
C STATES(6) is O in component L_type_Ca_channel (dimensionless).
C STATES(7) is O_Ca in component L_type_Ca_channel (dimensionless).
C ALGBRC(4) is alpha in component L_type_Ca_channel (per_ms).
C ALGBRC(11) is beta in component L_type_Ca_channel (per_ms).
C ALGBRC(19) is gamma in component L_type_Ca_channel (per_ms).
C ALGBRC(15) is alpha_a in component L_type_Ca_channel (per_ms).
C ALGBRC(17) is beta_b in component L_type_Ca_channel (per_ms).
C CONSTS(15) is a in component L_type_Ca_channel (dimensionless).
C CONSTS(16) is b in component L_type_Ca_channel (dimensionless).
C CONSTS(17) is g in component L_type_Ca_channel (per_ms).
C CONSTS(18) is f in component L_type_Ca_channel (per_ms).
C CONSTS(19) is g_ in component L_type_Ca_channel (per_ms).
C CONSTS(20) is f_ in component L_type_Ca_channel (per_ms).
C CONSTS(21) is omega in component L_type_Ca_channel (per_ms).
C STATES(8) is C0 in component L_type_Ca_channel (dimensionless).
C STATES(9) is C1 in component L_type_Ca_channel (dimensionless).
C STATES(10) is C2 in component L_type_Ca_channel (dimensionless).
C STATES(11) is C3 in component L_type_Ca_channel (dimensionless).
C STATES(12) is C4 in component L_type_Ca_channel (dimensionless).
C STATES(13) is C_Ca0 in component L_type_Ca_channel (dimensionless).
C STATES(14) is C_Ca1 in component L_type_Ca_channel (dimensionless).
C STATES(15) is C_Ca2 in component L_type_Ca_channel (dimensionless).
C STATES(16) is C_Ca3 in component L_type_Ca_channel (dimensionless).
C STATES(17) is C_Ca4 in component L_type_Ca_channel (dimensionless).
C STATES(18) is Ca_SS in component calcium_subsystem (mM).
C CONSTS(22) is Cao in component ionic_concentrations (mM).
C STATES(19) is Ko in component ionic_concentrations (mM).
C STATES(20) is Ki in component ionic_concentrations (mM).
C STATES(21) is y in component L_type_Ca_channel_y_gate (dimensionless).
C ALGBRC(5) is y_infinity in component L_type_Ca_channel_y_gate (dimensionless).
C ALGBRC(12) is tau_y in component L_type_Ca_channel_y_gate (dimensionless).
C ALGBRC(23) is g_K in component time_dependent_potassium_current (mS_per_mm2).
C CONSTS(23) is g_K_max in component time_dependent_potassium_current (mS_per_mm2).
C ALGBRC(24) is E_K in component time_dependent_potassium_current (mV).
C CONSTS(24) is P_NaK in component time_dependent_potassium_current (dimensionless).
C STATES(22) is X in component time_dependent_potassium_current_X_gate (dimensionless).
C ALGBRC(25) is Xi in component time_dependent_potassium_current_Xi_gate (dimensionless).
C ALGBRC(6) is alpha_X in component time_dependent_potassium_current_X_gate (per_ms).
C ALGBRC(13) is beta_X in component time_dependent_potassium_current_X_gate (per_ms).
C ALGBRC(28) is E_K1 in component time_independent_potassium_current (mV).
C ALGBRC(27) is g_K1 in component time_independent_potassium_current (mS_per_mm2).
C CONSTS(25) is g_K1_max in component time_independent_potassium_current (mS_per_mm2).
C ALGBRC(31) is K1_infinity in component time_independent_potassium_current_K1_gate (dimensionless).
C ALGBRC(29) is alpha_K1 in component time_independent_potassium_current_K1_gate (per_ms).
C ALGBRC(30) is beta_K1 in component time_independent_potassium_current_K1_gate (per_ms).
C ALGBRC(33) is E_Kp in component plateau_potassium_current (mV).
C CONSTS(26) is g_Kp in component plateau_potassium_current (mS_per_mm2).
C ALGBRC(34) is Kp in component plateau_potassium_current (dimensionless).
C CONSTS(27) is k_NaCa in component Na_Ca_exchanger (uA_per_mm2).
C CONSTS(28) is K_mNa in component Na_Ca_exchanger (mM).
C CONSTS(29) is K_mCa in component Na_Ca_exchanger (mM).
C CONSTS(30) is k_sat in component Na_Ca_exchanger (dimensionless).
C CONSTS(31) is eta in component Na_Ca_exchanger (dimensionless).
C STATES(23) is Cai in component calcium_subsystem (mM).
C CONSTS(32) is K_mpCa in component sarcolemmal_calcium_pump (mM).
C CONSTS(33) is I_pCa in component sarcolemmal_calcium_pump (uA_per_mm2).
C CONSTS(34) is g_Nab in component sodium_background_current (mS_per_mm2).
C ALGBRC(38) is E_NaN in component sodium_background_current (mV).
C CONSTS(35) is g_Cab in component calcium_background_current (mS_per_mm2).
C ALGBRC(40) is E_CaN in component calcium_background_current (mV).
C CONSTS(36) is I_NaK in component sodium_potassium_pump (uA_per_mm2).
C ALGBRC(42) is f_NaK in component sodium_potassium_pump (dimensionless).
C CONSTS(37) is K_mNai in component sodium_potassium_pump (mM).
C CONSTS(38) is K_mKo in component sodium_potassium_pump (mM).
C CONSTS(67) is sigma in component sodium_potassium_pump (dimensionless).
C ALGBRC(53) is i_ns_Na in component non_specific_calcium_activated_current (uA_per_mm2).
C ALGBRC(59) is i_ns_K in component non_specific_calcium_activated_current (uA_per_mm2).
C ALGBRC(50) is I_ns_Na in component non_specific_calcium_activated_current (uA_per_mm2).
C ALGBRC(57) is I_ns_K in component non_specific_calcium_activated_current (uA_per_mm2).
C CONSTS(39) is K_m_ns_Ca in component non_specific_calcium_activated_current (mM).
C CONSTS(40) is P_ns_Ca in component non_specific_calcium_activated_current (mm_per_ms).
C ALGBRC(46) is EnsCa in component non_specific_calcium_activated_current (mV).
C ALGBRC(48) is VnsCa in component non_specific_calcium_activated_current (mV).
C CONSTS(41) is Am in component calcium_subsystem (per_mm).
C CONSTS(42) is V_myo in component calcium_subsystem (dimensionless).
C ALGBRC(43) is RyR_open in component calcium_subsystem (dimensionless).
C STATES(24) is P_O1 in component calcium_subsystem (dimensionless).
C STATES(25) is P_O2 in component calcium_subsystem (dimensionless).
C STATES(26) is P_C1 in component calcium_subsystem (dimensionless).
C STATES(27) is P_C2 in component calcium_subsystem (dimensionless).
C CONSTS(43) is v1 in component calcium_subsystem (per_ms).
C CONSTS(44) is v2 in component calcium_subsystem (per_ms).
C CONSTS(45) is v3 in component calcium_subsystem (mM_per_ms).
C CONSTS(46) is nCa in component calcium_subsystem (dimensionless).
C CONSTS(47) is mCa in component calcium_subsystem (dimensionless).
C CONSTS(48) is k_a_plus in component calcium_subsystem (per_mM4_per_ms).
C CONSTS(49) is k_a_minus in component calcium_subsystem (per_ms).
C CONSTS(50) is k_b_plus in component calcium_subsystem (per_mM3_per_ms).
C CONSTS(51) is k_b_minus in component calcium_subsystem (per_ms).
C CONSTS(52) is k_c_plus in component calcium_subsystem (per_ms).
C CONSTS(53) is k_c_minus in component calcium_subsystem (per_ms).
C CONSTS(54) is k_htrpn_plus in component calcium_subsystem (per_mM_per_ms).
C CONSTS(55) is k_htrpn_minus in component calcium_subsystem (per_ms).
C CONSTS(56) is k_ltrpn_plus in component calcium_subsystem (per_mM_per_ms).
C CONSTS(57) is k_ltrpn_minus in component calcium_subsystem (per_ms).
C CONSTS(58) is tau_tr in component calcium_subsystem (ms).
C STATES(28) is Ca_JSR in component calcium_subsystem (mM).
C STATES(29) is Ca_NSR in component calcium_subsystem (mM).
C CONSTS(70) is V_JSR in component calcium_subsystem (dimensionless).
C CONSTS(69) is V_NSR in component calcium_subsystem (dimensionless).
C CONSTS(68) is V_SS in component calcium_subsystem (dimensionless).
C CONSTS(59) is K_mup in component calcium_subsystem (mM).
C CONSTS(60) is K_mCMDN in component calcium_subsystem (mM).
C CONSTS(61) is K_mCSQN in component calcium_subsystem (mM).
C CONSTS(62) is tau_xfer in component calcium_subsystem (ms).
C CONSTS(63) is HTRPN_tot in component calcium_subsystem (mM).
C CONSTS(64) is LTRPN_tot in component calcium_subsystem (mM).
C STATES(30) is HTRPNCa in component calcium_subsystem (mM).
C STATES(31) is LTRPNCa in component calcium_subsystem (mM).
C CONSTS(65) is CSQN_tot in component calcium_subsystem (mM).
C CONSTS(66) is CMDN_tot in component calcium_subsystem (mM).
C ALGBRC(62) is Bi in component calcium_subsystem (dimensionless).
C ALGBRC(54) is B_SS in component calcium_subsystem (dimensionless).
C ALGBRC(55) is B_JSR in component calcium_subsystem (dimensionless).
C ALGBRC(45) is J_rel in component calcium_subsystem (mM_per_ms).
C ALGBRC(47) is J_leak in component calcium_subsystem (mM_per_ms).
C ALGBRC(49) is J_up in component calcium_subsystem (mM_per_ms).
C ALGBRC(51) is J_tr in component calcium_subsystem (mM_per_ms).
C ALGBRC(52) is J_xfer in component calcium_subsystem (mM_per_ms).
C ALGBRC(60) is J_trpn in component calcium_subsystem (mM_per_ms).
C ALGBRC(56) is J_htrpn in component calcium_subsystem (mM_per_ms).
C ALGBRC(58) is J_ltrpn in component calcium_subsystem (mM_per_ms).
C RATES(1) is d/dt V in component membrane (mV).
C RATES(3) is d/dt m in component fast_sodium_current_m_gate (dimensionless).
C RATES(4) is d/dt h in component fast_sodium_current_h_gate (dimensionless).
C RATES(5) is d/dt j in component fast_sodium_current_j_gate (dimensionless).
C RATES(8) is d/dt C0 in component L_type_Ca_channel (dimensionless).
C RATES(9) is d/dt C1 in component L_type_Ca_channel (dimensionless).
C RATES(10) is d/dt C2 in component L_type_Ca_channel (dimensionless).
C RATES(11) is d/dt C3 in component L_type_Ca_channel (dimensionless).
C RATES(12) is d/dt C4 in component L_type_Ca_channel (dimensionless).
C RATES(6) is d/dt O in component L_type_Ca_channel (dimensionless).
C RATES(13) is d/dt C_Ca0 in component L_type_Ca_channel (dimensionless).
C RATES(14) is d/dt C_Ca1 in component L_type_Ca_channel (dimensionless).
C RATES(15) is d/dt C_Ca2 in component L_type_Ca_channel (dimensionless).
C RATES(16) is d/dt C_Ca3 in component L_type_Ca_channel (dimensionless).
C RATES(17) is d/dt C_Ca4 in component L_type_Ca_channel (dimensionless).
C RATES(7) is d/dt O_Ca in component L_type_Ca_channel (dimensionless).
C RATES(21) is d/dt y in component L_type_Ca_channel_y_gate (dimensionless).
C RATES(22) is d/dt X in component time_dependent_potassium_current_X_gate (dimensionless).
C RATES(26) is d/dt P_C1 in component calcium_subsystem (dimensionless).
C RATES(24) is d/dt P_O1 in component calcium_subsystem (dimensionless).
C RATES(25) is d/dt P_O2 in component calcium_subsystem (dimensionless).
C RATES(27) is d/dt P_C2 in component calcium_subsystem (dimensionless).
C RATES(30) is d/dt HTRPNCa in component calcium_subsystem (mM).
C RATES(31) is d/dt LTRPNCa in component calcium_subsystem (mM).
C RATES(23) is d/dt Cai in component calcium_subsystem (mM).
C RATES(18) is d/dt Ca_SS in component calcium_subsystem (mM).
C RATES(28) is d/dt Ca_JSR in component calcium_subsystem (mM).
C RATES(29) is d/dt Ca_NSR in component calcium_subsystem (mM).
C RATES(2) is d/dt Nai in component ionic_concentrations (mM).
C RATES(20) is d/dt Ki in component ionic_concentrations (mM).
C RATES(19) is d/dt Ko in component ionic_concentrations (mM).
C
      SUBROUTINE initConsts(CONSTS, RATES, STATES)
      REAL CONSTS(*), RATES(*), STATES(*)
      STATES(1) = -84.1638
      CONSTS(1) = 8.3145e3
      CONSTS(2) = 310
      CONSTS(3) = 9.6845e4
      CONSTS(4) = 0.01
      CONSTS(5) = 100
      CONSTS(6) = 10100
      CONSTS(7) = 500
      CONSTS(8) = 1
      CONSTS(9) = 0.516289
      CONSTS(10) = 0.128
      STATES(2) = 10.2042
      CONSTS(11) = 140
      STATES(3) = 0.0328302
      STATES(4) = 0.988354
      STATES(5) = 0.99254
      CONSTS(12) = 33.75e-6
      CONSTS(13) = 1e-9
      CONSTS(14) = -4.58e-3
      STATES(6) = 9.84546e-21
      STATES(7) = 0
      CONSTS(15) = 2
      CONSTS(16) = 2
      CONSTS(17) = 2
      CONSTS(18) = 0.3
      CONSTS(19) = 0
      CONSTS(20) = 0
      CONSTS(21) = 0.01
      STATES(8) = 0.997208
      STATES(9) = 6.38897e-5
      STATES(10) = 1.535e-9
      STATES(11) = 1.63909e-14
      STATES(12) = 6.56337e-20
      STATES(13) = 2.72826e-3
      STATES(14) = 6.99215e-7
      STATES(15) = 6.71989e-11
      STATES(16) = 2.87031e-15
      STATES(17) = 4.59752e-20
      STATES(18) = 1.36058e-4
      CONSTS(22) = 1.8
      STATES(19) = 5.4
      STATES(20) = 143.727
      STATES(21) = 0.998983
      CONSTS(23) = 0.001128
      CONSTS(24) = 0.01833
      STATES(22) = 0.000928836
      CONSTS(25) = 7.5e-3
      CONSTS(26) = 8.28e-5
      CONSTS(27) = 50
      CONSTS(28) = 87.5
      CONSTS(29) = 1.38
      CONSTS(30) = 0.1
      CONSTS(31) = 0.35
      STATES(23) = 9.94893e-11
      CONSTS(32) = 0.5e-3
      CONSTS(33) = 1.15e-2
      CONSTS(34) = 1.41e-5
      CONSTS(35) = 6.032e-5
      CONSTS(36) = 0.013
      CONSTS(37) = 10
      CONSTS(38) = 1.5
      CONSTS(39) = 1.2e-3
      CONSTS(40) = 1.75e-9
      CONSTS(41) = 546.69
      CONSTS(42) = 0.92
      STATES(24) = 1.19168e-3
      STATES(25) = 6.30613e-9
      STATES(26) = 0.762527
      STATES(27) = 0.236283
      CONSTS(43) = 1.8
      CONSTS(44) = 0.58e-4
      CONSTS(45) = 1.8e-3
      CONSTS(46) = 4
      CONSTS(47) = 3
      CONSTS(48) = 1.215e10
      CONSTS(49) = 0.1425
      CONSTS(50) = 4.05e7
      CONSTS(51) = 1.93
      CONSTS(52) = 0.018
      CONSTS(53) = 0.0008
      CONSTS(54) = 20
      CONSTS(55) = 0.066e-3
      CONSTS(56) = 40
      CONSTS(57) = 0.04
      CONSTS(58) = 34.48
      STATES(28) = 1.17504
      STATES(29) = 1.243891
      CONSTS(59) = 0.5e-3
      CONSTS(60) = 2.38e-3
      CONSTS(61) = 0.8
      CONSTS(62) = 3.125
      CONSTS(63) = 0.14
      CONSTS(64) = 0.07
      STATES(30) = 0.13598
      STATES(31) = 0.00635
      CONSTS(65) = 15
      CONSTS(66) = 0.05
      CONSTS(67) =  (1.00000/7.00000)*(EXP(CONSTS(11)/67.3000) - 1.00000)
      CONSTS(68) =  5.82800e-05*CONSTS(42)
      CONSTS(69) =  0.0810000*CONSTS(42)
      CONSTS(70) =  0.00464000*CONSTS(42)
      RETURN
      END
      SUBROUTINE computeRates(VOI, CONSTS,  RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      RATES(6) =  CONSTS(18)*STATES(12) -  CONSTS(17)*STATES(6)
      RATES(7) =  CONSTS(20)*STATES(17) -  CONSTS(19)*STATES(7)
      RATES(26) =  - CONSTS(48)*STATES(18) ** CONSTS(46)*STATES(26)+ CONSTS(49)*STATES(24)
      RATES(24) = ( CONSTS(48)*STATES(18) ** CONSTS(46)*STATES(26) - ( CONSTS(49)*STATES(24)+ CONSTS(50)*STATES(18) ** CONSTS(47)*STATES(24)+ CONSTS(52)*STATES(24)))+ CONSTS(51)*STATES(25)+ CONSTS(53)*STATES(27)
      RATES(25) =  CONSTS(50)*STATES(18) ** CONSTS(47)*STATES(24) -  CONSTS(51)*STATES(25)
      RATES(27) =  CONSTS(52)*STATES(24) -  CONSTS(53)*STATES(27)
      ALGBRC(1) = ( 0.320000*(STATES(1)+47.1300))/(1.00000 - EXP( - 0.100000*(STATES(1)+47.1300)))
      ALGBRC(8) =  0.0800000*EXP(- STATES(1)/11.0000)
      RATES(3) =  ALGBRC(1)*(1.00000 - STATES(3)) -  ALGBRC(8)*STATES(3)
      ALGBRC(2) = TERNRY(STATES(1).LT.- 40.0000,  0.135000*EXP((80.0000+STATES(1))/- 6.80000), 0.00000)
      ALGBRC(9) = TERNRY(STATES(1).LT.- 40.0000,  3.56000*EXP( 0.0790000*STATES(1))+ 310000.*EXP( 0.350000*STATES(1)), 1.00000/( 0.130000*(1.00000+EXP((STATES(1)+10.6600)/- 11.1000))))
      RATES(4) =  ALGBRC(2)*(1.00000 - STATES(4)) -  ALGBRC(9)*STATES(4)
      ALGBRC(3) = TERNRY(STATES(1).LT.- 40.0000, ( ( - 127140.*EXP( 0.244400*STATES(1)) -  3.47400e-05*EXP( - 0.0439100*STATES(1)))*(STATES(1)+37.7800))/(1.00000+EXP( 0.311000*(STATES(1)+79.2300))), 0.00000)
      ALGBRC(10) = TERNRY(STATES(1).LT.- 40.0000, ( 0.121200*EXP( - 0.0105200*STATES(1)))/(1.00000+EXP( - 0.137800*(STATES(1)+40.1400))), ( 0.300000*EXP( - 2.53500e-07*STATES(1)))/(1.00000+EXP( - 0.100000*(STATES(1)+32.0000))))
      RATES(5) =  ALGBRC(3)*(1.00000 - STATES(5)) -  ALGBRC(10)*STATES(5)
      ALGBRC(5) = 1.00000/(1.00000+EXP((STATES(1)+55.0000)/7.50000))+0.100000/(1.00000+EXP((- STATES(1)+21.0000)/6.00000))
      ALGBRC(12) = 20.0000+600.000/(1.00000+EXP((STATES(1)+30.0000)/9.50000))
      RATES(21) = (ALGBRC(5) - STATES(21))/ALGBRC(12)
      ALGBRC(6) = ( 7.19000e-05*(STATES(1)+30.0000))/(1.00000 - EXP( - 0.148000*(STATES(1)+30.0000)))
      ALGBRC(13) = ( 0.000131000*(STATES(1)+30.0000))/(- 1.00000+EXP( 0.0687000*(STATES(1)+30.0000)))
      RATES(22) =  ALGBRC(6)*(1.00000 - STATES(22)) -  ALGBRC(13)*STATES(22)
      ALGBRC(4) =  0.400000*EXP((STATES(1)+12.0000)/10.0000)
      ALGBRC(11) =  0.0500000*EXP((STATES(1)+12.0000)/- 13.0000)
      ALGBRC(19) =  0.187500*STATES(18)
      RATES(8) = ( ALGBRC(11)*STATES(9)+ CONSTS(21)*STATES(13)) -  ( 4.00000*ALGBRC(4)+ALGBRC(19))*STATES(8)
      RATES(9) = ( 4.00000*ALGBRC(4)*STATES(8)+ 2.00000*ALGBRC(11)*STATES(10)+ (CONSTS(21)/CONSTS(16))*STATES(14)) -  (ALGBRC(11)+ 3.00000*ALGBRC(4)+ ALGBRC(19)*CONSTS(15))*STATES(9)
      RATES(10) = ( 3.00000*ALGBRC(4)*STATES(9)+ 3.00000*ALGBRC(11)*STATES(11)+ (CONSTS(21)/CONSTS(16) ** 2.00000)*STATES(15)) -  ( ALGBRC(11)*2.00000+ 2.00000*ALGBRC(4)+ ALGBRC(19)*CONSTS(15) ** 2.00000)*STATES(10)
      RATES(11) = ( 2.00000*ALGBRC(4)*STATES(10)+ 4.00000*ALGBRC(11)*STATES(12)+ (CONSTS(21)/CONSTS(16) ** 3.00000)*STATES(16)) -  ( ALGBRC(11)*3.00000+ALGBRC(4)+ ALGBRC(19)*CONSTS(15) ** 3.00000)*STATES(11)
      RATES(12) = ( ALGBRC(4)*STATES(11)+ CONSTS(17)*STATES(6)+ (CONSTS(21)/CONSTS(16) ** 4.00000)*STATES(17)) -  ( ALGBRC(11)*4.00000+CONSTS(18)+ ALGBRC(19)*CONSTS(15) ** 4.00000)*STATES(12)
      ALGBRC(15) =  ALGBRC(4)*CONSTS(15)
      ALGBRC(17) = ALGBRC(11)/CONSTS(16)
      RATES(13) = ( ALGBRC(17)*STATES(14)+ ALGBRC(19)*STATES(13)) -  ( 4.00000*ALGBRC(15)+CONSTS(21))*STATES(13)
      RATES(14) = ( 4.00000*ALGBRC(15)*STATES(13)+ 2.00000*ALGBRC(17)*STATES(15)+ ALGBRC(19)*CONSTS(15)*STATES(9)) -  (ALGBRC(17)+ 3.00000*ALGBRC(15)+CONSTS(21)/CONSTS(16))*STATES(14)
      RATES(15) = ( 3.00000*ALGBRC(15)*STATES(14)+ 3.00000*ALGBRC(17)*STATES(16)+ ALGBRC(19)*CONSTS(15) ** 2.00000*STATES(10)) -  ( ALGBRC(17)*2.00000+ 2.00000*ALGBRC(15)+CONSTS(21)/CONSTS(16) ** 2.00000)*STATES(15)
      RATES(16) = ( 2.00000*ALGBRC(15)*STATES(15)+ 4.00000*ALGBRC(17)*STATES(17)+ ALGBRC(19)*CONSTS(15) ** 3.00000*STATES(11)) -  ( ALGBRC(17)*3.00000+ALGBRC(15)+CONSTS(21)/CONSTS(16) ** 3.00000)*STATES(16)
      RATES(17) = ( ALGBRC(15)*STATES(16)+ CONSTS(19)*STATES(7)+ ALGBRC(19)*CONSTS(15) ** 4.00000*STATES(12)) -  ( ALGBRC(17)*4.00000+CONSTS(20)+CONSTS(21)/CONSTS(16) ** 4.00000)*STATES(17)
      ALGBRC(47) =  CONSTS(44)*(STATES(29) - STATES(23))
      ALGBRC(49) = ( CONSTS(45)*STATES(23) ** 2.00000)/(CONSTS(59) ** 2.00000+STATES(23) ** 2.00000)
      ALGBRC(51) = (STATES(29) - STATES(28))/CONSTS(58)
      RATES(29) = ( (ALGBRC(49) - ALGBRC(47))*CONSTS(42))/CONSTS(69) - ( ALGBRC(51)*CONSTS(70))/CONSTS(69)
      ALGBRC(56) =  CONSTS(54)*STATES(23)*(CONSTS(63) - STATES(30)) -  CONSTS(55)*STATES(30)
      RATES(30) = ALGBRC(56)
      ALGBRC(18) = ( (( CONSTS(12)*4.00000*STATES(1)*CONSTS(3) ** 2.00000)/( CONSTS(1)*CONSTS(2)))*( 0.00100000*EXP(( 2.00000*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2))) -  0.341000*CONSTS(22)))/(EXP(( 2.00000*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2))) - 1.00000)
      ALGBRC(20) =  ALGBRC(18)*STATES(21)*(STATES(6)+STATES(7))
      ALGBRC(54) = 1.00000/(1.00000+( CONSTS(66)*CONSTS(60))/CONSTS(60)+STATES(18) ** 2.00000)
      ALGBRC(43) = STATES(24)+STATES(25)
      ALGBRC(45) =  CONSTS(43)*ALGBRC(43)*(STATES(28) - STATES(18))
      ALGBRC(52) = (STATES(18) - STATES(23))/CONSTS(62)
      RATES(18) =  ALGBRC(54)*((( ALGBRC(45)*CONSTS(70))/CONSTS(68) - ( ALGBRC(52)*CONSTS(42))/CONSTS(68)) - ( ALGBRC(20)*CONSTS(41))/( 2.00000*CONSTS(68)*CONSTS(3)))
      ALGBRC(55) = 1.00000/(1.00000+( CONSTS(65)*CONSTS(61))/CONSTS(61)+STATES(28) ** 2.00000)
      RATES(28) =  ALGBRC(55)*(ALGBRC(51) - ALGBRC(45))
      ALGBRC(14) =  (( CONSTS(1)*CONSTS(2))/CONSTS(3))*log(CONSTS(11)/STATES(2))
      ALGBRC(16) =  CONSTS(10)*STATES(3) ** 3.00000*STATES(4)*STATES(5)*(STATES(1) - ALGBRC(14))
      ALGBRC(36) =  (( (( (( CONSTS(27)*1.00000)/(CONSTS(28) ** 3.00000+CONSTS(11) ** 3.00000))*1.00000)/(CONSTS(29)+CONSTS(22)))*1.00000)/(1.00000+ CONSTS(30)*EXP(( (CONSTS(31) - 1.00000)*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))))*( EXP(( CONSTS(31)*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))*STATES(2) ** 3.00000*CONSTS(22) -  EXP(( (CONSTS(31) - 1.00000)*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))*CONSTS(11) ** 3.00000*STATES(23))
      ALGBRC(38) = ALGBRC(14)
      ALGBRC(39) =  CONSTS(34)*(STATES(1) - ALGBRC(38))
      ALGBRC(42) = 1.00000/(1.00000+ 0.124500*EXP(( - 0.100000*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))+ 0.0365000*CONSTS(67)*EXP(( - STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2))))
      ALGBRC(44) = ( (( CONSTS(36)*ALGBRC(42)*1.00000)/(1.00000+CONSTS(37)/STATES(2) ** 1.50000))*STATES(19))/(STATES(19)+CONSTS(38))
      ALGBRC(46) =  (( CONSTS(1)*CONSTS(2))/CONSTS(3))*log((STATES(19)+CONSTS(11))/(STATES(20)+STATES(2)))
      ALGBRC(48) = STATES(1) - ALGBRC(46)
      ALGBRC(50) = ( (( CONSTS(40)*1.00000 ** 2.00000*ALGBRC(48)*CONSTS(3) ** 2.00000)/( CONSTS(1)*CONSTS(2)))*( 0.750000*STATES(2)*EXP(( ALGBRC(48)*CONSTS(3))/( CONSTS(1)*CONSTS(2))) -  0.750000*CONSTS(11)))/(EXP(( ALGBRC(48)*CONSTS(3))/( CONSTS(1)*CONSTS(2))) - 1.00000)
      ALGBRC(53) = ( ALGBRC(50)*1.00000)/(1.00000+CONSTS(39)/STATES(23) ** 3.00000)
      RATES(2) = ( - (ALGBRC(16)+ALGBRC(39)+ALGBRC(53)+ ALGBRC(36)*3.00000+ ALGBRC(44)*3.00000)*CONSTS(41))/( CONSTS(42)*CONSTS(3))
      ALGBRC(58) =  CONSTS(56)*STATES(23)*(CONSTS(64) - STATES(31)) -  CONSTS(57)*STATES(31)
      RATES(31) = ALGBRC(58)
      ALGBRC(21) = CONSTS(13)/(1.00000+ALGBRC(18)/CONSTS(14))
      ALGBRC(22) = ( (( ALGBRC(21)*STATES(21)*(STATES(6)+STATES(7))*STATES(1)*CONSTS(3) ** 2.00000)/( CONSTS(1)*CONSTS(2)))*( STATES(20)*EXP(( STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2))) - STATES(19)))/(EXP(( STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2))) - 1.00000)
      ALGBRC(23) =  CONSTS(23)* (STATES(19)/5.40000) ** (1.0 / 2)
      ALGBRC(24) =  (( CONSTS(1)*CONSTS(2))/CONSTS(3))*log((STATES(19)+ CONSTS(24)*CONSTS(11))/(STATES(20)+ CONSTS(24)*STATES(2)))
      ALGBRC(25) = 1.00000/(1.00000+EXP((STATES(1) - 56.2600)/32.1000))
      ALGBRC(26) =  ALGBRC(23)*ALGBRC(25)*STATES(22) ** 2.00000*(STATES(1) - ALGBRC(24))
      ALGBRC(28) =  (( CONSTS(1)*CONSTS(2))/CONSTS(3))*log(STATES(19)/STATES(20))
      ALGBRC(27) =  CONSTS(25)* (STATES(19)/5.40000) ** (1.0 / 2)
      ALGBRC(29) = 1.02000/(1.00000+EXP( 0.238500*((STATES(1) - ALGBRC(28)) - 59.2150)))
      ALGBRC(30) = ( 0.491240*EXP( 0.0803200*((STATES(1)+5.47600) - ALGBRC(28)))+EXP( 0.0617500*(STATES(1) - (ALGBRC(28)+594.310))))/(1.00000+EXP( - 0.514300*((STATES(1) - ALGBRC(28))+4.75300)))
      ALGBRC(31) = ALGBRC(29)/(ALGBRC(29)+ALGBRC(30))
      ALGBRC(32) =  ALGBRC(27)*ALGBRC(31)*(STATES(1) - ALGBRC(28))
      ALGBRC(33) = ALGBRC(28)
      ALGBRC(34) = 1.00000/(1.00000+EXP((7.48800 - STATES(1))/5.98000))
      ALGBRC(35) =  CONSTS(26)*ALGBRC(34)*(STATES(1) - ALGBRC(33))
      ALGBRC(57) = ( (( CONSTS(40)*1.00000 ** 2.00000*ALGBRC(48)*CONSTS(3) ** 2.00000)/( CONSTS(1)*CONSTS(2)))*( 0.750000*STATES(20)*EXP(( ALGBRC(48)*CONSTS(3))/( CONSTS(1)*CONSTS(2))) -  0.750000*STATES(19)))/(EXP(( ALGBRC(48)*CONSTS(3))/( CONSTS(1)*CONSTS(2))) - 1.00000)
      ALGBRC(59) = ( ALGBRC(57)*1.00000)/(1.00000+CONSTS(39)/STATES(23) ** 3.00000)
      RATES(20) = ( - (ALGBRC(22)+ALGBRC(26)+ALGBRC(32)+ALGBRC(35)+ALGBRC(59)+ - ALGBRC(44)*2.00000)*CONSTS(41))/( CONSTS(42)*CONSTS(3))
      RATES(19) = ( (ALGBRC(22)+ALGBRC(26)+ALGBRC(32)+ALGBRC(35)+ALGBRC(59)+ - ALGBRC(44)*2.00000)*CONSTS(41))/( CONSTS(42)*CONSTS(3))
      ALGBRC(37) = ( CONSTS(33)*STATES(23))/(CONSTS(32)+STATES(23))
      ALGBRC(40) =  (( CONSTS(1)*CONSTS(2))/( 2.00000*CONSTS(3)))*log(CONSTS(22)/STATES(23))
      ALGBRC(41) =  CONSTS(35)*(STATES(1) - ALGBRC(40))
      ALGBRC(61) = ALGBRC(53)+ALGBRC(59)
      ALGBRC(7) = TERNRY(VOI.GE.CONSTS(5).AND.VOI.LE.CONSTS(6).AND.(VOI - CONSTS(5)) -  INT((VOI - CONSTS(5))/CONSTS(7))*CONSTS(7).LE.CONSTS(8), CONSTS(9), 0.00000)
      RATES(1) = (ALGBRC(7) - (ALGBRC(16)+ALGBRC(20)+ALGBRC(22)+ALGBRC(26)+ALGBRC(36)+ALGBRC(32)+ALGBRC(35)+ALGBRC(37)+ALGBRC(39)+ALGBRC(41)+ALGBRC(44)+ALGBRC(61)))/CONSTS(4)
      ALGBRC(62) = 1.00000/(1.00000+( CONSTS(66)*CONSTS(60))/CONSTS(60)+STATES(23) ** 2.00000)
      ALGBRC(60) = ALGBRC(56)+ALGBRC(58)
      RATES(23) =  ALGBRC(62)*((ALGBRC(47)+ALGBRC(52)) - (ALGBRC(49)+ALGBRC(60)+( ((ALGBRC(41) -  2.00000*ALGBRC(36))+ALGBRC(37))*CONSTS(41))/( 2.00000*CONSTS(42)*CONSTS(3))))
      RETURN
      END
      SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(1) = ( 0.320000*(STATES(1)+47.1300))/(1.00000 - EXP( - 0.100000*(STATES(1)+47.1300)))
      ALGBRC(8) =  0.0800000*EXP(- STATES(1)/11.0000)
      ALGBRC(2) = TERNRY(STATES(1).LT.- 40.0000,  0.135000*EXP((80.0000+STATES(1))/- 6.80000), 0.00000)
      ALGBRC(9) = TERNRY(STATES(1).LT.- 40.0000,  3.56000*EXP( 0.0790000*STATES(1))+ 310000.*EXP( 0.350000*STATES(1)), 1.00000/( 0.130000*(1.00000+EXP((STATES(1)+10.6600)/- 11.1000))))
      ALGBRC(3) = TERNRY(STATES(1).LT.- 40.0000, ( ( - 127140.*EXP( 0.244400*STATES(1)) -  3.47400e-05*EXP( - 0.0439100*STATES(1)))*(STATES(1)+37.7800))/(1.00000+EXP( 0.311000*(STATES(1)+79.2300))), 0.00000)
      ALGBRC(10) = TERNRY(STATES(1).LT.- 40.0000, ( 0.121200*EXP( - 0.0105200*STATES(1)))/(1.00000+EXP( - 0.137800*(STATES(1)+40.1400))), ( 0.300000*EXP( - 2.53500e-07*STATES(1)))/(1.00000+EXP( - 0.100000*(STATES(1)+32.0000))))
      ALGBRC(5) = 1.00000/(1.00000+EXP((STATES(1)+55.0000)/7.50000))+0.100000/(1.00000+EXP((- STATES(1)+21.0000)/6.00000))
      ALGBRC(12) = 20.0000+600.000/(1.00000+EXP((STATES(1)+30.0000)/9.50000))
      ALGBRC(6) = ( 7.19000e-05*(STATES(1)+30.0000))/(1.00000 - EXP( - 0.148000*(STATES(1)+30.0000)))
      ALGBRC(13) = ( 0.000131000*(STATES(1)+30.0000))/(- 1.00000+EXP( 0.0687000*(STATES(1)+30.0000)))
      ALGBRC(4) =  0.400000*EXP((STATES(1)+12.0000)/10.0000)
      ALGBRC(11) =  0.0500000*EXP((STATES(1)+12.0000)/- 13.0000)
      ALGBRC(19) =  0.187500*STATES(18)
      ALGBRC(15) =  ALGBRC(4)*CONSTS(15)
      ALGBRC(17) = ALGBRC(11)/CONSTS(16)
      ALGBRC(47) =  CONSTS(44)*(STATES(29) - STATES(23))
      ALGBRC(49) = ( CONSTS(45)*STATES(23) ** 2.00000)/(CONSTS(59) ** 2.00000+STATES(23) ** 2.00000)
      ALGBRC(51) = (STATES(29) - STATES(28))/CONSTS(58)
      ALGBRC(56) =  CONSTS(54)*STATES(23)*(CONSTS(63) - STATES(30)) -  CONSTS(55)*STATES(30)
      ALGBRC(18) = ( (( CONSTS(12)*4.00000*STATES(1)*CONSTS(3) ** 2.00000)/( CONSTS(1)*CONSTS(2)))*( 0.00100000*EXP(( 2.00000*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2))) -  0.341000*CONSTS(22)))/(EXP(( 2.00000*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2))) - 1.00000)
      ALGBRC(20) =  ALGBRC(18)*STATES(21)*(STATES(6)+STATES(7))
      ALGBRC(54) = 1.00000/(1.00000+( CONSTS(66)*CONSTS(60))/CONSTS(60)+STATES(18) ** 2.00000)
      ALGBRC(43) = STATES(24)+STATES(25)
      ALGBRC(45) =  CONSTS(43)*ALGBRC(43)*(STATES(28) - STATES(18))
      ALGBRC(52) = (STATES(18) - STATES(23))/CONSTS(62)
      ALGBRC(55) = 1.00000/(1.00000+( CONSTS(65)*CONSTS(61))/CONSTS(61)+STATES(28) ** 2.00000)
      ALGBRC(14) =  (( CONSTS(1)*CONSTS(2))/CONSTS(3))*log(CONSTS(11)/STATES(2))
      ALGBRC(16) =  CONSTS(10)*STATES(3) ** 3.00000*STATES(4)*STATES(5)*(STATES(1) - ALGBRC(14))
      ALGBRC(36) =  (( (( (( CONSTS(27)*1.00000)/(CONSTS(28) ** 3.00000+CONSTS(11) ** 3.00000))*1.00000)/(CONSTS(29)+CONSTS(22)))*1.00000)/(1.00000+ CONSTS(30)*EXP(( (CONSTS(31) - 1.00000)*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))))*( EXP(( CONSTS(31)*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))*STATES(2) ** 3.00000*CONSTS(22) -  EXP(( (CONSTS(31) - 1.00000)*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))*CONSTS(11) ** 3.00000*STATES(23))
      ALGBRC(38) = ALGBRC(14)
      ALGBRC(39) =  CONSTS(34)*(STATES(1) - ALGBRC(38))
      ALGBRC(42) = 1.00000/(1.00000+ 0.124500*EXP(( - 0.100000*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))+ 0.0365000*CONSTS(67)*EXP(( - STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2))))
      ALGBRC(44) = ( (( CONSTS(36)*ALGBRC(42)*1.00000)/(1.00000+CONSTS(37)/STATES(2) ** 1.50000))*STATES(19))/(STATES(19)+CONSTS(38))
      ALGBRC(46) =  (( CONSTS(1)*CONSTS(2))/CONSTS(3))*log((STATES(19)+CONSTS(11))/(STATES(20)+STATES(2)))
      ALGBRC(48) = STATES(1) - ALGBRC(46)
      ALGBRC(50) = ( (( CONSTS(40)*1.00000 ** 2.00000*ALGBRC(48)*CONSTS(3) ** 2.00000)/( CONSTS(1)*CONSTS(2)))*( 0.750000*STATES(2)*EXP(( ALGBRC(48)*CONSTS(3))/( CONSTS(1)*CONSTS(2))) -  0.750000*CONSTS(11)))/(EXP(( ALGBRC(48)*CONSTS(3))/( CONSTS(1)*CONSTS(2))) - 1.00000)
      ALGBRC(53) = ( ALGBRC(50)*1.00000)/(1.00000+CONSTS(39)/STATES(23) ** 3.00000)
      ALGBRC(58) =  CONSTS(56)*STATES(23)*(CONSTS(64) - STATES(31)) -  CONSTS(57)*STATES(31)
      ALGBRC(21) = CONSTS(13)/(1.00000+ALGBRC(18)/CONSTS(14))
      ALGBRC(22) = ( (( ALGBRC(21)*STATES(21)*(STATES(6)+STATES(7))*STATES(1)*CONSTS(3) ** 2.00000)/( CONSTS(1)*CONSTS(2)))*( STATES(20)*EXP(( STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2))) - STATES(19)))/(EXP(( STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2))) - 1.00000)
      ALGBRC(23) =  CONSTS(23)* (STATES(19)/5.40000) ** (1.0 / 2)
      ALGBRC(24) =  (( CONSTS(1)*CONSTS(2))/CONSTS(3))*log((STATES(19)+ CONSTS(24)*CONSTS(11))/(STATES(20)+ CONSTS(24)*STATES(2)))
      ALGBRC(25) = 1.00000/(1.00000+EXP((STATES(1) - 56.2600)/32.1000))
      ALGBRC(26) =  ALGBRC(23)*ALGBRC(25)*STATES(22) ** 2.00000*(STATES(1) - ALGBRC(24))
      ALGBRC(28) =  (( CONSTS(1)*CONSTS(2))/CONSTS(3))*log(STATES(19)/STATES(20))
      ALGBRC(27) =  CONSTS(25)* (STATES(19)/5.40000) ** (1.0 / 2)
      ALGBRC(29) = 1.02000/(1.00000+EXP( 0.238500*((STATES(1) - ALGBRC(28)) - 59.2150)))
      ALGBRC(30) = ( 0.491240*EXP( 0.0803200*((STATES(1)+5.47600) - ALGBRC(28)))+EXP( 0.0617500*(STATES(1) - (ALGBRC(28)+594.310))))/(1.00000+EXP( - 0.514300*((STATES(1) - ALGBRC(28))+4.75300)))
      ALGBRC(31) = ALGBRC(29)/(ALGBRC(29)+ALGBRC(30))
      ALGBRC(32) =  ALGBRC(27)*ALGBRC(31)*(STATES(1) - ALGBRC(28))
      ALGBRC(33) = ALGBRC(28)
      ALGBRC(34) = 1.00000/(1.00000+EXP((7.48800 - STATES(1))/5.98000))
      ALGBRC(35) =  CONSTS(26)*ALGBRC(34)*(STATES(1) - ALGBRC(33))
      ALGBRC(57) = ( (( CONSTS(40)*1.00000 ** 2.00000*ALGBRC(48)*CONSTS(3) ** 2.00000)/( CONSTS(1)*CONSTS(2)))*( 0.750000*STATES(20)*EXP(( ALGBRC(48)*CONSTS(3))/( CONSTS(1)*CONSTS(2))) -  0.750000*STATES(19)))/(EXP(( ALGBRC(48)*CONSTS(3))/( CONSTS(1)*CONSTS(2))) - 1.00000)
      ALGBRC(59) = ( ALGBRC(57)*1.00000)/(1.00000+CONSTS(39)/STATES(23) ** 3.00000)
      ALGBRC(37) = ( CONSTS(33)*STATES(23))/(CONSTS(32)+STATES(23))
      ALGBRC(40) =  (( CONSTS(1)*CONSTS(2))/( 2.00000*CONSTS(3)))*log(CONSTS(22)/STATES(23))
      ALGBRC(41) =  CONSTS(35)*(STATES(1) - ALGBRC(40))
      ALGBRC(61) = ALGBRC(53)+ALGBRC(59)
      ALGBRC(7) = TERNRY(VOI.GE.CONSTS(5).AND.VOI.LE.CONSTS(6).AND.(VOI - CONSTS(5)) -  INT((VOI - CONSTS(5))/CONSTS(7))*CONSTS(7).LE.CONSTS(8), CONSTS(9), 0.00000)
      ALGBRC(62) = 1.00000/(1.00000+( CONSTS(66)*CONSTS(60))/CONSTS(60)+STATES(23) ** 2.00000)
      ALGBRC(60) = ALGBRC(56)+ALGBRC(58)
      RETURN
      END
      REAL FUNCTION TERNRY(TEST, VALA, VALB)
      LOGICAL TEST
      REAL VALA, VALB
      IF (TEST) THEN
        TERNRY = VALA
      ELSE
        TERNRY = VALB
      ENDIF
      RETURN
      END