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 71 entries in the algebraic variable array.
C There are a total of 31 entries in each of the rate and state variable arrays.
C There are a total of 87 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 (millijoule_per_mole_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 Cm in component membrane (microF).
C ALGBRC(27) is i_Na in component sodium_current (nanoA).
C ALGBRC(28) is i_Ca_L in component L_type_Ca_channel (nanoA).
C ALGBRC(30) is i_t in component Ca_independent_transient_outward_K_current (nanoA).
C ALGBRC(31) is i_ss in component steady_state_outward_K_current (nanoA).
C ALGBRC(35) is i_f in component hyperpolarisation_activated_current (nanoA).
C ALGBRC(32) is i_K1 in component inward_rectifier (nanoA).
C ALGBRC(40) is i_B in component background_currents (nanoA).
C ALGBRC(41) is i_NaK in component sodium_potassium_pump (nanoA).
C ALGBRC(43) is i_NaCa in component Na_Ca_ion_exchanger_current (nanoA).
C ALGBRC(42) is i_Ca_P in component sarcolemmal_calcium_pump_current (nanoA).
C ALGBRC(14) 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 ALGBRC(71) is I_inter_myo in component I_inter (nanoA).
C ALGBRC(26) is E_Na in component sodium_current (millivolt).
C CONSTS(10) is g_Na in component sodium_current (microS).
C STATES(2) is Na_i in component intracellular_ion_concentrations (millimolar).
C CONSTS(11) is Na_o in component standard_ionic_concentrations (millimolar).
C STATES(3) is m in component sodium_current_m_gate (dimensionless).
C STATES(4) is h in component sodium_current_h_gate (dimensionless).
C STATES(5) is j in component sodium_current_j_gate (dimensionless).
C ALGBRC(1) is m_infinity in component sodium_current_m_gate (dimensionless).
C ALGBRC(15) is tau_m in component sodium_current_m_gate (second).
C ALGBRC(2) is h_infinity in component sodium_current_h_gate (dimensionless).
C ALGBRC(16) is tau_h in component sodium_current_h_gate (second).
C ALGBRC(3) is j_infinity in component sodium_current_j_gate (dimensionless).
C ALGBRC(17) is tau_j in component sodium_current_j_gate (second).
C CONSTS(12) is g_Ca_L in component L_type_Ca_channel (microS).
C CONSTS(13) is E_Ca_L in component L_type_Ca_channel (millivolt).
C STATES(6) is Ca_ss in component intracellular_ion_concentrations (millimolar).
C STATES(7) is d in component L_type_Ca_channel_d_gate (dimensionless).
C STATES(8) is f_11 in component L_type_Ca_channel_f_11_gate (dimensionless).
C STATES(9) is f_12 in component L_type_Ca_channel_f_12_gate (dimensionless).
C STATES(10) is Ca_inact in component L_type_Ca_channel_Ca_inact_gate (dimensionless).
C ALGBRC(4) is d_infinity in component L_type_Ca_channel_d_gate (dimensionless).
C ALGBRC(18) is tau_d in component L_type_Ca_channel_d_gate (second).
C ALGBRC(5) is f_11_infinity in component L_type_Ca_channel_f_11_gate (dimensionless).
C ALGBRC(19) is tau_f_11 in component L_type_Ca_channel_f_11_gate (second).
C ALGBRC(6) is f_12_infinity in component L_type_Ca_channel_f_12_gate (dimensionless).
C ALGBRC(20) is tau_f_12 in component L_type_Ca_channel_f_12_gate (second).
C CONSTS(14) is tau_Ca_inact in component L_type_Ca_channel_Ca_inact_gate (second).
C ALGBRC(7) is Ca_inact_infinity in component L_type_Ca_channel_Ca_inact_gate (dimensionless).
C ALGBRC(29) is E_K in component Ca_independent_transient_outward_K_current (millivolt).
C CONSTS(15) is g_t in component Ca_independent_transient_outward_K_current (microS).
C CONSTS(16) is a in component Ca_independent_transient_outward_K_current (dimensionless).
C CONSTS(17) is b in component Ca_independent_transient_outward_K_current (dimensionless).
C CONSTS(18) is K_o in component standard_ionic_concentrations (millimolar).
C STATES(11) is K_i in component intracellular_ion_concentrations (millimolar).
C STATES(12) is r in component Ca_independent_transient_outward_K_current_r_gate (dimensionless).
C STATES(13) is s in component Ca_independent_transient_outward_K_current_s_gate (dimensionless).
C STATES(14) is s_slow in component Ca_independent_transient_outward_K_current_s_slow_gate (dimensionless).
C ALGBRC(21) is tau_r in component Ca_independent_transient_outward_K_current_r_gate (second).
C ALGBRC(8) is r_infinity in component Ca_independent_transient_outward_K_current_r_gate (dimensionless).
C ALGBRC(22) is tau_s in component Ca_independent_transient_outward_K_current_s_gate (second).
C ALGBRC(9) is s_infinity in component Ca_independent_transient_outward_K_current_s_gate (dimensionless).
C ALGBRC(23) is tau_s_slow in component Ca_independent_transient_outward_K_current_s_slow_gate (second).
C ALGBRC(10) is s_slow_infinity in component Ca_independent_transient_outward_K_current_s_slow_gate (dimensionless).
C CONSTS(19) is g_ss in component steady_state_outward_K_current (microS).
C STATES(15) is r_ss in component steady_state_outward_K_current_r_ss_gate (dimensionless).
C STATES(16) is s_ss in component steady_state_outward_K_current_s_ss_gate (dimensionless).
C ALGBRC(24) is tau_r_ss in component steady_state_outward_K_current_r_ss_gate (second).
C ALGBRC(11) is r_ss_infinity in component steady_state_outward_K_current_r_ss_gate (dimensionless).
C CONSTS(85) is tau_s_ss in component steady_state_outward_K_current_s_ss_gate (second).
C ALGBRC(12) is s_ss_infinity in component steady_state_outward_K_current_s_ss_gate (dimensionless).
C CONSTS(20) is g_K1 in component inward_rectifier (microS).
C ALGBRC(33) is i_f_Na in component hyperpolarisation_activated_current (nanoA).
C ALGBRC(34) is i_f_K in component hyperpolarisation_activated_current (nanoA).
C CONSTS(21) is g_f in component hyperpolarisation_activated_current (microS).
C CONSTS(22) is f_Na in component hyperpolarisation_activated_current (dimensionless).
C CONSTS(86) is f_K in component hyperpolarisation_activated_current (dimensionless).
C STATES(17) is y in component hyperpolarisation_activated_current_y_gate (dimensionless).
C ALGBRC(25) is tau_y in component hyperpolarisation_activated_current_y_gate (second).
C ALGBRC(13) is y_infinity in component hyperpolarisation_activated_current_y_gate (dimensionless).
C ALGBRC(37) is i_B_Na in component background_currents (nanoA).
C ALGBRC(38) is i_B_Ca in component background_currents (nanoA).
C ALGBRC(39) is i_B_K in component background_currents (nanoA).
C CONSTS(23) is g_B_Na in component background_currents (microS).
C CONSTS(24) is g_B_Ca in component background_currents (microS).
C CONSTS(25) is g_B_K in component background_currents (microS).
C ALGBRC(36) is E_Ca in component background_currents (millivolt).
C CONSTS(26) is Ca_o in component standard_ionic_concentrations (millimolar).
C STATES(18) is Ca_i in component intracellular_ion_concentrations (millimolar).
C CONSTS(27) is i_NaK_max in component sodium_potassium_pump (nanoA).
C CONSTS(28) is K_m_K in component sodium_potassium_pump (millimolar).
C CONSTS(29) is K_m_Na in component sodium_potassium_pump (millimolar).
C CONSTS(87) is sigma in component sodium_potassium_pump (dimensionless).
C CONSTS(30) is i_Ca_P_max in component sarcolemmal_calcium_pump_current (nanoA).
C CONSTS(31) is K_NaCa in component Na_Ca_ion_exchanger_current (nanoA_millimolar_4).
C CONSTS(32) is d_NaCa in component Na_Ca_ion_exchanger_current (millimolar_4).
C CONSTS(33) is gamma_NaCa in component Na_Ca_ion_exchanger_current (dimensionless).
C ALGBRC(44) is J_rel in component SR_Ca_release_channel (millimolar_per_second).
C CONSTS(34) is v1 in component SR_Ca_release_channel (per_second).
C CONSTS(35) is k_a_plus in component SR_Ca_release_channel (per_second).
C CONSTS(36) is k_a_minus in component SR_Ca_release_channel (per_second).
C CONSTS(37) is k_b_plus in component SR_Ca_release_channel (per_second).
C CONSTS(38) is k_b_minus in component SR_Ca_release_channel (per_second).
C CONSTS(39) is k_c_plus in component SR_Ca_release_channel (per_second).
C CONSTS(40) is k_c_minus in component SR_Ca_release_channel (per_second).
C STATES(19) is P_O1 in component SR_Ca_release_channel (dimensionless).
C STATES(20) is P_O2 in component SR_Ca_release_channel (dimensionless).
C STATES(21) is P_C1 in component SR_Ca_release_channel (dimensionless).
C STATES(22) is P_C2 in component SR_Ca_release_channel (dimensionless).
C CONSTS(41) is n in component SR_Ca_release_channel (dimensionless).
C CONSTS(42) is m in component SR_Ca_release_channel (dimensionless).
C STATES(23) is Ca_JSR in component intracellular_ion_concentrations (millimolar).
C ALGBRC(50) is J_up in component SERCA2a_pump (millimolar_per_second).
C CONSTS(43) is K_fb in component SERCA2a_pump (millimolar).
C CONSTS(44) is K_rb in component SERCA2a_pump (millimolar).
C ALGBRC(46) is fb in component SERCA2a_pump (dimensionless).
C ALGBRC(48) is rb in component SERCA2a_pump (dimensionless).
C CONSTS(45) is Vmaxf in component SERCA2a_pump (millimolar_per_second).
C CONSTS(46) is Vmaxr in component SERCA2a_pump (millimolar_per_second).
C CONSTS(47) is K_SR in component SERCA2a_pump (dimensionless).
C CONSTS(48) is N_fb in component SERCA2a_pump (dimensionless).
C CONSTS(49) is N_rb in component SERCA2a_pump (dimensionless).
C STATES(24) is Ca_NSR in component intracellular_ion_concentrations (millimolar).
C ALGBRC(53) is J_tr in component intracellular_and_SR_Ca_fluxes (millimolar_per_second).
C ALGBRC(52) is J_xfer in component intracellular_and_SR_Ca_fluxes (millimolar_per_second).
C ALGBRC(61) is J_trpn in component intracellular_and_SR_Ca_fluxes (millimolar_per_second).
C CONSTS(50) is tau_tr in component intracellular_and_SR_Ca_fluxes (second).
C CONSTS(51) is tau_xfer in component intracellular_and_SR_Ca_fluxes (second).
C CONSTS(52) is HTRPNCa in component intracellular_and_SR_Ca_fluxes (millimolar).
C CONSTS(53) is LTRPNCa in component intracellular_and_SR_Ca_fluxes (millimolar).
C ALGBRC(55) is J_HTRPNCa in component intracellular_and_SR_Ca_fluxes (millimolar_per_second).
C ALGBRC(59) is J_LTRPNCa in component intracellular_and_SR_Ca_fluxes (millimolar_per_second).
C CONSTS(54) is HTRPN_tot in component intracellular_and_SR_Ca_fluxes (millimolar).
C CONSTS(55) is LTRPN_tot in component intracellular_and_SR_Ca_fluxes (millimolar).
C CONSTS(56) is k_htrpn_plus in component intracellular_and_SR_Ca_fluxes (per_millimolar_per_second).
C CONSTS(57) is k_htrpn_minus in component intracellular_and_SR_Ca_fluxes (per_second).
C CONSTS(58) is k_ltrpn_plus in component intracellular_and_SR_Ca_fluxes (per_millimolar_per_second).
C CONSTS(59) is k_ltrpn_minus in component intracellular_and_SR_Ca_fluxes (per_second).
C CONSTS(60) is V_myo in component intracellular_ion_concentrations (micro_litre).
C CONSTS(61) is V_JSR in component intracellular_ion_concentrations (micro_litre).
C CONSTS(62) is V_NSR in component intracellular_ion_concentrations (micro_litre).
C CONSTS(63) is V_SS in component intracellular_ion_concentrations (micro_litre).
C CONSTS(64) is K_mCMDN in component intracellular_ion_concentrations (millimolar).
C CONSTS(65) is K_mCSQN in component intracellular_ion_concentrations (millimolar).
C CONSTS(66) is K_mEGTA in component intracellular_ion_concentrations (millimolar).
C CONSTS(67) is CMDN_tot in component intracellular_ion_concentrations (millimolar).
C CONSTS(68) is CSQN_tot in component intracellular_ion_concentrations (millimolar).
C CONSTS(69) is EGTA_tot in component intracellular_ion_concentrations (millimolar).
C ALGBRC(63) is beta_i in component intracellular_ion_concentrations (dimensionless).
C ALGBRC(56) is beta_SS in component intracellular_ion_concentrations (dimensionless).
C ALGBRC(57) is beta_JSR in component intracellular_ion_concentrations (dimensionless).
C ALGBRC(45) is V_fibro in component membrane_fibro (millivolt).
C CONSTS(70) is Cm in component membrane_fibro (microF).
C ALGBRC(68) is I_b in component I_b (nanoA).
C ALGBRC(51) is I_Kir in component I_Kir (nanoA).
C ALGBRC(66) is I_Shkr in component I_Shkr (nanoA).
C ALGBRC(70) is I_inter_fibro in component I_inter (nanoA).
C STATES(25) is VmReal in component membrane_fibro (millivolt).
C CONSTS(71) is GKir in component I_Kir (microS).
C CONSTS(72) is aKir in component I_Kir (dimensionless).
C CONSTS(73) is bKir in component I_Kir (dimensionless).
C ALGBRC(47) is EK in component I_Kir (millivolt).
C ALGBRC(49) is OKir in component I_Kir (dimensionless).
C CONSTS(74) is PShkr in component I_Shkr (microlitre_per_second).
C STATES(26) is C0ShkrReal in component I_Shkr (dimensionless).
C STATES(27) is C1ShkrReal in component I_Shkr (dimensionless).
C STATES(28) is C2ShkrReal in component I_Shkr (dimensionless).
C STATES(29) is C3ShkrReal in component I_Shkr (dimensionless).
C STATES(30) is C4ShkrReal in component I_Shkr (dimensionless).
C STATES(31) is OShkrReal in component I_Shkr (dimensionless).
C ALGBRC(54) is C0Shkr in component I_Shkr (dimensionless).
C ALGBRC(58) is C1Shkr in component I_Shkr (dimensionless).
C ALGBRC(60) is C2Shkr in component I_Shkr (dimensionless).
C ALGBRC(62) is C3Shkr in component I_Shkr (dimensionless).
C ALGBRC(64) is C4Shkr in component I_Shkr (dimensionless).
C ALGBRC(65) is OShkr in component I_Shkr (dimensionless).
C ALGBRC(67) is kv in component I_Shkr (per_second).
C ALGBRC(69) is k_v in component I_Shkr (per_second).
C CONSTS(75) is kv0 in component I_Shkr (per_second).
C CONSTS(76) is zv in component I_Shkr (dimensionless).
C CONSTS(77) is k_v0 in component I_Shkr (per_second).
C CONSTS(78) is z_v in component I_Shkr (dimensionless).
C CONSTS(79) is ko in component I_Shkr (per_second).
C CONSTS(80) is k_o in component I_Shkr (per_second).
C CONSTS(81) is Gb in component I_b (microS).
C CONSTS(82) is Eb in component I_b (millivolt).
C CONSTS(83) is R_mf in component I_inter (ohm).
C CONSTS(84) is number_of_fibroblasts in component I_inter (dimensionless).
C RATES(1) is d/dt V in component membrane (millivolt).
C RATES(3) is d/dt m in component sodium_current_m_gate (dimensionless).
C RATES(4) is d/dt h in component sodium_current_h_gate (dimensionless).
C RATES(5) is d/dt j in component sodium_current_j_gate (dimensionless).
C RATES(7) is d/dt d in component L_type_Ca_channel_d_gate (dimensionless).
C RATES(8) is d/dt f_11 in component L_type_Ca_channel_f_11_gate (dimensionless).
C RATES(9) is d/dt f_12 in component L_type_Ca_channel_f_12_gate (dimensionless).
C RATES(10) is d/dt Ca_inact in component L_type_Ca_channel_Ca_inact_gate (dimensionless).
C RATES(12) is d/dt r in component Ca_independent_transient_outward_K_current_r_gate (dimensionless).
C RATES(13) is d/dt s in component Ca_independent_transient_outward_K_current_s_gate (dimensionless).
C RATES(14) is d/dt s_slow in component Ca_independent_transient_outward_K_current_s_slow_gate (dimensionless).
C RATES(15) is d/dt r_ss in component steady_state_outward_K_current_r_ss_gate (dimensionless).
C RATES(16) is d/dt s_ss in component steady_state_outward_K_current_s_ss_gate (dimensionless).
C RATES(17) is d/dt y in component hyperpolarisation_activated_current_y_gate (dimensionless).
C RATES(21) is d/dt P_C1 in component SR_Ca_release_channel (dimensionless).
C RATES(19) is d/dt P_O1 in component SR_Ca_release_channel (dimensionless).
C RATES(20) is d/dt P_O2 in component SR_Ca_release_channel (dimensionless).
C RATES(22) is d/dt P_C2 in component SR_Ca_release_channel (dimensionless).
C RATES(18) is d/dt Ca_i in component intracellular_ion_concentrations (millimolar).
C RATES(2) is d/dt Na_i in component intracellular_ion_concentrations (millimolar).
C RATES(11) is d/dt K_i in component intracellular_ion_concentrations (millimolar).
C RATES(6) is d/dt Ca_ss in component intracellular_ion_concentrations (millimolar).
C RATES(23) is d/dt Ca_JSR in component intracellular_ion_concentrations (millimolar).
C RATES(24) is d/dt Ca_NSR in component intracellular_ion_concentrations (millimolar).
C RATES(25) is d/dt VmReal in component membrane_fibro (millivolt).
C RATES(26) is d/dt C0ShkrReal in component I_Shkr (dimensionless).
C RATES(27) is d/dt C1ShkrReal in component I_Shkr (dimensionless).
C RATES(28) is d/dt C2ShkrReal in component I_Shkr (dimensionless).
C RATES(29) is d/dt C3ShkrReal in component I_Shkr (dimensionless).
C RATES(30) is d/dt C4ShkrReal in component I_Shkr (dimensionless).
C RATES(31) is d/dt OShkrReal in component I_Shkr (dimensionless).
C
      SUBROUTINE initConsts(CONSTS, RATES, STATES)
      REAL CONSTS(*), RATES(*), STATES(*)
      STATES(1) = -80.50146
      CONSTS(1) = 8314.5
      CONSTS(2) = 295
      CONSTS(3) = 96487
      CONSTS(4) = 0.0001
      CONSTS(5) = 0.01
      CONSTS(6) = 10
      CONSTS(7) = 1
      CONSTS(8) = 0.001
      CONSTS(9) = -5
      CONSTS(10) = 0.8
      STATES(2) = 10.73519
      CONSTS(11) = 140
      STATES(3) = 0.004164108
      STATES(4) = 0.6735613
      STATES(5) = 0.6729362
      CONSTS(12) = 0.031
      CONSTS(13) = 65
      STATES(6) = 0.00008737212
      STATES(7) = 0.000002171081
      STATES(8) = 0.9999529
      STATES(9) = 0.9999529
      STATES(10) = 0.9913102
      CONSTS(14) = 0.009
      CONSTS(15) = 0.035
      CONSTS(16) = 0.886
      CONSTS(17) = 0.114
      CONSTS(18) = 5.4
      STATES(11) = 139.2751
      STATES(12) = 0.002191519
      STATES(13) = 0.9842542
      STATES(14) = 0.6421196
      CONSTS(19) = 0.007
      STATES(15) = 0.002907171
      STATES(16) = 0.3142767
      CONSTS(20) = 0.024
      CONSTS(21) = 0.00145
      CONSTS(22) = 0.2
      STATES(17) = 0.003578708
      CONSTS(23) = 0.00008015
      CONSTS(24) = 0.0000324
      CONSTS(25) = 0.000138
      CONSTS(26) = 1.2
      STATES(18) = 0.00007901351
      CONSTS(27) = 0.08
      CONSTS(28) = 1.5
      CONSTS(29) = 10
      CONSTS(30) = 0.004
      CONSTS(31) = 0.000009984
      CONSTS(32) = 0.0001
      CONSTS(33) = 0.5
      CONSTS(34) = 1.8e3
      CONSTS(35) = 12.15e12
      CONSTS(36) = 576
      CONSTS(37) = 4.05e9
      CONSTS(38) = 1930
      CONSTS(39) = 100
      CONSTS(40) = 0.8
      STATES(19) = 0.0004327548
      STATES(20) = 0.000000000606254
      STATES(21) = 0.6348229
      STATES(22) = 0.3647471
      CONSTS(41) = 4
      CONSTS(42) = 3
      STATES(23) = 0.06607948
      CONSTS(43) = 0.000168
      CONSTS(44) = 3.29
      CONSTS(45) = 0.04
      CONSTS(46) = 0.9
      CONSTS(47) = 1
      CONSTS(48) = 1.2
      CONSTS(49) = 1
      STATES(24) = 0.06600742
      CONSTS(50) = 0.0005747
      CONSTS(51) = 0.0267
      CONSTS(52) = 1.394301e-1
      CONSTS(53) = 5.1619e-3
      CONSTS(54) = 0.14
      CONSTS(55) = 0.07
      CONSTS(56) = 200000
      CONSTS(57) = 0.066
      CONSTS(58) = 40000
      CONSTS(59) = 40
      CONSTS(60) = 0.00000936
      CONSTS(61) = 0.00000056
      CONSTS(62) = 0.00000504
      CONSTS(63) = 0.000000012
      CONSTS(64) = 0.00238
      CONSTS(65) = 0.8
      CONSTS(66) = 0.00015
      CONSTS(67) = 0.05
      CONSTS(68) = 15
      CONSTS(69) = 10
      CONSTS(70) = 4.5e-6
      STATES(25) = -80.00
      CONSTS(71) = 1e-3
      CONSTS(72) = 0.94
      CONSTS(73) = 1.26
      CONSTS(74) = 5.4e-9
      STATES(26) = 9.11e-1
      STATES(27) = 8.57e-2
      STATES(28) = 3.02e-3
      STATES(29) = 4.74e-5
      STATES(30) = 2.79e-7
      STATES(31) = 0
      CONSTS(75) = 30
      CONSTS(76) = 1.28
      CONSTS(77) = 2
      CONSTS(78) = -1.53
      CONSTS(79) = 77
      CONSTS(80) = 18
      CONSTS(81) = 6.9e-6
      CONSTS(82) = 0
      CONSTS(83) = 100e6
      CONSTS(84) = 1
      CONSTS(85) = 2.10000
      CONSTS(86) = 1.00000 - CONSTS(22)
      CONSTS(87) = (EXP(CONSTS(11)/67.3000) - 1.00000)/7.00000
      RETURN
      END
      SUBROUTINE computeRates(VOI, CONSTS,  RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      RATES(21) =  - CONSTS(35)*STATES(6)/1.00000 ** CONSTS(41)*STATES(21)+ CONSTS(36)*STATES(19)
      RATES(19) = ( CONSTS(35)*STATES(6)/1.00000 ** CONSTS(41)*STATES(21) - ( CONSTS(36)*STATES(19)+ CONSTS(37)*STATES(6)/1.00000 ** CONSTS(42)*STATES(19)+ CONSTS(39)*STATES(19)))+ CONSTS(38)*STATES(20)+ CONSTS(40)*STATES(22)
      RATES(20) =  CONSTS(37)*STATES(6)/1.00000 ** CONSTS(42)*STATES(19) -  CONSTS(38)*STATES(20)
      RATES(22) =  CONSTS(39)*STATES(19) -  CONSTS(40)*STATES(22)
      ALGBRC(7) = 1.00000/(1.00000+STATES(6)/0.0100000)
      RATES(10) = (ALGBRC(7) - STATES(10))/CONSTS(14)
      ALGBRC(12) = 1.00000/(1.00000+EXP((STATES(1)+87.5000)/10.3000))
      RATES(16) = (ALGBRC(12) - STATES(16))/CONSTS(85)
      ALGBRC(1) = 1.00000/(1.00000+EXP((STATES(1)+45.0000)/- 6.50000))
      ALGBRC(15) = 0.00136000/(( 0.320000*(STATES(1)+47.1300))/(1.00000 - EXP( - 0.100000*(STATES(1)+47.1300)))+ 0.0800000*EXP(- STATES(1)/11.0000))
      RATES(3) = (ALGBRC(1) - STATES(3))/ALGBRC(15)
      ALGBRC(2) = 1.00000/(1.00000+EXP((STATES(1)+76.1000)/6.07000))
      ALGBRC(16) = TERNRY(STATES(1).GE.- 40.0000,  0.000453700*(1.00000+EXP(- (STATES(1)+10.6600)/11.1000)), 0.00349000/( 0.135000*EXP(- (STATES(1)+80.0000)/6.80000)+ 3.56000*EXP( 0.0790000*STATES(1))+ 310000.*EXP( 0.350000*STATES(1))))
      RATES(4) = (ALGBRC(2) - STATES(4))/ALGBRC(16)
      ALGBRC(3) = 1.00000/(1.00000+EXP((STATES(1)+76.1000)/6.07000))
      ALGBRC(17) = TERNRY(STATES(1).GE.- 40.0000, ( 0.0116300*(1.00000+EXP( - 0.100000*(STATES(1)+32.0000))))/EXP( - 2.53500e-07*STATES(1)), 0.00349000/( ((STATES(1)+37.7800)/(1.00000+EXP( 0.311000*(STATES(1)+79.2300))))*( - 127140.*EXP( 0.244400*STATES(1)) -  3.47400e-05*EXP( - 0.0439100*STATES(1)))+( 0.121200*EXP( - 0.0105200*STATES(1)))/(1.00000+EXP( - 0.137800*(STATES(1)+40.1400)))))
      RATES(5) = (ALGBRC(3) - STATES(5))/ALGBRC(17)
      ALGBRC(4) = 1.00000/(1.00000+EXP((STATES(1)+15.3000)/- 5.00000))
      ALGBRC(18) =  0.00305000*EXP( - 0.00450000*STATES(1)+7.00000 ** 2.00000)+ 0.00105000*EXP( - 0.00200000*STATES(1) - 18.0000 ** 2.00000)+0.000250000
      RATES(7) = (ALGBRC(4) - STATES(7))/ALGBRC(18)
      ALGBRC(5) = 1.00000/(1.00000+EXP((STATES(1)+26.7000)/5.40000))
      ALGBRC(19) =  0.105000*EXP(- (STATES(1)+45.0000)/12.0000 ** 2.00000)+0.0400000/(1.00000+EXP((- STATES(1)+25.0000)/25.0000))+0.0150000/(1.00000+EXP((STATES(1)+75.0000)/25.0000))+0.00170000
      RATES(8) = (ALGBRC(5) - STATES(8))/ALGBRC(19)
      ALGBRC(6) = 1.00000/(1.00000+EXP((STATES(1)+26.7000)/5.40000))
      ALGBRC(20) =  0.0410000*EXP(- (STATES(1)+47.0000)/12.0000 ** 2.00000)+0.0800000/(1.00000+EXP((STATES(1)+55.0000)/- 5.00000))+0.0150000/(1.00000+EXP((STATES(1)+75.0000)/25.0000))+0.00170000
      RATES(9) = (ALGBRC(6) - STATES(9))/ALGBRC(20)
      ALGBRC(21) = 1.00000/( 45.1600*EXP( 0.0357700*(STATES(1)+50.0000))+ 98.9000*EXP( - 0.100000*(STATES(1)+38.0000)))
      ALGBRC(8) = 1.00000/(1.00000+EXP((STATES(1)+10.6000)/- 11.4200))
      RATES(12) = (ALGBRC(8) - STATES(12))/ALGBRC(21)
      ALGBRC(22) =  0.350000*EXP(- (STATES(1)+70.0000)/15.0000 ** 2.00000)+0.0350000
      ALGBRC(9) = 1.00000/(1.00000+EXP((STATES(1)+45.3000)/6.88410))
      RATES(13) = (ALGBRC(9) - STATES(13))/ALGBRC(22)
      ALGBRC(23) =  3.70000*EXP(- (STATES(1)+70.0000)/30.0000 ** 2.00000)+0.0350000
      ALGBRC(10) = 1.00000/(1.00000+EXP((STATES(1)+45.3000)/6.88410))
      RATES(14) = (ALGBRC(10) - STATES(14))/ALGBRC(23)
      ALGBRC(24) = 10.0000/( 45.1600*EXP( 0.0357700*(STATES(1)+50.0000))+ 98.9000*EXP( - 0.100000*(STATES(1)+38.0000)))
      ALGBRC(11) = 1.00000/(1.00000+EXP((STATES(1)+11.5000)/- 11.8200))
      RATES(15) = (ALGBRC(11) - STATES(15))/ALGBRC(24)
      ALGBRC(25) = 1.00000/( 0.118850*EXP((STATES(1)+80.0000)/28.3700)+ 0.562300*EXP((STATES(1)+80.0000)/- 14.1900))
      ALGBRC(13) = 1.00000/(1.00000+EXP((STATES(1)+138.600)/10.4800))
      RATES(17) = (ALGBRC(13) - STATES(17))/ALGBRC(25)
      ALGBRC(29) =  (( CONSTS(1)*CONSTS(2))/CONSTS(3))*log(CONSTS(18)/STATES(11))
      ALGBRC(30) =  CONSTS(15)*STATES(12)*( CONSTS(16)*STATES(13)+ CONSTS(17)*STATES(14))*(STATES(1) - ALGBRC(29))
      ALGBRC(31) =  CONSTS(19)*STATES(15)*STATES(16)*(STATES(1) - ALGBRC(29))
      ALGBRC(32) = ( (48.0000/(EXP((STATES(1)+37.0000)/25.0000)+EXP((STATES(1)+37.0000)/- 25.0000))+10.0000)*0.00100000)/(1.00000+EXP((STATES(1) - (ALGBRC(29)+76.7700))/- 17.0000))+( CONSTS(20)*(STATES(1) - (ALGBRC(29)+1.73000)))/( (1.00000+EXP(( 1.61300*CONSTS(3)*(STATES(1) - (ALGBRC(29)+1.73000)))/( CONSTS(1)*CONSTS(2))))*(1.00000+EXP((CONSTS(18) - 0.998800)/- 0.124000)))
      ALGBRC(41) = ( (( (( CONSTS(27)*1.00000)/(1.00000+ 0.124500*EXP(( - 0.100000*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))+ 0.0365000*CONSTS(87)*EXP(( - STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))))*CONSTS(18))/(CONSTS(18)+CONSTS(28)))*1.00000)/(1.00000+CONSTS(29)/STATES(2) ** 1.50000)
      ALGBRC(34) =  CONSTS(21)*STATES(17)*CONSTS(86)*(STATES(1) - ALGBRC(29))
      ALGBRC(39) =  CONSTS(25)*(STATES(1) - ALGBRC(29))
      RATES(11) = ( - (ALGBRC(31)+ALGBRC(39)+ALGBRC(30)+ALGBRC(32)+ALGBRC(34)+ ALGBRC(41)*- 2.00000)*1.00000)/( CONSTS(60)*CONSTS(3))
      ALGBRC(26) =  (( CONSTS(1)*CONSTS(2))/CONSTS(3))*log(CONSTS(11)/STATES(2))
      ALGBRC(27) =  CONSTS(10)*STATES(3) ** 3.00000*STATES(4)*STATES(5)*(STATES(1) - ALGBRC(26))
      ALGBRC(43) = ( CONSTS(31)*( STATES(2) ** 3.00000*CONSTS(26)*EXP( 0.0374300*STATES(1)*CONSTS(33)) -  CONSTS(11) ** 3.00000*STATES(18)*EXP( 0.0374300*STATES(1)*(CONSTS(33) - 1.00000))))/(1.00000+ CONSTS(32)*( STATES(18)*CONSTS(11) ** 3.00000+ CONSTS(26)*STATES(2) ** 3.00000))
      ALGBRC(33) =  CONSTS(21)*STATES(17)*CONSTS(22)*(STATES(1) - ALGBRC(26))
      ALGBRC(37) =  CONSTS(23)*(STATES(1) - ALGBRC(26))
      RATES(2) = ( - (ALGBRC(27)+ALGBRC(37)+ ALGBRC(43)*3.00000+ ALGBRC(41)*3.00000+ALGBRC(33))*1.00000)/( CONSTS(60)*CONSTS(3))
      ALGBRC(46) = STATES(18)/CONSTS(43) ** CONSTS(48)
      ALGBRC(48) = STATES(24)/CONSTS(44) ** CONSTS(49)
      ALGBRC(50) = ( CONSTS(47)*( CONSTS(45)*ALGBRC(46) -  CONSTS(46)*ALGBRC(48)))/(1.00000+ALGBRC(46)+ALGBRC(48))
      ALGBRC(53) = (STATES(24) - STATES(23))/CONSTS(50)
      RATES(24) = ( ALGBRC(50)*CONSTS(60))/CONSTS(62) - ( ALGBRC(53)*CONSTS(61))/CONSTS(62)
      ALGBRC(28) =  CONSTS(12)*STATES(7)*( (0.900000+STATES(10)/10.0000)*STATES(8)+ (0.100000 - STATES(10)/10.0000)*STATES(9))*(STATES(1) - CONSTS(13))
      ALGBRC(44) =  CONSTS(34)*(STATES(19)+STATES(20))*(STATES(23) - STATES(6))
      ALGBRC(52) = (STATES(6) - STATES(18))/CONSTS(51)
      ALGBRC(56) = 1.00000/(1.00000+( CONSTS(67)*CONSTS(64))/CONSTS(64)+STATES(6) ** 2.00000)
      RATES(6) =  ALGBRC(56)*((( ALGBRC(44)*CONSTS(61))/CONSTS(63) - ( ALGBRC(52)*CONSTS(60))/CONSTS(63)) - ( ALGBRC(28)*1.00000)/( 2.00000*CONSTS(63)*CONSTS(3)))
      ALGBRC(57) = 1.00000/(1.00000+( CONSTS(68)*CONSTS(65))/CONSTS(65)+STATES(23) ** 2.00000)
      RATES(23) =  ALGBRC(57)*(ALGBRC(53) - ALGBRC(44))
      ALGBRC(42) = ( CONSTS(30)*STATES(18))/(STATES(18)+0.000400000)
      ALGBRC(36) =  (( 0.500000*CONSTS(1)*CONSTS(2))/CONSTS(3))*log(CONSTS(26)/STATES(18))
      ALGBRC(38) =  CONSTS(24)*(STATES(1) - ALGBRC(36))
      ALGBRC(55) =  CONSTS(56)*STATES(18)*(CONSTS(54) - CONSTS(52)) -  CONSTS(57)*CONSTS(52)
      ALGBRC(59) =  CONSTS(58)*STATES(18)*(CONSTS(55) - CONSTS(53)) -  CONSTS(59)*CONSTS(53)
      ALGBRC(61) = ALGBRC(55)+ALGBRC(59)
      ALGBRC(63) = 1.00000/(1.00000+( CONSTS(67)*CONSTS(64))/CONSTS(64)+STATES(18) ** 2.00000+( CONSTS(69)*CONSTS(66))/CONSTS(66)+STATES(18) ** 2.00000)
      RATES(18) =  ALGBRC(63)*(ALGBRC(52) - (ALGBRC(50)+ALGBRC(61)+( ((ALGBRC(38) -  2.00000*ALGBRC(43))+ALGBRC(42))*1.00000)/( 2.00000*CONSTS(60)*CONSTS(3))))
      ALGBRC(64) = TERNRY(STATES(30).LT.0.00000, 0.00000, TERNRY(STATES(30).GT.1.00000, 1.00000, STATES(30))
      ALGBRC(65) = TERNRY(STATES(31).LT.0.00000, 0.00000, TERNRY(STATES(31).GT.1.00000, 1.00000, STATES(31))
      RATES(31) =  CONSTS(79)*ALGBRC(64) -  CONSTS(80)*ALGBRC(65)
      ALGBRC(54) = TERNRY(STATES(26).LT.0.00000, 0.00000, TERNRY(STATES(26).GT.1.00000, 1.00000, STATES(26))
      ALGBRC(58) = TERNRY(STATES(27).LT.0.00000, 0.00000, TERNRY(STATES(27).GT.1.00000, 1.00000, STATES(27))
      ALGBRC(45) = TERNRY(ABS(STATES(25)).LT.1.00000e-07, 1.00000e-07, STATES(25))
      ALGBRC(67) =  CONSTS(75)*EXP(( ALGBRC(45)*CONSTS(76)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))
      ALGBRC(69) =  CONSTS(77)*EXP(( ALGBRC(45)*CONSTS(78)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))
      RATES(26) =  ALGBRC(69)*ALGBRC(58) -  4.00000*ALGBRC(67)*ALGBRC(54)
      ALGBRC(60) = TERNRY(STATES(28).LT.0.00000, 0.00000, TERNRY(STATES(28).GT.1.00000, 1.00000, STATES(28))
      RATES(27) = ( 2.00000*ALGBRC(69)*ALGBRC(60)+ 4.00000*ALGBRC(67)*ALGBRC(54)) -  ( 3.00000*ALGBRC(67)+ALGBRC(69))*ALGBRC(58)
      ALGBRC(62) = TERNRY(STATES(29).LT.0.00000, 0.00000, TERNRY(STATES(29).GT.1.00000, 1.00000, STATES(29))
      RATES(28) = ( 3.00000*ALGBRC(69)*ALGBRC(62)+ 3.00000*ALGBRC(67)*ALGBRC(58)) -  ( 2.00000*ALGBRC(67)+ 2.00000*ALGBRC(69))*ALGBRC(60)
      RATES(29) = ( 4.00000*ALGBRC(69)*ALGBRC(64)+ 2.00000*ALGBRC(67)*ALGBRC(60)) -  (ALGBRC(67)+ 3.00000*ALGBRC(69))*ALGBRC(62)
      RATES(30) = ( CONSTS(80)*ALGBRC(65)+ ALGBRC(67)*ALGBRC(62)) -  (CONSTS(79)+ 4.00000*ALGBRC(69))*ALGBRC(64)
      ALGBRC(68) =  CONSTS(81)*(ALGBRC(45) - CONSTS(82))
      ALGBRC(47) =  (( CONSTS(1)*CONSTS(2))/CONSTS(3))*log(CONSTS(18)/STATES(11))
      ALGBRC(49) = 1.00000/(CONSTS(72)+EXP(( CONSTS(73)*(ALGBRC(45) - ALGBRC(47))*CONSTS(3))/( CONSTS(1)*CONSTS(2))))
      ALGBRC(51) =  CONSTS(71)*ALGBRC(49)* ( CONSTS(18)*0.00100000) ** (1.0 / 2)*(ALGBRC(45) - ALGBRC(47))
      ALGBRC(66) = ( (( CONSTS(74)*ALGBRC(65)*ALGBRC(45)*CONSTS(3) ** 2.00000)/( CONSTS(1)*CONSTS(2)))*(STATES(11) -  CONSTS(18)*EXP(( - ALGBRC(45)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))))/(1.00000 - EXP(( - ALGBRC(45)*CONSTS(3))/( CONSTS(1)*CONSTS(2))))
      ALGBRC(70) = ( 1.00000e+06*(ALGBRC(45) - STATES(1)))/CONSTS(83)
      RATES(25) = - (ALGBRC(51)+ALGBRC(66)+ALGBRC(68)+ALGBRC(70))/CONSTS(70)
      ALGBRC(35) = ALGBRC(33)+ALGBRC(34)
      ALGBRC(40) = ALGBRC(37)+ALGBRC(38)+ALGBRC(39)
      ALGBRC(14) = 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(71) =  -1.00000*ALGBRC(70)*CONSTS(84)
      RATES(1) = - (ALGBRC(27)+ALGBRC(28)+ALGBRC(30)+ALGBRC(31)+ALGBRC(35)+ALGBRC(32)+ALGBRC(40)+ALGBRC(41)+ALGBRC(43)+ALGBRC(42)+ALGBRC(14)+ALGBRC(71))/CONSTS(4)
      RETURN
      END
      SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(7) = 1.00000/(1.00000+STATES(6)/0.0100000)
      ALGBRC(12) = 1.00000/(1.00000+EXP((STATES(1)+87.5000)/10.3000))
      ALGBRC(1) = 1.00000/(1.00000+EXP((STATES(1)+45.0000)/- 6.50000))
      ALGBRC(15) = 0.00136000/(( 0.320000*(STATES(1)+47.1300))/(1.00000 - EXP( - 0.100000*(STATES(1)+47.1300)))+ 0.0800000*EXP(- STATES(1)/11.0000))
      ALGBRC(2) = 1.00000/(1.00000+EXP((STATES(1)+76.1000)/6.07000))
      ALGBRC(16) = TERNRY(STATES(1).GE.- 40.0000,  0.000453700*(1.00000+EXP(- (STATES(1)+10.6600)/11.1000)), 0.00349000/( 0.135000*EXP(- (STATES(1)+80.0000)/6.80000)+ 3.56000*EXP( 0.0790000*STATES(1))+ 310000.*EXP( 0.350000*STATES(1))))
      ALGBRC(3) = 1.00000/(1.00000+EXP((STATES(1)+76.1000)/6.07000))
      ALGBRC(17) = TERNRY(STATES(1).GE.- 40.0000, ( 0.0116300*(1.00000+EXP( - 0.100000*(STATES(1)+32.0000))))/EXP( - 2.53500e-07*STATES(1)), 0.00349000/( ((STATES(1)+37.7800)/(1.00000+EXP( 0.311000*(STATES(1)+79.2300))))*( - 127140.*EXP( 0.244400*STATES(1)) -  3.47400e-05*EXP( - 0.0439100*STATES(1)))+( 0.121200*EXP( - 0.0105200*STATES(1)))/(1.00000+EXP( - 0.137800*(STATES(1)+40.1400)))))
      ALGBRC(4) = 1.00000/(1.00000+EXP((STATES(1)+15.3000)/- 5.00000))
      ALGBRC(18) =  0.00305000*EXP( - 0.00450000*STATES(1)+7.00000 ** 2.00000)+ 0.00105000*EXP( - 0.00200000*STATES(1) - 18.0000 ** 2.00000)+0.000250000
      ALGBRC(5) = 1.00000/(1.00000+EXP((STATES(1)+26.7000)/5.40000))
      ALGBRC(19) =  0.105000*EXP(- (STATES(1)+45.0000)/12.0000 ** 2.00000)+0.0400000/(1.00000+EXP((- STATES(1)+25.0000)/25.0000))+0.0150000/(1.00000+EXP((STATES(1)+75.0000)/25.0000))+0.00170000
      ALGBRC(6) = 1.00000/(1.00000+EXP((STATES(1)+26.7000)/5.40000))
      ALGBRC(20) =  0.0410000*EXP(- (STATES(1)+47.0000)/12.0000 ** 2.00000)+0.0800000/(1.00000+EXP((STATES(1)+55.0000)/- 5.00000))+0.0150000/(1.00000+EXP((STATES(1)+75.0000)/25.0000))+0.00170000
      ALGBRC(21) = 1.00000/( 45.1600*EXP( 0.0357700*(STATES(1)+50.0000))+ 98.9000*EXP( - 0.100000*(STATES(1)+38.0000)))
      ALGBRC(8) = 1.00000/(1.00000+EXP((STATES(1)+10.6000)/- 11.4200))
      ALGBRC(22) =  0.350000*EXP(- (STATES(1)+70.0000)/15.0000 ** 2.00000)+0.0350000
      ALGBRC(9) = 1.00000/(1.00000+EXP((STATES(1)+45.3000)/6.88410))
      ALGBRC(23) =  3.70000*EXP(- (STATES(1)+70.0000)/30.0000 ** 2.00000)+0.0350000
      ALGBRC(10) = 1.00000/(1.00000+EXP((STATES(1)+45.3000)/6.88410))
      ALGBRC(24) = 10.0000/( 45.1600*EXP( 0.0357700*(STATES(1)+50.0000))+ 98.9000*EXP( - 0.100000*(STATES(1)+38.0000)))
      ALGBRC(11) = 1.00000/(1.00000+EXP((STATES(1)+11.5000)/- 11.8200))
      ALGBRC(25) = 1.00000/( 0.118850*EXP((STATES(1)+80.0000)/28.3700)+ 0.562300*EXP((STATES(1)+80.0000)/- 14.1900))
      ALGBRC(13) = 1.00000/(1.00000+EXP((STATES(1)+138.600)/10.4800))
      ALGBRC(29) =  (( CONSTS(1)*CONSTS(2))/CONSTS(3))*log(CONSTS(18)/STATES(11))
      ALGBRC(30) =  CONSTS(15)*STATES(12)*( CONSTS(16)*STATES(13)+ CONSTS(17)*STATES(14))*(STATES(1) - ALGBRC(29))
      ALGBRC(31) =  CONSTS(19)*STATES(15)*STATES(16)*(STATES(1) - ALGBRC(29))
      ALGBRC(32) = ( (48.0000/(EXP((STATES(1)+37.0000)/25.0000)+EXP((STATES(1)+37.0000)/- 25.0000))+10.0000)*0.00100000)/(1.00000+EXP((STATES(1) - (ALGBRC(29)+76.7700))/- 17.0000))+( CONSTS(20)*(STATES(1) - (ALGBRC(29)+1.73000)))/( (1.00000+EXP(( 1.61300*CONSTS(3)*(STATES(1) - (ALGBRC(29)+1.73000)))/( CONSTS(1)*CONSTS(2))))*(1.00000+EXP((CONSTS(18) - 0.998800)/- 0.124000)))
      ALGBRC(41) = ( (( (( CONSTS(27)*1.00000)/(1.00000+ 0.124500*EXP(( - 0.100000*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))+ 0.0365000*CONSTS(87)*EXP(( - STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))))*CONSTS(18))/(CONSTS(18)+CONSTS(28)))*1.00000)/(1.00000+CONSTS(29)/STATES(2) ** 1.50000)
      ALGBRC(34) =  CONSTS(21)*STATES(17)*CONSTS(86)*(STATES(1) - ALGBRC(29))
      ALGBRC(39) =  CONSTS(25)*(STATES(1) - ALGBRC(29))
      ALGBRC(26) =  (( CONSTS(1)*CONSTS(2))/CONSTS(3))*log(CONSTS(11)/STATES(2))
      ALGBRC(27) =  CONSTS(10)*STATES(3) ** 3.00000*STATES(4)*STATES(5)*(STATES(1) - ALGBRC(26))
      ALGBRC(43) = ( CONSTS(31)*( STATES(2) ** 3.00000*CONSTS(26)*EXP( 0.0374300*STATES(1)*CONSTS(33)) -  CONSTS(11) ** 3.00000*STATES(18)*EXP( 0.0374300*STATES(1)*(CONSTS(33) - 1.00000))))/(1.00000+ CONSTS(32)*( STATES(18)*CONSTS(11) ** 3.00000+ CONSTS(26)*STATES(2) ** 3.00000))
      ALGBRC(33) =  CONSTS(21)*STATES(17)*CONSTS(22)*(STATES(1) - ALGBRC(26))
      ALGBRC(37) =  CONSTS(23)*(STATES(1) - ALGBRC(26))
      ALGBRC(46) = STATES(18)/CONSTS(43) ** CONSTS(48)
      ALGBRC(48) = STATES(24)/CONSTS(44) ** CONSTS(49)
      ALGBRC(50) = ( CONSTS(47)*( CONSTS(45)*ALGBRC(46) -  CONSTS(46)*ALGBRC(48)))/(1.00000+ALGBRC(46)+ALGBRC(48))
      ALGBRC(53) = (STATES(24) - STATES(23))/CONSTS(50)
      ALGBRC(28) =  CONSTS(12)*STATES(7)*( (0.900000+STATES(10)/10.0000)*STATES(8)+ (0.100000 - STATES(10)/10.0000)*STATES(9))*(STATES(1) - CONSTS(13))
      ALGBRC(44) =  CONSTS(34)*(STATES(19)+STATES(20))*(STATES(23) - STATES(6))
      ALGBRC(52) = (STATES(6) - STATES(18))/CONSTS(51)
      ALGBRC(56) = 1.00000/(1.00000+( CONSTS(67)*CONSTS(64))/CONSTS(64)+STATES(6) ** 2.00000)
      ALGBRC(57) = 1.00000/(1.00000+( CONSTS(68)*CONSTS(65))/CONSTS(65)+STATES(23) ** 2.00000)
      ALGBRC(42) = ( CONSTS(30)*STATES(18))/(STATES(18)+0.000400000)
      ALGBRC(36) =  (( 0.500000*CONSTS(1)*CONSTS(2))/CONSTS(3))*log(CONSTS(26)/STATES(18))
      ALGBRC(38) =  CONSTS(24)*(STATES(1) - ALGBRC(36))
      ALGBRC(55) =  CONSTS(56)*STATES(18)*(CONSTS(54) - CONSTS(52)) -  CONSTS(57)*CONSTS(52)
      ALGBRC(59) =  CONSTS(58)*STATES(18)*(CONSTS(55) - CONSTS(53)) -  CONSTS(59)*CONSTS(53)
      ALGBRC(61) = ALGBRC(55)+ALGBRC(59)
      ALGBRC(63) = 1.00000/(1.00000+( CONSTS(67)*CONSTS(64))/CONSTS(64)+STATES(18) ** 2.00000+( CONSTS(69)*CONSTS(66))/CONSTS(66)+STATES(18) ** 2.00000)
      ALGBRC(64) = TERNRY(STATES(30).LT.0.00000, 0.00000, TERNRY(STATES(30).GT.1.00000, 1.00000, STATES(30))
      ALGBRC(65) = TERNRY(STATES(31).LT.0.00000, 0.00000, TERNRY(STATES(31).GT.1.00000, 1.00000, STATES(31))
      ALGBRC(54) = TERNRY(STATES(26).LT.0.00000, 0.00000, TERNRY(STATES(26).GT.1.00000, 1.00000, STATES(26))
      ALGBRC(58) = TERNRY(STATES(27).LT.0.00000, 0.00000, TERNRY(STATES(27).GT.1.00000, 1.00000, STATES(27))
      ALGBRC(45) = TERNRY(ABS(STATES(25)).LT.1.00000e-07, 1.00000e-07, STATES(25))
      ALGBRC(67) =  CONSTS(75)*EXP(( ALGBRC(45)*CONSTS(76)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))
      ALGBRC(69) =  CONSTS(77)*EXP(( ALGBRC(45)*CONSTS(78)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))
      ALGBRC(60) = TERNRY(STATES(28).LT.0.00000, 0.00000, TERNRY(STATES(28).GT.1.00000, 1.00000, STATES(28))
      ALGBRC(62) = TERNRY(STATES(29).LT.0.00000, 0.00000, TERNRY(STATES(29).GT.1.00000, 1.00000, STATES(29))
      ALGBRC(68) =  CONSTS(81)*(ALGBRC(45) - CONSTS(82))
      ALGBRC(47) =  (( CONSTS(1)*CONSTS(2))/CONSTS(3))*log(CONSTS(18)/STATES(11))
      ALGBRC(49) = 1.00000/(CONSTS(72)+EXP(( CONSTS(73)*(ALGBRC(45) - ALGBRC(47))*CONSTS(3))/( CONSTS(1)*CONSTS(2))))
      ALGBRC(51) =  CONSTS(71)*ALGBRC(49)* ( CONSTS(18)*0.00100000) ** (1.0 / 2)*(ALGBRC(45) - ALGBRC(47))
      ALGBRC(66) = ( (( CONSTS(74)*ALGBRC(65)*ALGBRC(45)*CONSTS(3) ** 2.00000)/( CONSTS(1)*CONSTS(2)))*(STATES(11) -  CONSTS(18)*EXP(( - ALGBRC(45)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))))/(1.00000 - EXP(( - ALGBRC(45)*CONSTS(3))/( CONSTS(1)*CONSTS(2))))
      ALGBRC(70) = ( 1.00000e+06*(ALGBRC(45) - STATES(1)))/CONSTS(83)
      ALGBRC(35) = ALGBRC(33)+ALGBRC(34)
      ALGBRC(40) = ALGBRC(37)+ALGBRC(38)+ALGBRC(39)
      ALGBRC(14) = 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(71) =  -1.00000*ALGBRC(70)*CONSTS(84)
      RETURN
      END
      REAL FUNCTION TERNRY(TEST, VALA, VALB)
      LOGICAL TEST
      REAL VALA, VALB
      IF (TEST) THEN
        TERNRY = VALA
      ELSE
        TERNRY = VALB
      ENDIF
      RETURN
      END