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 79 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 76 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 Cm in component membrane (microF).
C ALGBRC(13) is I_st in component membrane (microA_per_microF).
C ALGBRC(32) is i_Na in component fast_sodium_current (microA_per_microF).
C ALGBRC(45) is i_Ca_L in component L_type_Ca_channel (microA_per_microF).
C ALGBRC(64) is i_Ca_T in component T_type_Ca_channel (microA_per_microF).
C ALGBRC(51) is i_Kr in component rapid_delayed_rectifier_potassium_current (microA_per_microF).
C ALGBRC(49) is i_Ks in component slow_delayed_rectifier_potassium_current (microA_per_microF).
C ALGBRC(58) is i_K_ATP in component ATP_sensitive_potassium_current (microA_per_microF).
C ALGBRC(60) is i_to in component transient_outward_current (microA_per_microF).
C ALGBRC(55) is i_K1 in component time_independent_potassium_current (microA_per_microF).
C ALGBRC(57) is i_Kp in component plateau_potassium_current (microA_per_microF).
C ALGBRC(61) is i_p_Ca in component sarcolemmal_calcium_pump (microA_per_microF).
C ALGBRC(62) is i_Na_b in component sodium_background_current (microA_per_microF).
C ALGBRC(65) is i_Ca_b in component calcium_background_current (microA_per_microF).
C ALGBRC(67) is i_NaK in component sodium_potassium_pump (microA_per_microF).
C ALGBRC(73) is i_NaCa in component Na_Ca_exchanger (microA_per_microF).
C ALGBRC(72) is i_ns_Ca in component non_specific_calcium_activated_current (microA_per_microF).
C ALGBRC(74) is dVdt in component membrane (dimensionless).
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 (microA_per_microF).
C ALGBRC(26) is E_Na in component fast_sodium_current (millivolt).
C CONSTS(10) is g_Na in component fast_sodium_current (milliS_per_microF).
C STATES(2) is Nai in component ionic_concentrations (millimolar).
C CONSTS(11) 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(14) is alpha_m in component fast_sodium_current_m_gate (per_second).
C ALGBRC(27) is beta_m in component fast_sodium_current_m_gate (per_second).
C CONSTS(12) is delta_m in component fast_sodium_current_m_gate (dimensionless).
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_second).
C ALGBRC(15) is beta_h in component fast_sodium_current_h_gate (per_second).
C ALGBRC(3) is alpha_j in component fast_sodium_current_j_gate (per_second).
C ALGBRC(16) is beta_j in component fast_sodium_current_j_gate (per_second).
C ALGBRC(42) is i_CaCa in component L_type_Ca_channel (microA_per_microF).
C ALGBRC(44) is i_CaK in component L_type_Ca_channel (microA_per_microF).
C ALGBRC(43) is i_CaNa in component L_type_Ca_channel (microA_per_microF).
C CONSTS(13) is gamma_Nai in component L_type_Ca_channel (dimensionless).
C CONSTS(14) is gamma_Nao in component L_type_Ca_channel (dimensionless).
C CONSTS(15) is gamma_Ki in component L_type_Ca_channel (dimensionless).
C CONSTS(16) is gamma_Ko in component L_type_Ca_channel (dimensionless).
C ALGBRC(37) is I_CaCa in component L_type_Ca_channel (microA_per_microF).
C ALGBRC(40) 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(17) is P_Ca in component L_type_Ca_channel (cm_per_second).
C CONSTS(18) is P_Na in component L_type_Ca_channel (cm_per_second).
C CONSTS(19) is P_K in component L_type_Ca_channel (cm_per_second).
C CONSTS(20) is gamma_Cai in component L_type_Ca_channel (dimensionless).
C CONSTS(21) is gamma_Cao in component L_type_Ca_channel (dimensionless).
C STATES(6) is Cai in component calcium_dynamics (millimolar).
C CONSTS(22) is Cao in component calcium_dynamics (millimolar).
C CONSTS(23) 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(41) is f_Ca in component L_type_Ca_channel_f_Ca_gate (dimensionless).
C ALGBRC(33) is alpha_d in component L_type_Ca_channel_d_gate (per_second).
C ALGBRC(38) is beta_d in component L_type_Ca_channel_d_gate (per_second).
C ALGBRC(17) is d_infinity in component L_type_Ca_channel_d_gate (dimensionless).
C ALGBRC(28) is tau_d in component L_type_Ca_channel_d_gate (second).
C ALGBRC(4) is E0_d in component L_type_Ca_channel_d_gate (millivolt).
C ALGBRC(29) is alpha_f in component L_type_Ca_channel_f_gate (per_second).
C ALGBRC(34) is beta_f in component L_type_Ca_channel_f_gate (per_second).
C ALGBRC(5) is f_infinity in component L_type_Ca_channel_f_gate (dimensionless).
C ALGBRC(18) is tau_f in component L_type_Ca_channel_f_gate (second).
C CONSTS(24) is Km_Ca in component L_type_Ca_channel_f_Ca_gate (millimolar).
C CONSTS(25) is g_CaT in component T_type_Ca_channel (milliS_per_microF).
C ALGBRC(63) 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(6) is b_inf in component T_type_Ca_channel_b_gate (dimensionless).
C ALGBRC(19) is tau_b in component T_type_Ca_channel_b_gate (second).
C ALGBRC(7) is g_inf in component T_type_Ca_channel_g_gate (dimensionless).
C ALGBRC(20) is tau_g in component T_type_Ca_channel_g_gate (second).
C CONSTS(64) is g_Kr in component rapid_delayed_rectifier_potassium_current (milliS_per_microF).
C ALGBRC(46) is Rect in component rapid_delayed_rectifier_potassium_current (dimensionless).
C ALGBRC(50) 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(8) is xr_infinity in component rapid_delayed_rectifier_potassium_current_xr_gate (dimensionless).
C ALGBRC(21) is tau_xr in component rapid_delayed_rectifier_potassium_current_xr_gate (second).
C ALGBRC(48) is g_Ks in component slow_delayed_rectifier_potassium_current (milliS_per_microF).
C ALGBRC(47) is E_Ks in component slow_delayed_rectifier_potassium_current (millivolt).
C CONSTS(26) 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(9) is xs1_infinity in component slow_delayed_rectifier_potassium_current_xs1_gate (dimensionless).
C ALGBRC(22) is tau_xs1 in component slow_delayed_rectifier_potassium_current_xs1_gate (second).
C ALGBRC(10) is xs2_infinity in component slow_delayed_rectifier_potassium_current_xs2_gate (dimensionless).
C ALGBRC(23) is tau_xs2 in component slow_delayed_rectifier_potassium_current_xs2_gate (second).
C CONSTS(65) is g_K1 in component time_independent_potassium_current (milliS_per_cm2).
C ALGBRC(54) is K1_infinity in component time_independent_potassium_current_K1_gate (dimensionless).
C ALGBRC(52) is alpha_K1 in component time_independent_potassium_current_K1_gate (per_second).
C ALGBRC(53) is beta_K1 in component time_independent_potassium_current_K1_gate (per_second).
C CONSTS(27) is g_Kp in component plateau_potassium_current (milliS_per_microF).
C ALGBRC(56) is Kp in component plateau_potassium_current (dimensionless).
C CONSTS(66) is g_K_ATP in component ATP_sensitive_potassium_current (milliS_per_microF).
C CONSTS(28) is nATP in component ATP_sensitive_potassium_current (dimensionless).
C CONSTS(29) is nicholsarea in component ATP_sensitive_potassium_current (dimensionless).
C CONSTS(30) is ATPi in component ATP_sensitive_potassium_current (millimolar).
C CONSTS(31) is hATP in component ATP_sensitive_potassium_current (dimensionless).
C CONSTS(32) is kATP in component ATP_sensitive_potassium_current (millimolar).
C CONSTS(72) is pATP in component ATP_sensitive_potassium_current (dimensionless).
C CONSTS(74) is GKbaraATP in component ATP_sensitive_potassium_current (milliS_per_microF).
C CONSTS(67) is g_to in component transient_outward_current (milliS_per_microF).
C ALGBRC(59) 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(11) is alpha_zdv in component transient_outward_current_zdv_gate (per_second).
C ALGBRC(24) is beta_zdv in component transient_outward_current_zdv_gate (per_second).
C ALGBRC(30) is tau_zdv in component transient_outward_current_zdv_gate (second).
C ALGBRC(35) is zdv_ss in component transient_outward_current_zdv_gate (dimensionless).
C ALGBRC(12) is alpha_ydv in component transient_outward_current_ydv_gate (per_second).
C ALGBRC(25) is beta_ydv in component transient_outward_current_ydv_gate (per_second).
C ALGBRC(31) is tau_ydv in component transient_outward_current_ydv_gate (second).
C ALGBRC(36) is ydv_ss in component transient_outward_current_ydv_gate (dimensionless).
C CONSTS(33) is K_mpCa in component sarcolemmal_calcium_pump (millimolar).
C CONSTS(34) is I_pCa in component sarcolemmal_calcium_pump (microA_per_microF).
C CONSTS(35) is g_Nab in component sodium_background_current (milliS_per_microF).
C CONSTS(36) is g_Cab in component calcium_background_current (milliS_per_microF).
C CONSTS(37) is I_NaK in component sodium_potassium_pump (microA_per_microF).
C ALGBRC(66) is f_NaK in component sodium_potassium_pump (dimensionless).
C CONSTS(38) is K_mNai in component sodium_potassium_pump (millimolar).
C CONSTS(39) is K_mKo in component sodium_potassium_pump (millimolar).
C CONSTS(68) is sigma in component sodium_potassium_pump (dimensionless).
C ALGBRC(70) is i_ns_Na in component non_specific_calcium_activated_current (microA_per_microF).
C ALGBRC(71) is i_ns_K in component non_specific_calcium_activated_current (microA_per_microF).
C CONSTS(69) is P_ns_Ca in component non_specific_calcium_activated_current (cm_per_second).
C ALGBRC(68) is I_ns_Na in component non_specific_calcium_activated_current (microA_per_microF).
C ALGBRC(69) is I_ns_K in component non_specific_calcium_activated_current (microA_per_microF).
C CONSTS(40) is K_m_ns_Ca in component non_specific_calcium_activated_current (millimolar).
C CONSTS(41) is n_NaCa in component Na_Ca_exchanger (dimensionless).
C CONSTS(42) is K_NaCa in component Na_Ca_exchanger (millimolar).
C CONSTS(43) is d_NaCa in component Na_Ca_exchanger (millimolar).
C CONSTS(44) is gamma in component Na_Ca_exchanger (dimensionless).
C ALGBRC(76) is i_rel in component calcium_dynamics (millimolar_per_second).
C ALGBRC(77) is i_up in component calcium_dynamics (millimolar_per_second).
C ALGBRC(78) is i_leak in component calcium_dynamics (millimolar_per_second).
C ALGBRC(79) is i_tr in component calcium_dynamics (millimolar_per_second).
C ALGBRC(75) is G_rel in component calcium_dynamics (per_second).
C CONSTS(45) is G_rel_max in component calcium_dynamics (per_second).
C CONSTS(46) is G_rel_overload in component calcium_dynamics (per_second).
C CONSTS(47) is tau_tr in component calcium_dynamics (second).
C CONSTS(48) is K_mrel in component calcium_dynamics (millimolar).
C CONSTS(49) is delta_Ca_ith in component calcium_dynamics (millimolar).
C CONSTS(50) is CSQN_max in component calcium_dynamics (millimolar).
C CONSTS(51) is K_mCSQN in component calcium_dynamics (millimolar).
C CONSTS(52) is K_mup in component calcium_dynamics (millimolar).
C CONSTS(70) is K_leak in component calcium_dynamics (per_second).
C CONSTS(53) is I_up in component calcium_dynamics (millimolar_per_second).
C CONSTS(54) 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(73) is V_myo in component ionic_concentrations (micro_litre).
C CONSTS(55) is A_cap in component ionic_concentrations (mm2).
C CONSTS(75) is V_JSR in component calcium_dynamics (micro_litre).
C CONSTS(76) is V_NSR in component calcium_dynamics (micro_litre).
C CONSTS(56) is K_mTn in component calcium_dynamics (millimolar).
C CONSTS(57) is K_mCMDN in component calcium_dynamics (millimolar).
C CONSTS(58) is Tn_max in component calcium_dynamics (millimolar).
C CONSTS(59) 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 (dimensionless).
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(60) is CSQNthresh in component calcium_dynamics (millimolar).
C CONSTS(61) is Logicthresh in component calcium_dynamics (dimensionless).
C CONSTS(62) is preplength in component ionic_concentrations (mm).
C CONSTS(63) is radius in component ionic_concentrations (mm).
C CONSTS(71) is volume in component ionic_concentrations (micro_litre).
C RATES(1) is d/dt V in component membrane (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 (dimensionless).
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) = -88.32552
      CONSTS(1) = 8314
      CONSTS(2) = 310
      CONSTS(3) = 96485
      CONSTS(4) = 0.001
      CONSTS(5) = 0.1
      CONSTS(6) = 9
      CONSTS(7) = 1
      CONSTS(8) = 0.002
      CONSTS(9) = -25.5
      CONSTS(10) = 16
      STATES(2) = 14.177596
      CONSTS(11) = 132
      STATES(3) = 0.0008858
      STATES(4) = 0.992806
      STATES(5) = 0.99511469
      CONSTS(12) = 1e-5
      CONSTS(13) = 0.75
      CONSTS(14) = 0.75
      CONSTS(15) = 0.75
      CONSTS(16) = 0.75
      CONSTS(17) = 0.00054
      CONSTS(18) = 6.75e-7
      CONSTS(19) = 1.93e-7
      CONSTS(20) = 1
      CONSTS(21) = 0.341
      STATES(6) = 0.00034209
      CONSTS(22) = 1.8
      CONSTS(23) = 4.5
      STATES(7) = 138.37949
      STATES(8) = 3.538268e-6
      STATES(9) = 0.995259
      CONSTS(24) = 0.0006
      CONSTS(25) = 0.05
      STATES(10) = 0.0010301
      STATES(11) = 0.9341828
      STATES(12) = 0.0007500578
      CONSTS(26) = 0.01833
      STATES(13) = 0.0421517
      STATES(14) = 0.08866
      CONSTS(27) = 0.00552
      CONSTS(28) = 0.24
      CONSTS(29) = 5e-5
      CONSTS(30) = 3
      CONSTS(31) = 2
      CONSTS(32) = 0.00025
      STATES(15) = 0.01198974
      STATES(16) = 0.97497
      CONSTS(33) = 0.0005
      CONSTS(34) = 1.15
      CONSTS(35) = 0.004
      CONSTS(36) = 0.003016
      CONSTS(37) = 2
      CONSTS(38) = 10
      CONSTS(39) = 1.5
      CONSTS(40) = 0.0012
      CONSTS(41) = 3
      CONSTS(42) = 0.002
      CONSTS(43) = 0.001
      CONSTS(44) = 0.5
      CONSTS(45) = 60000
      CONSTS(46) = 4000
      CONSTS(47) = 0.18
      CONSTS(48) = 0.0008
      CONSTS(49) = 0.00018
      CONSTS(50) = 10
      CONSTS(51) = 0.8
      CONSTS(52) = 0.00092
      CONSTS(53) = 5
      CONSTS(54) = 15
      STATES(17) = 0.8204291
      STATES(18) = 2.7872629
      CONSTS(55) = 1.434e-7
      CONSTS(56) = 0.0005
      CONSTS(57) = 0.00238
      CONSTS(58) = 0.07
      CONSTS(59) = 0.05
      STATES(19) = 3.7458e-87
      STATES(20) = 2.07066e-86
      STATES(21) = 0.01924195
      STATES(22) = 1.660129e-87
      STATES(23) = 1.97626e-323
      STATES(24) = -2.470328e-323
      STATES(25) = 2.2645e-282
      CONSTS(60) = 0.7
      CONSTS(61) = 0.98
      CONSTS(62) = 0.001
      CONSTS(63) = 1.1e-4
      CONSTS(64) =  0.0261400* (CONSTS(23)/5.40000) ** (1.0 / 2)
      CONSTS(65) =  0.750000* (CONSTS(23)/5.40000) ** (1.0 / 2)
      CONSTS(66) = 0.000193000/CONSTS(29)
      CONSTS(67) =  0.00000*0.500000
      CONSTS(68) =  (1.00000/7.00000)*(EXP(CONSTS(11)/67.3000) - 1.00000)
      CONSTS(69) =  0.00000*1.75000e-07
      CONSTS(70) = CONSTS(53)/CONSTS(54)
      CONSTS(71) =   3.14159265358979*CONSTS(62)*CONSTS(63) ** 2.00000
      CONSTS(72) = 1.00000/(1.00000+CONSTS(30)/CONSTS(32) ** CONSTS(31))
      CONSTS(73) =  0.680000*CONSTS(71)
      CONSTS(74) =  CONSTS(66)*CONSTS(72)*CONSTS(23)/4.00000 ** CONSTS(28)
      CONSTS(75) =  (0.00480000/0.680000)*CONSTS(73)
      CONSTS(76) =  (0.0552000/0.680000)*CONSTS(73)
      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,  100000.*(1.00000 - STATES(20)) -  500.000*STATES(20),  - 500.000*STATES(20))
      RATES(21) = TERNRY(STATES(19).LT.0.200000.AND.STATES(19).GT.0.180000,  100000.*(1.00000 - STATES(21)) -  500.000*STATES(21),  - 10.0000*STATES(21))
      RATES(23) = TERNRY(1.00000/(1.00000+CONSTS(51)/STATES(17)).GT.CONSTS(60).AND.STATES(25).LT.0.370000.AND.STATES(21).LT.0.370000,  50000.0*(1.00000 - STATES(23)),  - 500.000*STATES(23))
      RATES(24) = TERNRY(STATES(23).GT.CONSTS(61).AND.STATES(24).LT.CONSTS(61),  50000.0*(1.00000 - STATES(24)),  - 500.000*STATES(24))
      RATES(25) = TERNRY(STATES(23).GT.CONSTS(61).AND.STATES(25).LT.CONSTS(61),  50000.0*(1.00000 - STATES(25)),  - 10.0000*STATES(25))
      ALGBRC(2) = TERNRY(STATES(1).LT.- 40.0000,  135.000*EXP((80.0000+STATES(1))/- 6.80000), 0.00000)
      ALGBRC(15) = TERNRY(STATES(1).LT.- 40.0000,  3560.00*EXP( 0.0790000*STATES(1))+ 3.10000e+08*EXP( 0.350000*STATES(1)), 1.00000/( 0.000130000*(1.00000+EXP((STATES(1)+10.6600)/- 11.1000))))
      RATES(4) =  ALGBRC(2)*(1.00000 - STATES(4)) -  ALGBRC(15)*STATES(4)
      ALGBRC(3) = TERNRY(STATES(1).LT.- 40.0000, ( 1000.00*- ( 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(16) = TERNRY(STATES(1).LT.- 40.0000, ( 121.200*EXP( - 0.0105200*STATES(1)))/(1.00000+EXP( - 0.137800*(STATES(1)+40.1400))), ( 300.000*EXP( - 2.53500e-07*STATES(1)))/(1.00000+EXP( - 0.100000*(STATES(1)+32.0000))))
      RATES(5) =  ALGBRC(3)*(1.00000 - STATES(5)) -  ALGBRC(16)*STATES(5)
      ALGBRC(6) = 1.00000/(1.00000+EXP(- (STATES(1)+14.0000)/10.8000))
      ALGBRC(19) = 0.00370000+0.00610000/(1.00000+EXP((STATES(1)+25.0000)/4.50000))
      RATES(10) = (ALGBRC(6) - STATES(10))/ALGBRC(19)
      ALGBRC(7) = 1.00000/(1.00000+EXP((STATES(1)+60.0000)/5.60000))
      ALGBRC(20) = TERNRY(STATES(1).LE.0.00000,  - 0.000875000*STATES(1)+0.0120000, 0.0120000)
      RATES(11) = (ALGBRC(7) - STATES(11))/ALGBRC(20)
      ALGBRC(8) = 1.00000/(1.00000+EXP(- (STATES(1)+21.5000)/7.50000))
      ALGBRC(21) = 0.00100000/(( 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(8) - STATES(12))/ALGBRC(21)
      ALGBRC(9) = 1.00000/(1.00000+EXP(- (STATES(1) - 1.50000)/16.7000))
      ALGBRC(22) = 0.00100000/(( 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(9) - STATES(13))/ALGBRC(22)
      ALGBRC(10) = 1.00000/(1.00000+EXP(- (STATES(1) - 1.50000)/16.7000))
      ALGBRC(23) = ( 4.00000*0.00100000)/(( 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(10) - STATES(14))/ALGBRC(23)
      ALGBRC(1) = STATES(1)+47.1300
      ALGBRC(14) = TERNRY(ABS(ALGBRC(1)).GE.CONSTS(12), ( 320.000*ALGBRC(1))/(1.00000 - EXP( - 0.100000*ALGBRC(1))), 3200.00)
      ALGBRC(27) =  80.0000*EXP(- STATES(1)/11.0000)
      RATES(3) =  ALGBRC(14)*(1.00000 - STATES(3)) -  ALGBRC(27)*STATES(3)
      ALGBRC(5) = 1.00000/(1.00000+EXP((STATES(1)+32.0000)/8.00000))+0.600000/(1.00000+EXP((50.0000 - STATES(1))/20.0000))
      ALGBRC(18) = 0.00100000/( 0.0197000*EXP(-  0.0337000*(STATES(1)+10.0000) ** 2.00000)+0.0200000)
      ALGBRC(29) = ALGBRC(5)/ALGBRC(18)
      ALGBRC(34) = (1.00000 - ALGBRC(5))/ALGBRC(18)
      RATES(9) =  ALGBRC(29)*(1.00000 - STATES(9)) -  ALGBRC(34)*STATES(9)
      ALGBRC(11) = ( 10000.0*EXP((STATES(1) - 40.0000)/25.0000))/(1.00000+EXP((STATES(1) - 40.0000)/25.0000))
      ALGBRC(24) = ( 10000.0*EXP(- (STATES(1)+90.0000)/25.0000))/(1.00000+EXP(- (STATES(1)+90.0000)/25.0000))
      ALGBRC(30) = 1.00000/(ALGBRC(11)+ALGBRC(24))
      ALGBRC(35) = ALGBRC(11)/(ALGBRC(11)+ALGBRC(24))
      RATES(15) = (ALGBRC(35) - STATES(15))/ALGBRC(30)
      ALGBRC(12) = 15.0000/(1.00000+EXP((STATES(1)+60.0000)/5.00000))
      ALGBRC(25) = ( 100.000*EXP((STATES(1)+25.0000)/5.00000))/(1.00000+EXP((STATES(1)+25.0000)/5.00000))
      ALGBRC(31) = 1.00000/(ALGBRC(12)+ALGBRC(25))
      ALGBRC(36) = ALGBRC(12)/(ALGBRC(12)+ALGBRC(25))
      RATES(16) = (ALGBRC(36) - STATES(16))/ALGBRC(31)
      ALGBRC(4) = STATES(1)+10.0000
      ALGBRC(17) = 1.00000/(1.00000+EXP(- ALGBRC(4)/6.24000))
      ALGBRC(28) = TERNRY(ABS(ALGBRC(4)).LT.1.00000e-05, 0.00100000/( 0.0350000*6.24000), ( 0.00100000*ALGBRC(17)*(1.00000 - EXP(- ALGBRC(4)/6.24000)))/( 0.0350000*ALGBRC(4)))
      ALGBRC(33) = ALGBRC(17)/ALGBRC(28)
      ALGBRC(38) = (1.00000 - ALGBRC(17))/ALGBRC(28)
      RATES(8) =  ALGBRC(33)*(1.00000 - STATES(8)) -  ALGBRC(38)*STATES(8)
      ALGBRC(46) = 1.00000/(1.00000+EXP((STATES(1)+9.00000)/22.4000))
      ALGBRC(50) =  (( CONSTS(1)*CONSTS(2))/CONSTS(3))*log(CONSTS(23)/STATES(7))
      ALGBRC(51) =  CONSTS(64)*STATES(12)*ALGBRC(46)*(STATES(1) - ALGBRC(50))
      ALGBRC(48) =  0.125000*(1.00000+0.600000/(1.00000+3.80000e-05/STATES(6) ** 1.40000))
      ALGBRC(47) =  (( CONSTS(1)*CONSTS(2))/CONSTS(3))*log((CONSTS(23)+ CONSTS(26)*CONSTS(11))/(STATES(7)+ CONSTS(26)*STATES(2)))
      ALGBRC(49) =  ALGBRC(48)*STATES(13)*STATES(14)*(STATES(1) - ALGBRC(47))
      ALGBRC(58) =  CONSTS(74)*(STATES(1) - ALGBRC(50))
      ALGBRC(59) = EXP(STATES(1)/100.000)
      ALGBRC(60) =  CONSTS(67)*STATES(15) ** 3.00000*STATES(16)*ALGBRC(59)*(STATES(1) - ALGBRC(50))
      ALGBRC(52) = 1020.00/(1.00000+EXP( 0.238500*((STATES(1) - ALGBRC(50)) - 59.2150)))
      ALGBRC(53) = ( 1000.00*( 0.491240*EXP( 0.0803200*((STATES(1) - ALGBRC(50))+5.47600))+EXP( 0.0617500*((STATES(1) - ALGBRC(50)) - 594.310))))/(1.00000+EXP( - 0.514300*((STATES(1) - ALGBRC(50))+4.75300)))
      ALGBRC(54) = ALGBRC(52)/(ALGBRC(52)+ALGBRC(53))
      ALGBRC(55) =  CONSTS(65)*ALGBRC(54)*(STATES(1) - ALGBRC(50))
      ALGBRC(56) = 1.00000/(1.00000+EXP((7.48800 - STATES(1))/5.98000))
      ALGBRC(57) =  CONSTS(27)*ALGBRC(56)*(STATES(1) - ALGBRC(50))
      ALGBRC(66) = 1.00000/(1.00000+ 0.124500*EXP(( - 0.100000*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))+ 0.0365000*CONSTS(68)*EXP(( - STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2))))
      ALGBRC(67) = ( (( CONSTS(37)*ALGBRC(66)*1.00000)/(1.00000+CONSTS(38)/STATES(2) ** 2.00000))*CONSTS(23))/(CONSTS(23)+CONSTS(39))
      ALGBRC(40) = ( (( CONSTS(19)*1.00000 ** 2.00000*STATES(1)*CONSTS(3) ** 2.00000)/( CONSTS(1)*CONSTS(2)))*( CONSTS(15)*STATES(7)*EXP(( 1.00000*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2))) -  CONSTS(16)*CONSTS(23)))/(EXP(( 1.00000*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2))) - 1.00000)
      ALGBRC(41) = 1.00000/(1.00000+STATES(6)/CONSTS(24))
      ALGBRC(44) =  STATES(8)*STATES(9)*ALGBRC(41)*ALGBRC(40)
      ALGBRC(69) = ( (( CONSTS(69)*1.00000 ** 2.00000*STATES(1)*CONSTS(3) ** 2.00000)/( CONSTS(1)*CONSTS(2)))*( CONSTS(15)*STATES(7)*EXP(( 1.00000*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2))) -  CONSTS(16)*CONSTS(23)))/(EXP(( 1.00000*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2))) - 1.00000)
      ALGBRC(71) = ( ALGBRC(69)*1.00000)/(1.00000+CONSTS(40)/STATES(6) ** 3.00000)
      RATES(7) = ( - (ALGBRC(44)+ALGBRC(51)+ALGBRC(49)+ALGBRC(55)+ALGBRC(57)+ALGBRC(58)+ALGBRC(60)+ALGBRC(71)+ - ALGBRC(67)*2.00000)*CONSTS(55))/( CONSTS(73)*CONSTS(3))
      ALGBRC(13) = 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(26) =  (( CONSTS(1)*CONSTS(2))/CONSTS(3))*log(CONSTS(11)/STATES(2))
      ALGBRC(32) =  CONSTS(10)*STATES(3) ** 3.00000*STATES(4)*STATES(5)*(STATES(1) - ALGBRC(26))
      ALGBRC(37) = ( (( CONSTS(17)*2.00000 ** 2.00000*STATES(1)*CONSTS(3) ** 2.00000)/( CONSTS(1)*CONSTS(2)))*( CONSTS(20)*STATES(6)*EXP(( 2.00000*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2))) -  CONSTS(21)*CONSTS(22)))/(EXP(( 2.00000*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2))) - 1.00000)
      ALGBRC(42) =  STATES(8)*STATES(9)*ALGBRC(41)*ALGBRC(37)
      ALGBRC(39) = ( (( CONSTS(18)*1.00000 ** 2.00000*STATES(1)*CONSTS(3) ** 2.00000)/( CONSTS(1)*CONSTS(2)))*( CONSTS(13)*STATES(2)*EXP(( 1.00000*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2))) -  CONSTS(14)*CONSTS(11)))/(EXP(( 1.00000*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2))) - 1.00000)
      ALGBRC(43) =  STATES(8)*STATES(9)*ALGBRC(41)*ALGBRC(39)
      ALGBRC(45) = ALGBRC(42)+ALGBRC(44)+ALGBRC(43)
      ALGBRC(63) =  (( CONSTS(1)*CONSTS(2))/( 2.00000*CONSTS(3)))*log(CONSTS(22)/STATES(6))
      ALGBRC(64) =  CONSTS(25)*STATES(10)*STATES(10)*STATES(11)*(STATES(1) - ALGBRC(63))
      ALGBRC(61) = ( CONSTS(34)*STATES(6))/(CONSTS(33)+STATES(6))
      ALGBRC(62) =  CONSTS(35)*(STATES(1) - ALGBRC(26))
      ALGBRC(65) =  CONSTS(36)*(STATES(1) - ALGBRC(63))
      ALGBRC(73) = ( CONSTS(42)*( EXP(( CONSTS(44)*(CONSTS(41) - 2.00000)*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))*STATES(2) ** CONSTS(41)*CONSTS(22) -  EXP(( (CONSTS(44) - 1.00000)*(CONSTS(41) - 2.00000)*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))*CONSTS(11) ** CONSTS(41)*STATES(6)))/( (1.00000+ CONSTS(43)*( STATES(6)*CONSTS(11) ** CONSTS(41)+ CONSTS(22)*STATES(2) ** CONSTS(41)))*(1.00000+STATES(6)/0.00690000))
      ALGBRC(68) = ( (( CONSTS(69)*1.00000 ** 2.00000*STATES(1)*CONSTS(3) ** 2.00000)/( CONSTS(1)*CONSTS(2)))*( CONSTS(13)*STATES(2)*EXP(( 1.00000*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2))) -  CONSTS(14)*CONSTS(11)))/(EXP(( 1.00000*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2))) - 1.00000)
      ALGBRC(70) = ( ALGBRC(68)*1.00000)/(1.00000+CONSTS(40)/STATES(6) ** 3.00000)
      ALGBRC(72) = ALGBRC(70)+ALGBRC(71)
      RATES(1) =  (- 1.00000/CONSTS(4))*(ALGBRC(32)+ALGBRC(45)+ALGBRC(64)+ALGBRC(51)+ALGBRC(49)+ALGBRC(58)+ALGBRC(60)+ALGBRC(55)+ALGBRC(57)+ALGBRC(61)+ALGBRC(62)+ALGBRC(65)+ALGBRC(67)+ALGBRC(73)+ALGBRC(72)+ALGBRC(13))
      RATES(22) = TERNRY(STATES(19).GT.0.200000, ( - CONSTS(55)*(((ALGBRC(42)+ALGBRC(64)) - ALGBRC(73))+ALGBRC(61)+ALGBRC(65)))/( 2.00000*CONSTS(73)*CONSTS(3)), TERNRY(STATES(20).GT.0.0100000.AND.STATES(19).LE.0.200000, 0.00000,  - 500.000*STATES(22))
      RATES(2) = ( - (ALGBRC(32)+ALGBRC(43)+ALGBRC(62)+ALGBRC(70)+ ALGBRC(73)*3.00000+ ALGBRC(67)*3.00000)*CONSTS(55))/( CONSTS(73)*CONSTS(3))
      ALGBRC(74) =  (- 1.00000/CONSTS(4))*(ALGBRC(32)+ALGBRC(45)+ALGBRC(64)+ALGBRC(51)+ALGBRC(49)+ALGBRC(58)+ALGBRC(60)+ALGBRC(55)+ALGBRC(57)+ALGBRC(61)+ALGBRC(62)+ALGBRC(65)+ALGBRC(67)+ALGBRC(73)+ALGBRC(72)+ALGBRC(13))
      RATES(19) = TERNRY(ALGBRC(74).GT.150000.,  100000.*(1.00000 - STATES(19)) -  500.000*STATES(19),  - 500.000*STATES(19))
      ALGBRC(75) = TERNRY(STATES(22).GT.CONSTS(49),  (( CONSTS(45)*(STATES(22) - CONSTS(49)))/((CONSTS(48)+STATES(22)) - CONSTS(49)))*(1.00000 - STATES(20))*STATES(20), TERNRY(STATES(22).LE.CONSTS(49).AND.STATES(24).GT.0.00000,  CONSTS(46)*(1.00000 - STATES(24))*STATES(24), 0.00000)
      ALGBRC(76) =  ALGBRC(75)*(STATES(17) - STATES(6))
      ALGBRC(77) = ( CONSTS(53)*STATES(6))/(STATES(6)+CONSTS(52))
      ALGBRC(78) =  CONSTS(70)*STATES(18)
      RATES(6) =  (1.00000/(1.00000+( CONSTS(59)*CONSTS(57))/CONSTS(57)+STATES(6) ** 2.00000+( CONSTS(58)*CONSTS(56))/CONSTS(56)+STATES(6) ** 2.00000))*(( - CONSTS(55)*(((ALGBRC(42)+ALGBRC(64)) - ALGBRC(73))+ALGBRC(61)+ALGBRC(65)))/( 2.00000*CONSTS(73)*CONSTS(3))+( ALGBRC(76)*CONSTS(75))/CONSTS(73)+( (ALGBRC(78) - ALGBRC(77))*CONSTS(76))/CONSTS(73))
      ALGBRC(79) = (STATES(18) - STATES(17))/CONSTS(47)
      RATES(17) =  (1.00000/(1.00000+( CONSTS(50)*CONSTS(51))/CONSTS(51)+STATES(17) ** 2.00000))*(ALGBRC(79) - ALGBRC(76))
      RATES(18) = (( - ALGBRC(79)*CONSTS(75))/CONSTS(76) - ALGBRC(78))+ALGBRC(77)
      RETURN
      END
      SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(2) = TERNRY(STATES(1).LT.- 40.0000,  135.000*EXP((80.0000+STATES(1))/- 6.80000), 0.00000)
      ALGBRC(15) = TERNRY(STATES(1).LT.- 40.0000,  3560.00*EXP( 0.0790000*STATES(1))+ 3.10000e+08*EXP( 0.350000*STATES(1)), 1.00000/( 0.000130000*(1.00000+EXP((STATES(1)+10.6600)/- 11.1000))))
      ALGBRC(3) = TERNRY(STATES(1).LT.- 40.0000, ( 1000.00*- ( 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(16) = TERNRY(STATES(1).LT.- 40.0000, ( 121.200*EXP( - 0.0105200*STATES(1)))/(1.00000+EXP( - 0.137800*(STATES(1)+40.1400))), ( 300.000*EXP( - 2.53500e-07*STATES(1)))/(1.00000+EXP( - 0.100000*(STATES(1)+32.0000))))
      ALGBRC(6) = 1.00000/(1.00000+EXP(- (STATES(1)+14.0000)/10.8000))
      ALGBRC(19) = 0.00370000+0.00610000/(1.00000+EXP((STATES(1)+25.0000)/4.50000))
      ALGBRC(7) = 1.00000/(1.00000+EXP((STATES(1)+60.0000)/5.60000))
      ALGBRC(20) = TERNRY(STATES(1).LE.0.00000,  - 0.000875000*STATES(1)+0.0120000, 0.0120000)
      ALGBRC(8) = 1.00000/(1.00000+EXP(- (STATES(1)+21.5000)/7.50000))
      ALGBRC(21) = 0.00100000/(( 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(9) = 1.00000/(1.00000+EXP(- (STATES(1) - 1.50000)/16.7000))
      ALGBRC(22) = 0.00100000/(( 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(10) = 1.00000/(1.00000+EXP(- (STATES(1) - 1.50000)/16.7000))
      ALGBRC(23) = ( 4.00000*0.00100000)/(( 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(14) = TERNRY(ABS(ALGBRC(1)).GE.CONSTS(12), ( 320.000*ALGBRC(1))/(1.00000 - EXP( - 0.100000*ALGBRC(1))), 3200.00)
      ALGBRC(27) =  80.0000*EXP(- STATES(1)/11.0000)
      ALGBRC(5) = 1.00000/(1.00000+EXP((STATES(1)+32.0000)/8.00000))+0.600000/(1.00000+EXP((50.0000 - STATES(1))/20.0000))
      ALGBRC(18) = 0.00100000/( 0.0197000*EXP(-  0.0337000*(STATES(1)+10.0000) ** 2.00000)+0.0200000)
      ALGBRC(29) = ALGBRC(5)/ALGBRC(18)
      ALGBRC(34) = (1.00000 - ALGBRC(5))/ALGBRC(18)
      ALGBRC(11) = ( 10000.0*EXP((STATES(1) - 40.0000)/25.0000))/(1.00000+EXP((STATES(1) - 40.0000)/25.0000))
      ALGBRC(24) = ( 10000.0*EXP(- (STATES(1)+90.0000)/25.0000))/(1.00000+EXP(- (STATES(1)+90.0000)/25.0000))
      ALGBRC(30) = 1.00000/(ALGBRC(11)+ALGBRC(24))
      ALGBRC(35) = ALGBRC(11)/(ALGBRC(11)+ALGBRC(24))
      ALGBRC(12) = 15.0000/(1.00000+EXP((STATES(1)+60.0000)/5.00000))
      ALGBRC(25) = ( 100.000*EXP((STATES(1)+25.0000)/5.00000))/(1.00000+EXP((STATES(1)+25.0000)/5.00000))
      ALGBRC(31) = 1.00000/(ALGBRC(12)+ALGBRC(25))
      ALGBRC(36) = ALGBRC(12)/(ALGBRC(12)+ALGBRC(25))
      ALGBRC(4) = STATES(1)+10.0000
      ALGBRC(17) = 1.00000/(1.00000+EXP(- ALGBRC(4)/6.24000))
      ALGBRC(28) = TERNRY(ABS(ALGBRC(4)).LT.1.00000e-05, 0.00100000/( 0.0350000*6.24000), ( 0.00100000*ALGBRC(17)*(1.00000 - EXP(- ALGBRC(4)/6.24000)))/( 0.0350000*ALGBRC(4)))
      ALGBRC(33) = ALGBRC(17)/ALGBRC(28)
      ALGBRC(38) = (1.00000 - ALGBRC(17))/ALGBRC(28)
      ALGBRC(46) = 1.00000/(1.00000+EXP((STATES(1)+9.00000)/22.4000))
      ALGBRC(50) =  (( CONSTS(1)*CONSTS(2))/CONSTS(3))*log(CONSTS(23)/STATES(7))
      ALGBRC(51) =  CONSTS(64)*STATES(12)*ALGBRC(46)*(STATES(1) - ALGBRC(50))
      ALGBRC(48) =  0.125000*(1.00000+0.600000/(1.00000+3.80000e-05/STATES(6) ** 1.40000))
      ALGBRC(47) =  (( CONSTS(1)*CONSTS(2))/CONSTS(3))*log((CONSTS(23)+ CONSTS(26)*CONSTS(11))/(STATES(7)+ CONSTS(26)*STATES(2)))
      ALGBRC(49) =  ALGBRC(48)*STATES(13)*STATES(14)*(STATES(1) - ALGBRC(47))
      ALGBRC(58) =  CONSTS(74)*(STATES(1) - ALGBRC(50))
      ALGBRC(59) = EXP(STATES(1)/100.000)
      ALGBRC(60) =  CONSTS(67)*STATES(15) ** 3.00000*STATES(16)*ALGBRC(59)*(STATES(1) - ALGBRC(50))
      ALGBRC(52) = 1020.00/(1.00000+EXP( 0.238500*((STATES(1) - ALGBRC(50)) - 59.2150)))
      ALGBRC(53) = ( 1000.00*( 0.491240*EXP( 0.0803200*((STATES(1) - ALGBRC(50))+5.47600))+EXP( 0.0617500*((STATES(1) - ALGBRC(50)) - 594.310))))/(1.00000+EXP( - 0.514300*((STATES(1) - ALGBRC(50))+4.75300)))
      ALGBRC(54) = ALGBRC(52)/(ALGBRC(52)+ALGBRC(53))
      ALGBRC(55) =  CONSTS(65)*ALGBRC(54)*(STATES(1) - ALGBRC(50))
      ALGBRC(56) = 1.00000/(1.00000+EXP((7.48800 - STATES(1))/5.98000))
      ALGBRC(57) =  CONSTS(27)*ALGBRC(56)*(STATES(1) - ALGBRC(50))
      ALGBRC(66) = 1.00000/(1.00000+ 0.124500*EXP(( - 0.100000*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))+ 0.0365000*CONSTS(68)*EXP(( - STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2))))
      ALGBRC(67) = ( (( CONSTS(37)*ALGBRC(66)*1.00000)/(1.00000+CONSTS(38)/STATES(2) ** 2.00000))*CONSTS(23))/(CONSTS(23)+CONSTS(39))
      ALGBRC(40) = ( (( CONSTS(19)*1.00000 ** 2.00000*STATES(1)*CONSTS(3) ** 2.00000)/( CONSTS(1)*CONSTS(2)))*( CONSTS(15)*STATES(7)*EXP(( 1.00000*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2))) -  CONSTS(16)*CONSTS(23)))/(EXP(( 1.00000*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2))) - 1.00000)
      ALGBRC(41) = 1.00000/(1.00000+STATES(6)/CONSTS(24))
      ALGBRC(44) =  STATES(8)*STATES(9)*ALGBRC(41)*ALGBRC(40)
      ALGBRC(69) = ( (( CONSTS(69)*1.00000 ** 2.00000*STATES(1)*CONSTS(3) ** 2.00000)/( CONSTS(1)*CONSTS(2)))*( CONSTS(15)*STATES(7)*EXP(( 1.00000*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2))) -  CONSTS(16)*CONSTS(23)))/(EXP(( 1.00000*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2))) - 1.00000)
      ALGBRC(71) = ( ALGBRC(69)*1.00000)/(1.00000+CONSTS(40)/STATES(6) ** 3.00000)
      ALGBRC(13) = 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(26) =  (( CONSTS(1)*CONSTS(2))/CONSTS(3))*log(CONSTS(11)/STATES(2))
      ALGBRC(32) =  CONSTS(10)*STATES(3) ** 3.00000*STATES(4)*STATES(5)*(STATES(1) - ALGBRC(26))
      ALGBRC(37) = ( (( CONSTS(17)*2.00000 ** 2.00000*STATES(1)*CONSTS(3) ** 2.00000)/( CONSTS(1)*CONSTS(2)))*( CONSTS(20)*STATES(6)*EXP(( 2.00000*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2))) -  CONSTS(21)*CONSTS(22)))/(EXP(( 2.00000*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2))) - 1.00000)
      ALGBRC(42) =  STATES(8)*STATES(9)*ALGBRC(41)*ALGBRC(37)
      ALGBRC(39) = ( (( CONSTS(18)*1.00000 ** 2.00000*STATES(1)*CONSTS(3) ** 2.00000)/( CONSTS(1)*CONSTS(2)))*( CONSTS(13)*STATES(2)*EXP(( 1.00000*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2))) -  CONSTS(14)*CONSTS(11)))/(EXP(( 1.00000*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2))) - 1.00000)
      ALGBRC(43) =  STATES(8)*STATES(9)*ALGBRC(41)*ALGBRC(39)
      ALGBRC(45) = ALGBRC(42)+ALGBRC(44)+ALGBRC(43)
      ALGBRC(63) =  (( CONSTS(1)*CONSTS(2))/( 2.00000*CONSTS(3)))*log(CONSTS(22)/STATES(6))
      ALGBRC(64) =  CONSTS(25)*STATES(10)*STATES(10)*STATES(11)*(STATES(1) - ALGBRC(63))
      ALGBRC(61) = ( CONSTS(34)*STATES(6))/(CONSTS(33)+STATES(6))
      ALGBRC(62) =  CONSTS(35)*(STATES(1) - ALGBRC(26))
      ALGBRC(65) =  CONSTS(36)*(STATES(1) - ALGBRC(63))
      ALGBRC(73) = ( CONSTS(42)*( EXP(( CONSTS(44)*(CONSTS(41) - 2.00000)*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))*STATES(2) ** CONSTS(41)*CONSTS(22) -  EXP(( (CONSTS(44) - 1.00000)*(CONSTS(41) - 2.00000)*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))*CONSTS(11) ** CONSTS(41)*STATES(6)))/( (1.00000+ CONSTS(43)*( STATES(6)*CONSTS(11) ** CONSTS(41)+ CONSTS(22)*STATES(2) ** CONSTS(41)))*(1.00000+STATES(6)/0.00690000))
      ALGBRC(68) = ( (( CONSTS(69)*1.00000 ** 2.00000*STATES(1)*CONSTS(3) ** 2.00000)/( CONSTS(1)*CONSTS(2)))*( CONSTS(13)*STATES(2)*EXP(( 1.00000*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2))) -  CONSTS(14)*CONSTS(11)))/(EXP(( 1.00000*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2))) - 1.00000)
      ALGBRC(70) = ( ALGBRC(68)*1.00000)/(1.00000+CONSTS(40)/STATES(6) ** 3.00000)
      ALGBRC(72) = ALGBRC(70)+ALGBRC(71)
      ALGBRC(74) =  (- 1.00000/CONSTS(4))*(ALGBRC(32)+ALGBRC(45)+ALGBRC(64)+ALGBRC(51)+ALGBRC(49)+ALGBRC(58)+ALGBRC(60)+ALGBRC(55)+ALGBRC(57)+ALGBRC(61)+ALGBRC(62)+ALGBRC(65)+ALGBRC(67)+ALGBRC(73)+ALGBRC(72)+ALGBRC(13))
      ALGBRC(75) = TERNRY(STATES(22).GT.CONSTS(49),  (( CONSTS(45)*(STATES(22) - CONSTS(49)))/((CONSTS(48)+STATES(22)) - CONSTS(49)))*(1.00000 - STATES(20))*STATES(20), TERNRY(STATES(22).LE.CONSTS(49).AND.STATES(24).GT.0.00000,  CONSTS(46)*(1.00000 - STATES(24))*STATES(24), 0.00000)
      ALGBRC(76) =  ALGBRC(75)*(STATES(17) - STATES(6))
      ALGBRC(77) = ( CONSTS(53)*STATES(6))/(STATES(6)+CONSTS(52))
      ALGBRC(78) =  CONSTS(70)*STATES(18)
      ALGBRC(79) = (STATES(18) - STATES(17))/CONSTS(47)
      RETURN
      END
      REAL FUNCTION TERNRY(TEST, VALA, VALB)
      LOGICAL TEST
      REAL VALA, VALB
      IF (TEST) THEN
        TERNRY = VALA
      ELSE
        TERNRY = VALB
      ENDIF
      RETURN
      END