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 72 entries in the algebraic variable array.
C There are a total of 26 entries in each of the rate and state variable arrays.
C There are a total of 48 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 (picoF).
C ALGBRC(1) is i_st in component membrane (picoA).
C ALGBRC(30) is i_Na in component fast_sodium_current (picoA).
C ALGBRC(48) is i_K1 in component time_independent_potassium_current (picoA).
C ALGBRC(49) is i_to in component transient_outward_K_current (picoA).
C ALGBRC(50) is i_Kur in component ultrarapid_delayed_rectifier_K_current (picoA).
C ALGBRC(51) is i_Kr in component rapid_delayed_rectifier_K_current (picoA).
C ALGBRC(52) is i_Ks in component slow_delayed_rectifier_K_current (picoA).
C ALGBRC(54) is i_Ca_L in component L_type_Ca_channel (picoA).
C ALGBRC(61) is i_CaP in component sarcolemmal_calcium_pump_current (picoA).
C ALGBRC(56) is i_NaK in component sodium_potassium_pump (picoA).
C ALGBRC(60) is i_NaCa in component Na_Ca_exchanger_current (picoA).
C ALGBRC(57) is i_B_Na in component background_currents (picoA).
C ALGBRC(58) is i_B_Ca in component background_currents (picoA).
C ALGBRC(59) is i_B_Cl in component background_currents (picoA).
C ALGBRC(53) is i_K_Ach in component i_K_Ach (picoA).
C CONSTS(5) is stim_start in component membrane (millisecond).
C CONSTS(6) is stim_end in component membrane (millisecond).
C CONSTS(7) is stim_period in component membrane (millisecond).
C CONSTS(8) is stim_duration in component membrane (millisecond).
C CONSTS(9) is stim_amplitude in component membrane (picoA).
C ALGBRC(16) is E_Na in component fast_sodium_current (millivolt).
C CONSTS(10) is g_Na in component fast_sodium_current (nanoS_per_picoF).
C STATES(2) is Na_i in component intracellular_ion_concentrations (millimolar).
C CONSTS(11) is Na_o in component standard_ionic_concentrations (millimolar).
C STATES(3) is m in component fast_sodium_current_m_gate (dimensionless).
C STATES(4) is h in component fast_sodium_current_h_gate (dimensionless).
C STATES(5) is j in component fast_sodium_current_j_gate (dimensionless).
C ALGBRC(2) is alpha_m in component fast_sodium_current_m_gate (per_millisecond).
C ALGBRC(17) is beta_m in component fast_sodium_current_m_gate (per_millisecond).
C ALGBRC(31) is m_inf in component fast_sodium_current_m_gate (dimensionless).
C ALGBRC(40) is tau_m in component fast_sodium_current_m_gate (millisecond).
C ALGBRC(3) is alpha_h in component fast_sodium_current_h_gate (per_millisecond).
C ALGBRC(18) is beta_h in component fast_sodium_current_h_gate (per_millisecond).
C ALGBRC(32) is h_inf in component fast_sodium_current_h_gate (dimensionless).
C ALGBRC(41) is tau_h in component fast_sodium_current_h_gate (millisecond).
C ALGBRC(4) is alpha_j in component fast_sodium_current_j_gate (per_millisecond).
C ALGBRC(19) is beta_j in component fast_sodium_current_j_gate (per_millisecond).
C ALGBRC(33) is j_inf in component fast_sodium_current_j_gate (dimensionless).
C ALGBRC(42) is tau_j in component fast_sodium_current_j_gate (millisecond).
C ALGBRC(39) is E_K in component time_independent_potassium_current (millivolt).
C CONSTS(12) is g_K1 in component time_independent_potassium_current (nanoS_per_picoF).
C CONSTS(13) is K_o in component standard_ionic_concentrations (millimolar).
C STATES(6) is K_i in component intracellular_ion_concentrations (millimolar).
C CONSTS(14) is g_to in component transient_outward_K_current (nanoS_per_picoF).
C STATES(7) is oa in component transient_outward_K_current_oa_gate (dimensionless).
C STATES(8) is oi in component transient_outward_K_current_oi_gate (dimensionless).
C ALGBRC(5) is tau_oa in component transient_outward_K_current_oa_gate (millisecond).
C ALGBRC(20) is oa_infinity in component transient_outward_K_current_oa_gate (dimensionless).
C ALGBRC(6) is alpha_oi in component transient_outward_K_current_oi_gate (per_millisecond).
C ALGBRC(21) is beta_oi in component transient_outward_K_current_oi_gate (per_millisecond).
C ALGBRC(34) is tau_oi in component transient_outward_K_current_oi_gate (millisecond).
C ALGBRC(43) is oi_infinity in component transient_outward_K_current_oi_gate (dimensionless).
C CONSTS(15) is g_Kur in component ultrarapid_delayed_rectifier_K_current (nanoS_per_picoF).
C STATES(9) is ua in component ultrarapid_delayed_rectifier_K_current_ua_gate (dimensionless).
C STATES(10) is ui in component ultrarapid_delayed_rectifier_K_current_ui_gate (dimensionless).
C ALGBRC(7) is alpha_ua in component ultrarapid_delayed_rectifier_K_current_ua_gate (per_millisecond).
C ALGBRC(22) is beta_ua in component ultrarapid_delayed_rectifier_K_current_ua_gate (per_millisecond).
C ALGBRC(35) is tau_ua in component ultrarapid_delayed_rectifier_K_current_ua_gate (millisecond).
C ALGBRC(44) is ua_infinity in component ultrarapid_delayed_rectifier_K_current_ua_gate (dimensionless).
C ALGBRC(8) is alpha_ui in component ultrarapid_delayed_rectifier_K_current_ui_gate (per_millisecond).
C ALGBRC(23) is beta_ui in component ultrarapid_delayed_rectifier_K_current_ui_gate (per_millisecond).
C ALGBRC(36) is tau_ui in component ultrarapid_delayed_rectifier_K_current_ui_gate (millisecond).
C ALGBRC(45) is ui_infinity in component ultrarapid_delayed_rectifier_K_current_ui_gate (dimensionless).
C CONSTS(16) is g_Kr in component rapid_delayed_rectifier_K_current (nanoS_per_picoF).
C STATES(11) is xr in component rapid_delayed_rectifier_K_current_xr_gate (dimensionless).
C ALGBRC(9) is alpha_xr in component rapid_delayed_rectifier_K_current_xr_gate (per_millisecond).
C ALGBRC(24) is beta_xr in component rapid_delayed_rectifier_K_current_xr_gate (per_millisecond).
C ALGBRC(37) is tau_xr in component rapid_delayed_rectifier_K_current_xr_gate (millisecond).
C ALGBRC(46) is xr_infinity in component rapid_delayed_rectifier_K_current_xr_gate (dimensionless).
C CONSTS(17) is g_Ks in component slow_delayed_rectifier_K_current (nanoS_per_picoF).
C STATES(12) is xs in component slow_delayed_rectifier_K_current_xs_gate (dimensionless).
C ALGBRC(10) is alpha_xs in component slow_delayed_rectifier_K_current_xs_gate (per_millisecond).
C ALGBRC(25) is beta_xs in component slow_delayed_rectifier_K_current_xs_gate (per_millisecond).
C ALGBRC(38) is tau_xs in component slow_delayed_rectifier_K_current_xs_gate (millisecond).
C ALGBRC(47) is xs_infinity in component slow_delayed_rectifier_K_current_xs_gate (dimensionless).
C CONSTS(18) is g_K_Ach in component i_K_Ach (nanoS_per_picoF).
C STATES(13) is xa in component i_K_Ach_xa_gate (dimensionless).
C ALGBRC(11) is tau_xa in component i_K_Ach_xa_gate (millisecond).
C ALGBRC(26) is xa_infinity in component i_K_Ach_xa_gate (dimensionless).
C CONSTS(19) is g_Ca_L in component L_type_Ca_channel (nanoS_per_picoF).
C STATES(14) is Ca_i in component intracellular_ion_concentrations (millimolar).
C STATES(15) is d in component L_type_Ca_channel_d_gate (dimensionless).
C STATES(16) is f in component L_type_Ca_channel_f_gate (dimensionless).
C STATES(17) is f_Ca in component L_type_Ca_channel_f_Ca_gate (dimensionless).
C ALGBRC(12) is d_infinity in component L_type_Ca_channel_d_gate (dimensionless).
C ALGBRC(27) is tau_d in component L_type_Ca_channel_d_gate (millisecond).
C ALGBRC(13) is f_infinity in component L_type_Ca_channel_f_gate (dimensionless).
C ALGBRC(28) is tau_f in component L_type_Ca_channel_f_gate (millisecond).
C ALGBRC(14) is f_Ca_infinity in component L_type_Ca_channel_f_Ca_gate (dimensionless).
C CONSTS(44) is tau_f_Ca in component L_type_Ca_channel_f_Ca_gate (millisecond).
C CONSTS(20) is Km_Na_i in component sodium_potassium_pump (millimolar).
C CONSTS(21) is Km_K_o in component sodium_potassium_pump (millimolar).
C CONSTS(22) is i_NaK_max in component sodium_potassium_pump (picoA_per_picoF).
C ALGBRC(55) is f_NaK in component sodium_potassium_pump (dimensionless).
C CONSTS(45) is sigma in component sodium_potassium_pump (dimensionless).
C CONSTS(23) is g_B_Na in component background_currents (nanoS_per_picoF).
C CONSTS(24) is g_B_Ca in component background_currents (nanoS_per_picoF).
C CONSTS(25) is g_B_Cl in component background_currents (nanoS_per_picoF).
C CONSTS(26) is Ca_o in component standard_ionic_concentrations (millimolar).
C STATES(18) is Cl_i in component intracellular_ion_concentrations (millimolar).
C CONSTS(27) is Cl_o in component standard_ionic_concentrations (millimolar).
C CONSTS(28) is I_NaCa_max in component Na_Ca_exchanger_current (picoA_per_picoF).
C CONSTS(29) is K_mNa in component Na_Ca_exchanger_current (millimolar).
C CONSTS(30) is K_mCa in component Na_Ca_exchanger_current (millimolar).
C CONSTS(31) is K_sat in component Na_Ca_exchanger_current (dimensionless).
C CONSTS(32) is gamma in component Na_Ca_exchanger_current (dimensionless).
C CONSTS(33) is i_CaP_max in component sarcolemmal_calcium_pump_current (picoA_per_picoF).
C ALGBRC(62) is i_rel in component Ca_release_current_from_JSR (millimolar_per_millisecond).
C ALGBRC(63) is Fn in component Ca_release_current_from_JSR (dimensionless).
C CONSTS(34) is K_rel in component Ca_release_current_from_JSR (per_millisecond).
C CONSTS(47) is V_rel in component intracellular_ion_concentrations (micrometre_3).
C STATES(19) is Ca_rel in component intracellular_ion_concentrations (millimolar).
C STATES(20) is u in component Ca_release_current_from_JSR_u_gate (dimensionless).
C STATES(21) is v in component Ca_release_current_from_JSR_v_gate (dimensionless).
C STATES(22) is w in component Ca_release_current_from_JSR_w_gate (dimensionless).
C CONSTS(46) is tau_u in component Ca_release_current_from_JSR_u_gate (millisecond).
C ALGBRC(65) is u_infinity in component Ca_release_current_from_JSR_u_gate (dimensionless).
C ALGBRC(66) is tau_v in component Ca_release_current_from_JSR_v_gate (millisecond).
C ALGBRC(69) is v_infinity in component Ca_release_current_from_JSR_v_gate (dimensionless).
C ALGBRC(15) is tau_w in component Ca_release_current_from_JSR_w_gate (millisecond).
C ALGBRC(29) is w_infinity in component Ca_release_current_from_JSR_w_gate (dimensionless).
C ALGBRC(64) is i_tr in component transfer_current_from_NSR_to_JSR (millimolar_per_millisecond).
C CONSTS(35) is tau_tr in component transfer_current_from_NSR_to_JSR (millisecond).
C STATES(23) is Ca_up in component intracellular_ion_concentrations (millimolar).
C CONSTS(36) is I_up_max in component Ca_uptake_current_by_the_NSR (millimolar_per_millisecond).
C ALGBRC(67) is i_up in component Ca_uptake_current_by_the_NSR (millimolar_per_millisecond).
C CONSTS(37) is K_up in component Ca_uptake_current_by_the_NSR (millimolar).
C ALGBRC(70) is i_up_leak in component Ca_leak_current_by_the_NSR (millimolar_per_millisecond).
C CONSTS(38) is Ca_up_max in component Ca_leak_current_by_the_NSR (millimolar).
C CONSTS(39) is CMDN_max in component Ca_buffers (millimolar).
C CONSTS(40) is TRPN_max in component Ca_buffers (millimolar).
C CONSTS(41) is CSQN_max in component Ca_buffers (millimolar).
C STATES(24) is Ca_CMDN in component Ca_buffers (millimolar).
C STATES(25) is Ca_TRPN in component Ca_buffers (millimolar).
C STATES(26) is Ca_CSQN in component Ca_buffers (millimolar).
C ALGBRC(71) is var_CMDN in component Ca_buffers (millimolar).
C ALGBRC(72) is var_TRPN in component Ca_buffers (millimolar).
C ALGBRC(68) is var_CSQN in component Ca_buffers (millimolar).
C CONSTS(42) is V_cell in component intracellular_ion_concentrations (micrometre_3).
C CONSTS(43) is V_i in component intracellular_ion_concentrations (micrometre_3).
C CONSTS(48) is V_up in component intracellular_ion_concentrations (micrometre_3).
C RATES(1) is d/dt V in component membrane (millivolt).
C RATES(3) is d/dt m in component fast_sodium_current_m_gate (dimensionless).
C RATES(4) is d/dt h in component fast_sodium_current_h_gate (dimensionless).
C RATES(5) is d/dt j in component fast_sodium_current_j_gate (dimensionless).
C RATES(7) is d/dt oa in component transient_outward_K_current_oa_gate (dimensionless).
C RATES(8) is d/dt oi in component transient_outward_K_current_oi_gate (dimensionless).
C RATES(9) is d/dt ua in component ultrarapid_delayed_rectifier_K_current_ua_gate (dimensionless).
C RATES(10) is d/dt ui in component ultrarapid_delayed_rectifier_K_current_ui_gate (dimensionless).
C RATES(11) is d/dt xr in component rapid_delayed_rectifier_K_current_xr_gate (dimensionless).
C RATES(12) is d/dt xs in component slow_delayed_rectifier_K_current_xs_gate (dimensionless).
C RATES(13) is d/dt xa in component i_K_Ach_xa_gate (dimensionless).
C RATES(15) is d/dt d in component L_type_Ca_channel_d_gate (dimensionless).
C RATES(16) is d/dt f in component L_type_Ca_channel_f_gate (dimensionless).
C RATES(17) is d/dt f_Ca in component L_type_Ca_channel_f_Ca_gate (dimensionless).
C RATES(20) is d/dt u in component Ca_release_current_from_JSR_u_gate (dimensionless).
C RATES(21) is d/dt v in component Ca_release_current_from_JSR_v_gate (dimensionless).
C RATES(22) is d/dt w in component Ca_release_current_from_JSR_w_gate (dimensionless).
C RATES(24) is d/dt Ca_CMDN in component Ca_buffers (millimolar).
C RATES(25) is d/dt Ca_TRPN in component Ca_buffers (millimolar).
C RATES(26) is d/dt Ca_CSQN in component Ca_buffers (millimolar).
C RATES(2) is d/dt Na_i in component intracellular_ion_concentrations (millimolar).
C RATES(6) is d/dt K_i in component intracellular_ion_concentrations (millimolar).
C RATES(18) is d/dt Cl_i in component intracellular_ion_concentrations (millimolar).
C RATES(14) is d/dt Ca_i in component intracellular_ion_concentrations (millimolar).
C RATES(23) is d/dt Ca_up in component intracellular_ion_concentrations (millimolar).
C RATES(19) is d/dt Ca_rel in component intracellular_ion_concentrations (millimolar).
C
      SUBROUTINE initConsts(CONSTS, RATES, STATES)
      REAL CONSTS(*), RATES(*), STATES(*)
      STATES(1) = -85.53
      CONSTS(1) = 8.3143
      CONSTS(2) = 310
      CONSTS(3) = 96.4867
      CONSTS(4) = 100
      CONSTS(5) = 50
      CONSTS(6) = 50000
      CONSTS(7) = 1000
      CONSTS(8) = 2
      CONSTS(9) = -2000
      CONSTS(10) = 7.8
      STATES(2) = 11.75
      CONSTS(11) = 140
      STATES(3) = 1.972e-3
      STATES(4) = 9.791e-1
      STATES(5) = 9.869e-1
      CONSTS(12) = 0.1
      CONSTS(13) = 5.4
      STATES(6) = 138.4
      CONSTS(14) = 0.096
      STATES(7) = 7.164e-2
      STATES(8) = 9.992e-1
      CONSTS(15) = 0.0115
      STATES(9) = 0.05869
      STATES(10) = 9.987e-1
      CONSTS(16) = 0.0145
      STATES(11) = 7.433e-7
      CONSTS(17) = 0.052
      STATES(12) = 0.01791
      CONSTS(18) = 0.0045
      STATES(13) = 1e-5
      CONSTS(19) = 0.34
      STATES(14) = 1.024e-4
      STATES(15) = 4.757e-6
      STATES(16) = 0.9999
      STATES(17) = 0.7484
      CONSTS(20) = 10
      CONSTS(21) = 1.5
      CONSTS(22) = 0.6
      CONSTS(23) = 1e-5
      CONSTS(24) = 1e-5
      CONSTS(25) = 8e-4
      CONSTS(26) = 1.8
      STATES(18) = 29.26
      CONSTS(27) = 132
      CONSTS(28) = 1600
      CONSTS(29) = 87.5
      CONSTS(30) = 1.38
      CONSTS(31) = 0.1
      CONSTS(32) = 0.35
      CONSTS(33) = 0.275
      CONSTS(34) = 8
      STATES(19) = 1.502
      STATES(20) = 0
      STATES(21) = 1
      STATES(22) = 0.9993
      CONSTS(35) = 180
      STATES(23) = 1.502
      CONSTS(36) = 0.0035
      CONSTS(37) = 6e-4
      CONSTS(38) = 27
      CONSTS(39) = 0.045
      CONSTS(40) = 0.35
      CONSTS(41) = 10
      STATES(24) = 1.856e-3
      STATES(25) = 7.022e-3
      STATES(26) = 6.432
      CONSTS(42) = 20100
      CONSTS(43) =  CONSTS(42)*0.680000
      CONSTS(44) = 2.00000
      CONSTS(45) =  (1.00000/7.00000)*(EXP(CONSTS(11)/67.3000) - 1.00000)
      CONSTS(46) = 11.2000
      CONSTS(47) =  0.00480000*CONSTS(42)
      CONSTS(48) =  0.0552000*CONSTS(42)
      RETURN
      END
      SUBROUTINE computeRates(VOI, CONSTS,  RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(14) = 0.290000+ 0.800000*1.00000+(STATES(14) - 0.000120000)/6.00000e-05 ** - 1.00000
      RATES(17) = (ALGBRC(14) - STATES(17))/CONSTS(44)
      ALGBRC(5) = 0.400000/EXP((STATES(1) - 15.0000)/20.0000)
      ALGBRC(20) = 1.00000+EXP((STATES(1) - 12.0000)/- 11.5000) ** - 1.00000/3.00000
      RATES(7) = (ALGBRC(20) - STATES(7))/ALGBRC(5)
      ALGBRC(11) = 360.000+ 130.000*(1.00000 - EXP(- (STATES(1)+130.000)/50.0000))
      ALGBRC(26) = 1.00000/(1.00000+EXP((- 93.0000 - STATES(1))/- 15.2000))
      RATES(13) = (ALGBRC(26) - STATES(13))/ALGBRC(11)
      ALGBRC(12) = 1.00000+EXP((- STATES(1) - 2.00000)/5.00000) ** - 1.00000
      ALGBRC(27) = TERNRY(ABS(STATES(1)+10.0000).LT.1.00000e-10, 0.763000, (1.00000 - EXP((STATES(1)+10.0000)/- 6.24000))/( 0.0350000*(STATES(1)+10.0000)*(1.00000+EXP((STATES(1)+10.0000)/- 6.24000))))
      RATES(15) = (ALGBRC(12) - STATES(15))/ALGBRC(27)
      ALGBRC(13) = 1.00000/(1.00000+EXP((STATES(1)+34.0000)/6.30000))
      ALGBRC(28) = 400.000/(1.00000+ 4.50000*EXP(-  (STATES(1) - 9.00000)*0.0265000 ** 2.00000))
      RATES(16) = (ALGBRC(13) - STATES(16))/ALGBRC(28)
      ALGBRC(15) = TERNRY(ABS(STATES(1) - 7.90000).LT.1.00000e-10, ( 6.00000*0.200000)/1.30000, ( 6.00000*(1.00000 - EXP(- (STATES(1) - 7.90000)/5.00000)))/( (1.00000+ 0.300000*EXP(- (STATES(1) - 7.90000)/5.00000))*1.00000*(STATES(1) - 7.90000)))
      ALGBRC(29) = 1.00000 - 1.00000+EXP(- (STATES(1) - 40.0000)/17.0000) ** - 1.00000
      RATES(22) = (ALGBRC(29) - STATES(22))/ALGBRC(15)
      ALGBRC(2) = TERNRY(STATES(1).EQ.- 47.1300, 3.20000, ( 0.320000*(STATES(1)+47.1300))/(1.00000 - EXP( - 0.100000*(STATES(1)+47.1300))))
      ALGBRC(17) =  0.0800000*EXP(- STATES(1)/11.0000)
      ALGBRC(31) = ALGBRC(2)/(ALGBRC(2)+ALGBRC(17))
      ALGBRC(40) = 1.00000/(ALGBRC(2)+ALGBRC(17))
      RATES(3) = (ALGBRC(31) - STATES(3))/ALGBRC(40)
      ALGBRC(3) = TERNRY(STATES(1).LT.- 40.0000,  0.135000*EXP((STATES(1)+80.0000)/- 6.80000), 0.00000)
      ALGBRC(18) = TERNRY(STATES(1).LT.- 40.0000,  3.56000*EXP( 0.0790000*STATES(1))+ 310000.*EXP( 0.350000*STATES(1)), 1.00000/( 0.130000*(1.00000+EXP((STATES(1)+10.6600)/- 11.1000))))
      ALGBRC(32) = ALGBRC(3)/(ALGBRC(3)+ALGBRC(18))
      ALGBRC(41) = 1.00000/(ALGBRC(3)+ALGBRC(18))
      RATES(4) = (ALGBRC(32) - STATES(4))/ALGBRC(41)
      ALGBRC(4) = TERNRY(STATES(1).LT.- 40.0000, ( ( - 127140.*EXP( 0.244400*STATES(1)) -  3.47400e-05*EXP( - 0.0439100*STATES(1)))*(STATES(1)+37.7800))/(1.00000+EXP( 0.311000*(STATES(1)+79.2300))), 0.00000)
      ALGBRC(19) = TERNRY(STATES(1).LT.- 40.0000, ( 0.121200*EXP( - 0.0105200*STATES(1)))/(1.00000+EXP( - 0.137800*(STATES(1)+40.1400))), ( 0.300000*EXP( - 2.53500e-07*STATES(1)))/(1.00000+EXP( - 0.100000*(STATES(1)+32.0000))))
      ALGBRC(33) = ALGBRC(4)/(ALGBRC(4)+ALGBRC(19))
      ALGBRC(42) = 1.00000/(ALGBRC(4)+ALGBRC(19))
      RATES(5) = (ALGBRC(33) - STATES(5))/ALGBRC(42)
      ALGBRC(6) = 1.00000/(1.20000+EXP((STATES(1)+95.2000)/5.85000))
      ALGBRC(21) = 1.00000/(9.54000+EXP((STATES(1) - 48.0000)/- 20.0000))
      ALGBRC(34) = ALGBRC(6)+ALGBRC(21) ** - 1.00000
      ALGBRC(43) = 1.00000+EXP((STATES(1)+31.0000)/6.45000) ** - 1.00000
      RATES(8) = (ALGBRC(43) - STATES(8))/ALGBRC(34)
      ALGBRC(7) = 1.47000/(EXP((STATES(1)+33.2000)/- 30.6300)+EXP((STATES(1) - 27.6000)/- 30.6500))
      ALGBRC(22) = 0.420000/(EXP((STATES(1)+26.6400)/2.49000)+EXP((STATES(1)+44.4100)/20.3600))
      ALGBRC(35) = ALGBRC(7)+ALGBRC(22) ** - 1.00000
      ALGBRC(44) = 1.00000+EXP((STATES(1)+2.81000)/- 9.49000) ** - 1.00000/3.00000
      RATES(9) = (ALGBRC(44) - STATES(9))/ALGBRC(35)
      ALGBRC(8) = 1.00000/(21.0000+EXP((STATES(1) - 185.000)/- 28.0000))
      ALGBRC(23) =  1.00000*EXP((STATES(1) - 158.000)/16.0000)
      ALGBRC(36) = ALGBRC(8)+ALGBRC(23) ** - 1.00000
      ALGBRC(45) = 1.00000+EXP((STATES(1) - 99.4500)/27.4800) ** - 1.00000
      RATES(10) = (ALGBRC(45) - STATES(10))/ALGBRC(36)
      ALGBRC(9) = ( 0.0400000*(STATES(1) - 248.000))/(1.00000 - EXP((STATES(1) - 248.000)/- 28.0000))
      ALGBRC(24) = ( 0.0280000*(STATES(1)+163.000))/(EXP((STATES(1)+163.000)/21.0000) - 1.00000)
      ALGBRC(37) = ALGBRC(9)+ALGBRC(24) ** - 1.00000
      ALGBRC(46) = 1.00000+EXP((STATES(1)+7.65400)/- 5.37700) ** - 1.00000
      RATES(11) = (ALGBRC(46) - STATES(11))/ALGBRC(37)
      ALGBRC(10) = TERNRY(ABS(STATES(1)+28.5000).LT.1.00000e-10, 0.00115000, ( 1.00000e-05*(STATES(1)+28.5000))/(1.00000 - EXP((STATES(1)+28.5000)/- 115.000)))
      ALGBRC(25) = TERNRY(ABS(STATES(1)+28.5000).LT.1.00000e-10, 0.000759000, ( 0.000230000*(STATES(1)+28.5000))/(EXP((STATES(1)+28.5000)/3.30000) - 1.00000))
      ALGBRC(38) = ALGBRC(10)+ALGBRC(25) ** - 1.00000
      ALGBRC(47) = 1.00000+EXP((STATES(1) - 13.0000)/- 12.0000) ** - 0.500000
      RATES(12) = (ALGBRC(47) - STATES(12))/ALGBRC(38)
      ALGBRC(39) =  (( CONSTS(1)*CONSTS(2))/CONSTS(3))*log(CONSTS(13)/STATES(6))
      ALGBRC(48) = ( CONSTS(4)*CONSTS(12)*(STATES(1) - ALGBRC(39)))/(1.00000+EXP( 0.0720000*(STATES(1) - ALGBRC(39))))
      ALGBRC(49) =  CONSTS(4)*CONSTS(14)*STATES(7) ** 3.00000*STATES(8)*(STATES(1) - ALGBRC(39))
      ALGBRC(50) =  CONSTS(4)*CONSTS(15)*(1.00000+3.00000/(1.00000+EXP((STATES(1) - 14.0000)/- 6.00000)))*STATES(9) ** 3.00000*STATES(10)*(STATES(1) - ALGBRC(39))
      ALGBRC(51) =  CONSTS(4)*CONSTS(16)*STATES(11)*(STATES(1) - ALGBRC(39))*(0.600000+1.00000/(0.500000+ 0.500000*EXP((STATES(1)+8.00000)/24.4000)))
      ALGBRC(52) =  CONSTS(4)*CONSTS(17)*STATES(12) ** 2.00000*(STATES(1) - ALGBRC(39))
      ALGBRC(55) = 1.00000+ 0.124500*EXP(( - 0.100000*CONSTS(3)*STATES(1))/( CONSTS(1)*CONSTS(2)))+ 0.0365000*CONSTS(45)*EXP(( - CONSTS(3)*STATES(1))/( CONSTS(1)*CONSTS(2))) ** - 1.00000
      ALGBRC(56) = ( (( CONSTS(4)*CONSTS(22)*ALGBRC(55))/(1.00000+CONSTS(20)/STATES(2) ** 1.50000))*CONSTS(13))/(CONSTS(13)+CONSTS(21))
      ALGBRC(53) = ( CONSTS(4)*CONSTS(18)*STATES(13)*(STATES(1) - ALGBRC(39)))/(0.100000+EXP( 0.0780000*((STATES(1) - ALGBRC(39)) - 65.0000)))
      RATES(6) = ( 2.00000*ALGBRC(56) - (ALGBRC(48)+ALGBRC(49)+ALGBRC(50)+ALGBRC(51)+ALGBRC(52)+ALGBRC(53)))/( CONSTS(43)*CONSTS(3))
      ALGBRC(59) =  CONSTS(4)*CONSTS(25)*(STATES(1) -  (( CONSTS(1)*CONSTS(2))/CONSTS(3))*log(STATES(18)/CONSTS(27)))
      RATES(18) = ALGBRC(59)/( CONSTS(43)*CONSTS(3))
      ALGBRC(16) =  (( CONSTS(1)*CONSTS(2))/CONSTS(3))*log(CONSTS(11)/STATES(2))
      ALGBRC(30) =  CONSTS(4)*CONSTS(10)*STATES(3) ** 3.00000*STATES(4)*STATES(5)*(STATES(1) - ALGBRC(16))
      ALGBRC(60) = ( CONSTS(4)*CONSTS(28)*( EXP(( CONSTS(32)*CONSTS(3)*STATES(1))/( CONSTS(1)*CONSTS(2)))*STATES(2) ** 3.00000*CONSTS(26) -  EXP(( (CONSTS(32) - 1.00000)*CONSTS(3)*STATES(1))/( CONSTS(1)*CONSTS(2)))*CONSTS(11) ** 3.00000*STATES(14)))/( (CONSTS(29) ** 3.00000+CONSTS(11) ** 3.00000)*(CONSTS(30)+CONSTS(26))*(1.00000+ CONSTS(31)*EXP(( (CONSTS(32) - 1.00000)*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))))
      ALGBRC(57) =  CONSTS(4)*CONSTS(23)*(STATES(1) - ALGBRC(16))
      RATES(2) = ( - 3.00000*ALGBRC(56) - ( 3.00000*ALGBRC(60)+ALGBRC(57)+ALGBRC(30)))/( CONSTS(43)*CONSTS(3))
      ALGBRC(1) = 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(54) =  CONSTS(4)*CONSTS(19)*STATES(15)*STATES(16)*STATES(17)*(STATES(1) - 60.0000)
      ALGBRC(61) = ( CONSTS(4)*CONSTS(33)*STATES(14))/(0.000500000+STATES(14))
      ALGBRC(58) =  CONSTS(4)*CONSTS(24)*(STATES(1) -  (( CONSTS(1)*CONSTS(2))/( 2.00000*CONSTS(3)))*log(CONSTS(26)/STATES(14)))
      RATES(1) = - (ALGBRC(30)+ALGBRC(48)+ALGBRC(49)+ALGBRC(50)+ALGBRC(51)+ALGBRC(52)+ALGBRC(57)+ALGBRC(58)+ALGBRC(56)+ALGBRC(61)+ALGBRC(60)+ALGBRC(54)+ALGBRC(1)+ALGBRC(59)+ALGBRC(53))/CONSTS(4)
      ALGBRC(62) =  CONSTS(34)*STATES(20) ** 2.00000*STATES(21)*STATES(22)*(STATES(19) - STATES(14))
      ALGBRC(63) =  1000.00*( 1.00000e-15*CONSTS(47)*ALGBRC(62) -  (1.00000e-15/( 2.00000*CONSTS(3)))*( 0.500000*ALGBRC(54) -  0.200000*ALGBRC(60)))
      ALGBRC(65) = 1.00000+EXP(- (ALGBRC(63) - 3.41750e-13)/1.36700e-15) ** - 1.00000
      RATES(20) = (ALGBRC(65) - STATES(20))/CONSTS(46)
      ALGBRC(68) =  0.480000*STATES(19)*(1.00000 - STATES(26)/CONSTS(41)) - ( 0.400000*STATES(26))/CONSTS(41)
      RATES(26) =  ALGBRC(68)*CONSTS(41)
      ALGBRC(64) = (STATES(23) - STATES(19))/CONSTS(35)
      RATES(19) = (ALGBRC(64) - ALGBRC(62)) -  31.0000*ALGBRC(68)
      ALGBRC(66) = 1.91000+ 2.09000*1.00000+EXP(- (ALGBRC(63) - 3.41750e-13)/1.36700e-15) ** - 1.00000
      ALGBRC(69) = 1.00000 - 1.00000+EXP(- (ALGBRC(63) - 6.83500e-14)/1.36700e-15) ** - 1.00000
      RATES(21) = (ALGBRC(69) - STATES(21))/ALGBRC(66)
      ALGBRC(67) = CONSTS(36)/(1.00000+CONSTS(37)/STATES(14))
      ALGBRC(70) = ( CONSTS(36)*STATES(23))/CONSTS(38)
      RATES(23) = ALGBRC(67) - (ALGBRC(70)+( ALGBRC(64)*CONSTS(47))/CONSTS(48))
      ALGBRC(71) =  200.000*STATES(14)*(1.00000 - STATES(24)/CONSTS(39)) - ( 0.476000*STATES(24))/CONSTS(39)
      RATES(24) =  ALGBRC(71)*CONSTS(39)
      ALGBRC(72) =  78.4000*STATES(14)*(1.00000 - STATES(25)/CONSTS(40)) - ( 0.392000*STATES(25))/CONSTS(40)
      RATES(25) =  ALGBRC(72)*CONSTS(40)
      RATES(14) = ((( 2.00000*ALGBRC(60) - (ALGBRC(61)+ALGBRC(54)+ALGBRC(58)))/( 2.00000*CONSTS(43)*CONSTS(3))+( CONSTS(48)*(ALGBRC(70) - ALGBRC(67))+ ALGBRC(62)*CONSTS(47))/CONSTS(43)) -  CONSTS(40)*ALGBRC(72)) -  CONSTS(39)*ALGBRC(71)
      RETURN
      END
      SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(14) = 0.290000+ 0.800000*1.00000+(STATES(14) - 0.000120000)/6.00000e-05 ** - 1.00000
      ALGBRC(5) = 0.400000/EXP((STATES(1) - 15.0000)/20.0000)
      ALGBRC(20) = 1.00000+EXP((STATES(1) - 12.0000)/- 11.5000) ** - 1.00000/3.00000
      ALGBRC(11) = 360.000+ 130.000*(1.00000 - EXP(- (STATES(1)+130.000)/50.0000))
      ALGBRC(26) = 1.00000/(1.00000+EXP((- 93.0000 - STATES(1))/- 15.2000))
      ALGBRC(12) = 1.00000+EXP((- STATES(1) - 2.00000)/5.00000) ** - 1.00000
      ALGBRC(27) = TERNRY(ABS(STATES(1)+10.0000).LT.1.00000e-10, 0.763000, (1.00000 - EXP((STATES(1)+10.0000)/- 6.24000))/( 0.0350000*(STATES(1)+10.0000)*(1.00000+EXP((STATES(1)+10.0000)/- 6.24000))))
      ALGBRC(13) = 1.00000/(1.00000+EXP((STATES(1)+34.0000)/6.30000))
      ALGBRC(28) = 400.000/(1.00000+ 4.50000*EXP(-  (STATES(1) - 9.00000)*0.0265000 ** 2.00000))
      ALGBRC(15) = TERNRY(ABS(STATES(1) - 7.90000).LT.1.00000e-10, ( 6.00000*0.200000)/1.30000, ( 6.00000*(1.00000 - EXP(- (STATES(1) - 7.90000)/5.00000)))/( (1.00000+ 0.300000*EXP(- (STATES(1) - 7.90000)/5.00000))*1.00000*(STATES(1) - 7.90000)))
      ALGBRC(29) = 1.00000 - 1.00000+EXP(- (STATES(1) - 40.0000)/17.0000) ** - 1.00000
      ALGBRC(2) = TERNRY(STATES(1).EQ.- 47.1300, 3.20000, ( 0.320000*(STATES(1)+47.1300))/(1.00000 - EXP( - 0.100000*(STATES(1)+47.1300))))
      ALGBRC(17) =  0.0800000*EXP(- STATES(1)/11.0000)
      ALGBRC(31) = ALGBRC(2)/(ALGBRC(2)+ALGBRC(17))
      ALGBRC(40) = 1.00000/(ALGBRC(2)+ALGBRC(17))
      ALGBRC(3) = TERNRY(STATES(1).LT.- 40.0000,  0.135000*EXP((STATES(1)+80.0000)/- 6.80000), 0.00000)
      ALGBRC(18) = TERNRY(STATES(1).LT.- 40.0000,  3.56000*EXP( 0.0790000*STATES(1))+ 310000.*EXP( 0.350000*STATES(1)), 1.00000/( 0.130000*(1.00000+EXP((STATES(1)+10.6600)/- 11.1000))))
      ALGBRC(32) = ALGBRC(3)/(ALGBRC(3)+ALGBRC(18))
      ALGBRC(41) = 1.00000/(ALGBRC(3)+ALGBRC(18))
      ALGBRC(4) = TERNRY(STATES(1).LT.- 40.0000, ( ( - 127140.*EXP( 0.244400*STATES(1)) -  3.47400e-05*EXP( - 0.0439100*STATES(1)))*(STATES(1)+37.7800))/(1.00000+EXP( 0.311000*(STATES(1)+79.2300))), 0.00000)
      ALGBRC(19) = TERNRY(STATES(1).LT.- 40.0000, ( 0.121200*EXP( - 0.0105200*STATES(1)))/(1.00000+EXP( - 0.137800*(STATES(1)+40.1400))), ( 0.300000*EXP( - 2.53500e-07*STATES(1)))/(1.00000+EXP( - 0.100000*(STATES(1)+32.0000))))
      ALGBRC(33) = ALGBRC(4)/(ALGBRC(4)+ALGBRC(19))
      ALGBRC(42) = 1.00000/(ALGBRC(4)+ALGBRC(19))
      ALGBRC(6) = 1.00000/(1.20000+EXP((STATES(1)+95.2000)/5.85000))
      ALGBRC(21) = 1.00000/(9.54000+EXP((STATES(1) - 48.0000)/- 20.0000))
      ALGBRC(34) = ALGBRC(6)+ALGBRC(21) ** - 1.00000
      ALGBRC(43) = 1.00000+EXP((STATES(1)+31.0000)/6.45000) ** - 1.00000
      ALGBRC(7) = 1.47000/(EXP((STATES(1)+33.2000)/- 30.6300)+EXP((STATES(1) - 27.6000)/- 30.6500))
      ALGBRC(22) = 0.420000/(EXP((STATES(1)+26.6400)/2.49000)+EXP((STATES(1)+44.4100)/20.3600))
      ALGBRC(35) = ALGBRC(7)+ALGBRC(22) ** - 1.00000
      ALGBRC(44) = 1.00000+EXP((STATES(1)+2.81000)/- 9.49000) ** - 1.00000/3.00000
      ALGBRC(8) = 1.00000/(21.0000+EXP((STATES(1) - 185.000)/- 28.0000))
      ALGBRC(23) =  1.00000*EXP((STATES(1) - 158.000)/16.0000)
      ALGBRC(36) = ALGBRC(8)+ALGBRC(23) ** - 1.00000
      ALGBRC(45) = 1.00000+EXP((STATES(1) - 99.4500)/27.4800) ** - 1.00000
      ALGBRC(9) = ( 0.0400000*(STATES(1) - 248.000))/(1.00000 - EXP((STATES(1) - 248.000)/- 28.0000))
      ALGBRC(24) = ( 0.0280000*(STATES(1)+163.000))/(EXP((STATES(1)+163.000)/21.0000) - 1.00000)
      ALGBRC(37) = ALGBRC(9)+ALGBRC(24) ** - 1.00000
      ALGBRC(46) = 1.00000+EXP((STATES(1)+7.65400)/- 5.37700) ** - 1.00000
      ALGBRC(10) = TERNRY(ABS(STATES(1)+28.5000).LT.1.00000e-10, 0.00115000, ( 1.00000e-05*(STATES(1)+28.5000))/(1.00000 - EXP((STATES(1)+28.5000)/- 115.000)))
      ALGBRC(25) = TERNRY(ABS(STATES(1)+28.5000).LT.1.00000e-10, 0.000759000, ( 0.000230000*(STATES(1)+28.5000))/(EXP((STATES(1)+28.5000)/3.30000) - 1.00000))
      ALGBRC(38) = ALGBRC(10)+ALGBRC(25) ** - 1.00000
      ALGBRC(47) = 1.00000+EXP((STATES(1) - 13.0000)/- 12.0000) ** - 0.500000
      ALGBRC(39) =  (( CONSTS(1)*CONSTS(2))/CONSTS(3))*log(CONSTS(13)/STATES(6))
      ALGBRC(48) = ( CONSTS(4)*CONSTS(12)*(STATES(1) - ALGBRC(39)))/(1.00000+EXP( 0.0720000*(STATES(1) - ALGBRC(39))))
      ALGBRC(49) =  CONSTS(4)*CONSTS(14)*STATES(7) ** 3.00000*STATES(8)*(STATES(1) - ALGBRC(39))
      ALGBRC(50) =  CONSTS(4)*CONSTS(15)*(1.00000+3.00000/(1.00000+EXP((STATES(1) - 14.0000)/- 6.00000)))*STATES(9) ** 3.00000*STATES(10)*(STATES(1) - ALGBRC(39))
      ALGBRC(51) =  CONSTS(4)*CONSTS(16)*STATES(11)*(STATES(1) - ALGBRC(39))*(0.600000+1.00000/(0.500000+ 0.500000*EXP((STATES(1)+8.00000)/24.4000)))
      ALGBRC(52) =  CONSTS(4)*CONSTS(17)*STATES(12) ** 2.00000*(STATES(1) - ALGBRC(39))
      ALGBRC(55) = 1.00000+ 0.124500*EXP(( - 0.100000*CONSTS(3)*STATES(1))/( CONSTS(1)*CONSTS(2)))+ 0.0365000*CONSTS(45)*EXP(( - CONSTS(3)*STATES(1))/( CONSTS(1)*CONSTS(2))) ** - 1.00000
      ALGBRC(56) = ( (( CONSTS(4)*CONSTS(22)*ALGBRC(55))/(1.00000+CONSTS(20)/STATES(2) ** 1.50000))*CONSTS(13))/(CONSTS(13)+CONSTS(21))
      ALGBRC(53) = ( CONSTS(4)*CONSTS(18)*STATES(13)*(STATES(1) - ALGBRC(39)))/(0.100000+EXP( 0.0780000*((STATES(1) - ALGBRC(39)) - 65.0000)))
      ALGBRC(59) =  CONSTS(4)*CONSTS(25)*(STATES(1) -  (( CONSTS(1)*CONSTS(2))/CONSTS(3))*log(STATES(18)/CONSTS(27)))
      ALGBRC(16) =  (( CONSTS(1)*CONSTS(2))/CONSTS(3))*log(CONSTS(11)/STATES(2))
      ALGBRC(30) =  CONSTS(4)*CONSTS(10)*STATES(3) ** 3.00000*STATES(4)*STATES(5)*(STATES(1) - ALGBRC(16))
      ALGBRC(60) = ( CONSTS(4)*CONSTS(28)*( EXP(( CONSTS(32)*CONSTS(3)*STATES(1))/( CONSTS(1)*CONSTS(2)))*STATES(2) ** 3.00000*CONSTS(26) -  EXP(( (CONSTS(32) - 1.00000)*CONSTS(3)*STATES(1))/( CONSTS(1)*CONSTS(2)))*CONSTS(11) ** 3.00000*STATES(14)))/( (CONSTS(29) ** 3.00000+CONSTS(11) ** 3.00000)*(CONSTS(30)+CONSTS(26))*(1.00000+ CONSTS(31)*EXP(( (CONSTS(32) - 1.00000)*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))))
      ALGBRC(57) =  CONSTS(4)*CONSTS(23)*(STATES(1) - ALGBRC(16))
      ALGBRC(1) = 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(54) =  CONSTS(4)*CONSTS(19)*STATES(15)*STATES(16)*STATES(17)*(STATES(1) - 60.0000)
      ALGBRC(61) = ( CONSTS(4)*CONSTS(33)*STATES(14))/(0.000500000+STATES(14))
      ALGBRC(58) =  CONSTS(4)*CONSTS(24)*(STATES(1) -  (( CONSTS(1)*CONSTS(2))/( 2.00000*CONSTS(3)))*log(CONSTS(26)/STATES(14)))
      ALGBRC(62) =  CONSTS(34)*STATES(20) ** 2.00000*STATES(21)*STATES(22)*(STATES(19) - STATES(14))
      ALGBRC(63) =  1000.00*( 1.00000e-15*CONSTS(47)*ALGBRC(62) -  (1.00000e-15/( 2.00000*CONSTS(3)))*( 0.500000*ALGBRC(54) -  0.200000*ALGBRC(60)))
      ALGBRC(65) = 1.00000+EXP(- (ALGBRC(63) - 3.41750e-13)/1.36700e-15) ** - 1.00000
      ALGBRC(68) =  0.480000*STATES(19)*(1.00000 - STATES(26)/CONSTS(41)) - ( 0.400000*STATES(26))/CONSTS(41)
      ALGBRC(64) = (STATES(23) - STATES(19))/CONSTS(35)
      ALGBRC(66) = 1.91000+ 2.09000*1.00000+EXP(- (ALGBRC(63) - 3.41750e-13)/1.36700e-15) ** - 1.00000
      ALGBRC(69) = 1.00000 - 1.00000+EXP(- (ALGBRC(63) - 6.83500e-14)/1.36700e-15) ** - 1.00000
      ALGBRC(67) = CONSTS(36)/(1.00000+CONSTS(37)/STATES(14))
      ALGBRC(70) = ( CONSTS(36)*STATES(23))/CONSTS(38)
      ALGBRC(71) =  200.000*STATES(14)*(1.00000 - STATES(24)/CONSTS(39)) - ( 0.476000*STATES(24))/CONSTS(39)
      ALGBRC(72) =  78.4000*STATES(14)*(1.00000 - STATES(25)/CONSTS(40)) - ( 0.392000*STATES(25))/CONSTS(40)
      RETURN
      END
      REAL FUNCTION TERNRY(TEST, VALA, VALB)
      LOGICAL TEST
      REAL VALA, VALB
      IF (TEST) THEN
        TERNRY = VALA
      ELSE
        TERNRY = VALB
      ENDIF
      RETURN
      END