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 49 entries in the algebraic variable array.
C There are a total of 29 entries in each of the rate and state variable arrays.
C There are a total of 51 entries in the constant variable array.
C
C
C VOI is time in component environment (second).
C STATES(1) is V in component membrane (millivolt).
C CONSTS(1) is R in component membrane (millijoule_per_mole_kelvin).
C CONSTS(2) is T in component membrane (kelvin).
C CONSTS(3) is F in component membrane (coulomb_per_mole).
C CONSTS(4) is Cm in component membrane (nanoF).
C ALGBRC(27) is i_Na in component sodium_current (picoA).
C ALGBRC(29) is i_Ca_L in component L_type_Ca_channel (picoA).
C ALGBRC(31) is i_t in component Ca_independent_transient_outward_K_current (picoA).
C ALGBRC(32) is i_sus in component sustained_outward_K_current (picoA).
C ALGBRC(36) is i_K1 in component inward_rectifier (picoA).
C ALGBRC(35) is i_Kr in component delayed_rectifier_K_currents (picoA).
C ALGBRC(33) is i_Ks in component delayed_rectifier_K_currents (picoA).
C ALGBRC(37) is i_B_Na in component background_currents (picoA).
C ALGBRC(39) is i_B_Ca in component background_currents (picoA).
C ALGBRC(40) is i_NaK in component sodium_potassium_pump (picoA).
C ALGBRC(41) is i_CaP in component sarcolemmal_calcium_pump_current (picoA).
C ALGBRC(42) is i_NaCa in component Na_Ca_ion_exchanger_current (picoA).
C ALGBRC(1) is i_Stim in component membrane (picoA).
C CONSTS(5) is stim_start in component membrane (second).
C CONSTS(6) is stim_end in component membrane (second).
C CONSTS(7) is stim_period in component membrane (second).
C CONSTS(8) is stim_duration in component membrane (second).
C CONSTS(9) is stim_amplitude in component membrane (picoA).
C ALGBRC(13) is E_Na in component sodium_current (millivolt).
C CONSTS(10) is P_Na in component sodium_current (nanolitre_per_second).
C STATES(2) is Na_c in component cleft_space_ion_concentrations (millimolar).
C STATES(3) is Na_i in component intracellular_ion_concentrations (millimolar).
C STATES(4) is m in component sodium_current_m_gate (dimensionless).
C STATES(5) is h1 in component sodium_current_h1_gate (dimensionless).
C STATES(6) is h2 in component sodium_current_h2_gate (dimensionless).
C ALGBRC(2) is m_infinity in component sodium_current_m_gate (dimensionless).
C ALGBRC(14) is tau_m in component sodium_current_m_gate (second).
C ALGBRC(3) is h_infinity in component sodium_current_h1_gate (dimensionless).
C ALGBRC(15) is tau_h1 in component sodium_current_h1_gate (second).
C ALGBRC(16) is tau_h2 in component sodium_current_h2_gate (second).
C CONSTS(11) is g_Ca_L in component L_type_Ca_channel (nanoS).
C CONSTS(12) is E_Ca_app in component L_type_Ca_channel (millivolt).
C ALGBRC(28) is f_Ca in component L_type_Ca_channel (dimensionless).
C CONSTS(13) is k_Ca in component L_type_Ca_channel (millimolar).
C STATES(7) is Ca_d in component intracellular_ion_concentrations (millimolar).
C STATES(8) is d_L in component L_type_Ca_channel_d_L_gate (dimensionless).
C STATES(9) is f_L_1 in component L_type_Ca_channel_f_L1_gate (dimensionless).
C STATES(10) is f_L_2 in component L_type_Ca_channel_f_L2_gate (dimensionless).
C ALGBRC(4) is d_L_infinity in component L_type_Ca_channel_d_L_gate (dimensionless).
C ALGBRC(17) is tau_d_L in component L_type_Ca_channel_d_L_gate (second).
C ALGBRC(5) is f_L_infinity in component L_type_Ca_channel_f_L1_gate (dimensionless).
C ALGBRC(18) is tau_f_L1 in component L_type_Ca_channel_f_L1_gate (second).
C ALGBRC(19) is tau_f_L2 in component L_type_Ca_channel_f_L2_gate (second).
C ALGBRC(30) is E_K in component Ca_independent_transient_outward_K_current (millivolt).
C CONSTS(14) is g_t in component Ca_independent_transient_outward_K_current (nanoS).
C STATES(11) is K_c in component cleft_space_ion_concentrations (millimolar).
C STATES(12) is K_i in component intracellular_ion_concentrations (millimolar).
C STATES(13) is r in component Ca_independent_transient_outward_K_current_r_gate (dimensionless).
C STATES(14) is s in component Ca_independent_transient_outward_K_current_s_gate (dimensionless).
C ALGBRC(20) is tau_r in component Ca_independent_transient_outward_K_current_r_gate (second).
C ALGBRC(6) is r_infinity in component Ca_independent_transient_outward_K_current_r_gate (dimensionless).
C ALGBRC(21) is tau_s in component Ca_independent_transient_outward_K_current_s_gate (second).
C ALGBRC(7) is s_infinity in component Ca_independent_transient_outward_K_current_s_gate (dimensionless).
C CONSTS(15) is g_sus in component sustained_outward_K_current (nanoS).
C STATES(15) is r_sus in component sustained_outward_K_current_r_sus_gate (dimensionless).
C STATES(16) is s_sus in component sustained_outward_K_current_s_sus_gate (dimensionless).
C ALGBRC(22) is tau_r_sus in component sustained_outward_K_current_r_sus_gate (second).
C ALGBRC(8) is r_sus_infinity in component sustained_outward_K_current_r_sus_gate (dimensionless).
C ALGBRC(23) is tau_s_sus in component sustained_outward_K_current_s_sus_gate (second).
C ALGBRC(9) is s_sus_infinity in component sustained_outward_K_current_s_sus_gate (dimensionless).
C CONSTS(16) is g_Ks in component delayed_rectifier_K_currents (nanoS).
C CONSTS(17) is g_Kr in component delayed_rectifier_K_currents (nanoS).
C STATES(17) is n in component delayed_rectifier_K_currents_n_gate (dimensionless).
C STATES(18) is p_a in component delayed_rectifier_K_currents_pa_gate (dimensionless).
C ALGBRC(34) is p_i in component delayed_rectifier_K_currents_pi_gate (dimensionless).
C ALGBRC(24) is tau_n in component delayed_rectifier_K_currents_n_gate (second).
C ALGBRC(10) is n_infinity in component delayed_rectifier_K_currents_n_gate (dimensionless).
C ALGBRC(25) is tau_p_a in component delayed_rectifier_K_currents_pa_gate (second).
C ALGBRC(11) is p_a_infinity in component delayed_rectifier_K_currents_pa_gate (dimensionless).
C CONSTS(18) is g_K1 in component inward_rectifier (nanoS).
C CONSTS(19) is g_B_Na in component background_currents (nanoS).
C CONSTS(20) is g_B_Ca in component background_currents (nanoS).
C ALGBRC(38) is E_Ca in component background_currents (millivolt).
C STATES(19) is Ca_c in component cleft_space_ion_concentrations (millimolar).
C STATES(20) is Ca_i in component intracellular_ion_concentrations (millimolar).
C CONSTS(21) is k_NaK_K in component sodium_potassium_pump (millimolar).
C CONSTS(22) is k_NaK_Na in component sodium_potassium_pump (millimolar).
C CONSTS(23) is i_NaK_max in component sodium_potassium_pump (picoA).
C CONSTS(24) is i_CaP_max in component sarcolemmal_calcium_pump_current (picoA).
C CONSTS(25) is k_CaP in component sarcolemmal_calcium_pump_current (millimolar).
C CONSTS(26) is k_NaCa in component Na_Ca_ion_exchanger_current (picoA_per_millimolar_4).
C CONSTS(27) is d_NaCa in component Na_Ca_ion_exchanger_current (per_millimolar_4).
C CONSTS(28) is gamma in component Na_Ca_ion_exchanger_current (dimensionless).
C CONSTS(29) is phi_Na_en in component intracellular_ion_concentrations (picoA).
C CONSTS(30) is Vol_i in component intracellular_ion_concentrations (nanolitre).
C CONSTS(50) is Vol_d in component intracellular_ion_concentrations (nanolitre).
C ALGBRC(43) is i_di in component intracellular_ion_concentrations (picoA).
C CONSTS(31) is tau_di in component intracellular_ion_concentrations (second).
C ALGBRC(47) is i_up in component Ca_handling_by_the_SR (picoA).
C ALGBRC(49) is i_rel in component Ca_handling_by_the_SR (picoA).
C ALGBRC(44) is dOCdt in component intracellular_Ca_buffering (per_second).
C ALGBRC(45) is dOTCdt in component intracellular_Ca_buffering (per_second).
C ALGBRC(46) is dOTMgCdt in component intracellular_Ca_buffering (per_second).
C STATES(21) is O_C in component intracellular_Ca_buffering (dimensionless).
C STATES(22) is O_TC in component intracellular_Ca_buffering (dimensionless).
C STATES(23) is O_TMgC in component intracellular_Ca_buffering (dimensionless).
C STATES(24) is O_TMgMg in component intracellular_Ca_buffering (dimensionless).
C CONSTS(32) is Mg_i in component intracellular_Ca_buffering (millimolar).
C CONSTS(51) is Vol_c in component cleft_space_ion_concentrations (nanolitre).
C CONSTS(33) is tau_Na in component cleft_space_ion_concentrations (second).
C CONSTS(34) is tau_K in component cleft_space_ion_concentrations (second).
C CONSTS(35) is tau_Ca in component cleft_space_ion_concentrations (second).
C CONSTS(36) is Na_b in component cleft_space_ion_concentrations (millimolar).
C CONSTS(37) is Ca_b in component cleft_space_ion_concentrations (millimolar).
C CONSTS(38) is K_b in component cleft_space_ion_concentrations (millimolar).
C ALGBRC(48) is i_tr in component Ca_handling_by_the_SR (picoA).
C CONSTS(39) is I_up_max in component Ca_handling_by_the_SR (picoA).
C CONSTS(40) is k_cyca in component Ca_handling_by_the_SR (millimolar).
C CONSTS(41) is k_srca in component Ca_handling_by_the_SR (millimolar).
C CONSTS(42) is k_xcs in component Ca_handling_by_the_SR (dimensionless).
C CONSTS(43) is alpha_rel in component Ca_handling_by_the_SR (picoA_per_millimolar).
C STATES(25) is Ca_rel in component Ca_handling_by_the_SR (millimolar).
C STATES(26) is Ca_up in component Ca_handling_by_the_SR (millimolar).
C CONSTS(44) is Vol_up in component Ca_handling_by_the_SR (nanolitre).
C CONSTS(45) is Vol_rel in component Ca_handling_by_the_SR (nanolitre).
C ALGBRC(12) is r_act in component Ca_handling_by_the_SR (per_second).
C ALGBRC(26) is r_inact in component Ca_handling_by_the_SR (per_second).
C CONSTS(46) is r_recov in component Ca_handling_by_the_SR (per_second).
C STATES(27) is O_Calse in component Ca_handling_by_the_SR (dimensionless).
C STATES(28) is F1 in component Ca_handling_by_the_SR (dimensionless).
C STATES(29) is F2 in component Ca_handling_by_the_SR (dimensionless).
C CONSTS(47) is tau_tr in component Ca_handling_by_the_SR (second).
C CONSTS(48) is k_rel_i in component Ca_handling_by_the_SR (millimolar).
C CONSTS(49) is k_rel_d in component Ca_handling_by_the_SR (millimolar).
C RATES(1) is d/dt V in component membrane (millivolt).
C RATES(4) is d/dt m in component sodium_current_m_gate (dimensionless).
C RATES(5) is d/dt h1 in component sodium_current_h1_gate (dimensionless).
C RATES(6) is d/dt h2 in component sodium_current_h2_gate (dimensionless).
C RATES(8) is d/dt d_L in component L_type_Ca_channel_d_L_gate (dimensionless).
C RATES(9) is d/dt f_L_1 in component L_type_Ca_channel_f_L1_gate (dimensionless).
C RATES(10) is d/dt f_L_2 in component L_type_Ca_channel_f_L2_gate (dimensionless).
C RATES(13) is d/dt r in component Ca_independent_transient_outward_K_current_r_gate (dimensionless).
C RATES(14) is d/dt s in component Ca_independent_transient_outward_K_current_s_gate (dimensionless).
C RATES(15) is d/dt r_sus in component sustained_outward_K_current_r_sus_gate (dimensionless).
C RATES(16) is d/dt s_sus in component sustained_outward_K_current_s_sus_gate (dimensionless).
C RATES(17) is d/dt n in component delayed_rectifier_K_currents_n_gate (dimensionless).
C RATES(18) is d/dt p_a in component delayed_rectifier_K_currents_pa_gate (dimensionless).
C RATES(3) is d/dt Na_i in component intracellular_ion_concentrations (millimolar).
C RATES(12) is d/dt K_i in component intracellular_ion_concentrations (millimolar).
C RATES(20) is d/dt Ca_i in component intracellular_ion_concentrations (millimolar).
C RATES(7) is d/dt Ca_d in component intracellular_ion_concentrations (millimolar).
C RATES(21) is d/dt O_C in component intracellular_Ca_buffering (dimensionless).
C RATES(22) is d/dt O_TC in component intracellular_Ca_buffering (dimensionless).
C RATES(23) is d/dt O_TMgC in component intracellular_Ca_buffering (dimensionless).
C RATES(24) is d/dt O_TMgMg in component intracellular_Ca_buffering (dimensionless).
C RATES(2) is d/dt Na_c in component cleft_space_ion_concentrations (millimolar).
C RATES(11) is d/dt K_c in component cleft_space_ion_concentrations (millimolar).
C RATES(19) is d/dt Ca_c in component cleft_space_ion_concentrations (millimolar).
C RATES(27) is d/dt O_Calse in component Ca_handling_by_the_SR (dimensionless).
C RATES(25) is d/dt Ca_rel in component Ca_handling_by_the_SR (millimolar).
C RATES(26) is d/dt Ca_up in component Ca_handling_by_the_SR (millimolar).
C RATES(28) is d/dt F1 in component Ca_handling_by_the_SR (dimensionless).
C RATES(29) is d/dt F2 in component Ca_handling_by_the_SR (dimensionless).
C
      SUBROUTINE initConsts(CONSTS, RATES, STATES)
      REAL CONSTS(*), RATES(*), STATES(*)
      STATES(1) = -74.2525
      CONSTS(1) = 8314
      CONSTS(2) = 306.15
      CONSTS(3) = 96487
      CONSTS(4) = 0.05
      CONSTS(5) = 0.1
      CONSTS(6) = 100000000
      CONSTS(7) = 1
      CONSTS(8) = 0.006
      CONSTS(9) = -280
      CONSTS(10) = 0.0016
      STATES(2) = 130.011
      STATES(3) = 8.5547
      STATES(4) = 0.0032017
      STATES(5) = 0.8814
      STATES(6) = 0.8742
      CONSTS(11) = 6.75
      CONSTS(12) = 60
      CONSTS(13) = 0.025
      STATES(7) = 7.2495e-5
      STATES(8) = 1.3005e-5
      STATES(9) = 0.9986
      STATES(10) = 0.9986
      CONSTS(14) = 7.5
      STATES(11) = 5.3581
      STATES(12) = 129.435
      STATES(13) = 0.0010678
      STATES(14) = 0.949
      CONSTS(15) = 2.75
      STATES(15) = 0.00015949
      STATES(16) = 0.9912
      CONSTS(16) = 1
      CONSTS(17) = 0.5
      STATES(17) = 0.0048357
      STATES(18) = 0.0001
      CONSTS(18) = 3
      CONSTS(19) = 0.060599
      CONSTS(20) = 0.078681
      STATES(19) = 1.8147
      STATES(20) = 6.729e-5
      CONSTS(21) = 1
      CONSTS(22) = 11
      CONSTS(23) = 70.8253
      CONSTS(24) = 4
      CONSTS(25) = 0.0002
      CONSTS(26) = 0.0374842
      CONSTS(27) = 0.0003
      CONSTS(28) = 0.45
      CONSTS(29) = -1.68
      CONSTS(30) = 0.005884
      CONSTS(31) = 0.01
      STATES(21) = 0.0275
      STATES(22) = 0.0133
      STATES(23) = 0.1961
      STATES(24) = 0.7094
      CONSTS(32) = 2.5
      CONSTS(33) = 14.3
      CONSTS(34) = 10
      CONSTS(35) = 24.7
      CONSTS(36) = 130
      CONSTS(37) = 1.8
      CONSTS(38) = 5.4
      CONSTS(39) = 2800
      CONSTS(40) = 0.0003
      CONSTS(41) = 0.5
      CONSTS(42) = 0.4
      CONSTS(43) = 200000
      STATES(25) = 0.6465
      STATES(26) = 0.6646
      CONSTS(44) = 0.0003969
      CONSTS(45) = 4.41e-5
      CONSTS(46) = 0.815
      STATES(27) = 0.4369
      STATES(28) = 0.4284
      STATES(29) = 0.0028
      CONSTS(47) = 0.01
      CONSTS(48) = 0.0003
      CONSTS(49) = 0.003
      CONSTS(50) =  0.0200000*CONSTS(30)
      CONSTS(51) =  0.136000*CONSTS(30)
      RETURN
      END
      SUBROUTINE computeRates(VOI, CONSTS,  RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      RATES(24) =  2000.00*CONSTS(32)*((1.00000 - STATES(23)) - STATES(24)) -  666.000*STATES(24)
      ALGBRC(12) =  203.800*(STATES(20)/(STATES(20)+CONSTS(48)) ** 4.00000+STATES(7)/(STATES(7)+CONSTS(49)) ** 4.00000)
      RATES(28) =  CONSTS(46)*((1.00000 - STATES(28)) - STATES(29)) -  ALGBRC(12)*STATES(28)
      ALGBRC(2) = 1.00000/(1.00000+EXP((STATES(1)+27.1200)/- 8.21000))
      ALGBRC(14) =  4.20000e-05*EXP(- (STATES(1)+25.5700)/28.8000 ** 2.00000)+2.40000e-05
      RATES(4) = (ALGBRC(2) - STATES(4))/ALGBRC(14)
      ALGBRC(3) = 1.00000/(1.00000+EXP((STATES(1)+63.6000)/5.30000))
      ALGBRC(15) = 0.0300000/(1.00000+EXP((STATES(1)+35.1000)/3.20000))+0.000300000
      RATES(5) = (ALGBRC(3) - STATES(5))/ALGBRC(15)
      ALGBRC(16) = 0.120000/(1.00000+EXP((STATES(1)+35.1000)/3.20000))+0.00300000
      RATES(6) = (ALGBRC(3) - STATES(6))/ALGBRC(16)
      ALGBRC(4) = 1.00000/(1.00000+EXP((STATES(1)+9.00000)/- 5.80000))
      ALGBRC(17) =  0.00270000*EXP(- (STATES(1)+35.0000)/30.0000 ** 2.00000)+0.00200000
      RATES(8) = (ALGBRC(4) - STATES(8))/ALGBRC(17)
      ALGBRC(5) = 1.00000/(1.00000+EXP((STATES(1)+27.4000)/7.10000))
      ALGBRC(18) =  0.161000*EXP(- (STATES(1)+40.0000)/14.4000 ** 2.00000)+0.0100000
      RATES(9) = (ALGBRC(5) - STATES(9))/ALGBRC(18)
      ALGBRC(19) =  1.33230*EXP(- (STATES(1)+40.0000)/14.2000 ** 2.00000)+0.0626000
      RATES(10) = (ALGBRC(5) - STATES(10))/ALGBRC(19)
      ALGBRC(20) =  0.00350000*EXP(- STATES(1)/30.0000 ** 2.00000)+0.00150000
      ALGBRC(6) = 1.00000/(1.00000+EXP((STATES(1) - 1.00000)/- 11.0000))
      RATES(13) = (ALGBRC(6) - STATES(13))/ALGBRC(20)
      ALGBRC(21) =  0.481200*EXP(- (STATES(1)+52.4500)/14.9700 ** 2.00000)+0.0141400
      ALGBRC(7) = 1.00000/(1.00000+EXP((STATES(1)+40.5000)/11.5000))
      RATES(14) = (ALGBRC(7) - STATES(14))/ALGBRC(21)
      ALGBRC(22) = 0.00900000/(1.00000+EXP((STATES(1)+5.00000)/12.0000))+0.000500000
      ALGBRC(8) = 1.00000/(1.00000+EXP((STATES(1)+4.30000)/- 8.00000))
      RATES(15) = (ALGBRC(8) - STATES(15))/ALGBRC(22)
      ALGBRC(23) = 0.0470000/(1.00000+EXP((STATES(1)+60.0000)/10.0000))+0.300000
      ALGBRC(9) = 0.400000/(1.00000+EXP((STATES(1)+20.0000)/10.0000))+0.600000
      RATES(16) = (ALGBRC(9) - STATES(16))/ALGBRC(23)
      ALGBRC(24) = 0.700000+ 0.400000*EXP(- (STATES(1) - 20.0000)/20.0000 ** 2.00000)
      ALGBRC(10) = 1.00000/(1.00000+EXP((STATES(1) - 19.9000)/- 12.7000))
      RATES(17) = (ALGBRC(10) - STATES(17))/ALGBRC(24)
      ALGBRC(25) = 0.0311800+ 0.217180*EXP(- (STATES(1)+20.1376)/22.1996 ** 2.00000)
      ALGBRC(11) = 1.00000/(1.00000+EXP((STATES(1)+15.0000)/- 6.00000))
      RATES(18) = (ALGBRC(11) - STATES(18))/ALGBRC(25)
      ALGBRC(26) = 33.9600+ 339.600*STATES(20)/(STATES(20)+CONSTS(48)) ** 4.00000
      RATES(29) =  ALGBRC(12)*STATES(28) -  ALGBRC(26)*STATES(29)
      ALGBRC(30) =  (( CONSTS(1)*CONSTS(2))/CONSTS(3))*log(STATES(11)/STATES(12))
      ALGBRC(31) =  CONSTS(14)*STATES(13)*STATES(14)*(STATES(1) - ALGBRC(30))
      ALGBRC(32) =  CONSTS(15)*STATES(15)*STATES(16)*(STATES(1) - ALGBRC(30))
      ALGBRC(36) = ( CONSTS(18)*STATES(11)/1.00000 ** 0.445700*(STATES(1) - ALGBRC(30)))/(1.00000+EXP(( 1.50000*((STATES(1) - ALGBRC(30))+3.60000)*CONSTS(3))/( CONSTS(1)*CONSTS(2))))
      ALGBRC(34) = 1.00000/(1.00000+EXP((STATES(1)+55.0000)/24.0000))
      ALGBRC(35) =  CONSTS(17)*STATES(18)*ALGBRC(34)*(STATES(1) - ALGBRC(30))
      ALGBRC(33) =  CONSTS(16)*STATES(17)*(STATES(1) - ALGBRC(30))
      ALGBRC(40) = ( (( (( CONSTS(23)*STATES(11))/(STATES(11)+CONSTS(21)))*STATES(3) ** 1.50000)/(STATES(3) ** 1.50000+CONSTS(22) ** 1.50000))*(STATES(1)+150.000))/(STATES(1)+200.000)
      RATES(12) = - ((ALGBRC(31)+ALGBRC(32)+ALGBRC(36)+ALGBRC(35)+ALGBRC(33)) -  2.00000*ALGBRC(40))/( CONSTS(30)*CONSTS(3))
      RATES(11) = (CONSTS(38) - STATES(11))/CONSTS(34)+((ALGBRC(31)+ALGBRC(32)+ALGBRC(36)+ALGBRC(35)+ALGBRC(33)) -  2.00000*ALGBRC(40))/( CONSTS(51)*CONSTS(3))
      ALGBRC(13) =  (( CONSTS(1)*CONSTS(2))/CONSTS(3))*log(STATES(2)/STATES(3))
      ALGBRC(27) = ( (( CONSTS(10)*STATES(4) ** 3.00000*( 0.900000*STATES(5)+ 0.100000*STATES(6))*STATES(2)*STATES(1)*CONSTS(3) ** 2.00000)/( CONSTS(1)*CONSTS(2)))*(EXP(( (STATES(1) - ALGBRC(13))*CONSTS(3))/( CONSTS(1)*CONSTS(2))) - 1.00000))/(EXP(( STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2))) - 1.00000)
      ALGBRC(28) = STATES(7)/(STATES(7)+CONSTS(13))
      ALGBRC(29) =  CONSTS(11)*STATES(8)*( ALGBRC(28)*STATES(9)+ (1.00000 - ALGBRC(28))*STATES(10))*(STATES(1) - CONSTS(12))
      ALGBRC(37) =  CONSTS(19)*(STATES(1) - ALGBRC(13))
      ALGBRC(38) =  (( CONSTS(1)*CONSTS(2))/( 2.00000*CONSTS(3)))*log(STATES(19)/STATES(20))
      ALGBRC(39) =  CONSTS(20)*(STATES(1) - ALGBRC(38))
      ALGBRC(41) = ( CONSTS(24)*STATES(20))/(STATES(20)+CONSTS(25))
      ALGBRC(42) = ( CONSTS(26)*( STATES(3) ** 3.00000*STATES(19)*EXP(( CONSTS(28)*CONSTS(3)*STATES(1))/( CONSTS(1)*CONSTS(2))) -  STATES(2) ** 3.00000*STATES(20)*EXP(( (CONSTS(28) - 1.00000)*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))))/(1.00000+ CONSTS(27)*( STATES(2) ** 3.00000*STATES(20)+ STATES(3) ** 3.00000*STATES(19)))
      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)
      RATES(1) =  (- 1.00000/CONSTS(4))*(ALGBRC(1)+ALGBRC(27)+ALGBRC(29)+ALGBRC(31)+ALGBRC(32)+ALGBRC(36)+ALGBRC(35)+ALGBRC(33)+ALGBRC(37)+ALGBRC(39)+ALGBRC(40)+ALGBRC(41)+ALGBRC(42))
      RATES(3) = - (ALGBRC(27)+ALGBRC(37)+ 3.00000*ALGBRC(40)+ 3.00000*ALGBRC(42)+CONSTS(29))/( CONSTS(30)*CONSTS(3))
      RATES(2) = (CONSTS(36) - STATES(2))/CONSTS(33)+(ALGBRC(27)+ALGBRC(37)+ 3.00000*ALGBRC(40)+ 3.00000*ALGBRC(42)+CONSTS(29))/( CONSTS(51)*CONSTS(3))
      RATES(19) = (CONSTS(37) - STATES(19))/CONSTS(35)+((ALGBRC(29)+ALGBRC(39)+ALGBRC(41)) -  2.00000*ALGBRC(42))/( 2.00000*CONSTS(51)*CONSTS(3))
      RATES(21) =  200000.*STATES(20)*(1.00000 - STATES(21)) -  476.000*STATES(21)
      ALGBRC(43) = ( (STATES(7) - STATES(20))*2.00000*CONSTS(3)*CONSTS(50))/CONSTS(31)
      RATES(7) = - (ALGBRC(29)+ALGBRC(43))/( 2.00000*CONSTS(50)*CONSTS(3))
      RATES(22) =  78400.0*STATES(20)*(1.00000 - STATES(22)) -  392.000*STATES(22)
      RATES(23) =  200000.*STATES(20)*((1.00000 - STATES(23)) - STATES(24)) -  6.60000*STATES(23)
      ALGBRC(47) = ( CONSTS(39)*(STATES(20)/CONSTS(40) - ( CONSTS(42) ** 2.00000*STATES(26))/CONSTS(41)))/((STATES(20)+CONSTS(40))/CONSTS(40)+( CONSTS(42)*(STATES(26)+CONSTS(41)))/CONSTS(41))
      ALGBRC(48) = ( (STATES(26) - STATES(25))*2.00000*CONSTS(3)*CONSTS(45))/CONSTS(47)
      RATES(26) = (ALGBRC(47) - ALGBRC(48))/( 2.00000*CONSTS(44)*CONSTS(3))
      ALGBRC(49) =  CONSTS(43)*STATES(29)/(STATES(29)+0.250000) ** 2.00000*(STATES(25) - STATES(20))
      ALGBRC(44) = RATES(21)
      ALGBRC(45) = RATES(22)
      ALGBRC(46) = RATES(23)
      RATES(20) = - ((((- ALGBRC(43)+ALGBRC(39)+ALGBRC(41)) -  2.00000*ALGBRC(42))+ALGBRC(47)) - ALGBRC(49))/( 2.00000*CONSTS(30)*CONSTS(3)) - ( 0.0800000*ALGBRC(45)+ 0.160000*ALGBRC(46)+ 0.0450000*ALGBRC(44))
      RATES(27) =  480.000*STATES(25)*(1.00000 - STATES(27)) -  400.000*STATES(27)
      RATES(25) = (ALGBRC(48) - ALGBRC(49))/( 2.00000*CONSTS(45)*CONSTS(3)) -  31.0000*RATES(27)
      RETURN
      END
      SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(12) =  203.800*(STATES(20)/(STATES(20)+CONSTS(48)) ** 4.00000+STATES(7)/(STATES(7)+CONSTS(49)) ** 4.00000)
      ALGBRC(2) = 1.00000/(1.00000+EXP((STATES(1)+27.1200)/- 8.21000))
      ALGBRC(14) =  4.20000e-05*EXP(- (STATES(1)+25.5700)/28.8000 ** 2.00000)+2.40000e-05
      ALGBRC(3) = 1.00000/(1.00000+EXP((STATES(1)+63.6000)/5.30000))
      ALGBRC(15) = 0.0300000/(1.00000+EXP((STATES(1)+35.1000)/3.20000))+0.000300000
      ALGBRC(16) = 0.120000/(1.00000+EXP((STATES(1)+35.1000)/3.20000))+0.00300000
      ALGBRC(4) = 1.00000/(1.00000+EXP((STATES(1)+9.00000)/- 5.80000))
      ALGBRC(17) =  0.00270000*EXP(- (STATES(1)+35.0000)/30.0000 ** 2.00000)+0.00200000
      ALGBRC(5) = 1.00000/(1.00000+EXP((STATES(1)+27.4000)/7.10000))
      ALGBRC(18) =  0.161000*EXP(- (STATES(1)+40.0000)/14.4000 ** 2.00000)+0.0100000
      ALGBRC(19) =  1.33230*EXP(- (STATES(1)+40.0000)/14.2000 ** 2.00000)+0.0626000
      ALGBRC(20) =  0.00350000*EXP(- STATES(1)/30.0000 ** 2.00000)+0.00150000
      ALGBRC(6) = 1.00000/(1.00000+EXP((STATES(1) - 1.00000)/- 11.0000))
      ALGBRC(21) =  0.481200*EXP(- (STATES(1)+52.4500)/14.9700 ** 2.00000)+0.0141400
      ALGBRC(7) = 1.00000/(1.00000+EXP((STATES(1)+40.5000)/11.5000))
      ALGBRC(22) = 0.00900000/(1.00000+EXP((STATES(1)+5.00000)/12.0000))+0.000500000
      ALGBRC(8) = 1.00000/(1.00000+EXP((STATES(1)+4.30000)/- 8.00000))
      ALGBRC(23) = 0.0470000/(1.00000+EXP((STATES(1)+60.0000)/10.0000))+0.300000
      ALGBRC(9) = 0.400000/(1.00000+EXP((STATES(1)+20.0000)/10.0000))+0.600000
      ALGBRC(24) = 0.700000+ 0.400000*EXP(- (STATES(1) - 20.0000)/20.0000 ** 2.00000)
      ALGBRC(10) = 1.00000/(1.00000+EXP((STATES(1) - 19.9000)/- 12.7000))
      ALGBRC(25) = 0.0311800+ 0.217180*EXP(- (STATES(1)+20.1376)/22.1996 ** 2.00000)
      ALGBRC(11) = 1.00000/(1.00000+EXP((STATES(1)+15.0000)/- 6.00000))
      ALGBRC(26) = 33.9600+ 339.600*STATES(20)/(STATES(20)+CONSTS(48)) ** 4.00000
      ALGBRC(30) =  (( CONSTS(1)*CONSTS(2))/CONSTS(3))*log(STATES(11)/STATES(12))
      ALGBRC(31) =  CONSTS(14)*STATES(13)*STATES(14)*(STATES(1) - ALGBRC(30))
      ALGBRC(32) =  CONSTS(15)*STATES(15)*STATES(16)*(STATES(1) - ALGBRC(30))
      ALGBRC(36) = ( CONSTS(18)*STATES(11)/1.00000 ** 0.445700*(STATES(1) - ALGBRC(30)))/(1.00000+EXP(( 1.50000*((STATES(1) - ALGBRC(30))+3.60000)*CONSTS(3))/( CONSTS(1)*CONSTS(2))))
      ALGBRC(34) = 1.00000/(1.00000+EXP((STATES(1)+55.0000)/24.0000))
      ALGBRC(35) =  CONSTS(17)*STATES(18)*ALGBRC(34)*(STATES(1) - ALGBRC(30))
      ALGBRC(33) =  CONSTS(16)*STATES(17)*(STATES(1) - ALGBRC(30))
      ALGBRC(40) = ( (( (( CONSTS(23)*STATES(11))/(STATES(11)+CONSTS(21)))*STATES(3) ** 1.50000)/(STATES(3) ** 1.50000+CONSTS(22) ** 1.50000))*(STATES(1)+150.000))/(STATES(1)+200.000)
      ALGBRC(13) =  (( CONSTS(1)*CONSTS(2))/CONSTS(3))*log(STATES(2)/STATES(3))
      ALGBRC(27) = ( (( CONSTS(10)*STATES(4) ** 3.00000*( 0.900000*STATES(5)+ 0.100000*STATES(6))*STATES(2)*STATES(1)*CONSTS(3) ** 2.00000)/( CONSTS(1)*CONSTS(2)))*(EXP(( (STATES(1) - ALGBRC(13))*CONSTS(3))/( CONSTS(1)*CONSTS(2))) - 1.00000))/(EXP(( STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2))) - 1.00000)
      ALGBRC(28) = STATES(7)/(STATES(7)+CONSTS(13))
      ALGBRC(29) =  CONSTS(11)*STATES(8)*( ALGBRC(28)*STATES(9)+ (1.00000 - ALGBRC(28))*STATES(10))*(STATES(1) - CONSTS(12))
      ALGBRC(37) =  CONSTS(19)*(STATES(1) - ALGBRC(13))
      ALGBRC(38) =  (( CONSTS(1)*CONSTS(2))/( 2.00000*CONSTS(3)))*log(STATES(19)/STATES(20))
      ALGBRC(39) =  CONSTS(20)*(STATES(1) - ALGBRC(38))
      ALGBRC(41) = ( CONSTS(24)*STATES(20))/(STATES(20)+CONSTS(25))
      ALGBRC(42) = ( CONSTS(26)*( STATES(3) ** 3.00000*STATES(19)*EXP(( CONSTS(28)*CONSTS(3)*STATES(1))/( CONSTS(1)*CONSTS(2))) -  STATES(2) ** 3.00000*STATES(20)*EXP(( (CONSTS(28) - 1.00000)*STATES(1)*CONSTS(3))/( CONSTS(1)*CONSTS(2)))))/(1.00000+ CONSTS(27)*( STATES(2) ** 3.00000*STATES(20)+ STATES(3) ** 3.00000*STATES(19)))
      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(43) = ( (STATES(7) - STATES(20))*2.00000*CONSTS(3)*CONSTS(50))/CONSTS(31)
      ALGBRC(47) = ( CONSTS(39)*(STATES(20)/CONSTS(40) - ( CONSTS(42) ** 2.00000*STATES(26))/CONSTS(41)))/((STATES(20)+CONSTS(40))/CONSTS(40)+( CONSTS(42)*(STATES(26)+CONSTS(41)))/CONSTS(41))
      ALGBRC(48) = ( (STATES(26) - STATES(25))*2.00000*CONSTS(3)*CONSTS(45))/CONSTS(47)
      ALGBRC(49) =  CONSTS(43)*STATES(29)/(STATES(29)+0.250000) ** 2.00000*(STATES(25) - STATES(20))
      ALGBRC(44) = RATES(21)
      ALGBRC(45) = RATES(22)
      ALGBRC(46) = RATES(23)
      RETURN
      END
      REAL FUNCTION TERNRY(TEST, VALA, VALB)
      LOGICAL TEST
      REAL VALA, VALB
      IF (TEST) THEN
        TERNRY = VALA
      ELSE
        TERNRY = VALB
      ENDIF
      RETURN
      END