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 78 entries in the algebraic variable array.
C There are a total of 27 entries in each of the rate and state variable arrays.
C There are a total of 61 entries in the constant variable array.
C
C
C VOI is time in component Environment (millisecond).
C CONSTS(1) is R in component Environment (millijoule_per_mole_kelvin).
C CONSTS(2) is T in component Environment (kelvin).
C CONSTS(3) is F in component Environment (coulomb_per_mole).
C CONSTS(4) is K_o in component Environment (millimolar).
C CONSTS(5) is Ca_o in component Environment (millimolar).
C CONSTS(6) is Na_o in component Environment (millimolar).
C STATES(1) is V in component cell (millivolt).
C CONSTS(7) is Cm in component cell (nanoF).
C CONSTS(8) is Vol_c in component cell (nanolitre).
C ALGBRC(55) is i_K1 in component IK1 (nanoA_per_nanoF).
C ALGBRC(58) is i_to in component Ito (nanoA_per_nanoF).
C ALGBRC(56) is i_Kr in component IKr (nanoA_per_nanoF).
C ALGBRC(57) is i_Ks in component IKs (nanoA_per_nanoF).
C ALGBRC(61) is i_CaL in component ICaL (nanoA_per_nanoF).
C ALGBRC(65) is i_NaK in component INaK (nanoA_per_nanoF).
C ALGBRC(59) is i_Na in component INa (nanoA_per_nanoF).
C ALGBRC(60) is i_b_Na in component INab (nanoA_per_nanoF).
C ALGBRC(66) is i_NaCa in component INaCa (nanoA_per_nanoF).
C ALGBRC(62) is i_b_Ca in component ICab (nanoA_per_nanoF).
C ALGBRC(64) is i_p_K in component IpK (nanoA_per_nanoF).
C ALGBRC(63) is i_p_Ca in component IpCa (nanoA_per_nanoF).
C ALGBRC(1) is i_Stim in component cell (nanoA_per_nanoF).
C ALGBRC(67) is i_tot in component cell (nanoA_per_nanoF).
C CONSTS(9) is stim_Period in component cell (millisecond).
C ALGBRC(13) is E_Na in component reversal_potentials (millivolt).
C ALGBRC(25) is E_K in component reversal_potentials (millivolt).
C ALGBRC(32) is E_Ks in component reversal_potentials (millivolt).
C ALGBRC(39) is E_Ca in component reversal_potentials (millivolt).
C CONSTS(10) is P_kna in component reversal_potentials (dimensionless).
C STATES(2) is K_i in component K (millimolar).
C STATES(3) is Na_i in component Na (millimolar).
C STATES(4) is Ca_i in component Ca (millimolar).
C CONSTS(11) is g_K1_0 in component IK1 (microS_per_nanoF).
C ALGBRC(54) is xK1_inf in component iK1_rectification (dimensionless).
C CONSTS(12) is Mg_Buf in component iK1_rectification (millimolar).
C CONSTS(13) is SPM in component iK1_rectification (millimolar).
C CONSTS(14) is fac in component iK1_rectification (dimensionless).
C CONSTS(15) is phi in component iK1_rectification (dimensionless).
C ALGBRC(50) is temp in component iK1_rectification (dimensionless).
C ALGBRC(52) is rec1 in component iK1_rectification (dimensionless).
C ALGBRC(53) is rec2 in component iK1_rectification (dimensionless).
C ALGBRC(42) is KiMg in component iK1_rectification (millimolar).
C ALGBRC(44) is KbMg in component iK1_rectification (millimolar).
C ALGBRC(46) is Kd1SPM in component iK1_rectification (millimolar).
C ALGBRC(48) is Kd2SPM in component iK1_rectification (millimolar).
C CONSTS(16) is g_Kr_0 in component IKr (microS_per_nanoF).
C STATES(5) is Or4 in component iKr_Markov (dimensionless).
C STATES(6) is Cr1 in component iKr_Markov (dimensionless).
C STATES(7) is Cr2 in component iKr_Markov (dimensionless).
C STATES(8) is Cr3 in component iKr_Markov (dimensionless).
C STATES(9) is Ir5 in component iKr_Markov (dimensionless).
C CONSTS(17) is T_Base in component iKr_Markov (kelvin).
C ALGBRC(2) is alpha_xr1 in component iKr_Markov (per_millisecond).
C ALGBRC(14) is beta_xr1 in component iKr_Markov (per_millisecond).
C ALGBRC(26) is alpha_xr2 in component iKr_Markov (per_millisecond).
C ALGBRC(33) is beta_xr2 in component iKr_Markov (per_millisecond).
C ALGBRC(40) is alpha_xr3 in component iKr_Markov (per_millisecond).
C ALGBRC(43) is beta_xr3 in component iKr_Markov (per_millisecond).
C ALGBRC(45) is alpha_xr4 in component iKr_Markov (per_millisecond).
C ALGBRC(47) is beta_xr4 in component iKr_Markov (per_millisecond).
C ALGBRC(49) is OtoB in component iKr_Markov_Sotalol_block (per_millisecond).
C ALGBRC(51) is BtoO in component iKr_Markov_Sotalol_block (per_millisecond).
C CONSTS(18) is Sotalol_mM in component iKr_Markov_Sotalol_block (millimolar).
C STATES(10) is BCr1 in component iKr_Markov_Sotalol_block (dimensionless).
C STATES(11) is BCr2 in component iKr_Markov_Sotalol_block (dimensionless).
C STATES(12) is BCr3 in component iKr_Markov_Sotalol_block (dimensionless).
C STATES(13) is BOr4 in component iKr_Markov_Sotalol_block (dimensionless).
C STATES(14) is BIr5 in component iKr_Markov_Sotalol_block (dimensionless).
C CONSTS(19) is kBinding in component iKr_Markov_Sotalol_block (per_millimolar_per_millisecond).
C CONSTS(20) is kDiss in component iKr_Markov_Sotalol_block (per_millisecond).
C CONSTS(21) is g_Ks in component IKs (microS_per_nanoF).
C STATES(15) is Xs in component iKs_Xs_gate (dimensionless).
C ALGBRC(3) is xs_inf in component iKs_Xs_gate (dimensionless).
C ALGBRC(15) is alpha_xs in component iKs_Xs_gate (dimensionless).
C ALGBRC(27) is beta_xs in component iKs_Xs_gate (dimensionless).
C ALGBRC(34) is tau_xs in component iKs_Xs_gate (millisecond).
C CONSTS(22) is g_to in component Ito (microS_per_nanoF).
C STATES(16) is s in component ito_s_gate (dimensionless).
C STATES(17) is r in component ito_r_gate (dimensionless).
C ALGBRC(4) is s_inf in component ito_s_gate (dimensionless).
C ALGBRC(16) is tau_s in component ito_s_gate (millisecond).
C ALGBRC(5) is r_inf in component ito_r_gate (dimensionless).
C ALGBRC(17) is tau_r in component ito_r_gate (millisecond).
C CONSTS(23) is g_Na in component INa (microS_per_nanoF).
C CONSTS(24) is shift_INa_inact in component INa (millivolt).
C STATES(18) is m in component iNa_m_gate (dimensionless).
C STATES(19) is h in component iNa_h_gate (dimensionless).
C STATES(20) is j in component iNa_j_gate (dimensionless).
C ALGBRC(6) is m_inf in component iNa_m_gate (dimensionless).
C ALGBRC(18) is alpha_m in component iNa_m_gate (dimensionless).
C ALGBRC(28) is beta_m in component iNa_m_gate (dimensionless).
C ALGBRC(35) is tau_m in component iNa_m_gate (millisecond).
C ALGBRC(7) is h_inf in component iNa_h_gate (dimensionless).
C ALGBRC(19) is alpha_h in component iNa_h_gate (per_millisecond).
C ALGBRC(29) is beta_h in component iNa_h_gate (per_millisecond).
C ALGBRC(36) is tau_h in component iNa_h_gate (millisecond).
C ALGBRC(8) is j_inf in component iNa_j_gate (dimensionless).
C ALGBRC(20) is alpha_j in component iNa_j_gate (per_millisecond).
C ALGBRC(30) is beta_j in component iNa_j_gate (per_millisecond).
C ALGBRC(37) is tau_j in component iNa_j_gate (millisecond).
C CONSTS(25) is g_bna in component INab (microS_per_nanoF).
C CONSTS(26) is g_CaL in component ICaL (litre_per_farad_millisecond).
C STATES(21) is Ca_ss in component Ca (millimolar).
C STATES(22) is d in component iCaL_d_gate (dimensionless).
C STATES(23) is f in component iCaL_f_gate (dimensionless).
C STATES(24) is f2 in component iCaL_f2_gate (dimensionless).
C STATES(25) is fCass in component iCaL_fCass_gate (dimensionless).
C CONSTS(27) is z in component ICaL (dimensionless).
C ALGBRC(9) is d_inf in component iCaL_d_gate (dimensionless).
C ALGBRC(21) is alpha_d in component iCaL_d_gate (dimensionless).
C ALGBRC(31) is beta_d in component iCaL_d_gate (dimensionless).
C ALGBRC(38) is gamma_d in component iCaL_d_gate (millisecond).
C ALGBRC(41) is tau_d in component iCaL_d_gate (millisecond).
C CONSTS(28) is d_inf_shift in component iCaL_d_gate (millivolt).
C ALGBRC(10) is f_inf in component iCaL_f_gate (dimensionless).
C ALGBRC(22) is tau_f in component iCaL_f_gate (millisecond).
C ALGBRC(11) is f2_inf in component iCaL_f2_gate (dimensionless).
C ALGBRC(23) is tau_f2 in component iCaL_f2_gate (millisecond).
C ALGBRC(12) is fCass_inf in component iCaL_fCass_gate (dimensionless).
C ALGBRC(24) is tau_fCass in component iCaL_fCass_gate (millisecond).
C CONSTS(29) is g_bca in component ICab (microS_per_nanoF).
C CONSTS(30) is g_pCa in component IpCa (nanoA_per_nanoF).
C CONSTS(31) is K_pCa in component IpCa (millimolar).
C CONSTS(32) is g_pK in component IpK (microS_per_nanoF).
C CONSTS(33) is P_NaK in component INaK (nanoA_per_nanoF).
C CONSTS(34) is K_mk in component INaK (millimolar).
C CONSTS(35) is K_mNa in component INaK (millimolar).
C CONSTS(36) is K_NaCa in component INaCa (nanoA_per_nanoF).
C CONSTS(37) is K_sat in component INaCa (dimensionless).
C CONSTS(38) is alpha in component INaCa (dimensionless).
C CONSTS(39) is gamma in component INaCa (dimensionless).
C CONSTS(40) is Km_Ca in component INaCa (millimolar).
C CONSTS(41) is Km_Nai in component INaCa (millimolar).
C STATES(26) is Ca_SR in component Ca (millimolar).
C ALGBRC(71) is Ca_i_bufc in component Ca_buffer (dimensionless).
C ALGBRC(77) is Ca_sr_bufsr in component Ca_buffer (dimensionless).
C ALGBRC(78) is Ca_ss_bufss in component Ca_buffer (dimensionless).
C CONSTS(42) is V_sr in component Ca (nanolitre).
C CONSTS(43) is V_ss in component Ca (nanolitre).
C ALGBRC(76) is i_rel in component Irel (millimolar_per_millisecond).
C ALGBRC(68) is i_up in component Ileak_Iup_Ixfer (millimolar_per_millisecond).
C ALGBRC(69) is i_leak in component Ileak_Iup_Ixfer (millimolar_per_millisecond).
C ALGBRC(70) is i_xfer in component Ileak_Iup_Ixfer (millimolar_per_millisecond).
C CONSTS(44) is Vol_xfer in component Ileak_Iup_Ixfer (per_millisecond).
C CONSTS(45) is K_up in component Ileak_Iup_Ixfer (millimolar).
C CONSTS(46) is Vol_leak in component Ileak_Iup_Ixfer (per_millisecond).
C CONSTS(47) is Vmax_up in component Ileak_Iup_Ixfer (millimolar_per_millisecond).
C STATES(27) is R_prime in component Irel (dimensionless).
C CONSTS(48) is k1_prime in component Irel (per_millimolar2_per_millisecond).
C CONSTS(49) is k2_prime in component Irel (per_millimolar_per_millisecond).
C CONSTS(50) is EC in component Irel (millimolar).
C CONSTS(51) is max_sr in component Irel (dimensionless).
C CONSTS(52) is min_sr in component Irel (dimensionless).
C CONSTS(53) is k3 in component Irel (per_millisecond).
C CONSTS(54) is k4 in component Irel (per_millisecond).
C CONSTS(55) is Vol_rel in component Irel (per_millisecond).
C ALGBRC(75) is O in component Irel (dimensionless).
C ALGBRC(72) is kcasr in component Irel (dimensionless).
C ALGBRC(73) is k1 in component Irel (per_millimolar2_per_millisecond).
C ALGBRC(74) is k2 in component Irel (per_millimolar_per_millisecond).
C CONSTS(56) is Buf_c in component Ca_buffer (millimolar).
C CONSTS(57) is K_buf_c in component Ca_buffer (millimolar).
C CONSTS(58) is Buf_sr in component Ca_buffer (millimolar).
C CONSTS(59) is K_buf_sr in component Ca_buffer (millimolar).
C CONSTS(60) is Buf_ss in component Ca_buffer (millimolar).
C CONSTS(61) is K_buf_ss in component Ca_buffer (millimolar).
C RATES(1) is d/dt V in component cell (millivolt).
C RATES(6) is d/dt Cr1 in component iKr_Markov (dimensionless).
C RATES(7) is d/dt Cr2 in component iKr_Markov (dimensionless).
C RATES(8) is d/dt Cr3 in component iKr_Markov (dimensionless).
C RATES(5) is d/dt Or4 in component iKr_Markov (dimensionless).
C RATES(9) is d/dt Ir5 in component iKr_Markov (dimensionless).
C RATES(10) is d/dt BCr1 in component iKr_Markov_Sotalol_block (dimensionless).
C RATES(11) is d/dt BCr2 in component iKr_Markov_Sotalol_block (dimensionless).
C RATES(12) is d/dt BCr3 in component iKr_Markov_Sotalol_block (dimensionless).
C RATES(13) is d/dt BOr4 in component iKr_Markov_Sotalol_block (dimensionless).
C RATES(14) is d/dt BIr5 in component iKr_Markov_Sotalol_block (dimensionless).
C RATES(15) is d/dt Xs in component iKs_Xs_gate (dimensionless).
C RATES(16) is d/dt s in component ito_s_gate (dimensionless).
C RATES(17) is d/dt r in component ito_r_gate (dimensionless).
C RATES(18) is d/dt m in component iNa_m_gate (dimensionless).
C RATES(19) is d/dt h in component iNa_h_gate (dimensionless).
C RATES(20) is d/dt j in component iNa_j_gate (dimensionless).
C RATES(22) is d/dt d in component iCaL_d_gate (dimensionless).
C RATES(23) is d/dt f in component iCaL_f_gate (dimensionless).
C RATES(24) is d/dt f2 in component iCaL_f2_gate (dimensionless).
C RATES(25) is d/dt fCass in component iCaL_fCass_gate (dimensionless).
C RATES(4) is d/dt Ca_i in component Ca (millimolar).
C RATES(26) is d/dt Ca_SR in component Ca (millimolar).
C RATES(21) is d/dt Ca_ss in component Ca (millimolar).
C RATES(27) is d/dt R_prime in component Irel (dimensionless).
C RATES(3) is d/dt Na_i in component Na (millimolar).
C RATES(2) is d/dt K_i in component K (millimolar).
C
      SUBROUTINE initConsts(CONSTS, RATES, STATES)
      REAL CONSTS(*), RATES(*), STATES(*)
      CONSTS(1) = 8314.472
      CONSTS(2) = 310
      CONSTS(3) = 96485.3415
      CONSTS(4) = 5.4
      CONSTS(5) = 2
      CONSTS(6) = 140
      STATES(1) = -86.45
      CONSTS(7) = 0.115
      CONSTS(8) = 0.016404
      CONSTS(9) = 1000
      CONSTS(10) = 0.03
      STATES(2) = 141.0167
      STATES(3) = 7.940167
      STATES(4) = 1.092e-4
      CONSTS(11) = 0.6821
      CONSTS(12) = 0.0356
      CONSTS(13) = 1.4613e-3
      CONSTS(14) = 1.0648
      CONSTS(15) = 0.8838
      CONSTS(16) = 0.024
      STATES(5) = 0.014
      STATES(6) = 0.9786
      STATES(7) = 0.0031
      STATES(8) = 0.0029
      STATES(9) = 0.0014
      CONSTS(17) = 310
      CONSTS(18) = 0
      STATES(10) = 0
      STATES(11) = 0
      STATES(12) = 0
      STATES(13) = 0
      STATES(14) = 0
      CONSTS(19) = 5e-3
      CONSTS(20) = 0.00125
      CONSTS(21) = 0.0392
      STATES(15) = 0.00303
      CONSTS(22) = 0.2
      STATES(16) = 1
      STATES(17) = 2.11e-8
      CONSTS(23) = 11
      CONSTS(24) = 0
      STATES(18) = 0.00132
      STATES(19) = 0.7768
      STATES(20) = 0.7766
      CONSTS(25) = 0.00029
      CONSTS(26) = 2e-5
      STATES(21) = 1.893e-4
      STATES(22) = 5.06e-6
      STATES(23) = 0.9999
      STATES(24) = 0.9995
      STATES(25) = 1
      CONSTS(27) = 2
      CONSTS(28) = 5
      CONSTS(29) = 0.0004736
      CONSTS(30) = 0.0619
      CONSTS(31) = 0.0005
      CONSTS(32) = 0.00973
      CONSTS(33) = 1.297
      CONSTS(34) = 1
      CONSTS(35) = 40
      CONSTS(36) = 200
      CONSTS(37) = 0.1
      CONSTS(38) = 2.5
      CONSTS(39) = 0.35
      CONSTS(40) = 1.38
      CONSTS(41) = 87.5
      STATES(26) = 2.7656
      CONSTS(42) = 0.001094
      CONSTS(43) = 0.00005468
      CONSTS(44) = 0.0038
      CONSTS(45) = 0.00025
      CONSTS(46) = 0.00036
      CONSTS(47) = 0.006375
      STATES(27) = 0.9864
      CONSTS(48) = 0.15
      CONSTS(49) = 0.045
      CONSTS(50) = 1.5
      CONSTS(51) = 2.5
      CONSTS(52) = 1
      CONSTS(53) = 0.06
      CONSTS(54) = 0.005
      CONSTS(55) = 0.306
      CONSTS(56) = 0.2
      CONSTS(57) = 0.001
      CONSTS(58) = 10
      CONSTS(59) = 0.3
      CONSTS(60) = 0.4
      CONSTS(61) = 0.00025
      RETURN
      END
      SUBROUTINE computeRates(VOI, CONSTS,  RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(2) =  (( 1.00000*CONSTS(2))/CONSTS(17))*EXP(24.3350+ (CONSTS(17)/CONSTS(2))*( 0.0112000*STATES(1) - 25.9140))
      ALGBRC(14) =  (( 1.00000*CONSTS(2))/CONSTS(17))*EXP(13.6880+ (CONSTS(17)/CONSTS(2))*( - 0.0603000*STATES(1) - 15.7070))
      RATES(6) =  ALGBRC(14)*STATES(7) -  ALGBRC(2)*STATES(6)
      RATES(10) =  ALGBRC(14)*STATES(11) -  ALGBRC(2)*STATES(10)
      ALGBRC(4) = 1.00000/(1.00000+EXP((STATES(1)+20.0000)/5.00000))
      ALGBRC(16) =  85.0000*EXP(- STATES(1)+45.0000 ** 2.00000/320.000)+5.00000/(1.00000+EXP((STATES(1) - 20.0000)/5.00000))+3.00000
      RATES(16) = (ALGBRC(4) - STATES(16))/ALGBRC(16)
      ALGBRC(5) = 1.00000/(1.00000+EXP((20.0000 - STATES(1))/6.00000))
      ALGBRC(17) =  9.50000*EXP(- STATES(1)+40.0000 ** 2.00000/1800.00)+0.800000
      RATES(17) = (ALGBRC(5) - STATES(17))/ALGBRC(17)
      ALGBRC(10) = 1.00000/(1.00000+EXP((STATES(1)+20.0000)/7.00000))
      ALGBRC(22) = ( 1102.50*EXP(- STATES(1)+27.0000 ** 2.00000/225.000)+200.000/(1.00000+EXP((13.0000 - STATES(1))/10.0000))+180.000/(1.00000+EXP((STATES(1)+30.0000)/10.0000))+20.0000)/4.00000
      RATES(23) = (ALGBRC(10) - STATES(23))/ALGBRC(22)
      ALGBRC(11) = 0.750000/(1.00000+EXP((STATES(1)+35.0000)/7.00000))+0.250000
      ALGBRC(23) = ( 562.000*EXP(- STATES(1)+27.0000 ** 2.00000/240.000)+31.0000/(1.00000+EXP((25.0000 - STATES(1))/10.0000))+80.0000/(1.00000+EXP((STATES(1)+30.0000)/10.0000)))/2.00000
      RATES(24) = (ALGBRC(11) - STATES(24))/ALGBRC(23)
      ALGBRC(12) = 0.400000/(1.00000+STATES(21)/0.0500000 ** 2.00000)+0.600000
      ALGBRC(24) = 80.0000/(1.00000+STATES(21)/0.0500000 ** 2.00000)+2.00000
      RATES(25) = (ALGBRC(12) - STATES(25))/ALGBRC(24)
      ALGBRC(26) =  (( 1.00000*CONSTS(2))/CONSTS(17))*EXP(22.7460+ (CONSTS(17)/CONSTS(2))*( 0.00000*STATES(1) - 25.9140))
      ALGBRC(33) =  (( 1.00000*CONSTS(2))/CONSTS(17))*EXP(13.1930+ (CONSTS(17)/CONSTS(2))*( 0.00000*STATES(1) - 15.7070))
      RATES(7) = ( ALGBRC(2)*STATES(6)+ ALGBRC(33)*STATES(8)) -  (ALGBRC(26)+ALGBRC(14))*STATES(7)
      RATES(11) = ( ALGBRC(2)*STATES(10)+ ALGBRC(33)*STATES(12)) -  (ALGBRC(26)+ALGBRC(14))*STATES(11)
      ALGBRC(3) = 1.00000/(1.00000+EXP((- 5.00000 - STATES(1))/14.0000))
      ALGBRC(15) = 1400.00/ (1.00000+EXP((5.00000 - STATES(1))/6.00000)) ** (1.0 / 2)
      ALGBRC(27) = 1.00000/(1.00000+EXP((STATES(1) - 35.0000)/15.0000))
      ALGBRC(34) =  1.00000*ALGBRC(15)*ALGBRC(27)+80.0000
      RATES(15) = (ALGBRC(3) - STATES(15))/ALGBRC(34)
      ALGBRC(6) = 1.00000/1.00000+EXP((- 56.8600 - STATES(1))/9.03000) ** 2.00000
      ALGBRC(18) = 1.00000/(1.00000+EXP((- 60.0000 - STATES(1))/5.00000))
      ALGBRC(28) = 0.100000/(1.00000+EXP((STATES(1)+35.0000)/5.00000))+0.100000/(1.00000+EXP((STATES(1) - 50.0000)/200.000))
      ALGBRC(35) =  1.00000*ALGBRC(18)*ALGBRC(28)
      RATES(18) = (ALGBRC(6) - STATES(18))/ALGBRC(35)
      ALGBRC(7) = 1.00000/1.00000+EXP(((STATES(1)+71.5500) - CONSTS(24))/7.43000) ** 2.00000
      ALGBRC(19) = TERNRY(STATES(1).LT.- 40.0000+CONSTS(24),  0.0570000*EXP(- ((STATES(1)+80.0000) - CONSTS(24))/6.80000), 0.00000)
      ALGBRC(29) = TERNRY(STATES(1).LT.- 40.0000+CONSTS(24),  2.70000*EXP( 0.0790000*(STATES(1) - CONSTS(24)))+ 310000.*EXP( 0.348500*(STATES(1) - CONSTS(24))), 0.770000/( 0.130000*(1.00000+EXP(((STATES(1)+10.6600) - CONSTS(24))/- 11.1000))))
      ALGBRC(36) = 1.00000/(ALGBRC(19)+ALGBRC(29))
      RATES(19) = (ALGBRC(7) - STATES(19))/ALGBRC(36)
      ALGBRC(8) = 1.00000/1.00000+EXP(((STATES(1)+71.5500) - CONSTS(24))/7.43000) ** 2.00000
      ALGBRC(20) = TERNRY(STATES(1).LT.- 40.0000+CONSTS(24), (( ( - 25428.0*EXP( 0.244400*(STATES(1) - CONSTS(24))) -  6.94800e-06*EXP( - 0.0439100*(STATES(1) - CONSTS(24))))*(STATES(1)+37.7800))/1.00000)/(1.00000+EXP( 0.311000*((STATES(1)+79.2300) - CONSTS(24)))), 0.00000)
      ALGBRC(30) = TERNRY(STATES(1).LT.- 40.0000+CONSTS(24), ( 0.0242400*EXP( - 0.0105200*(STATES(1) - CONSTS(24))))/(1.00000+EXP( - 0.137800*((STATES(1)+40.1400) - CONSTS(24)))), ( 0.600000*EXP( 0.0570000*(STATES(1) - CONSTS(24))))/(1.00000+EXP( - 0.100000*((STATES(1)+32.0000) - CONSTS(24)))))
      ALGBRC(37) = 1.00000/(ALGBRC(20)+ALGBRC(30))
      RATES(20) = (ALGBRC(8) - STATES(20))/ALGBRC(37)
      ALGBRC(9) = 1.00000/(1.00000+EXP((CONSTS(28) - STATES(1))/7.50000))
      ALGBRC(21) = 1.40000/(1.00000+EXP((- 35.0000 - STATES(1))/13.0000))+0.250000
      ALGBRC(31) = 1.40000/(1.00000+EXP((STATES(1)+5.00000)/5.00000))
      ALGBRC(38) = 1.00000/(1.00000+EXP((50.0000 - STATES(1))/20.0000))
      ALGBRC(41) =  1.00000*ALGBRC(21)*ALGBRC(31)+ALGBRC(38)
      RATES(22) = (ALGBRC(9) - STATES(22))/ALGBRC(41)
      ALGBRC(40) =  (( 1.00000*CONSTS(2))/CONSTS(17))*EXP(22.0980+ (CONSTS(17)/CONSTS(2))*( 0.0365000*STATES(1) - 25.9140))
      ALGBRC(43) =  (( 1.00000*CONSTS(2))/CONSTS(17))*EXP(7.31300+ (CONSTS(17)/CONSTS(2))*( - 0.0399000*STATES(1) - 15.7070))
      RATES(8) = ( ALGBRC(26)*STATES(7)+ ALGBRC(43)*STATES(5)) -  (ALGBRC(40)+ALGBRC(33))*STATES(8)
      RATES(12) = ( ALGBRC(26)*STATES(11)+ ALGBRC(43)*STATES(13)) -  (ALGBRC(40)+ALGBRC(33))*STATES(12)
      ALGBRC(45) =  (( 1.00000*CONSTS(2))/CONSTS(17))*EXP(30.0160+ (CONSTS(17)/CONSTS(2))*( 0.0223000*STATES(1) - 30.8880))*5.40000/CONSTS(4) ** 0.400000
      ALGBRC(47) =  (( 1.00000*CONSTS(2))/CONSTS(17))*EXP(30.0610+ (CONSTS(17)/CONSTS(2))*( - 0.0312000*STATES(1) - 33.2430))
      RATES(9) =  ALGBRC(45)*STATES(5) -  ALGBRC(47)*STATES(9)
      RATES(14) =  ALGBRC(45)*STATES(13) -  ALGBRC(47)*STATES(14)
      ALGBRC(49) =  STATES(5)*CONSTS(18)*CONSTS(19)
      ALGBRC(51) =  STATES(13)*CONSTS(20)
      RATES(5) = ((( ALGBRC(40)*STATES(8)+ ALGBRC(47)*STATES(9)) -  (ALGBRC(45)+ALGBRC(43))*STATES(5)) - ALGBRC(49))+ALGBRC(51)
      RATES(13) = ((( ALGBRC(40)*STATES(12)+ ALGBRC(47)*STATES(14)) -  (ALGBRC(45)+ALGBRC(43))*STATES(13))+ALGBRC(49)) - ALGBRC(51)
      ALGBRC(25) =  (( CONSTS(1)*CONSTS(2))/CONSTS(3))*log(CONSTS(4)/STATES(2))
      ALGBRC(44) =  0.450000*EXP(- (STATES(1) -  CONSTS(14)*ALGBRC(25))/20.0000)
      ALGBRC(50) = 1.00000+CONSTS(12)/ALGBRC(44)
      ALGBRC(42) =  2.80000*EXP(- (STATES(1) -  CONSTS(14)*ALGBRC(25))/180.000)
      ALGBRC(46) =  0.000700000*EXP(- ((STATES(1) -  CONSTS(14)*ALGBRC(25))+ 8.00000*CONSTS(12))/4.80000)
      ALGBRC(52) = ( ALGBRC(50)*ALGBRC(50))/(CONSTS(13)/ALGBRC(46)+CONSTS(12)/ALGBRC(42)+ ALGBRC(50)*ALGBRC(50)*ALGBRC(50))
      ALGBRC(48) =  0.0400000*EXP(- (STATES(1) -  CONSTS(14)*ALGBRC(25))/9.10000)
      ALGBRC(53) = 1.00000/(1.00000+CONSTS(13)/ALGBRC(48))
      ALGBRC(54) =  CONSTS(15)*ALGBRC(52)+ (1.00000 - CONSTS(15))*ALGBRC(53)
      ALGBRC(55) =  CONSTS(11)*(CONSTS(2)/35.0000 - 55.0000/7.00000)* (CONSTS(4)/5.40000) ** (1.0 / 2)*ALGBRC(54)*(STATES(1) - ALGBRC(25))
      ALGBRC(58) =  CONSTS(22)*STATES(17)*STATES(16)*(STATES(1) - ALGBRC(25))
      ALGBRC(56) =  CONSTS(16)*(CONSTS(2)/35.0000 - 55.0000/7.00000)* (CONSTS(4)/5.40000) ** (1.0 / 2)*STATES(5)*(STATES(1) - ALGBRC(25))
      ALGBRC(32) =  (( CONSTS(1)*CONSTS(2))/CONSTS(3))*log((CONSTS(4)+ CONSTS(10)*CONSTS(6))/(STATES(2)+ CONSTS(10)*STATES(3)))
      ALGBRC(57) =  CONSTS(21)*STATES(15) ** 2.00000*(STATES(1) - ALGBRC(32))
      ALGBRC(65) = (( (( CONSTS(33)*CONSTS(4))/(CONSTS(4)+CONSTS(34)))*STATES(3))/(STATES(3)+CONSTS(35)))/(1.00000+ 0.124500*EXP(( - 0.100000*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))+ 0.0353000*EXP(( - STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2))))
      ALGBRC(64) = ( CONSTS(32)*(STATES(1) - ALGBRC(25)))/(1.00000+EXP((25.0000 - STATES(1))/5.98000))
      ALGBRC(1) = TERNRY(VOI -  INT(VOI/CONSTS(9))*CONSTS(9).GE.100.000.AND.VOI -  INT(VOI/CONSTS(9))*CONSTS(9).LE.103.000, - 12.0000, 0.00000)
      RATES(2) =  (- ((ALGBRC(55)+ALGBRC(58)+ALGBRC(56)+ALGBRC(57)+ALGBRC(64)+ALGBRC(1)) -  2.00000*ALGBRC(65))/( CONSTS(8)*CONSTS(3)))*CONSTS(7)
      ALGBRC(13) =  (( CONSTS(1)*CONSTS(2))/CONSTS(3))*log(CONSTS(6)/STATES(3))
      ALGBRC(59) =  CONSTS(23)*STATES(18) ** 3.00000*STATES(19)*STATES(20)*(STATES(1) - ALGBRC(13))
      ALGBRC(60) =  CONSTS(25)*(STATES(1) - ALGBRC(13))
      ALGBRC(66) = ( CONSTS(36)*( EXP(( CONSTS(39)*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))*STATES(3) ** 3.00000*CONSTS(5) -  EXP(( (CONSTS(39) - 1.00000)*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))*CONSTS(6) ** 3.00000*STATES(4)*CONSTS(38)))/( (CONSTS(41) ** 3.00000+CONSTS(6) ** 3.00000)*(CONSTS(40)+CONSTS(5))*(1.00000+ CONSTS(37)*EXP(( (CONSTS(39) - 1.00000)*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))))
      RATES(3) = ( - (ALGBRC(59)+ALGBRC(60)+ 3.00000*ALGBRC(65)+ 3.00000*ALGBRC(66))*CONSTS(7))/( CONSTS(8)*CONSTS(3))
      ALGBRC(61) = ( (( CONSTS(26)*STATES(22)*STATES(23)*STATES(24)*STATES(25)*CONSTS(27) ** 2.00000*(STATES(1) - 15.0000)*CONSTS(3) ** 2.00000)/( CONSTS(1)*CONSTS(2)))*( 0.250000*STATES(21)*EXP(( 2.00000*(STATES(1) - 15.0000)*CONSTS(3))/( CONSTS(1)*CONSTS(2))) - CONSTS(5)))/(EXP(( 2.00000*(STATES(1) - 15.0000)*CONSTS(3))/( CONSTS(1)*CONSTS(2))) - 1.00000)
      ALGBRC(39) =  (( 0.500000*CONSTS(1)*CONSTS(2))/CONSTS(3))*log(CONSTS(5)/STATES(4))
      ALGBRC(62) =  CONSTS(29)*(STATES(1) - ALGBRC(39))
      ALGBRC(63) = ( CONSTS(30)*STATES(4))/(STATES(4)+CONSTS(31))
      ALGBRC(67) = ALGBRC(55)+ALGBRC(58)+ALGBRC(56)+ALGBRC(57)+ALGBRC(61)+ALGBRC(65)+ALGBRC(59)+ALGBRC(60)+ALGBRC(66)+ALGBRC(62)+ALGBRC(64)+ALGBRC(63)+ALGBRC(1)
      RATES(1) = - ALGBRC(67)
      ALGBRC(71) = 1.00000/(1.00000+( CONSTS(56)*CONSTS(57))/STATES(4)+CONSTS(57) ** 2.00000)
      ALGBRC(68) = CONSTS(47)/(1.00000+CONSTS(45) ** 2.00000/STATES(4) ** 2.00000)
      ALGBRC(69) =  CONSTS(46)*(STATES(26) - STATES(4))
      ALGBRC(70) =  CONSTS(44)*(STATES(21) - STATES(4))
      RATES(4) =  ALGBRC(71)*((( (ALGBRC(69) - ALGBRC(68))*CONSTS(42))/CONSTS(8)+ALGBRC(70)) - ( ((ALGBRC(62)+ALGBRC(63)) -  2.00000*ALGBRC(66))*CONSTS(7))/( 2.00000*CONSTS(8)*CONSTS(3)))
      ALGBRC(72) = CONSTS(51) - (CONSTS(51) - CONSTS(52))/(1.00000+CONSTS(50)/STATES(26) ** 2.00000)
      ALGBRC(74) =  CONSTS(49)*ALGBRC(72)
      RATES(27) =  - ALGBRC(74)*STATES(21)*STATES(27)+ CONSTS(54)*(1.00000 - STATES(27))
      ALGBRC(77) = 1.00000/(1.00000+( CONSTS(58)*CONSTS(59))/STATES(26)+CONSTS(59) ** 2.00000)
      ALGBRC(73) = CONSTS(48)/ALGBRC(72)
      ALGBRC(75) = ( ALGBRC(73)*STATES(21) ** 2.00000*STATES(27))/(CONSTS(53)+ ALGBRC(73)*STATES(21) ** 2.00000)
      ALGBRC(76) =  CONSTS(55)*ALGBRC(75)*(STATES(26) - STATES(21))
      RATES(26) =  ALGBRC(77)*(ALGBRC(68) - (ALGBRC(76)+ALGBRC(69)))
      ALGBRC(78) = 1.00000/(1.00000+( CONSTS(60)*CONSTS(61))/STATES(21)+CONSTS(61) ** 2.00000)
      RATES(21) =  ALGBRC(78)*((( - ALGBRC(61)*CONSTS(7))/( 2.00000*CONSTS(43)*CONSTS(3))+( ALGBRC(76)*CONSTS(42))/CONSTS(43)) - ( ALGBRC(70)*CONSTS(8))/CONSTS(43))
      RETURN
      END
      SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(2) =  (( 1.00000*CONSTS(2))/CONSTS(17))*EXP(24.3350+ (CONSTS(17)/CONSTS(2))*( 0.0112000*STATES(1) - 25.9140))
      ALGBRC(14) =  (( 1.00000*CONSTS(2))/CONSTS(17))*EXP(13.6880+ (CONSTS(17)/CONSTS(2))*( - 0.0603000*STATES(1) - 15.7070))
      ALGBRC(4) = 1.00000/(1.00000+EXP((STATES(1)+20.0000)/5.00000))
      ALGBRC(16) =  85.0000*EXP(- STATES(1)+45.0000 ** 2.00000/320.000)+5.00000/(1.00000+EXP((STATES(1) - 20.0000)/5.00000))+3.00000
      ALGBRC(5) = 1.00000/(1.00000+EXP((20.0000 - STATES(1))/6.00000))
      ALGBRC(17) =  9.50000*EXP(- STATES(1)+40.0000 ** 2.00000/1800.00)+0.800000
      ALGBRC(10) = 1.00000/(1.00000+EXP((STATES(1)+20.0000)/7.00000))
      ALGBRC(22) = ( 1102.50*EXP(- STATES(1)+27.0000 ** 2.00000/225.000)+200.000/(1.00000+EXP((13.0000 - STATES(1))/10.0000))+180.000/(1.00000+EXP((STATES(1)+30.0000)/10.0000))+20.0000)/4.00000
      ALGBRC(11) = 0.750000/(1.00000+EXP((STATES(1)+35.0000)/7.00000))+0.250000
      ALGBRC(23) = ( 562.000*EXP(- STATES(1)+27.0000 ** 2.00000/240.000)+31.0000/(1.00000+EXP((25.0000 - STATES(1))/10.0000))+80.0000/(1.00000+EXP((STATES(1)+30.0000)/10.0000)))/2.00000
      ALGBRC(12) = 0.400000/(1.00000+STATES(21)/0.0500000 ** 2.00000)+0.600000
      ALGBRC(24) = 80.0000/(1.00000+STATES(21)/0.0500000 ** 2.00000)+2.00000
      ALGBRC(26) =  (( 1.00000*CONSTS(2))/CONSTS(17))*EXP(22.7460+ (CONSTS(17)/CONSTS(2))*( 0.00000*STATES(1) - 25.9140))
      ALGBRC(33) =  (( 1.00000*CONSTS(2))/CONSTS(17))*EXP(13.1930+ (CONSTS(17)/CONSTS(2))*( 0.00000*STATES(1) - 15.7070))
      ALGBRC(3) = 1.00000/(1.00000+EXP((- 5.00000 - STATES(1))/14.0000))
      ALGBRC(15) = 1400.00/ (1.00000+EXP((5.00000 - STATES(1))/6.00000)) ** (1.0 / 2)
      ALGBRC(27) = 1.00000/(1.00000+EXP((STATES(1) - 35.0000)/15.0000))
      ALGBRC(34) =  1.00000*ALGBRC(15)*ALGBRC(27)+80.0000
      ALGBRC(6) = 1.00000/1.00000+EXP((- 56.8600 - STATES(1))/9.03000) ** 2.00000
      ALGBRC(18) = 1.00000/(1.00000+EXP((- 60.0000 - STATES(1))/5.00000))
      ALGBRC(28) = 0.100000/(1.00000+EXP((STATES(1)+35.0000)/5.00000))+0.100000/(1.00000+EXP((STATES(1) - 50.0000)/200.000))
      ALGBRC(35) =  1.00000*ALGBRC(18)*ALGBRC(28)
      ALGBRC(7) = 1.00000/1.00000+EXP(((STATES(1)+71.5500) - CONSTS(24))/7.43000) ** 2.00000
      ALGBRC(19) = TERNRY(STATES(1).LT.- 40.0000+CONSTS(24),  0.0570000*EXP(- ((STATES(1)+80.0000) - CONSTS(24))/6.80000), 0.00000)
      ALGBRC(29) = TERNRY(STATES(1).LT.- 40.0000+CONSTS(24),  2.70000*EXP( 0.0790000*(STATES(1) - CONSTS(24)))+ 310000.*EXP( 0.348500*(STATES(1) - CONSTS(24))), 0.770000/( 0.130000*(1.00000+EXP(((STATES(1)+10.6600) - CONSTS(24))/- 11.1000))))
      ALGBRC(36) = 1.00000/(ALGBRC(19)+ALGBRC(29))
      ALGBRC(8) = 1.00000/1.00000+EXP(((STATES(1)+71.5500) - CONSTS(24))/7.43000) ** 2.00000
      ALGBRC(20) = TERNRY(STATES(1).LT.- 40.0000+CONSTS(24), (( ( - 25428.0*EXP( 0.244400*(STATES(1) - CONSTS(24))) -  6.94800e-06*EXP( - 0.0439100*(STATES(1) - CONSTS(24))))*(STATES(1)+37.7800))/1.00000)/(1.00000+EXP( 0.311000*((STATES(1)+79.2300) - CONSTS(24)))), 0.00000)
      ALGBRC(30) = TERNRY(STATES(1).LT.- 40.0000+CONSTS(24), ( 0.0242400*EXP( - 0.0105200*(STATES(1) - CONSTS(24))))/(1.00000+EXP( - 0.137800*((STATES(1)+40.1400) - CONSTS(24)))), ( 0.600000*EXP( 0.0570000*(STATES(1) - CONSTS(24))))/(1.00000+EXP( - 0.100000*((STATES(1)+32.0000) - CONSTS(24)))))
      ALGBRC(37) = 1.00000/(ALGBRC(20)+ALGBRC(30))
      ALGBRC(9) = 1.00000/(1.00000+EXP((CONSTS(28) - STATES(1))/7.50000))
      ALGBRC(21) = 1.40000/(1.00000+EXP((- 35.0000 - STATES(1))/13.0000))+0.250000
      ALGBRC(31) = 1.40000/(1.00000+EXP((STATES(1)+5.00000)/5.00000))
      ALGBRC(38) = 1.00000/(1.00000+EXP((50.0000 - STATES(1))/20.0000))
      ALGBRC(41) =  1.00000*ALGBRC(21)*ALGBRC(31)+ALGBRC(38)
      ALGBRC(40) =  (( 1.00000*CONSTS(2))/CONSTS(17))*EXP(22.0980+ (CONSTS(17)/CONSTS(2))*( 0.0365000*STATES(1) - 25.9140))
      ALGBRC(43) =  (( 1.00000*CONSTS(2))/CONSTS(17))*EXP(7.31300+ (CONSTS(17)/CONSTS(2))*( - 0.0399000*STATES(1) - 15.7070))
      ALGBRC(45) =  (( 1.00000*CONSTS(2))/CONSTS(17))*EXP(30.0160+ (CONSTS(17)/CONSTS(2))*( 0.0223000*STATES(1) - 30.8880))*5.40000/CONSTS(4) ** 0.400000
      ALGBRC(47) =  (( 1.00000*CONSTS(2))/CONSTS(17))*EXP(30.0610+ (CONSTS(17)/CONSTS(2))*( - 0.0312000*STATES(1) - 33.2430))
      ALGBRC(49) =  STATES(5)*CONSTS(18)*CONSTS(19)
      ALGBRC(51) =  STATES(13)*CONSTS(20)
      ALGBRC(25) =  (( CONSTS(1)*CONSTS(2))/CONSTS(3))*log(CONSTS(4)/STATES(2))
      ALGBRC(44) =  0.450000*EXP(- (STATES(1) -  CONSTS(14)*ALGBRC(25))/20.0000)
      ALGBRC(50) = 1.00000+CONSTS(12)/ALGBRC(44)
      ALGBRC(42) =  2.80000*EXP(- (STATES(1) -  CONSTS(14)*ALGBRC(25))/180.000)
      ALGBRC(46) =  0.000700000*EXP(- ((STATES(1) -  CONSTS(14)*ALGBRC(25))+ 8.00000*CONSTS(12))/4.80000)
      ALGBRC(52) = ( ALGBRC(50)*ALGBRC(50))/(CONSTS(13)/ALGBRC(46)+CONSTS(12)/ALGBRC(42)+ ALGBRC(50)*ALGBRC(50)*ALGBRC(50))
      ALGBRC(48) =  0.0400000*EXP(- (STATES(1) -  CONSTS(14)*ALGBRC(25))/9.10000)
      ALGBRC(53) = 1.00000/(1.00000+CONSTS(13)/ALGBRC(48))
      ALGBRC(54) =  CONSTS(15)*ALGBRC(52)+ (1.00000 - CONSTS(15))*ALGBRC(53)
      ALGBRC(55) =  CONSTS(11)*(CONSTS(2)/35.0000 - 55.0000/7.00000)* (CONSTS(4)/5.40000) ** (1.0 / 2)*ALGBRC(54)*(STATES(1) - ALGBRC(25))
      ALGBRC(58) =  CONSTS(22)*STATES(17)*STATES(16)*(STATES(1) - ALGBRC(25))
      ALGBRC(56) =  CONSTS(16)*(CONSTS(2)/35.0000 - 55.0000/7.00000)* (CONSTS(4)/5.40000) ** (1.0 / 2)*STATES(5)*(STATES(1) - ALGBRC(25))
      ALGBRC(32) =  (( CONSTS(1)*CONSTS(2))/CONSTS(3))*log((CONSTS(4)+ CONSTS(10)*CONSTS(6))/(STATES(2)+ CONSTS(10)*STATES(3)))
      ALGBRC(57) =  CONSTS(21)*STATES(15) ** 2.00000*(STATES(1) - ALGBRC(32))
      ALGBRC(65) = (( (( CONSTS(33)*CONSTS(4))/(CONSTS(4)+CONSTS(34)))*STATES(3))/(STATES(3)+CONSTS(35)))/(1.00000+ 0.124500*EXP(( - 0.100000*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))+ 0.0353000*EXP(( - STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2))))
      ALGBRC(64) = ( CONSTS(32)*(STATES(1) - ALGBRC(25)))/(1.00000+EXP((25.0000 - STATES(1))/5.98000))
      ALGBRC(1) = TERNRY(VOI -  INT(VOI/CONSTS(9))*CONSTS(9).GE.100.000.AND.VOI -  INT(VOI/CONSTS(9))*CONSTS(9).LE.103.000, - 12.0000, 0.00000)
      ALGBRC(13) =  (( CONSTS(1)*CONSTS(2))/CONSTS(3))*log(CONSTS(6)/STATES(3))
      ALGBRC(59) =  CONSTS(23)*STATES(18) ** 3.00000*STATES(19)*STATES(20)*(STATES(1) - ALGBRC(13))
      ALGBRC(60) =  CONSTS(25)*(STATES(1) - ALGBRC(13))
      ALGBRC(66) = ( CONSTS(36)*( EXP(( CONSTS(39)*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))*STATES(3) ** 3.00000*CONSTS(5) -  EXP(( (CONSTS(39) - 1.00000)*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))*CONSTS(6) ** 3.00000*STATES(4)*CONSTS(38)))/( (CONSTS(41) ** 3.00000+CONSTS(6) ** 3.00000)*(CONSTS(40)+CONSTS(5))*(1.00000+ CONSTS(37)*EXP(( (CONSTS(39) - 1.00000)*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))))
      ALGBRC(61) = ( (( CONSTS(26)*STATES(22)*STATES(23)*STATES(24)*STATES(25)*CONSTS(27) ** 2.00000*(STATES(1) - 15.0000)*CONSTS(3) ** 2.00000)/( CONSTS(1)*CONSTS(2)))*( 0.250000*STATES(21)*EXP(( 2.00000*(STATES(1) - 15.0000)*CONSTS(3))/( CONSTS(1)*CONSTS(2))) - CONSTS(5)))/(EXP(( 2.00000*(STATES(1) - 15.0000)*CONSTS(3))/( CONSTS(1)*CONSTS(2))) - 1.00000)
      ALGBRC(39) =  (( 0.500000*CONSTS(1)*CONSTS(2))/CONSTS(3))*log(CONSTS(5)/STATES(4))
      ALGBRC(62) =  CONSTS(29)*(STATES(1) - ALGBRC(39))
      ALGBRC(63) = ( CONSTS(30)*STATES(4))/(STATES(4)+CONSTS(31))
      ALGBRC(67) = ALGBRC(55)+ALGBRC(58)+ALGBRC(56)+ALGBRC(57)+ALGBRC(61)+ALGBRC(65)+ALGBRC(59)+ALGBRC(60)+ALGBRC(66)+ALGBRC(62)+ALGBRC(64)+ALGBRC(63)+ALGBRC(1)
      ALGBRC(71) = 1.00000/(1.00000+( CONSTS(56)*CONSTS(57))/STATES(4)+CONSTS(57) ** 2.00000)
      ALGBRC(68) = CONSTS(47)/(1.00000+CONSTS(45) ** 2.00000/STATES(4) ** 2.00000)
      ALGBRC(69) =  CONSTS(46)*(STATES(26) - STATES(4))
      ALGBRC(70) =  CONSTS(44)*(STATES(21) - STATES(4))
      ALGBRC(72) = CONSTS(51) - (CONSTS(51) - CONSTS(52))/(1.00000+CONSTS(50)/STATES(26) ** 2.00000)
      ALGBRC(74) =  CONSTS(49)*ALGBRC(72)
      ALGBRC(77) = 1.00000/(1.00000+( CONSTS(58)*CONSTS(59))/STATES(26)+CONSTS(59) ** 2.00000)
      ALGBRC(73) = CONSTS(48)/ALGBRC(72)
      ALGBRC(75) = ( ALGBRC(73)*STATES(21) ** 2.00000*STATES(27))/(CONSTS(53)+ ALGBRC(73)*STATES(21) ** 2.00000)
      ALGBRC(76) =  CONSTS(55)*ALGBRC(75)*(STATES(26) - STATES(21))
      ALGBRC(78) = 1.00000/(1.00000+( CONSTS(60)*CONSTS(61))/STATES(21)+CONSTS(61) ** 2.00000)
      RETURN
      END
      REAL FUNCTION TERNRY(TEST, VALA, VALB)
      LOGICAL TEST
      REAL VALA, VALB
      IF (TEST) THEN
        TERNRY = VALA
      ELSE
        TERNRY = VALB
      ENDIF
      RETURN
      END