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 52 entries in the algebraic variable array.
C There are a total of 21 entries in each of the rate and state variable arrays.
C There are a total of 70 entries in the constant variable array.
C
C
C VOI is time in component environment (second).
C STATES(1) is V in component membrane (millivolt).
C CONSTS(1) is R in component membrane (millijoule_per_mole_kelvin).
C CONSTS(2) is T in component membrane (kelvin).
C CONSTS(3) is F in component membrane (coulomb_per_mole).
C CONSTS(4) is Cm in component membrane (microF).
C ALGBRC(27) is i_K1 in component time_independent_potassium_current (nanoA).
C ALGBRC(44) is i_to in component transient_outward_current (nanoA).
C ALGBRC(31) is i_K in component time_dependent_potassium_current (nanoA).
C ALGBRC(37) is i_Ca_L_K_cyt in component L_type_Ca_channel (nanoA).
C ALGBRC(40) is i_Ca_L_K_ds in component L_type_Ca_channel (nanoA).
C ALGBRC(45) is i_NaK in component sodium_potassium_pump (nanoA).
C ALGBRC(33) is i_Na in component fast_sodium_current (nanoA).
C ALGBRC(34) is i_b_Na in component sodium_background_current (nanoA).
C ALGBRC(38) is i_Ca_L_Na_cyt in component L_type_Ca_channel (nanoA).
C ALGBRC(41) is i_Ca_L_Na_ds in component L_type_Ca_channel (nanoA).
C ALGBRC(46) is i_NaCa_cyt in component sodium_calcium_exchanger (nanoA).
C ALGBRC(47) is i_NaCa_ds in component sodium_calcium_exchanger (nanoA).
C ALGBRC(36) is i_Ca_L_Ca_cyt in component L_type_Ca_channel (nanoA).
C ALGBRC(39) is i_Ca_L_Ca_ds in component L_type_Ca_channel (nanoA).
C ALGBRC(43) is i_b_Ca in component calcium_background_current (nanoA).
C ALGBRC(35) is i_b_K in component potassium_background_current (nanoA).
C ALGBRC(7) is i_Stim in component membrane (nanoA).
C CONSTS(5) is stim_start in component membrane (second).
C CONSTS(6) is stim_end in component membrane (second).
C CONSTS(7) is stim_period in component membrane (second).
C CONSTS(8) is stim_duration in component membrane (second).
C CONSTS(9) is stim_amplitude in component membrane (nanoA).
C ALGBRC(15) is E_Na in component reversal_potentials (millivolt).
C ALGBRC(21) is E_K in component reversal_potentials (millivolt).
C ALGBRC(23) is E_Ca in component reversal_potentials (millivolt).
C ALGBRC(25) is E_mh in component reversal_potentials (millivolt).
C STATES(2) is K_o in component extracellular_potassium_concentration (millimolar).
C CONSTS(10) is Na_o in component extracellular_sodium_concentration (millimolar).
C STATES(3) is K_i in component intracellular_potassium_concentration (millimolar).
C STATES(4) is Na_i in component intracellular_sodium_concentration (millimolar).
C CONSTS(11) is Ca_o in component extracellular_calcium_concentration (millimolar).
C STATES(5) is Ca_i in component intracellular_calcium_concentration (millimolar).
C CONSTS(12) is K_mk1 in component time_independent_potassium_current (millimolar).
C CONSTS(13) is g_K1 in component time_independent_potassium_current (microS).
C ALGBRC(29) is I_K in component time_dependent_potassium_current (nanoA).
C CONSTS(14) is i_K_max in component time_dependent_potassium_current (nanoA).
C STATES(6) is x in component time_dependent_potassium_current_x_gate (dimensionless).
C ALGBRC(9) is alpha_x in component time_dependent_potassium_current_x_gate (per_second).
C ALGBRC(17) is beta_x in component time_dependent_potassium_current_x_gate (per_second).
C CONSTS(15) is delta_x in component time_dependent_potassium_current_x_gate (millivolt).
C ALGBRC(1) is E0_x in component time_dependent_potassium_current_x_gate (millivolt).
C CONSTS(16) is g_Na in component fast_sodium_current (microS).
C STATES(7) is m in component fast_sodium_current_m_gate (dimensionless).
C STATES(8) is h in component fast_sodium_current_h_gate (dimensionless).
C ALGBRC(10) is alpha_m in component fast_sodium_current_m_gate (per_second).
C ALGBRC(18) is beta_m in component fast_sodium_current_m_gate (per_second).
C CONSTS(17) is delta_m in component fast_sodium_current_m_gate (millivolt).
C ALGBRC(2) is E0_m in component fast_sodium_current_m_gate (millivolt).
C ALGBRC(3) is alpha_h in component fast_sodium_current_h_gate (per_second).
C ALGBRC(11) is beta_h in component fast_sodium_current_h_gate (per_second).
C CONSTS(18) is shift_h in component fast_sodium_current_h_gate (millivolt).
C CONSTS(19) is g_bna in component sodium_background_current (microS).
C CONSTS(20) is g_bk in component potassium_background_current (microS).
C ALGBRC(42) is i_Ca_L in component L_type_Ca_channel (nanoA).
C CONSTS(21) is P_Ca_L in component L_type_Ca_channel (nanoA_per_millimolar).
C CONSTS(22) is P_CaK in component L_type_Ca_channel (dimensionless).
C CONSTS(23) is P_CaNa in component L_type_Ca_channel (dimensionless).
C STATES(9) is Ca_ds in component intracellular_calcium_concentration (millimolar).
C STATES(10) is d in component L_type_Ca_channel_d_gate (dimensionless).
C STATES(11) is f in component L_type_Ca_channel_f_gate (dimensionless).
C STATES(12) is f2 in component L_type_Ca_channel_f2_gate (dimensionless).
C STATES(13) is f2ds in component L_type_Ca_channel_f2ds_gate (dimensionless).
C CONSTS(24) is Km_f2 in component L_type_Ca_channel (millimolar).
C CONSTS(25) is Km_f2ds in component L_type_Ca_channel (millimolar).
C CONSTS(26) is R_decay in component L_type_Ca_channel (per_second).
C CONSTS(27) is FrICa in component L_type_Ca_channel (dimensionless).
C ALGBRC(12) is alpha_d in component L_type_Ca_channel_d_gate (per_second).
C ALGBRC(19) is beta_d in component L_type_Ca_channel_d_gate (per_second).
C ALGBRC(4) is E0_d in component L_type_Ca_channel_d_gate (millivolt).
C CONSTS(28) is speed_d in component L_type_Ca_channel_d_gate (dimensionless).
C ALGBRC(13) is alpha_f in component L_type_Ca_channel_f_gate (per_second).
C ALGBRC(20) is beta_f in component L_type_Ca_channel_f_gate (per_second).
C CONSTS(29) is speed_f in component L_type_Ca_channel_f_gate (dimensionless).
C CONSTS(30) is delta_f in component L_type_Ca_channel_f_gate (millivolt).
C ALGBRC(5) is E0_f in component L_type_Ca_channel_f_gate (millivolt).
C CONSTS(31) is g_bca in component calcium_background_current (microS).
C CONSTS(32) is g_to in component transient_outward_current (microS).
C CONSTS(33) is g_tos in component transient_outward_current (dimensionless).
C STATES(14) is s in component transient_outward_current_s_gate (dimensionless).
C STATES(15) is r in component transient_outward_current_r_gate (dimensionless).
C ALGBRC(6) is alpha_s in component transient_outward_current_s_gate (per_second).
C ALGBRC(14) is beta_s in component transient_outward_current_s_gate (per_second).
C CONSTS(34) is i_NaK_max in component sodium_potassium_pump (nanoA).
C CONSTS(35) is K_mK in component sodium_potassium_pump (millimolar).
C CONSTS(36) is K_mNa in component sodium_potassium_pump (millimolar).
C ALGBRC(49) is i_NaCa in component sodium_calcium_exchanger (nanoA).
C CONSTS(37) is k_NaCa in component sodium_calcium_exchanger (nanoA).
C CONSTS(38) is n_NaCa in component sodium_calcium_exchanger (dimensionless).
C CONSTS(39) is d_NaCa in component sodium_calcium_exchanger (dimensionless).
C CONSTS(40) is gamma in component sodium_calcium_exchanger (dimensionless).
C CONSTS(41) is FRiNaCa in component sodium_calcium_exchanger (dimensionless).
C ALGBRC(50) is i_up in component sarcoplasmic_reticulum_calcium_pump (millimolar_per_second).
C CONSTS(67) is K_1 in component sarcoplasmic_reticulum_calcium_pump (dimensionless).
C ALGBRC(48) is K_2 in component sarcoplasmic_reticulum_calcium_pump (millimolar).
C CONSTS(42) is K_cyca in component sarcoplasmic_reticulum_calcium_pump (millimolar).
C CONSTS(43) is K_xcs in component sarcoplasmic_reticulum_calcium_pump (dimensionless).
C CONSTS(44) is K_srca in component sarcoplasmic_reticulum_calcium_pump (millimolar).
C CONSTS(45) is alpha_up in component sarcoplasmic_reticulum_calcium_pump (millimolar_per_second).
C CONSTS(46) is beta_up in component sarcoplasmic_reticulum_calcium_pump (millimolar_per_second).
C STATES(16) is Ca_up in component intracellular_calcium_concentration (millimolar).
C ALGBRC(51) is i_trans in component calcium_translocation (millimolar_per_second).
C STATES(17) is Ca_rel in component intracellular_calcium_concentration (millimolar).
C ALGBRC(52) is i_rel in component calcium_release (millimolar_per_second).
C ALGBRC(8) is VoltDep in component calcium_release (dimensionless).
C ALGBRC(24) is RegBindSite in component calcium_release (dimensionless).
C ALGBRC(16) is CaiReg in component calcium_release (dimensionless).
C ALGBRC(22) is CadsReg in component calcium_release (dimensionless).
C ALGBRC(26) is ActRate in component calcium_release (per_second).
C ALGBRC(28) is InactRate in component calcium_release (per_second).
C CONSTS(47) is K_leak_rate in component calcium_release (per_second).
C CONSTS(48) is K_m_rel in component calcium_release (per_second).
C CONSTS(49) is K_m_Ca_cyt in component calcium_release (millimolar).
C CONSTS(50) is K_m_Ca_ds in component calcium_release (millimolar).
C ALGBRC(32) is PrecFrac in component calcium_release (dimensionless).
C STATES(18) is ActFrac in component calcium_release (dimensionless).
C STATES(19) is ProdFrac in component calcium_release (dimensionless).
C ALGBRC(30) is SpeedRel in component calcium_release (dimensionless).
C CONSTS(70) is V_i in component intracellular_calcium_concentration (micrometre3).
C CONSTS(51) is K_b in component extracellular_potassium_concentration (millimolar).
C CONSTS(52) is pf in component extracellular_potassium_concentration (per_second).
C CONSTS(69) is V_e in component intracellular_calcium_concentration (micrometre3).
C STATES(20) is Ca_Calmod in component intracellular_calcium_concentration (millimolar).
C STATES(21) is Ca_Trop in component intracellular_calcium_concentration (millimolar).
C CONSTS(53) is Calmod in component intracellular_calcium_concentration (millimolar).
C CONSTS(54) is Trop in component intracellular_calcium_concentration (millimolar).
C CONSTS(55) is alpha_Calmod in component intracellular_calcium_concentration (per_millimolar_second).
C CONSTS(56) is beta_Calmod in component intracellular_calcium_concentration (per_second).
C CONSTS(57) is alpha_Trop in component intracellular_calcium_concentration (per_millimolar_second).
C CONSTS(58) is beta_Trop in component intracellular_calcium_concentration (per_second).
C CONSTS(59) is radius in component intracellular_calcium_concentration (micrometre).
C CONSTS(60) is length in component intracellular_calcium_concentration (micrometre).
C CONSTS(66) is V_Cell in component intracellular_calcium_concentration (micrometre3).
C CONSTS(68) is V_i_ratio in component intracellular_calcium_concentration (dimensionless).
C CONSTS(61) is V_ds_ratio in component intracellular_calcium_concentration (dimensionless).
C CONSTS(62) is V_rel_ratio in component intracellular_calcium_concentration (dimensionless).
C CONSTS(63) is V_e_ratio in component intracellular_calcium_concentration (dimensionless).
C CONSTS(64) is V_up_ratio in component intracellular_calcium_concentration (dimensionless).
C CONSTS(65) is Kdecay in component intracellular_calcium_concentration (per_second).
C RATES(1) is d/dt V in component membrane (millivolt).
C RATES(6) is d/dt x in component time_dependent_potassium_current_x_gate (dimensionless).
C RATES(7) is d/dt m in component fast_sodium_current_m_gate (dimensionless).
C RATES(8) is d/dt h in component fast_sodium_current_h_gate (dimensionless).
C RATES(10) is d/dt d in component L_type_Ca_channel_d_gate (dimensionless).
C RATES(11) is d/dt f in component L_type_Ca_channel_f_gate (dimensionless).
C RATES(12) is d/dt f2 in component L_type_Ca_channel_f2_gate (dimensionless).
C RATES(13) is d/dt f2ds in component L_type_Ca_channel_f2ds_gate (dimensionless).
C RATES(14) is d/dt s in component transient_outward_current_s_gate (dimensionless).
C RATES(15) is d/dt r in component transient_outward_current_r_gate (dimensionless).
C RATES(18) is d/dt ActFrac in component calcium_release (dimensionless).
C RATES(19) is d/dt ProdFrac in component calcium_release (dimensionless).
C RATES(4) is d/dt Na_i in component intracellular_sodium_concentration (millimolar).
C RATES(2) is d/dt K_o in component extracellular_potassium_concentration (millimolar).
C RATES(3) is d/dt K_i in component intracellular_potassium_concentration (millimolar).
C RATES(5) is d/dt Ca_i in component intracellular_calcium_concentration (millimolar).
C RATES(20) is d/dt Ca_Calmod in component intracellular_calcium_concentration (millimolar).
C RATES(21) is d/dt Ca_Trop in component intracellular_calcium_concentration (millimolar).
C RATES(9) is d/dt Ca_ds in component intracellular_calcium_concentration (millimolar).
C RATES(16) is d/dt Ca_up in component intracellular_calcium_concentration (millimolar).
C RATES(17) is d/dt Ca_rel in component intracellular_calcium_concentration (millimolar).
C
      SUBROUTINE initConsts(CONSTS, RATES, STATES)
      REAL CONSTS(*), RATES(*), STATES(*)
      STATES(1) = -85.35765
      CONSTS(1) = 8314.472
      CONSTS(2) = 310
      CONSTS(3) = 96485.3415
      CONSTS(4) = 9.5e-5
      CONSTS(5) = 0.02
      CONSTS(6) = 9
      CONSTS(7) = 0.5
      CONSTS(8) = 0.002
      CONSTS(9) = -1.8
      STATES(2) = 5.3367
      CONSTS(10) = 148.5
      STATES(3) = 140.096
      STATES(4) = 6.9366
      CONSTS(11) = 2.5
      STATES(5) = 3.792e-5
      CONSTS(12) = 10
      CONSTS(13) = 0.12
      CONSTS(14) = 1.5
      STATES(6) = 3.5095e-6
      CONSTS(15) = 0.0001
      CONSTS(16) = 0.6
      STATES(7) = 0.00448
      STATES(8) = 0.9704
      CONSTS(17) = 1e-5
      CONSTS(18) = 0
      CONSTS(19) = 0.0001
      CONSTS(20) = 0.004
      CONSTS(21) = 0.045
      CONSTS(22) = 0.003
      CONSTS(23) = 0.01
      STATES(9) = 0.00077
      STATES(10) = 4.171e-12
      STATES(11) = 0.999997
      STATES(12) = 0.99279
      STATES(13) = 0.459
      CONSTS(24) = 100000
      CONSTS(25) = 0.001
      CONSTS(26) = 20
      CONSTS(27) = 1
      CONSTS(28) = 10
      CONSTS(29) = 2
      CONSTS(30) = 0.0001
      CONSTS(31) = 0.00025
      CONSTS(32) = 0.048
      CONSTS(33) = 0.15
      STATES(14) = 0.9379
      STATES(15) = 2.6578e-5
      CONSTS(34) = 0.7
      CONSTS(35) = 1
      CONSTS(36) = 40
      CONSTS(37) = 0.0002
      CONSTS(38) = 3
      CONSTS(39) = 0.001
      CONSTS(40) = 0.5
      CONSTS(41) = 0.001
      CONSTS(42) = 0.0003
      CONSTS(43) = 0.4
      CONSTS(44) = 0.5
      CONSTS(45) = 0.4
      CONSTS(46) = 0.03
      STATES(16) = 0.3342
      STATES(17) = 0.31007
      CONSTS(47) = 0.05
      CONSTS(48) = 250
      CONSTS(49) = 0.0005
      CONSTS(50) = 0.01
      STATES(18) = 0.0112
      STATES(19) = 0.9059
      CONSTS(51) = 5.4
      CONSTS(52) = 0.7
      STATES(20) = 0.001419
      STATES(21) = 0.000932
      CONSTS(53) = 0.02
      CONSTS(54) = 0.05
      CONSTS(55) = 100000
      CONSTS(56) = 50
      CONSTS(57) = 100000
      CONSTS(58) = 200
      CONSTS(59) = 12
      CONSTS(60) = 74
      CONSTS(61) = 0.1
      CONSTS(62) = 0.1
      CONSTS(63) = 0.4
      CONSTS(64) = 0.01
      CONSTS(65) = 10
      CONSTS(66) = ( 3.14159*CONSTS(59)/1000.00 ** 2.00000*CONSTS(60))/1000.00
      CONSTS(67) = ( CONSTS(42)*CONSTS(43))/CONSTS(44)
      CONSTS(68) = ((1.00000 - CONSTS(63)) - CONSTS(64)) - CONSTS(62)
      CONSTS(69) =  CONSTS(66)*CONSTS(63)
      CONSTS(70) =  CONSTS(66)*CONSTS(68)
      RETURN
      END
      SUBROUTINE computeRates(VOI, CONSTS,  RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      RATES(12) = 1.00000 -  1.00000*(STATES(5)/(CONSTS(24)+STATES(5))+STATES(12))
      RATES(13) =  CONSTS(26)*(1.00000 - (STATES(9)/(CONSTS(25)+STATES(9))+STATES(13)))
      RATES(15) =  333.000*(1.00000/(1.00000+EXP(- ((STATES(1)+4.00000) - 24.0000)/10.0000)) - STATES(15))
      ALGBRC(3) =  20.0000*EXP( - 0.125000*((STATES(1)+75.0000) - CONSTS(18)))
      ALGBRC(11) = 2000.00/(1.00000+ 320.000*EXP( - 0.100000*((STATES(1)+75.0000) - CONSTS(18))))
      RATES(8) =  ALGBRC(3)*(1.00000 - STATES(8)) -  ALGBRC(11)*STATES(8)
      ALGBRC(6) =  0.260000*0.0330000*EXP(- STATES(1)/14.8750)
      ALGBRC(14) = ( 0.260000*33.0000)/(1.00000+EXP(- (STATES(1)+10.0000)/7.00000))
      RATES(14) =  ALGBRC(6)*(1.00000 - STATES(14)) -  ALGBRC(14)*STATES(14)
      ALGBRC(1) = (STATES(1)+22.0000) - 40.0000
      ALGBRC(9) = TERNRY(ABS(ALGBRC(1)).LT.CONSTS(15), 2.50000, ( 3.00000*0.500000*ALGBRC(1))/(1.00000 - EXP(- ALGBRC(1)/5.00000)))
      ALGBRC(17) = TERNRY(ABS(ALGBRC(1)).LT.CONSTS(15), 2.50000, ( 3.00000*0.178000*ALGBRC(1))/(EXP(ALGBRC(1)/15.0000) - 1.00000))
      RATES(6) =  ALGBRC(9)*(1.00000 - STATES(6)) -  ALGBRC(17)*STATES(6)
      ALGBRC(2) = STATES(1)+41.0000
      ALGBRC(10) = TERNRY(ABS(ALGBRC(2)).LT.CONSTS(17), 2000.00, ( 200.000*ALGBRC(2))/(1.00000 - EXP( - 0.100000*ALGBRC(2))))
      ALGBRC(18) =  8000.00*EXP( - 0.0560000*(STATES(1)+66.0000))
      RATES(7) =  ALGBRC(10)*(1.00000 - STATES(7)) -  ALGBRC(18)*STATES(7)
      ALGBRC(4) = (STATES(1)+24.0000) - 20.0000
      ALGBRC(12) = TERNRY(ABS(ALGBRC(4)).LT.0.000100000, 120.000, ( 30.0000*ALGBRC(4))/(1.00000 - EXP(- ALGBRC(4)/3.00000)))
      ALGBRC(19) = TERNRY(ABS(ALGBRC(4)).LT.0.000100000, 120.000, ( 12.0000*ALGBRC(4))/(EXP(ALGBRC(4)/7.50000) - 1.00000))
      RATES(10) =  CONSTS(28)*( ALGBRC(12)*(1.00000 - STATES(10)) -  ALGBRC(19)*STATES(10))
      ALGBRC(5) = (STATES(1)+34.0000) - 10.0000
      ALGBRC(13) = TERNRY(ABS(ALGBRC(5)).LT.CONSTS(30), 25.0000, ( 6.25000*ALGBRC(5))/(EXP(ALGBRC(5)/5.50000) - 1.00000))
      ALGBRC(20) = 12.0000/(1.00000+EXP(( - 1.00000*(STATES(1)+34.0000))/5.50000))
      RATES(11) =  CONSTS(29)*( ALGBRC(13)*(1.00000 - STATES(11)) -  ALGBRC(20)*STATES(11))
      ALGBRC(16) = STATES(5)/(STATES(5)+CONSTS(49))
      ALGBRC(22) = STATES(9)/(STATES(9)+CONSTS(50))
      ALGBRC(24) = ALGBRC(16)+ (1.00000 - ALGBRC(16))*ALGBRC(22)
      ALGBRC(28) = 60.0000+ 500.000*ALGBRC(24) ** 2.00000
      ALGBRC(30) = TERNRY(STATES(1).LT.- 50.0000, 5.00000, 1.00000)
      RATES(19) =  STATES(18)*ALGBRC(30)*ALGBRC(28) -  ALGBRC(30)*1.00000*STATES(19)
      ALGBRC(8) = EXP( 0.0800000*(STATES(1) - 40.0000))
      ALGBRC(26) =  0.00000*ALGBRC(8)+ 500.000*ALGBRC(24) ** 2.00000
      ALGBRC(32) = (1.00000 - STATES(18)) - STATES(19)
      RATES(18) =  ALGBRC(32)*ALGBRC(30)*ALGBRC(26) -  STATES(18)*ALGBRC(30)*ALGBRC(28)
      ALGBRC(39) =  ((( CONSTS(27)*4.00000*CONSTS(21)*STATES(10)*STATES(11)*STATES(13)*(STATES(1) - 50.0000)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))/(1.00000 - EXP(( - (STATES(1) - 50.0000)*CONSTS(3)*2.00000)/( CONSTS(1)*CONSTS(2)))))*( STATES(5)*EXP(( 100.000*CONSTS(3))/( CONSTS(1)*CONSTS(2))) -  CONSTS(11)*EXP(( - (STATES(1) - 50.0000)*CONSTS(3)*2.00000)/( CONSTS(1)*CONSTS(2))))
      RATES(9) = ( - 1.00000*ALGBRC(39))/( 2.00000*CONSTS(61)*1.00000*CONSTS(70)*CONSTS(3)) -  STATES(9)*CONSTS(65)
      ALGBRC(21) =  (( CONSTS(1)*CONSTS(2))/CONSTS(3))*log(STATES(2)/STATES(3))
      ALGBRC(27) = ( (( CONSTS(13)*STATES(2))/(STATES(2)+CONSTS(12)))*(STATES(1) - ALGBRC(21)))/(1.00000+EXP(( ((STATES(1) - ALGBRC(21))+10.0000)*CONSTS(3)*1.67000)/( CONSTS(1)*CONSTS(2))))
      ALGBRC(44) =  CONSTS(32)*(CONSTS(33)+ STATES(14)*(1.00000 - CONSTS(33)))*STATES(15)*(STATES(1) - ALGBRC(21))
      ALGBRC(29) = ( CONSTS(14)*(STATES(3) -  STATES(2)*EXP(( - STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))))/140.000
      ALGBRC(31) =  STATES(6)*ALGBRC(29)
      ALGBRC(37) =  ((( (1.00000 - CONSTS(27))*CONSTS(22)*CONSTS(21)*STATES(10)*STATES(11)*STATES(12)*(STATES(1) - 50.0000)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))/(1.00000 - EXP(( - (STATES(1) - 50.0000)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))))*( STATES(3)*EXP(( 50.0000*CONSTS(3))/( CONSTS(1)*CONSTS(2))) -  STATES(2)*EXP(( - (STATES(1) - 50.0000)*CONSTS(3))/( CONSTS(1)*CONSTS(2))))
      ALGBRC(40) =  ((( CONSTS(27)*CONSTS(22)*CONSTS(21)*STATES(10)*STATES(11)*STATES(13)*(STATES(1) - 50.0000)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))/(1.00000 - EXP(( - (STATES(1) - 50.0000)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))))*( STATES(3)*EXP(( 50.0000*CONSTS(3))/( CONSTS(1)*CONSTS(2))) -  STATES(2)*EXP(( - (STATES(1) - 50.0000)*CONSTS(3))/( CONSTS(1)*CONSTS(2))))
      ALGBRC(45) = ( (( CONSTS(34)*STATES(2))/(CONSTS(35)+STATES(2)))*STATES(4))/(CONSTS(36)+STATES(4))
      ALGBRC(35) =  CONSTS(20)*(STATES(1) - ALGBRC(21))
      RATES(2) = ( 1.00000*(ALGBRC(27)+ALGBRC(44)+ALGBRC(37)+ALGBRC(40)+ - 2.00000*ALGBRC(45)+ALGBRC(31)+ALGBRC(35)))/( 1.00000*CONSTS(69)*CONSTS(3)) -  CONSTS(52)*(STATES(2) - CONSTS(51))
      RATES(3) =  (- 1.00000/( 1.00000*CONSTS(70)*CONSTS(3)))*((ALGBRC(27)+ALGBRC(31)+ALGBRC(37)+ALGBRC(40)+ALGBRC(44)+ALGBRC(35)) -  2.00000*ALGBRC(45))
      ALGBRC(25) =  (( CONSTS(1)*CONSTS(2))/CONSTS(3))*log((CONSTS(10)+ 0.120000*STATES(2))/(STATES(4)+ 0.120000*STATES(3)))
      ALGBRC(33) =  CONSTS(16)*STATES(7) ** 3.00000*STATES(8)*(STATES(1) - ALGBRC(25))
      ALGBRC(15) =  (( CONSTS(1)*CONSTS(2))/CONSTS(3))*log(CONSTS(10)/STATES(4))
      ALGBRC(34) =  CONSTS(19)*(STATES(1) - ALGBRC(15))
      ALGBRC(38) =  ((( (1.00000 - CONSTS(27))*CONSTS(23)*CONSTS(21)*STATES(10)*STATES(11)*STATES(12)*(STATES(1) - 50.0000)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))/(1.00000 - EXP(( - (STATES(1) - 50.0000)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))))*( STATES(4)*EXP(( 50.0000*CONSTS(3))/( CONSTS(1)*CONSTS(2))) -  CONSTS(10)*EXP(( - (STATES(1) - 50.0000)*CONSTS(3))/( CONSTS(1)*CONSTS(2))))
      ALGBRC(41) =  ((( CONSTS(27)*CONSTS(23)*CONSTS(21)*STATES(10)*STATES(11)*STATES(13)*(STATES(1) - 50.0000)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))/(1.00000 - EXP(( - (STATES(1) - 50.0000)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))))*( STATES(4)*EXP(( 50.0000*CONSTS(3))/( CONSTS(1)*CONSTS(2))) -  CONSTS(10)*EXP(( - (STATES(1) - 50.0000)*CONSTS(3))/( CONSTS(1)*CONSTS(2))))
      ALGBRC(46) = ( (1.00000 - CONSTS(41))*CONSTS(37)*( EXP(( CONSTS(40)*(CONSTS(38) - 2.00000)*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))*STATES(4) ** CONSTS(38)*CONSTS(11) -  EXP(( (CONSTS(40) - 1.00000)*(CONSTS(38) - 2.00000)*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))*CONSTS(10) ** CONSTS(38)*STATES(5)))/( (1.00000+ CONSTS(39)*( STATES(5)*CONSTS(10) ** CONSTS(38)+ CONSTS(11)*STATES(4) ** CONSTS(38)))*(1.00000+STATES(5)/0.00690000))
      RATES(4) =  (- 1.00000/( 1.00000*CONSTS(70)*CONSTS(3)))*(ALGBRC(33)+ALGBRC(34)+ 3.00000*ALGBRC(45)+ 3.00000*ALGBRC(46)+ALGBRC(38)+ALGBRC(41))
      ALGBRC(47) = ( CONSTS(41)*CONSTS(37)*( EXP(( CONSTS(40)*(CONSTS(38) - 2.00000)*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))*STATES(4) ** CONSTS(38)*CONSTS(11) -  EXP(( (CONSTS(40) - 1.00000)*(CONSTS(38) - 2.00000)*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))*CONSTS(10) ** CONSTS(38)*STATES(9)))/( (1.00000+ CONSTS(39)*( STATES(9)*CONSTS(10) ** CONSTS(38)+ CONSTS(11)*STATES(4) ** CONSTS(38)))*(1.00000+STATES(9)/0.00690000))
      ALGBRC(36) =  ((( (1.00000 - CONSTS(27))*4.00000*CONSTS(21)*STATES(10)*STATES(11)*STATES(12)*(STATES(1) - 50.0000)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))/(1.00000 - EXP(( - (STATES(1) - 50.0000)*CONSTS(3)*2.00000)/( CONSTS(1)*CONSTS(2)))))*( STATES(5)*EXP(( 100.000*CONSTS(3))/( CONSTS(1)*CONSTS(2))) -  CONSTS(11)*EXP(( - (STATES(1) - 50.0000)*CONSTS(3)*2.00000)/( CONSTS(1)*CONSTS(2))))
      ALGBRC(23) =  (( 0.500000*CONSTS(1)*CONSTS(2))/CONSTS(3))*log(CONSTS(11)/STATES(5))
      ALGBRC(43) =  CONSTS(31)*(STATES(1) - ALGBRC(23))
      ALGBRC(7) = TERNRY(VOI.GE.CONSTS(5).AND.VOI.LE.CONSTS(6).AND.(VOI - CONSTS(5)) -  INT((VOI - CONSTS(5))/CONSTS(7))*CONSTS(7).LE.CONSTS(8), CONSTS(9), 0.00000)
      RATES(1) =  (- 1.00000/CONSTS(4))*(ALGBRC(7)+ALGBRC(27)+ALGBRC(44)+ALGBRC(31)+ALGBRC(45)+ALGBRC(33)+ALGBRC(34)+ALGBRC(38)+ALGBRC(41)+ALGBRC(46)+ALGBRC(47)+ALGBRC(36)+ALGBRC(39)+ALGBRC(37)+ALGBRC(40)+ALGBRC(43)+ALGBRC(35))
      ALGBRC(48) = STATES(5)+ STATES(16)*CONSTS(67)+ CONSTS(42)*CONSTS(43)+CONSTS(42)
      ALGBRC(50) =  (STATES(5)/ALGBRC(48))*CONSTS(45) -  (( STATES(16)*CONSTS(67))/ALGBRC(48))*CONSTS(46)
      ALGBRC(51) =  50.0000*(STATES(16) - STATES(17))
      RATES(16) =  (CONSTS(68)/CONSTS(64))*ALGBRC(50) - ALGBRC(51)
      RATES(20) =  CONSTS(55)*STATES(5)*(CONSTS(53) - STATES(20)) -  CONSTS(56)*STATES(20)
      ALGBRC(52) =  ( STATES(18)/(STATES(18)+0.250000) ** 2.00000*CONSTS(48)+CONSTS(47))*STATES(17)
      RATES(17) =  (CONSTS(64)/CONSTS(62))*ALGBRC(51) - ALGBRC(52)
      RATES(21) =  CONSTS(57)*STATES(5)*(CONSTS(54) - STATES(21)) -  CONSTS(58)*STATES(21)
      RATES(5) = ((( (- 1.00000/( 2.00000*1.00000*CONSTS(70)*CONSTS(3)))*((ALGBRC(36)+ALGBRC(43)) -  2.00000*ALGBRC(46))+ STATES(9)*CONSTS(61)*CONSTS(65)+( ALGBRC(52)*CONSTS(62))/CONSTS(68)) - RATES(20)) - RATES(21)) - ALGBRC(50)
      RETURN
      END
      SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(3) =  20.0000*EXP( - 0.125000*((STATES(1)+75.0000) - CONSTS(18)))
      ALGBRC(11) = 2000.00/(1.00000+ 320.000*EXP( - 0.100000*((STATES(1)+75.0000) - CONSTS(18))))
      ALGBRC(6) =  0.260000*0.0330000*EXP(- STATES(1)/14.8750)
      ALGBRC(14) = ( 0.260000*33.0000)/(1.00000+EXP(- (STATES(1)+10.0000)/7.00000))
      ALGBRC(1) = (STATES(1)+22.0000) - 40.0000
      ALGBRC(9) = TERNRY(ABS(ALGBRC(1)).LT.CONSTS(15), 2.50000, ( 3.00000*0.500000*ALGBRC(1))/(1.00000 - EXP(- ALGBRC(1)/5.00000)))
      ALGBRC(17) = TERNRY(ABS(ALGBRC(1)).LT.CONSTS(15), 2.50000, ( 3.00000*0.178000*ALGBRC(1))/(EXP(ALGBRC(1)/15.0000) - 1.00000))
      ALGBRC(2) = STATES(1)+41.0000
      ALGBRC(10) = TERNRY(ABS(ALGBRC(2)).LT.CONSTS(17), 2000.00, ( 200.000*ALGBRC(2))/(1.00000 - EXP( - 0.100000*ALGBRC(2))))
      ALGBRC(18) =  8000.00*EXP( - 0.0560000*(STATES(1)+66.0000))
      ALGBRC(4) = (STATES(1)+24.0000) - 20.0000
      ALGBRC(12) = TERNRY(ABS(ALGBRC(4)).LT.0.000100000, 120.000, ( 30.0000*ALGBRC(4))/(1.00000 - EXP(- ALGBRC(4)/3.00000)))
      ALGBRC(19) = TERNRY(ABS(ALGBRC(4)).LT.0.000100000, 120.000, ( 12.0000*ALGBRC(4))/(EXP(ALGBRC(4)/7.50000) - 1.00000))
      ALGBRC(5) = (STATES(1)+34.0000) - 10.0000
      ALGBRC(13) = TERNRY(ABS(ALGBRC(5)).LT.CONSTS(30), 25.0000, ( 6.25000*ALGBRC(5))/(EXP(ALGBRC(5)/5.50000) - 1.00000))
      ALGBRC(20) = 12.0000/(1.00000+EXP(( - 1.00000*(STATES(1)+34.0000))/5.50000))
      ALGBRC(16) = STATES(5)/(STATES(5)+CONSTS(49))
      ALGBRC(22) = STATES(9)/(STATES(9)+CONSTS(50))
      ALGBRC(24) = ALGBRC(16)+ (1.00000 - ALGBRC(16))*ALGBRC(22)
      ALGBRC(28) = 60.0000+ 500.000*ALGBRC(24) ** 2.00000
      ALGBRC(30) = TERNRY(STATES(1).LT.- 50.0000, 5.00000, 1.00000)
      ALGBRC(8) = EXP( 0.0800000*(STATES(1) - 40.0000))
      ALGBRC(26) =  0.00000*ALGBRC(8)+ 500.000*ALGBRC(24) ** 2.00000
      ALGBRC(32) = (1.00000 - STATES(18)) - STATES(19)
      ALGBRC(39) =  ((( CONSTS(27)*4.00000*CONSTS(21)*STATES(10)*STATES(11)*STATES(13)*(STATES(1) - 50.0000)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))/(1.00000 - EXP(( - (STATES(1) - 50.0000)*CONSTS(3)*2.00000)/( CONSTS(1)*CONSTS(2)))))*( STATES(5)*EXP(( 100.000*CONSTS(3))/( CONSTS(1)*CONSTS(2))) -  CONSTS(11)*EXP(( - (STATES(1) - 50.0000)*CONSTS(3)*2.00000)/( CONSTS(1)*CONSTS(2))))
      ALGBRC(21) =  (( CONSTS(1)*CONSTS(2))/CONSTS(3))*log(STATES(2)/STATES(3))
      ALGBRC(27) = ( (( CONSTS(13)*STATES(2))/(STATES(2)+CONSTS(12)))*(STATES(1) - ALGBRC(21)))/(1.00000+EXP(( ((STATES(1) - ALGBRC(21))+10.0000)*CONSTS(3)*1.67000)/( CONSTS(1)*CONSTS(2))))
      ALGBRC(44) =  CONSTS(32)*(CONSTS(33)+ STATES(14)*(1.00000 - CONSTS(33)))*STATES(15)*(STATES(1) - ALGBRC(21))
      ALGBRC(29) = ( CONSTS(14)*(STATES(3) -  STATES(2)*EXP(( - STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))))/140.000
      ALGBRC(31) =  STATES(6)*ALGBRC(29)
      ALGBRC(37) =  ((( (1.00000 - CONSTS(27))*CONSTS(22)*CONSTS(21)*STATES(10)*STATES(11)*STATES(12)*(STATES(1) - 50.0000)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))/(1.00000 - EXP(( - (STATES(1) - 50.0000)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))))*( STATES(3)*EXP(( 50.0000*CONSTS(3))/( CONSTS(1)*CONSTS(2))) -  STATES(2)*EXP(( - (STATES(1) - 50.0000)*CONSTS(3))/( CONSTS(1)*CONSTS(2))))
      ALGBRC(40) =  ((( CONSTS(27)*CONSTS(22)*CONSTS(21)*STATES(10)*STATES(11)*STATES(13)*(STATES(1) - 50.0000)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))/(1.00000 - EXP(( - (STATES(1) - 50.0000)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))))*( STATES(3)*EXP(( 50.0000*CONSTS(3))/( CONSTS(1)*CONSTS(2))) -  STATES(2)*EXP(( - (STATES(1) - 50.0000)*CONSTS(3))/( CONSTS(1)*CONSTS(2))))
      ALGBRC(45) = ( (( CONSTS(34)*STATES(2))/(CONSTS(35)+STATES(2)))*STATES(4))/(CONSTS(36)+STATES(4))
      ALGBRC(35) =  CONSTS(20)*(STATES(1) - ALGBRC(21))
      ALGBRC(25) =  (( CONSTS(1)*CONSTS(2))/CONSTS(3))*log((CONSTS(10)+ 0.120000*STATES(2))/(STATES(4)+ 0.120000*STATES(3)))
      ALGBRC(33) =  CONSTS(16)*STATES(7) ** 3.00000*STATES(8)*(STATES(1) - ALGBRC(25))
      ALGBRC(15) =  (( CONSTS(1)*CONSTS(2))/CONSTS(3))*log(CONSTS(10)/STATES(4))
      ALGBRC(34) =  CONSTS(19)*(STATES(1) - ALGBRC(15))
      ALGBRC(38) =  ((( (1.00000 - CONSTS(27))*CONSTS(23)*CONSTS(21)*STATES(10)*STATES(11)*STATES(12)*(STATES(1) - 50.0000)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))/(1.00000 - EXP(( - (STATES(1) - 50.0000)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))))*( STATES(4)*EXP(( 50.0000*CONSTS(3))/( CONSTS(1)*CONSTS(2))) -  CONSTS(10)*EXP(( - (STATES(1) - 50.0000)*CONSTS(3))/( CONSTS(1)*CONSTS(2))))
      ALGBRC(41) =  ((( CONSTS(27)*CONSTS(23)*CONSTS(21)*STATES(10)*STATES(11)*STATES(13)*(STATES(1) - 50.0000)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))/(1.00000 - EXP(( - (STATES(1) - 50.0000)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))))*( STATES(4)*EXP(( 50.0000*CONSTS(3))/( CONSTS(1)*CONSTS(2))) -  CONSTS(10)*EXP(( - (STATES(1) - 50.0000)*CONSTS(3))/( CONSTS(1)*CONSTS(2))))
      ALGBRC(46) = ( (1.00000 - CONSTS(41))*CONSTS(37)*( EXP(( CONSTS(40)*(CONSTS(38) - 2.00000)*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))*STATES(4) ** CONSTS(38)*CONSTS(11) -  EXP(( (CONSTS(40) - 1.00000)*(CONSTS(38) - 2.00000)*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))*CONSTS(10) ** CONSTS(38)*STATES(5)))/( (1.00000+ CONSTS(39)*( STATES(5)*CONSTS(10) ** CONSTS(38)+ CONSTS(11)*STATES(4) ** CONSTS(38)))*(1.00000+STATES(5)/0.00690000))
      ALGBRC(47) = ( CONSTS(41)*CONSTS(37)*( EXP(( CONSTS(40)*(CONSTS(38) - 2.00000)*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))*STATES(4) ** CONSTS(38)*CONSTS(11) -  EXP(( (CONSTS(40) - 1.00000)*(CONSTS(38) - 2.00000)*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))*CONSTS(10) ** CONSTS(38)*STATES(9)))/( (1.00000+ CONSTS(39)*( STATES(9)*CONSTS(10) ** CONSTS(38)+ CONSTS(11)*STATES(4) ** CONSTS(38)))*(1.00000+STATES(9)/0.00690000))
      ALGBRC(36) =  ((( (1.00000 - CONSTS(27))*4.00000*CONSTS(21)*STATES(10)*STATES(11)*STATES(12)*(STATES(1) - 50.0000)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))/(1.00000 - EXP(( - (STATES(1) - 50.0000)*CONSTS(3)*2.00000)/( CONSTS(1)*CONSTS(2)))))*( STATES(5)*EXP(( 100.000*CONSTS(3))/( CONSTS(1)*CONSTS(2))) -  CONSTS(11)*EXP(( - (STATES(1) - 50.0000)*CONSTS(3)*2.00000)/( CONSTS(1)*CONSTS(2))))
      ALGBRC(23) =  (( 0.500000*CONSTS(1)*CONSTS(2))/CONSTS(3))*log(CONSTS(11)/STATES(5))
      ALGBRC(43) =  CONSTS(31)*(STATES(1) - ALGBRC(23))
      ALGBRC(7) = 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(48) = STATES(5)+ STATES(16)*CONSTS(67)+ CONSTS(42)*CONSTS(43)+CONSTS(42)
      ALGBRC(50) =  (STATES(5)/ALGBRC(48))*CONSTS(45) -  (( STATES(16)*CONSTS(67))/ALGBRC(48))*CONSTS(46)
      ALGBRC(51) =  50.0000*(STATES(16) - STATES(17))
      ALGBRC(52) =  ( STATES(18)/(STATES(18)+0.250000) ** 2.00000*CONSTS(48)+CONSTS(47))*STATES(17)
      ALGBRC(42) = ALGBRC(36)+ALGBRC(37)+ALGBRC(38)+ALGBRC(39)+ALGBRC(40)+ALGBRC(41)
      ALGBRC(49) = ALGBRC(46)+ALGBRC(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