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 107 entries in the algebraic variable array.
C There are a total of 43 entries in each of the rate and state variable arrays.
C There are a total of 85 entries in the constant variable array.
C
C
C CONSTS(59) is Aj_nj in component cell (um2).
C CONSTS(1) is BCa in component calcium (mM).
C CONSTS(2) is CSQN in component calcium (mM).
C STATES(1) is CaSR1 in component calcium (mM).
C STATES(2) is CaSR2 in component calcium (mM).
C STATES(3) is CaSR3 in component calcium (mM).
C STATES(4) is CaSR4 in component calcium (mM).
C STATES(5) is Cai1 in component calcium (mM).
C STATES(6) is Cai2 in component calcium (mM).
C STATES(7) is Cai3 in component calcium (mM).
C STATES(8) is Cai4 in component calcium (mM).
C STATES(9) is Cass in component calcium (mM).
C CONSTS(3) is DCa in component calcium (m2_per_s_times_1e_minus_12).
C CONSTS(4) is DCaBm in component calcium (m2_per_s_times_1e_minus_12).
C CONSTS(5) is DCaSR in component calcium (m2_per_s_times_1e_minus_12).
C CONSTS(6) is F in component phys (C_per_mol).
C ALGBRC(59) is ICaL in component ical (pA).
C ALGBRC(64) is ICaP in component icap (pA).
C ALGBRC(82) is ICab in component icab (pA).
C ALGBRC(72) is INaCa in component inaca (pA).
C ALGBRC(76) is JCa1 in component calcium (kat_times_1e_minus_12).
C ALGBRC(77) is JCa2 in component calcium (kat_times_1e_minus_12).
C ALGBRC(78) is JCa3 in component calcium (kat_times_1e_minus_12).
C ALGBRC(49) is JCa4 in component calcium (kat_times_1e_minus_12).
C ALGBRC(94) is JCass in component calcium (kat_times_1e_minus_12).
C ALGBRC(73) is JSRCa1 in component calcium (kat_times_1e_minus_12).
C ALGBRC(74) is JSRCa2 in component calcium (kat_times_1e_minus_12).
C ALGBRC(75) is JSRCa3 in component calcium (kat_times_1e_minus_12).
C ALGBRC(92) is JSRCa4 in component calcium (kat_times_1e_minus_12).
C ALGBRC(1) is JSRCaleak1 in component calcium (kat_times_1e_minus_12).
C ALGBRC(2) is JSRCaleak2 in component calcium (kat_times_1e_minus_12).
C ALGBRC(3) is JSRCaleak3 in component calcium (kat_times_1e_minus_12).
C ALGBRC(4) is JSRCaleakss in component calcium (kat_times_1e_minus_12).
C ALGBRC(65) is J_SERCASR1 in component serca (kat_times_1e_minus_12).
C ALGBRC(66) is J_SERCASR2 in component serca (kat_times_1e_minus_12).
C ALGBRC(67) is J_SERCASR3 in component serca (kat_times_1e_minus_12).
C ALGBRC(89) is J_SERCASRss in component serca (kat_times_1e_minus_12).
C ALGBRC(69) is J_bulkSERCA1 in component serca (kat_times_1e_minus_12).
C ALGBRC(70) is J_bulkSERCA2 in component serca (kat_times_1e_minus_12).
C ALGBRC(71) is J_bulkSERCA3 in component serca (kat_times_1e_minus_12).
C ALGBRC(91) is J_bulkSERCAss in component serca (kat_times_1e_minus_12).
C ALGBRC(32) is Jj_nj in component calcium (kat_times_1e_minus_12).
C ALGBRC(61) is Jrel1 in component ryr (kat_times_1e_minus_12).
C ALGBRC(62) is Jrel2 in component ryr (kat_times_1e_minus_12).
C ALGBRC(63) is Jrel3 in component ryr (kat_times_1e_minus_12).
C ALGBRC(87) is Jrelss in component ryr (kat_times_1e_minus_12).
C CONSTS(7) is KdBCa in component calcium (mM).
C CONSTS(8) is KdCSQN in component calcium (mM).
C CONSTS(9) is KdSLhigh in component calcium (mM).
C CONSTS(10) is KdSLlow in component calcium (mM).
C CONSTS(11) is SLhigh in component calcium (mM).
C CONSTS(12) is SLlow in component calcium (mM).
C CONSTS(73) is VSR1 in component cell (nL).
C CONSTS(78) is VSR2 in component cell (nL).
C CONSTS(81) is VSR3 in component cell (nL).
C CONSTS(84) is VSR4 in component cell (nL).
C CONSTS(60) is Vnonjunct1 in component cell (nL).
C CONSTS(72) is Vnonjunct2 in component cell (nL).
C CONSTS(77) is Vnonjunct3 in component cell (nL).
C CONSTS(80) is Vnonjunct4 in component cell (nL).
C CONSTS(13) is Vss in component cell (nL).
C ALGBRC(29) is calcium_CaSR1_beta in component calcium (dimensionless).
C ALGBRC(30) is calcium_CaSR2_beta in component calcium (dimensionless).
C ALGBRC(31) is calcium_CaSR3_beta in component calcium (dimensionless).
C ALGBRC(50) is calcium_CaSR4_beta in component calcium (dimensionless).
C ALGBRC(51) is calcium_Cai1_beta in component calcium (dimensionless).
C ALGBRC(46) is calcium_Cai1_gamma in component calcium (dimensionless).
C ALGBRC(52) is calcium_Cai2_beta in component calcium (dimensionless).
C ALGBRC(47) is calcium_Cai2_gamma in component calcium (dimensionless).
C ALGBRC(53) is calcium_Cai3_beta in component calcium (dimensionless).
C ALGBRC(48) is calcium_Cai3_gamma in component calcium (dimensionless).
C ALGBRC(60) is calcium_Cai4_beta in component calcium (dimensionless).
C ALGBRC(54) is calcium_Cai4_gamma in component calcium (dimensionless).
C ALGBRC(55) is calcium_Cass_beta in component calcium (dimensionless).
C ALGBRC(83) is calcium_Cass_i_tot in component calcium (pA).
C CONSTS(14) is dx in component cell (um).
C CONSTS(15) is kSRleak in component calcium (hertz).
C VOI is time in component engine (second).
C CONSTS(61) is xj_nj in component cell (um).
C CONSTS(16) is Cm in component cell (nF).
C CONSTS(85) is Vcytosol in component cell (nL).
C CONSTS(83) is Vnonjunct_Nai in component cell (nL).
C CONSTS(17) is lcell in component cell (um).
C CONSTS(18) is pi in component cell (dimensionless).
C CONSTS(19) is rjunct in component cell (um).
C CONSTS(62) is xj_nj_Nai in component cell (um).
C CONSTS(20) is Cao in component extra (mM).
C CONSTS(21) is Ko in component extra (mM).
C CONSTS(22) is Nao in component extra (mM).
C ALGBRC(81) is ECa in component nernst (mV).
C STATES(10) is V in component membrane (mV).
C CONSTS(23) is gCab in component icab (nS).
C CONSTS(24) is ECa_app in component ical (mV).
C STATES(11) is d in component ical (hertz).
C STATES(12) is f1 in component ical (hertz).
C STATES(13) is f2 in component ical (hertz).
C ALGBRC(5) is f_inf in component ical (dimensionless).
C STATES(14) is fca in component ical (hertz).
C CONSTS(25) is gCaL in component ical (nS).
C ALGBRC(6) is ical_d_inf in component ical (dimensionless).
C ALGBRC(33) is ical_d_tau in component ical (second).
C ALGBRC(34) is ical_f1_tau in component ical (second).
C ALGBRC(35) is ical_f2_tau in component ical (second).
C ALGBRC(7) is ical_fca_inf in component ical (dimensionless).
C CONSTS(26) is ical_fca_tau in component ical (second).
C CONSTS(27) is kCa in component ical (mM).
C CONSTS(28) is kCan in component ical (dimensionless).
C CONSTS(29) is ICaPmax in component icap (pA).
C CONSTS(30) is kCaP in component icap (mM).
C ALGBRC(84) is EK in component nernst (mV).
C ALGBRC(97) is ENa in component nernst (mV).
C ALGBRC(99) is If in component if (pA).
C ALGBRC(86) is IfK in component if (pA).
C ALGBRC(98) is IfNa in component if (pA).
C CONSTS(31) is gIf in component if (nS).
C ALGBRC(8) is if_y_inf in component if (dimensionless).
C ALGBRC(36) is if_y_tau in component if (second).
C STATES(15) is y in component if (hertz).
C CONSTS(74) is FRT in component phys (per_mV).
C ALGBRC(88) is IK1 in component ik1 (pA).
C CONSTS(63) is gK1 in component ik1 (nS).
C ALGBRC(90) is IKr in component ikr (pA).
C CONSTS(32) is gKr in component ikr (nS).
C ALGBRC(9) is ikr_pa_inf in component ikr (dimensionless).
C ALGBRC(37) is ikr_pa_tau in component ikr (second).
C STATES(16) is pa in component ikr (hertz).
C ALGBRC(68) is pi in component ikr (dimensionless).
C ALGBRC(93) is IKs in component iks (pA).
C CONSTS(33) is gKs in component iks (nS).
C ALGBRC(10) is iks_n_inf in component iks (dimensionless).
C ALGBRC(38) is iks_n_tau in component iks (second).
C STATES(17) is n in component iks (hertz).
C ALGBRC(95) is IKur in component ikur (pA).
C CONSTS(64) is gKur in component ikur (nS).
C ALGBRC(11) is ikur_r_inf in component ikur (dimensionless).
C ALGBRC(39) is ikur_r_tau in component ikur (second).
C ALGBRC(12) is ikur_s_inf in component ikur (dimensionless).
C ALGBRC(40) is ikur_s_tau in component ikur (second).
C STATES(18) is r in component ikur (hertz).
C STATES(19) is s in component ikur (hertz).
C ALGBRC(100) is INa in component ina (pA).
C CONSTS(34) is PNa in component ina (m3_per_s_times_1e_minus_12).
C STATES(20) is h1 in component ina (hertz).
C STATES(21) is h2 in component ina (hertz).
C ALGBRC(13) is h_inf in component ina (dimensionless).
C ALGBRC(41) is ina_h1_tau in component ina (second).
C ALGBRC(42) is ina_h2_tau in component ina (second).
C ALGBRC(14) is ina_m_inf in component ina (dimensionless).
C ALGBRC(43) is ina_m_tau in component ina (second).
C STATES(22) is m in component ina (hertz).
C ALGBRC(101) is INab in component inab (pA).
C CONSTS(35) is gNab in component inab (nS).
C STATES(23) is Nass in component sodium (mM).
C CONSTS(36) is dNaCa in component inaca (m12_per_mol4).
C CONSTS(37) is fCaNCX in component inaca (dimensionless).
C CONSTS(38) is gam in component inaca (dimensionless).
C CONSTS(39) is kNaCa in component inaca (m12_A_per_mol4_times_1e_minus_12).
C ALGBRC(80) is INaK in component inak (pA).
C CONSTS(40) is INaKmax in component inak (pA).
C ALGBRC(79) is Nass15 in component inak (dimensionless).
C CONSTS(41) is kNaKK in component inak (mM).
C CONSTS(42) is kNaKNa in component inak (dimensionless).
C ALGBRC(96) is It in component it (pA).
C CONSTS(65) is gt in component it (nS).
C ALGBRC(15) is it_r_inf in component it (dimensionless).
C ALGBRC(44) is it_r_tau in component it (second).
C ALGBRC(16) is it_s_inf in component it (dimensionless).
C ALGBRC(45) is it_s_tau in component it (second).
C STATES(24) is r in component it (hertz).
C STATES(25) is s in component it (hertz).
C ALGBRC(102) is i_ion in component membrane (pA).
C ALGBRC(104) is i_stim in component stimulus (pA).
C STATES(26) is Ki in component potassium (mM).
C CONSTS(66) is RTF in component phys (mV).
C CONSTS(43) is R in component phys (mJ_per_mol_per_K).
C CONSTS(44) is T in component phys (kelvin).
C ALGBRC(106) is i_tot in component potassium (pA).
C ALGBRC(56) is SRCa1 in component ryr (dimensionless).
C ALGBRC(57) is SRCa2 in component ryr (dimensionless).
C ALGBRC(58) is SRCa3 in component ryr (dimensionless).
C ALGBRC(85) is SRCass in component ryr (dimensionless).
C STATES(27) is a1 in component ryr (hertz).
C STATES(28) is a2 in component ryr (hertz).
C STATES(29) is a3 in component ryr (hertz).
C ALGBRC(17) is ainf1 in component ryr (dimensionless).
C ALGBRC(18) is ainf2 in component ryr (dimensionless).
C ALGBRC(19) is ainf3 in component ryr (dimensionless).
C ALGBRC(20) is ainfss in component ryr (dimensionless).
C STATES(30) is ass in component ryr (hertz).
C STATES(31) is c1 in component ryr (hertz).
C STATES(32) is c2 in component ryr (hertz).
C STATES(33) is c3 in component ryr (hertz).
C ALGBRC(21) is cinf1 in component ryr (dimensionless).
C ALGBRC(22) is cinf2 in component ryr (dimensionless).
C ALGBRC(23) is cinf3 in component ryr (dimensionless).
C ALGBRC(24) is cinfss in component ryr (dimensionless).
C STATES(34) is css in component ryr (hertz).
C CONSTS(75) is nu1 in component ryr (m3_per_s_times_1e_minus_12).
C CONSTS(79) is nu2 in component ryr (m3_per_s_times_1e_minus_12).
C CONSTS(82) is nu3 in component ryr (m3_per_s_times_1e_minus_12).
C CONSTS(67) is nuss in component ryr (m3_per_s_times_1e_minus_12).
C STATES(35) is o1 in component ryr (hertz).
C STATES(36) is o2 in component ryr (hertz).
C STATES(37) is o3 in component ryr (hertz).
C ALGBRC(25) is oinf1 in component ryr (dimensionless).
C ALGBRC(26) is oinf2 in component ryr (dimensionless).
C ALGBRC(27) is oinf3 in component ryr (dimensionless).
C ALGBRC(28) is oinfss in component ryr (dimensionless).
C STATES(38) is oss in component ryr (hertz).
C CONSTS(45) is tau_act in component ryr (second).
C CONSTS(46) is tau_actss in component ryr (second).
C CONSTS(47) is tau_adapt in component ryr (second).
C CONSTS(48) is tau_inact in component ryr (second).
C CONSTS(49) is tau_inactss in component ryr (second).
C CONSTS(50) is SERCAKmf in component serca (mM).
C CONSTS(51) is SERCAKmr in component serca (mM).
C STATES(39) is a1 in component serca (mM).
C STATES(40) is a2 in component serca (mM).
C STATES(41) is a3 in component serca (mM).
C STATES(42) is ass in component serca (mM).
C CONSTS(52) is cpumps in component serca (mM).
C CONSTS(68) is k1 in component serca (m6_per_s_per_mol2).
C CONSTS(76) is k2 in component serca (hertz).
C CONSTS(69) is k3 in component serca (m6_per_s_per_mol2).
C CONSTS(53) is k4 in component serca (hertz).
C CONSTS(70) is BNa in component sodium (mM).
C CONSTS(54) is DNa in component sodium (m2_per_s_times_1e_minus_12).
C ALGBRC(103) is JNa in component sodium (kat_times_1e_minus_12).
C CONSTS(55) is KdBNa in component sodium (mM).
C STATES(43) is Nai in component sodium (mM).
C ALGBRC(105) is betaNass in component sodium (dimensionless).
C ALGBRC(107) is i_ss in component sodium (pA).
C CONSTS(71) is amplitude in component stimulus (pA).
C CONSTS(56) is duration in component stimulus (second).
C CONSTS(57) is offset in component stimulus (second).
C CONSTS(58) is period in component stimulus (second).
C RATES(1) is d/dt CaSR1 in component calcium (mM).
C RATES(2) is d/dt CaSR2 in component calcium (mM).
C RATES(3) is d/dt CaSR3 in component calcium (mM).
C RATES(4) is d/dt CaSR4 in component calcium (mM).
C RATES(5) is d/dt Cai1 in component calcium (mM).
C RATES(6) is d/dt Cai2 in component calcium (mM).
C RATES(7) is d/dt Cai3 in component calcium (mM).
C RATES(8) is d/dt Cai4 in component calcium (mM).
C RATES(9) is d/dt Cass in component calcium (mM).
C RATES(11) is d/dt d in component ical (hertz).
C RATES(12) is d/dt f1 in component ical (hertz).
C RATES(13) is d/dt f2 in component ical (hertz).
C RATES(14) is d/dt fca in component ical (hertz).
C RATES(15) is d/dt y in component if (hertz).
C RATES(16) is d/dt pa in component ikr (hertz).
C RATES(17) is d/dt n in component iks (hertz).
C RATES(18) is d/dt r in component ikur (hertz).
C RATES(19) is d/dt s in component ikur (hertz).
C RATES(20) is d/dt h1 in component ina (hertz).
C RATES(21) is d/dt h2 in component ina (hertz).
C RATES(22) is d/dt m in component ina (hertz).
C RATES(24) is d/dt r in component it (hertz).
C RATES(25) is d/dt s in component it (hertz).
C RATES(10) is d/dt V in component membrane (mV).
C RATES(26) is d/dt Ki in component potassium (mM).
C RATES(27) is d/dt a1 in component ryr (hertz).
C RATES(28) is d/dt a2 in component ryr (hertz).
C RATES(29) is d/dt a3 in component ryr (hertz).
C RATES(30) is d/dt ass in component ryr (hertz).
C RATES(31) is d/dt c1 in component ryr (hertz).
C RATES(32) is d/dt c2 in component ryr (hertz).
C RATES(33) is d/dt c3 in component ryr (hertz).
C RATES(34) is d/dt css in component ryr (hertz).
C RATES(35) is d/dt o1 in component ryr (hertz).
C RATES(36) is d/dt o2 in component ryr (hertz).
C RATES(37) is d/dt o3 in component ryr (hertz).
C RATES(38) is d/dt oss in component ryr (hertz).
C RATES(39) is d/dt a1 in component serca (mM).
C RATES(40) is d/dt a2 in component serca (mM).
C RATES(41) is d/dt a3 in component serca (mM).
C RATES(42) is d/dt ass in component serca (mM).
C RATES(43) is d/dt Nai in component sodium (mM).
C RATES(23) is d/dt Nass in component sodium (mM).
C
      SUBROUTINE initConsts(CONSTS, RATES, STATES)
      REAL CONSTS(*), RATES(*), STATES(*)
      CONSTS(1) = 0.024
      CONSTS(2) = 6.7
      STATES(1) = 0.6189225
      STATES(2) = 0.6076289
      STATES(3) = 0.5905266
      STATES(4) = 0.5738108
      STATES(5) = 1.35496500000000013e-04
      STATES(6) = 1.38142100000000014e-04
      STATES(7) = 1.44208699999999994e-04
      STATES(8) = 1.56184399999999995e-04
      STATES(9) = 1.61937700000000013e-04
      CONSTS(3) = 780.0
      CONSTS(4) = 25.0
      CONSTS(5) = 44.0
      CONSTS(6) = 96487.0
      CONSTS(7) = 0.00238
      CONSTS(8) = 0.8
      CONSTS(9) = 0.013
      CONSTS(10) = 1.1
      CONSTS(11) = 13.0
      CONSTS(12) = 165.0
      CONSTS(13) = 4.99231999999999966e-05
      CONSTS(14) = 1.625
      CONSTS(15) = 0.006
      CONSTS(16) = 0.05
      CONSTS(17) = 122.051
      CONSTS(18) = 3.14159265358979312e+00
      CONSTS(19) = 6.5
      CONSTS(20) = 1.8
      CONSTS(21) = 5.4
      CONSTS(22) = 130.0
      STATES(10) = -75.42786
      CONSTS(23) = 0.0952
      CONSTS(24) = 60.0
      STATES(11) = 1.06091699999999996e-05
      STATES(12) = 0.9988566
      STATES(13) = 0.9988624
      STATES(14) = 0.9744374
      CONSTS(25) = 25.3125
      CONSTS(26) = 0.002
      CONSTS(27) = 0.001
      CONSTS(28) = 2.0
      CONSTS(29) = 2.0
      CONSTS(30) = 0.0005
      CONSTS(31) = 1.0
      STATES(15) = 5.62066499999999969e-02
      CONSTS(32) = 0.5
      STATES(16) = 4.18941700000000008e-05
      CONSTS(33) = 1.0
      STATES(17) = 4.10975100000000003e-03
      STATES(18) = 3.11170299999999984e-04
      STATES(19) = 0.9751094
      CONSTS(34) = 0.0018
      STATES(20) = 0.90391
      STATES(21) = 0.9039673
      STATES(22) = 2.77581199999999990e-03
      CONSTS(35) = 0.060599
      STATES(23) = 8.691504
      CONSTS(36) = 0.0003
      CONSTS(37) = 1.0
      CONSTS(38) = 0.45
      CONSTS(39) = 0.0084
      CONSTS(40) = 70.8253
      CONSTS(41) = 1.0
      CONSTS(42) = 11.0
      STATES(24) = 9.59425800000000026e-04
      STATES(25) = 0.954338
      STATES(26) = 134.6313
      CONSTS(43) = 8314.0
      CONSTS(44) = 306.15
      STATES(27) = 0.1925362
      STATES(28) = 0.2010345
      STATES(29) = 0.2163122
      STATES(30) = 0.2455297
      STATES(31) = 0.9993722
      STATES(32) = 0.9995086
      STATES(33) = 0.9995604
      STATES(34) = 0.9999717
      STATES(35) = 9.47851400000000044e-05
      STATES(36) = 7.76550300000000031e-05
      STATES(37) = 5.67494700000000006e-05
      STATES(38) = 3.97509699999999973e-05
      CONSTS(45) = 0.01875
      CONSTS(46) = 0.005
      CONSTS(47) = 1.0
      CONSTS(48) = 0.0875
      CONSTS(49) = 0.015
      CONSTS(50) = 0.00025
      CONSTS(51) = 1.8
      STATES(39) = 4.63856499999999988e-03
      STATES(40) = 4.51207800000000010e-03
      STATES(41) = 4.32640899999999981e-03
      STATES(42) = 4.25044500000000026e-03
      CONSTS(52) = 0.04
      CONSTS(53) = 7.5
      CONSTS(54) = 0.12
      CONSTS(55) = 10.0
      STATES(43) = 9.28686
      CONSTS(56) = 0.001
      CONSTS(57) = 0.01
      CONSTS(58) = 1.0
      CONSTS(59) =  ( ( ( CONSTS(18)*CONSTS(19))*2.00000)*CONSTS(17))*0.500000
      CONSTS(60) =  ( ( ( ( 1.00000*CONSTS(14) ** 2.00000 -  0.00000*CONSTS(14) ** 2.00000)*CONSTS(18))*CONSTS(17))*0.500000)*1.00000e-06
      CONSTS(61) = 0.0200000/2.00000+CONSTS(14)/2.00000
      CONSTS(62) = 0.0200000/2.00000+ 2.00000*CONSTS(14)
      CONSTS(63) =  3.82500*0.900000
      CONSTS(64) =  0.890000*2.75000
      CONSTS(65) =  1.09000*7.50000
      CONSTS(66) = ( CONSTS(43)*CONSTS(44))/CONSTS(6)
      CONSTS(67) =  625.000*CONSTS(13)
      CONSTS(68) =  1000.00 ** 2.00000*CONSTS(53)
      CONSTS(69) = CONSTS(53)/CONSTS(51) ** 2.00000
      CONSTS(70) =  0.490000*2.31000
      CONSTS(71) = - 2500.00
      CONSTS(72) =  ( ( ( ( 2.00000*CONSTS(14) ** 2.00000 -  1.00000*CONSTS(14) ** 2.00000)*CONSTS(18))*CONSTS(17))*0.500000)*1.00000e-06
      CONSTS(73) =  (( 0.0500000*CONSTS(60))/2.00000)*0.900000
      CONSTS(74) = 1.00000/CONSTS(66)
      CONSTS(75) =  1.00000*CONSTS(60)
      CONSTS(76) =  CONSTS(68)*CONSTS(50) ** 2.00000
      CONSTS(77) =  ( ( ( ( 3.00000*CONSTS(14) ** 2.00000 -  2.00000*CONSTS(14) ** 2.00000)*CONSTS(18))*CONSTS(17))*0.500000)*1.00000e-06
      CONSTS(78) =  (( 0.0500000*CONSTS(72))/2.00000)*0.900000
      CONSTS(79) =  1.00000*CONSTS(72)
      CONSTS(80) =  ( ( ( ( 4.00000*CONSTS(14) ** 2.00000 -  3.00000*CONSTS(14) ** 2.00000)*CONSTS(18))*CONSTS(17))*0.500000)*1.00000e-06
      CONSTS(81) =  (( 0.0500000*CONSTS(77))/2.00000)*0.900000
      CONSTS(82) =  1.00000*CONSTS(77)
      CONSTS(83) = ((CONSTS(60)+CONSTS(72))+CONSTS(77))+CONSTS(80)
      CONSTS(84) =  (( 0.0500000*CONSTS(80))/2.00000)*0.900000
      CONSTS(85) = CONSTS(83)+CONSTS(13)
      RETURN
      END
      SUBROUTINE computeRates(VOI, CONSTS,  RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(7) = 1.00000 - 1.00000/(1.00000+CONSTS(27)/STATES(9) ** CONSTS(28))
      RATES(14) = (ALGBRC(7) - STATES(14))/CONSTS(26)
      ALGBRC(17) = 0.505000 - 0.427000/(1.00000+EXP(( STATES(5)*1000.00 - 0.290000)/0.0820000))
      RATES(27) = (ALGBRC(17) - STATES(27))/CONSTS(47)
      ALGBRC(18) = 0.505000 - 0.427000/(1.00000+EXP(( STATES(6)*1000.00 - 0.290000)/0.0820000))
      RATES(28) = (ALGBRC(18) - STATES(28))/CONSTS(47)
      ALGBRC(19) = 0.505000 - 0.427000/(1.00000+EXP(( STATES(7)*1000.00 - 0.290000)/0.0820000))
      RATES(29) = (ALGBRC(19) - STATES(29))/CONSTS(47)
      ALGBRC(20) = 0.505000 - 0.427000/(1.00000+EXP(( STATES(9)*1000.00 - 0.290000)/0.0820000))
      RATES(30) = (ALGBRC(20) - STATES(30))/CONSTS(47)
      ALGBRC(21) = 1.00000/(1.00000+EXP(( STATES(5)*1000.00 - (STATES(27)+0.0200000))/0.0100000))
      RATES(31) = (ALGBRC(21) - STATES(31))/CONSTS(48)
      ALGBRC(22) = 1.00000/(1.00000+EXP(( STATES(6)*1000.00 - (STATES(28)+0.0200000))/0.0100000))
      RATES(32) = (ALGBRC(22) - STATES(32))/CONSTS(48)
      ALGBRC(23) = 1.00000/(1.00000+EXP(( STATES(7)*1000.00 - (STATES(29)+0.0200000))/0.0100000))
      RATES(33) = (ALGBRC(23) - STATES(33))/CONSTS(48)
      ALGBRC(24) = 1.00000/(1.00000+EXP(( STATES(9)*1000.00 - (STATES(30)+0.0200000))/0.0100000))
      RATES(34) = (ALGBRC(24) - STATES(34))/CONSTS(49)
      ALGBRC(25) = 1.00000 - 1.00000/(1.00000+EXP(( STATES(5)*1000.00 - (STATES(27)+0.220000))/0.0300000))
      RATES(35) = (ALGBRC(25) - STATES(35))/CONSTS(45)
      ALGBRC(26) = 1.00000 - 1.00000/(1.00000+EXP(( STATES(6)*1000.00 - (STATES(28)+0.220000))/0.0300000))
      RATES(36) = (ALGBRC(26) - STATES(36))/CONSTS(45)
      ALGBRC(27) = 1.00000 - 1.00000/(1.00000+EXP(( STATES(7)*1000.00 - (STATES(29)+0.220000))/0.0300000))
      RATES(37) = (ALGBRC(27) - STATES(37))/CONSTS(45)
      ALGBRC(28) = 1.00000 - 1.00000/(1.00000+EXP(( STATES(9)*1000.00 - (STATES(30)+0.220000))/0.0300000))
      RATES(38) = (ALGBRC(28) - STATES(38))/CONSTS(46)
      ALGBRC(6) = 1.00000/(1.00000+EXP((STATES(10)+9.00000)/- 5.80000))
      ALGBRC(33) =  0.00270000*EXP(- (STATES(10)+35.0000)/30.0000 ** 2.00000)+0.00200000
      RATES(11) = (ALGBRC(6) - STATES(11))/ALGBRC(33)
      ALGBRC(5) = 1.00000/(1.00000+EXP((STATES(10)+27.4000)/7.10000))
      ALGBRC(34) = (( 0.986980*EXP(- (STATES(10)+30.1605)/7.09396 ** 2.00000)+0.0427500/(1.00000+EXP((STATES(10) - 51.6155)/- 80.6133)))+0.0357600/(1.00000+EXP((STATES(10)+29.5727)/13.2176))) - 0.00821000
      RATES(12) = (ALGBRC(5) - STATES(12))/ALGBRC(34)
      ALGBRC(35) =  1.33230*EXP(- (STATES(10)+40.0000)/14.2000 ** 2.00000)+0.0626000
      RATES(13) = (ALGBRC(5) - STATES(13))/ALGBRC(35)
      ALGBRC(8) = 1.00000/(1.00000+EXP((STATES(10)+97.8287)/12.4802))
      ALGBRC(36) = 1.00000/( 0.00332000*EXP(- STATES(10)/16.5410)+ 23.7184*EXP(STATES(10)/16.5410))
      RATES(15) = (ALGBRC(8) - STATES(15))/ALGBRC(36)
      ALGBRC(9) = 1.00000/(1.00000+EXP((STATES(10)+15.0000)/- 6.00000))
      ALGBRC(37) =  0.217180*EXP(- (STATES(10)+20.1376)/22.1996 ** 2.00000)+0.0311800
      RATES(16) = (ALGBRC(9) - STATES(16))/ALGBRC(37)
      ALGBRC(10) = 1.00000/(1.00000+EXP((STATES(10) - 19.9000)/- 12.7000))
      ALGBRC(38) =  0.400000*EXP(- (STATES(10) - 20.0000)/20.0000 ** 2.00000)+0.700000
      RATES(17) = (ALGBRC(10) - STATES(17))/ALGBRC(38)
      ALGBRC(11) = 1.00000/(1.00000+EXP((STATES(10)+6.00000)/- 8.60000))
      ALGBRC(39) = 0.00900000/(1.00000+EXP((STATES(10)+5.00000)/12.0000))+0.000500000
      RATES(18) = (ALGBRC(11) - STATES(18))/ALGBRC(39)
      ALGBRC(12) = 1.00000/(1.00000+EXP((STATES(10)+7.50000)/10.0000))
      ALGBRC(40) = 0.590000/(1.00000+EXP((STATES(10)+60.0000)/10.0000))+3.05000
      RATES(19) = (ALGBRC(12) - STATES(19))/ALGBRC(40)
      ALGBRC(13) = 1.00000/(1.00000+EXP((STATES(10)+63.6000)/5.30000))
      ALGBRC(41) = 0.0300000/(1.00000+EXP((STATES(10)+35.1000)/3.20000))+0.000300000
      RATES(20) = (ALGBRC(13) - STATES(20))/ALGBRC(41)
      ALGBRC(42) = 0.120000/(1.00000+EXP((STATES(10)+35.1000)/3.20000))+0.00300000
      RATES(21) = (ALGBRC(13) - STATES(21))/ALGBRC(42)
      ALGBRC(14) = 1.00000/(1.00000+EXP((STATES(10)+27.1200)/- 8.21000))
      ALGBRC(43) =  4.20000e-05*EXP(- (STATES(10)+25.5700)/28.8000 ** 2.00000)+2.40000e-05
      RATES(22) = (ALGBRC(14) - STATES(22))/ALGBRC(43)
      ALGBRC(15) = 1.00000/(1.00000+EXP((STATES(10) - 1.00000)/- 11.0000))
      ALGBRC(44) =  0.00350000*EXP(- (STATES(10)+0.00000)/30.0000 ** 2.00000)+0.00150000
      RATES(24) = (ALGBRC(15) - STATES(24))/ALGBRC(44)
      ALGBRC(16) = 1.00000/(1.00000+EXP((STATES(10)+40.5000)/11.5000))
      ALGBRC(45) =  0.0256350*EXP(- (STATES(10)+52.4500)/15.8827 ** 2.00000)+0.0141400
      RATES(25) = (ALGBRC(16) - STATES(25))/ALGBRC(45)
      ALGBRC(32) =  ( (( CONSTS(3)*CONSTS(59))/CONSTS(61))*(STATES(9) - STATES(8)))*1.00000e-06
      ALGBRC(49) = ALGBRC(32)
      ALGBRC(54) = ( CONSTS(1)*CONSTS(7))/STATES(8)+CONSTS(7) ** 2.00000
      ALGBRC(60) = 1.00000/(1.00000+ALGBRC(54))
      RATES(8) = ( ( ALGBRC(60)*(CONSTS(3)+ ALGBRC(54)*CONSTS(4)))*(((STATES(8) -  2.00000*STATES(8))+STATES(7))/CONSTS(14) ** 2.00000+(STATES(8) - STATES(7))/( ( 2.00000*4.00000)*CONSTS(14) ** 2.00000)) -  (( ( ( 2.00000*ALGBRC(60))*ALGBRC(54))*CONSTS(4))/(CONSTS(7)+STATES(8)))*(STATES(8) - STATES(7))/( 2.00000*CONSTS(14)) ** 2.00000)+ (ALGBRC(49)/CONSTS(80))*ALGBRC(60)
      ALGBRC(1) =  ( CONSTS(15)*(STATES(1) - STATES(5)))*CONSTS(60)
      ALGBRC(65) =  ( ( ( - CONSTS(69)*STATES(1) ** 2.00000)*(CONSTS(52) - STATES(39))+ CONSTS(53)*STATES(39))*CONSTS(60))*2.00000
      ALGBRC(56) = 1.00000 - 1.00000/(1.00000+EXP((STATES(1) - 0.300000)/0.100000))
      ALGBRC(61) =  ( ( ( CONSTS(75)*STATES(35))*STATES(31))*ALGBRC(56))*(STATES(1) - STATES(5))
      ALGBRC(73) = (ALGBRC(65) - ALGBRC(1)) - ALGBRC(61)
      ALGBRC(29) = 1.00000/(1.00000+( CONSTS(2)*CONSTS(8))/STATES(1)+CONSTS(8) ** 2.00000)
      RATES(1) =  ( ALGBRC(29)*CONSTS(5))*(((STATES(2) -  2.00000*STATES(1))+STATES(1))/CONSTS(14) ** 2.00000+(STATES(2) - STATES(1))/( ( 2.00000*1.00000)*CONSTS(14) ** 2.00000))+ (ALGBRC(73)/CONSTS(73))*ALGBRC(29)
      ALGBRC(2) =  ( CONSTS(15)*(STATES(2) - STATES(6)))*CONSTS(72)
      ALGBRC(66) =  ( ( ( - CONSTS(69)*STATES(2) ** 2.00000)*(CONSTS(52) - STATES(40))+ CONSTS(53)*STATES(40))*CONSTS(72))*2.00000
      ALGBRC(57) = 1.00000 - 1.00000/(1.00000+EXP((STATES(2) - 0.300000)/0.100000))
      ALGBRC(62) =  ( ( ( CONSTS(79)*STATES(36))*STATES(32))*ALGBRC(57))*(STATES(2) - STATES(6))
      ALGBRC(74) = (ALGBRC(66) - ALGBRC(2)) - ALGBRC(62)
      ALGBRC(30) = 1.00000/(1.00000+( CONSTS(2)*CONSTS(8))/STATES(2)+CONSTS(8) ** 2.00000)
      RATES(2) =  ( ALGBRC(30)*CONSTS(5))*(((STATES(3) -  2.00000*STATES(2))+STATES(1))/CONSTS(14) ** 2.00000+(STATES(3) - STATES(1))/( ( 2.00000*2.00000)*CONSTS(14) ** 2.00000))+ (ALGBRC(74)/CONSTS(78))*ALGBRC(30)
      ALGBRC(3) =  ( CONSTS(15)*(STATES(3) - STATES(7)))*CONSTS(77)
      ALGBRC(67) =  ( ( ( - CONSTS(69)*STATES(3) ** 2.00000)*(CONSTS(52) - STATES(41))+ CONSTS(53)*STATES(41))*CONSTS(77))*2.00000
      ALGBRC(58) = 1.00000 - 1.00000/(1.00000+EXP((STATES(3) - 0.300000)/0.100000))
      ALGBRC(63) =  ( ( ( CONSTS(82)*STATES(37))*STATES(33))*ALGBRC(58))*(STATES(3) - STATES(7))
      ALGBRC(75) = (ALGBRC(67) - ALGBRC(3)) - ALGBRC(63)
      ALGBRC(31) = 1.00000/(1.00000+( CONSTS(2)*CONSTS(8))/STATES(3)+CONSTS(8) ** 2.00000)
      RATES(3) =  ( ALGBRC(31)*CONSTS(5))*(((STATES(4) -  2.00000*STATES(3))+STATES(2))/CONSTS(14) ** 2.00000+(STATES(4) - STATES(2))/( ( 2.00000*3.00000)*CONSTS(14) ** 2.00000))+ (ALGBRC(75)/CONSTS(81))*ALGBRC(31)
      ALGBRC(69) =  ( ( ( CONSTS(68)*STATES(5) ** 2.00000)*(CONSTS(52) - STATES(39)) -  CONSTS(76)*STATES(39))*CONSTS(60))*2.00000
      RATES(39) = ( 0.500000*(- ALGBRC(65)+ALGBRC(69)))/CONSTS(60)
      ALGBRC(70) =  ( ( ( CONSTS(68)*STATES(6) ** 2.00000)*(CONSTS(52) - STATES(40)) -  CONSTS(76)*STATES(40))*CONSTS(72))*2.00000
      RATES(40) = ( 0.500000*(- ALGBRC(66)+ALGBRC(70)))/CONSTS(72)
      ALGBRC(71) =  ( ( ( CONSTS(68)*STATES(7) ** 2.00000)*(CONSTS(52) - STATES(41)) -  CONSTS(76)*STATES(41))*CONSTS(77))*2.00000
      RATES(41) = ( 0.500000*(- ALGBRC(67)+ALGBRC(71)))/CONSTS(77)
      ALGBRC(76) = (- ALGBRC(69)+ALGBRC(1))+ALGBRC(61)
      ALGBRC(46) = ( CONSTS(1)*CONSTS(7))/STATES(5)+CONSTS(7) ** 2.00000
      ALGBRC(51) = 1.00000/(1.00000+ALGBRC(46))
      RATES(5) = ( ( ALGBRC(51)*(CONSTS(3)+ ALGBRC(46)*CONSTS(4)))*(((STATES(6) -  2.00000*STATES(5))+STATES(5))/CONSTS(14) ** 2.00000+(STATES(6) - STATES(5))/( ( 2.00000*1.00000)*CONSTS(14) ** 2.00000)) -  (( ( ( 2.00000*ALGBRC(51))*ALGBRC(46))*CONSTS(4))/(CONSTS(7)+STATES(5)))*(STATES(6) - STATES(5))/( 2.00000*CONSTS(14)) ** 2.00000)+ (ALGBRC(76)/CONSTS(60))*ALGBRC(51)
      ALGBRC(77) = (- ALGBRC(70)+ALGBRC(2))+ALGBRC(62)
      ALGBRC(47) = ( CONSTS(1)*CONSTS(7))/STATES(6)+CONSTS(7) ** 2.00000
      ALGBRC(52) = 1.00000/(1.00000+ALGBRC(47))
      RATES(6) = ( ( ALGBRC(52)*(CONSTS(3)+ ALGBRC(47)*CONSTS(4)))*(((STATES(7) -  2.00000*STATES(6))+STATES(5))/CONSTS(14) ** 2.00000+(STATES(7) - STATES(5))/( ( 2.00000*2.00000)*CONSTS(14) ** 2.00000)) -  (( ( ( 2.00000*ALGBRC(52))*ALGBRC(47))*CONSTS(4))/(CONSTS(7)+STATES(6)))*(STATES(7) - STATES(5))/( 2.00000*CONSTS(14)) ** 2.00000)+ (ALGBRC(77)/CONSTS(72))*ALGBRC(52)
      ALGBRC(78) = (- ALGBRC(71)+ALGBRC(3))+ALGBRC(63)
      ALGBRC(48) = ( CONSTS(1)*CONSTS(7))/STATES(7)+CONSTS(7) ** 2.00000
      ALGBRC(53) = 1.00000/(1.00000+ALGBRC(48))
      RATES(7) = ( ( ALGBRC(53)*(CONSTS(3)+ ALGBRC(48)*CONSTS(4)))*(((STATES(8) -  2.00000*STATES(7))+STATES(6))/CONSTS(14) ** 2.00000+(STATES(8) - STATES(6))/( ( 2.00000*3.00000)*CONSTS(14) ** 2.00000)) -  (( ( ( 2.00000*ALGBRC(53))*ALGBRC(48))*CONSTS(4))/(CONSTS(7)+STATES(7)))*(STATES(8) - STATES(6))/( 2.00000*CONSTS(14)) ** 2.00000)+ (ALGBRC(78)/CONSTS(77))*ALGBRC(53)
      ALGBRC(4) =  ( CONSTS(15)*(STATES(4) - STATES(9)))*CONSTS(13)
      ALGBRC(89) =  ( ( ( - CONSTS(69)*STATES(4) ** 2.00000)*(CONSTS(52) - STATES(42))+ CONSTS(53)*STATES(42))*CONSTS(13))*2.00000
      ALGBRC(85) = 1.00000 - 1.00000/(1.00000+EXP((STATES(4) - 0.300000)/0.100000))
      ALGBRC(87) =  ( ( ( CONSTS(67)*STATES(38))*STATES(34))*ALGBRC(85))*(STATES(4) - STATES(9))
      ALGBRC(92) = (ALGBRC(89) - ALGBRC(4)) - ALGBRC(87)
      ALGBRC(50) = 1.00000/(1.00000+( CONSTS(2)*CONSTS(8))/STATES(4)+CONSTS(8) ** 2.00000)
      RATES(4) =  ( ALGBRC(50)*CONSTS(5))*(((STATES(4) -  2.00000*STATES(4))+STATES(3))/CONSTS(14) ** 2.00000+(STATES(4) - STATES(3))/( ( 2.00000*4.00000)*CONSTS(14) ** 2.00000))+ (ALGBRC(92)/CONSTS(84))*ALGBRC(50)
      ALGBRC(91) =  ( ( ( CONSTS(68)*STATES(9) ** 2.00000)*(CONSTS(52) - STATES(42)) -  CONSTS(76)*STATES(42))*CONSTS(13))*2.00000
      RATES(42) = ( 0.500000*(- ALGBRC(89)+ALGBRC(91)))/CONSTS(13)
      ALGBRC(94) = ((- ALGBRC(32)+ALGBRC(4)) - ALGBRC(91))+ALGBRC(87)
      ALGBRC(55) = 1.00000/(((1.00000+( CONSTS(12)*CONSTS(10))/STATES(9)+CONSTS(10) ** 2.00000)+( CONSTS(11)*CONSTS(9))/STATES(9)+CONSTS(9) ** 2.00000)+( CONSTS(1)*CONSTS(7))/STATES(9)+CONSTS(7) ** 2.00000)
      ALGBRC(59) =  ( ( ( ( CONSTS(25)*STATES(11))*STATES(14))*STATES(12))*STATES(13))*(STATES(10) - CONSTS(24))
      ALGBRC(64) = ( CONSTS(29)*STATES(9))/(CONSTS(30)+STATES(9))
      ALGBRC(81) = ( CONSTS(66)*log(CONSTS(20)/STATES(9)))/2.00000
      ALGBRC(82) =  CONSTS(23)*(STATES(10) - ALGBRC(81))
      ALGBRC(72) = ( CONSTS(39)*( ( EXP( ( CONSTS(38)*STATES(10))*CONSTS(74))*STATES(23) ** 3.00000)*CONSTS(20) -  ( ( EXP( ( (CONSTS(38) - 1.00000)*STATES(10))*CONSTS(74))*CONSTS(22) ** 3.00000)*STATES(9))*CONSTS(37)))/(1.00000+ CONSTS(36)*( ( CONSTS(22) ** 3.00000*STATES(9))*CONSTS(37)+ STATES(23) ** 3.00000*CONSTS(20)))
      ALGBRC(83) = ((- ALGBRC(59) - ALGBRC(82)) - ALGBRC(64))+ 2.00000*ALGBRC(72)
      RATES(9) =  ALGBRC(55)*(ALGBRC(94)/CONSTS(13)+ALGBRC(83)/( ( 2.00000*CONSTS(13))*CONSTS(6)))
      ALGBRC(103) =  ( (( CONSTS(54)*CONSTS(59))/CONSTS(62))*(STATES(23) - STATES(43)))*1.00000e-06
      RATES(43) = ALGBRC(103)/CONSTS(83)
      ALGBRC(84) =  CONSTS(66)*log(CONSTS(21)/STATES(26))
      ALGBRC(86) =  ( CONSTS(31)*STATES(15))*( (1.00000 - 0.267700)*(STATES(10) - ALGBRC(84)))
      ALGBRC(97) =  CONSTS(66)*log(CONSTS(22)/STATES(23))
      ALGBRC(98) =  ( CONSTS(31)*STATES(15))*( 0.267700*(STATES(10) - ALGBRC(97)))
      ALGBRC(99) = ALGBRC(86)+ALGBRC(98)
      ALGBRC(88) = ( ( CONSTS(63)* CONSTS(21)*1.00000 ** 0.445700)*(STATES(10) - ALGBRC(84)))/(1.00000+EXP( ( 1.50000*((STATES(10) - ALGBRC(84))+3.60000))*CONSTS(74)))
      ALGBRC(68) = 1.00000/(1.00000+EXP((STATES(10)+55.0000)/24.0000))
      ALGBRC(90) =  ( ( CONSTS(32)*STATES(16))*ALGBRC(68))*(STATES(10) - ALGBRC(84))
      ALGBRC(93) =  ( CONSTS(33)*STATES(17))*(STATES(10) - ALGBRC(84))
      ALGBRC(95) =  ( ( CONSTS(64)*STATES(18))*STATES(19))*(STATES(10) - ALGBRC(84))
      ALGBRC(100) = ( ( ( ( ( ( ( CONSTS(34)*STATES(22) ** 3.00000)*( 0.900000*STATES(20)+ 0.100000*STATES(21)))*CONSTS(22))*STATES(10))*CONSTS(6))*CONSTS(74))*(EXP( (STATES(10) - ALGBRC(97))*CONSTS(74)) - 1.00000))/(EXP( STATES(10)*CONSTS(74)) - 1.00000)
      ALGBRC(101) =  CONSTS(35)*(STATES(10) - ALGBRC(97))
      ALGBRC(79) =  STATES(23)*1.00000 ** 1.50000
      ALGBRC(80) = ( (( (( CONSTS(40)*CONSTS(21))/(CONSTS(21)+CONSTS(41)))*ALGBRC(79))/(ALGBRC(79)+CONSTS(42) ** 1.50000))*(STATES(10)+150.000))/(STATES(10)+200.000)
      ALGBRC(96) =  ( ( CONSTS(65)*STATES(24))*STATES(25))*(STATES(10) - ALGBRC(84))
      ALGBRC(102) = ((((((((((((ALGBRC(100))+ALGBRC(59))+ALGBRC(96))+ALGBRC(95))+ALGBRC(88))+ALGBRC(90))+ALGBRC(93))+ALGBRC(101))+ALGBRC(82))+ALGBRC(80))+ALGBRC(64))+ALGBRC(72))+ALGBRC(99)
      ALGBRC(104) =  (TERNRY((VOI - CONSTS(57)) -  CONSTS(58)*INT((VOI - CONSTS(57))/CONSTS(58)).LT.CONSTS(56), 1.00000, 0.00000))*CONSTS(71)
      RATES(10) = - (ALGBRC(102)+ALGBRC(104))/CONSTS(16)
      ALGBRC(106) = (((((((ALGBRC(96))+ALGBRC(95))+ALGBRC(88))+ALGBRC(90))+ALGBRC(93)) -  2.00000*ALGBRC(80))+ALGBRC(86))+ALGBRC(104)
      RATES(26) = - ALGBRC(106)/( CONSTS(85)*CONSTS(6))
      ALGBRC(105) = 1.00000/(1.00000+( CONSTS(70)*CONSTS(55))/STATES(23)+CONSTS(55) ** 2.00000)
      ALGBRC(107) = ((((ALGBRC(100))+ALGBRC(101))+ 3.00000*ALGBRC(80))+ 3.00000*ALGBRC(72))+ALGBRC(98)
      RATES(23) =  ALGBRC(105)*(- ALGBRC(103)/CONSTS(13) - ALGBRC(107)/( CONSTS(13)*CONSTS(6)))
      RETURN
      END
      SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(7) = 1.00000 - 1.00000/(1.00000+CONSTS(27)/STATES(9) ** CONSTS(28))
      ALGBRC(17) = 0.505000 - 0.427000/(1.00000+EXP(( STATES(5)*1000.00 - 0.290000)/0.0820000))
      ALGBRC(18) = 0.505000 - 0.427000/(1.00000+EXP(( STATES(6)*1000.00 - 0.290000)/0.0820000))
      ALGBRC(19) = 0.505000 - 0.427000/(1.00000+EXP(( STATES(7)*1000.00 - 0.290000)/0.0820000))
      ALGBRC(20) = 0.505000 - 0.427000/(1.00000+EXP(( STATES(9)*1000.00 - 0.290000)/0.0820000))
      ALGBRC(21) = 1.00000/(1.00000+EXP(( STATES(5)*1000.00 - (STATES(27)+0.0200000))/0.0100000))
      ALGBRC(22) = 1.00000/(1.00000+EXP(( STATES(6)*1000.00 - (STATES(28)+0.0200000))/0.0100000))
      ALGBRC(23) = 1.00000/(1.00000+EXP(( STATES(7)*1000.00 - (STATES(29)+0.0200000))/0.0100000))
      ALGBRC(24) = 1.00000/(1.00000+EXP(( STATES(9)*1000.00 - (STATES(30)+0.0200000))/0.0100000))
      ALGBRC(25) = 1.00000 - 1.00000/(1.00000+EXP(( STATES(5)*1000.00 - (STATES(27)+0.220000))/0.0300000))
      ALGBRC(26) = 1.00000 - 1.00000/(1.00000+EXP(( STATES(6)*1000.00 - (STATES(28)+0.220000))/0.0300000))
      ALGBRC(27) = 1.00000 - 1.00000/(1.00000+EXP(( STATES(7)*1000.00 - (STATES(29)+0.220000))/0.0300000))
      ALGBRC(28) = 1.00000 - 1.00000/(1.00000+EXP(( STATES(9)*1000.00 - (STATES(30)+0.220000))/0.0300000))
      ALGBRC(6) = 1.00000/(1.00000+EXP((STATES(10)+9.00000)/- 5.80000))
      ALGBRC(33) =  0.00270000*EXP(- (STATES(10)+35.0000)/30.0000 ** 2.00000)+0.00200000
      ALGBRC(5) = 1.00000/(1.00000+EXP((STATES(10)+27.4000)/7.10000))
      ALGBRC(34) = (( 0.986980*EXP(- (STATES(10)+30.1605)/7.09396 ** 2.00000)+0.0427500/(1.00000+EXP((STATES(10) - 51.6155)/- 80.6133)))+0.0357600/(1.00000+EXP((STATES(10)+29.5727)/13.2176))) - 0.00821000
      ALGBRC(35) =  1.33230*EXP(- (STATES(10)+40.0000)/14.2000 ** 2.00000)+0.0626000
      ALGBRC(8) = 1.00000/(1.00000+EXP((STATES(10)+97.8287)/12.4802))
      ALGBRC(36) = 1.00000/( 0.00332000*EXP(- STATES(10)/16.5410)+ 23.7184*EXP(STATES(10)/16.5410))
      ALGBRC(9) = 1.00000/(1.00000+EXP((STATES(10)+15.0000)/- 6.00000))
      ALGBRC(37) =  0.217180*EXP(- (STATES(10)+20.1376)/22.1996 ** 2.00000)+0.0311800
      ALGBRC(10) = 1.00000/(1.00000+EXP((STATES(10) - 19.9000)/- 12.7000))
      ALGBRC(38) =  0.400000*EXP(- (STATES(10) - 20.0000)/20.0000 ** 2.00000)+0.700000
      ALGBRC(11) = 1.00000/(1.00000+EXP((STATES(10)+6.00000)/- 8.60000))
      ALGBRC(39) = 0.00900000/(1.00000+EXP((STATES(10)+5.00000)/12.0000))+0.000500000
      ALGBRC(12) = 1.00000/(1.00000+EXP((STATES(10)+7.50000)/10.0000))
      ALGBRC(40) = 0.590000/(1.00000+EXP((STATES(10)+60.0000)/10.0000))+3.05000
      ALGBRC(13) = 1.00000/(1.00000+EXP((STATES(10)+63.6000)/5.30000))
      ALGBRC(41) = 0.0300000/(1.00000+EXP((STATES(10)+35.1000)/3.20000))+0.000300000
      ALGBRC(42) = 0.120000/(1.00000+EXP((STATES(10)+35.1000)/3.20000))+0.00300000
      ALGBRC(14) = 1.00000/(1.00000+EXP((STATES(10)+27.1200)/- 8.21000))
      ALGBRC(43) =  4.20000e-05*EXP(- (STATES(10)+25.5700)/28.8000 ** 2.00000)+2.40000e-05
      ALGBRC(15) = 1.00000/(1.00000+EXP((STATES(10) - 1.00000)/- 11.0000))
      ALGBRC(44) =  0.00350000*EXP(- (STATES(10)+0.00000)/30.0000 ** 2.00000)+0.00150000
      ALGBRC(16) = 1.00000/(1.00000+EXP((STATES(10)+40.5000)/11.5000))
      ALGBRC(45) =  0.0256350*EXP(- (STATES(10)+52.4500)/15.8827 ** 2.00000)+0.0141400
      ALGBRC(32) =  ( (( CONSTS(3)*CONSTS(59))/CONSTS(61))*(STATES(9) - STATES(8)))*1.00000e-06
      ALGBRC(49) = ALGBRC(32)
      ALGBRC(54) = ( CONSTS(1)*CONSTS(7))/STATES(8)+CONSTS(7) ** 2.00000
      ALGBRC(60) = 1.00000/(1.00000+ALGBRC(54))
      ALGBRC(1) =  ( CONSTS(15)*(STATES(1) - STATES(5)))*CONSTS(60)
      ALGBRC(65) =  ( ( ( - CONSTS(69)*STATES(1) ** 2.00000)*(CONSTS(52) - STATES(39))+ CONSTS(53)*STATES(39))*CONSTS(60))*2.00000
      ALGBRC(56) = 1.00000 - 1.00000/(1.00000+EXP((STATES(1) - 0.300000)/0.100000))
      ALGBRC(61) =  ( ( ( CONSTS(75)*STATES(35))*STATES(31))*ALGBRC(56))*(STATES(1) - STATES(5))
      ALGBRC(73) = (ALGBRC(65) - ALGBRC(1)) - ALGBRC(61)
      ALGBRC(29) = 1.00000/(1.00000+( CONSTS(2)*CONSTS(8))/STATES(1)+CONSTS(8) ** 2.00000)
      ALGBRC(2) =  ( CONSTS(15)*(STATES(2) - STATES(6)))*CONSTS(72)
      ALGBRC(66) =  ( ( ( - CONSTS(69)*STATES(2) ** 2.00000)*(CONSTS(52) - STATES(40))+ CONSTS(53)*STATES(40))*CONSTS(72))*2.00000
      ALGBRC(57) = 1.00000 - 1.00000/(1.00000+EXP((STATES(2) - 0.300000)/0.100000))
      ALGBRC(62) =  ( ( ( CONSTS(79)*STATES(36))*STATES(32))*ALGBRC(57))*(STATES(2) - STATES(6))
      ALGBRC(74) = (ALGBRC(66) - ALGBRC(2)) - ALGBRC(62)
      ALGBRC(30) = 1.00000/(1.00000+( CONSTS(2)*CONSTS(8))/STATES(2)+CONSTS(8) ** 2.00000)
      ALGBRC(3) =  ( CONSTS(15)*(STATES(3) - STATES(7)))*CONSTS(77)
      ALGBRC(67) =  ( ( ( - CONSTS(69)*STATES(3) ** 2.00000)*(CONSTS(52) - STATES(41))+ CONSTS(53)*STATES(41))*CONSTS(77))*2.00000
      ALGBRC(58) = 1.00000 - 1.00000/(1.00000+EXP((STATES(3) - 0.300000)/0.100000))
      ALGBRC(63) =  ( ( ( CONSTS(82)*STATES(37))*STATES(33))*ALGBRC(58))*(STATES(3) - STATES(7))
      ALGBRC(75) = (ALGBRC(67) - ALGBRC(3)) - ALGBRC(63)
      ALGBRC(31) = 1.00000/(1.00000+( CONSTS(2)*CONSTS(8))/STATES(3)+CONSTS(8) ** 2.00000)
      ALGBRC(69) =  ( ( ( CONSTS(68)*STATES(5) ** 2.00000)*(CONSTS(52) - STATES(39)) -  CONSTS(76)*STATES(39))*CONSTS(60))*2.00000
      ALGBRC(70) =  ( ( ( CONSTS(68)*STATES(6) ** 2.00000)*(CONSTS(52) - STATES(40)) -  CONSTS(76)*STATES(40))*CONSTS(72))*2.00000
      ALGBRC(71) =  ( ( ( CONSTS(68)*STATES(7) ** 2.00000)*(CONSTS(52) - STATES(41)) -  CONSTS(76)*STATES(41))*CONSTS(77))*2.00000
      ALGBRC(76) = (- ALGBRC(69)+ALGBRC(1))+ALGBRC(61)
      ALGBRC(46) = ( CONSTS(1)*CONSTS(7))/STATES(5)+CONSTS(7) ** 2.00000
      ALGBRC(51) = 1.00000/(1.00000+ALGBRC(46))
      ALGBRC(77) = (- ALGBRC(70)+ALGBRC(2))+ALGBRC(62)
      ALGBRC(47) = ( CONSTS(1)*CONSTS(7))/STATES(6)+CONSTS(7) ** 2.00000
      ALGBRC(52) = 1.00000/(1.00000+ALGBRC(47))
      ALGBRC(78) = (- ALGBRC(71)+ALGBRC(3))+ALGBRC(63)
      ALGBRC(48) = ( CONSTS(1)*CONSTS(7))/STATES(7)+CONSTS(7) ** 2.00000
      ALGBRC(53) = 1.00000/(1.00000+ALGBRC(48))
      ALGBRC(4) =  ( CONSTS(15)*(STATES(4) - STATES(9)))*CONSTS(13)
      ALGBRC(89) =  ( ( ( - CONSTS(69)*STATES(4) ** 2.00000)*(CONSTS(52) - STATES(42))+ CONSTS(53)*STATES(42))*CONSTS(13))*2.00000
      ALGBRC(85) = 1.00000 - 1.00000/(1.00000+EXP((STATES(4) - 0.300000)/0.100000))
      ALGBRC(87) =  ( ( ( CONSTS(67)*STATES(38))*STATES(34))*ALGBRC(85))*(STATES(4) - STATES(9))
      ALGBRC(92) = (ALGBRC(89) - ALGBRC(4)) - ALGBRC(87)
      ALGBRC(50) = 1.00000/(1.00000+( CONSTS(2)*CONSTS(8))/STATES(4)+CONSTS(8) ** 2.00000)
      ALGBRC(91) =  ( ( ( CONSTS(68)*STATES(9) ** 2.00000)*(CONSTS(52) - STATES(42)) -  CONSTS(76)*STATES(42))*CONSTS(13))*2.00000
      ALGBRC(94) = ((- ALGBRC(32)+ALGBRC(4)) - ALGBRC(91))+ALGBRC(87)
      ALGBRC(55) = 1.00000/(((1.00000+( CONSTS(12)*CONSTS(10))/STATES(9)+CONSTS(10) ** 2.00000)+( CONSTS(11)*CONSTS(9))/STATES(9)+CONSTS(9) ** 2.00000)+( CONSTS(1)*CONSTS(7))/STATES(9)+CONSTS(7) ** 2.00000)
      ALGBRC(59) =  ( ( ( ( CONSTS(25)*STATES(11))*STATES(14))*STATES(12))*STATES(13))*(STATES(10) - CONSTS(24))
      ALGBRC(64) = ( CONSTS(29)*STATES(9))/(CONSTS(30)+STATES(9))
      ALGBRC(81) = ( CONSTS(66)*log(CONSTS(20)/STATES(9)))/2.00000
      ALGBRC(82) =  CONSTS(23)*(STATES(10) - ALGBRC(81))
      ALGBRC(72) = ( CONSTS(39)*( ( EXP( ( CONSTS(38)*STATES(10))*CONSTS(74))*STATES(23) ** 3.00000)*CONSTS(20) -  ( ( EXP( ( (CONSTS(38) - 1.00000)*STATES(10))*CONSTS(74))*CONSTS(22) ** 3.00000)*STATES(9))*CONSTS(37)))/(1.00000+ CONSTS(36)*( ( CONSTS(22) ** 3.00000*STATES(9))*CONSTS(37)+ STATES(23) ** 3.00000*CONSTS(20)))
      ALGBRC(83) = ((- ALGBRC(59) - ALGBRC(82)) - ALGBRC(64))+ 2.00000*ALGBRC(72)
      ALGBRC(103) =  ( (( CONSTS(54)*CONSTS(59))/CONSTS(62))*(STATES(23) - STATES(43)))*1.00000e-06
      ALGBRC(84) =  CONSTS(66)*log(CONSTS(21)/STATES(26))
      ALGBRC(86) =  ( CONSTS(31)*STATES(15))*( (1.00000 - 0.267700)*(STATES(10) - ALGBRC(84)))
      ALGBRC(97) =  CONSTS(66)*log(CONSTS(22)/STATES(23))
      ALGBRC(98) =  ( CONSTS(31)*STATES(15))*( 0.267700*(STATES(10) - ALGBRC(97)))
      ALGBRC(99) = ALGBRC(86)+ALGBRC(98)
      ALGBRC(88) = ( ( CONSTS(63)* CONSTS(21)*1.00000 ** 0.445700)*(STATES(10) - ALGBRC(84)))/(1.00000+EXP( ( 1.50000*((STATES(10) - ALGBRC(84))+3.60000))*CONSTS(74)))
      ALGBRC(68) = 1.00000/(1.00000+EXP((STATES(10)+55.0000)/24.0000))
      ALGBRC(90) =  ( ( CONSTS(32)*STATES(16))*ALGBRC(68))*(STATES(10) - ALGBRC(84))
      ALGBRC(93) =  ( CONSTS(33)*STATES(17))*(STATES(10) - ALGBRC(84))
      ALGBRC(95) =  ( ( CONSTS(64)*STATES(18))*STATES(19))*(STATES(10) - ALGBRC(84))
      ALGBRC(100) = ( ( ( ( ( ( ( CONSTS(34)*STATES(22) ** 3.00000)*( 0.900000*STATES(20)+ 0.100000*STATES(21)))*CONSTS(22))*STATES(10))*CONSTS(6))*CONSTS(74))*(EXP( (STATES(10) - ALGBRC(97))*CONSTS(74)) - 1.00000))/(EXP( STATES(10)*CONSTS(74)) - 1.00000)
      ALGBRC(101) =  CONSTS(35)*(STATES(10) - ALGBRC(97))
      ALGBRC(79) =  STATES(23)*1.00000 ** 1.50000
      ALGBRC(80) = ( (( (( CONSTS(40)*CONSTS(21))/(CONSTS(21)+CONSTS(41)))*ALGBRC(79))/(ALGBRC(79)+CONSTS(42) ** 1.50000))*(STATES(10)+150.000))/(STATES(10)+200.000)
      ALGBRC(96) =  ( ( CONSTS(65)*STATES(24))*STATES(25))*(STATES(10) - ALGBRC(84))
      ALGBRC(102) = ((((((((((((ALGBRC(100))+ALGBRC(59))+ALGBRC(96))+ALGBRC(95))+ALGBRC(88))+ALGBRC(90))+ALGBRC(93))+ALGBRC(101))+ALGBRC(82))+ALGBRC(80))+ALGBRC(64))+ALGBRC(72))+ALGBRC(99)
      ALGBRC(104) =  (TERNRY((VOI - CONSTS(57)) -  CONSTS(58)*INT((VOI - CONSTS(57))/CONSTS(58)).LT.CONSTS(56), 1.00000, 0.00000))*CONSTS(71)
      ALGBRC(106) = (((((((ALGBRC(96))+ALGBRC(95))+ALGBRC(88))+ALGBRC(90))+ALGBRC(93)) -  2.00000*ALGBRC(80))+ALGBRC(86))+ALGBRC(104)
      ALGBRC(105) = 1.00000/(1.00000+( CONSTS(70)*CONSTS(55))/STATES(23)+CONSTS(55) ** 2.00000)
      ALGBRC(107) = ((((ALGBRC(100))+ALGBRC(101))+ 3.00000*ALGBRC(80))+ 3.00000*ALGBRC(72))+ALGBRC(98)
      RETURN
      END
      REAL FUNCTION TERNRY(TEST, VALA, VALB)
      LOGICAL TEST
      REAL VALA, VALB
      IF (TEST) THEN
        TERNRY = VALA
      ELSE
        TERNRY = VALB
      ENDIF
      RETURN
      END