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 70 entries in the algebraic variable array.
C There are a total of 18 entries in each of the rate and state variable arrays.
C There are a total of 49 entries in the constant variable array.
C
C
C VOI is time in component environment (second).
C STATES(1) is Vm in component Membrane (volt).
C ALGBRC(52) is i_CaL in component i_CaL (A_per_F).
C ALGBRC(58) is i_K1 in component i_K1 (A_per_F).
C ALGBRC(59) is i_f in component i_f (A_per_F).
C ALGBRC(49) is i_Na in component i_Na (A_per_F).
C ALGBRC(53) is i_Kr in component i_Kr (A_per_F).
C ALGBRC(54) is i_Ks in component i_Ks (A_per_F).
C ALGBRC(65) is i_to in component i_to (A_per_F).
C ALGBRC(64) is i_PCa in component i_PCa (A_per_F).
C ALGBRC(62) is i_NaK in component i_NaK (A_per_F).
C ALGBRC(63) is i_NaCa in component i_NaCa (A_per_F).
C ALGBRC(61) is i_b_Ca in component i_b_Ca (A_per_F).
C ALGBRC(60) is i_b_Na in component i_b_Na (A_per_F).
C ALGBRC(11) is E_Na in component electric_potentials (volt).
C CONSTS(47) is E_K in component electric_potentials (volt).
C ALGBRC(26) is E_Ks in component electric_potentials (volt).
C ALGBRC(40) is E_Ca in component electric_potentials (volt).
C CONSTS(1) is R in component model_parameters (joule_per_mole_kelvin).
C CONSTS(2) is T in component model_parameters (kelvin).
C CONSTS(3) is F in component model_parameters (coulomb_per_mole).
C STATES(2) is Nai in component sodium_dynamics (millimolar).
C CONSTS(4) is Nao in component model_parameters (millimolar).
C STATES(3) is Cai in component calcium_dynamics (millimolar).
C CONSTS(5) is Cao in component model_parameters (millimolar).
C CONSTS(6) is Ki in component model_parameters (millimolar).
C CONSTS(7) is Ko in component model_parameters (millimolar).
C CONSTS(8) is PkNa in component electric_potentials (dimensionless).
C CONSTS(9) is g_Na in component i_Na (S_per_F).
C STATES(4) is m in component i_Na_m_gate (dimensionless).
C STATES(5) is h in component i_Na_h_gate (dimensionless).
C STATES(6) is j in component i_Na_j_gate (dimensionless).
C ALGBRC(1) is m_inf in component i_Na_m_gate (dimensionless).
C ALGBRC(41) is tau_m in component i_Na_m_gate (second).
C ALGBRC(16) is alpha_m in component i_Na_m_gate (dimensionless).
C ALGBRC(31) is beta_m in component i_Na_m_gate (dimensionless).
C ALGBRC(2) is h_inf in component i_Na_h_gate (dimensionless).
C ALGBRC(17) is alpha_h in component i_Na_h_gate (dimensionless).
C ALGBRC(32) is beta_h in component i_Na_h_gate (dimensionless).
C ALGBRC(42) is tau_h in component i_Na_h_gate (second).
C ALGBRC(3) is j_inf in component i_Na_j_gate (dimensionless).
C ALGBRC(18) is alpha_j in component i_Na_j_gate (dimensionless).
C ALGBRC(33) is beta_j in component i_Na_j_gate (dimensionless).
C ALGBRC(43) is tau_j in component i_Na_j_gate (second).
C CONSTS(10) is g_CaL in component i_CaL (metre_cube_per_F_per_s).
C STATES(7) is d in component i_CaL_d_gate (dimensionless).
C STATES(8) is f1 in component i_CaL_f1_gate (dimensionless).
C STATES(9) is f2 in component i_CaL_f2_gate (dimensionless).
C STATES(10) is fCa in component i_CaL_fCa_gate (dimensionless).
C ALGBRC(4) is d_infinity in component i_CaL_d_gate (dimensionless).
C ALGBRC(50) is tau_d in component i_CaL_d_gate (second).
C ALGBRC(19) is alpha_d in component i_CaL_d_gate (dimensionless).
C ALGBRC(34) is beta_d in component i_CaL_d_gate (dimensionless).
C ALGBRC(44) is gamma_d in component i_CaL_d_gate (dimensionless).
C ALGBRC(5) is f1_inf in component i_CaL_f1_gate (dimensionless).
C ALGBRC(35) is tau_f1 in component i_CaL_f1_gate (second).
C ALGBRC(20) is constf1 in component i_CaL_f1_gate (dimensionless).
C ALGBRC(6) is f2_inf in component i_CaL_f2_gate (dimensionless).
C ALGBRC(21) is tau_f2 in component i_CaL_f2_gate (second).
C CONSTS(48) is constf2 in component i_CaL_f2_gate (dimensionless).
C ALGBRC(51) is constfCa in component i_CaL_fCa_gate (dimensionless).
C ALGBRC(7) is alpha_fCa in component i_CaL_fCa_gate (dimensionless).
C ALGBRC(22) is beta_fCa in component i_CaL_fCa_gate (dimensionless).
C ALGBRC(36) is gamma_fCa in component i_CaL_fCa_gate (dimensionless).
C ALGBRC(45) is fCa_inf in component i_CaL_fCa_gate (dimensionless).
C CONSTS(11) is tau_fCa in component i_CaL_fCa_gate (second).
C CONSTS(12) is g_Kr in component i_Kr (S_per_F).
C STATES(11) is Xr1 in component i_Kr_Xr1_gate (dimensionless).
C STATES(12) is Xr2 in component i_Kr_Xr2_gate (dimensionless).
C ALGBRC(8) is Xr1_inf in component i_Kr_Xr1_gate (dimensionless).
C ALGBRC(23) is alpha_Xr1 in component i_Kr_Xr1_gate (dimensionless).
C ALGBRC(37) is beta_Xr1 in component i_Kr_Xr1_gate (dimensionless).
C ALGBRC(46) is tau_Xr1 in component i_Kr_Xr1_gate (second).
C CONSTS(13) is L0 in component i_Kr_Xr1_gate (dimensionless).
C CONSTS(49) is V_half in component i_Kr_Xr1_gate (millivolt).
C CONSTS(14) is Q in component i_Kr_Xr1_gate (dimensionless).
C ALGBRC(9) is Xr2_infinity in component i_Kr_Xr2_gate (dimensionless).
C ALGBRC(24) is alpha_Xr2 in component i_Kr_Xr2_gate (dimensionless).
C ALGBRC(38) is beta_Xr2 in component i_Kr_Xr2_gate (dimensionless).
C ALGBRC(47) is tau_Xr2 in component i_Kr_Xr2_gate (second).
C CONSTS(15) is g_Ks in component i_Ks (S_per_F).
C STATES(13) is Xs in component i_Ks_Xs_gate (dimensionless).
C ALGBRC(10) is Xs_infinity in component i_Ks_Xs_gate (dimensionless).
C ALGBRC(25) is alpha_Xs in component i_Ks_Xs_gate (dimensionless).
C ALGBRC(39) is beta_Xs in component i_Ks_Xs_gate (dimensionless).
C ALGBRC(48) is tau_Xs in component i_Ks_Xs_gate (second).
C CONSTS(16) is g_K1 in component i_K1 (S_per_F).
C ALGBRC(57) is XK1_inf in component i_K1 (dimensionless).
C ALGBRC(55) is alpha_K1 in component i_K1 (dimensionless).
C ALGBRC(56) is beta_K1 in component i_K1 (dimensionless).
C CONSTS(17) is g_f in component i_f (S_per_F).
C CONSTS(18) is E_f in component i_f (volt).
C STATES(14) is Xf in component i_f_Xf_gate (dimensionless).
C ALGBRC(12) is Xf_infinity in component i_f_Xf_gate (dimensionless).
C ALGBRC(27) is tau_Xf in component i_f_Xf_gate (second).
C CONSTS(19) is g_b_Na in component i_b_Na (S_per_F).
C CONSTS(20) is g_b_Ca in component i_b_Ca (S_per_F).
C CONSTS(21) is Km_K in component i_NaK (millimolar).
C CONSTS(22) is Km_Na in component i_NaK (millimolar).
C CONSTS(23) is PNaK in component i_NaK (A_per_F).
C CONSTS(24) is kNaCa in component i_NaCa (A_per_F).
C CONSTS(25) is alpha in component i_NaCa (dimensionless).
C CONSTS(26) is gamma in component i_NaCa (dimensionless).
C CONSTS(27) is Ksat in component i_NaCa (dimensionless).
C CONSTS(28) is KmCa in component i_NaCa (millimolar).
C CONSTS(29) is KmNai in component i_NaCa (millimolar).
C CONSTS(30) is g_PCa in component i_PCa (A_per_F).
C CONSTS(31) is KPCa in component i_PCa (millimolar).
C CONSTS(32) is g_to in component i_to (S_per_F).
C STATES(15) is q in component i_to_q_gate (dimensionless).
C STATES(16) is r in component i_to_r_gate (dimensionless).
C ALGBRC(13) is q_inf in component i_to_q_gate (dimensionless).
C ALGBRC(28) is tau_q in component i_to_q_gate (second).
C ALGBRC(14) is r_inf in component i_to_r_gate (dimensionless).
C ALGBRC(29) is tau_r in component i_to_r_gate (second).
C CONSTS(33) is Cm in component model_parameters (farad).
C CONSTS(34) is Vc in component model_parameters (micrometre_cube).
C CONSTS(35) is V_SR in component model_parameters (micrometre_cube).
C STATES(17) is Ca_SR in component calcium_dynamics (millimolar).
C CONSTS(36) is a_rel in component calcium_dynamics (millimolar_per_second).
C CONSTS(37) is b_rel in component calcium_dynamics (millimolar).
C CONSTS(38) is c_rel in component calcium_dynamics (millimolar_per_second).
C STATES(18) is g in component calcium_dynamics (dimensionless).
C CONSTS(39) is tau_g in component calcium_dynamics (second).
C ALGBRC(15) is g_inf in component calcium_dynamics (dimensionless).
C CONSTS(40) is Kup in component calcium_dynamics (millimolar).
C CONSTS(41) is Buf_C in component calcium_dynamics (millimolar).
C CONSTS(42) is Buf_SR in component calcium_dynamics (millimolar).
C CONSTS(43) is Kbuf_C in component calcium_dynamics (millimolar).
C CONSTS(44) is Kbuf_SR in component calcium_dynamics (millimolar).
C ALGBRC(69) is Cai_bufc in component calcium_dynamics (dimensionless).
C ALGBRC(70) is Ca_SR_bufSR in component calcium_dynamics (dimensionless).
C CONSTS(45) is VmaxUp in component calcium_dynamics (millimolar_per_second).
C ALGBRC(30) is const2 in component calcium_dynamics (dimensionless).
C CONSTS(46) is V_leak in component calcium_dynamics (per_second).
C ALGBRC(66) is i_rel in component calcium_dynamics (millimolar_per_second).
C ALGBRC(67) is i_up in component calcium_dynamics (millimolar_per_second).
C ALGBRC(68) is i_leak in component calcium_dynamics (millimolar_per_second).
C RATES(1) is d/dt Vm in component Membrane (volt).
C RATES(4) is d/dt m in component i_Na_m_gate (dimensionless).
C RATES(5) is d/dt h in component i_Na_h_gate (dimensionless).
C RATES(6) is d/dt j in component i_Na_j_gate (dimensionless).
C RATES(7) is d/dt d in component i_CaL_d_gate (dimensionless).
C RATES(8) is d/dt f1 in component i_CaL_f1_gate (dimensionless).
C RATES(9) is d/dt f2 in component i_CaL_f2_gate (dimensionless).
C RATES(10) is d/dt fCa in component i_CaL_fCa_gate (dimensionless).
C RATES(11) is d/dt Xr1 in component i_Kr_Xr1_gate (dimensionless).
C RATES(12) is d/dt Xr2 in component i_Kr_Xr2_gate (dimensionless).
C RATES(13) is d/dt Xs in component i_Ks_Xs_gate (dimensionless).
C RATES(14) is d/dt Xf in component i_f_Xf_gate (dimensionless).
C RATES(15) is d/dt q in component i_to_q_gate (dimensionless).
C RATES(16) is d/dt r in component i_to_r_gate (dimensionless).
C RATES(2) is d/dt Nai in component sodium_dynamics (millimolar).
C RATES(18) is d/dt g in component calcium_dynamics (dimensionless).
C RATES(3) is d/dt Cai in component calcium_dynamics (millimolar).
C RATES(17) is d/dt Ca_SR in component calcium_dynamics (millimolar).
C
      SUBROUTINE initConsts(CONSTS, RATES, STATES)
      REAL CONSTS(*), RATES(*), STATES(*)
      STATES(1) = -0.068733823452164
      CONSTS(1) = 8.314472
      CONSTS(2) = 310
      CONSTS(3) = 96485.3415
      STATES(2) = 14.4424010544424
      CONSTS(4) = 151
      STATES(3) = 4.49232909234503e-5
      CONSTS(5) = 1.8
      CONSTS(6) = 150
      CONSTS(7) = 5.4
      CONSTS(8) = 0.03
      CONSTS(9) = 6646.185
      STATES(4) = 0.141183142078492
      STATES(5) = 0.642108593994587
      STATES(6) = 0.173566329483423
      CONSTS(10) = 8.635702e-5
      STATES(7) = 0.000127632520741878
      STATES(8) = 0.98038400433601
      STATES(9) = 0.999953006710394
      STATES(10) = 0.997346890768643
      CONSTS(11) = 0.002
      CONSTS(12) = 29.8667
      STATES(11) = 0.0257889110986083
      STATES(12) = 0.405046678739985
      CONSTS(13) = 0.025
      CONSTS(14) = 2.3
      CONSTS(15) = 2.041
      STATES(13) = 0.0447460799149437
      CONSTS(16) = 19.1925
      CONSTS(17) = 30.10312
      CONSTS(18) = -0.017
      STATES(14) = 0.0607988713874682
      CONSTS(19) = 0.9
      CONSTS(20) = 0.69264
      CONSTS(21) = 1
      CONSTS(22) = 40
      CONSTS(23) = 1.4731392
      CONSTS(24) = 2450
      CONSTS(25) = 2.8571432
      CONSTS(26) = 0.35
      CONSTS(27) = 0.1
      CONSTS(28) = 1.38
      CONSTS(29) = 87.5
      CONSTS(30) = 0.4125
      CONSTS(31) = 0.0005
      CONSTS(32) = 59.8077
      STATES(15) = 0.776163826643278
      STATES(16) = 0.000503296941001262
      CONSTS(33) = 7.86671e-11
      CONSTS(34) = 7012
      CONSTS(35) = 465.2
      STATES(17) = 0.149980051221604
      CONSTS(36) = 16.464
      CONSTS(37) = 0.25
      CONSTS(38) = 8.232
      STATES(18) = 1
      CONSTS(39) = 0.002
      CONSTS(40) = 0.00025
      CONSTS(41) = 0.25
      CONSTS(42) = 10
      CONSTS(43) = 0.001
      CONSTS(44) = 0.3
      CONSTS(45) = 0.22
      CONSTS(46) = 0.00044444
      CONSTS(47) =  (( CONSTS(1)*CONSTS(2))/CONSTS(3))*log(CONSTS(7)/CONSTS(6))
      CONSTS(48) = 2.00000
      CONSTS(49) =  1000.00*( (( - CONSTS(1)*CONSTS(2))/( CONSTS(3)*CONSTS(14)))*log(1.00000+CONSTS(5)/2.60000 ** 4.00000/( CONSTS(13)*1.00000+CONSTS(5)/0.580000 ** 4.00000)) - 0.0190000)
      RETURN
      END
      SUBROUTINE computeRates(VOI, CONSTS,  RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(6) = 0.330000+0.670000/(1.00000+EXP(( STATES(1)*1000.00+31.2260)/4.00000))
      ALGBRC(21) = ( ( 600.000*EXP(-  STATES(1)*1000.00+25.0000 ** 2.00000/170.000)+(31.0000/(1.00000+EXP((25.0000 -  STATES(1)*1000.00)/10.0000))+16.0000/(1.00000+EXP((30.0000+ STATES(1)*1000.00)/10.0000))))*CONSTS(48))/1000.00
      RATES(9) = (ALGBRC(6) - STATES(9))/ALGBRC(21)
      ALGBRC(12) = 1.00000/(1.00000+EXP(( STATES(1)*1000.00+77.8500)/5.00000))
      ALGBRC(27) = (1900.00/(1.00000+EXP(( STATES(1)*1000.00+15.0000)/10.0000)))/1000.00
      RATES(14) = (ALGBRC(12) - STATES(14))/ALGBRC(27)
      ALGBRC(13) = 1.00000/(1.00000+EXP(( STATES(1)*1000.00+53.0000)/13.0000))
      ALGBRC(28) = (6.06000+39.1020/( 0.570000*EXP( - 0.0800000*( STATES(1)*1000.00+44.0000))+ 0.0650000*EXP( 0.100000*( STATES(1)*1000.00+45.9300))))/1000.00
      RATES(15) = (ALGBRC(13) - STATES(15))/ALGBRC(28)
      ALGBRC(14) = 1.00000/(1.00000+EXP(- ( STATES(1)*1000.00 - 22.3000)/18.7500))
      ALGBRC(29) = (2.75352+14.4052/( 1.03700*EXP( 0.0900000*( STATES(1)*1000.00+30.6100))+ 0.369000*EXP( - 0.120000*( STATES(1)*1000.00+23.8400))))/1000.00
      RATES(16) = (ALGBRC(14) - STATES(16))/ALGBRC(29)
      ALGBRC(15) = TERNRY(STATES(3).LE.0.000350000, 1.00000/(1.00000+STATES(3)/0.000350000 ** 6.00000), 1.00000/(1.00000+STATES(3)/0.000350000 ** 16.0000))
      ALGBRC(30) = TERNRY(ALGBRC(15).GT.STATES(18).AND.STATES(1).GT.- 0.0600000, 0.00000, 1.00000)
      RATES(18) = ( ALGBRC(30)*(ALGBRC(15) - STATES(18)))/CONSTS(39)
      ALGBRC(5) = 1.00000/(1.00000+EXP(( STATES(1)*1000.00+25.2260)/3.00000))
      ALGBRC(20) = TERNRY(ALGBRC(5) - STATES(8).GT.0.00000, 1.00000+ 1433.00*(STATES(3) -  50.0000*1.00000e-06), 1.00000)
      ALGBRC(35) = ( (20.0000+( 1102.50*EXP(-  STATES(1)*1000.00+27.0000 ** 2.00000/15.0000 ** 2.00000)+(200.000/(1.00000+EXP((13.0000 -  STATES(1)*1000.00)/10.0000))+180.000/(1.00000+EXP((30.0000+ STATES(1)*1000.00)/10.0000)))))*ALGBRC(20))/1000.00
      RATES(8) = (ALGBRC(5) - STATES(8))/ALGBRC(35)
      ALGBRC(1) = 1.00000/1.00000+EXP(( - STATES(1)*1000.00 - 34.1000)/5.90000) ** 1.00000/3.00000
      ALGBRC(16) = 1.00000/(1.00000+EXP(( - STATES(1)*1000.00 - 60.0000)/5.00000))
      ALGBRC(31) = 0.100000/(1.00000+EXP(( STATES(1)*1000.00+35.0000)/5.00000))+0.100000/(1.00000+EXP(( STATES(1)*1000.00 - 50.0000)/200.000))
      ALGBRC(41) = ( 1.00000*( ALGBRC(16)*ALGBRC(31)))/1000.00
      RATES(4) = (ALGBRC(1) - STATES(4))/ALGBRC(41)
      ALGBRC(2) = 1.00000/ (1.00000+EXP(( STATES(1)*1000.00+72.1000)/5.70000)) ** (1.0 / 2)
      ALGBRC(17) = TERNRY(STATES(1).LT.- 0.0400000,  0.0570000*EXP(- ( STATES(1)*1000.00+80.0000)/6.80000), 0.00000)
      ALGBRC(32) = TERNRY(STATES(1).LT.- 0.0400000,  2.70000*EXP( 0.0790000*( STATES(1)*1000.00))+ 3.10000*( 10.0000 ** 5.00000*EXP( 0.348500*( STATES(1)*1000.00))), 0.770000/( 0.130000*(1.00000+EXP(( STATES(1)*1000.00+10.6600)/- 11.1000))))
      ALGBRC(42) = TERNRY(STATES(1).LT.- 0.0400000, 1.50000/( (ALGBRC(17)+ALGBRC(32))*1000.00), 2.54200/1000.00)
      RATES(5) = (ALGBRC(2) - STATES(5))/ALGBRC(42)
      ALGBRC(3) = 1.00000/ (1.00000+EXP(( STATES(1)*1000.00+72.1000)/5.70000)) ** (1.0 / 2)
      ALGBRC(18) = TERNRY(STATES(1).LT.- 0.0400000, ( ( - 25428.0*EXP( 0.244400*( STATES(1)*1000.00)) -  6.94800*( 10.0000 ** - 6.00000*EXP( - 0.0439100*( STATES(1)*1000.00))))*( STATES(1)*1000.00+37.7800))/(1.00000+EXP( 0.311000*( STATES(1)*1000.00+79.2300))), 0.00000)
      ALGBRC(33) = TERNRY(STATES(1).LT.- 0.0400000, ( 0.0242400*EXP( - 0.0105200*( STATES(1)*1000.00)))/(1.00000+EXP( - 0.137800*( STATES(1)*1000.00+40.1400))), ( 0.600000*EXP( 0.0570000*( STATES(1)*1000.00)))/(1.00000+EXP( - 0.100000*( STATES(1)*1000.00+32.0000))))
      ALGBRC(43) = 7.00000/( (ALGBRC(18)+ALGBRC(33))*1000.00)
      RATES(6) = (ALGBRC(3) - STATES(6))/ALGBRC(43)
      ALGBRC(8) = 1.00000/(1.00000+EXP((CONSTS(49) -  STATES(1)*1000.00)/4.90000))
      ALGBRC(23) = 450.000/(1.00000+EXP((- 45.0000 -  STATES(1)*1000.00)/10.0000))
      ALGBRC(37) = 6.00000/(1.00000+EXP((30.0000+ STATES(1)*1000.00)/11.5000))
      ALGBRC(46) = ( 1.00000*( ALGBRC(23)*ALGBRC(37)))/1000.00
      RATES(11) = (ALGBRC(8) - STATES(11))/ALGBRC(46)
      ALGBRC(9) = 1.00000/(1.00000+EXP(( STATES(1)*1000.00+88.0000)/50.0000))
      ALGBRC(24) = 3.00000/(1.00000+EXP((- 60.0000 -  STATES(1)*1000.00)/20.0000))
      ALGBRC(38) = 1.12000/(1.00000+EXP((- 60.0000+ STATES(1)*1000.00)/20.0000))
      ALGBRC(47) = ( 1.00000*( ALGBRC(24)*ALGBRC(38)))/1000.00
      RATES(12) = (ALGBRC(9) - STATES(12))/ALGBRC(47)
      ALGBRC(10) = 1.00000/(1.00000+EXP(( - STATES(1)*1000.00 - 20.0000)/16.0000))
      ALGBRC(25) = 1100.00/ (1.00000+EXP((- 10.0000 -  STATES(1)*1000.00)/6.00000)) ** (1.0 / 2)
      ALGBRC(39) = 1.00000/(1.00000+EXP((- 60.0000+ STATES(1)*1000.00)/20.0000))
      ALGBRC(48) = ( 1.00000*( ALGBRC(25)*ALGBRC(39)))/1000.00
      RATES(13) = (ALGBRC(10) - STATES(13))/ALGBRC(48)
      ALGBRC(4) = 1.00000/(1.00000+EXP(- ( STATES(1)*1000.00+5.98600)/7.00000))
      ALGBRC(19) = 0.250000+1.40000/(1.00000+EXP(( - STATES(1)*1000.00 - 35.0000)/13.0000))
      ALGBRC(34) = 1.40000/(1.00000+EXP(( STATES(1)*1000.00+5.00000)/5.00000))
      ALGBRC(44) = 1.00000/(1.00000+EXP(( - STATES(1)*1000.00+50.0000)/20.0000))
      ALGBRC(50) = ( ( ALGBRC(19)*ALGBRC(34)+ALGBRC(44))*1.00000)/1000.00
      RATES(7) = (ALGBRC(4) - STATES(7))/ALGBRC(50)
      ALGBRC(7) = 1.00000/(1.00000+STATES(3)/0.000600000 ** 8.00000)
      ALGBRC(22) = 0.100000/(1.00000+EXP((STATES(3) - 0.000900000)/0.000100000))
      ALGBRC(36) = 0.300000/(1.00000+EXP((STATES(3) - 0.000750000)/0.000800000))
      ALGBRC(45) = (ALGBRC(7)+(ALGBRC(22)+ALGBRC(36)))/1.31560
      ALGBRC(51) = TERNRY(STATES(1).GT.- 0.0600000.AND.ALGBRC(45).GT.STATES(10), 0.00000, 1.00000)
      RATES(10) = ( ALGBRC(51)*(ALGBRC(45) - STATES(10)))/CONSTS(11)
      ALGBRC(11) =  (( CONSTS(1)*CONSTS(2))/CONSTS(3))*log(CONSTS(4)/STATES(2))
      ALGBRC(49) =  CONSTS(9)*( STATES(4) ** 3.00000*( STATES(5)*( STATES(6)*(STATES(1) - ALGBRC(11)))))
      ALGBRC(62) = (( (( CONSTS(23)*CONSTS(7))/(CONSTS(7)+CONSTS(21)))*STATES(2))/(STATES(2)+CONSTS(22)))/(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(63) = ( CONSTS(24)*( EXP(( CONSTS(26)*( STATES(1)*CONSTS(3)))/( CONSTS(1)*CONSTS(2)))*( STATES(2) ** 3.00000*CONSTS(5)) -  EXP(( (CONSTS(26) - 1.00000)*( STATES(1)*CONSTS(3)))/( CONSTS(1)*CONSTS(2)))*( CONSTS(4) ** 3.00000*( STATES(3)*CONSTS(25)))))/( (CONSTS(29) ** 3.00000+CONSTS(4) ** 3.00000)*( (CONSTS(28)+CONSTS(5))*(1.00000+ CONSTS(27)*EXP(( (CONSTS(26) - 1.00000)*( STATES(1)*CONSTS(3)))/( CONSTS(1)*CONSTS(2))))))
      ALGBRC(60) =  CONSTS(19)*(STATES(1) - ALGBRC(11))
      RATES(2) = ( - CONSTS(33)*(ALGBRC(49)+(ALGBRC(60)+( 3.00000*ALGBRC(62)+ 3.00000*ALGBRC(63)))))/( CONSTS(3)*( CONSTS(34)*1.00000e-18))
      ALGBRC(52) =  (( (( CONSTS(10)*( 4.00000*( STATES(1)*CONSTS(3) ** 2.00000)))/( CONSTS(1)*CONSTS(2)))*( STATES(3)*EXP(( 2.00000*( STATES(1)*CONSTS(3)))/( CONSTS(1)*CONSTS(2))) -  0.341000*CONSTS(5)))/(EXP(( 2.00000*( STATES(1)*CONSTS(3)))/( CONSTS(1)*CONSTS(2))) - 1.00000))*( STATES(7)*( STATES(8)*( STATES(9)*STATES(10))))
      ALGBRC(55) = 3.91000/(1.00000+EXP( 0.594200*(( STATES(1)*1000.00 -  CONSTS(47)*1000.00) - 200.000)))
      ALGBRC(56) = ( - 1.50900*EXP( 0.000200000*(( STATES(1)*1000.00 -  CONSTS(47)*1000.00)+100.000))+EXP( 0.588600*(( STATES(1)*1000.00 -  CONSTS(47)*1000.00) - 10.0000)))/(1.00000+EXP( 0.454700*( STATES(1)*1000.00 -  CONSTS(47)*1000.00)))
      ALGBRC(57) = ALGBRC(55)/(ALGBRC(55)+ALGBRC(56))
      ALGBRC(58) =  CONSTS(16)*( ALGBRC(57)*( (STATES(1) - CONSTS(47))* (CONSTS(7)/5.40000) ** (1.0 / 2)))
      ALGBRC(59) =  CONSTS(17)*( STATES(14)*(STATES(1) - CONSTS(18)))
      ALGBRC(53) =  CONSTS(12)*( (STATES(1) - CONSTS(47))*( STATES(11)*( STATES(12)* (CONSTS(7)/5.40000) ** (1.0 / 2))))
      ALGBRC(26) =  (( CONSTS(1)*CONSTS(2))/CONSTS(3))*log((CONSTS(7)+ CONSTS(8)*CONSTS(4))/(CONSTS(6)+ CONSTS(8)*STATES(2)))
      ALGBRC(54) =  CONSTS(15)*( (STATES(1) - ALGBRC(26))*( STATES(13) ** 2.00000*(1.00000+0.600000/(1.00000+( 3.80000*1.00000e-05)/STATES(3) ** 1.40000))))
      ALGBRC(65) =  CONSTS(32)*( (STATES(1) - CONSTS(47))*( STATES(15)*STATES(16)))
      ALGBRC(64) = ( CONSTS(30)*STATES(3))/(STATES(3)+CONSTS(31))
      ALGBRC(40) =  (( 0.500000*( CONSTS(1)*CONSTS(2)))/CONSTS(3))*log(CONSTS(5)/STATES(3))
      ALGBRC(61) =  CONSTS(20)*(STATES(1) - ALGBRC(40))
      RATES(1) = - (ALGBRC(58)+(ALGBRC(65)+(ALGBRC(53)+(ALGBRC(54)+(ALGBRC(52)+(ALGBRC(62)+(ALGBRC(49)+(ALGBRC(63)+(ALGBRC(64)+(ALGBRC(59)+(ALGBRC(60)+ALGBRC(61))))))))))))
      ALGBRC(69) = 1.00000/(1.00000+( CONSTS(41)*CONSTS(43))/STATES(3)+CONSTS(43) ** 2.00000)
      ALGBRC(66) =  (CONSTS(38)+( CONSTS(36)*STATES(17) ** 2.00000)/(CONSTS(37) ** 2.00000+STATES(17) ** 2.00000))*( STATES(7)*( STATES(18)*0.0556000))
      ALGBRC(67) = CONSTS(45)/(1.00000+CONSTS(40) ** 2.00000/STATES(3) ** 2.00000)
      ALGBRC(68) =  (STATES(17) - STATES(3))*CONSTS(46)
      RATES(3) =  ALGBRC(69)*(((ALGBRC(68) - ALGBRC(67))+ALGBRC(66)) - ( ((ALGBRC(52)+(ALGBRC(61)+ALGBRC(64))) -  2.00000*ALGBRC(63))*CONSTS(33))/( 2.00000*( CONSTS(34)*( CONSTS(3)*1.00000e-18))))
      ALGBRC(70) = 1.00000/(1.00000+( CONSTS(42)*CONSTS(44))/STATES(17)+CONSTS(44) ** 2.00000)
      RATES(17) =  (( ALGBRC(70)*CONSTS(34))/CONSTS(35))*(ALGBRC(67) - (ALGBRC(66)+ALGBRC(68)))
      RETURN
      END
      SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(6) = 0.330000+0.670000/(1.00000+EXP(( STATES(1)*1000.00+31.2260)/4.00000))
      ALGBRC(21) = ( ( 600.000*EXP(-  STATES(1)*1000.00+25.0000 ** 2.00000/170.000)+(31.0000/(1.00000+EXP((25.0000 -  STATES(1)*1000.00)/10.0000))+16.0000/(1.00000+EXP((30.0000+ STATES(1)*1000.00)/10.0000))))*CONSTS(48))/1000.00
      ALGBRC(12) = 1.00000/(1.00000+EXP(( STATES(1)*1000.00+77.8500)/5.00000))
      ALGBRC(27) = (1900.00/(1.00000+EXP(( STATES(1)*1000.00+15.0000)/10.0000)))/1000.00
      ALGBRC(13) = 1.00000/(1.00000+EXP(( STATES(1)*1000.00+53.0000)/13.0000))
      ALGBRC(28) = (6.06000+39.1020/( 0.570000*EXP( - 0.0800000*( STATES(1)*1000.00+44.0000))+ 0.0650000*EXP( 0.100000*( STATES(1)*1000.00+45.9300))))/1000.00
      ALGBRC(14) = 1.00000/(1.00000+EXP(- ( STATES(1)*1000.00 - 22.3000)/18.7500))
      ALGBRC(29) = (2.75352+14.4052/( 1.03700*EXP( 0.0900000*( STATES(1)*1000.00+30.6100))+ 0.369000*EXP( - 0.120000*( STATES(1)*1000.00+23.8400))))/1000.00
      ALGBRC(15) = TERNRY(STATES(3).LE.0.000350000, 1.00000/(1.00000+STATES(3)/0.000350000 ** 6.00000), 1.00000/(1.00000+STATES(3)/0.000350000 ** 16.0000))
      ALGBRC(30) = TERNRY(ALGBRC(15).GT.STATES(18).AND.STATES(1).GT.- 0.0600000, 0.00000, 1.00000)
      ALGBRC(5) = 1.00000/(1.00000+EXP(( STATES(1)*1000.00+25.2260)/3.00000))
      ALGBRC(20) = TERNRY(ALGBRC(5) - STATES(8).GT.0.00000, 1.00000+ 1433.00*(STATES(3) -  50.0000*1.00000e-06), 1.00000)
      ALGBRC(35) = ( (20.0000+( 1102.50*EXP(-  STATES(1)*1000.00+27.0000 ** 2.00000/15.0000 ** 2.00000)+(200.000/(1.00000+EXP((13.0000 -  STATES(1)*1000.00)/10.0000))+180.000/(1.00000+EXP((30.0000+ STATES(1)*1000.00)/10.0000)))))*ALGBRC(20))/1000.00
      ALGBRC(1) = 1.00000/1.00000+EXP(( - STATES(1)*1000.00 - 34.1000)/5.90000) ** 1.00000/3.00000
      ALGBRC(16) = 1.00000/(1.00000+EXP(( - STATES(1)*1000.00 - 60.0000)/5.00000))
      ALGBRC(31) = 0.100000/(1.00000+EXP(( STATES(1)*1000.00+35.0000)/5.00000))+0.100000/(1.00000+EXP(( STATES(1)*1000.00 - 50.0000)/200.000))
      ALGBRC(41) = ( 1.00000*( ALGBRC(16)*ALGBRC(31)))/1000.00
      ALGBRC(2) = 1.00000/ (1.00000+EXP(( STATES(1)*1000.00+72.1000)/5.70000)) ** (1.0 / 2)
      ALGBRC(17) = TERNRY(STATES(1).LT.- 0.0400000,  0.0570000*EXP(- ( STATES(1)*1000.00+80.0000)/6.80000), 0.00000)
      ALGBRC(32) = TERNRY(STATES(1).LT.- 0.0400000,  2.70000*EXP( 0.0790000*( STATES(1)*1000.00))+ 3.10000*( 10.0000 ** 5.00000*EXP( 0.348500*( STATES(1)*1000.00))), 0.770000/( 0.130000*(1.00000+EXP(( STATES(1)*1000.00+10.6600)/- 11.1000))))
      ALGBRC(42) = TERNRY(STATES(1).LT.- 0.0400000, 1.50000/( (ALGBRC(17)+ALGBRC(32))*1000.00), 2.54200/1000.00)
      ALGBRC(3) = 1.00000/ (1.00000+EXP(( STATES(1)*1000.00+72.1000)/5.70000)) ** (1.0 / 2)
      ALGBRC(18) = TERNRY(STATES(1).LT.- 0.0400000, ( ( - 25428.0*EXP( 0.244400*( STATES(1)*1000.00)) -  6.94800*( 10.0000 ** - 6.00000*EXP( - 0.0439100*( STATES(1)*1000.00))))*( STATES(1)*1000.00+37.7800))/(1.00000+EXP( 0.311000*( STATES(1)*1000.00+79.2300))), 0.00000)
      ALGBRC(33) = TERNRY(STATES(1).LT.- 0.0400000, ( 0.0242400*EXP( - 0.0105200*( STATES(1)*1000.00)))/(1.00000+EXP( - 0.137800*( STATES(1)*1000.00+40.1400))), ( 0.600000*EXP( 0.0570000*( STATES(1)*1000.00)))/(1.00000+EXP( - 0.100000*( STATES(1)*1000.00+32.0000))))
      ALGBRC(43) = 7.00000/( (ALGBRC(18)+ALGBRC(33))*1000.00)
      ALGBRC(8) = 1.00000/(1.00000+EXP((CONSTS(49) -  STATES(1)*1000.00)/4.90000))
      ALGBRC(23) = 450.000/(1.00000+EXP((- 45.0000 -  STATES(1)*1000.00)/10.0000))
      ALGBRC(37) = 6.00000/(1.00000+EXP((30.0000+ STATES(1)*1000.00)/11.5000))
      ALGBRC(46) = ( 1.00000*( ALGBRC(23)*ALGBRC(37)))/1000.00
      ALGBRC(9) = 1.00000/(1.00000+EXP(( STATES(1)*1000.00+88.0000)/50.0000))
      ALGBRC(24) = 3.00000/(1.00000+EXP((- 60.0000 -  STATES(1)*1000.00)/20.0000))
      ALGBRC(38) = 1.12000/(1.00000+EXP((- 60.0000+ STATES(1)*1000.00)/20.0000))
      ALGBRC(47) = ( 1.00000*( ALGBRC(24)*ALGBRC(38)))/1000.00
      ALGBRC(10) = 1.00000/(1.00000+EXP(( - STATES(1)*1000.00 - 20.0000)/16.0000))
      ALGBRC(25) = 1100.00/ (1.00000+EXP((- 10.0000 -  STATES(1)*1000.00)/6.00000)) ** (1.0 / 2)
      ALGBRC(39) = 1.00000/(1.00000+EXP((- 60.0000+ STATES(1)*1000.00)/20.0000))
      ALGBRC(48) = ( 1.00000*( ALGBRC(25)*ALGBRC(39)))/1000.00
      ALGBRC(4) = 1.00000/(1.00000+EXP(- ( STATES(1)*1000.00+5.98600)/7.00000))
      ALGBRC(19) = 0.250000+1.40000/(1.00000+EXP(( - STATES(1)*1000.00 - 35.0000)/13.0000))
      ALGBRC(34) = 1.40000/(1.00000+EXP(( STATES(1)*1000.00+5.00000)/5.00000))
      ALGBRC(44) = 1.00000/(1.00000+EXP(( - STATES(1)*1000.00+50.0000)/20.0000))
      ALGBRC(50) = ( ( ALGBRC(19)*ALGBRC(34)+ALGBRC(44))*1.00000)/1000.00
      ALGBRC(7) = 1.00000/(1.00000+STATES(3)/0.000600000 ** 8.00000)
      ALGBRC(22) = 0.100000/(1.00000+EXP((STATES(3) - 0.000900000)/0.000100000))
      ALGBRC(36) = 0.300000/(1.00000+EXP((STATES(3) - 0.000750000)/0.000800000))
      ALGBRC(45) = (ALGBRC(7)+(ALGBRC(22)+ALGBRC(36)))/1.31560
      ALGBRC(51) = TERNRY(STATES(1).GT.- 0.0600000.AND.ALGBRC(45).GT.STATES(10), 0.00000, 1.00000)
      ALGBRC(11) =  (( CONSTS(1)*CONSTS(2))/CONSTS(3))*log(CONSTS(4)/STATES(2))
      ALGBRC(49) =  CONSTS(9)*( STATES(4) ** 3.00000*( STATES(5)*( STATES(6)*(STATES(1) - ALGBRC(11)))))
      ALGBRC(62) = (( (( CONSTS(23)*CONSTS(7))/(CONSTS(7)+CONSTS(21)))*STATES(2))/(STATES(2)+CONSTS(22)))/(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(63) = ( CONSTS(24)*( EXP(( CONSTS(26)*( STATES(1)*CONSTS(3)))/( CONSTS(1)*CONSTS(2)))*( STATES(2) ** 3.00000*CONSTS(5)) -  EXP(( (CONSTS(26) - 1.00000)*( STATES(1)*CONSTS(3)))/( CONSTS(1)*CONSTS(2)))*( CONSTS(4) ** 3.00000*( STATES(3)*CONSTS(25)))))/( (CONSTS(29) ** 3.00000+CONSTS(4) ** 3.00000)*( (CONSTS(28)+CONSTS(5))*(1.00000+ CONSTS(27)*EXP(( (CONSTS(26) - 1.00000)*( STATES(1)*CONSTS(3)))/( CONSTS(1)*CONSTS(2))))))
      ALGBRC(60) =  CONSTS(19)*(STATES(1) - ALGBRC(11))
      ALGBRC(52) =  (( (( CONSTS(10)*( 4.00000*( STATES(1)*CONSTS(3) ** 2.00000)))/( CONSTS(1)*CONSTS(2)))*( STATES(3)*EXP(( 2.00000*( STATES(1)*CONSTS(3)))/( CONSTS(1)*CONSTS(2))) -  0.341000*CONSTS(5)))/(EXP(( 2.00000*( STATES(1)*CONSTS(3)))/( CONSTS(1)*CONSTS(2))) - 1.00000))*( STATES(7)*( STATES(8)*( STATES(9)*STATES(10))))
      ALGBRC(55) = 3.91000/(1.00000+EXP( 0.594200*(( STATES(1)*1000.00 -  CONSTS(47)*1000.00) - 200.000)))
      ALGBRC(56) = ( - 1.50900*EXP( 0.000200000*(( STATES(1)*1000.00 -  CONSTS(47)*1000.00)+100.000))+EXP( 0.588600*(( STATES(1)*1000.00 -  CONSTS(47)*1000.00) - 10.0000)))/(1.00000+EXP( 0.454700*( STATES(1)*1000.00 -  CONSTS(47)*1000.00)))
      ALGBRC(57) = ALGBRC(55)/(ALGBRC(55)+ALGBRC(56))
      ALGBRC(58) =  CONSTS(16)*( ALGBRC(57)*( (STATES(1) - CONSTS(47))* (CONSTS(7)/5.40000) ** (1.0 / 2)))
      ALGBRC(59) =  CONSTS(17)*( STATES(14)*(STATES(1) - CONSTS(18)))
      ALGBRC(53) =  CONSTS(12)*( (STATES(1) - CONSTS(47))*( STATES(11)*( STATES(12)* (CONSTS(7)/5.40000) ** (1.0 / 2))))
      ALGBRC(26) =  (( CONSTS(1)*CONSTS(2))/CONSTS(3))*log((CONSTS(7)+ CONSTS(8)*CONSTS(4))/(CONSTS(6)+ CONSTS(8)*STATES(2)))
      ALGBRC(54) =  CONSTS(15)*( (STATES(1) - ALGBRC(26))*( STATES(13) ** 2.00000*(1.00000+0.600000/(1.00000+( 3.80000*1.00000e-05)/STATES(3) ** 1.40000))))
      ALGBRC(65) =  CONSTS(32)*( (STATES(1) - CONSTS(47))*( STATES(15)*STATES(16)))
      ALGBRC(64) = ( CONSTS(30)*STATES(3))/(STATES(3)+CONSTS(31))
      ALGBRC(40) =  (( 0.500000*( CONSTS(1)*CONSTS(2)))/CONSTS(3))*log(CONSTS(5)/STATES(3))
      ALGBRC(61) =  CONSTS(20)*(STATES(1) - ALGBRC(40))
      ALGBRC(69) = 1.00000/(1.00000+( CONSTS(41)*CONSTS(43))/STATES(3)+CONSTS(43) ** 2.00000)
      ALGBRC(66) =  (CONSTS(38)+( CONSTS(36)*STATES(17) ** 2.00000)/(CONSTS(37) ** 2.00000+STATES(17) ** 2.00000))*( STATES(7)*( STATES(18)*0.0556000))
      ALGBRC(67) = CONSTS(45)/(1.00000+CONSTS(40) ** 2.00000/STATES(3) ** 2.00000)
      ALGBRC(68) =  (STATES(17) - STATES(3))*CONSTS(46)
      ALGBRC(70) = 1.00000/(1.00000+( CONSTS(42)*CONSTS(44))/STATES(17)+CONSTS(44) ** 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