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 82 entries in the algebraic variable array.
C There are a total of 29 entries in each of the rate and state variable arrays.
C There are a total of 63 entries in the constant variable array.
C
C
C VOI is time in component environment (second).
C STATES(1) is V in component membrane (millivolt).
C CONSTS(1) is R in component membrane (joule_per_kilomole_kelvin).
C CONSTS(2) is T in component membrane (kelvin).
C CONSTS(3) is F in component membrane (coulomb_per_mole).
C CONSTS(4) is C in component membrane (microF).
C CONSTS(54) is RTONF in component membrane (millivolt).
C ALGBRC(67) is i_Na in component fast_sodium_current (nanoA).
C ALGBRC(72) is i_CaL in component L_type_calcium_current (nanoA).
C ALGBRC(68) is i_to in component transient_outward_potassium_current (nanoA).
C ALGBRC(43) is i_Kr in component rapid_delayed_rectifier_potassium_current (nanoA).
C ALGBRC(35) is i_f in component hyperpolarising_activated_current (nanoA).
C ALGBRC(69) is i_st in component sustained_outward_potassium_current (nanoA).
C ALGBRC(51) is i_K1 in component time_independent_potassium_current (nanoA).
C ALGBRC(66) is i_NaCa in component sodium_calcium_exchange_current (nanoA).
C ALGBRC(53) is i_p in component sodium_potassium_pump (nanoA).
C ALGBRC(52) is i_b in component background_current (nanoA).
C ALGBRC(71) is i_ACh in component acetylcholine_sensitive_current (nanoA).
C ALGBRC(18) is i_Stim in component membrane (nanoA).
C CONSTS(5) is stim_start in component membrane (second).
C CONSTS(6) is stim_end in component membrane (second).
C CONSTS(7) is stim_period in component membrane (second).
C CONSTS(8) is stim_duration in component membrane (second).
C CONSTS(9) is stim_amplitude in component membrane (nanoA).
C CONSTS(10) is g_f in component hyperpolarising_activated_current (microS).
C CONSTS(11) is ACh in component acetylcholine_sensitive_current (millimolar).
C STATES(2) is y in component hyperpolarising_activated_current_y_gate (dimensionless).
C ALGBRC(1) is y_inf in component hyperpolarising_activated_current_y_gate (dimensionless).
C ALGBRC(20) is tau_y in component hyperpolarising_activated_current_y_gate (second).
C CONSTS(12) is g_Kr in component rapid_delayed_rectifier_potassium_current (microS).
C CONSTS(56) is E_K in component rapid_delayed_rectifier_potassium_current (millivolt).
C CONSTS(13) is Ki in component intracellular_potassium_concentration (millimolar).
C CONSTS(14) is Kc in component extracellular_potassium_concentration (millimolar).
C STATES(3) is paf in component rapid_delayed_rectifier_potassium_current_paf_gate (dimensionless).
C STATES(4) is pas in component rapid_delayed_rectifier_potassium_current_pas_gate (dimensionless).
C STATES(5) is pik in component rapid_delayed_rectifier_potassium_current_pik_gate (dimensionless).
C ALGBRC(2) is paf_infinity in component rapid_delayed_rectifier_potassium_current_paf_gate (dimensionless).
C ALGBRC(21) is tau_paf in component rapid_delayed_rectifier_potassium_current_paf_gate (second).
C ALGBRC(3) is pas_infinity in component rapid_delayed_rectifier_potassium_current_pas_gate (dimensionless).
C ALGBRC(22) is tau_pas in component rapid_delayed_rectifier_potassium_current_pas_gate (second).
C ALGBRC(4) is pik_infinity in component rapid_delayed_rectifier_potassium_current_pik_gate (dimensionless).
C ALGBRC(23) is alpha_pik in component rapid_delayed_rectifier_potassium_current_pik_gate (per_second).
C ALGBRC(36) is beta_pik in component rapid_delayed_rectifier_potassium_current_pik_gate (per_second).
C ALGBRC(44) is tau_pik in component rapid_delayed_rectifier_potassium_current_pik_gate (second).
C CONSTS(15) is g_K1 in component time_independent_potassium_current (microS).
C ALGBRC(50) is g_K1_prime in component time_independent_potassium_current (microS).
C CONSTS(16) is g_b in component background_current (microS).
C CONSTS(17) is E_b in component background_current (millivolt).
C CONSTS(18) is I_p in component sodium_potassium_pump (nanoA).
C CONSTS(19) is Nai in component intracellular_sodium_concentration (millimolar).
C CONSTS(20) is kNaCa in component sodium_calcium_exchange_current (nanoA).
C ALGBRC(62) is x1 in component sodium_calcium_exchange_current (dimensionless).
C ALGBRC(63) is x2 in component sodium_calcium_exchange_current (dimensionless).
C ALGBRC(64) is x3 in component sodium_calcium_exchange_current (dimensionless).
C ALGBRC(65) is x4 in component sodium_calcium_exchange_current (dimensionless).
C ALGBRC(59) is k41 in component sodium_calcium_exchange_current (dimensionless).
C CONSTS(55) is k34 in component sodium_calcium_exchange_current (dimensionless).
C ALGBRC(56) is k23 in component sodium_calcium_exchange_current (dimensionless).
C ALGBRC(57) is k21 in component sodium_calcium_exchange_current (dimensionless).
C ALGBRC(55) is k32 in component sodium_calcium_exchange_current (dimensionless).
C CONSTS(59) is k43 in component sodium_calcium_exchange_current (dimensionless).
C ALGBRC(61) is k12 in component sodium_calcium_exchange_current (dimensionless).
C ALGBRC(60) is k14 in component sodium_calcium_exchange_current (dimensionless).
C CONSTS(21) is Qci in component sodium_calcium_exchange_current (dimensionless).
C CONSTS(22) is Qn in component sodium_calcium_exchange_current (dimensionless).
C CONSTS(23) is Qco in component sodium_calcium_exchange_current (dimensionless).
C CONSTS(24) is Kci in component sodium_calcium_exchange_current (millimolar).
C CONSTS(25) is K1ni in component sodium_calcium_exchange_current (millimolar).
C CONSTS(26) is K2ni in component sodium_calcium_exchange_current (millimolar).
C CONSTS(27) is K3ni in component sodium_calcium_exchange_current (millimolar).
C CONSTS(28) is Kcni in component sodium_calcium_exchange_current (millimolar).
C CONSTS(29) is K3no in component sodium_calcium_exchange_current (millimolar).
C CONSTS(30) is K1no in component sodium_calcium_exchange_current (millimolar).
C CONSTS(31) is K2no in component sodium_calcium_exchange_current (millimolar).
C CONSTS(32) is Kco in component sodium_calcium_exchange_current (millimolar).
C ALGBRC(54) is do in component sodium_calcium_exchange_current (dimensionless).
C ALGBRC(58) is di in component sodium_calcium_exchange_current (dimensionless).
C CONSTS(33) is Cao in component extracellular_calcium_concentration (millimolar).
C CONSTS(34) is Nao in component extracellular_sodium_concentration (millimolar).
C STATES(6) is Casub in component intracellular_calcium_concentration (millimolar).
C CONSTS(35) is g_Na in component fast_sodium_current (microlitre_per_second).
C CONSTS(57) is E_Na in component fast_sodium_current (millivolt).
C STATES(7) is m in component fast_sodium_current_m_gate (dimensionless).
C STATES(8) is h1 in component fast_sodium_current_h1_gate (dimensionless).
C STATES(9) is h2 in component fast_sodium_current_h2_gate (dimensionless).
C ALGBRC(24) is alpha_m in component fast_sodium_current_m_gate (per_second).
C ALGBRC(37) is beta_m in component fast_sodium_current_m_gate (per_second).
C CONSTS(36) is delta_m in component fast_sodium_current_m_gate (millivolt).
C ALGBRC(5) is E0_m in component fast_sodium_current_m_gate (millivolt).
C ALGBRC(6) is alpha_h1 in component fast_sodium_current_h1_gate (per_second).
C ALGBRC(25) is beta_h1 in component fast_sodium_current_h1_gate (per_second).
C ALGBRC(38) is h1_inf in component fast_sodium_current_h1_gate (dimensionless).
C ALGBRC(45) is tau_h1 in component fast_sodium_current_h1_gate (second).
C ALGBRC(7) is alpha_h2 in component fast_sodium_current_h2_gate (per_second).
C ALGBRC(26) is beta_h2 in component fast_sodium_current_h2_gate (per_second).
C ALGBRC(39) is h2_inf in component fast_sodium_current_h2_gate (dimensionless).
C ALGBRC(46) is tau_h2 in component fast_sodium_current_h2_gate (second).
C CONSTS(37) is g_CaL in component L_type_calcium_current (microS).
C CONSTS(38) is E_CaL in component L_type_calcium_current (millivolt).
C STATES(10) is d in component L_type_calcium_current_d_gate (dimensionless).
C STATES(11) is f in component L_type_calcium_current_f_gate (dimensionless).
C STATES(12) is f2 in component L_type_calcium_current_f2_gate (dimensionless).
C ALGBRC(8) is alpha_d in component L_type_calcium_current_d_gate (per_second).
C ALGBRC(27) is beta_d in component L_type_calcium_current_d_gate (per_second).
C ALGBRC(40) is d_inf in component L_type_calcium_current_d_gate (dimensionless).
C ALGBRC(47) is tau_d in component L_type_calcium_current_d_gate (second).
C CONSTS(39) is act_shift in component L_type_calcium_current_d_gate (millivolt).
C CONSTS(40) is slope_factor_act in component L_type_calcium_current_d_gate (millivolt).
C ALGBRC(9) is f_inf in component L_type_calcium_current_f_gate (dimensionless).
C ALGBRC(28) is tau_f in component L_type_calcium_current_f_gate (second).
C CONSTS(41) is inact_shift in component L_type_calcium_current_f_gate (millivolt).
C ALGBRC(10) is f2_inf in component L_type_calcium_current_f2_gate (dimensionless).
C ALGBRC(29) is tau_f2 in component L_type_calcium_current_f2_gate (second).
C CONSTS(42) is inact_shift in component L_type_calcium_current_f2_gate (millivolt).
C CONSTS(58) is E_K in component transient_outward_potassium_current (millivolt).
C CONSTS(43) is g_to in component transient_outward_potassium_current (microS).
C STATES(13) is r in component transient_outward_potassium_current_r_gate (dimensionless).
C STATES(14) is q_fast in component transient_outward_potassium_current_qfast_gate (dimensionless).
C STATES(15) is q_slow in component transient_outward_potassium_current_qslow_gate (dimensionless).
C ALGBRC(30) is tau_r in component transient_outward_potassium_current_r_gate (second).
C ALGBRC(11) is r_infinity in component transient_outward_potassium_current_r_gate (dimensionless).
C ALGBRC(31) is tau_qfast in component transient_outward_potassium_current_qfast_gate (second).
C ALGBRC(12) is qfast_infinity in component transient_outward_potassium_current_qfast_gate (dimensionless).
C ALGBRC(32) is tau_qslow in component transient_outward_potassium_current_qslow_gate (second).
C ALGBRC(13) is qslow_infinity in component transient_outward_potassium_current_qslow_gate (dimensionless).
C CONSTS(44) is E_st in component sustained_outward_potassium_current (millivolt).
C CONSTS(45) is g_st in component sustained_outward_potassium_current (microS).
C STATES(16) is qa in component sustained_outward_potassium_current_qa_gate (dimensionless).
C STATES(17) is qi in component sustained_outward_potassium_current_qi_gate (dimensionless).
C ALGBRC(48) is tau_qa in component sustained_outward_potassium_current_qa_gate (second).
C ALGBRC(14) is qa_infinity in component sustained_outward_potassium_current_qa_gate (dimensionless).
C ALGBRC(33) is alpha_qa in component sustained_outward_potassium_current_qa_gate (per_second).
C ALGBRC(41) is beta_qa in component sustained_outward_potassium_current_qa_gate (per_second).
C ALGBRC(49) is tau_qi in component sustained_outward_potassium_current_qi_gate (second).
C ALGBRC(15) is alpha_qi in component sustained_outward_potassium_current_qi_gate (per_second).
C ALGBRC(34) is beta_qi in component sustained_outward_potassium_current_qi_gate (per_second).
C ALGBRC(42) is qi_infinity in component sustained_outward_potassium_current_qi_gate (dimensionless).
C ALGBRC(70) is g_ACh in component acetylcholine_sensitive_current (microS).
C CONSTS(46) is g_ACh_max in component acetylcholine_sensitive_current (microS).
C CONSTS(47) is K_ACh in component acetylcholine_sensitive_current (millimolar).
C STATES(18) is achf in component acetylcholine_sensitive_current_achf_gate (dimensionless).
C STATES(19) is achs in component acetylcholine_sensitive_current_achs_gate (dimensionless).
C CONSTS(48) is alpha_achf in component acetylcholine_sensitive_current_achf_gate (per_second).
C ALGBRC(16) is beta_achf in component acetylcholine_sensitive_current_achf_gate (per_second).
C CONSTS(49) is alpha_achs in component acetylcholine_sensitive_current_achs_gate (per_second).
C ALGBRC(17) is beta_achs in component acetylcholine_sensitive_current_achs_gate (per_second).
C STATES(20) is Cai in component intracellular_calcium_concentration (millimolar).
C CONSTS(60) is V_up in component intracellular_calcium_concentration (micrometre3).
C CONSTS(61) is V_rel in component intracellular_calcium_concentration (micrometre3).
C CONSTS(62) is V_sub in component intracellular_calcium_concentration (micrometre3).
C CONSTS(63) is Vi in component intracellular_calcium_concentration (micrometre3).
C CONSTS(50) is V_cell in component intracellular_calcium_concentration (micrometre3).
C ALGBRC(74) is i_up in component intracellular_calcium_concentration (millimolar_per_second).
C ALGBRC(75) is i_tr in component intracellular_calcium_concentration (millimolar_per_second).
C ALGBRC(77) is i_rel in component intracellular_calcium_concentration (millimolar_per_second).
C ALGBRC(73) is i_diff in component intracellular_calcium_concentration (millimolar_per_second).
C STATES(21) is Ca_up in component intracellular_calcium_concentration (millimolar).
C STATES(22) is Ca_rel in component intracellular_calcium_concentration (millimolar).
C CONSTS(51) is P_rel in component intracellular_calcium_concentration (per_second).
C CONSTS(52) is K_up in component intracellular_calcium_concentration (millimolar).
C CONSTS(53) is tau_tr in component intracellular_calcium_concentration (second).
C STATES(23) is f_TC in component intracellular_calcium_concentration (dimensionless).
C STATES(24) is f_TMC in component intracellular_calcium_concentration (dimensionless).
C STATES(25) is f_TMM in component intracellular_calcium_concentration (dimensionless).
C STATES(26) is f_CMi in component intracellular_calcium_concentration (dimensionless).
C STATES(27) is f_CMs in component intracellular_calcium_concentration (dimensionless).
C STATES(28) is f_CQ in component intracellular_calcium_concentration (dimensionless).
C STATES(29) is f_CSL in component intracellular_calcium_concentration (dimensionless).
C ALGBRC(76) is diff_f_TC in component intracellular_calcium_concentration (per_second).
C ALGBRC(78) is diff_f_TMC in component intracellular_calcium_concentration (per_second).
C ALGBRC(19) is diff_f_TMM in component intracellular_calcium_concentration (per_second).
C ALGBRC(79) is diff_f_CMi in component intracellular_calcium_concentration (per_second).
C ALGBRC(80) is diff_f_CMs in component intracellular_calcium_concentration (per_second).
C ALGBRC(81) is diff_f_CQ in component intracellular_calcium_concentration (per_second).
C ALGBRC(82) is diff_f_CSL in component intracellular_calcium_concentration (per_second).
C RATES(1) is d/dt V in component membrane (millivolt).
C RATES(2) is d/dt y in component hyperpolarising_activated_current_y_gate (dimensionless).
C RATES(3) is d/dt paf in component rapid_delayed_rectifier_potassium_current_paf_gate (dimensionless).
C RATES(4) is d/dt pas in component rapid_delayed_rectifier_potassium_current_pas_gate (dimensionless).
C RATES(5) is d/dt pik in component rapid_delayed_rectifier_potassium_current_pik_gate (dimensionless).
C RATES(7) is d/dt m in component fast_sodium_current_m_gate (dimensionless).
C RATES(8) is d/dt h1 in component fast_sodium_current_h1_gate (dimensionless).
C RATES(9) is d/dt h2 in component fast_sodium_current_h2_gate (dimensionless).
C RATES(10) is d/dt d in component L_type_calcium_current_d_gate (dimensionless).
C RATES(11) is d/dt f in component L_type_calcium_current_f_gate (dimensionless).
C RATES(12) is d/dt f2 in component L_type_calcium_current_f2_gate (dimensionless).
C RATES(13) is d/dt r in component transient_outward_potassium_current_r_gate (dimensionless).
C RATES(14) is d/dt q_fast in component transient_outward_potassium_current_qfast_gate (dimensionless).
C RATES(15) is d/dt q_slow in component transient_outward_potassium_current_qslow_gate (dimensionless).
C RATES(16) is d/dt qa in component sustained_outward_potassium_current_qa_gate (dimensionless).
C RATES(17) is d/dt qi in component sustained_outward_potassium_current_qi_gate (dimensionless).
C RATES(18) is d/dt achf in component acetylcholine_sensitive_current_achf_gate (dimensionless).
C RATES(19) is d/dt achs in component acetylcholine_sensitive_current_achs_gate (dimensionless).
C RATES(21) is d/dt Ca_up in component intracellular_calcium_concentration (millimolar).
C RATES(22) is d/dt Ca_rel in component intracellular_calcium_concentration (millimolar).
C RATES(20) is d/dt Cai in component intracellular_calcium_concentration (millimolar).
C RATES(6) is d/dt Casub in component intracellular_calcium_concentration (millimolar).
C RATES(23) is d/dt f_TC in component intracellular_calcium_concentration (dimensionless).
C RATES(24) is d/dt f_TMC in component intracellular_calcium_concentration (dimensionless).
C RATES(25) is d/dt f_TMM in component intracellular_calcium_concentration (dimensionless).
C RATES(26) is d/dt f_CMi in component intracellular_calcium_concentration (dimensionless).
C RATES(27) is d/dt f_CMs in component intracellular_calcium_concentration (dimensionless).
C RATES(28) is d/dt f_CQ in component intracellular_calcium_concentration (dimensionless).
C RATES(29) is d/dt f_CSL in component intracellular_calcium_concentration (dimensionless).
C
      SUBROUTINE initConsts(CONSTS, RATES, STATES)
      REAL CONSTS(*), RATES(*), STATES(*)
      STATES(1) = -69.760276376489
      CONSTS(1) = 8314.472
      CONSTS(2) = 310
      CONSTS(3) = 96485.3415
      CONSTS(4) = 2.9e-5
      CONSTS(5) = 0.1
      CONSTS(6) = 99999
      CONSTS(7) = 1
      CONSTS(8) = 0.001
      CONSTS(9) = -2
      CONSTS(10) = 0
      CONSTS(11) = 0
      STATES(2) = 0.19584111039096
      CONSTS(12) = 0.002
      CONSTS(13) = 140
      CONSTS(14) = 5.4
      STATES(3) = 0.00141762995766447
      STATES(4) = 0.00539771950846456
      STATES(5) = 0.98638204514681
      CONSTS(15) = 0.015
      CONSTS(16) = 0.002
      CONSTS(17) = -40
      CONSTS(18) = 0.1968
      CONSTS(19) = 8
      CONSTS(20) = 5.916
      CONSTS(21) = 0.1369
      CONSTS(22) = 0.4315
      CONSTS(23) = 0
      CONSTS(24) = 0.0207
      CONSTS(25) = 395.3
      CONSTS(26) = 2.289
      CONSTS(27) = 26.44
      CONSTS(28) = 26.44
      CONSTS(29) = 4.663
      CONSTS(30) = 1628
      CONSTS(31) = 561.4
      CONSTS(32) = 3.663
      CONSTS(33) = 2
      CONSTS(34) = 140
      STATES(6) = 3.27335718697622e-5
      CONSTS(35) = 5e-7
      STATES(7) = 0.0132200747771872
      STATES(8) = 0.706622937059237
      STATES(9) = 0.701626826712569
      CONSTS(36) = 1e-5
      CONSTS(37) = 0.021
      CONSTS(38) = 62.1
      STATES(10) = 4.23500474189711e-5
      STATES(11) = 0.998435073735753
      STATES(12) = 0.998424216938754
      CONSTS(39) = 0
      CONSTS(40) = -6.61
      CONSTS(41) = -5
      CONSTS(42) = -5
      CONSTS(43) = 0.014
      STATES(13) = 0.00894826428663828
      STATES(14) = 0.994837524153424
      STATES(15) = 0.427382372349565
      CONSTS(44) = -37.4
      CONSTS(45) = 0
      STATES(16) = 0.0910882041816457
      STATES(17) = 0.890389014175329
      CONSTS(46) = 0.0198
      CONSTS(47) = 0.00035
      STATES(18) = 0.74242774587522
      STATES(19) = 0.746918323597392
      CONSTS(48) = 73.1
      CONSTS(49) = 3.7
      STATES(20) = 3.73317163732586e-5
      CONSTS(50) = 4.39823e-6
      STATES(21) = 0.818671555213184
      STATES(22) = 0.682159360306652
      CONSTS(51) = 1805.6
      CONSTS(52) = 0.0006
      CONSTS(53) = 0.06
      STATES(23) = 0.00739583869345967
      STATES(24) = 0.133773505989393
      STATES(25) = 0.765246381247448
      STATES(26) = 0.0154714370092264
      STATES(27) = 0.0135767851016544
      STATES(28) = 0.449992033196647
      STATES(29) = 1.21722016147587e-5
      CONSTS(54) = ( CONSTS(1)*CONSTS(2))/CONSTS(3)
      CONSTS(55) = CONSTS(34)/(CONSTS(29)+CONSTS(34))
      CONSTS(56) =  CONSTS(54)*log(CONSTS(14)/CONSTS(13))
      CONSTS(57) =  CONSTS(54)*log(CONSTS(34)/CONSTS(19))
      CONSTS(58) =  CONSTS(54)*log(CONSTS(14)/CONSTS(13))
      CONSTS(59) = CONSTS(19)/(CONSTS(27)+CONSTS(19))
      CONSTS(60) =  0.0116000*CONSTS(50)
      CONSTS(61) =  0.00120000*CONSTS(50)
      CONSTS(62) =  0.0100000*CONSTS(50)
      CONSTS(63) =  0.460000*CONSTS(50) - CONSTS(62)
      RETURN
      END
      SUBROUTINE computeRates(VOI, CONSTS,  RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(16) = 120.000/(1.00000+EXP(- (STATES(1)+50.0000)/15.0000))
      RATES(18) =  CONSTS(48)*(1.00000 - STATES(18)) -  ALGBRC(16)*STATES(18)
      ALGBRC(17) = 5.82000/(1.00000+EXP(- (STATES(1)+50.0000)/15.0000))
      RATES(19) =  CONSTS(49)*(1.00000 - STATES(19)) -  ALGBRC(17)*STATES(19)
      ALGBRC(19) =  2277.00*2.50000*((1.00000 - STATES(24)) - STATES(25)) -  751.000*STATES(25)
      RATES(25) = ALGBRC(19)
      ALGBRC(1) = 1.00000/(1.00000+EXP(((STATES(1)+83.1900) - ( - 7.20000*CONSTS(11) ** 0.690000)/(1.26000e-05 ** 0.690000+CONSTS(11) ** 0.690000))/13.5600))
      ALGBRC(20) = 0.250000+ 2.00000*EXP(- STATES(1)+70.0000 ** 2.00000/500.000)
      RATES(2) = (ALGBRC(1) - STATES(2))/ALGBRC(20)
      ALGBRC(2) = 1.00000/(1.00000+EXP((STATES(1)+10.2200)/- 8.50000))
      ALGBRC(21) = 1.00000/( 17.0000*EXP( 0.0398000*STATES(1))+ 0.211000*EXP( - 0.0510000*STATES(1)))
      RATES(3) = (ALGBRC(2) - STATES(3))/ALGBRC(21)
      ALGBRC(3) = 1.00000/(1.00000+EXP((STATES(1)+10.2200)/- 8.50000))
      ALGBRC(22) = 0.335810+ 0.906730*EXP(- STATES(1)+10.0000 ** 2.00000/988.050)
      RATES(4) = (ALGBRC(3) - STATES(4))/ALGBRC(22)
      ALGBRC(9) = 1.00000/(1.00000+EXP((STATES(1) - (- 24.0000+CONSTS(41)))/6.31000))
      ALGBRC(28) = 0.0100000+ 0.153900*EXP(- STATES(1)+40.0000 ** 2.00000/185.670)
      RATES(11) = (ALGBRC(9) - STATES(11))/ALGBRC(28)
      ALGBRC(10) = 1.00000/(1.00000+EXP((STATES(1) - (- 24.0000+CONSTS(42)))/6.31000))
      ALGBRC(29) = 0.0600000+ 0.480760*2.25000*EXP(- STATES(1) - - 40.0000 ** 2.00000/138.040)
      RATES(12) = (ALGBRC(10) - STATES(12))/ALGBRC(29)
      ALGBRC(30) = 0.000596000+0.00311800/( 1.03700*EXP( 0.0900000*(STATES(1)+30.6100))+ 0.396000*EXP( - 0.120000*(STATES(1)+23.8400)))
      ALGBRC(11) = 1.00000/(1.00000+EXP((STATES(1) - 7.44000)/- 16.4000))
      RATES(13) = (ALGBRC(11) - STATES(13))/ALGBRC(30)
      ALGBRC(31) = 0.0126600+4.72716/(1.00000+EXP((STATES(1)+154.500)/23.9600))
      ALGBRC(12) = 1.00000/(1.00000+EXP((STATES(1)+33.8000)/6.12000))
      RATES(14) = (ALGBRC(12) - STATES(14))/ALGBRC(31)
      ALGBRC(32) = 0.100000+ 4.00000*EXP(- STATES(1)+65.0000 ** 2.00000/500.000)
      ALGBRC(13) = 1.00000/(1.00000+EXP((STATES(1)+33.8000)/6.12000))
      RATES(15) = (ALGBRC(13) - STATES(15))/ALGBRC(32)
      ALGBRC(5) = STATES(1)+44.4000
      ALGBRC(24) = TERNRY(ABS(ALGBRC(5)).LT.CONSTS(36), ( - 460.000*- 12.6730)/EXP(ALGBRC(5)/- 12.6730), ( - 460.000*ALGBRC(5))/(EXP(ALGBRC(5)/- 12.6730) - 1.00000))
      ALGBRC(37) =  18400.0*EXP(ALGBRC(5)/- 12.6730)
      RATES(7) =  ALGBRC(24)*(1.00000 - STATES(7)) -  ALGBRC(37)*STATES(7)
      ALGBRC(4) =  (1.00000/(1.00000+EXP((STATES(1)+4.90000)/15.1400)))*(1.00000 -  0.300000*EXP(- STATES(1) ** 2.00000/500.000))
      ALGBRC(23) =  92.0100*EXP( - 0.0183000*STATES(1))
      ALGBRC(36) =  603.600*EXP( 0.00942000*STATES(1))
      ALGBRC(44) = 1.00000/(ALGBRC(23)+ALGBRC(36))
      RATES(5) = (ALGBRC(4) - STATES(5))/ALGBRC(44)
      ALGBRC(6) =  44.9000*EXP((STATES(1)+66.9000)/- 5.57000)
      ALGBRC(25) = 1491.00/(1.00000+ 323.300*EXP((STATES(1)+94.6000)/- 12.9000))
      ALGBRC(38) = ALGBRC(6)/(ALGBRC(6)+ALGBRC(25))
      ALGBRC(45) = 0.0300000/(1.00000+EXP((STATES(1)+40.0000)/6.00000))+0.000350000
      RATES(8) = (ALGBRC(38) - STATES(8))/ALGBRC(45)
      ALGBRC(7) =  44.9000*EXP((STATES(1)+66.9000)/- 5.57000)
      ALGBRC(26) = 1491.00/(1.00000+ 323.300*EXP((STATES(1)+94.6000)/- 12.9000))
      ALGBRC(39) = ALGBRC(7)/(ALGBRC(7)+ALGBRC(26))
      ALGBRC(46) = 0.120000/(1.00000+EXP((STATES(1)+60.0000)/2.00000))+0.00295000
      RATES(9) = (ALGBRC(39) - STATES(9))/ALGBRC(46)
      ALGBRC(40) = 1.00000/(1.00000+EXP((STATES(1) - (- 3.20000+CONSTS(39)))/CONSTS(40)))
      ALGBRC(8) = ( - 26.1200*(STATES(1)+35.0000))/(EXP((STATES(1)+35.0000)/- 2.50000) - 1.00000)+( - 78.1100*STATES(1))/(EXP( - 0.208000*STATES(1)) - 1.00000)
      ALGBRC(27) = ( 10.5200*(STATES(1) - 5.00000))/(EXP( 0.400000*(STATES(1) - 5.00000)) - 1.00000)
      ALGBRC(47) = 1.00000/(ALGBRC(8)+ALGBRC(27))
      RATES(10) = (ALGBRC(40) - STATES(10))/ALGBRC(47)
      ALGBRC(33) = 1.00000/( 0.150000*EXP(- STATES(1)/11.0000)+ 0.200000*EXP(- STATES(1)/700.000))
      ALGBRC(41) = 1.00000/( 16.0000*EXP(STATES(1)/8.00000)+ 15.0000*EXP(STATES(1)/50.0000))
      ALGBRC(48) = 0.00100000/(ALGBRC(33)+ALGBRC(41))
      ALGBRC(14) = 1.00000/(1.00000+EXP((STATES(1) - - 49.1000)/- 8.98000))
      RATES(16) = (ALGBRC(14) - STATES(16))/ALGBRC(48)
      ALGBRC(15) = 0.150400/( 3100.00*EXP(STATES(1)/13.0000)+ 700.000*EXP(STATES(1)/70.0000))
      ALGBRC(34) = 0.150400/( 95.0000*EXP(- STATES(1)/10.0000)+ 50.0000*EXP(- STATES(1)/700.000))+0.000229000/(1.00000+EXP(- STATES(1)/5.00000))
      ALGBRC(49) = 0.00100000/(ALGBRC(15)+ALGBRC(34))
      ALGBRC(42) = ALGBRC(15)/(ALGBRC(15)+ALGBRC(34))
      RATES(17) = (ALGBRC(42) - STATES(17))/ALGBRC(49)
      ALGBRC(67) = ( (( CONSTS(35)*STATES(7) ** 3.00000*( 0.635000*STATES(8)+ 0.365000*STATES(9))*CONSTS(34)*STATES(1)*CONSTS(3))/CONSTS(54))*(EXP((STATES(1) - CONSTS(57))/CONSTS(54)) - 1.00000))/(EXP(STATES(1)/CONSTS(54)) - 1.00000)
      ALGBRC(70) = ( CONSTS(46)*STATES(18)*STATES(19)*CONSTS(11) ** 1.50000)/(CONSTS(47) ** 1.50000+CONSTS(11) ** 1.50000)
      ALGBRC(71) = ( (( ALGBRC(70)*CONSTS(14))/(10.0000+CONSTS(14)))*(STATES(1) - CONSTS(56)))/(1.00000+EXP(((STATES(1) - CONSTS(56)) - 140.000)/( 2.50000*CONSTS(54))))
      ALGBRC(72) =  CONSTS(37)*STATES(10)*( 0.675000*STATES(11)+ 0.325000*STATES(12))*(STATES(1) - CONSTS(38))*(1.00000 - (( ALGBRC(71)*CONSTS(11))/(9.00000e-05+CONSTS(11)))/1.00000)
      ALGBRC(68) =  CONSTS(43)*STATES(13)*( 0.450000*STATES(14)+ 0.550000*STATES(15))*(STATES(1) - CONSTS(58))
      ALGBRC(43) =  CONSTS(12)*( 0.900000*STATES(3)+ 0.100000*STATES(4))*STATES(5)*(STATES(1) - CONSTS(56))
      ALGBRC(35) =  STATES(2)*CONSTS(10)*(STATES(1) - - 30.0000)
      ALGBRC(69) =  CONSTS(45)*STATES(16)*STATES(17)*(STATES(1) - CONSTS(44))
      ALGBRC(50) =  CONSTS(15)*(0.500000+0.500000/(1.00000+EXP((STATES(1)+30.0000)/5.00000)))
      ALGBRC(51) = ( ALGBRC(50)*CONSTS(14)/(CONSTS(14)+0.590000) ** 3.00000*(STATES(1)+81.9000))/(1.00000+EXP(( 1.39300*(STATES(1)+81.9000+3.60000))/CONSTS(54)))
      ALGBRC(59) = EXP(( - CONSTS(22)*STATES(1))/( 2.00000*CONSTS(54)))
      ALGBRC(54) = 1.00000+ (CONSTS(33)/CONSTS(32))*(1.00000+EXP(( CONSTS(23)*STATES(1))/CONSTS(54)))+CONSTS(34)/CONSTS(30)+CONSTS(34) ** 2.00000/( CONSTS(30)*CONSTS(31))+CONSTS(34) ** 3.00000/( CONSTS(30)*CONSTS(31)*CONSTS(29))
      ALGBRC(56) = ( (CONSTS(34) ** 2.00000/( CONSTS(30)*CONSTS(31))+CONSTS(34) ** 3.00000/( CONSTS(30)*CONSTS(31)*CONSTS(29)))*EXP(( - CONSTS(22)*STATES(1))/( 2.00000*CONSTS(54))))/ALGBRC(54)
      ALGBRC(57) = ( (CONSTS(33)/CONSTS(32))*EXP(( - CONSTS(23)*STATES(1))/CONSTS(54)))/ALGBRC(54)
      ALGBRC(55) = EXP(( CONSTS(22)*STATES(1))/( 2.00000*CONSTS(54)))
      ALGBRC(62) =  ALGBRC(59)*CONSTS(55)*(ALGBRC(56)+ALGBRC(57))+ ALGBRC(57)*ALGBRC(55)*(CONSTS(59)+ALGBRC(59))
      ALGBRC(58) = 1.00000+ (STATES(6)/CONSTS(24))*(1.00000+EXP(( - CONSTS(21)*STATES(1))/CONSTS(54))+CONSTS(19)/CONSTS(28))+CONSTS(19)/CONSTS(25)+CONSTS(19) ** 2.00000/( CONSTS(25)*CONSTS(26))+CONSTS(19) ** 3.00000/( CONSTS(25)*CONSTS(26)*CONSTS(27))
      ALGBRC(61) = ( (STATES(6)/CONSTS(24))*EXP(( - CONSTS(21)*STATES(1))/CONSTS(54)))/ALGBRC(58)
      ALGBRC(60) = ( (CONSTS(19) ** 2.00000/( CONSTS(25)*CONSTS(26))+CONSTS(19) ** 3.00000/( CONSTS(25)*CONSTS(26)*CONSTS(27)))*EXP(( CONSTS(22)*STATES(1))/( 2.00000*CONSTS(54))))/ALGBRC(58)
      ALGBRC(63) =  ALGBRC(55)*CONSTS(59)*(ALGBRC(60)+ALGBRC(61))+ ALGBRC(59)*ALGBRC(61)*(CONSTS(55)+ALGBRC(55))
      ALGBRC(64) =  ALGBRC(60)*CONSTS(59)*(ALGBRC(56)+ALGBRC(57))+ ALGBRC(61)*ALGBRC(56)*(CONSTS(59)+ALGBRC(59))
      ALGBRC(65) =  ALGBRC(56)*CONSTS(55)*(ALGBRC(60)+ALGBRC(61))+ ALGBRC(60)*ALGBRC(57)*(CONSTS(55)+ALGBRC(55))
      ALGBRC(66) = ( CONSTS(20)*( ALGBRC(63)*ALGBRC(57) -  ALGBRC(62)*ALGBRC(61)))/(ALGBRC(62)+ALGBRC(63)+ALGBRC(64)+ALGBRC(65))
      ALGBRC(53) = ( CONSTS(18)*CONSTS(19)/(5.64000+CONSTS(19)) ** 3.00000*CONSTS(14)/(0.621000+CONSTS(14)) ** 2.00000*1.60000)/(1.50000+EXP(- (STATES(1)+60.0000)/40.0000))
      ALGBRC(52) =  CONSTS(16)*(STATES(1) - CONSTS(17))
      ALGBRC(18) = 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(67)+ALGBRC(72)+ALGBRC(68)+ALGBRC(43)+ALGBRC(35)+ALGBRC(69)+ALGBRC(51)+ALGBRC(66)+ALGBRC(53)+ALGBRC(52)+ALGBRC(71)+ALGBRC(18))/CONSTS(4)
      ALGBRC(74) = 5.00000/(1.00000+CONSTS(52)/STATES(20))
      ALGBRC(75) = (STATES(21) - STATES(22))/CONSTS(53)
      RATES(21) = ALGBRC(74) - ( ALGBRC(75)*CONSTS(61))/CONSTS(60)
      ALGBRC(76) =  88800.0*STATES(20)*(1.00000 - STATES(23)) -  446.000*STATES(23)
      RATES(23) = ALGBRC(76)
      ALGBRC(78) =  227700.*STATES(20)*((1.00000 - STATES(24)) - STATES(25)) -  7.51000*STATES(24)
      RATES(24) = ALGBRC(78)
      ALGBRC(77) = ( CONSTS(51)*(STATES(22) - STATES(6)))/(1.00000+0.00120000/STATES(6) ** 2.00000)
      ALGBRC(81) =  534.000*STATES(22)*(1.00000 - STATES(28)) -  445.000*STATES(28)
      RATES(22) = (ALGBRC(75) - ALGBRC(77)) -  10.0000*ALGBRC(81)
      ALGBRC(73) = (STATES(6) - STATES(20))/4.00000e-05
      ALGBRC(79) =  227700.*STATES(20)*(1.00000 - STATES(26)) -  542.000*STATES(26)
      RATES(20) = ( ALGBRC(73)*CONSTS(62) -  ALGBRC(74)*CONSTS(60))/CONSTS(63) - ( 0.0450000*ALGBRC(79)+ 0.0310000*ALGBRC(76)+ 0.0620000*ALGBRC(78))
      RATES(26) = ALGBRC(79)
      ALGBRC(80) =  227700.*STATES(6)*(1.00000 - STATES(27)) -  542.000*STATES(27)
      RATES(27) = ALGBRC(80)
      RATES(28) = ALGBRC(81)
      ALGBRC(82) =  0.00100000*( 115.000*STATES(6)*(1.00000 - STATES(29)) -  1000.00*STATES(29))
      RATES(6) = (((- (ALGBRC(72) -  2.00000*ALGBRC(66))/( 2.00000*CONSTS(3))+ ALGBRC(77)*CONSTS(61))/CONSTS(62) - ALGBRC(73)) -  0.0450000*ALGBRC(80)) -  (0.0310000/1.20000)*ALGBRC(82)
      RATES(29) = ALGBRC(82)
      RETURN
      END
      SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(16) = 120.000/(1.00000+EXP(- (STATES(1)+50.0000)/15.0000))
      ALGBRC(17) = 5.82000/(1.00000+EXP(- (STATES(1)+50.0000)/15.0000))
      ALGBRC(19) =  2277.00*2.50000*((1.00000 - STATES(24)) - STATES(25)) -  751.000*STATES(25)
      ALGBRC(1) = 1.00000/(1.00000+EXP(((STATES(1)+83.1900) - ( - 7.20000*CONSTS(11) ** 0.690000)/(1.26000e-05 ** 0.690000+CONSTS(11) ** 0.690000))/13.5600))
      ALGBRC(20) = 0.250000+ 2.00000*EXP(- STATES(1)+70.0000 ** 2.00000/500.000)
      ALGBRC(2) = 1.00000/(1.00000+EXP((STATES(1)+10.2200)/- 8.50000))
      ALGBRC(21) = 1.00000/( 17.0000*EXP( 0.0398000*STATES(1))+ 0.211000*EXP( - 0.0510000*STATES(1)))
      ALGBRC(3) = 1.00000/(1.00000+EXP((STATES(1)+10.2200)/- 8.50000))
      ALGBRC(22) = 0.335810+ 0.906730*EXP(- STATES(1)+10.0000 ** 2.00000/988.050)
      ALGBRC(9) = 1.00000/(1.00000+EXP((STATES(1) - (- 24.0000+CONSTS(41)))/6.31000))
      ALGBRC(28) = 0.0100000+ 0.153900*EXP(- STATES(1)+40.0000 ** 2.00000/185.670)
      ALGBRC(10) = 1.00000/(1.00000+EXP((STATES(1) - (- 24.0000+CONSTS(42)))/6.31000))
      ALGBRC(29) = 0.0600000+ 0.480760*2.25000*EXP(- STATES(1) - - 40.0000 ** 2.00000/138.040)
      ALGBRC(30) = 0.000596000+0.00311800/( 1.03700*EXP( 0.0900000*(STATES(1)+30.6100))+ 0.396000*EXP( - 0.120000*(STATES(1)+23.8400)))
      ALGBRC(11) = 1.00000/(1.00000+EXP((STATES(1) - 7.44000)/- 16.4000))
      ALGBRC(31) = 0.0126600+4.72716/(1.00000+EXP((STATES(1)+154.500)/23.9600))
      ALGBRC(12) = 1.00000/(1.00000+EXP((STATES(1)+33.8000)/6.12000))
      ALGBRC(32) = 0.100000+ 4.00000*EXP(- STATES(1)+65.0000 ** 2.00000/500.000)
      ALGBRC(13) = 1.00000/(1.00000+EXP((STATES(1)+33.8000)/6.12000))
      ALGBRC(5) = STATES(1)+44.4000
      ALGBRC(24) = TERNRY(ABS(ALGBRC(5)).LT.CONSTS(36), ( - 460.000*- 12.6730)/EXP(ALGBRC(5)/- 12.6730), ( - 460.000*ALGBRC(5))/(EXP(ALGBRC(5)/- 12.6730) - 1.00000))
      ALGBRC(37) =  18400.0*EXP(ALGBRC(5)/- 12.6730)
      ALGBRC(4) =  (1.00000/(1.00000+EXP((STATES(1)+4.90000)/15.1400)))*(1.00000 -  0.300000*EXP(- STATES(1) ** 2.00000/500.000))
      ALGBRC(23) =  92.0100*EXP( - 0.0183000*STATES(1))
      ALGBRC(36) =  603.600*EXP( 0.00942000*STATES(1))
      ALGBRC(44) = 1.00000/(ALGBRC(23)+ALGBRC(36))
      ALGBRC(6) =  44.9000*EXP((STATES(1)+66.9000)/- 5.57000)
      ALGBRC(25) = 1491.00/(1.00000+ 323.300*EXP((STATES(1)+94.6000)/- 12.9000))
      ALGBRC(38) = ALGBRC(6)/(ALGBRC(6)+ALGBRC(25))
      ALGBRC(45) = 0.0300000/(1.00000+EXP((STATES(1)+40.0000)/6.00000))+0.000350000
      ALGBRC(7) =  44.9000*EXP((STATES(1)+66.9000)/- 5.57000)
      ALGBRC(26) = 1491.00/(1.00000+ 323.300*EXP((STATES(1)+94.6000)/- 12.9000))
      ALGBRC(39) = ALGBRC(7)/(ALGBRC(7)+ALGBRC(26))
      ALGBRC(46) = 0.120000/(1.00000+EXP((STATES(1)+60.0000)/2.00000))+0.00295000
      ALGBRC(40) = 1.00000/(1.00000+EXP((STATES(1) - (- 3.20000+CONSTS(39)))/CONSTS(40)))
      ALGBRC(8) = ( - 26.1200*(STATES(1)+35.0000))/(EXP((STATES(1)+35.0000)/- 2.50000) - 1.00000)+( - 78.1100*STATES(1))/(EXP( - 0.208000*STATES(1)) - 1.00000)
      ALGBRC(27) = ( 10.5200*(STATES(1) - 5.00000))/(EXP( 0.400000*(STATES(1) - 5.00000)) - 1.00000)
      ALGBRC(47) = 1.00000/(ALGBRC(8)+ALGBRC(27))
      ALGBRC(33) = 1.00000/( 0.150000*EXP(- STATES(1)/11.0000)+ 0.200000*EXP(- STATES(1)/700.000))
      ALGBRC(41) = 1.00000/( 16.0000*EXP(STATES(1)/8.00000)+ 15.0000*EXP(STATES(1)/50.0000))
      ALGBRC(48) = 0.00100000/(ALGBRC(33)+ALGBRC(41))
      ALGBRC(14) = 1.00000/(1.00000+EXP((STATES(1) - - 49.1000)/- 8.98000))
      ALGBRC(15) = 0.150400/( 3100.00*EXP(STATES(1)/13.0000)+ 700.000*EXP(STATES(1)/70.0000))
      ALGBRC(34) = 0.150400/( 95.0000*EXP(- STATES(1)/10.0000)+ 50.0000*EXP(- STATES(1)/700.000))+0.000229000/(1.00000+EXP(- STATES(1)/5.00000))
      ALGBRC(49) = 0.00100000/(ALGBRC(15)+ALGBRC(34))
      ALGBRC(42) = ALGBRC(15)/(ALGBRC(15)+ALGBRC(34))
      ALGBRC(67) = ( (( CONSTS(35)*STATES(7) ** 3.00000*( 0.635000*STATES(8)+ 0.365000*STATES(9))*CONSTS(34)*STATES(1)*CONSTS(3))/CONSTS(54))*(EXP((STATES(1) - CONSTS(57))/CONSTS(54)) - 1.00000))/(EXP(STATES(1)/CONSTS(54)) - 1.00000)
      ALGBRC(70) = ( CONSTS(46)*STATES(18)*STATES(19)*CONSTS(11) ** 1.50000)/(CONSTS(47) ** 1.50000+CONSTS(11) ** 1.50000)
      ALGBRC(71) = ( (( ALGBRC(70)*CONSTS(14))/(10.0000+CONSTS(14)))*(STATES(1) - CONSTS(56)))/(1.00000+EXP(((STATES(1) - CONSTS(56)) - 140.000)/( 2.50000*CONSTS(54))))
      ALGBRC(72) =  CONSTS(37)*STATES(10)*( 0.675000*STATES(11)+ 0.325000*STATES(12))*(STATES(1) - CONSTS(38))*(1.00000 - (( ALGBRC(71)*CONSTS(11))/(9.00000e-05+CONSTS(11)))/1.00000)
      ALGBRC(68) =  CONSTS(43)*STATES(13)*( 0.450000*STATES(14)+ 0.550000*STATES(15))*(STATES(1) - CONSTS(58))
      ALGBRC(43) =  CONSTS(12)*( 0.900000*STATES(3)+ 0.100000*STATES(4))*STATES(5)*(STATES(1) - CONSTS(56))
      ALGBRC(35) =  STATES(2)*CONSTS(10)*(STATES(1) - - 30.0000)
      ALGBRC(69) =  CONSTS(45)*STATES(16)*STATES(17)*(STATES(1) - CONSTS(44))
      ALGBRC(50) =  CONSTS(15)*(0.500000+0.500000/(1.00000+EXP((STATES(1)+30.0000)/5.00000)))
      ALGBRC(51) = ( ALGBRC(50)*CONSTS(14)/(CONSTS(14)+0.590000) ** 3.00000*(STATES(1)+81.9000))/(1.00000+EXP(( 1.39300*(STATES(1)+81.9000+3.60000))/CONSTS(54)))
      ALGBRC(59) = EXP(( - CONSTS(22)*STATES(1))/( 2.00000*CONSTS(54)))
      ALGBRC(54) = 1.00000+ (CONSTS(33)/CONSTS(32))*(1.00000+EXP(( CONSTS(23)*STATES(1))/CONSTS(54)))+CONSTS(34)/CONSTS(30)+CONSTS(34) ** 2.00000/( CONSTS(30)*CONSTS(31))+CONSTS(34) ** 3.00000/( CONSTS(30)*CONSTS(31)*CONSTS(29))
      ALGBRC(56) = ( (CONSTS(34) ** 2.00000/( CONSTS(30)*CONSTS(31))+CONSTS(34) ** 3.00000/( CONSTS(30)*CONSTS(31)*CONSTS(29)))*EXP(( - CONSTS(22)*STATES(1))/( 2.00000*CONSTS(54))))/ALGBRC(54)
      ALGBRC(57) = ( (CONSTS(33)/CONSTS(32))*EXP(( - CONSTS(23)*STATES(1))/CONSTS(54)))/ALGBRC(54)
      ALGBRC(55) = EXP(( CONSTS(22)*STATES(1))/( 2.00000*CONSTS(54)))
      ALGBRC(62) =  ALGBRC(59)*CONSTS(55)*(ALGBRC(56)+ALGBRC(57))+ ALGBRC(57)*ALGBRC(55)*(CONSTS(59)+ALGBRC(59))
      ALGBRC(58) = 1.00000+ (STATES(6)/CONSTS(24))*(1.00000+EXP(( - CONSTS(21)*STATES(1))/CONSTS(54))+CONSTS(19)/CONSTS(28))+CONSTS(19)/CONSTS(25)+CONSTS(19) ** 2.00000/( CONSTS(25)*CONSTS(26))+CONSTS(19) ** 3.00000/( CONSTS(25)*CONSTS(26)*CONSTS(27))
      ALGBRC(61) = ( (STATES(6)/CONSTS(24))*EXP(( - CONSTS(21)*STATES(1))/CONSTS(54)))/ALGBRC(58)
      ALGBRC(60) = ( (CONSTS(19) ** 2.00000/( CONSTS(25)*CONSTS(26))+CONSTS(19) ** 3.00000/( CONSTS(25)*CONSTS(26)*CONSTS(27)))*EXP(( CONSTS(22)*STATES(1))/( 2.00000*CONSTS(54))))/ALGBRC(58)
      ALGBRC(63) =  ALGBRC(55)*CONSTS(59)*(ALGBRC(60)+ALGBRC(61))+ ALGBRC(59)*ALGBRC(61)*(CONSTS(55)+ALGBRC(55))
      ALGBRC(64) =  ALGBRC(60)*CONSTS(59)*(ALGBRC(56)+ALGBRC(57))+ ALGBRC(61)*ALGBRC(56)*(CONSTS(59)+ALGBRC(59))
      ALGBRC(65) =  ALGBRC(56)*CONSTS(55)*(ALGBRC(60)+ALGBRC(61))+ ALGBRC(60)*ALGBRC(57)*(CONSTS(55)+ALGBRC(55))
      ALGBRC(66) = ( CONSTS(20)*( ALGBRC(63)*ALGBRC(57) -  ALGBRC(62)*ALGBRC(61)))/(ALGBRC(62)+ALGBRC(63)+ALGBRC(64)+ALGBRC(65))
      ALGBRC(53) = ( CONSTS(18)*CONSTS(19)/(5.64000+CONSTS(19)) ** 3.00000*CONSTS(14)/(0.621000+CONSTS(14)) ** 2.00000*1.60000)/(1.50000+EXP(- (STATES(1)+60.0000)/40.0000))
      ALGBRC(52) =  CONSTS(16)*(STATES(1) - CONSTS(17))
      ALGBRC(18) = 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(74) = 5.00000/(1.00000+CONSTS(52)/STATES(20))
      ALGBRC(75) = (STATES(21) - STATES(22))/CONSTS(53)
      ALGBRC(76) =  88800.0*STATES(20)*(1.00000 - STATES(23)) -  446.000*STATES(23)
      ALGBRC(78) =  227700.*STATES(20)*((1.00000 - STATES(24)) - STATES(25)) -  7.51000*STATES(24)
      ALGBRC(77) = ( CONSTS(51)*(STATES(22) - STATES(6)))/(1.00000+0.00120000/STATES(6) ** 2.00000)
      ALGBRC(81) =  534.000*STATES(22)*(1.00000 - STATES(28)) -  445.000*STATES(28)
      ALGBRC(73) = (STATES(6) - STATES(20))/4.00000e-05
      ALGBRC(79) =  227700.*STATES(20)*(1.00000 - STATES(26)) -  542.000*STATES(26)
      ALGBRC(80) =  227700.*STATES(6)*(1.00000 - STATES(27)) -  542.000*STATES(27)
      ALGBRC(82) =  0.00100000*( 115.000*STATES(6)*(1.00000 - STATES(29)) -  1000.00*STATES(29))
      RETURN
      END
      REAL FUNCTION TERNRY(TEST, VALA, VALB)
      LOGICAL TEST
      REAL VALA, VALB
      IF (TEST) THEN
        TERNRY = VALA
      ELSE
        TERNRY = VALB
      ENDIF
      RETURN
      END