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 85 entries in the algebraic variable array.
C There are a total of 25 entries in each of the rate and state variable arrays.
C There are a total of 81 entries in the constant variable array.
C
C
C VOI is time in component environment (ms).
C STATES(1) is V in component cell (millivolt).
C CONSTS(1) is R in component cell (joule_per_kilomole_kelvin).
C CONSTS(2) is T in component cell (kelvin).
C CONSTS(3) is F in component cell (coulomb_per_mole).
C ALGBRC(4) is I_st in component cell (microA_per_microF).
C ALGBRC(29) is i_Na in component fast_sodium_current (microA_per_microF).
C ALGBRC(46) is i_Ca_L in component L_type_Ca_channel (microA_per_microF).
C ALGBRC(68) is i_Ca_T in component T_type_Ca_channel (microA_per_microF).
C ALGBRC(52) is i_Kr in component rapid_delayed_rectifier_potassium_current (microA_per_microF).
C ALGBRC(50) is i_Ks in component slow_delayed_rectifier_potassium_current (microA_per_microF).
C ALGBRC(61) is i_K_Na in component sodium_activated_potassium_current (microA_per_microF).
C ALGBRC(62) is i_K_ATP in component ATP_sensitive_potassium_current (microA_per_microF).
C ALGBRC(64) is i_to in component transient_outward_current (microA_per_microF).
C ALGBRC(77) is i_NaCa in component Na_Ca_exchanger (microA_per_microF).
C ALGBRC(56) is i_K1 in component time_independent_potassium_current (microA_per_microF).
C ALGBRC(58) is i_Kp in component plateau_potassium_current (microA_per_microF).
C ALGBRC(65) is i_p_Ca in component sarcolemmal_calcium_pump (microA_per_microF).
C ALGBRC(66) is i_Na_b in component sodium_background_current (microA_per_microF).
C ALGBRC(69) is i_Ca_b in component calcium_background_current (microA_per_microF).
C ALGBRC(71) is i_NaK in component sodium_potassium_pump (microA_per_microF).
C ALGBRC(76) is i_ns_Ca in component non_specific_calcium_activated_current (microA_per_microF).
C ALGBRC(78) is dVdt in component cell (microA_per_microF).
C CONSTS(4) is stim_start in component cell (ms).
C CONSTS(5) is stim_end in component cell (ms).
C CONSTS(6) is stim_period in component cell (ms).
C CONSTS(7) is stim_duration in component cell (ms).
C CONSTS(8) is stim_amplitude in component cell (microA_per_microF).
C ALGBRC(18) is E_Na in component fast_sodium_current (millivolt).
C CONSTS(9) is g_Na in component fast_sodium_current (milliS_per_microF).
C STATES(2) is Nai in component ionic_concentrations (millimolar).
C CONSTS(10) is Nao in component ionic_concentrations (millimolar).
C STATES(3) is m in component fast_sodium_current_m_gate (dimensionless).
C STATES(4) is h in component fast_sodium_current_h_gate (dimensionless).
C STATES(5) is j in component fast_sodium_current_j_gate (dimensionless).
C ALGBRC(15) is alpha_m in component fast_sodium_current_m_gate (per_ms).
C ALGBRC(28) is beta_m in component fast_sodium_current_m_gate (per_ms).
C CONSTS(11) is delta_m in component fast_sodium_current_m_gate (millivolt).
C ALGBRC(1) is E0_m in component fast_sodium_current_m_gate (millivolt).
C ALGBRC(2) is alpha_h in component fast_sodium_current_h_gate (per_ms).
C ALGBRC(16) is beta_h in component fast_sodium_current_h_gate (per_ms).
C ALGBRC(3) is alpha_j in component fast_sodium_current_j_gate (per_ms).
C ALGBRC(17) is beta_j in component fast_sodium_current_j_gate (per_ms).
C ALGBRC(43) is i_CaCa in component L_type_Ca_channel (microA_per_microF).
C ALGBRC(45) is i_CaK in component L_type_Ca_channel (microA_per_microF).
C ALGBRC(44) is i_CaNa in component L_type_Ca_channel (microA_per_microF).
C CONSTS(12) is gamma_Nai in component L_type_Ca_channel (dimensionless).
C CONSTS(13) is gamma_Nao in component L_type_Ca_channel (dimensionless).
C CONSTS(14) is gamma_Ki in component L_type_Ca_channel (dimensionless).
C CONSTS(15) is gamma_Ko in component L_type_Ca_channel (dimensionless).
C CONSTS(16) is gamma_Cai in component L_type_Ca_channel (dimensionless).
C CONSTS(17) is gamma_Cao in component L_type_Ca_channel (dimensionless).
C ALGBRC(34) is I_CaCa in component L_type_Ca_channel (microA_per_microF).
C ALGBRC(41) is I_CaK in component L_type_Ca_channel (microA_per_microF).
C ALGBRC(39) is I_CaNa in component L_type_Ca_channel (microA_per_microF).
C CONSTS(18) is P_Ca in component L_type_Ca_channel (litre_per_farad_millisecond).
C CONSTS(19) is P_Na in component L_type_Ca_channel (litre_per_farad_millisecond).
C CONSTS(20) is P_K in component L_type_Ca_channel (litre_per_farad_millisecond).
C STATES(6) is Cai in component calcium_dynamics (millimolar).
C CONSTS(21) is Cao in component calcium_dynamics (millimolar).
C CONSTS(22) is Ko in component ionic_concentrations (millimolar).
C STATES(7) is Ki in component ionic_concentrations (millimolar).
C STATES(8) is d in component L_type_Ca_channel_d_gate (dimensionless).
C STATES(9) is f in component L_type_Ca_channel_f_gate (dimensionless).
C ALGBRC(42) is f_Ca in component L_type_Ca_channel_f_Ca_gate (dimensionless).
C ALGBRC(35) is alpha_d in component L_type_Ca_channel_d_gate (per_ms).
C ALGBRC(40) is beta_d in component L_type_Ca_channel_d_gate (per_ms).
C ALGBRC(19) is d_infinity in component L_type_Ca_channel_d_gate (dimensionless).
C ALGBRC(30) is tau_d in component L_type_Ca_channel_d_gate (ms).
C ALGBRC(5) is E0_d in component L_type_Ca_channel_d_gate (millivolt).
C ALGBRC(31) is alpha_f in component L_type_Ca_channel_f_gate (per_ms).
C ALGBRC(36) is beta_f in component L_type_Ca_channel_f_gate (per_ms).
C ALGBRC(6) is f_infinity in component L_type_Ca_channel_f_gate (dimensionless).
C ALGBRC(20) is tau_f in component L_type_Ca_channel_f_gate (ms).
C CONSTS(23) is Km_Ca in component L_type_Ca_channel_f_Ca_gate (millimolar).
C CONSTS(24) is g_CaT in component T_type_Ca_channel (milliS_per_microF).
C ALGBRC(67) is E_Ca in component calcium_background_current (millivolt).
C STATES(10) is b in component T_type_Ca_channel_b_gate (dimensionless).
C STATES(11) is g in component T_type_Ca_channel_g_gate (dimensionless).
C ALGBRC(7) is b_inf in component T_type_Ca_channel_b_gate (dimensionless).
C ALGBRC(21) is tau_b in component T_type_Ca_channel_b_gate (ms).
C ALGBRC(8) is g_inf in component T_type_Ca_channel_g_gate (dimensionless).
C ALGBRC(22) is tau_g in component T_type_Ca_channel_g_gate (ms).
C CONSTS(70) is g_Kr in component rapid_delayed_rectifier_potassium_current (milliS_per_microF).
C CONSTS(25) is G_Kr in component rapid_delayed_rectifier_potassium_current (milliS_per_microF).
C ALGBRC(47) is Rect in component rapid_delayed_rectifier_potassium_current (dimensionless).
C ALGBRC(51) is E_K in component time_independent_potassium_current (millivolt).
C STATES(12) is xr in component rapid_delayed_rectifier_potassium_current_xr_gate (dimensionless).
C ALGBRC(9) is xr_infinity in component rapid_delayed_rectifier_potassium_current_xr_gate (dimensionless).
C ALGBRC(23) is tau_xr in component rapid_delayed_rectifier_potassium_current_xr_gate (ms).
C ALGBRC(49) is g_Ks in component slow_delayed_rectifier_potassium_current (milliS_per_microF).
C CONSTS(26) is G_Ks in component slow_delayed_rectifier_potassium_current (milliS_per_microF).
C ALGBRC(48) is E_Ks in component slow_delayed_rectifier_potassium_current (millivolt).
C CONSTS(27) is PNaK in component slow_delayed_rectifier_potassium_current (dimensionless).
C STATES(13) is xs1 in component slow_delayed_rectifier_potassium_current_xs1_gate (dimensionless).
C STATES(14) is xs2 in component slow_delayed_rectifier_potassium_current_xs2_gate (dimensionless).
C ALGBRC(10) is xs1_infinity in component slow_delayed_rectifier_potassium_current_xs1_gate (dimensionless).
C ALGBRC(24) is tau_xs1 in component slow_delayed_rectifier_potassium_current_xs1_gate (ms).
C ALGBRC(11) is xs2_infinity in component slow_delayed_rectifier_potassium_current_xs2_gate (dimensionless).
C ALGBRC(25) is tau_xs2 in component slow_delayed_rectifier_potassium_current_xs2_gate (ms).
C CONSTS(71) is g_K1 in component time_independent_potassium_current (milliS_per_microF).
C CONSTS(28) is G_K1 in component time_independent_potassium_current (milliS_per_microF).
C ALGBRC(55) is K1_infinity in component time_independent_potassium_current_K1_gate (dimensionless).
C ALGBRC(53) is alpha_K1 in component time_independent_potassium_current_K1_gate (per_ms).
C ALGBRC(54) is beta_K1 in component time_independent_potassium_current_K1_gate (per_ms).
C CONSTS(29) is g_Kp in component plateau_potassium_current (milliS_per_microF).
C ALGBRC(57) is Kp in component plateau_potassium_current (dimensionless).
C CONSTS(30) is g_K_Na in component sodium_activated_potassium_current (milliS_per_microF).
C CONSTS(31) is nKNa in component sodium_activated_potassium_current (dimensionless).
C ALGBRC(59) is pona in component sodium_activated_potassium_current (dimensionless).
C ALGBRC(60) is pov in component sodium_activated_potassium_current (dimensionless).
C CONSTS(32) is kdKNa in component sodium_activated_potassium_current (millimolar).
C CONSTS(72) is g_K_ATP in component ATP_sensitive_potassium_current (milliS_per_microF).
C CONSTS(33) is i_K_ATP_on in component ATP_sensitive_potassium_current (dimensionless).
C CONSTS(34) is nATP in component ATP_sensitive_potassium_current (dimensionless).
C CONSTS(35) is nicholsarea in component ATP_sensitive_potassium_current (dimensionless).
C CONSTS(36) is ATPi in component ATP_sensitive_potassium_current (millimolar).
C CONSTS(37) is hATP in component ATP_sensitive_potassium_current (dimensionless).
C CONSTS(38) is kATP in component ATP_sensitive_potassium_current (millimolar).
C CONSTS(78) is pATP in component ATP_sensitive_potassium_current (dimensionless).
C CONSTS(80) is GKbaraATP in component ATP_sensitive_potassium_current (milliS_per_microF).
C CONSTS(73) is g_to in component transient_outward_current (milliS_per_microF).
C ALGBRC(63) is rvdv in component transient_outward_current (dimensionless).
C STATES(15) is zdv in component transient_outward_current_zdv_gate (dimensionless).
C STATES(16) is ydv in component transient_outward_current_ydv_gate (dimensionless).
C ALGBRC(12) is alpha_zdv in component transient_outward_current_zdv_gate (per_ms).
C ALGBRC(26) is beta_zdv in component transient_outward_current_zdv_gate (per_ms).
C ALGBRC(32) is tau_zdv in component transient_outward_current_zdv_gate (ms).
C ALGBRC(37) is zdv_ss in component transient_outward_current_zdv_gate (dimensionless).
C ALGBRC(13) is alpha_ydv in component transient_outward_current_ydv_gate (per_ms).
C ALGBRC(27) is beta_ydv in component transient_outward_current_ydv_gate (per_ms).
C ALGBRC(33) is tau_ydv in component transient_outward_current_ydv_gate (ms).
C ALGBRC(38) is ydv_ss in component transient_outward_current_ydv_gate (dimensionless).
C CONSTS(39) is K_mpCa in component sarcolemmal_calcium_pump (millimolar).
C CONSTS(40) is I_pCa in component sarcolemmal_calcium_pump (microA_per_microF).
C CONSTS(41) is g_Nab in component sodium_background_current (milliS_per_microF).
C CONSTS(42) is g_Cab in component calcium_background_current (milliS_per_microF).
C CONSTS(43) is I_NaK in component sodium_potassium_pump (microA_per_microF).
C ALGBRC(70) is f_NaK in component sodium_potassium_pump (dimensionless).
C CONSTS(44) is K_mNai in component sodium_potassium_pump (millimolar).
C CONSTS(45) is K_mKo in component sodium_potassium_pump (millimolar).
C CONSTS(74) is sigma in component sodium_potassium_pump (dimensionless).
C ALGBRC(74) is i_ns_Na in component non_specific_calcium_activated_current (microA_per_microF).
C ALGBRC(75) is i_ns_K in component non_specific_calcium_activated_current (microA_per_microF).
C CONSTS(75) is P_ns_Ca in component non_specific_calcium_activated_current (litre_per_farad_millisecond).
C ALGBRC(72) is I_ns_Na in component non_specific_calcium_activated_current (microA_per_microF).
C ALGBRC(73) is I_ns_K in component non_specific_calcium_activated_current (microA_per_microF).
C CONSTS(46) is K_m_ns_Ca in component non_specific_calcium_activated_current (millimolar).
C CONSTS(47) is c1 in component Na_Ca_exchanger (microA_per_microF).
C CONSTS(48) is c2 in component Na_Ca_exchanger (dimensionless).
C CONSTS(49) is gamma in component Na_Ca_exchanger (dimensionless).
C ALGBRC(82) is i_rel in component calcium_dynamics (millimolar_per_ms).
C ALGBRC(83) is i_up in component calcium_dynamics (millimolar_per_ms).
C ALGBRC(84) is i_leak in component calcium_dynamics (millimolar_per_ms).
C ALGBRC(85) is i_tr in component calcium_dynamics (millimolar_per_ms).
C ALGBRC(81) is G_rel in component calcium_dynamics (per_ms).
C ALGBRC(14) is G_rel_Viswanathan in component calcium_dynamics (per_ms).
C CONSTS(50) is G_rel_max in component calcium_dynamics (per_ms).
C CONSTS(51) is G_rel_overload in component calcium_dynamics (per_ms).
C CONSTS(52) is tau_tr in component calcium_dynamics (ms).
C CONSTS(53) is K_mrel in component calcium_dynamics (millimolar).
C CONSTS(54) is delta_Ca_ith in component calcium_dynamics (millimolar).
C CONSTS(55) is CSQN_max in component calcium_dynamics (millimolar).
C CONSTS(56) is K_mCSQN in component calcium_dynamics (millimolar).
C CONSTS(57) is K_mup in component calcium_dynamics (millimolar).
C CONSTS(76) is K_leak in component calcium_dynamics (per_ms).
C CONSTS(58) is I_up in component calcium_dynamics (millimolar_per_ms).
C CONSTS(59) is Ca_NSR_max in component calcium_dynamics (millimolar).
C STATES(17) is Ca_JSR in component calcium_dynamics (millimolar).
C STATES(18) is Ca_NSR in component calcium_dynamics (millimolar).
C CONSTS(77) is V_myo in component geometry (micro_litre).
C CONSTS(60) is A_cap in component geometry (cm2).
C CONSTS(79) is V_JSR in component geometry (micro_litre).
C CONSTS(81) is V_NSR in component geometry (micro_litre).
C CONSTS(61) is K_mTn in component calcium_dynamics (millimolar).
C CONSTS(62) is K_mCMDN in component calcium_dynamics (millimolar).
C CONSTS(63) is Tn_max in component calcium_dynamics (millimolar).
C CONSTS(64) is CMDN_max in component calcium_dynamics (millimolar).
C STATES(19) is APtrack in component calcium_dynamics (dimensionless).
C STATES(20) is APtrack2 in component calcium_dynamics (dimensionless).
C STATES(21) is APtrack3 in component calcium_dynamics (dimensionless).
C STATES(22) is Cainfluxtrack in component calcium_dynamics (millimolar).
C STATES(23) is OVRLDtrack in component calcium_dynamics (dimensionless).
C STATES(24) is OVRLDtrack2 in component calcium_dynamics (dimensionless).
C STATES(25) is OVRLDtrack3 in component calcium_dynamics (dimensionless).
C CONSTS(65) is CSQNthresh in component calcium_dynamics (dimensionless).
C CONSTS(66) is Logicthresh in component calcium_dynamics (dimensionless).
C ALGBRC(79) is RyRopen in component calcium_dynamics (dimensionless).
C ALGBRC(80) is RyRclose in component calcium_dynamics (dimensionless).
C CONSTS(67) is preplength in component geometry (mm).
C CONSTS(68) is radius in component geometry (mm).
C CONSTS(69) is volume in component geometry (micro_litre).
C RATES(1) is d/dt V in component cell (millivolt).
C RATES(3) is d/dt m in component fast_sodium_current_m_gate (dimensionless).
C RATES(4) is d/dt h in component fast_sodium_current_h_gate (dimensionless).
C RATES(5) is d/dt j in component fast_sodium_current_j_gate (dimensionless).
C RATES(8) is d/dt d in component L_type_Ca_channel_d_gate (dimensionless).
C RATES(9) is d/dt f in component L_type_Ca_channel_f_gate (dimensionless).
C RATES(10) is d/dt b in component T_type_Ca_channel_b_gate (dimensionless).
C RATES(11) is d/dt g in component T_type_Ca_channel_g_gate (dimensionless).
C RATES(12) is d/dt xr in component rapid_delayed_rectifier_potassium_current_xr_gate (dimensionless).
C RATES(13) is d/dt xs1 in component slow_delayed_rectifier_potassium_current_xs1_gate (dimensionless).
C RATES(14) is d/dt xs2 in component slow_delayed_rectifier_potassium_current_xs2_gate (dimensionless).
C RATES(15) is d/dt zdv in component transient_outward_current_zdv_gate (dimensionless).
C RATES(16) is d/dt ydv in component transient_outward_current_ydv_gate (dimensionless).
C RATES(19) is d/dt APtrack in component calcium_dynamics (dimensionless).
C RATES(20) is d/dt APtrack2 in component calcium_dynamics (dimensionless).
C RATES(21) is d/dt APtrack3 in component calcium_dynamics (dimensionless).
C RATES(22) is d/dt Cainfluxtrack in component calcium_dynamics (millimolar).
C RATES(23) is d/dt OVRLDtrack in component calcium_dynamics (dimensionless).
C RATES(24) is d/dt OVRLDtrack2 in component calcium_dynamics (dimensionless).
C RATES(25) is d/dt OVRLDtrack3 in component calcium_dynamics (dimensionless).
C RATES(17) is d/dt Ca_JSR in component calcium_dynamics (millimolar).
C RATES(18) is d/dt Ca_NSR in component calcium_dynamics (millimolar).
C RATES(6) is d/dt Cai in component calcium_dynamics (millimolar).
C RATES(2) is d/dt Nai in component ionic_concentrations (millimolar).
C RATES(7) is d/dt Ki in component ionic_concentrations (millimolar).
C
      SUBROUTINE initConsts(CONSTS, RATES, STATES)
      REAL CONSTS(*), RATES(*), STATES(*)
      STATES(1) = -85.2132259244751
      CONSTS(1) = 8314
      CONSTS(2) = 310
      CONSTS(3) = 96485
      CONSTS(4) = 100
      CONSTS(5) = 9000000
      CONSTS(6) = 1000
      CONSTS(7) = 2
      CONSTS(8) = -25.5
      CONSTS(9) = 16
      STATES(2) = 13.2866380281237
      CONSTS(10) = 140
      STATES(3) = 0.00149150667653466
      STATES(4) = 0.98560077662336
      STATES(5) = 0.990900988999238
      CONSTS(11) = 1e-5
      CONSTS(12) = 0.75
      CONSTS(13) = 0.75
      CONSTS(14) = 0.75
      CONSTS(15) = 0.75
      CONSTS(16) = 1
      CONSTS(17) = 0.341
      CONSTS(18) = 0.00054
      CONSTS(19) = 6.75e-7
      CONSTS(20) = 1.93e-7
      STATES(6) = 0.000115992251742132
      CONSTS(21) = 1.8
      CONSTS(22) = 5.4
      STATES(7) = 141.139802226909
      STATES(8) = 5.82475230952394e-06
      STATES(9) = 0.997765766850281
      CONSTS(23) = 0.0006
      CONSTS(24) = 0.056
      STATES(10) = 0.00087306703919284
      STATES(11) = 0.964644023670238
      CONSTS(25) = 0.02614
      STATES(12) = 0.000204664013529778
      CONSTS(26) = 0.433
      CONSTS(27) = 0.01833
      STATES(13) = 0.00661079879810885
      STATES(14) = 0.0302962988340647
      CONSTS(28) = 0.75
      CONSTS(29) = 0.00552
      CONSTS(30) = 0.12848
      CONSTS(31) = 2.8
      CONSTS(32) = 66
      CONSTS(33) = 1
      CONSTS(34) = 0.24
      CONSTS(35) = 5e-5
      CONSTS(36) = 3
      CONSTS(37) = 2
      CONSTS(38) = 0.00025
      STATES(15) = 0.0144611004317138
      STATES(16) = 0.999945263077137
      CONSTS(39) = 0.0005
      CONSTS(40) = 1.15
      CONSTS(41) = 0.004
      CONSTS(42) = 0.003016
      CONSTS(43) = 2.25
      CONSTS(44) = 10
      CONSTS(45) = 1.5
      CONSTS(46) = 0.0012
      CONSTS(47) = 0.00025
      CONSTS(48) = 0.0001
      CONSTS(49) = 0.15
      CONSTS(50) = 60
      CONSTS(51) = 4
      CONSTS(52) = 180
      CONSTS(53) = 0.0008
      CONSTS(54) = 0.00018
      CONSTS(55) = 10
      CONSTS(56) = 0.8
      CONSTS(57) = 0.00092
      CONSTS(58) = 0.00875
      CONSTS(59) = 15
      STATES(17) = 1.10786985002835
      STATES(18) = 1.74647588622419
      CONSTS(60) = 0.0001534
      CONSTS(61) = 0.0005
      CONSTS(62) = 0.00238
      CONSTS(63) = 0.07
      CONSTS(64) = 0.05
      STATES(19) = 1.05741719313009e-195
      STATES(20) = 5.84534012971144e-195
      STATES(21) = 0.000129513799736416
      STATES(22) = 2.82367737273297e-196
      STATES(23) = 0
      STATES(24) = 0
      STATES(25) = 0
      CONSTS(65) = 0.7
      CONSTS(66) = 0.98
      CONSTS(67) = 0.1
      CONSTS(68) = 0.011
      CONSTS(69) =   3.14159265358979*CONSTS(67)*CONSTS(68) ** 2.00000
      CONSTS(70) =  CONSTS(25)* (CONSTS(22)/5.40000) ** (1.0 / 2)
      CONSTS(71) =  CONSTS(28)* (CONSTS(22)/5.40000) ** (1.0 / 2)
      CONSTS(72) = ( CONSTS(33)*0.000193000)/CONSTS(35)
      CONSTS(73) =  0.00000*0.500000
      CONSTS(74) =  (1.00000/7.00000)*(EXP(CONSTS(10)/67.3000) - 1.00000)
      CONSTS(75) = 1.75000e-07
      CONSTS(76) = CONSTS(58)/CONSTS(59)
      CONSTS(77) =  0.680000*CONSTS(69)
      CONSTS(78) = 1.00000/(1.00000+CONSTS(36)/CONSTS(38) ** CONSTS(37))
      CONSTS(79) =  0.00480000*CONSTS(69)
      CONSTS(80) =  CONSTS(72)*CONSTS(78)*CONSTS(22)/4.00000 ** CONSTS(34)
      CONSTS(81) =  0.0552000*CONSTS(69)
      RETURN
      END
      SUBROUTINE computeRates(VOI, CONSTS,  RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      RATES(20) = TERNRY(STATES(19).LT.0.200000.AND.STATES(19).GT.0.180000,  100.000*(1.00000 - STATES(20)) -  0.500000*STATES(20),  - 0.500000*STATES(20))
      RATES(21) = TERNRY(STATES(19).LT.0.200000.AND.STATES(19).GT.0.180000,  100.000*(1.00000 - STATES(21)) -  0.500000*STATES(21),  - 0.0100000*STATES(21))
      RATES(23) = TERNRY(1.00000/(1.00000+CONSTS(56)/STATES(17)).GT.CONSTS(65).AND.STATES(25).LT.0.370000.AND.STATES(21).LT.0.370000,  50.0000*(1.00000 - STATES(23)),  - 0.500000*STATES(23))
      RATES(24) = TERNRY(STATES(23).GT.CONSTS(66).AND.STATES(24).LT.CONSTS(66),  50.0000*(1.00000 - STATES(24)),  - 0.500000*STATES(24))
      RATES(25) = TERNRY(STATES(23).GT.CONSTS(66).AND.STATES(25).LT.CONSTS(66),  50.0000*(1.00000 - STATES(25)),  - 0.0100000*STATES(25))
      ALGBRC(2) = TERNRY(STATES(1).LT.- 40.0000,  0.135000*EXP((80.0000+STATES(1))/- 6.80000), 0.00000)
      ALGBRC(16) = TERNRY(STATES(1).LT.- 40.0000,  3.56000*EXP( 0.0790000*STATES(1))+ 310000.*EXP( 0.350000*STATES(1)), 1.00000/( 0.130000*(1.00000+EXP((STATES(1)+10.6600)/- 11.1000))))
      RATES(4) =  ALGBRC(2)*(1.00000 - STATES(4)) -  ALGBRC(16)*STATES(4)
      ALGBRC(3) = TERNRY(STATES(1).LT.- 40.0000, ( - ( 127140.*EXP( 0.244400*STATES(1))+ 3.47400e-05*EXP( - 0.0439100*STATES(1)))*(STATES(1)+37.7800))/(1.00000+EXP( 0.311000*(STATES(1)+79.2300))), 0.00000)
      ALGBRC(17) = TERNRY(STATES(1).LT.- 40.0000, ( 0.121200*EXP( - 0.0105200*STATES(1)))/(1.00000+EXP( - 0.137800*(STATES(1)+40.1400))), ( 0.300000*EXP( - 2.53500e-07*STATES(1)))/(1.00000+EXP( - 0.100000*(STATES(1)+32.0000))))
      RATES(5) =  ALGBRC(3)*(1.00000 - STATES(5)) -  ALGBRC(17)*STATES(5)
      ALGBRC(7) = 1.00000/(1.00000+EXP(- (STATES(1)+50.0000)/5.00000))
      ALGBRC(21) = 5.00000/( 1.06800*EXP((STATES(1)+16.3000)/30.0000)+ 1.06800*EXP(- (STATES(1)+16.3000)/30.0000))
      RATES(10) = (ALGBRC(7) - STATES(10))/ALGBRC(21)
      ALGBRC(8) = 1.00000/(1.00000+EXP((STATES(1)+61.0000)/5.00000))
      ALGBRC(22) = 5.00000/( 0.0150000*EXP(- (STATES(1)+71.7000)/83.3000)+ 0.0150000*EXP((STATES(1)+71.7000)/15.4000))
      RATES(11) = (ALGBRC(8) - STATES(11))/ALGBRC(22)
      ALGBRC(9) = 1.00000/(1.00000+EXP(- (STATES(1)+21.5000)/7.50000))
      ALGBRC(23) = 1.00000/(( 0.00138000*(STATES(1)+14.2000))/(1.00000 - EXP( - 0.123000*(STATES(1)+14.2000)))+( 0.000610000*(STATES(1)+38.9000))/(EXP( 0.145000*(STATES(1)+38.9000)) - 1.00000))
      RATES(12) = (ALGBRC(9) - STATES(12))/ALGBRC(23)
      ALGBRC(10) = 1.00000/(1.00000+EXP(- (STATES(1) - 1.50000)/16.7000))
      ALGBRC(24) = 1.00000/(( 7.19000e-05*(STATES(1)+30.0000))/(1.00000 - EXP( - 0.148000*(STATES(1)+30.0000)))+( 0.000131000*(STATES(1)+30.0000))/(EXP( 0.0687000*(STATES(1)+30.0000)) - 1.00000))
      RATES(13) = (ALGBRC(10) - STATES(13))/ALGBRC(24)
      ALGBRC(11) = 1.00000/(1.00000+EXP(- (STATES(1) - 1.50000)/16.7000))
      ALGBRC(25) = 4.00000/(( 7.19000e-05*(STATES(1)+30.0000))/(1.00000 - EXP( - 0.148000*(STATES(1)+30.0000)))+( 0.000131000*(STATES(1)+30.0000))/(EXP( 0.0687000*(STATES(1)+30.0000)) - 1.00000))
      RATES(14) = (ALGBRC(11) - STATES(14))/ALGBRC(25)
      ALGBRC(1) = STATES(1)+47.1300
      ALGBRC(15) = TERNRY(ABS(ALGBRC(1)).GE.CONSTS(11), ( 0.320000*ALGBRC(1))/(1.00000 - EXP( - 0.100000*ALGBRC(1))), 3.20000)
      ALGBRC(28) =  0.0800000*EXP(- STATES(1)/11.0000)
      RATES(3) =  ALGBRC(15)*(1.00000 - STATES(3)) -  ALGBRC(28)*STATES(3)
      ALGBRC(6) = 1.00000/(1.00000+EXP((STATES(1)+35.0600)/8.60000))+0.600000/(1.00000+EXP((50.0000 - STATES(1))/20.0000))
      ALGBRC(20) = 1.00000/( 0.0197000*EXP(-  0.0337000*(STATES(1)+10.0000) ** 2.00000)+0.0200000)
      ALGBRC(31) = ALGBRC(6)/ALGBRC(20)
      ALGBRC(36) = (1.00000 - ALGBRC(6))/ALGBRC(20)
      RATES(9) =  ALGBRC(31)*(1.00000 - STATES(9)) -  ALGBRC(36)*STATES(9)
      ALGBRC(12) = ( 10.0000*EXP((STATES(1) - 40.0000)/25.0000))/(1.00000+EXP((STATES(1) - 40.0000)/25.0000))
      ALGBRC(26) = ( 10.0000*EXP(- (STATES(1)+90.0000)/25.0000))/(1.00000+EXP(- (STATES(1)+90.0000)/25.0000))
      ALGBRC(32) = 1.00000/(ALGBRC(12)+ALGBRC(26))
      ALGBRC(37) = ALGBRC(12)/(ALGBRC(12)+ALGBRC(26))
      RATES(15) = (ALGBRC(37) - STATES(15))/ALGBRC(32)
      ALGBRC(13) = 0.0150000/(1.00000+EXP((STATES(1)+60.0000)/5.00000))
      ALGBRC(27) = ( 0.100000*EXP((STATES(1)+25.0000)/5.00000))/(1.00000+EXP((STATES(1)+25.0000)/5.00000))
      ALGBRC(33) = 1.00000/(ALGBRC(13)+ALGBRC(27))
      ALGBRC(38) = ALGBRC(13)/(ALGBRC(13)+ALGBRC(27))
      RATES(16) = (ALGBRC(38) - STATES(16))/ALGBRC(33)
      ALGBRC(5) = STATES(1)+10.0000
      ALGBRC(19) = 1.00000/(1.00000+EXP(- ALGBRC(5)/6.24000))
      ALGBRC(30) = TERNRY(ABS(ALGBRC(5)).LT.1.00000e-05, 1.00000/( 0.0350000*6.24000*2.00000), ( 1.00000*ALGBRC(19)*(1.00000 - EXP(- ALGBRC(5)/6.24000)))/( 0.0350000*ALGBRC(5)))
      ALGBRC(35) = ALGBRC(19)/ALGBRC(30)
      ALGBRC(40) = (1.00000 - ALGBRC(19))/ALGBRC(30)
      RATES(8) =  ALGBRC(35)*(1.00000 - STATES(8)) -  ALGBRC(40)*STATES(8)
      ALGBRC(4) = TERNRY(VOI.GE.CONSTS(4).AND.VOI.LE.CONSTS(5).AND.(VOI - CONSTS(4)) -  INT((VOI - CONSTS(4))/CONSTS(6))*CONSTS(6).LE.CONSTS(7), CONSTS(8), 0.00000)
      ALGBRC(47) = 1.00000/(1.00000+EXP((STATES(1)+9.00000)/22.4000))
      ALGBRC(51) =  (( CONSTS(1)*CONSTS(2))/CONSTS(3))*log(CONSTS(22)/STATES(7))
      ALGBRC(52) =  CONSTS(70)*STATES(12)*ALGBRC(47)*(STATES(1) - ALGBRC(51))
      ALGBRC(49) =  CONSTS(26)*(1.00000+0.600000/(1.00000+3.80000e-05/STATES(6) ** 1.40000))
      ALGBRC(48) =  (( CONSTS(1)*CONSTS(2))/CONSTS(3))*log((CONSTS(22)+ CONSTS(27)*CONSTS(10))/(STATES(7)+ CONSTS(27)*STATES(2)))
      ALGBRC(50) =  ALGBRC(49)*STATES(13)*STATES(14)*(STATES(1) - ALGBRC(48))
      ALGBRC(59) = 0.850000/(1.00000+CONSTS(32)/STATES(2) ** CONSTS(31))
      ALGBRC(60) = 0.800000 - 0.650000/(1.00000+EXP((STATES(1)+125.000)/15.0000))
      ALGBRC(61) =  CONSTS(30)*ALGBRC(59)*ALGBRC(60)*(STATES(1) - ALGBRC(51))
      ALGBRC(62) =  CONSTS(80)*(STATES(1) - ALGBRC(51))
      ALGBRC(63) = EXP(STATES(1)/100.000)
      ALGBRC(64) =  CONSTS(73)*STATES(15) ** 3.00000*STATES(16)*ALGBRC(63)*(STATES(1) - ALGBRC(51))
      ALGBRC(53) = 1.02000/(1.00000+EXP( 0.238500*((STATES(1) - ALGBRC(51)) - 59.2150)))
      ALGBRC(54) = ( 1.00000*( 0.491240*EXP( 0.0803200*((STATES(1) - ALGBRC(51))+5.47600))+EXP( 0.0617500*((STATES(1) - ALGBRC(51)) - 594.310))))/(1.00000+EXP( - 0.514300*((STATES(1) - ALGBRC(51))+4.75300)))
      ALGBRC(55) = ALGBRC(53)/(ALGBRC(53)+ALGBRC(54))
      ALGBRC(56) =  CONSTS(71)*ALGBRC(55)*(STATES(1) - ALGBRC(51))
      ALGBRC(57) = 1.00000/(1.00000+EXP((7.48800 - STATES(1))/5.98000))
      ALGBRC(58) =  CONSTS(29)*ALGBRC(57)*(STATES(1) - ALGBRC(51))
      ALGBRC(70) = 1.00000/(1.00000+ 0.124500*EXP(( - 0.100000*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))+ 0.0365000*CONSTS(74)*EXP(( - STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2))))
      ALGBRC(71) = ( (( CONSTS(43)*ALGBRC(70)*1.00000)/(1.00000+CONSTS(44)/STATES(2) ** 2.00000))*CONSTS(22))/(CONSTS(22)+CONSTS(45))
      ALGBRC(41) = ( (( CONSTS(20)*1.00000 ** 2.00000*STATES(1)*CONSTS(3) ** 2.00000)/( CONSTS(1)*CONSTS(2)))*( CONSTS(14)*STATES(7)*EXP(( 1.00000*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2))) -  CONSTS(15)*CONSTS(22)))/(EXP(( 1.00000*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2))) - 1.00000)
      ALGBRC(42) = 1.00000/(1.00000+STATES(6)/CONSTS(23))
      ALGBRC(45) =  STATES(8)*STATES(9)*ALGBRC(42)*ALGBRC(41)
      ALGBRC(73) = ( (( CONSTS(75)*1.00000 ** 2.00000*STATES(1)*CONSTS(3) ** 2.00000)/( CONSTS(1)*CONSTS(2)))*( CONSTS(14)*STATES(7)*EXP(( 1.00000*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2))) -  CONSTS(15)*CONSTS(22)))/(EXP(( 1.00000*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2))) - 1.00000)
      ALGBRC(75) = ( ALGBRC(73)*1.00000)/(1.00000+CONSTS(46)/STATES(6) ** 3.00000)
      RATES(7) = ( - 1.00000*(ALGBRC(4)+ALGBRC(45)+ALGBRC(52)+ALGBRC(50)+ALGBRC(56)+ALGBRC(58)+ALGBRC(61)+ALGBRC(62)+ALGBRC(64)+ALGBRC(75)+ - ALGBRC(71)*2.00000)*CONSTS(60))/( CONSTS(77)*CONSTS(3))
      ALGBRC(67) =  (( CONSTS(1)*CONSTS(2))/( 2.00000*CONSTS(3)))*log(CONSTS(21)/STATES(6))
      ALGBRC(68) =  CONSTS(24)*STATES(10)*STATES(10)*STATES(11)*(STATES(1) - ALGBRC(67))
      ALGBRC(77) = ( CONSTS(47)*EXP(( (CONSTS(49) - 1.00000)*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))*( EXP(( STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))*STATES(2) ** 3.00000*CONSTS(21) -  CONSTS(10) ** 3.00000*STATES(6)))/(1.00000+ CONSTS(48)*EXP(( (CONSTS(49) - 1.00000)*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))*( EXP(( STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))*STATES(2) ** 3.00000*CONSTS(21)+ CONSTS(10) ** 3.00000*STATES(6)))
      ALGBRC(65) = ( CONSTS(40)*STATES(6))/(CONSTS(39)+STATES(6))
      ALGBRC(69) =  CONSTS(42)*(STATES(1) - ALGBRC(67))
      ALGBRC(34) = ( (( CONSTS(18)*2.00000 ** 2.00000*STATES(1)*CONSTS(3) ** 2.00000)/( CONSTS(1)*CONSTS(2)))*( CONSTS(16)*STATES(6)*EXP(( 2.00000*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2))) -  CONSTS(17)*CONSTS(21)))/(EXP(( 2.00000*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2))) - 1.00000)
      ALGBRC(43) =  STATES(8)*STATES(9)*ALGBRC(42)*ALGBRC(34)
      RATES(22) = TERNRY(STATES(19).GT.0.200000, ( - 1.00000*CONSTS(60)*(((ALGBRC(43)+ALGBRC(68)) -  2.00000*ALGBRC(77))+ALGBRC(65)+ALGBRC(69)))/( 2.00000*CONSTS(77)*CONSTS(3)), TERNRY(STATES(20).GT.0.0100000.AND.STATES(19).LE.0.200000, 0.00000,  - 0.500000*STATES(22))
      ALGBRC(18) =  (( CONSTS(1)*CONSTS(2))/CONSTS(3))*log(CONSTS(10)/STATES(2))
      ALGBRC(29) =  CONSTS(9)*STATES(3) ** 3.00000*STATES(4)*STATES(5)*(STATES(1) - ALGBRC(18))
      ALGBRC(66) =  CONSTS(41)*(STATES(1) - ALGBRC(18))
      ALGBRC(39) = ( (( CONSTS(19)*1.00000 ** 2.00000*STATES(1)*CONSTS(3) ** 2.00000)/( CONSTS(1)*CONSTS(2)))*( CONSTS(12)*STATES(2)*EXP(( 1.00000*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2))) -  CONSTS(13)*CONSTS(10)))/(EXP(( 1.00000*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2))) - 1.00000)
      ALGBRC(44) =  STATES(8)*STATES(9)*ALGBRC(42)*ALGBRC(39)
      ALGBRC(72) = ( (( CONSTS(75)*1.00000 ** 2.00000*STATES(1)*CONSTS(3) ** 2.00000)/( CONSTS(1)*CONSTS(2)))*( CONSTS(12)*STATES(2)*EXP(( 1.00000*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2))) -  CONSTS(13)*CONSTS(10)))/(EXP(( 1.00000*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2))) - 1.00000)
      ALGBRC(74) = ( ALGBRC(72)*1.00000)/(1.00000+CONSTS(46)/STATES(6) ** 3.00000)
      RATES(2) = ( - 1.00000*(ALGBRC(29)+ALGBRC(44)+ALGBRC(66)+ALGBRC(74)+ ALGBRC(77)*3.00000+ ALGBRC(71)*3.00000)*CONSTS(60))/( CONSTS(77)*CONSTS(3))
      ALGBRC(46) = ALGBRC(43)+ALGBRC(45)+ALGBRC(44)
      ALGBRC(76) = ALGBRC(74)+ALGBRC(75)
      ALGBRC(78) = - (ALGBRC(29)+ALGBRC(46)+ALGBRC(68)+ALGBRC(52)+ALGBRC(50)+ALGBRC(61)+ALGBRC(62)+ALGBRC(64)+ALGBRC(56)+ALGBRC(58)+ALGBRC(77)+ALGBRC(65)+ALGBRC(66)+ALGBRC(69)+ALGBRC(71)+ALGBRC(76)+ALGBRC(4))
      RATES(1) = ALGBRC(78)
      RATES(19) = TERNRY(ALGBRC(78).GT.150.000,  100.000*(1.00000 - STATES(19)) -  0.500000*STATES(19),  - 0.500000*STATES(19))
      ALGBRC(79) = 1.00000/(1.00000+ EXP(2.00000)*STATES(20))
      ALGBRC(80) = 1.00000 - ALGBRC(79)
      ALGBRC(81) = ( ALGBRC(79)*ALGBRC(80)*150.000)/(1.00000+EXP((((ALGBRC(43)+ALGBRC(68)) -  2.00000*ALGBRC(77))+ALGBRC(65)+ALGBRC(69)+5.00000)/0.900000))
      ALGBRC(82) =  ALGBRC(81)*(STATES(17) - STATES(6))
      ALGBRC(83) = ( CONSTS(58)*STATES(6))/(STATES(6)+CONSTS(57))
      ALGBRC(84) =  CONSTS(76)*STATES(18)
      RATES(6) =  (1.00000/(1.00000+( CONSTS(64)*CONSTS(62))/CONSTS(62)+STATES(6) ** 2.00000+( CONSTS(63)*CONSTS(61))/CONSTS(61)+STATES(6) ** 2.00000))*(( - 1.00000*CONSTS(60)*(((ALGBRC(43)+ALGBRC(68)) -  2.00000*ALGBRC(77))+ALGBRC(65)+ALGBRC(69)))/( 2.00000*CONSTS(77)*CONSTS(3))+( ALGBRC(82)*CONSTS(79))/CONSTS(77)+( (ALGBRC(84) - ALGBRC(83))*CONSTS(81))/CONSTS(77))
      ALGBRC(85) = (STATES(18) - STATES(17))/CONSTS(52)
      RATES(17) =  (1.00000/(1.00000+( CONSTS(55)*CONSTS(56))/CONSTS(56)+STATES(17) ** 2.00000))*(ALGBRC(85) - ALGBRC(82))
      RATES(18) = (( - ALGBRC(85)*CONSTS(79))/CONSTS(81) - ALGBRC(84))+ALGBRC(83)
      RETURN
      END
      SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(2) = TERNRY(STATES(1).LT.- 40.0000,  0.135000*EXP((80.0000+STATES(1))/- 6.80000), 0.00000)
      ALGBRC(16) = TERNRY(STATES(1).LT.- 40.0000,  3.56000*EXP( 0.0790000*STATES(1))+ 310000.*EXP( 0.350000*STATES(1)), 1.00000/( 0.130000*(1.00000+EXP((STATES(1)+10.6600)/- 11.1000))))
      ALGBRC(3) = TERNRY(STATES(1).LT.- 40.0000, ( - ( 127140.*EXP( 0.244400*STATES(1))+ 3.47400e-05*EXP( - 0.0439100*STATES(1)))*(STATES(1)+37.7800))/(1.00000+EXP( 0.311000*(STATES(1)+79.2300))), 0.00000)
      ALGBRC(17) = TERNRY(STATES(1).LT.- 40.0000, ( 0.121200*EXP( - 0.0105200*STATES(1)))/(1.00000+EXP( - 0.137800*(STATES(1)+40.1400))), ( 0.300000*EXP( - 2.53500e-07*STATES(1)))/(1.00000+EXP( - 0.100000*(STATES(1)+32.0000))))
      ALGBRC(7) = 1.00000/(1.00000+EXP(- (STATES(1)+50.0000)/5.00000))
      ALGBRC(21) = 5.00000/( 1.06800*EXP((STATES(1)+16.3000)/30.0000)+ 1.06800*EXP(- (STATES(1)+16.3000)/30.0000))
      ALGBRC(8) = 1.00000/(1.00000+EXP((STATES(1)+61.0000)/5.00000))
      ALGBRC(22) = 5.00000/( 0.0150000*EXP(- (STATES(1)+71.7000)/83.3000)+ 0.0150000*EXP((STATES(1)+71.7000)/15.4000))
      ALGBRC(9) = 1.00000/(1.00000+EXP(- (STATES(1)+21.5000)/7.50000))
      ALGBRC(23) = 1.00000/(( 0.00138000*(STATES(1)+14.2000))/(1.00000 - EXP( - 0.123000*(STATES(1)+14.2000)))+( 0.000610000*(STATES(1)+38.9000))/(EXP( 0.145000*(STATES(1)+38.9000)) - 1.00000))
      ALGBRC(10) = 1.00000/(1.00000+EXP(- (STATES(1) - 1.50000)/16.7000))
      ALGBRC(24) = 1.00000/(( 7.19000e-05*(STATES(1)+30.0000))/(1.00000 - EXP( - 0.148000*(STATES(1)+30.0000)))+( 0.000131000*(STATES(1)+30.0000))/(EXP( 0.0687000*(STATES(1)+30.0000)) - 1.00000))
      ALGBRC(11) = 1.00000/(1.00000+EXP(- (STATES(1) - 1.50000)/16.7000))
      ALGBRC(25) = 4.00000/(( 7.19000e-05*(STATES(1)+30.0000))/(1.00000 - EXP( - 0.148000*(STATES(1)+30.0000)))+( 0.000131000*(STATES(1)+30.0000))/(EXP( 0.0687000*(STATES(1)+30.0000)) - 1.00000))
      ALGBRC(1) = STATES(1)+47.1300
      ALGBRC(15) = TERNRY(ABS(ALGBRC(1)).GE.CONSTS(11), ( 0.320000*ALGBRC(1))/(1.00000 - EXP( - 0.100000*ALGBRC(1))), 3.20000)
      ALGBRC(28) =  0.0800000*EXP(- STATES(1)/11.0000)
      ALGBRC(6) = 1.00000/(1.00000+EXP((STATES(1)+35.0600)/8.60000))+0.600000/(1.00000+EXP((50.0000 - STATES(1))/20.0000))
      ALGBRC(20) = 1.00000/( 0.0197000*EXP(-  0.0337000*(STATES(1)+10.0000) ** 2.00000)+0.0200000)
      ALGBRC(31) = ALGBRC(6)/ALGBRC(20)
      ALGBRC(36) = (1.00000 - ALGBRC(6))/ALGBRC(20)
      ALGBRC(12) = ( 10.0000*EXP((STATES(1) - 40.0000)/25.0000))/(1.00000+EXP((STATES(1) - 40.0000)/25.0000))
      ALGBRC(26) = ( 10.0000*EXP(- (STATES(1)+90.0000)/25.0000))/(1.00000+EXP(- (STATES(1)+90.0000)/25.0000))
      ALGBRC(32) = 1.00000/(ALGBRC(12)+ALGBRC(26))
      ALGBRC(37) = ALGBRC(12)/(ALGBRC(12)+ALGBRC(26))
      ALGBRC(13) = 0.0150000/(1.00000+EXP((STATES(1)+60.0000)/5.00000))
      ALGBRC(27) = ( 0.100000*EXP((STATES(1)+25.0000)/5.00000))/(1.00000+EXP((STATES(1)+25.0000)/5.00000))
      ALGBRC(33) = 1.00000/(ALGBRC(13)+ALGBRC(27))
      ALGBRC(38) = ALGBRC(13)/(ALGBRC(13)+ALGBRC(27))
      ALGBRC(5) = STATES(1)+10.0000
      ALGBRC(19) = 1.00000/(1.00000+EXP(- ALGBRC(5)/6.24000))
      ALGBRC(30) = TERNRY(ABS(ALGBRC(5)).LT.1.00000e-05, 1.00000/( 0.0350000*6.24000*2.00000), ( 1.00000*ALGBRC(19)*(1.00000 - EXP(- ALGBRC(5)/6.24000)))/( 0.0350000*ALGBRC(5)))
      ALGBRC(35) = ALGBRC(19)/ALGBRC(30)
      ALGBRC(40) = (1.00000 - ALGBRC(19))/ALGBRC(30)
      ALGBRC(4) = TERNRY(VOI.GE.CONSTS(4).AND.VOI.LE.CONSTS(5).AND.(VOI - CONSTS(4)) -  INT((VOI - CONSTS(4))/CONSTS(6))*CONSTS(6).LE.CONSTS(7), CONSTS(8), 0.00000)
      ALGBRC(47) = 1.00000/(1.00000+EXP((STATES(1)+9.00000)/22.4000))
      ALGBRC(51) =  (( CONSTS(1)*CONSTS(2))/CONSTS(3))*log(CONSTS(22)/STATES(7))
      ALGBRC(52) =  CONSTS(70)*STATES(12)*ALGBRC(47)*(STATES(1) - ALGBRC(51))
      ALGBRC(49) =  CONSTS(26)*(1.00000+0.600000/(1.00000+3.80000e-05/STATES(6) ** 1.40000))
      ALGBRC(48) =  (( CONSTS(1)*CONSTS(2))/CONSTS(3))*log((CONSTS(22)+ CONSTS(27)*CONSTS(10))/(STATES(7)+ CONSTS(27)*STATES(2)))
      ALGBRC(50) =  ALGBRC(49)*STATES(13)*STATES(14)*(STATES(1) - ALGBRC(48))
      ALGBRC(59) = 0.850000/(1.00000+CONSTS(32)/STATES(2) ** CONSTS(31))
      ALGBRC(60) = 0.800000 - 0.650000/(1.00000+EXP((STATES(1)+125.000)/15.0000))
      ALGBRC(61) =  CONSTS(30)*ALGBRC(59)*ALGBRC(60)*(STATES(1) - ALGBRC(51))
      ALGBRC(62) =  CONSTS(80)*(STATES(1) - ALGBRC(51))
      ALGBRC(63) = EXP(STATES(1)/100.000)
      ALGBRC(64) =  CONSTS(73)*STATES(15) ** 3.00000*STATES(16)*ALGBRC(63)*(STATES(1) - ALGBRC(51))
      ALGBRC(53) = 1.02000/(1.00000+EXP( 0.238500*((STATES(1) - ALGBRC(51)) - 59.2150)))
      ALGBRC(54) = ( 1.00000*( 0.491240*EXP( 0.0803200*((STATES(1) - ALGBRC(51))+5.47600))+EXP( 0.0617500*((STATES(1) - ALGBRC(51)) - 594.310))))/(1.00000+EXP( - 0.514300*((STATES(1) - ALGBRC(51))+4.75300)))
      ALGBRC(55) = ALGBRC(53)/(ALGBRC(53)+ALGBRC(54))
      ALGBRC(56) =  CONSTS(71)*ALGBRC(55)*(STATES(1) - ALGBRC(51))
      ALGBRC(57) = 1.00000/(1.00000+EXP((7.48800 - STATES(1))/5.98000))
      ALGBRC(58) =  CONSTS(29)*ALGBRC(57)*(STATES(1) - ALGBRC(51))
      ALGBRC(70) = 1.00000/(1.00000+ 0.124500*EXP(( - 0.100000*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))+ 0.0365000*CONSTS(74)*EXP(( - STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2))))
      ALGBRC(71) = ( (( CONSTS(43)*ALGBRC(70)*1.00000)/(1.00000+CONSTS(44)/STATES(2) ** 2.00000))*CONSTS(22))/(CONSTS(22)+CONSTS(45))
      ALGBRC(41) = ( (( CONSTS(20)*1.00000 ** 2.00000*STATES(1)*CONSTS(3) ** 2.00000)/( CONSTS(1)*CONSTS(2)))*( CONSTS(14)*STATES(7)*EXP(( 1.00000*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2))) -  CONSTS(15)*CONSTS(22)))/(EXP(( 1.00000*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2))) - 1.00000)
      ALGBRC(42) = 1.00000/(1.00000+STATES(6)/CONSTS(23))
      ALGBRC(45) =  STATES(8)*STATES(9)*ALGBRC(42)*ALGBRC(41)
      ALGBRC(73) = ( (( CONSTS(75)*1.00000 ** 2.00000*STATES(1)*CONSTS(3) ** 2.00000)/( CONSTS(1)*CONSTS(2)))*( CONSTS(14)*STATES(7)*EXP(( 1.00000*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2))) -  CONSTS(15)*CONSTS(22)))/(EXP(( 1.00000*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2))) - 1.00000)
      ALGBRC(75) = ( ALGBRC(73)*1.00000)/(1.00000+CONSTS(46)/STATES(6) ** 3.00000)
      ALGBRC(67) =  (( CONSTS(1)*CONSTS(2))/( 2.00000*CONSTS(3)))*log(CONSTS(21)/STATES(6))
      ALGBRC(68) =  CONSTS(24)*STATES(10)*STATES(10)*STATES(11)*(STATES(1) - ALGBRC(67))
      ALGBRC(77) = ( CONSTS(47)*EXP(( (CONSTS(49) - 1.00000)*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))*( EXP(( STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))*STATES(2) ** 3.00000*CONSTS(21) -  CONSTS(10) ** 3.00000*STATES(6)))/(1.00000+ CONSTS(48)*EXP(( (CONSTS(49) - 1.00000)*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))*( EXP(( STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))*STATES(2) ** 3.00000*CONSTS(21)+ CONSTS(10) ** 3.00000*STATES(6)))
      ALGBRC(65) = ( CONSTS(40)*STATES(6))/(CONSTS(39)+STATES(6))
      ALGBRC(69) =  CONSTS(42)*(STATES(1) - ALGBRC(67))
      ALGBRC(34) = ( (( CONSTS(18)*2.00000 ** 2.00000*STATES(1)*CONSTS(3) ** 2.00000)/( CONSTS(1)*CONSTS(2)))*( CONSTS(16)*STATES(6)*EXP(( 2.00000*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2))) -  CONSTS(17)*CONSTS(21)))/(EXP(( 2.00000*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2))) - 1.00000)
      ALGBRC(43) =  STATES(8)*STATES(9)*ALGBRC(42)*ALGBRC(34)
      ALGBRC(18) =  (( CONSTS(1)*CONSTS(2))/CONSTS(3))*log(CONSTS(10)/STATES(2))
      ALGBRC(29) =  CONSTS(9)*STATES(3) ** 3.00000*STATES(4)*STATES(5)*(STATES(1) - ALGBRC(18))
      ALGBRC(66) =  CONSTS(41)*(STATES(1) - ALGBRC(18))
      ALGBRC(39) = ( (( CONSTS(19)*1.00000 ** 2.00000*STATES(1)*CONSTS(3) ** 2.00000)/( CONSTS(1)*CONSTS(2)))*( CONSTS(12)*STATES(2)*EXP(( 1.00000*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2))) -  CONSTS(13)*CONSTS(10)))/(EXP(( 1.00000*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2))) - 1.00000)
      ALGBRC(44) =  STATES(8)*STATES(9)*ALGBRC(42)*ALGBRC(39)
      ALGBRC(72) = ( (( CONSTS(75)*1.00000 ** 2.00000*STATES(1)*CONSTS(3) ** 2.00000)/( CONSTS(1)*CONSTS(2)))*( CONSTS(12)*STATES(2)*EXP(( 1.00000*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2))) -  CONSTS(13)*CONSTS(10)))/(EXP(( 1.00000*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2))) - 1.00000)
      ALGBRC(74) = ( ALGBRC(72)*1.00000)/(1.00000+CONSTS(46)/STATES(6) ** 3.00000)
      ALGBRC(46) = ALGBRC(43)+ALGBRC(45)+ALGBRC(44)
      ALGBRC(76) = ALGBRC(74)+ALGBRC(75)
      ALGBRC(78) = - (ALGBRC(29)+ALGBRC(46)+ALGBRC(68)+ALGBRC(52)+ALGBRC(50)+ALGBRC(61)+ALGBRC(62)+ALGBRC(64)+ALGBRC(56)+ALGBRC(58)+ALGBRC(77)+ALGBRC(65)+ALGBRC(66)+ALGBRC(69)+ALGBRC(71)+ALGBRC(76)+ALGBRC(4))
      ALGBRC(79) = 1.00000/(1.00000+ EXP(2.00000)*STATES(20))
      ALGBRC(80) = 1.00000 - ALGBRC(79)
      ALGBRC(81) = ( ALGBRC(79)*ALGBRC(80)*150.000)/(1.00000+EXP((((ALGBRC(43)+ALGBRC(68)) -  2.00000*ALGBRC(77))+ALGBRC(65)+ALGBRC(69)+5.00000)/0.900000))
      ALGBRC(82) =  ALGBRC(81)*(STATES(17) - STATES(6))
      ALGBRC(83) = ( CONSTS(58)*STATES(6))/(STATES(6)+CONSTS(57))
      ALGBRC(84) =  CONSTS(76)*STATES(18)
      ALGBRC(85) = (STATES(18) - STATES(17))/CONSTS(52)
      ALGBRC(14) = TERNRY(STATES(22).GT.CONSTS(54),  (( CONSTS(50)*(STATES(22) - CONSTS(54)))/((CONSTS(53)+STATES(22)) - CONSTS(54)))*(1.00000 - STATES(20))*STATES(20), TERNRY(STATES(22).LE.CONSTS(54).AND.STATES(24).GT.0.00000,  CONSTS(51)*(1.00000 - STATES(24))*STATES(24), 0.00000)
      RETURN
      END
      REAL FUNCTION TERNRY(TEST, VALA, VALB)
      LOGICAL TEST
      REAL VALA, VALB
      IF (TEST) THEN
        TERNRY = VALA
      ELSE
        TERNRY = VALB
      ENDIF
      RETURN
      END