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 85 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 71 entries in the constant variable array.
C
C
C VOI is time in component environment (ms).
C STATES(1) is V in component membrane (mV).
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 (uF).
C ALGBRC(23) is i_Na in component sodium_current (uA).
C ALGBRC(25) is i_t in component Ca_independent_transient_outward_K_current (uA).
C ALGBRC(26) is i_ss in component steady_state_outward_K_current (uA).
C ALGBRC(27) is i_K1 in component inward_rectifier (uA).
C ALGBRC(30) is i_f in component hyperpolarisation_activated_current (uA).
C ALGBRC(31) is i_B_Na in component background_currents (uA).
C ALGBRC(32) is i_B_K in component background_currents (uA).
C ALGBRC(35) is i_NaK in component sodium_potassium_pump (uA).
C ALGBRC(76) is i_Ncx2 in component Na_Ca_Exchanger (uA).
C ALGBRC(79) is i_pCa2 in component SarcolemMal_Ca_pump (uA).
C ALGBRC(73) is i_LCC2 in component LCC_current (uA).
C ALGBRC(82) is i_CaB2 in component Background_Ca_current (uA).
C ALGBRC(21) is i_Stim in component membrane (uA).
C CONSTS(5) is stim_period in component membrane (ms).
C CONSTS(6) is stim_duration in component membrane (ms).
C CONSTS(7) is stim_amplitude in component membrane (uA).
C ALGBRC(1) is FVRT in component membrane (dimensionless).
C ALGBRC(20) is FVRT_Ca in component membrane (dimensionless).
C CONSTS(8) is Vmyo in component cell_geometry (um3).
C CONSTS(9) is Vmyo_uL in component cell_geometry (uL).
C CONSTS(10) is VSR_uL in component cell_geometry (uL).
C ALGBRC(22) is E_Na in component sodium_current (mV).
C CONSTS(11) is g_Na in component sodium_current (mSi).
C STATES(2) is Na_i in component intracellular_ion_concentrations (mM).
C CONSTS(12) is Na_o in component extracellular_ion_concentrations (mM).
C STATES(3) is m in component sodium_current_m_gate (dimensionless).
C STATES(4) is h in component sodium_current_h_gate (dimensionless).
C STATES(5) is j in component sodium_current_j_gate (dimensionless).
C ALGBRC(2) is m_infinity in component sodium_current_m_gate (dimensionless).
C ALGBRC(12) is tau_m in component sodium_current_m_gate (ms).
C ALGBRC(3) is h_infinity in component sodium_current_h_gate (dimensionless).
C ALGBRC(13) is tau_h in component sodium_current_h_gate (ms).
C ALGBRC(4) is j_infinity in component sodium_current_j_gate (dimensionless).
C ALGBRC(14) is tau_j in component sodium_current_j_gate (ms).
C ALGBRC(24) is E_K in component Ca_independent_transient_outward_K_current (mV).
C CONSTS(13) is g_t in component Ca_independent_transient_outward_K_current (mSi).
C CONSTS(14) is a in component Ca_independent_transient_outward_K_current (dimensionless).
C CONSTS(15) is b in component Ca_independent_transient_outward_K_current (dimensionless).
C CONSTS(16) is K_o in component extracellular_ion_concentrations (mM).
C STATES(6) is K_i in component intracellular_ion_concentrations (mM).
C STATES(7) is r in component Ca_independent_transient_outward_K_current_r_gate (dimensionless).
C STATES(8) is s in component Ca_independent_transient_outward_K_current_s_gate (dimensionless).
C STATES(9) is s_slow in component Ca_independent_transient_outward_K_current_s_slow_gate (dimensionless).
C ALGBRC(15) is tau_r in component Ca_independent_transient_outward_K_current_r_gate (ms).
C ALGBRC(5) is r_infinity in component Ca_independent_transient_outward_K_current_r_gate (dimensionless).
C ALGBRC(16) is tau_s in component Ca_independent_transient_outward_K_current_s_gate (ms).
C ALGBRC(6) is s_infinity in component Ca_independent_transient_outward_K_current_s_gate (dimensionless).
C ALGBRC(17) is tau_s_slow in component Ca_independent_transient_outward_K_current_s_slow_gate (ms).
C ALGBRC(7) is s_slow_infinity in component Ca_independent_transient_outward_K_current_s_slow_gate (dimensionless).
C CONSTS(17) is g_ss in component steady_state_outward_K_current (mSi).
C STATES(10) is r_ss in component steady_state_outward_K_current_r_ss_gate (dimensionless).
C STATES(11) is s_ss in component steady_state_outward_K_current_s_ss_gate (dimensionless).
C ALGBRC(18) is tau_r_ss in component steady_state_outward_K_current_r_ss_gate (ms).
C ALGBRC(8) is r_ss_infinity in component steady_state_outward_K_current_r_ss_gate (dimensionless).
C CONSTS(68) is tau_s_ss in component steady_state_outward_K_current_s_ss_gate (ms).
C ALGBRC(9) is s_ss_infinity in component steady_state_outward_K_current_s_ss_gate (dimensionless).
C CONSTS(18) is g_K1 in component inward_rectifier (mSi).
C ALGBRC(28) is i_f_Na in component hyperpolarisation_activated_current (uA).
C ALGBRC(29) is i_f_K in component hyperpolarisation_activated_current (uA).
C CONSTS(19) is g_f in component hyperpolarisation_activated_current (mSi).
C CONSTS(20) is f_Na in component hyperpolarisation_activated_current (dimensionless).
C CONSTS(69) is f_K in component hyperpolarisation_activated_current (dimensionless).
C STATES(12) is y in component hyperpolarisation_activated_current_y_gate (dimensionless).
C ALGBRC(19) is tau_y in component hyperpolarisation_activated_current_y_gate (ms).
C ALGBRC(10) is y_infinity in component hyperpolarisation_activated_current_y_gate (dimensionless).
C ALGBRC(33) is i_B in component background_currents (uA).
C CONSTS(21) is g_B_Na in component background_currents (mSi).
C CONSTS(22) is g_B_K in component background_currents (mSi).
C CONSTS(23) is i_NaK_max in component sodium_potassium_pump (uA).
C ALGBRC(34) is nu_1 in component sodium_potassium_pump (dimensionless).
C CONSTS(24) is gamma1 in component sodium_potassium_pump (dimensionless).
C CONSTS(25) is KdNaio in component sodium_potassium_pump (mM).
C CONSTS(26) is KdNais in component sodium_potassium_pump (mM).
C CONSTS(27) is KdNaes in component sodium_potassium_pump (mM).
C CONSTS(28) is Delta in component sodium_potassium_pump (dimensionless).
C CONSTS(29) is alpha in component sodium_potassium_pump (mM).
C CONSTS(30) is Ca_o in component extracellular_ion_concentrations (mM).
C CONSTS(31) is g_D in component CaRU (um3_per_ms).
C CONSTS(32) is J_R in component CaRU (um3_per_ms).
C CONSTS(33) is J_L in component CaRU (um3_per_ms).
C CONSTS(34) is N in component CaRU (dimensionless).
C STATES(13) is Ca_i in component intracellular_ion_concentrations (mM).
C STATES(14) is Ca_SR in component intracellular_ion_concentrations (mM).
C ALGBRC(65) is i_RyR2 in component RyR_current (mM_per_ms).
C ALGBRC(45) is C_oc in component DS_Calcium_Concentrations (mM).
C ALGBRC(43) is C_co in component DS_Calcium_Concentrations (mM).
C CONSTS(35) is V_L in component CaRU_Transitions (mV).
C CONSTS(36) is del_VL in component CaRU_Transitions (mV).
C CONSTS(37) is phi_L in component CaRU_Transitions (dimensionless).
C CONSTS(38) is t_L in component CaRU_Transitions (ms).
C CONSTS(39) is tau_L in component CaRU_Transitions (ms).
C CONSTS(40) is t_R in component CaRU_Transitions (ms).
C CONSTS(41) is tau_R in component CaRU_Transitions (ms).
C CONSTS(42) is phi_R in component CaRU_Transitions (dimensionless).
C CONSTS(43) is theta_R in component CaRU_Transitions (dimensionless).
C CONSTS(44) is K_RyR in component CaRU_Transitions (mM).
C CONSTS(45) is K_L in component CaRU_Transitions (mM).
C CONSTS(46) is a1 in component CaRU_Transitions (dimensionless).
C CONSTS(47) is b1 in component CaRU_Transitions (dimensionless).
C CONSTS(48) is c in component CaRU_Transitions (dimensionless).
C CONSTS(49) is d in component CaRU_Transitions (dimensionless).
C ALGBRC(36) is expVL in component CaRU_Transitions (dimensionless).
C ALGBRC(37) is alpha_p in component CaRU_Transitions (per_ms).
C CONSTS(70) is alpha_m in component CaRU_Transitions (per_ms).
C ALGBRC(46) is beta_poc in component CaRU_Transitions (per_ms).
C ALGBRC(38) is beta_pcc in component CaRU_Transitions (per_ms).
C CONSTS(71) is beta_m in component CaRU_Transitions (per_ms).
C ALGBRC(44) is epsilon_pco in component CaRU_Transitions (per_ms).
C ALGBRC(39) is epsilon_pcc in component CaRU_Transitions (per_ms).
C ALGBRC(40) is epsilon_m in component CaRU_Transitions (per_ms).
C ALGBRC(47) is mu_poc in component CaRU_Transitions (per_ms).
C ALGBRC(41) is mu_pcc in component CaRU_Transitions (per_ms).
C ALGBRC(48) is mu_moc in component CaRU_Transitions (per_ms).
C ALGBRC(42) is mu_mcc in component CaRU_Transitions (per_ms).
C ALGBRC(11) is C_cc in component DS_Calcium_Concentrations (mM).
C ALGBRC(52) is J_Loo in component LCC_and_RyR_fluxes (um3_mM_per_ms).
C ALGBRC(51) is J_Loc in component LCC_and_RyR_fluxes (um3_mM_per_ms).
C ALGBRC(49) is J_Rco in component LCC_and_RyR_fluxes (um3_mM_per_ms).
C ALGBRC(50) is J_Roo in component LCC_and_RyR_fluxes (um3_mM_per_ms).
C ALGBRC(53) is denom in component CaRU_states (per_ms3).
C ALGBRC(54) is P1 in component CaRU_states (dimensionless).
C ALGBRC(55) is P2 in component CaRU_states (dimensionless).
C ALGBRC(56) is P3 in component CaRU_states (dimensionless).
C ALGBRC(57) is P4 in component CaRU_states (dimensionless).
C ALGBRC(58) is r_1 in component CaRU_reduced_states (per_ms).
C ALGBRC(60) is r_2 in component CaRU_reduced_states (per_ms).
C ALGBRC(62) is r_3 in component CaRU_reduced_states (per_ms).
C ALGBRC(64) is r_4 in component CaRU_reduced_states (per_ms).
C ALGBRC(66) is r_5 in component CaRU_reduced_states (per_ms).
C ALGBRC(68) is r_6 in component CaRU_reduced_states (per_ms).
C ALGBRC(70) is r_7 in component CaRU_reduced_states (per_ms).
C ALGBRC(72) is r_8 in component CaRU_reduced_states (per_ms).
C STATES(15) is z_1 in component CaRU_reduced_states (dimensionless).
C STATES(16) is z_2 in component CaRU_reduced_states (dimensionless).
C STATES(17) is z_3 in component CaRU_reduced_states (dimensionless).
C ALGBRC(74) is z_4 in component CaRU_reduced_states (dimensionless).
C ALGBRC(59) is J_R1 in component RyR_current (um3_mM_per_ms).
C ALGBRC(61) is J_R3 in component RyR_current (um3_mM_per_ms).
C ALGBRC(63) is i_RyR1 in component RyR_current (mM_per_ms).
C ALGBRC(67) is J_L1 in component LCC_current (um3_mM_per_ms).
C ALGBRC(69) is J_L2 in component LCC_current (um3_mM_per_ms).
C ALGBRC(71) is i_LCC1 in component LCC_current (mM_per_ms).
C CONSTS(50) is K_mNa in component Na_Ca_Exchanger (mM).
C CONSTS(51) is K_mCa in component Na_Ca_Exchanger (mM).
C CONSTS(52) is eta in component Na_Ca_Exchanger (dimensionless).
C CONSTS(53) is k_sat in component Na_Ca_Exchanger (dimensionless).
C CONSTS(54) is g_NCX in component Na_Ca_Exchanger (mM_per_ms).
C ALGBRC(75) is i_Ncx1 in component Na_Ca_Exchanger (mM_per_ms).
C CONSTS(55) is g_SERCA in component SERCA (mM_per_ms).
C CONSTS(56) is K_SERCA in component SERCA (mM).
C ALGBRC(77) is i_SERCA in component SERCA (mM_per_ms).
C CONSTS(57) is g_pCa in component SarcolemMal_Ca_pump (mM_per_ms).
C CONSTS(58) is K_mpCa in component SarcolemMal_Ca_pump (mM).
C ALGBRC(78) is i_pCa1 in component SarcolemMal_Ca_pump (mM_per_ms).
C ALGBRC(80) is E_Ca in component Background_Ca_current (mV).
C CONSTS(59) is g_CaB in component Background_Ca_current (mM_per_mV_ms).
C ALGBRC(81) is i_CaB1 in component Background_Ca_current (mM_per_ms).
C CONSTS(60) is g_SRl in component SR_Ca_leak_current (per_ms).
C ALGBRC(83) is i_SR in component SR_Ca_leak_current (mM_per_ms).
C CONSTS(61) is k_m_TRPN in component troponin_Ca_buffer (per_ms).
C CONSTS(62) is k_p_TRPN in component troponin_Ca_buffer (per_mM_ms).
C CONSTS(63) is B_TRPN in component troponin_Ca_buffer (mM).
C STATES(18) is TRPN in component intracellular_ion_concentrations (mM).
C ALGBRC(84) is i_TRPN in component troponin_Ca_buffer (mM_per_ms).
C CONSTS(64) is k_CMDN in component calmodulin_Ca_buffer (mM).
C CONSTS(65) is B_CMDN in component calmodulin_Ca_buffer (mM).
C ALGBRC(85) is beta_CMDN in component calmodulin_Ca_buffer (dimensionless).
C CONSTS(66) is EGTA_tot in component calmodulin_Ca_buffer (mM).
C CONSTS(67) is KmEGTA in component calmodulin_Ca_buffer (mM).
C RATES(1) is d/dt V in component membrane (mV).
C RATES(3) is d/dt m in component sodium_current_m_gate (dimensionless).
C RATES(4) is d/dt h in component sodium_current_h_gate (dimensionless).
C RATES(5) is d/dt j in component sodium_current_j_gate (dimensionless).
C RATES(7) is d/dt r in component Ca_independent_transient_outward_K_current_r_gate (dimensionless).
C RATES(8) is d/dt s in component Ca_independent_transient_outward_K_current_s_gate (dimensionless).
C RATES(9) is d/dt s_slow in component Ca_independent_transient_outward_K_current_s_slow_gate (dimensionless).
C RATES(10) is d/dt r_ss in component steady_state_outward_K_current_r_ss_gate (dimensionless).
C RATES(11) is d/dt s_ss in component steady_state_outward_K_current_s_ss_gate (dimensionless).
C RATES(12) is d/dt y in component hyperpolarisation_activated_current_y_gate (dimensionless).
C RATES(15) is d/dt z_1 in component CaRU_reduced_states (dimensionless).
C RATES(16) is d/dt z_2 in component CaRU_reduced_states (dimensionless).
C RATES(17) is d/dt z_3 in component CaRU_reduced_states (dimensionless).
C RATES(2) is d/dt Na_i in component intracellular_ion_concentrations (mM).
C RATES(6) is d/dt K_i in component intracellular_ion_concentrations (mM).
C RATES(18) is d/dt TRPN in component intracellular_ion_concentrations (mM).
C RATES(13) is d/dt Ca_i in component intracellular_ion_concentrations (mM).
C RATES(14) is d/dt Ca_SR in component intracellular_ion_concentrations (mM).
C
      SUBROUTINE initConsts(CONSTS, RATES, STATES)
      REAL CONSTS(*), RATES(*), STATES(*)
      STATES(1) = -86.2742001770196
      CONSTS(1) = 8314
      CONSTS(2) = 310
      CONSTS(3) = 96487
      CONSTS(4) = 0.0001
      CONSTS(5) = 170
      CONSTS(6) = 3
      CONSTS(7) = -0.0012
      CONSTS(8) = 25850
      CONSTS(9) = 2.585e-5
      CONSTS(10) = 2.098e-6
      CONSTS(11) = 0.0007
      STATES(2) = 10.83563050735
      CONSTS(12) = 140
      STATES(3) = 0.00174392847776228
      STATES(4) = 0.831855538514125
      STATES(5) = 0.585528587217805
      CONSTS(13) = 1.4e-5
      CONSTS(14) = 0.883
      CONSTS(15) = 0.117
      CONSTS(16) = 5.4
      STATES(6) = 140.1638657529
      STATES(7) = 0.00132309740749641
      STATES(8) = 0.913059928712858
      STATES(9) = 0.215036691884835
      CONSTS(17) = 1e-6
      STATES(10) = 0.00178817500396492
      STATES(11) = 0.209855226174927
      CONSTS(18) = 1.5e-5
      CONSTS(19) = 1.45e-6
      CONSTS(20) = 0.2
      STATES(12) = 0.0025539544569868
      CONSTS(21) = 8.015e-8
      CONSTS(22) = 1.38e-7
      CONSTS(23) = 0.00138
      CONSTS(24) = 3.6
      CONSTS(25) = 19
      CONSTS(26) = 22
      CONSTS(27) = 880
      CONSTS(28) = 0.3
      CONSTS(29) = 1.8
      CONSTS(30) = 1.8
      CONSTS(31) = 0.1
      CONSTS(32) = 0.02
      CONSTS(33) = 0.0012
      CONSTS(34) = 50000
      STATES(13) = 0.000145080891755077
      STATES(14) = 1.78499523287115
      CONSTS(35) = -13
      CONSTS(36) = 7
      CONSTS(37) = 11.5
      CONSTS(38) = 1
      CONSTS(39) = 1550
      CONSTS(40) = 1.17
      CONSTS(41) = 2.4
      CONSTS(42) = 0.05
      CONSTS(43) = 0.012
      CONSTS(44) = 0.065
      CONSTS(45) = 0.00016
      CONSTS(46) = 0.0625
      CONSTS(47) = 14
      CONSTS(48) = 0.01
      CONSTS(49) = 100
      STATES(15) = 0.650490049579104
      STATES(16) = 0.00570189155987283
      STATES(17) = 0.340821224038804
      CONSTS(50) = 87.5
      CONSTS(51) = 1.38
      CONSTS(52) = 0.35
      CONSTS(53) = 0.1
      CONSTS(54) = 0.0456
      CONSTS(55) = 0.00049
      CONSTS(56) = 0.00025
      CONSTS(57) = 5e-6
      CONSTS(58) = 0.00035
      CONSTS(59) = 6e-9
      CONSTS(60) = 1e-6
      CONSTS(61) = 0.04
      CONSTS(62) = 40
      CONSTS(63) = 0.07
      STATES(18) = 0.0590608556435992
      CONSTS(64) = 0.002382
      CONSTS(65) = 0.05
      CONSTS(66) = 0
      CONSTS(67) = 0.00015
      CONSTS(68) = 2100.00
      CONSTS(69) = 1.00000 - CONSTS(20)
      CONSTS(70) = CONSTS(37)/CONSTS(38)
      CONSTS(71) = CONSTS(42)/CONSTS(40)
      RETURN
      END
      SUBROUTINE computeRates(VOI, CONSTS,  RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(9) = 1.00000/(1.00000+EXP((STATES(1)+87.5000)/10.3000))
      RATES(11) = (ALGBRC(9) - STATES(11))/CONSTS(68)
      ALGBRC(2) = 1.00000/(1.00000+EXP((STATES(1)+45.0000)/- 6.50000))
      ALGBRC(12) = 1.36000/(( 0.320000*(STATES(1)+47.1300))/(1.00000 - EXP( - 0.100000*(STATES(1)+47.1300)))+ 0.0800000*EXP(- STATES(1)/11.0000))
      RATES(3) = (ALGBRC(2) - STATES(3))/ALGBRC(12)
      ALGBRC(3) = 1.00000/(1.00000+EXP((STATES(1)+76.1000)/6.07000))
      ALGBRC(13) = TERNRY(STATES(1).GE.- 40.0000,  0.453700*(1.00000+EXP(- (STATES(1)+10.6600)/11.1000)), 3.49000/( 0.135000*EXP(- (STATES(1)+80.0000)/6.80000)+ 3.56000*EXP( 0.0790000*STATES(1))+ 310000.*EXP( 0.350000*STATES(1))))
      RATES(4) = (ALGBRC(3) - STATES(4))/ALGBRC(13)
      ALGBRC(4) = 1.00000/(1.00000+EXP((STATES(1)+76.1000)/6.07000))
      ALGBRC(14) = TERNRY(STATES(1).GE.- 40.0000, ( 11.6300*(1.00000+EXP( - 0.100000*(STATES(1)+32.0000))))/EXP( - 2.53500e-07*STATES(1)), 3.49000/( ((STATES(1)+37.7800)/(1.00000+EXP( 0.311000*(STATES(1)+79.2300))))*( - 127140.*EXP( 0.244400*STATES(1)) -  3.47400e-05*EXP( - 0.0439100*STATES(1)))+( 0.121200*EXP( - 0.0105200*STATES(1)))/(1.00000+EXP( - 0.137800*(STATES(1)+40.1400)))))
      RATES(5) = (ALGBRC(4) - STATES(5))/ALGBRC(14)
      ALGBRC(15) = 100.000/( 45.1600*EXP( 0.0357700*(STATES(1)+50.0000))+ 98.9000*EXP( - 0.100000*(STATES(1)+38.0000)))
      ALGBRC(5) = 1.00000/(1.00000+EXP((STATES(1)+10.6000)/- 11.4200))
      RATES(7) = (ALGBRC(5) - STATES(7))/ALGBRC(15)
      ALGBRC(16) =  20.0000*EXP(- (STATES(1)+70.0000)/25.0000 ** 2.00000)+35.0000
      ALGBRC(6) = 1.00000/(1.00000+EXP((STATES(1)+45.3000)/6.88410))
      RATES(8) = (ALGBRC(6) - STATES(8))/ALGBRC(16)
      ALGBRC(17) =  1300.00*EXP(- (STATES(1)+70.0000)/30.0000 ** 2.00000)+35.0000
      ALGBRC(7) = 1.00000/(1.00000+EXP((STATES(1)+45.3000)/6.88410))
      RATES(9) = (ALGBRC(7) - STATES(9))/ALGBRC(17)
      ALGBRC(18) = 10000.0/( 45.1600*EXP( 0.0357700*(STATES(1)+50.0000))+ 98.9000*EXP( - 0.100000*(STATES(1)+38.0000)))
      ALGBRC(8) = 1.00000/(1.00000+EXP((STATES(1)+11.5000)/- 11.8200))
      RATES(10) = (ALGBRC(8) - STATES(10))/ALGBRC(18)
      ALGBRC(19) = 1000.00/( 0.118850*EXP((STATES(1)+80.0000)/28.3700)+ 0.562300*EXP((STATES(1)+80.0000)/- 14.1900))
      ALGBRC(10) = 1.00000/(1.00000+EXP((STATES(1)+138.600)/10.4800))
      RATES(12) = (ALGBRC(10) - STATES(12))/ALGBRC(19)
      ALGBRC(24) =  (( CONSTS(1)*CONSTS(2))/CONSTS(3))*log(CONSTS(16)/STATES(6))
      ALGBRC(25) =  CONSTS(13)*STATES(7)*( CONSTS(14)*STATES(8)+ CONSTS(15)*STATES(9))*(STATES(1) - ALGBRC(24))
      ALGBRC(26) =  CONSTS(17)*STATES(10)*STATES(11)*(STATES(1) - ALGBRC(24))
      ALGBRC(27) = ( (0.0480000/(EXP((STATES(1)+37.0000)/25.0000)+EXP((STATES(1)+37.0000)/- 25.0000))+0.0100000)*0.00100000)/(1.00000+EXP((STATES(1) - (ALGBRC(24)+76.7700))/- 17.0000))+( CONSTS(18)*(STATES(1) - (ALGBRC(24)+1.73000)))/( (1.00000+EXP(( 1.61300*CONSTS(3)*(STATES(1) - (ALGBRC(24)+1.73000)))/( CONSTS(1)*CONSTS(2))))*(1.00000+EXP((CONSTS(16) - 0.998800)/- 0.124000)))
      ALGBRC(32) =  CONSTS(22)*(STATES(1) - ALGBRC(24))
      ALGBRC(34) =  CONSTS(24)*1.00000+CONSTS(25)/STATES(2) ** 2.00000*(1.00000+ (CONSTS(26)/STATES(2))*EXP((( - CONSTS(28)*CONSTS(3)*STATES(1))/CONSTS(1))/CONSTS(2)))+ 1.00000+CONSTS(29)/CONSTS(16) ** 2.00000*(1.00000+ (CONSTS(12)/CONSTS(27))*EXP((( - (1.00000 - CONSTS(28))*CONSTS(3)*STATES(1))/CONSTS(1))/CONSTS(2)))
      ALGBRC(35) = ( CONSTS(23)*(CONSTS(24)+1.00000))/ALGBRC(34)
      ALGBRC(21) = TERNRY(VOI -  INT(VOI/CONSTS(5))*CONSTS(5).GE.0.00000.AND.VOI -  INT(VOI/CONSTS(5))*CONSTS(5).LE.CONSTS(6), CONSTS(7), 0.00000)
      ALGBRC(29) =  CONSTS(19)*STATES(12)*CONSTS(69)*(STATES(1) - ALGBRC(24))
      RATES(6) = ( - (ALGBRC(21)+ALGBRC(26)+ALGBRC(32)+ALGBRC(25)+ALGBRC(27)+ALGBRC(29)+ - 2.00000*ALGBRC(35))*1.00000)/( CONSTS(9)*CONSTS(3))
      ALGBRC(1) = ( CONSTS(3)*STATES(1))/( CONSTS(1)*CONSTS(2))
      ALGBRC(20) =  2.00000*ALGBRC(1)
      ALGBRC(45) = TERNRY(ABS(ALGBRC(20)).GT.1.00000e-09, (STATES(13)+( (CONSTS(33)/CONSTS(31))*CONSTS(30)*ALGBRC(20)*EXP(- ALGBRC(20)))/(1.00000 - EXP(- ALGBRC(20))))/(1.00000+( (CONSTS(33)/CONSTS(31))*ALGBRC(20))/(1.00000 - EXP(- ALGBRC(20)))), (STATES(13)+ (CONSTS(33)/CONSTS(31))*CONSTS(30))/(1.00000+CONSTS(33)/CONSTS(31)))
      ALGBRC(47) = (ALGBRC(45) ** 2.00000+ CONSTS(48)*CONSTS(44) ** 2.00000)/( CONSTS(41)*(ALGBRC(45) ** 2.00000+CONSTS(44) ** 2.00000))
      ALGBRC(41) = (STATES(13) ** 2.00000+ CONSTS(48)*CONSTS(44) ** 2.00000)/( CONSTS(41)*(STATES(13) ** 2.00000+CONSTS(44) ** 2.00000))
      ALGBRC(36) = EXP((STATES(1) - CONSTS(35))/CONSTS(36))
      ALGBRC(37) = ALGBRC(36)/( CONSTS(38)*(ALGBRC(36)+1.00000))
      ALGBRC(38) = STATES(13) ** 2.00000/( CONSTS(40)*(STATES(13) ** 2.00000+CONSTS(44) ** 2.00000))
      ALGBRC(46) = ALGBRC(45) ** 2.00000/( CONSTS(40)*(ALGBRC(45) ** 2.00000+CONSTS(44) ** 2.00000))
      ALGBRC(53) =  (ALGBRC(37)+CONSTS(70))*( (CONSTS(70)+CONSTS(71)+ALGBRC(46))*(CONSTS(71)+ALGBRC(38))+ ALGBRC(37)*(CONSTS(71)+ALGBRC(46)))
      ALGBRC(54) = ( ALGBRC(37)*CONSTS(71)*(ALGBRC(37)+CONSTS(70)+CONSTS(71)+ALGBRC(38)))/ALGBRC(53)
      ALGBRC(57) = ( CONSTS(70)*CONSTS(71)*(CONSTS(70)+ALGBRC(37)+CONSTS(71)+ALGBRC(46)))/ALGBRC(53)
      ALGBRC(58) =  ALGBRC(54)*ALGBRC(47)+ ALGBRC(57)*ALGBRC(41)
      ALGBRC(48) = ( CONSTS(43)*CONSTS(49)*(ALGBRC(45) ** 2.00000+ CONSTS(48)*CONSTS(44) ** 2.00000))/( CONSTS(41)*( CONSTS(49)*ALGBRC(45) ** 2.00000+ CONSTS(48)*CONSTS(44) ** 2.00000))
      ALGBRC(42) = ( CONSTS(43)*CONSTS(49)*(STATES(13) ** 2.00000+ CONSTS(48)*CONSTS(44) ** 2.00000))/( CONSTS(41)*( CONSTS(49)*STATES(13) ** 2.00000+ CONSTS(48)*CONSTS(44) ** 2.00000))
      ALGBRC(60) = ( ALGBRC(37)*ALGBRC(48)+ CONSTS(70)*ALGBRC(42))/(ALGBRC(37)+CONSTS(70))
      ALGBRC(43) = (STATES(13)+ (CONSTS(32)/CONSTS(31))*STATES(14))/(1.00000+CONSTS(32)/CONSTS(31))
      ALGBRC(44) = ( ALGBRC(43)*(ALGBRC(36)+CONSTS(46)))/( CONSTS(39)*CONSTS(45)*(ALGBRC(36)+1.00000))
      ALGBRC(39) = ( STATES(13)*(ALGBRC(36)+CONSTS(46)))/( CONSTS(39)*CONSTS(45)*(ALGBRC(36)+1.00000))
      ALGBRC(55) = ( CONSTS(70)*( ALGBRC(38)*(CONSTS(70)+CONSTS(71)+ALGBRC(46))+ ALGBRC(46)*ALGBRC(37)))/ALGBRC(53)
      ALGBRC(66) =  ALGBRC(55)*ALGBRC(44)+ ALGBRC(57)*ALGBRC(39)
      ALGBRC(40) = ( CONSTS(47)*(ALGBRC(36)+CONSTS(46)))/( CONSTS(39)*( CONSTS(47)*ALGBRC(36)+CONSTS(46)))
      ALGBRC(68) = ALGBRC(40)
      RATES(15) =  - (ALGBRC(58)+ALGBRC(66))*STATES(15)+ ALGBRC(60)*STATES(16)+ ALGBRC(68)*STATES(17)
      ALGBRC(70) = ( CONSTS(70)*ALGBRC(39))/(ALGBRC(37)+CONSTS(70))
      ALGBRC(72) = ALGBRC(40)
      ALGBRC(74) = ((1.00000 - STATES(15)) - STATES(16)) - STATES(17)
      RATES(16) = ( ALGBRC(58)*STATES(15) -  (ALGBRC(60)+ALGBRC(70))*STATES(16))+ ALGBRC(72)*ALGBRC(74)
      ALGBRC(62) = ( CONSTS(71)*ALGBRC(41))/(CONSTS(71)+ALGBRC(38))
      ALGBRC(64) = ALGBRC(42)
      RATES(17) = ( ALGBRC(66)*STATES(15) -  (ALGBRC(68)+ALGBRC(62))*STATES(17))+ ALGBRC(64)*ALGBRC(74)
      ALGBRC(22) =  (( CONSTS(1)*CONSTS(2))/CONSTS(3))*log(CONSTS(12)/STATES(2))
      ALGBRC(23) =  CONSTS(11)*STATES(3) ** 3.00000*STATES(4)*STATES(5)*(STATES(1) - ALGBRC(22))
      ALGBRC(31) =  CONSTS(21)*(STATES(1) - ALGBRC(22))
      ALGBRC(75) = ( CONSTS(54)*( EXP( CONSTS(52)*ALGBRC(1))*STATES(2) ** 3.00000*CONSTS(30) -  EXP( (CONSTS(52) - 1.00000)*ALGBRC(1))*CONSTS(12) ** 3.00000*STATES(13)))/( (CONSTS(12) ** 3.00000+CONSTS(50) ** 3.00000)*(CONSTS(30)+CONSTS(51))*(1.00000+ CONSTS(53)*EXP( (CONSTS(52) - 1.00000)*ALGBRC(1))))
      ALGBRC(76) =  ALGBRC(75)*CONSTS(3)*CONSTS(9)
      ALGBRC(28) =  CONSTS(19)*STATES(12)*CONSTS(20)*(STATES(1) - ALGBRC(22))
      RATES(2) = ( - (ALGBRC(23)+ALGBRC(31)+ ALGBRC(76)*3.00000+ ALGBRC(35)*3.00000+ALGBRC(28))*1.00000)/( CONSTS(9)*CONSTS(3))
      ALGBRC(30) = ALGBRC(28)+ALGBRC(29)
      ALGBRC(78) = ( CONSTS(57)*STATES(13))/(CONSTS(58)+STATES(13))
      ALGBRC(79) =  ALGBRC(78)*2.00000*CONSTS(3)*CONSTS(9)
      ALGBRC(52) = TERNRY(ABS(ALGBRC(20)).GT.1.00000e-05, ( (( CONSTS(33)*ALGBRC(20))/(1.00000 - EXP(- ALGBRC(20))))*(( CONSTS(30)*EXP(- ALGBRC(20)) - STATES(13))+ (CONSTS(32)/CONSTS(31))*( CONSTS(30)*EXP(- ALGBRC(20)) - STATES(14))))/(1.00000+CONSTS(32)/CONSTS(31)+( (CONSTS(33)/CONSTS(31))*ALGBRC(20))/(1.00000 - EXP(ALGBRC(20)))), ( (( CONSTS(33)*1.00000e-05)/(1.00000 - EXP(- 1.00000e-05)))*(( CONSTS(30)*EXP(- 1.00000e-05) - STATES(13))+ (CONSTS(32)/CONSTS(31))*( CONSTS(30)*EXP(- 1.00000e-05) - STATES(14))))/(1.00000+CONSTS(32)/CONSTS(31)+( (CONSTS(33)/CONSTS(31))*1.00000e-05)/(1.00000 - EXP(- 1.00000e-05))))
      ALGBRC(51) = TERNRY(ABS(ALGBRC(20)).GT.1.00000e-05, ( (( CONSTS(33)*ALGBRC(20))/(1.00000 - EXP(- ALGBRC(20))))*( CONSTS(30)*EXP(- ALGBRC(20)) - STATES(13)))/(1.00000+( (CONSTS(33)/CONSTS(31))*ALGBRC(20))/(1.00000 - EXP(- ALGBRC(20)))), ( (( CONSTS(33)*1.00000e-05)/(1.00000 - EXP(- 1.00000e-05)))*( CONSTS(30)*EXP(- 1.00000e-05) - STATES(13)))/(1.00000+( (CONSTS(33)/CONSTS(31))*1.00000e-05)/(1.00000 - EXP(- 1.00000e-05))))
      ALGBRC(56) = ( ALGBRC(37)*( ALGBRC(46)*(ALGBRC(37)+CONSTS(71)+ALGBRC(38))+ ALGBRC(38)*CONSTS(70)))/ALGBRC(53)
      ALGBRC(67) =  ALGBRC(52)*ALGBRC(56)+ ALGBRC(51)*ALGBRC(54)
      ALGBRC(69) = ( ALGBRC(51)*ALGBRC(37))/(ALGBRC(37)+CONSTS(70))
      ALGBRC(71) = ( ( STATES(15)*ALGBRC(67)+ STATES(16)*ALGBRC(69))*CONSTS(34))/CONSTS(8)
      ALGBRC(73) =  - ALGBRC(71)*2.00000*CONSTS(3)*CONSTS(9)
      ALGBRC(80) =  (( CONSTS(1)*CONSTS(2))/( 2.00000*CONSTS(3)))*log(CONSTS(30)/STATES(13))
      ALGBRC(81) =  CONSTS(59)*(ALGBRC(80) - STATES(1))
      ALGBRC(82) =  - ALGBRC(81)*2.00000*CONSTS(3)*CONSTS(9)
      RATES(1) = - (ALGBRC(23)+ALGBRC(25)+ALGBRC(26)+ALGBRC(30)+ALGBRC(27)+ALGBRC(31)+ALGBRC(32)+ALGBRC(35)+ALGBRC(82)+ALGBRC(76)+ALGBRC(79)+ALGBRC(73)+ALGBRC(21))/CONSTS(4)
      ALGBRC(49) = ( CONSTS(32)*(STATES(14) - STATES(13)))/(1.00000+CONSTS(32)/CONSTS(31))
      ALGBRC(50) = TERNRY(ABS(ALGBRC(20)).GT.1.00000e-05, ( CONSTS(32)*((STATES(14) - STATES(13))+ (( (CONSTS(33)/CONSTS(31))*ALGBRC(20))/(1.00000 - EXP(- ALGBRC(20))))*(STATES(14) -  CONSTS(30)*EXP(- ALGBRC(20)))))/(1.00000+CONSTS(32)/CONSTS(31)+( (CONSTS(33)/CONSTS(31))*ALGBRC(20))/(1.00000 - EXP(- ALGBRC(20)))), ( CONSTS(32)*((STATES(14) - STATES(13))+ (( (CONSTS(33)/CONSTS(31))*1.00000e-05)/(1.00000 - EXP(- 1.00000e-05)))*(STATES(14) -  CONSTS(30)*EXP(- 1.00000e-05))))/(1.00000+CONSTS(32)/CONSTS(31)+( (CONSTS(33)/CONSTS(31))*1.00000e-05)/(1.00000 - EXP(- 1.00000e-05))))
      ALGBRC(59) =  ALGBRC(56)*ALGBRC(50)+ ALGBRC(49)*ALGBRC(55)
      ALGBRC(61) = ( ALGBRC(49)*ALGBRC(38))/(CONSTS(71)+ALGBRC(38))
      ALGBRC(63) = ( ( STATES(15)*ALGBRC(59)+ STATES(17)*ALGBRC(61))*CONSTS(34))/CONSTS(8)
      ALGBRC(65) = ALGBRC(63)
      ALGBRC(77) = ( CONSTS(55)*STATES(13) ** 2.00000)/(CONSTS(56) ** 2.00000+STATES(13) ** 2.00000)
      ALGBRC(83) =  CONSTS(60)*(STATES(14) - STATES(13))
      RATES(14) =  (CONSTS(9)/CONSTS(10))*((- ALGBRC(65)+ALGBRC(77)) - ALGBRC(83))
      ALGBRC(84) =  CONSTS(61)*(CONSTS(63) - STATES(18)) -  CONSTS(62)*STATES(18)*STATES(13)
      RATES(18) = ALGBRC(84)
      ALGBRC(85) = 1.00000+( CONSTS(64)*CONSTS(65))/CONSTS(64)+STATES(13) ** 2.00000+( CONSTS(66)*CONSTS(67))/CONSTS(67)+STATES(13) ** 2.00000 ** - 1.00000
      RATES(13) =  ALGBRC(85)*(((ALGBRC(65) - ALGBRC(77))+ALGBRC(83)+ALGBRC(84)) - ( - 2.00000*ALGBRC(76)+ALGBRC(73)+ALGBRC(79)+ALGBRC(82))/( 2.00000*CONSTS(9)*CONSTS(3)))
      RETURN
      END
      SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(9) = 1.00000/(1.00000+EXP((STATES(1)+87.5000)/10.3000))
      ALGBRC(2) = 1.00000/(1.00000+EXP((STATES(1)+45.0000)/- 6.50000))
      ALGBRC(12) = 1.36000/(( 0.320000*(STATES(1)+47.1300))/(1.00000 - EXP( - 0.100000*(STATES(1)+47.1300)))+ 0.0800000*EXP(- STATES(1)/11.0000))
      ALGBRC(3) = 1.00000/(1.00000+EXP((STATES(1)+76.1000)/6.07000))
      ALGBRC(13) = TERNRY(STATES(1).GE.- 40.0000,  0.453700*(1.00000+EXP(- (STATES(1)+10.6600)/11.1000)), 3.49000/( 0.135000*EXP(- (STATES(1)+80.0000)/6.80000)+ 3.56000*EXP( 0.0790000*STATES(1))+ 310000.*EXP( 0.350000*STATES(1))))
      ALGBRC(4) = 1.00000/(1.00000+EXP((STATES(1)+76.1000)/6.07000))
      ALGBRC(14) = TERNRY(STATES(1).GE.- 40.0000, ( 11.6300*(1.00000+EXP( - 0.100000*(STATES(1)+32.0000))))/EXP( - 2.53500e-07*STATES(1)), 3.49000/( ((STATES(1)+37.7800)/(1.00000+EXP( 0.311000*(STATES(1)+79.2300))))*( - 127140.*EXP( 0.244400*STATES(1)) -  3.47400e-05*EXP( - 0.0439100*STATES(1)))+( 0.121200*EXP( - 0.0105200*STATES(1)))/(1.00000+EXP( - 0.137800*(STATES(1)+40.1400)))))
      ALGBRC(15) = 100.000/( 45.1600*EXP( 0.0357700*(STATES(1)+50.0000))+ 98.9000*EXP( - 0.100000*(STATES(1)+38.0000)))
      ALGBRC(5) = 1.00000/(1.00000+EXP((STATES(1)+10.6000)/- 11.4200))
      ALGBRC(16) =  20.0000*EXP(- (STATES(1)+70.0000)/25.0000 ** 2.00000)+35.0000
      ALGBRC(6) = 1.00000/(1.00000+EXP((STATES(1)+45.3000)/6.88410))
      ALGBRC(17) =  1300.00*EXP(- (STATES(1)+70.0000)/30.0000 ** 2.00000)+35.0000
      ALGBRC(7) = 1.00000/(1.00000+EXP((STATES(1)+45.3000)/6.88410))
      ALGBRC(18) = 10000.0/( 45.1600*EXP( 0.0357700*(STATES(1)+50.0000))+ 98.9000*EXP( - 0.100000*(STATES(1)+38.0000)))
      ALGBRC(8) = 1.00000/(1.00000+EXP((STATES(1)+11.5000)/- 11.8200))
      ALGBRC(19) = 1000.00/( 0.118850*EXP((STATES(1)+80.0000)/28.3700)+ 0.562300*EXP((STATES(1)+80.0000)/- 14.1900))
      ALGBRC(10) = 1.00000/(1.00000+EXP((STATES(1)+138.600)/10.4800))
      ALGBRC(24) =  (( CONSTS(1)*CONSTS(2))/CONSTS(3))*log(CONSTS(16)/STATES(6))
      ALGBRC(25) =  CONSTS(13)*STATES(7)*( CONSTS(14)*STATES(8)+ CONSTS(15)*STATES(9))*(STATES(1) - ALGBRC(24))
      ALGBRC(26) =  CONSTS(17)*STATES(10)*STATES(11)*(STATES(1) - ALGBRC(24))
      ALGBRC(27) = ( (0.0480000/(EXP((STATES(1)+37.0000)/25.0000)+EXP((STATES(1)+37.0000)/- 25.0000))+0.0100000)*0.00100000)/(1.00000+EXP((STATES(1) - (ALGBRC(24)+76.7700))/- 17.0000))+( CONSTS(18)*(STATES(1) - (ALGBRC(24)+1.73000)))/( (1.00000+EXP(( 1.61300*CONSTS(3)*(STATES(1) - (ALGBRC(24)+1.73000)))/( CONSTS(1)*CONSTS(2))))*(1.00000+EXP((CONSTS(16) - 0.998800)/- 0.124000)))
      ALGBRC(32) =  CONSTS(22)*(STATES(1) - ALGBRC(24))
      ALGBRC(34) =  CONSTS(24)*1.00000+CONSTS(25)/STATES(2) ** 2.00000*(1.00000+ (CONSTS(26)/STATES(2))*EXP((( - CONSTS(28)*CONSTS(3)*STATES(1))/CONSTS(1))/CONSTS(2)))+ 1.00000+CONSTS(29)/CONSTS(16) ** 2.00000*(1.00000+ (CONSTS(12)/CONSTS(27))*EXP((( - (1.00000 - CONSTS(28))*CONSTS(3)*STATES(1))/CONSTS(1))/CONSTS(2)))
      ALGBRC(35) = ( CONSTS(23)*(CONSTS(24)+1.00000))/ALGBRC(34)
      ALGBRC(21) = TERNRY(VOI -  INT(VOI/CONSTS(5))*CONSTS(5).GE.0.00000.AND.VOI -  INT(VOI/CONSTS(5))*CONSTS(5).LE.CONSTS(6), CONSTS(7), 0.00000)
      ALGBRC(29) =  CONSTS(19)*STATES(12)*CONSTS(69)*(STATES(1) - ALGBRC(24))
      ALGBRC(1) = ( CONSTS(3)*STATES(1))/( CONSTS(1)*CONSTS(2))
      ALGBRC(20) =  2.00000*ALGBRC(1)
      ALGBRC(45) = TERNRY(ABS(ALGBRC(20)).GT.1.00000e-09, (STATES(13)+( (CONSTS(33)/CONSTS(31))*CONSTS(30)*ALGBRC(20)*EXP(- ALGBRC(20)))/(1.00000 - EXP(- ALGBRC(20))))/(1.00000+( (CONSTS(33)/CONSTS(31))*ALGBRC(20))/(1.00000 - EXP(- ALGBRC(20)))), (STATES(13)+ (CONSTS(33)/CONSTS(31))*CONSTS(30))/(1.00000+CONSTS(33)/CONSTS(31)))
      ALGBRC(47) = (ALGBRC(45) ** 2.00000+ CONSTS(48)*CONSTS(44) ** 2.00000)/( CONSTS(41)*(ALGBRC(45) ** 2.00000+CONSTS(44) ** 2.00000))
      ALGBRC(41) = (STATES(13) ** 2.00000+ CONSTS(48)*CONSTS(44) ** 2.00000)/( CONSTS(41)*(STATES(13) ** 2.00000+CONSTS(44) ** 2.00000))
      ALGBRC(36) = EXP((STATES(1) - CONSTS(35))/CONSTS(36))
      ALGBRC(37) = ALGBRC(36)/( CONSTS(38)*(ALGBRC(36)+1.00000))
      ALGBRC(38) = STATES(13) ** 2.00000/( CONSTS(40)*(STATES(13) ** 2.00000+CONSTS(44) ** 2.00000))
      ALGBRC(46) = ALGBRC(45) ** 2.00000/( CONSTS(40)*(ALGBRC(45) ** 2.00000+CONSTS(44) ** 2.00000))
      ALGBRC(53) =  (ALGBRC(37)+CONSTS(70))*( (CONSTS(70)+CONSTS(71)+ALGBRC(46))*(CONSTS(71)+ALGBRC(38))+ ALGBRC(37)*(CONSTS(71)+ALGBRC(46)))
      ALGBRC(54) = ( ALGBRC(37)*CONSTS(71)*(ALGBRC(37)+CONSTS(70)+CONSTS(71)+ALGBRC(38)))/ALGBRC(53)
      ALGBRC(57) = ( CONSTS(70)*CONSTS(71)*(CONSTS(70)+ALGBRC(37)+CONSTS(71)+ALGBRC(46)))/ALGBRC(53)
      ALGBRC(58) =  ALGBRC(54)*ALGBRC(47)+ ALGBRC(57)*ALGBRC(41)
      ALGBRC(48) = ( CONSTS(43)*CONSTS(49)*(ALGBRC(45) ** 2.00000+ CONSTS(48)*CONSTS(44) ** 2.00000))/( CONSTS(41)*( CONSTS(49)*ALGBRC(45) ** 2.00000+ CONSTS(48)*CONSTS(44) ** 2.00000))
      ALGBRC(42) = ( CONSTS(43)*CONSTS(49)*(STATES(13) ** 2.00000+ CONSTS(48)*CONSTS(44) ** 2.00000))/( CONSTS(41)*( CONSTS(49)*STATES(13) ** 2.00000+ CONSTS(48)*CONSTS(44) ** 2.00000))
      ALGBRC(60) = ( ALGBRC(37)*ALGBRC(48)+ CONSTS(70)*ALGBRC(42))/(ALGBRC(37)+CONSTS(70))
      ALGBRC(43) = (STATES(13)+ (CONSTS(32)/CONSTS(31))*STATES(14))/(1.00000+CONSTS(32)/CONSTS(31))
      ALGBRC(44) = ( ALGBRC(43)*(ALGBRC(36)+CONSTS(46)))/( CONSTS(39)*CONSTS(45)*(ALGBRC(36)+1.00000))
      ALGBRC(39) = ( STATES(13)*(ALGBRC(36)+CONSTS(46)))/( CONSTS(39)*CONSTS(45)*(ALGBRC(36)+1.00000))
      ALGBRC(55) = ( CONSTS(70)*( ALGBRC(38)*(CONSTS(70)+CONSTS(71)+ALGBRC(46))+ ALGBRC(46)*ALGBRC(37)))/ALGBRC(53)
      ALGBRC(66) =  ALGBRC(55)*ALGBRC(44)+ ALGBRC(57)*ALGBRC(39)
      ALGBRC(40) = ( CONSTS(47)*(ALGBRC(36)+CONSTS(46)))/( CONSTS(39)*( CONSTS(47)*ALGBRC(36)+CONSTS(46)))
      ALGBRC(68) = ALGBRC(40)
      ALGBRC(70) = ( CONSTS(70)*ALGBRC(39))/(ALGBRC(37)+CONSTS(70))
      ALGBRC(72) = ALGBRC(40)
      ALGBRC(74) = ((1.00000 - STATES(15)) - STATES(16)) - STATES(17)
      ALGBRC(62) = ( CONSTS(71)*ALGBRC(41))/(CONSTS(71)+ALGBRC(38))
      ALGBRC(64) = ALGBRC(42)
      ALGBRC(22) =  (( CONSTS(1)*CONSTS(2))/CONSTS(3))*log(CONSTS(12)/STATES(2))
      ALGBRC(23) =  CONSTS(11)*STATES(3) ** 3.00000*STATES(4)*STATES(5)*(STATES(1) - ALGBRC(22))
      ALGBRC(31) =  CONSTS(21)*(STATES(1) - ALGBRC(22))
      ALGBRC(75) = ( CONSTS(54)*( EXP( CONSTS(52)*ALGBRC(1))*STATES(2) ** 3.00000*CONSTS(30) -  EXP( (CONSTS(52) - 1.00000)*ALGBRC(1))*CONSTS(12) ** 3.00000*STATES(13)))/( (CONSTS(12) ** 3.00000+CONSTS(50) ** 3.00000)*(CONSTS(30)+CONSTS(51))*(1.00000+ CONSTS(53)*EXP( (CONSTS(52) - 1.00000)*ALGBRC(1))))
      ALGBRC(76) =  ALGBRC(75)*CONSTS(3)*CONSTS(9)
      ALGBRC(28) =  CONSTS(19)*STATES(12)*CONSTS(20)*(STATES(1) - ALGBRC(22))
      ALGBRC(30) = ALGBRC(28)+ALGBRC(29)
      ALGBRC(78) = ( CONSTS(57)*STATES(13))/(CONSTS(58)+STATES(13))
      ALGBRC(79) =  ALGBRC(78)*2.00000*CONSTS(3)*CONSTS(9)
      ALGBRC(52) = TERNRY(ABS(ALGBRC(20)).GT.1.00000e-05, ( (( CONSTS(33)*ALGBRC(20))/(1.00000 - EXP(- ALGBRC(20))))*(( CONSTS(30)*EXP(- ALGBRC(20)) - STATES(13))+ (CONSTS(32)/CONSTS(31))*( CONSTS(30)*EXP(- ALGBRC(20)) - STATES(14))))/(1.00000+CONSTS(32)/CONSTS(31)+( (CONSTS(33)/CONSTS(31))*ALGBRC(20))/(1.00000 - EXP(ALGBRC(20)))), ( (( CONSTS(33)*1.00000e-05)/(1.00000 - EXP(- 1.00000e-05)))*(( CONSTS(30)*EXP(- 1.00000e-05) - STATES(13))+ (CONSTS(32)/CONSTS(31))*( CONSTS(30)*EXP(- 1.00000e-05) - STATES(14))))/(1.00000+CONSTS(32)/CONSTS(31)+( (CONSTS(33)/CONSTS(31))*1.00000e-05)/(1.00000 - EXP(- 1.00000e-05))))
      ALGBRC(51) = TERNRY(ABS(ALGBRC(20)).GT.1.00000e-05, ( (( CONSTS(33)*ALGBRC(20))/(1.00000 - EXP(- ALGBRC(20))))*( CONSTS(30)*EXP(- ALGBRC(20)) - STATES(13)))/(1.00000+( (CONSTS(33)/CONSTS(31))*ALGBRC(20))/(1.00000 - EXP(- ALGBRC(20)))), ( (( CONSTS(33)*1.00000e-05)/(1.00000 - EXP(- 1.00000e-05)))*( CONSTS(30)*EXP(- 1.00000e-05) - STATES(13)))/(1.00000+( (CONSTS(33)/CONSTS(31))*1.00000e-05)/(1.00000 - EXP(- 1.00000e-05))))
      ALGBRC(56) = ( ALGBRC(37)*( ALGBRC(46)*(ALGBRC(37)+CONSTS(71)+ALGBRC(38))+ ALGBRC(38)*CONSTS(70)))/ALGBRC(53)
      ALGBRC(67) =  ALGBRC(52)*ALGBRC(56)+ ALGBRC(51)*ALGBRC(54)
      ALGBRC(69) = ( ALGBRC(51)*ALGBRC(37))/(ALGBRC(37)+CONSTS(70))
      ALGBRC(71) = ( ( STATES(15)*ALGBRC(67)+ STATES(16)*ALGBRC(69))*CONSTS(34))/CONSTS(8)
      ALGBRC(73) =  - ALGBRC(71)*2.00000*CONSTS(3)*CONSTS(9)
      ALGBRC(80) =  (( CONSTS(1)*CONSTS(2))/( 2.00000*CONSTS(3)))*log(CONSTS(30)/STATES(13))
      ALGBRC(81) =  CONSTS(59)*(ALGBRC(80) - STATES(1))
      ALGBRC(82) =  - ALGBRC(81)*2.00000*CONSTS(3)*CONSTS(9)
      ALGBRC(49) = ( CONSTS(32)*(STATES(14) - STATES(13)))/(1.00000+CONSTS(32)/CONSTS(31))
      ALGBRC(50) = TERNRY(ABS(ALGBRC(20)).GT.1.00000e-05, ( CONSTS(32)*((STATES(14) - STATES(13))+ (( (CONSTS(33)/CONSTS(31))*ALGBRC(20))/(1.00000 - EXP(- ALGBRC(20))))*(STATES(14) -  CONSTS(30)*EXP(- ALGBRC(20)))))/(1.00000+CONSTS(32)/CONSTS(31)+( (CONSTS(33)/CONSTS(31))*ALGBRC(20))/(1.00000 - EXP(- ALGBRC(20)))), ( CONSTS(32)*((STATES(14) - STATES(13))+ (( (CONSTS(33)/CONSTS(31))*1.00000e-05)/(1.00000 - EXP(- 1.00000e-05)))*(STATES(14) -  CONSTS(30)*EXP(- 1.00000e-05))))/(1.00000+CONSTS(32)/CONSTS(31)+( (CONSTS(33)/CONSTS(31))*1.00000e-05)/(1.00000 - EXP(- 1.00000e-05))))
      ALGBRC(59) =  ALGBRC(56)*ALGBRC(50)+ ALGBRC(49)*ALGBRC(55)
      ALGBRC(61) = ( ALGBRC(49)*ALGBRC(38))/(CONSTS(71)+ALGBRC(38))
      ALGBRC(63) = ( ( STATES(15)*ALGBRC(59)+ STATES(17)*ALGBRC(61))*CONSTS(34))/CONSTS(8)
      ALGBRC(65) = ALGBRC(63)
      ALGBRC(77) = ( CONSTS(55)*STATES(13) ** 2.00000)/(CONSTS(56) ** 2.00000+STATES(13) ** 2.00000)
      ALGBRC(83) =  CONSTS(60)*(STATES(14) - STATES(13))
      ALGBRC(84) =  CONSTS(61)*(CONSTS(63) - STATES(18)) -  CONSTS(62)*STATES(18)*STATES(13)
      ALGBRC(85) = 1.00000+( CONSTS(64)*CONSTS(65))/CONSTS(64)+STATES(13) ** 2.00000+( CONSTS(66)*CONSTS(67))/CONSTS(67)+STATES(13) ** 2.00000 ** - 1.00000
      ALGBRC(11) = STATES(13)
      ALGBRC(33) = ALGBRC(31)+ALGBRC(32)
      RETURN
      END
      REAL FUNCTION TERNRY(TEST, VALA, VALB)
      LOGICAL TEST
      REAL VALA, VALB
      IF (TEST) THEN
        TERNRY = VALA
      ELSE
        TERNRY = VALB
      ENDIF
      RETURN
      END