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 68 entries in the algebraic variable array.
C There are a total of 17 entries in each of the rate and state variable arrays.
C There are a total of 47 entries in the constant variable array.
C
C
C VOI is time in component environment (millisecond).
C STATES(1) is V in component membrane (millivolt).
C CONSTS(1) is R in component membrane (joule_per_mole_kelvin).
C CONSTS(2) is T in component membrane (kelvin).
C CONSTS(3) is F in component membrane (coulomb_per_millimole).
C CONSTS(4) is Cm in component membrane (microF_per_cm2).
C CONSTS(5) is V_c in component membrane (micrometre3).
C ALGBRC(50) is i_K1 in component inward_rectifier_potassium_current (picoA_per_picoF).
C ALGBRC(57) is i_to in component transient_outward_current (picoA_per_picoF).
C ALGBRC(51) is i_Kr in component rapid_time_dependent_potassium_current (picoA_per_picoF).
C ALGBRC(52) is i_Ks in component slow_time_dependent_potassium_current (picoA_per_picoF).
C ALGBRC(55) is i_CaL in component L_type_Ca_current (picoA_per_picoF).
C ALGBRC(58) is i_NaK in component sodium_potassium_pump_current (picoA_per_picoF).
C ALGBRC(53) is i_Na in component fast_sodium_current (picoA_per_picoF).
C ALGBRC(54) is i_b_Na in component sodium_background_current (picoA_per_picoF).
C ALGBRC(59) is i_NaCa in component sodium_calcium_exchanger_current (picoA_per_picoF).
C ALGBRC(56) is i_b_Ca in component calcium_background_current (picoA_per_picoF).
C ALGBRC(61) is i_p_K in component potassium_pump_current (picoA_per_picoF).
C ALGBRC(60) is i_p_Ca in component calcium_pump_current (picoA_per_picoF).
C ALGBRC(65) is i_Stim in component membrane (picoA_per_picoF).
C ALGBRC(63) is Istim in component stimulus_protocol (picoA_per_picoF).
C ALGBRC(1) is E_Na in component reversal_potentials (millivolt).
C ALGBRC(14) is E_K in component reversal_potentials (millivolt).
C ALGBRC(27) is E_Ks in component reversal_potentials (millivolt).
C ALGBRC(36) is E_Ca in component reversal_potentials (millivolt).
C CONSTS(6) is P_kna in component reversal_potentials (nanoA_per_millimolar).
C CONSTS(7) is K_o in component potassium_dynamics (millimolar).
C CONSTS(8) is Na_o in component sodium_dynamics (millimolar).
C STATES(2) is K_i in component potassium_dynamics (millimolar).
C STATES(3) is Na_i in component sodium_dynamics (millimolar).
C CONSTS(9) is Ca_o in component calcium_dynamics (millimolar).
C STATES(4) is Ca_i in component calcium_dynamics (millimolar).
C CONSTS(10) is g_K1 in component inward_rectifier_potassium_current (nanoS_per_picoF).
C ALGBRC(49) is xK1_inf in component inward_rectifier_potassium_current (dimensionless).
C ALGBRC(45) is alpha_K1 in component inward_rectifier_potassium_current (dimensionless).
C ALGBRC(48) is beta_K1 in component inward_rectifier_potassium_current (dimensionless).
C CONSTS(11) is g_Kr in component rapid_time_dependent_potassium_current (nanoS_per_picoF).
C STATES(5) is Xr1 in component rapid_time_dependent_potassium_current_Xr1_gate (dimensionless).
C STATES(6) is Xr2 in component rapid_time_dependent_potassium_current_Xr2_gate (dimensionless).
C ALGBRC(2) is xr1_inf in component rapid_time_dependent_potassium_current_Xr1_gate (dimensionless).
C ALGBRC(15) is alpha_xr1 in component rapid_time_dependent_potassium_current_Xr1_gate (per_millisecond).
C ALGBRC(28) is beta_xr1 in component rapid_time_dependent_potassium_current_Xr1_gate (per_millisecond).
C ALGBRC(37) is tau_xr1 in component rapid_time_dependent_potassium_current_Xr1_gate (millisecond).
C ALGBRC(3) is xr2_inf in component rapid_time_dependent_potassium_current_Xr2_gate (dimensionless).
C ALGBRC(16) is alpha_xr2 in component rapid_time_dependent_potassium_current_Xr2_gate (per_millisecond).
C ALGBRC(29) is beta_xr2 in component rapid_time_dependent_potassium_current_Xr2_gate (per_millisecond).
C ALGBRC(38) is tau_xr2 in component rapid_time_dependent_potassium_current_Xr2_gate (millisecond).
C CONSTS(12) is g_Ks in component slow_time_dependent_potassium_current (nanoS_per_picoF).
C STATES(7) is Xs in component slow_time_dependent_potassium_current_Xs_gate (dimensionless).
C ALGBRC(4) is xs_inf in component slow_time_dependent_potassium_current_Xs_gate (dimensionless).
C ALGBRC(17) is alpha_xs in component slow_time_dependent_potassium_current_Xs_gate (per_millisecond).
C ALGBRC(30) is beta_xs in component slow_time_dependent_potassium_current_Xs_gate (per_millisecond).
C ALGBRC(39) is tau_xs in component slow_time_dependent_potassium_current_Xs_gate (millisecond).
C CONSTS(13) is g_Na in component fast_sodium_current (nanoS_per_picoF).
C STATES(8) is m in component fast_sodium_current_m_gate (dimensionless).
C STATES(9) is h in component fast_sodium_current_h_gate (dimensionless).
C STATES(10) is j in component fast_sodium_current_j_gate (dimensionless).
C ALGBRC(5) is m_inf in component fast_sodium_current_m_gate (dimensionless).
C ALGBRC(18) is alpha_m in component fast_sodium_current_m_gate (per_millisecond).
C ALGBRC(31) is beta_m in component fast_sodium_current_m_gate (per_millisecond).
C ALGBRC(40) is tau_m in component fast_sodium_current_m_gate (millisecond).
C ALGBRC(6) is h_inf in component fast_sodium_current_h_gate (dimensionless).
C ALGBRC(19) is alpha_h in component fast_sodium_current_h_gate (per_millisecond).
C ALGBRC(32) is beta_h in component fast_sodium_current_h_gate (per_millisecond).
C ALGBRC(41) is tau_h in component fast_sodium_current_h_gate (millisecond).
C ALGBRC(7) is j_inf in component fast_sodium_current_j_gate (dimensionless).
C ALGBRC(20) is alpha_j in component fast_sodium_current_j_gate (per_millisecond).
C ALGBRC(33) is beta_j in component fast_sodium_current_j_gate (per_millisecond).
C ALGBRC(42) is tau_j in component fast_sodium_current_j_gate (millisecond).
C CONSTS(14) is g_bna in component sodium_background_current (nanoS_per_picoF).
C CONSTS(15) is g_CaL in component L_type_Ca_current (nanoS_per_picoF).
C STATES(11) is d in component L_type_Ca_current_d_gate (dimensionless).
C STATES(12) is f in component L_type_Ca_current_f_gate (dimensionless).
C STATES(13) is fCa in component L_type_Ca_current_fCa_gate (dimensionless).
C ALGBRC(8) is d_inf in component L_type_Ca_current_d_gate (dimensionless).
C ALGBRC(21) is alpha_d in component L_type_Ca_current_d_gate (per_millisecond).
C ALGBRC(34) is beta_d in component L_type_Ca_current_d_gate (per_millisecond).
C ALGBRC(43) is gamma_d in component L_type_Ca_current_d_gate (per_millisecond).
C ALGBRC(46) is tau_d in component L_type_Ca_current_d_gate (millisecond).
C ALGBRC(9) is f_inf in component L_type_Ca_current_f_gate (dimensionless).
C ALGBRC(22) is tau_f in component L_type_Ca_current_f_gate (millisecond).
C ALGBRC(10) is alpha_fCa in component L_type_Ca_current_fCa_gate (dimensionless).
C ALGBRC(23) is beta_fCa in component L_type_Ca_current_fCa_gate (dimensionless).
C ALGBRC(35) is gama_fCa in component L_type_Ca_current_fCa_gate (dimensionless).
C ALGBRC(44) is fCa_inf in component L_type_Ca_current_fCa_gate (dimensionless).
C CONSTS(47) is tau_fCa in component L_type_Ca_current_fCa_gate (millisecond).
C ALGBRC(47) is d_fCa in component L_type_Ca_current_fCa_gate (dimensionless).
C CONSTS(16) is g_bca in component calcium_background_current (nanoS_per_picoF).
C CONSTS(17) is g_to in component transient_outward_current (nanoS_per_picoF).
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(11) is s_inf in component transient_outward_current_s_gate (dimensionless).
C ALGBRC(24) is tau_s in component transient_outward_current_s_gate (dimensionless).
C ALGBRC(12) is r_inf in component transient_outward_current_r_gate (dimensionless).
C ALGBRC(25) is tau_r in component transient_outward_current_r_gate (millisecond).
C CONSTS(18) is P_NaK in component sodium_potassium_pump_current (picoA_per_picoF).
C CONSTS(19) is K_mk in component sodium_potassium_pump_current (millimolar).
C CONSTS(20) is K_mNa in component sodium_potassium_pump_current (millimolar).
C CONSTS(21) is K_NaCa in component sodium_calcium_exchanger_current (picoA_per_picoF).
C CONSTS(22) is K_sat in component sodium_calcium_exchanger_current (dimensionless).
C CONSTS(23) is alpha in component sodium_calcium_exchanger_current (dimensionless).
C CONSTS(24) is gamma in component sodium_calcium_exchanger_current (dimensionless).
C CONSTS(25) is Km_Ca in component sodium_calcium_exchanger_current (millimolar).
C CONSTS(26) is Km_Nai in component sodium_calcium_exchanger_current (millimolar).
C CONSTS(27) is g_pCa in component calcium_pump_current (nanoS_per_picoF).
C CONSTS(28) is K_pCa in component calcium_pump_current (millimolar).
C CONSTS(29) is g_pK in component potassium_pump_current (nanoS_per_picoF).
C STATES(16) is Ca_SR in component calcium_dynamics (millimolar).
C ALGBRC(62) is i_rel in component calcium_dynamics (millimolar_per_millisecond).
C ALGBRC(64) is i_up in component calcium_dynamics (millimolar_per_millisecond).
C ALGBRC(66) is i_leak in component calcium_dynamics (millimolar_per_millisecond).
C STATES(17) is g in component calcium_dynamics (dimensionless).
C CONSTS(30) is tau_g in component calcium_dynamics (millisecond).
C ALGBRC(13) is g_inf in component calcium_dynamics (dimensionless).
C CONSTS(31) is a_rel in component calcium_dynamics (millimolar_per_millisecond).
C CONSTS(32) is b_rel in component calcium_dynamics (millimolar).
C CONSTS(33) is c_rel in component calcium_dynamics (millimolar_per_millisecond).
C CONSTS(34) is K_up in component calcium_dynamics (millimolar).
C CONSTS(35) is V_leak in component calcium_dynamics (per_millisecond).
C CONSTS(36) is Vmax_up in component calcium_dynamics (millimolar_per_millisecond).
C ALGBRC(67) is Ca_i_bufc in component calcium_dynamics (millimolar).
C ALGBRC(68) is Ca_sr_bufsr in component calcium_dynamics (millimolar).
C CONSTS(37) is Buf_c in component calcium_dynamics (millimolar).
C CONSTS(38) is K_buf_c in component calcium_dynamics (millimolar).
C CONSTS(39) is Buf_sr in component calcium_dynamics (millimolar).
C CONSTS(40) is K_buf_sr in component calcium_dynamics (millimolar).
C CONSTS(41) is V_sr in component calcium_dynamics (micrometre3).
C ALGBRC(26) is d_g in component calcium_dynamics (dimensionless).
C CONSTS(42) is IstimStart in component stimulus_protocol (millisecond).
C CONSTS(43) is IstimEnd in component stimulus_protocol (millisecond).
C CONSTS(44) is IstimAmplitude in component stimulus_protocol (picoA_per_picoF).
C CONSTS(45) is IstimPeriod in component stimulus_protocol (millisecond).
C CONSTS(46) is IstimPulseDuration in component stimulus_protocol (millisecond).
C RATES(1) is d/dt V in component membrane (millivolt).
C RATES(5) is d/dt Xr1 in component rapid_time_dependent_potassium_current_Xr1_gate (dimensionless).
C RATES(6) is d/dt Xr2 in component rapid_time_dependent_potassium_current_Xr2_gate (dimensionless).
C RATES(7) is d/dt Xs in component slow_time_dependent_potassium_current_Xs_gate (dimensionless).
C RATES(8) is d/dt m in component fast_sodium_current_m_gate (dimensionless).
C RATES(9) is d/dt h in component fast_sodium_current_h_gate (dimensionless).
C RATES(10) is d/dt j in component fast_sodium_current_j_gate (dimensionless).
C RATES(11) is d/dt d in component L_type_Ca_current_d_gate (dimensionless).
C RATES(12) is d/dt f in component L_type_Ca_current_f_gate (dimensionless).
C RATES(13) is d/dt fCa in component L_type_Ca_current_fCa_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(17) is d/dt g in component calcium_dynamics (dimensionless).
C RATES(4) is d/dt Ca_i in component calcium_dynamics (millimolar).
C RATES(16) is d/dt Ca_SR in component calcium_dynamics (millimolar).
C RATES(3) is d/dt Na_i in component sodium_dynamics (millimolar).
C RATES(2) is d/dt K_i in component potassium_dynamics (millimolar).
C
      SUBROUTINE initConsts(CONSTS, RATES, STATES)
      REAL CONSTS(*), RATES(*), STATES(*)
      STATES(1) = -86.2
      CONSTS(1) = 8314.472
      CONSTS(2) = 310
      CONSTS(3) = 96485.3415
      CONSTS(4) = 0.185
      CONSTS(5) = 0.016404
      CONSTS(6) = 0.03
      CONSTS(7) = 5.4
      CONSTS(8) = 140
      STATES(2) = 138.3
      STATES(3) = 11.6
      CONSTS(9) = 2
      STATES(4) = 0.0002
      CONSTS(10) = 5.405
      CONSTS(11) = 0.096
      STATES(5) = 0
      STATES(6) = 1
      CONSTS(12) = 0.245
      STATES(7) = 0
      CONSTS(13) = 14.838
      STATES(8) = 0
      STATES(9) = 0.75
      STATES(10) = 0.75
      CONSTS(14) = 0.00029
      CONSTS(15) = 0.000175
      STATES(11) = 0
      STATES(12) = 1
      STATES(13) = 1
      CONSTS(16) = 0.000592
      CONSTS(17) = 0.073
      STATES(14) = 1
      STATES(15) = 0
      CONSTS(18) = 1.362
      CONSTS(19) = 1
      CONSTS(20) = 40
      CONSTS(21) = 1000
      CONSTS(22) = 0.1
      CONSTS(23) = 2.5
      CONSTS(24) = 0.35
      CONSTS(25) = 1.38
      CONSTS(26) = 87.5
      CONSTS(27) = 0.825
      CONSTS(28) = 0.0005
      CONSTS(29) = 0.0146
      STATES(16) = 0.2
      STATES(17) = 1
      CONSTS(30) = 2
      CONSTS(31) = 0.016464
      CONSTS(32) = 0.25
      CONSTS(33) = 0.008232
      CONSTS(34) = 0.00025
      CONSTS(35) = 8e-5
      CONSTS(36) = 0.000425
      CONSTS(37) = 0.15
      CONSTS(38) = 0.001
      CONSTS(39) = 10
      CONSTS(40) = 0.3
      CONSTS(41) = 0.001094
      CONSTS(42) = 100
      CONSTS(43) = 50000
      CONSTS(44) = -52
      CONSTS(45) = 1000
      CONSTS(46) = 1
      CONSTS(47) = 2.00000
      RETURN
      END
      SUBROUTINE computeRates(VOI, CONSTS,  RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(9) = 1.00000/(1.00000+EXP((STATES(1)+20.0000)/7.00000))
      ALGBRC(22) =  1125.00*EXP(- STATES(1)+27.0000 ** 2.00000/240.000)+80.0000+165.000/(1.00000+EXP((25.0000 - STATES(1))/10.0000))
      RATES(12) = (ALGBRC(9) - STATES(12))/ALGBRC(22)
      ALGBRC(11) = 1.00000/(1.00000+EXP((STATES(1)+28.0000)/5.00000))
      ALGBRC(24) =  1000.00*EXP(- STATES(1)+67.0000 ** 2.00000/1000.00)+8.00000
      RATES(14) = (ALGBRC(11) - STATES(14))/ALGBRC(24)
      ALGBRC(12) = 1.00000/(1.00000+EXP((20.0000 - STATES(1))/6.00000))
      ALGBRC(25) =  9.50000*EXP(- STATES(1)+40.0000 ** 2.00000/1800.00)+0.800000
      RATES(15) = (ALGBRC(12) - STATES(15))/ALGBRC(25)
      ALGBRC(13) = TERNRY(STATES(4).LT.0.000350000, 1.00000/(1.00000+STATES(4)/0.000350000 ** 6.00000), 1.00000/(1.00000+STATES(4)/0.000350000 ** 16.0000))
      ALGBRC(26) = (ALGBRC(13) - STATES(17))/CONSTS(30)
      RATES(17) = TERNRY( 0.0100000*ALGBRC(26).GT.0.00000.AND.STATES(1).GT.- 60.0000, 0.00000, ALGBRC(26))
      ALGBRC(2) = 1.00000/(1.00000+EXP((- 26.0000 - STATES(1))/7.00000))
      ALGBRC(15) = 450.000/(1.00000+EXP((- 45.0000 - STATES(1))/10.0000))
      ALGBRC(28) = 6.00000/(1.00000+EXP((STATES(1)+30.0000)/11.5000))
      ALGBRC(37) =  ALGBRC(15)*ALGBRC(28)
      RATES(5) = (ALGBRC(2) - STATES(5))/ALGBRC(37)
      ALGBRC(3) = 1.00000/(1.00000+EXP((STATES(1)+88.0000)/24.0000))
      ALGBRC(16) = 3.00000/(1.00000+EXP((- 60.0000 - STATES(1))/20.0000))
      ALGBRC(29) = 1.12000/(1.00000+EXP((STATES(1) - 60.0000)/20.0000))
      ALGBRC(38) =  ALGBRC(16)*ALGBRC(29)
      RATES(6) = (ALGBRC(3) - STATES(6))/ALGBRC(38)
      ALGBRC(4) = 1.00000/(1.00000+EXP((- 5.00000 - STATES(1))/14.0000))
      ALGBRC(17) = 1100.00/ (1.00000+EXP((- 10.0000 - STATES(1))/6.00000)) ** (1.0 / 2)
      ALGBRC(30) = 1.00000/(1.00000+EXP((STATES(1) - 60.0000)/20.0000))
      ALGBRC(39) =  ALGBRC(17)*ALGBRC(30)
      RATES(7) = (ALGBRC(4) - STATES(7))/ALGBRC(39)
      ALGBRC(5) = 1.00000/1.00000+EXP((- 56.8600 - STATES(1))/9.03000) ** 2.00000
      ALGBRC(18) = 1.00000/(1.00000+EXP((- 60.0000 - STATES(1))/5.00000))
      ALGBRC(31) = 0.100000/(1.00000+EXP((STATES(1)+35.0000)/5.00000))+0.100000/(1.00000+EXP((STATES(1) - 50.0000)/200.000))
      ALGBRC(40) =  ALGBRC(18)*ALGBRC(31)
      RATES(8) = (ALGBRC(5) - STATES(8))/ALGBRC(40)
      ALGBRC(6) = 1.00000/1.00000+EXP((STATES(1)+71.5500)/7.43000) ** 2.00000
      ALGBRC(19) = TERNRY(STATES(1).LT.- 40.0000,  0.0570000*EXP(- (STATES(1)+80.0000)/6.80000), 0.00000)
      ALGBRC(32) = TERNRY(STATES(1).LT.- 40.0000,  2.70000*EXP( 0.0790000*STATES(1))+ 310000.*EXP( 0.348500*STATES(1)), 0.770000/( 0.130000*(1.00000+EXP((STATES(1)+10.6600)/- 11.1000))))
      ALGBRC(41) = 1.00000/(ALGBRC(19)+ALGBRC(32))
      RATES(9) = (ALGBRC(6) - STATES(9))/ALGBRC(41)
      ALGBRC(7) = 1.00000/1.00000+EXP((STATES(1)+71.5500)/7.43000) ** 2.00000
      ALGBRC(20) = TERNRY(STATES(1).LT.- 40.0000, ( ( - 25428.0*EXP( 0.244400*STATES(1)) -  6.94800e-06*EXP( - 0.0439100*STATES(1)))*(STATES(1)+37.7800))/(1.00000+EXP( 0.311000*(STATES(1)+79.2300))), 0.00000)
      ALGBRC(33) = TERNRY(STATES(1).LT.- 40.0000, ( 0.0242400*EXP( - 0.0105200*STATES(1)))/(1.00000+EXP( - 0.137800*(STATES(1)+40.1400))), ( 0.600000*EXP( 0.0570000*STATES(1)))/(1.00000+EXP( - 0.100000*(STATES(1)+32.0000))))
      ALGBRC(42) = 1.00000/(ALGBRC(20)+ALGBRC(33))
      RATES(10) = (ALGBRC(7) - STATES(10))/ALGBRC(42)
      ALGBRC(8) = 1.00000/(1.00000+EXP((- 5.00000 - STATES(1))/7.50000))
      ALGBRC(21) = 1.40000/(1.00000+EXP((- 35.0000 - STATES(1))/13.0000))+0.250000
      ALGBRC(34) = 1.40000/(1.00000+EXP((STATES(1)+5.00000)/5.00000))
      ALGBRC(43) = 1.00000/(1.00000+EXP((50.0000 - STATES(1))/20.0000))
      ALGBRC(46) =  ALGBRC(21)*ALGBRC(34)+ALGBRC(43)
      RATES(11) = (ALGBRC(8) - STATES(11))/ALGBRC(46)
      ALGBRC(10) = 1.00000/(1.00000+STATES(4)/0.000325000 ** 8.00000)
      ALGBRC(23) = 0.100000/(1.00000+EXP((STATES(4) - 0.000500000)/0.000100000))
      ALGBRC(35) = 0.200000/(1.00000+EXP((STATES(4) - 0.000750000)/0.000800000))
      ALGBRC(44) = (ALGBRC(10)+ALGBRC(23)+ALGBRC(35)+0.230000)/1.46000
      ALGBRC(47) = (ALGBRC(44) - STATES(13))/CONSTS(47)
      RATES(13) = TERNRY( 0.0100000*ALGBRC(47).GT.0.00000.AND.STATES(1).GT.- 60.0000, 0.00000, ALGBRC(47))
      ALGBRC(58) = (( (( CONSTS(18)*CONSTS(7))/(CONSTS(7)+CONSTS(19)))*STATES(3))/(STATES(3)+CONSTS(20)))/(1.00000+ 0.124500*EXP(( - 0.100000*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))+ 0.0353000*EXP(( - STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2))))
      ALGBRC(1) =  (( CONSTS(1)*CONSTS(2))/CONSTS(3))*log(CONSTS(8)/STATES(3))
      ALGBRC(53) =  CONSTS(13)*STATES(8) ** 3.00000*STATES(9)*STATES(10)*(STATES(1) - ALGBRC(1))
      ALGBRC(54) =  CONSTS(14)*(STATES(1) - ALGBRC(1))
      ALGBRC(59) = ( CONSTS(21)*( EXP(( CONSTS(24)*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))*STATES(3) ** 3.00000*CONSTS(9) -  EXP(( (CONSTS(24) - 1.00000)*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))*CONSTS(8) ** 3.00000*STATES(4)*CONSTS(23)))/( (CONSTS(26) ** 3.00000+CONSTS(8) ** 3.00000)*(CONSTS(25)+CONSTS(9))*(1.00000+ CONSTS(22)*EXP(( (CONSTS(24) - 1.00000)*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))))
      RATES(3) =  (- (ALGBRC(53)+ALGBRC(54)+ 3.00000*ALGBRC(58)+ 3.00000*ALGBRC(59))/( CONSTS(5)*CONSTS(3)))*CONSTS(4)
      ALGBRC(14) =  (( CONSTS(1)*CONSTS(2))/CONSTS(3))*log(CONSTS(7)/STATES(2))
      ALGBRC(45) = 0.100000/(1.00000+EXP( 0.0600000*((STATES(1) - ALGBRC(14)) - 200.000)))
      ALGBRC(48) = ( 3.00000*EXP( 0.000200000*((STATES(1) - ALGBRC(14))+100.000))+EXP( 0.100000*((STATES(1) - ALGBRC(14)) - 10.0000)))/(1.00000+EXP( - 0.500000*(STATES(1) - ALGBRC(14))))
      ALGBRC(49) = ALGBRC(45)/(ALGBRC(45)+ALGBRC(48))
      ALGBRC(50) =  CONSTS(10)*ALGBRC(49)*(STATES(1) - ALGBRC(14))
      ALGBRC(57) =  CONSTS(17)*STATES(15)*STATES(14)*(STATES(1) - ALGBRC(14))
      ALGBRC(51) =  CONSTS(11)* (CONSTS(7)/5.40000) ** (1.0 / 2)*STATES(5)*STATES(6)*(STATES(1) - ALGBRC(14))
      ALGBRC(27) =  (( CONSTS(1)*CONSTS(2))/CONSTS(3))*log((CONSTS(7)+ CONSTS(6)*CONSTS(8))/(STATES(2)+ CONSTS(6)*STATES(3)))
      ALGBRC(52) =  CONSTS(12)*STATES(7) ** 2.00000*(STATES(1) - ALGBRC(27))
      ALGBRC(55) = ( (( CONSTS(15)*STATES(11)*STATES(12)*STATES(13)*4.00000*STATES(1)*CONSTS(3) ** 2.00000)/( CONSTS(1)*CONSTS(2)))*( STATES(4)*EXP(( 2.00000*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2))) -  0.341000*CONSTS(9)))/(EXP(( 2.00000*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2))) - 1.00000)
      ALGBRC(36) =  (( 0.500000*CONSTS(1)*CONSTS(2))/CONSTS(3))*log(CONSTS(9)/STATES(4))
      ALGBRC(56) =  CONSTS(16)*(STATES(1) - ALGBRC(36))
      ALGBRC(61) = ( CONSTS(29)*(STATES(1) - ALGBRC(14)))/(1.00000+EXP((25.0000 - STATES(1))/5.98000))
      ALGBRC(60) = ( CONSTS(27)*STATES(4))/(STATES(4)+CONSTS(28))
      ALGBRC(63) = TERNRY(VOI.GE.CONSTS(42).AND.VOI.LE.CONSTS(43).AND.(VOI - CONSTS(42)) -  INT((VOI - CONSTS(42))/CONSTS(45))*CONSTS(45).LE.CONSTS(46), CONSTS(44), 0.00000)
      ALGBRC(65) = ALGBRC(63)
      RATES(1) =  (- 1.00000/1.00000)*(ALGBRC(50)+ALGBRC(57)+ALGBRC(51)+ALGBRC(52)+ALGBRC(55)+ALGBRC(58)+ALGBRC(53)+ALGBRC(54)+ALGBRC(59)+ALGBRC(56)+ALGBRC(61)+ALGBRC(60)+ALGBRC(65))
      RATES(2) =  (- ((ALGBRC(50)+ALGBRC(57)+ALGBRC(51)+ALGBRC(52)+ALGBRC(61)+ALGBRC(65)) -  2.00000*ALGBRC(58))/( CONSTS(5)*CONSTS(3)))*CONSTS(4)
      ALGBRC(62) =  (( CONSTS(31)*STATES(16) ** 2.00000)/(CONSTS(32) ** 2.00000+STATES(16) ** 2.00000)+CONSTS(33))*STATES(11)*STATES(17)
      ALGBRC(64) = CONSTS(36)/(1.00000+CONSTS(34) ** 2.00000/STATES(4) ** 2.00000)
      ALGBRC(66) =  CONSTS(35)*(STATES(16) - STATES(4))
      ALGBRC(67) = 1.00000/(1.00000+( CONSTS(37)*CONSTS(38))/STATES(4)+CONSTS(38) ** 2.00000)
      RATES(4) =  ALGBRC(67)*(((ALGBRC(66) - ALGBRC(64))+ALGBRC(62)) -  (((ALGBRC(55)+ALGBRC(56)+ALGBRC(60)) -  2.00000*ALGBRC(59))/( 2.00000*CONSTS(5)*CONSTS(3)))*CONSTS(4))
      ALGBRC(68) = 1.00000/(1.00000+( CONSTS(39)*CONSTS(40))/STATES(16)+CONSTS(40) ** 2.00000)
      RATES(16) =  (( ALGBRC(68)*CONSTS(5))/CONSTS(41))*(ALGBRC(64) - (ALGBRC(62)+ALGBRC(66)))
      RETURN
      END
      SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(9) = 1.00000/(1.00000+EXP((STATES(1)+20.0000)/7.00000))
      ALGBRC(22) =  1125.00*EXP(- STATES(1)+27.0000 ** 2.00000/240.000)+80.0000+165.000/(1.00000+EXP((25.0000 - STATES(1))/10.0000))
      ALGBRC(11) = 1.00000/(1.00000+EXP((STATES(1)+28.0000)/5.00000))
      ALGBRC(24) =  1000.00*EXP(- STATES(1)+67.0000 ** 2.00000/1000.00)+8.00000
      ALGBRC(12) = 1.00000/(1.00000+EXP((20.0000 - STATES(1))/6.00000))
      ALGBRC(25) =  9.50000*EXP(- STATES(1)+40.0000 ** 2.00000/1800.00)+0.800000
      ALGBRC(13) = TERNRY(STATES(4).LT.0.000350000, 1.00000/(1.00000+STATES(4)/0.000350000 ** 6.00000), 1.00000/(1.00000+STATES(4)/0.000350000 ** 16.0000))
      ALGBRC(26) = (ALGBRC(13) - STATES(17))/CONSTS(30)
      ALGBRC(2) = 1.00000/(1.00000+EXP((- 26.0000 - STATES(1))/7.00000))
      ALGBRC(15) = 450.000/(1.00000+EXP((- 45.0000 - STATES(1))/10.0000))
      ALGBRC(28) = 6.00000/(1.00000+EXP((STATES(1)+30.0000)/11.5000))
      ALGBRC(37) =  ALGBRC(15)*ALGBRC(28)
      ALGBRC(3) = 1.00000/(1.00000+EXP((STATES(1)+88.0000)/24.0000))
      ALGBRC(16) = 3.00000/(1.00000+EXP((- 60.0000 - STATES(1))/20.0000))
      ALGBRC(29) = 1.12000/(1.00000+EXP((STATES(1) - 60.0000)/20.0000))
      ALGBRC(38) =  ALGBRC(16)*ALGBRC(29)
      ALGBRC(4) = 1.00000/(1.00000+EXP((- 5.00000 - STATES(1))/14.0000))
      ALGBRC(17) = 1100.00/ (1.00000+EXP((- 10.0000 - STATES(1))/6.00000)) ** (1.0 / 2)
      ALGBRC(30) = 1.00000/(1.00000+EXP((STATES(1) - 60.0000)/20.0000))
      ALGBRC(39) =  ALGBRC(17)*ALGBRC(30)
      ALGBRC(5) = 1.00000/1.00000+EXP((- 56.8600 - STATES(1))/9.03000) ** 2.00000
      ALGBRC(18) = 1.00000/(1.00000+EXP((- 60.0000 - STATES(1))/5.00000))
      ALGBRC(31) = 0.100000/(1.00000+EXP((STATES(1)+35.0000)/5.00000))+0.100000/(1.00000+EXP((STATES(1) - 50.0000)/200.000))
      ALGBRC(40) =  ALGBRC(18)*ALGBRC(31)
      ALGBRC(6) = 1.00000/1.00000+EXP((STATES(1)+71.5500)/7.43000) ** 2.00000
      ALGBRC(19) = TERNRY(STATES(1).LT.- 40.0000,  0.0570000*EXP(- (STATES(1)+80.0000)/6.80000), 0.00000)
      ALGBRC(32) = TERNRY(STATES(1).LT.- 40.0000,  2.70000*EXP( 0.0790000*STATES(1))+ 310000.*EXP( 0.348500*STATES(1)), 0.770000/( 0.130000*(1.00000+EXP((STATES(1)+10.6600)/- 11.1000))))
      ALGBRC(41) = 1.00000/(ALGBRC(19)+ALGBRC(32))
      ALGBRC(7) = 1.00000/1.00000+EXP((STATES(1)+71.5500)/7.43000) ** 2.00000
      ALGBRC(20) = TERNRY(STATES(1).LT.- 40.0000, ( ( - 25428.0*EXP( 0.244400*STATES(1)) -  6.94800e-06*EXP( - 0.0439100*STATES(1)))*(STATES(1)+37.7800))/(1.00000+EXP( 0.311000*(STATES(1)+79.2300))), 0.00000)
      ALGBRC(33) = TERNRY(STATES(1).LT.- 40.0000, ( 0.0242400*EXP( - 0.0105200*STATES(1)))/(1.00000+EXP( - 0.137800*(STATES(1)+40.1400))), ( 0.600000*EXP( 0.0570000*STATES(1)))/(1.00000+EXP( - 0.100000*(STATES(1)+32.0000))))
      ALGBRC(42) = 1.00000/(ALGBRC(20)+ALGBRC(33))
      ALGBRC(8) = 1.00000/(1.00000+EXP((- 5.00000 - STATES(1))/7.50000))
      ALGBRC(21) = 1.40000/(1.00000+EXP((- 35.0000 - STATES(1))/13.0000))+0.250000
      ALGBRC(34) = 1.40000/(1.00000+EXP((STATES(1)+5.00000)/5.00000))
      ALGBRC(43) = 1.00000/(1.00000+EXP((50.0000 - STATES(1))/20.0000))
      ALGBRC(46) =  ALGBRC(21)*ALGBRC(34)+ALGBRC(43)
      ALGBRC(10) = 1.00000/(1.00000+STATES(4)/0.000325000 ** 8.00000)
      ALGBRC(23) = 0.100000/(1.00000+EXP((STATES(4) - 0.000500000)/0.000100000))
      ALGBRC(35) = 0.200000/(1.00000+EXP((STATES(4) - 0.000750000)/0.000800000))
      ALGBRC(44) = (ALGBRC(10)+ALGBRC(23)+ALGBRC(35)+0.230000)/1.46000
      ALGBRC(47) = (ALGBRC(44) - STATES(13))/CONSTS(47)
      ALGBRC(58) = (( (( CONSTS(18)*CONSTS(7))/(CONSTS(7)+CONSTS(19)))*STATES(3))/(STATES(3)+CONSTS(20)))/(1.00000+ 0.124500*EXP(( - 0.100000*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))+ 0.0353000*EXP(( - STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2))))
      ALGBRC(1) =  (( CONSTS(1)*CONSTS(2))/CONSTS(3))*log(CONSTS(8)/STATES(3))
      ALGBRC(53) =  CONSTS(13)*STATES(8) ** 3.00000*STATES(9)*STATES(10)*(STATES(1) - ALGBRC(1))
      ALGBRC(54) =  CONSTS(14)*(STATES(1) - ALGBRC(1))
      ALGBRC(59) = ( CONSTS(21)*( EXP(( CONSTS(24)*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))*STATES(3) ** 3.00000*CONSTS(9) -  EXP(( (CONSTS(24) - 1.00000)*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))*CONSTS(8) ** 3.00000*STATES(4)*CONSTS(23)))/( (CONSTS(26) ** 3.00000+CONSTS(8) ** 3.00000)*(CONSTS(25)+CONSTS(9))*(1.00000+ CONSTS(22)*EXP(( (CONSTS(24) - 1.00000)*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))))
      ALGBRC(14) =  (( CONSTS(1)*CONSTS(2))/CONSTS(3))*log(CONSTS(7)/STATES(2))
      ALGBRC(45) = 0.100000/(1.00000+EXP( 0.0600000*((STATES(1) - ALGBRC(14)) - 200.000)))
      ALGBRC(48) = ( 3.00000*EXP( 0.000200000*((STATES(1) - ALGBRC(14))+100.000))+EXP( 0.100000*((STATES(1) - ALGBRC(14)) - 10.0000)))/(1.00000+EXP( - 0.500000*(STATES(1) - ALGBRC(14))))
      ALGBRC(49) = ALGBRC(45)/(ALGBRC(45)+ALGBRC(48))
      ALGBRC(50) =  CONSTS(10)*ALGBRC(49)*(STATES(1) - ALGBRC(14))
      ALGBRC(57) =  CONSTS(17)*STATES(15)*STATES(14)*(STATES(1) - ALGBRC(14))
      ALGBRC(51) =  CONSTS(11)* (CONSTS(7)/5.40000) ** (1.0 / 2)*STATES(5)*STATES(6)*(STATES(1) - ALGBRC(14))
      ALGBRC(27) =  (( CONSTS(1)*CONSTS(2))/CONSTS(3))*log((CONSTS(7)+ CONSTS(6)*CONSTS(8))/(STATES(2)+ CONSTS(6)*STATES(3)))
      ALGBRC(52) =  CONSTS(12)*STATES(7) ** 2.00000*(STATES(1) - ALGBRC(27))
      ALGBRC(55) = ( (( CONSTS(15)*STATES(11)*STATES(12)*STATES(13)*4.00000*STATES(1)*CONSTS(3) ** 2.00000)/( CONSTS(1)*CONSTS(2)))*( STATES(4)*EXP(( 2.00000*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2))) -  0.341000*CONSTS(9)))/(EXP(( 2.00000*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2))) - 1.00000)
      ALGBRC(36) =  (( 0.500000*CONSTS(1)*CONSTS(2))/CONSTS(3))*log(CONSTS(9)/STATES(4))
      ALGBRC(56) =  CONSTS(16)*(STATES(1) - ALGBRC(36))
      ALGBRC(61) = ( CONSTS(29)*(STATES(1) - ALGBRC(14)))/(1.00000+EXP((25.0000 - STATES(1))/5.98000))
      ALGBRC(60) = ( CONSTS(27)*STATES(4))/(STATES(4)+CONSTS(28))
      ALGBRC(63) = TERNRY(VOI.GE.CONSTS(42).AND.VOI.LE.CONSTS(43).AND.(VOI - CONSTS(42)) -  INT((VOI - CONSTS(42))/CONSTS(45))*CONSTS(45).LE.CONSTS(46), CONSTS(44), 0.00000)
      ALGBRC(65) = ALGBRC(63)
      ALGBRC(62) =  (( CONSTS(31)*STATES(16) ** 2.00000)/(CONSTS(32) ** 2.00000+STATES(16) ** 2.00000)+CONSTS(33))*STATES(11)*STATES(17)
      ALGBRC(64) = CONSTS(36)/(1.00000+CONSTS(34) ** 2.00000/STATES(4) ** 2.00000)
      ALGBRC(66) =  CONSTS(35)*(STATES(16) - STATES(4))
      ALGBRC(67) = 1.00000/(1.00000+( CONSTS(37)*CONSTS(38))/STATES(4)+CONSTS(38) ** 2.00000)
      ALGBRC(68) = 1.00000/(1.00000+( CONSTS(39)*CONSTS(40))/STATES(16)+CONSTS(40) ** 2.00000)
      RETURN
      END
      REAL FUNCTION TERNRY(TEST, VALA, VALB)
      LOGICAL TEST
      REAL VALA, VALB
      IF (TEST) THEN
        TERNRY = VALA
      ELSE
        TERNRY = VALB
      ENDIF
      RETURN
      END