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 95 entries in the algebraic variable array.
C There are a total of 39 entries in each of the rate and state variable arrays.
C There are a total of 80 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(12) is I_st in component membrane (microA_per_microF).
C ALGBRC(38) is i_Na in component fast_sodium_current (microA_per_microF).
C ALGBRC(56) is i_Ca_L in component L_type_Ca_channel (microA_per_microF).
C ALGBRC(80) is i_Ca_T in component T_type_Ca_channel (microA_per_microF).
C ALGBRC(60) is i_Kr in component rapid_delayed_rectifier_potassium_current (microA_per_microF).
C ALGBRC(63) is i_Ks in component slow_delayed_rectifier_potassium_current (microA_per_microF).
C ALGBRC(73) is i_K_Na in component sodium_activated_potassium_current (microA_per_microF).
C ALGBRC(74) is i_K_ATP in component ATP_sensitive_potassium_current (microA_per_microF).
C ALGBRC(76) is i_to in component transient_outward_current (microA_per_microF).
C ALGBRC(89) is i_NaCa in component Na_Ca_exchanger (microA_per_microF).
C ALGBRC(68) is i_K1 in component time_independent_potassium_current (microA_per_microF).
C ALGBRC(70) is i_Kp in component plateau_potassium_current (microA_per_microF).
C ALGBRC(77) is i_p_Ca in component sarcolemmal_calcium_pump (microA_per_microF).
C ALGBRC(78) is i_Na_b in component sodium_background_current (microA_per_microF).
C ALGBRC(81) is i_Ca_b in component calcium_background_current (microA_per_microF).
C ALGBRC(83) is i_NaK in component sodium_potassium_pump (microA_per_microF).
C ALGBRC(88) is i_ns_Ca in component non_specific_calcium_activated_current (microA_per_microF).
C ALGBRC(90) 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 (dimensionless).
C CONSTS(8) is stim_duration in component membrane (second).
C CONSTS(9) is stim_amplitude in component membrane (microA_per_microF).
C ALGBRC(24) is E_Na in component fast_sodium_current (millivolt).
C CONSTS(10) is g_Na in component fast_sodium_current (milliS_per_microF).
C CONSTS(11) is Nao in component ionic_concentrations (millimolar).
C STATES(2) is Nai in component ionic_concentrations (millimolar).
C ALGBRC(31) is P_O_Na in component Na_channel_states (dimensionless).
C STATES(3) is P_LO in component Na_channel_states (dimensionless).
C STATES(4) is P_UO in component Na_channel_states (dimensionless).
C STATES(5) is P_LC1 in component Na_channel_states (dimensionless).
C STATES(6) is P_LC2 in component Na_channel_states (dimensionless).
C STATES(7) is P_LC3 in component Na_channel_states (dimensionless).
C STATES(8) is P_UIF in component Na_channel_states (dimensionless).
C STATES(9) is P_UC1 in component Na_channel_states (dimensionless).
C STATES(10) is P_UC2 in component Na_channel_states (dimensionless).
C STATES(11) is P_UC3 in component Na_channel_states (dimensionless).
C STATES(12) is P_UIC3 in component Na_channel_states (dimensionless).
C STATES(13) is P_UIC2 in component Na_channel_states (dimensionless).
C STATES(14) is P_UIM1 in component Na_channel_states (dimensionless).
C STATES(15) is P_UIM2 in component Na_channel_states (dimensionless).
C ALGBRC(1) is alpha_11 in component Na_channel_states (per_second).
C ALGBRC(32) is beta_11 in component Na_channel_states (per_second).
C ALGBRC(13) is alpha_12 in component Na_channel_states (per_second).
C ALGBRC(39) is beta_12 in component Na_channel_states (per_second).
C ALGBRC(25) is alpha_13 in component Na_channel_states (per_second).
C ALGBRC(43) is beta_13 in component Na_channel_states (per_second).
C ALGBRC(45) is alpha_2 in component Na_channel_states (per_second).
C ALGBRC(51) is beta_2 in component Na_channel_states (per_second).
C ALGBRC(47) is alpha_3 in component Na_channel_states (per_second).
C ALGBRC(49) is beta_3 in component Na_channel_states (per_second).
C ALGBRC(53) is alpha_4 in component Na_channel_states (per_second).
C ALGBRC(55) is beta_4 in component Na_channel_states (per_second).
C ALGBRC(57) is alpha_5 in component Na_channel_states (per_second).
C ALGBRC(59) is beta_5 in component Na_channel_states (per_second).
C ALGBRC(50) is i_CaCa in component L_type_Ca_channel (microA_per_microF).
C ALGBRC(54) is i_CaK in component L_type_Ca_channel (microA_per_microF).
C ALGBRC(52) 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 ALGBRC(42) is I_CaCa in component L_type_Ca_channel (microA_per_microF).
C ALGBRC(46) 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(16) is P_Ca in component L_type_Ca_channel (cm_per_second).
C CONSTS(17) is P_Na in component L_type_Ca_channel (cm_per_second).
C CONSTS(18) is P_K in component L_type_Ca_channel (cm_per_second).
C CONSTS(19) is gamma_Cai in component L_type_Ca_channel (dimensionless).
C CONSTS(20) is gamma_Cao in component L_type_Ca_channel (dimensionless).
C STATES(16) 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(17) is Ki in component ionic_concentrations (millimolar).
C STATES(18) is d in component L_type_Ca_channel_d_gate (dimensionless).
C STATES(19) is f in component L_type_Ca_channel_f_gate (dimensionless).
C ALGBRC(48) 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(40) is beta_d in component L_type_Ca_channel_d_gate (per_second).
C ALGBRC(14) is d_infinity in component L_type_Ca_channel_d_gate (dimensionless).
C ALGBRC(26) is tau_d in component L_type_Ca_channel_d_gate (second).
C ALGBRC(2) is E0_d in component L_type_Ca_channel_d_gate (millivolt).
C ALGBRC(27) 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(3) is f_infinity in component L_type_Ca_channel_f_gate (dimensionless).
C ALGBRC(15) is tau_f in component L_type_Ca_channel_f_gate (second).
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(79) is E_Ca in component calcium_background_current (millivolt).
C STATES(20) is b in component T_type_Ca_channel_b_gate (dimensionless).
C STATES(21) is g in component T_type_Ca_channel_g_gate (dimensionless).
C ALGBRC(4) is b_inf in component T_type_Ca_channel_b_gate (dimensionless).
C ALGBRC(16) is tau_b in component T_type_Ca_channel_b_gate (second).
C ALGBRC(5) is g_inf in component T_type_Ca_channel_g_gate (dimensionless).
C ALGBRC(17) is tau_g in component T_type_Ca_channel_g_gate (second).
C CONSTS(67) is g_Kr in component rapid_delayed_rectifier_potassium_current (milliS_per_microF).
C ALGBRC(58) is E_Kr in component rapid_delayed_rectifier_potassium_current (millivolt).
C STATES(22) is P_O in component Kr_channel_states (dimensionless).
C STATES(23) is P_C1 in component Kr_channel_states (dimensionless).
C STATES(24) is P_C2 in component Kr_channel_states (dimensionless).
C STATES(25) is P_C3 in component Kr_channel_states (dimensionless).
C STATES(26) is P_I in component Kr_channel_states (dimensionless).
C ALGBRC(6) is alpha in component Kr_channel_states (per_second).
C ALGBRC(18) is beta in component Kr_channel_states (per_second).
C CONSTS(25) is alpha_in in component Kr_channel_states (per_second).
C CONSTS(26) is beta_in in component Kr_channel_states (per_second).
C ALGBRC(7) is alpha_alpha in component Kr_channel_states (per_second).
C ALGBRC(19) is beta_beta in component Kr_channel_states (per_second).
C ALGBRC(28) is alpha_i in component Kr_channel_states (per_second).
C ALGBRC(35) is beta_i in component Kr_channel_states (per_second).
C ALGBRC(41) is mu in component Kr_channel_states (per_second).
C ALGBRC(62) is g_Ks in component slow_delayed_rectifier_potassium_current (milliS_per_microF).
C ALGBRC(61) 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(27) is xs1 in component slow_delayed_rectifier_potassium_current_xs1_gate (dimensionless).
C STATES(28) is xs2 in component slow_delayed_rectifier_potassium_current_xs2_gate (dimensionless).
C ALGBRC(8) is xs1_infinity in component slow_delayed_rectifier_potassium_current_xs1_gate (dimensionless).
C ALGBRC(20) is tau_xs1 in component slow_delayed_rectifier_potassium_current_xs1_gate (second).
C ALGBRC(9) is xs2_infinity in component slow_delayed_rectifier_potassium_current_xs2_gate (dimensionless).
C ALGBRC(21) is tau_xs2 in component slow_delayed_rectifier_potassium_current_xs2_gate (second).
C ALGBRC(64) is E_K in component time_independent_potassium_current (millivolt).
C CONSTS(68) is g_K1 in component time_independent_potassium_current (milliS_per_cm2).
C ALGBRC(67) is K1_infinity in component time_independent_potassium_current_K1_gate (dimensionless).
C ALGBRC(65) is alpha_K1 in component time_independent_potassium_current_K1_gate (per_second).
C ALGBRC(66) is beta_K1 in component time_independent_potassium_current_K1_gate (per_second).
C CONSTS(28) is g_Kp in component plateau_potassium_current (milliS_per_microF).
C ALGBRC(69) is Kp in component plateau_potassium_current (dimensionless).
C CONSTS(69) is g_K_Na in component sodium_activated_potassium_current (milliS_per_microF).
C CONSTS(29) is nKNa in component sodium_activated_potassium_current (dimensionless).
C ALGBRC(71) is pona in component sodium_activated_potassium_current (dimensionless).
C ALGBRC(72) is pov in component sodium_activated_potassium_current (dimensionless).
C CONSTS(30) is kdKNa in component sodium_activated_potassium_current (millimolar).
C CONSTS(70) is g_K_ATP in component ATP_sensitive_potassium_current (milliS_per_microF).
C CONSTS(31) is i_K_ATP_on in component ATP_sensitive_potassium_current (dimensionless).
C CONSTS(32) is nATP in component ATP_sensitive_potassium_current (dimensionless).
C CONSTS(33) is nicholsarea in component ATP_sensitive_potassium_current (dimensionless).
C CONSTS(34) is ATPi in component ATP_sensitive_potassium_current (millimolar).
C CONSTS(35) is hATP in component ATP_sensitive_potassium_current (dimensionless).
C CONSTS(36) is kATP in component ATP_sensitive_potassium_current (millimolar).
C CONSTS(76) is pATP in component ATP_sensitive_potassium_current (dimensionless).
C CONSTS(78) is GKbaraATP in component ATP_sensitive_potassium_current (milliS_per_microF).
C CONSTS(71) is g_to in component transient_outward_current (milliS_per_microF).
C ALGBRC(75) is rvdv in component transient_outward_current (dimensionless).
C STATES(29) is zdv in component transient_outward_current_zdv_gate (dimensionless).
C STATES(30) is ydv in component transient_outward_current_ydv_gate (dimensionless).
C ALGBRC(10) is alpha_zdv in component transient_outward_current_zdv_gate (per_second).
C ALGBRC(22) is beta_zdv in component transient_outward_current_zdv_gate (per_second).
C ALGBRC(29) is tau_zdv in component transient_outward_current_zdv_gate (second).
C ALGBRC(36) is zdv_ss in component transient_outward_current_zdv_gate (dimensionless).
C ALGBRC(11) is alpha_ydv in component transient_outward_current_ydv_gate (per_second).
C ALGBRC(23) is beta_ydv in component transient_outward_current_ydv_gate (per_second).
C ALGBRC(30) is tau_ydv in component transient_outward_current_ydv_gate (second).
C ALGBRC(37) is ydv_ss in component transient_outward_current_ydv_gate (dimensionless).
C CONSTS(37) is K_mpCa in component sarcolemmal_calcium_pump (millimolar).
C CONSTS(38) is I_pCa in component sarcolemmal_calcium_pump (microA_per_microF).
C CONSTS(39) is g_Nab in component sodium_background_current (milliS_per_microF).
C CONSTS(40) is g_Cab in component calcium_background_current (milliS_per_microF).
C CONSTS(41) is I_NaK in component sodium_potassium_pump (microA_per_microF).
C ALGBRC(82) is f_NaK in component sodium_potassium_pump (dimensionless).
C CONSTS(42) is K_mNai in component sodium_potassium_pump (millimolar).
C CONSTS(43) is K_mKo in component sodium_potassium_pump (millimolar).
C CONSTS(72) is sigma in component sodium_potassium_pump (dimensionless).
C ALGBRC(86) is i_ns_Na in component non_specific_calcium_activated_current (microA_per_microF).
C ALGBRC(87) is i_ns_K in component non_specific_calcium_activated_current (microA_per_microF).
C CONSTS(73) is P_ns_Ca in component non_specific_calcium_activated_current (cm_per_second).
C ALGBRC(84) is I_ns_Na in component non_specific_calcium_activated_current (microA_per_microF).
C ALGBRC(85) is I_ns_K in component non_specific_calcium_activated_current (microA_per_microF).
C CONSTS(44) is K_m_ns_Ca in component non_specific_calcium_activated_current (millimolar).
C CONSTS(45) is c1 in component Na_Ca_exchanger (microA_per_microF).
C CONSTS(46) is c2 in component Na_Ca_exchanger (millimolar).
C CONSTS(47) is gamma in component Na_Ca_exchanger (dimensionless).
C ALGBRC(92) is i_rel in component calcium_dynamics (millimolar_per_second).
C ALGBRC(93) is i_up in component calcium_dynamics (millimolar_per_second).
C ALGBRC(94) is i_leak in component calcium_dynamics (millimolar_per_second).
C ALGBRC(95) is i_tr in component calcium_dynamics (millimolar_per_second).
C ALGBRC(91) is G_rel in component calcium_dynamics (per_second).
C CONSTS(48) is G_rel_max in component calcium_dynamics (per_second).
C CONSTS(49) is G_rel_overload in component calcium_dynamics (per_second).
C CONSTS(50) is tau_tr in component calcium_dynamics (second).
C CONSTS(51) is K_mrel in component calcium_dynamics (millimolar).
C CONSTS(52) is delta_Ca_ith in component calcium_dynamics (millimolar).
C CONSTS(53) is CSQN_max in component calcium_dynamics (millimolar).
C CONSTS(54) is K_mCSQN in component calcium_dynamics (millimolar).
C CONSTS(55) is K_mup in component calcium_dynamics (millimolar).
C CONSTS(74) is K_leak in component calcium_dynamics (per_second).
C CONSTS(56) is I_up in component calcium_dynamics (millimolar_per_second).
C CONSTS(57) is Ca_NSR_max in component calcium_dynamics (millimolar).
C STATES(31) is Ca_JSR in component calcium_dynamics (millimolar).
C STATES(32) is Ca_NSR in component calcium_dynamics (millimolar).
C CONSTS(77) is V_myo in component ionic_concentrations (micro_litre).
C CONSTS(58) is A_cap in component ionic_concentrations (mm2).
C CONSTS(79) is V_JSR in component calcium_dynamics (micro_litre).
C CONSTS(80) is V_NSR in component calcium_dynamics (micro_litre).
C CONSTS(59) is K_mTn in component calcium_dynamics (millimolar).
C CONSTS(60) is K_mCMDN in component calcium_dynamics (millimolar).
C CONSTS(61) is Tn_max in component calcium_dynamics (millimolar).
C CONSTS(62) is CMDN_max in component calcium_dynamics (millimolar).
C STATES(33) is APtrack in component calcium_dynamics (dimensionless).
C STATES(34) is APtrack2 in component calcium_dynamics (dimensionless).
C STATES(35) is APtrack3 in component calcium_dynamics (dimensionless).
C STATES(36) is Cainfluxtrack in component calcium_dynamics (dimensionless).
C STATES(37) is OVRLDtrack in component calcium_dynamics (dimensionless).
C STATES(38) is OVRLDtrack2 in component calcium_dynamics (dimensionless).
C STATES(39) is OVRLDtrack3 in component calcium_dynamics (dimensionless).
C CONSTS(63) is CSQNthresh in component calcium_dynamics (millimolar).
C CONSTS(64) is Logicthresh in component calcium_dynamics (dimensionless).
C CONSTS(65) is preplength in component ionic_concentrations (mm).
C CONSTS(66) is radius in component ionic_concentrations (mm).
C CONSTS(75) is volume in component ionic_concentrations (micro_litre).
C RATES(1) is d/dt V in component membrane (millivolt).
C RATES(7) is d/dt P_LC3 in component Na_channel_states (dimensionless).
C RATES(6) is d/dt P_LC2 in component Na_channel_states (dimensionless).
C RATES(5) is d/dt P_LC1 in component Na_channel_states (dimensionless).
C RATES(3) is d/dt P_LO in component Na_channel_states (dimensionless).
C RATES(8) is d/dt P_UIF in component Na_channel_states (dimensionless).
C RATES(12) is d/dt P_UIC3 in component Na_channel_states (dimensionless).
C RATES(13) is d/dt P_UIC2 in component Na_channel_states (dimensionless).
C RATES(14) is d/dt P_UIM1 in component Na_channel_states (dimensionless).
C RATES(15) is d/dt P_UIM2 in component Na_channel_states (dimensionless).
C RATES(11) is d/dt P_UC3 in component Na_channel_states (dimensionless).
C RATES(10) is d/dt P_UC2 in component Na_channel_states (dimensionless).
C RATES(9) is d/dt P_UC1 in component Na_channel_states (dimensionless).
C RATES(4) is d/dt P_UO in component Na_channel_states (dimensionless).
C RATES(18) is d/dt d in component L_type_Ca_channel_d_gate (dimensionless).
C RATES(19) is d/dt f in component L_type_Ca_channel_f_gate (dimensionless).
C RATES(20) is d/dt b in component T_type_Ca_channel_b_gate (dimensionless).
C RATES(21) is d/dt g in component T_type_Ca_channel_g_gate (dimensionless).
C RATES(25) is d/dt P_C3 in component Kr_channel_states (dimensionless).
C RATES(24) is d/dt P_C2 in component Kr_channel_states (dimensionless).
C RATES(23) is d/dt P_C1 in component Kr_channel_states (dimensionless).
C RATES(22) is d/dt P_O in component Kr_channel_states (dimensionless).
C RATES(26) is d/dt P_I in component Kr_channel_states (dimensionless).
C RATES(27) is d/dt xs1 in component slow_delayed_rectifier_potassium_current_xs1_gate (dimensionless).
C RATES(28) is d/dt xs2 in component slow_delayed_rectifier_potassium_current_xs2_gate (dimensionless).
C RATES(29) is d/dt zdv in component transient_outward_current_zdv_gate (dimensionless).
C RATES(30) is d/dt ydv in component transient_outward_current_ydv_gate (dimensionless).
C RATES(33) is d/dt APtrack in component calcium_dynamics (dimensionless).
C RATES(34) is d/dt APtrack2 in component calcium_dynamics (dimensionless).
C RATES(35) is d/dt APtrack3 in component calcium_dynamics (dimensionless).
C RATES(36) is d/dt Cainfluxtrack in component calcium_dynamics (dimensionless).
C RATES(37) is d/dt OVRLDtrack in component calcium_dynamics (dimensionless).
C RATES(38) is d/dt OVRLDtrack2 in component calcium_dynamics (dimensionless).
C RATES(39) is d/dt OVRLDtrack3 in component calcium_dynamics (dimensionless).
C RATES(31) is d/dt Ca_JSR in component calcium_dynamics (millimolar).
C RATES(32) is d/dt Ca_NSR in component calcium_dynamics (millimolar).
C RATES(16) is d/dt Cai in component calcium_dynamics (millimolar).
C RATES(2) is d/dt Nai in component ionic_concentrations (millimolar).
C RATES(17) is d/dt Ki in component ionic_concentrations (millimolar).
C
      SUBROUTINE initConsts(CONSTS, RATES, STATES)
      REAL CONSTS(*), RATES(*), STATES(*)
      STATES(1) = -88.78
      CONSTS(1) = 8314
      CONSTS(2) = 310
      CONSTS(3) = 96485
      CONSTS(4) = 0.001
      CONSTS(5) = 3
      CONSTS(6) = 9
      CONSTS(7) = 1
      CONSTS(8) = 0.002
      CONSTS(9) = -50
      CONSTS(10) = 23.5
      CONSTS(11) = 132
      STATES(2) = 10.53
      STATES(3) = 4.68e-17
      STATES(4) = 4.45e-13
      STATES(5) = 5.91e-14
      STATES(6) = 1.218e-11
      STATES(7) = 9.447e-10
      STATES(8) = 2.412e-10
      STATES(9) = 5.62e-10
      STATES(10) = 1.16e-7
      STATES(11) = 8.98e-6
      STATES(12) = 3.855e-6
      STATES(13) = 4.97e-8
      STATES(14) = 7.206e-11
      STATES(15) = 1.24e-12
      CONSTS(12) = 0.75
      CONSTS(13) = 0.75
      CONSTS(14) = 0.75
      CONSTS(15) = 0.75
      CONSTS(16) = 0.00054
      CONSTS(17) = 6.75e-7
      CONSTS(18) = 1.93e-7
      CONSTS(19) = 1
      CONSTS(20) = 0.341
      STATES(16) = 0.000104
      CONSTS(21) = 1.8
      CONSTS(22) = 4.5
      STATES(17) = 140.56
      STATES(18) = 3.289e-6
      STATES(19) = 0.99975
      CONSTS(23) = 0.0006
      CONSTS(24) = 0.05
      STATES(20) = 0.000983
      STATES(21) = 0.9942
      STATES(22) = 1.104e-10
      STATES(23) = 3.408e-8
      STATES(24) = 1.69e-8
      STATES(25) = 4.949e-6
      STATES(26) = 3.386e-11
      CONSTS(25) = 2172
      CONSTS(26) = 1077
      CONSTS(27) = 0.01833
      STATES(27) = 0.00447
      STATES(28) = 0.00447
      CONSTS(28) = 0.00552
      CONSTS(29) = 2.8
      CONSTS(30) = 66
      CONSTS(31) = 1
      CONSTS(32) = 0.24
      CONSTS(33) = 5e-5
      CONSTS(34) = 3
      CONSTS(35) = 2
      CONSTS(36) = 0.00025
      STATES(29) = 0.01167
      STATES(30) = 0.99998
      CONSTS(37) = 0.0005
      CONSTS(38) = 1.15
      CONSTS(39) = 0.004
      CONSTS(40) = 0.003016
      CONSTS(41) = 2.25
      CONSTS(42) = 10
      CONSTS(43) = 1.5
      CONSTS(44) = 0.0012
      CONSTS(45) = 0.00025
      CONSTS(46) = 0.0001
      CONSTS(47) = 0.15
      CONSTS(48) = 60000
      CONSTS(49) = 4000
      CONSTS(50) = 0.18
      CONSTS(51) = 0.0008
      CONSTS(52) = 0.00018
      CONSTS(53) = 10
      CONSTS(54) = 0.8
      CONSTS(55) = 0.00092
      CONSTS(56) = 8.75
      CONSTS(57) = 15
      STATES(31) = 1.516
      STATES(32) = 1.518
      CONSTS(58) = 1.434e-7
      CONSTS(59) = 0.0005
      CONSTS(60) = 0.00238
      CONSTS(61) = 0.07
      CONSTS(62) = 0.05
      STATES(33) = 0
      STATES(34) = 0
      STATES(35) = 0
      STATES(36) = 0
      STATES(37) = 0
      STATES(38) = 0
      STATES(39) = 0
      CONSTS(63) = 0.7
      CONSTS(64) = 0.98
      CONSTS(65) = 0.001
      CONSTS(66) = 1.1e-4
      CONSTS(67) =  0.0135000*CONSTS(22) ** 0.590000
      CONSTS(68) =  0.750000* (CONSTS(22)/5.40000) ** (1.0 / 2)
      CONSTS(69) =  0.00000*0.128480
      CONSTS(70) = ( CONSTS(31)*0.000193000)/CONSTS(33)
      CONSTS(71) = 1.10000
      CONSTS(72) =  (1.00000/7.00000)*(EXP(CONSTS(11)/67.3000) - 1.00000)
      CONSTS(73) =  0.00000*1.75000e-07
      CONSTS(74) = CONSTS(56)/CONSTS(57)
      CONSTS(75) =   3.14159265358979*CONSTS(65)*CONSTS(66) ** 2.00000
      CONSTS(76) = 1.00000/(1.00000+CONSTS(34)/CONSTS(36) ** CONSTS(35))
      CONSTS(77) =  0.680000*CONSTS(75)
      CONSTS(78) =  CONSTS(70)*CONSTS(76)*CONSTS(22)/4.00000 ** CONSTS(32)
      CONSTS(79) =  (0.00480000/0.680000)*CONSTS(77)
      CONSTS(80) =  (0.0552000/0.680000)*CONSTS(77)
      RETURN
      END
      SUBROUTINE computeRates(VOI, CONSTS,  RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      RATES(34) = TERNRY(STATES(33).LT.0.200000.AND.STATES(33).GT.0.180000,  100000.*(1.00000 - STATES(34)) -  500.000*STATES(34),  - 500.000*STATES(34))
      RATES(35) = TERNRY(STATES(33).LT.0.200000.AND.STATES(33).GT.0.180000,  100000.*(1.00000 - STATES(35)) -  500.000*STATES(35),  - 10.0000*STATES(35))
      RATES(37) = TERNRY(1.00000/(1.00000+CONSTS(54)/STATES(32)).GT.CONSTS(63).AND.STATES(39).LT.0.370000.AND.STATES(35).LT.0.370000,  50000.0*(1.00000 - STATES(37)),  - 500.000*STATES(37))
      RATES(38) = TERNRY(STATES(37).GT.CONSTS(64).AND.STATES(38).LT.CONSTS(64),  50000.0*(1.00000 - STATES(38)),  - 500.000*STATES(38))
      RATES(39) = TERNRY(STATES(37).GT.CONSTS(64).AND.STATES(39).LT.CONSTS(64),  50000.0*(1.00000 - STATES(39)),  - 10.0000*STATES(39))
      ALGBRC(4) = 1.00000/(1.00000+EXP(- (STATES(1)+14.0000)/10.8000))
      ALGBRC(16) = 0.00370000+0.00610000/(1.00000+EXP((STATES(1)+25.0000)/4.50000))
      RATES(20) = (ALGBRC(4) - STATES(20))/ALGBRC(16)
      ALGBRC(5) = 1.00000/(1.00000+EXP((STATES(1)+60.0000)/5.60000))
      ALGBRC(17) = TERNRY(STATES(1).LE.0.00000,  - 0.000875000*STATES(1)+0.0120000, 0.0120000)
      RATES(21) = (ALGBRC(5) - STATES(21))/ALGBRC(17)
      ALGBRC(6) =  55.5000*EXP( 0.0554715*(STATES(1) - 12.0000))
      ALGBRC(18) =  2.35700*EXP( - 0.0365880*STATES(1))
      RATES(25) =  ALGBRC(18)*STATES(24) -  ALGBRC(6)*STATES(25)
      RATES(24) =  - (ALGBRC(18)+CONSTS(25))*STATES(24)+ ALGBRC(6)*STATES(25)+ CONSTS(26)*STATES(23)
      ALGBRC(8) = 1.00000/(1.00000+EXP(- (STATES(1) - 1.50000)/16.7000))
      ALGBRC(20) = 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(27) = (ALGBRC(8) - STATES(27))/ALGBRC(20)
      ALGBRC(9) = 1.00000/(1.00000+EXP(- (STATES(1) - 1.50000)/16.7000))
      ALGBRC(21) = ( 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(28) = (ALGBRC(9) - STATES(28))/ALGBRC(21)
      ALGBRC(1) = 3802.00/( 0.102700*EXP(- STATES(1)/17.0000)+ 0.200000*EXP(- STATES(1)/150.000))
      ALGBRC(32) =  191.700*EXP(- STATES(1)/20.3000)
      RATES(7) =  - (0.950000+ALGBRC(1))*STATES(7)+ 0.000100000*STATES(11)+ ALGBRC(32)*STATES(6)
      ALGBRC(3) = 1.00000/(1.00000+EXP((STATES(1)+32.0000)/8.00000))+0.600000/(1.00000+EXP((50.0000 - STATES(1))/20.0000))
      ALGBRC(15) = 0.00100000/( 0.0197000*EXP(-  0.0337000*(STATES(1)+10.0000) ** 2.00000)+0.0200000)
      ALGBRC(27) = ALGBRC(3)/ALGBRC(15)
      ALGBRC(34) = (1.00000 - ALGBRC(3))/ALGBRC(15)
      RATES(19) =  ALGBRC(27)*(1.00000 - STATES(19)) -  ALGBRC(34)*STATES(19)
      ALGBRC(7) =  65.5000*EXP( 0.0554715*(STATES(1) - 36.0000))
      ALGBRC(19) =  2.93570*EXP( - 0.0215800*STATES(1))
      ALGBRC(28) = ( 439.000*EXP( - 0.0235200*(STATES(1)+25.0000))*4.50000)/CONSTS(22)
      ALGBRC(35) = ( 656.000*EXP( 0.000942000*STATES(1))*4.50000 ** 0.300000)/CONSTS(22) ** 0.300000
      RATES(22) =  - (ALGBRC(19)+ALGBRC(35))*STATES(22)+ ALGBRC(7)*STATES(23)+ ALGBRC(28)*STATES(26)
      ALGBRC(10) = ( 10000.0*EXP((STATES(1) - 40.0000)/25.0000))/(1.00000+EXP((STATES(1) - 40.0000)/25.0000))
      ALGBRC(22) = ( 10000.0*EXP(- (STATES(1)+90.0000)/25.0000))/(1.00000+EXP(- (STATES(1)+90.0000)/25.0000))
      ALGBRC(29) = 1.00000/(ALGBRC(10)+ALGBRC(22))
      ALGBRC(36) = ALGBRC(10)/(ALGBRC(10)+ALGBRC(22))
      RATES(29) = (ALGBRC(36) - STATES(29))/ALGBRC(29)
      ALGBRC(11) = 15.0000/(1.00000+EXP((STATES(1)+60.0000)/5.00000))
      ALGBRC(23) = ( 100.000*EXP((STATES(1)+25.0000)/5.00000))/(1.00000+EXP((STATES(1)+25.0000)/5.00000))
      ALGBRC(30) = 1.00000/(ALGBRC(11)+ALGBRC(23))
      ALGBRC(37) = ALGBRC(11)/(ALGBRC(11)+ALGBRC(23))
      RATES(30) = (ALGBRC(37) - STATES(30))/ALGBRC(30)
      ALGBRC(13) = 3802.00/( 0.102700*EXP(- STATES(1)/15.0000)+ 0.230000*EXP(- STATES(1)/150.000))
      ALGBRC(39) =  200.000*EXP(- (STATES(1) - 5.00000)/20.3000)
      RATES(6) =  - (ALGBRC(32)+0.950000+ALGBRC(13))*STATES(6)+ ALGBRC(1)*STATES(7)+ ALGBRC(39)*STATES(5)+ 0.000100000*STATES(10)
      ALGBRC(2) = STATES(1)+10.0000
      ALGBRC(14) = 1.00000/(1.00000+EXP(- ALGBRC(2)/6.24000))
      ALGBRC(26) = TERNRY(ABS(ALGBRC(2)).LT.1.00000e-05, 0.00100000/( 0.0350000*6.24000), ( 0.00100000*ALGBRC(14)*(1.00000 - EXP(- ALGBRC(2)/6.24000)))/( 0.0350000*ALGBRC(2)))
      ALGBRC(33) = ALGBRC(14)/ALGBRC(26)
      ALGBRC(40) = (1.00000 - ALGBRC(14))/ALGBRC(26)
      RATES(18) =  ALGBRC(33)*(1.00000 - STATES(18)) -  ALGBRC(40)*STATES(18)
      ALGBRC(41) = ( ALGBRC(28)*ALGBRC(19)*ALGBRC(7))/( ALGBRC(7)*ALGBRC(35))
      RATES(23) =  - (CONSTS(26)+ALGBRC(7)+ALGBRC(7))*STATES(23)+ CONSTS(25)*STATES(24)+ ALGBRC(19)*STATES(22)+ ALGBRC(41)*STATES(26)
      RATES(26) =  - (ALGBRC(41)+ALGBRC(28))*STATES(26)+ ALGBRC(7)*STATES(23)+ ALGBRC(35)*STATES(22)
      ALGBRC(25) = 3802.00/( 0.102700*EXP(- STATES(1)/12.0000)+ 0.250000*EXP(- STATES(1)/150.000))
      ALGBRC(43) =  220.000*EXP(- (STATES(1) - 10.0000)/20.3000)
      RATES(5) =  - (ALGBRC(39)+ALGBRC(25)+0.950000)*STATES(5)+ ALGBRC(13)*STATES(6)+ ALGBRC(43)*STATES(3)+ 0.000100000*STATES(9)
      RATES(3) =  - (0.950000+ALGBRC(43))*STATES(3)+ 0.000100000*STATES(4)+ ALGBRC(25)*STATES(5)
      ALGBRC(47) = ( 0.000379330*EXP(- STATES(1)/7.70000))/2.50000
      ALGBRC(49) = 8.40000+ 0.0200000*STATES(1)
      RATES(12) =  - (ALGBRC(47)+ALGBRC(1))*STATES(12)+ ALGBRC(49)*STATES(11)+ ALGBRC(32)*STATES(13)
      RATES(13) =  - (ALGBRC(47)+ALGBRC(13)+ALGBRC(32))*STATES(13)+ ALGBRC(49)*STATES(10)+ ALGBRC(39)*STATES(8)+ ALGBRC(1)*STATES(12)
      RATES(11) =  - (ALGBRC(49)+ALGBRC(1)+0.000100000)*STATES(11)+ ALGBRC(47)*STATES(12)+ ALGBRC(32)*STATES(10)+ 0.950000*STATES(7)
      RATES(10) =  - (ALGBRC(32)+ALGBRC(49)+ALGBRC(13)+0.000100000)*STATES(10)+ ALGBRC(1)*STATES(11)+ ALGBRC(39)*STATES(9)+ ALGBRC(47)*STATES(13)+ 0.950000*STATES(6)
      RATES(9) =  - (ALGBRC(39)+ALGBRC(25)+ALGBRC(49)+0.000100000)*STATES(9)+ ALGBRC(13)*STATES(10)+ ALGBRC(43)*STATES(4)+ ALGBRC(47)*STATES(8)+ 0.950000*STATES(5)
      ALGBRC(45) =  9178.00*EXP(STATES(1)/29.6800)
      ALGBRC(51) = ( ALGBRC(25)*ALGBRC(45)*ALGBRC(47))/( ALGBRC(43)*ALGBRC(49))
      RATES(4) =  - (ALGBRC(45)+ALGBRC(43)+0.000100000)*STATES(4)+ ALGBRC(51)*STATES(8)+ ALGBRC(25)*STATES(9)+ 0.950000*STATES(3)
      ALGBRC(53) = ALGBRC(45)/100.000
      ALGBRC(55) = ALGBRC(47)
      RATES(8) =  - (ALGBRC(51)+ALGBRC(47)+ALGBRC(53)+ALGBRC(39))*STATES(8)+ ALGBRC(49)*STATES(9)+ ALGBRC(55)*STATES(14)+ ALGBRC(45)*STATES(4)+ ALGBRC(13)*STATES(13)
      ALGBRC(57) = ALGBRC(45)/35000.0
      ALGBRC(59) = ALGBRC(47)/20.0000
      RATES(14) =  - (ALGBRC(57)+ALGBRC(55))*STATES(14)+ ALGBRC(59)*STATES(15)+ ALGBRC(53)*STATES(8)
      RATES(15) =  ALGBRC(57)*STATES(14) -  ALGBRC(59)*STATES(15)
      ALGBRC(58) =  (( CONSTS(1)*CONSTS(2))/CONSTS(3))*log(CONSTS(22)/STATES(17))
      ALGBRC(60) =  CONSTS(67)*STATES(22)*(STATES(1) - ALGBRC(58))
      ALGBRC(62) =  1.17000*0.433000*(1.00000+0.600000/(1.00000+3.80000e-05/STATES(16) ** 1.40000))
      ALGBRC(61) =  (( CONSTS(1)*CONSTS(2))/CONSTS(3))*log((CONSTS(22)+ CONSTS(27)*CONSTS(11))/(STATES(17)+ CONSTS(27)*STATES(2)))
      ALGBRC(63) =  ALGBRC(62)*STATES(27)*STATES(28)*(STATES(1) - ALGBRC(61))
      ALGBRC(64) =  (( CONSTS(1)*CONSTS(2))/CONSTS(3))*log(CONSTS(22)/STATES(17))
      ALGBRC(71) = 0.850000/(1.00000+CONSTS(30)/STATES(2) ** CONSTS(29))
      ALGBRC(72) = 0.800000 - 0.650000/(1.00000+EXP((STATES(1)+125.000)/15.0000))
      ALGBRC(73) =  CONSTS(69)*ALGBRC(71)*ALGBRC(72)*(STATES(1) - ALGBRC(64))
      ALGBRC(74) =  CONSTS(78)*(STATES(1) - ALGBRC(64))
      ALGBRC(75) = EXP(STATES(1)/100.000)
      ALGBRC(76) =  CONSTS(71)*STATES(29) ** 3.00000*STATES(30)*ALGBRC(75)*(STATES(1) - ALGBRC(64))
      ALGBRC(65) = 1020.00/(1.00000+EXP( 0.238500*((STATES(1) - ALGBRC(64)) - 59.2150)))
      ALGBRC(66) = ( 1000.00*( 0.491240*EXP( 0.0803200*((STATES(1) - ALGBRC(64))+5.47600))+EXP( 0.0617500*((STATES(1) - ALGBRC(64)) - 594.310))))/(1.00000+EXP( - 0.514300*((STATES(1) - ALGBRC(64))+4.75300)))
      ALGBRC(67) = ALGBRC(65)/(ALGBRC(65)+ALGBRC(66))
      ALGBRC(68) =  CONSTS(68)*ALGBRC(67)*(STATES(1) - ALGBRC(64))
      ALGBRC(69) = 1.00000/(1.00000+EXP((7.48800 - STATES(1))/5.98000))
      ALGBRC(70) =  CONSTS(28)*ALGBRC(69)*(STATES(1) - ALGBRC(64))
      ALGBRC(82) = 1.00000/(1.00000+ 0.124500*EXP(( - 0.100000*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))+ 0.0365000*CONSTS(72)*EXP(( - STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2))))
      ALGBRC(83) = ( (( CONSTS(41)*ALGBRC(82)*1.00000)/(1.00000+CONSTS(42)/STATES(2) ** 2.00000))*CONSTS(22))/(CONSTS(22)+CONSTS(43))
      ALGBRC(46) = ( (( CONSTS(18)*1.00000 ** 2.00000*STATES(1)*CONSTS(3) ** 2.00000)/( CONSTS(1)*CONSTS(2)))*( CONSTS(14)*STATES(17)*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(48) = 1.00000/(1.00000+STATES(16)/CONSTS(23))
      ALGBRC(54) =  STATES(18)*STATES(19)*ALGBRC(48)*ALGBRC(46)
      ALGBRC(85) = ( (( CONSTS(73)*1.00000 ** 2.00000*STATES(1)*CONSTS(3) ** 2.00000)/( CONSTS(1)*CONSTS(2)))*( CONSTS(14)*STATES(17)*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(87) = ( ALGBRC(85)*1.00000)/(1.00000+CONSTS(44)/STATES(16) ** 3.00000)
      RATES(17) = ( - (ALGBRC(54)+ALGBRC(60)+ALGBRC(63)+ALGBRC(68)+ALGBRC(70)+ALGBRC(73)+ALGBRC(74)+ALGBRC(76)+ALGBRC(87)+ - ALGBRC(83)*2.00000)*CONSTS(58))/( CONSTS(77)*CONSTS(3))
      ALGBRC(12) = 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(24) =  (( CONSTS(1)*CONSTS(2))/CONSTS(3))*log(CONSTS(11)/STATES(2))
      ALGBRC(31) = STATES(3)+STATES(4)
      ALGBRC(38) =  CONSTS(10)*ALGBRC(31)*(STATES(1) - ALGBRC(24))
      ALGBRC(42) = ( (( CONSTS(16)*2.00000 ** 2.00000*STATES(1)*CONSTS(3) ** 2.00000)/( CONSTS(1)*CONSTS(2)))*( CONSTS(19)*STATES(16)*EXP(( 2.00000*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2))) -  CONSTS(20)*CONSTS(21)))/(EXP(( 2.00000*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2))) - 1.00000)
      ALGBRC(50) =  STATES(18)*STATES(19)*ALGBRC(48)*ALGBRC(42)
      ALGBRC(44) = ( (( CONSTS(17)*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(11)))/(EXP(( 1.00000*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2))) - 1.00000)
      ALGBRC(52) =  STATES(18)*STATES(19)*ALGBRC(48)*ALGBRC(44)
      ALGBRC(56) = ALGBRC(50)+ALGBRC(54)+ALGBRC(52)
      ALGBRC(79) =  (( CONSTS(1)*CONSTS(2))/( 2.00000*CONSTS(3)))*log(CONSTS(21)/STATES(16))
      ALGBRC(80) =  CONSTS(24)*STATES(20)*STATES(20)*STATES(21)*(STATES(1) - ALGBRC(79))
      ALGBRC(89) = ( CONSTS(45)*EXP(( (CONSTS(47) - 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(11) ** 3.00000*STATES(16)))/(1.00000+ CONSTS(46)*EXP(( (CONSTS(47) - 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(11) ** 3.00000*STATES(16)))
      ALGBRC(77) = ( CONSTS(38)*STATES(16))/(CONSTS(37)+STATES(16))
      ALGBRC(78) =  CONSTS(39)*(STATES(1) - ALGBRC(24))
      ALGBRC(81) =  CONSTS(40)*(STATES(1) - ALGBRC(79))
      ALGBRC(84) = ( (( CONSTS(73)*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(11)))/(EXP(( 1.00000*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2))) - 1.00000)
      ALGBRC(86) = ( ALGBRC(84)*1.00000)/(1.00000+CONSTS(44)/STATES(16) ** 3.00000)
      ALGBRC(88) = ALGBRC(86)+ALGBRC(87)
      RATES(1) =  (- 1.00000/CONSTS(4))*(ALGBRC(38)+ALGBRC(56)+ALGBRC(80)+ALGBRC(60)+ALGBRC(63)+ALGBRC(73)+ALGBRC(74)+ALGBRC(76)+ALGBRC(68)+ALGBRC(70)+ALGBRC(89)+ALGBRC(77)+ALGBRC(78)+ALGBRC(81)+ALGBRC(83)+ALGBRC(88)+ALGBRC(12))
      RATES(36) = TERNRY(STATES(33).GT.0.200000, ( - CONSTS(58)*(((ALGBRC(50)+ALGBRC(80)) - ALGBRC(89))+ALGBRC(77)+ALGBRC(81)))/( 2.00000*CONSTS(77)*CONSTS(3)), TERNRY(STATES(34).GT.0.0100000.AND.STATES(33).LE.0.200000, 0.00000,  - 500.000*STATES(36))
      RATES(2) = ( - (ALGBRC(38)+ALGBRC(52)+ALGBRC(78)+ALGBRC(86)+ ALGBRC(89)*3.00000+ ALGBRC(83)*3.00000)*CONSTS(58))/( CONSTS(77)*CONSTS(3))
      ALGBRC(90) =  (- 1.00000/CONSTS(4))*(ALGBRC(38)+ALGBRC(56)+ALGBRC(80)+ALGBRC(60)+ALGBRC(63)+ALGBRC(73)+ALGBRC(74)+ALGBRC(76)+ALGBRC(68)+ALGBRC(70)+ALGBRC(89)+ALGBRC(77)+ALGBRC(78)+ALGBRC(81)+ALGBRC(83)+ALGBRC(88)+ALGBRC(12))
      RATES(33) = TERNRY(ALGBRC(90).GT.150000.,  100000.*(1.00000 - STATES(33)) -  500.000*STATES(33),  - 500.000*STATES(33))
      ALGBRC(91) = TERNRY(STATES(36).GT.CONSTS(52),  (( CONSTS(48)*(STATES(36) - CONSTS(52)))/((CONSTS(51)+STATES(36)) - CONSTS(52)))*(1.00000 - STATES(34))*STATES(34), TERNRY(STATES(36).LE.CONSTS(52).AND.STATES(38).GT.0.00000,  CONSTS(49)*(1.00000 - STATES(38))*STATES(38), 0.00000)
      ALGBRC(92) =  ALGBRC(91)*(STATES(31) - STATES(16))
      ALGBRC(93) = ( CONSTS(56)*STATES(16))/(STATES(16)+CONSTS(55))
      ALGBRC(94) =  CONSTS(74)*STATES(32)
      RATES(16) =  (1.00000/(1.00000+( CONSTS(62)*CONSTS(60))/CONSTS(60)+STATES(16) ** 2.00000+( CONSTS(61)*CONSTS(59))/CONSTS(59)+STATES(16) ** 2.00000))*(( - CONSTS(58)*(((ALGBRC(50)+ALGBRC(80)) -  2.00000*ALGBRC(89))+ALGBRC(77)+ALGBRC(81)))/( 2.00000*CONSTS(77)*CONSTS(3))+( ALGBRC(92)*CONSTS(79))/CONSTS(77)+( (ALGBRC(94) - ALGBRC(93))*CONSTS(80))/CONSTS(77))
      ALGBRC(95) = (STATES(32) - STATES(31))/CONSTS(50)
      RATES(31) =  (1.00000/(1.00000+( CONSTS(53)*CONSTS(54))/CONSTS(54)+STATES(31) ** 2.00000))*(ALGBRC(95) - ALGBRC(92))
      RATES(32) = (( - ALGBRC(95)*CONSTS(79))/CONSTS(80) - ALGBRC(94))+ALGBRC(93)
      RETURN
      END
      SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(4) = 1.00000/(1.00000+EXP(- (STATES(1)+14.0000)/10.8000))
      ALGBRC(16) = 0.00370000+0.00610000/(1.00000+EXP((STATES(1)+25.0000)/4.50000))
      ALGBRC(5) = 1.00000/(1.00000+EXP((STATES(1)+60.0000)/5.60000))
      ALGBRC(17) = TERNRY(STATES(1).LE.0.00000,  - 0.000875000*STATES(1)+0.0120000, 0.0120000)
      ALGBRC(6) =  55.5000*EXP( 0.0554715*(STATES(1) - 12.0000))
      ALGBRC(18) =  2.35700*EXP( - 0.0365880*STATES(1))
      ALGBRC(8) = 1.00000/(1.00000+EXP(- (STATES(1) - 1.50000)/16.7000))
      ALGBRC(20) = 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(9) = 1.00000/(1.00000+EXP(- (STATES(1) - 1.50000)/16.7000))
      ALGBRC(21) = ( 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) = 3802.00/( 0.102700*EXP(- STATES(1)/17.0000)+ 0.200000*EXP(- STATES(1)/150.000))
      ALGBRC(32) =  191.700*EXP(- STATES(1)/20.3000)
      ALGBRC(3) = 1.00000/(1.00000+EXP((STATES(1)+32.0000)/8.00000))+0.600000/(1.00000+EXP((50.0000 - STATES(1))/20.0000))
      ALGBRC(15) = 0.00100000/( 0.0197000*EXP(-  0.0337000*(STATES(1)+10.0000) ** 2.00000)+0.0200000)
      ALGBRC(27) = ALGBRC(3)/ALGBRC(15)
      ALGBRC(34) = (1.00000 - ALGBRC(3))/ALGBRC(15)
      ALGBRC(7) =  65.5000*EXP( 0.0554715*(STATES(1) - 36.0000))
      ALGBRC(19) =  2.93570*EXP( - 0.0215800*STATES(1))
      ALGBRC(28) = ( 439.000*EXP( - 0.0235200*(STATES(1)+25.0000))*4.50000)/CONSTS(22)
      ALGBRC(35) = ( 656.000*EXP( 0.000942000*STATES(1))*4.50000 ** 0.300000)/CONSTS(22) ** 0.300000
      ALGBRC(10) = ( 10000.0*EXP((STATES(1) - 40.0000)/25.0000))/(1.00000+EXP((STATES(1) - 40.0000)/25.0000))
      ALGBRC(22) = ( 10000.0*EXP(- (STATES(1)+90.0000)/25.0000))/(1.00000+EXP(- (STATES(1)+90.0000)/25.0000))
      ALGBRC(29) = 1.00000/(ALGBRC(10)+ALGBRC(22))
      ALGBRC(36) = ALGBRC(10)/(ALGBRC(10)+ALGBRC(22))
      ALGBRC(11) = 15.0000/(1.00000+EXP((STATES(1)+60.0000)/5.00000))
      ALGBRC(23) = ( 100.000*EXP((STATES(1)+25.0000)/5.00000))/(1.00000+EXP((STATES(1)+25.0000)/5.00000))
      ALGBRC(30) = 1.00000/(ALGBRC(11)+ALGBRC(23))
      ALGBRC(37) = ALGBRC(11)/(ALGBRC(11)+ALGBRC(23))
      ALGBRC(13) = 3802.00/( 0.102700*EXP(- STATES(1)/15.0000)+ 0.230000*EXP(- STATES(1)/150.000))
      ALGBRC(39) =  200.000*EXP(- (STATES(1) - 5.00000)/20.3000)
      ALGBRC(2) = STATES(1)+10.0000
      ALGBRC(14) = 1.00000/(1.00000+EXP(- ALGBRC(2)/6.24000))
      ALGBRC(26) = TERNRY(ABS(ALGBRC(2)).LT.1.00000e-05, 0.00100000/( 0.0350000*6.24000), ( 0.00100000*ALGBRC(14)*(1.00000 - EXP(- ALGBRC(2)/6.24000)))/( 0.0350000*ALGBRC(2)))
      ALGBRC(33) = ALGBRC(14)/ALGBRC(26)
      ALGBRC(40) = (1.00000 - ALGBRC(14))/ALGBRC(26)
      ALGBRC(41) = ( ALGBRC(28)*ALGBRC(19)*ALGBRC(7))/( ALGBRC(7)*ALGBRC(35))
      ALGBRC(25) = 3802.00/( 0.102700*EXP(- STATES(1)/12.0000)+ 0.250000*EXP(- STATES(1)/150.000))
      ALGBRC(43) =  220.000*EXP(- (STATES(1) - 10.0000)/20.3000)
      ALGBRC(47) = ( 0.000379330*EXP(- STATES(1)/7.70000))/2.50000
      ALGBRC(49) = 8.40000+ 0.0200000*STATES(1)
      ALGBRC(45) =  9178.00*EXP(STATES(1)/29.6800)
      ALGBRC(51) = ( ALGBRC(25)*ALGBRC(45)*ALGBRC(47))/( ALGBRC(43)*ALGBRC(49))
      ALGBRC(53) = ALGBRC(45)/100.000
      ALGBRC(55) = ALGBRC(47)
      ALGBRC(57) = ALGBRC(45)/35000.0
      ALGBRC(59) = ALGBRC(47)/20.0000
      ALGBRC(58) =  (( CONSTS(1)*CONSTS(2))/CONSTS(3))*log(CONSTS(22)/STATES(17))
      ALGBRC(60) =  CONSTS(67)*STATES(22)*(STATES(1) - ALGBRC(58))
      ALGBRC(62) =  1.17000*0.433000*(1.00000+0.600000/(1.00000+3.80000e-05/STATES(16) ** 1.40000))
      ALGBRC(61) =  (( CONSTS(1)*CONSTS(2))/CONSTS(3))*log((CONSTS(22)+ CONSTS(27)*CONSTS(11))/(STATES(17)+ CONSTS(27)*STATES(2)))
      ALGBRC(63) =  ALGBRC(62)*STATES(27)*STATES(28)*(STATES(1) - ALGBRC(61))
      ALGBRC(64) =  (( CONSTS(1)*CONSTS(2))/CONSTS(3))*log(CONSTS(22)/STATES(17))
      ALGBRC(71) = 0.850000/(1.00000+CONSTS(30)/STATES(2) ** CONSTS(29))
      ALGBRC(72) = 0.800000 - 0.650000/(1.00000+EXP((STATES(1)+125.000)/15.0000))
      ALGBRC(73) =  CONSTS(69)*ALGBRC(71)*ALGBRC(72)*(STATES(1) - ALGBRC(64))
      ALGBRC(74) =  CONSTS(78)*(STATES(1) - ALGBRC(64))
      ALGBRC(75) = EXP(STATES(1)/100.000)
      ALGBRC(76) =  CONSTS(71)*STATES(29) ** 3.00000*STATES(30)*ALGBRC(75)*(STATES(1) - ALGBRC(64))
      ALGBRC(65) = 1020.00/(1.00000+EXP( 0.238500*((STATES(1) - ALGBRC(64)) - 59.2150)))
      ALGBRC(66) = ( 1000.00*( 0.491240*EXP( 0.0803200*((STATES(1) - ALGBRC(64))+5.47600))+EXP( 0.0617500*((STATES(1) - ALGBRC(64)) - 594.310))))/(1.00000+EXP( - 0.514300*((STATES(1) - ALGBRC(64))+4.75300)))
      ALGBRC(67) = ALGBRC(65)/(ALGBRC(65)+ALGBRC(66))
      ALGBRC(68) =  CONSTS(68)*ALGBRC(67)*(STATES(1) - ALGBRC(64))
      ALGBRC(69) = 1.00000/(1.00000+EXP((7.48800 - STATES(1))/5.98000))
      ALGBRC(70) =  CONSTS(28)*ALGBRC(69)*(STATES(1) - ALGBRC(64))
      ALGBRC(82) = 1.00000/(1.00000+ 0.124500*EXP(( - 0.100000*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))+ 0.0365000*CONSTS(72)*EXP(( - STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2))))
      ALGBRC(83) = ( (( CONSTS(41)*ALGBRC(82)*1.00000)/(1.00000+CONSTS(42)/STATES(2) ** 2.00000))*CONSTS(22))/(CONSTS(22)+CONSTS(43))
      ALGBRC(46) = ( (( CONSTS(18)*1.00000 ** 2.00000*STATES(1)*CONSTS(3) ** 2.00000)/( CONSTS(1)*CONSTS(2)))*( CONSTS(14)*STATES(17)*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(48) = 1.00000/(1.00000+STATES(16)/CONSTS(23))
      ALGBRC(54) =  STATES(18)*STATES(19)*ALGBRC(48)*ALGBRC(46)
      ALGBRC(85) = ( (( CONSTS(73)*1.00000 ** 2.00000*STATES(1)*CONSTS(3) ** 2.00000)/( CONSTS(1)*CONSTS(2)))*( CONSTS(14)*STATES(17)*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(87) = ( ALGBRC(85)*1.00000)/(1.00000+CONSTS(44)/STATES(16) ** 3.00000)
      ALGBRC(12) = 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(24) =  (( CONSTS(1)*CONSTS(2))/CONSTS(3))*log(CONSTS(11)/STATES(2))
      ALGBRC(31) = STATES(3)+STATES(4)
      ALGBRC(38) =  CONSTS(10)*ALGBRC(31)*(STATES(1) - ALGBRC(24))
      ALGBRC(42) = ( (( CONSTS(16)*2.00000 ** 2.00000*STATES(1)*CONSTS(3) ** 2.00000)/( CONSTS(1)*CONSTS(2)))*( CONSTS(19)*STATES(16)*EXP(( 2.00000*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2))) -  CONSTS(20)*CONSTS(21)))/(EXP(( 2.00000*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2))) - 1.00000)
      ALGBRC(50) =  STATES(18)*STATES(19)*ALGBRC(48)*ALGBRC(42)
      ALGBRC(44) = ( (( CONSTS(17)*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(11)))/(EXP(( 1.00000*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2))) - 1.00000)
      ALGBRC(52) =  STATES(18)*STATES(19)*ALGBRC(48)*ALGBRC(44)
      ALGBRC(56) = ALGBRC(50)+ALGBRC(54)+ALGBRC(52)
      ALGBRC(79) =  (( CONSTS(1)*CONSTS(2))/( 2.00000*CONSTS(3)))*log(CONSTS(21)/STATES(16))
      ALGBRC(80) =  CONSTS(24)*STATES(20)*STATES(20)*STATES(21)*(STATES(1) - ALGBRC(79))
      ALGBRC(89) = ( CONSTS(45)*EXP(( (CONSTS(47) - 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(11) ** 3.00000*STATES(16)))/(1.00000+ CONSTS(46)*EXP(( (CONSTS(47) - 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(11) ** 3.00000*STATES(16)))
      ALGBRC(77) = ( CONSTS(38)*STATES(16))/(CONSTS(37)+STATES(16))
      ALGBRC(78) =  CONSTS(39)*(STATES(1) - ALGBRC(24))
      ALGBRC(81) =  CONSTS(40)*(STATES(1) - ALGBRC(79))
      ALGBRC(84) = ( (( CONSTS(73)*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(11)))/(EXP(( 1.00000*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2))) - 1.00000)
      ALGBRC(86) = ( ALGBRC(84)*1.00000)/(1.00000+CONSTS(44)/STATES(16) ** 3.00000)
      ALGBRC(88) = ALGBRC(86)+ALGBRC(87)
      ALGBRC(90) =  (- 1.00000/CONSTS(4))*(ALGBRC(38)+ALGBRC(56)+ALGBRC(80)+ALGBRC(60)+ALGBRC(63)+ALGBRC(73)+ALGBRC(74)+ALGBRC(76)+ALGBRC(68)+ALGBRC(70)+ALGBRC(89)+ALGBRC(77)+ALGBRC(78)+ALGBRC(81)+ALGBRC(83)+ALGBRC(88)+ALGBRC(12))
      ALGBRC(91) = TERNRY(STATES(36).GT.CONSTS(52),  (( CONSTS(48)*(STATES(36) - CONSTS(52)))/((CONSTS(51)+STATES(36)) - CONSTS(52)))*(1.00000 - STATES(34))*STATES(34), TERNRY(STATES(36).LE.CONSTS(52).AND.STATES(38).GT.0.00000,  CONSTS(49)*(1.00000 - STATES(38))*STATES(38), 0.00000)
      ALGBRC(92) =  ALGBRC(91)*(STATES(31) - STATES(16))
      ALGBRC(93) = ( CONSTS(56)*STATES(16))/(STATES(16)+CONSTS(55))
      ALGBRC(94) =  CONSTS(74)*STATES(32)
      ALGBRC(95) = (STATES(32) - STATES(31))/CONSTS(50)
      RETURN
      END
      REAL FUNCTION TERNRY(TEST, VALA, VALB)
      LOGICAL TEST
      REAL VALA, VALB
      IF (TEST) THEN
        TERNRY = VALA
      ELSE
        TERNRY = VALB
      ENDIF
      RETURN
      END
Source
Derived from workspace Clancy, Rudy, 2002 at changeset 2bd2a331ca0c.
Collaboration
To begin collaborating on this work, please use your git client and issue this command:
License

This work is licensed under a Creative Commons Attribution 3.0 Unported License.