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 56 entries in the algebraic variable array.
C There are a total of 14 entries in each of the rate and state variable arrays.
C There are a total of 43 entries in the constant variable array.
C
C
C VOI is time in component environment (millisecond).
C STATES(1) is Vm_n in component Vm_n (millivolt).
C ALGBRC(1) is i_app in component Vm_n (nanoA_per_cm2).
C CONSTS(1) is Cm in component Vm_n (microF_per_cm2).
C CONSTS(2) is t0 in component Vm_n (millisecond).
C CONSTS(3) is t1 in component Vm_n (millisecond).
C ALGBRC(37) is i_NaT in component i_NaT (nanoA_per_cm2).
C ALGBRC(39) is i_NaP in component i_NaP (nanoA_per_cm2).
C ALGBRC(41) is i_leakNa in component i_leakNa (nanoA_per_cm2).
C ALGBRC(26) is i_KDR in component i_KDR (nanoA_per_cm2).
C ALGBRC(27) is i_KA in component i_KA (nanoA_per_cm2).
C ALGBRC(28) is i_leakK in component i_leakK (nanoA_per_cm2).
C ALGBRC(9) is i_leakf in component i_leakf (nanoA_per_cm2).
C ALGBRC(35) is i_NaKATPase_n in component i_NaKATPase_n (nanoA_per_cm2).
C ALGBRC(38) is J_NaT in component i_NaT (picomole_per_cm2_millisecond).
C CONSTS(4) is gNaT in component i_NaT (microS_per_cm2).
C CONSTS(5) is F in component model_parameters (coulomb_per_mole).
C ALGBRC(36) is ENa_n in component electric_potentials (millivolt).
C STATES(2) is m in component i_NaT_m_gate (dimensionless).
C STATES(3) is h in component i_NaT_h_gate (dimensionless).
C ALGBRC(2) is alpha_m in component i_NaT_m_gate (per_millisecond).
C ALGBRC(10) is beta_m in component i_NaT_m_gate (per_millisecond).
C ALGBRC(3) is alpha_h in component i_NaT_h_gate (per_millisecond).
C ALGBRC(11) is beta_h in component i_NaT_h_gate (per_millisecond).
C ALGBRC(40) is J_NaP in component i_NaP (picomole_per_cm2_millisecond).
C CONSTS(6) is gNaP in component i_NaP (microS_per_cm2).
C STATES(4) is m in component i_NaP_m_gate (dimensionless).
C STATES(5) is h in component i_NaP_h_gate (dimensionless).
C ALGBRC(4) is alpha_m in component i_NaP_m_gate (per_millisecond).
C ALGBRC(12) is beta_m in component i_NaP_m_gate (per_millisecond).
C CONSTS(7) is tau_activation in component i_NaP_m_gate (millisecond).
C ALGBRC(5) is alpha_h in component i_NaP_h_gate (per_millisecond).
C ALGBRC(13) is beta_h in component i_NaP_h_gate (per_millisecond).
C ALGBRC(23) is J_KDR in component i_KDR (picomole_per_cm2_millisecond).
C CONSTS(8) is gKDR in component i_KDR (microS_per_cm2).
C ALGBRC(22) is EK_n in component electric_potentials (millivolt).
C STATES(6) is n in component i_KDR_n_gate (dimensionless).
C ALGBRC(6) is alpha_n in component i_KDR_n_gate (per_millisecond).
C ALGBRC(14) is beta_n in component i_KDR_n_gate (per_millisecond).
C ALGBRC(24) is J_KA in component i_KA (picomole_per_cm2_millisecond).
C CONSTS(9) is gKA in component i_KA (microS_per_cm2).
C STATES(7) is m in component i_KA_m_gate (dimensionless).
C STATES(8) is h in component i_KA_h_gate (dimensionless).
C ALGBRC(7) is alpha_m in component i_KA_m_gate (per_millisecond).
C ALGBRC(15) is beta_m in component i_KA_m_gate (per_millisecond).
C ALGBRC(8) is alpha_h in component i_KA_h_gate (per_millisecond).
C ALGBRC(16) is beta_h in component i_KA_h_gate (per_millisecond).
C ALGBRC(34) is J_NaKATPase_n in component i_NaKATPase_n (picomole_per_cm2_millisecond).
C CONSTS(10) is I_NaKATPase_n_max in component i_NaKATPase_n (picomole_per_cm2_millisecond).
C CONSTS(11) is KmNa in component model_parameters (millimolar).
C CONSTS(12) is KmK in component model_parameters (millimolar).
C ALGBRC(33) is Nan in component ion_concentrations (millimolar).
C ALGBRC(19) is Ko in component ion_concentrations (millimolar).
C ALGBRC(42) is J_leakNa in component i_leakNa (picomole_per_cm2_millisecond).
C CONSTS(13) is gleakNa in component i_leakNa (microS_per_cm2).
C ALGBRC(25) is J_leakK in component i_leakK (picomole_per_cm2_millisecond).
C CONSTS(14) is gleakK in component i_leakK (microS_per_cm2).
C CONSTS(15) is gleakf in component i_leakf (microS_per_cm2).
C CONSTS(16) is Ef_n in component electric_potentials (millivolt).
C ALGBRC(51) is Vm_g in component Vm_g (millivolt).
C ALGBRC(32) is ENa_g in component electric_potentials (millivolt).
C ALGBRC(20) is EK_g in component electric_potentials (millivolt).
C ALGBRC(50) is ECl_g in component electric_potentials (millivolt).
C ALGBRC(46) is ENBC_g in component electric_potentials (millivolt).
C CONSTS(17) is gNa in component J_Na (microS_per_cm2).
C CONSTS(18) is gK in component J_K (microS_per_cm2).
C CONSTS(19) is gCl in component model_parameters (microS_per_cm2).
C CONSTS(20) is gNBC in component J_NBC (microS_per_cm2).
C ALGBRC(30) is J_NaKATPase_g in component J_NaKATPase_g (picomole_per_cm2_millisecond).
C ALGBRC(52) is J_Na in component J_Na (picomole_per_cm2_millisecond).
C ALGBRC(53) is J_K in component J_K (picomole_per_cm2_millisecond).
C CONSTS(21) is I_NaKATPase_g_max in component J_NaKATPase_g (picomole_per_cm2_millisecond).
C ALGBRC(29) is Nag in component ion_concentrations (millimolar).
C ALGBRC(54) is J_NBC in component J_NBC (picomole_per_cm2_millisecond).
C ALGBRC(49) is J_NKCC1 in component J_NKCC1 (picomole_per_cm2_millisecond).
C CONSTS(22) is gNKCC1 in component J_NKCC1 (microS_per_cm2).
C CONSTS(41) is Psi in component model_parameters (millivolt).
C ALGBRC(31) is Nao in component ion_concentrations (millimolar).
C CONSTS(23) is P_Ko in component ion_concentrations (millimolar).
C ALGBRC(18) is Kg in component ion_concentrations (millimolar).
C ALGBRC(48) is Clo in component ion_concentrations (millimolar).
C ALGBRC(47) is Clg in component ion_concentrations (millimolar).
C STATES(9) is N_Nag in component N_Nag (nanomole_per_cm2).
C ALGBRC(56) is dN_Nag_dt in component N_Nag (nanomole_per_cm2_millisecond).
C STATES(10) is N_Kg in component N_Kg (nanomole_per_cm2).
C ALGBRC(55) is dN_Kg_dt in component N_Kg (nanomole_per_cm2_millisecond).
C STATES(11) is wg in component wg (micrometre).
C CONSTS(24) is Lp in component model_parameters (cm_per_second_millimolar).
C CONSTS(25) is Xg in component model_parameters (millimolar_micrometre).
C ALGBRC(44) is HCO3o in component ion_concentrations (millimolar).
C ALGBRC(45) is HCO3g in component ion_concentrations (millimolar).
C ALGBRC(17) is wo in component wo (micrometre).
C CONSTS(26) is P_wo in component model_parameters (micrometre).
C CONSTS(27) is P_wg in component model_parameters (micrometre).
C STATES(12) is N_Nao in component N_Nao (nanomole_per_cm2).
C STATES(13) is N_Ko in component N_Ko (nanomole_per_cm2).
C STATES(14) is N_HCO3o in component N_HCO3o (nanomole_per_cm2).
C ALGBRC(21) is Kn in component ion_concentrations (millimolar).
C ALGBRC(43) is Cln in component ion_concentrations (millimolar).
C CONSTS(28) is P_Vm_g in component ion_concentrations (millivolt).
C CONSTS(40) is P_Clo in component ion_concentrations (millimolar).
C CONSTS(29) is P_Cln in component ion_concentrations (millimolar).
C CONSTS(42) is P_Clg in component ion_concentrations (millimolar).
C CONSTS(30) is P_Nan in component ion_concentrations (millimolar).
C CONSTS(31) is P_Nao in component ion_concentrations (millimolar).
C CONSTS(32) is P_Nag in component ion_concentrations (millimolar).
C CONSTS(33) is P_Kn in component ion_concentrations (millimolar).
C CONSTS(34) is P_Kg in component ion_concentrations (millimolar).
C CONSTS(43) is P_HCO3g in component ion_concentrations (millimolar).
C CONSTS(35) is P_HCO3o in component ion_concentrations (millimolar).
C CONSTS(36) is P_wn in component ion_concentrations (micrometre).
C CONSTS(37) is rho in component model_parameters (dimensionless).
C CONSTS(38) is R in component model_parameters (joule_per_mole_kelvin).
C CONSTS(39) is T in component model_parameters (kelvin).
C RATES(1) is d/dt Vm_n in component Vm_n (millivolt).
C RATES(2) is d/dt m in component i_NaT_m_gate (dimensionless).
C RATES(3) is d/dt h in component i_NaT_h_gate (dimensionless).
C RATES(4) is d/dt m in component i_NaP_m_gate (dimensionless).
C RATES(5) is d/dt h in component i_NaP_h_gate (dimensionless).
C RATES(6) is d/dt n in component i_KDR_n_gate (dimensionless).
C RATES(7) is d/dt m in component i_KA_m_gate (dimensionless).
C RATES(8) is d/dt h in component i_KA_h_gate (dimensionless).
C RATES(9) is d/dt N_Nag in component N_Nag (nanomole_per_cm2).
C RATES(10) is d/dt N_Kg in component N_Kg (nanomole_per_cm2).
C RATES(11) is d/dt wg in component wg (micrometre).
C RATES(12) is d/dt N_Nao in component N_Nao (nanomole_per_cm2).
C RATES(13) is d/dt N_Ko in component N_Ko (nanomole_per_cm2).
C RATES(14) is d/dt N_HCO3o in component N_HCO3o (nanomole_per_cm2).
C
      SUBROUTINE initConsts(CONSTS, RATES, STATES)
      REAL CONSTS(*), RATES(*), STATES(*)
      STATES(1) = -70
      CONSTS(1) = 1
      CONSTS(2) = 100
      CONSTS(3) = 700
      CONSTS(4) = 5000
      CONSTS(5) = 9.649e4
      STATES(2) = 0.005
      STATES(3) = 0.9961
      CONSTS(6) = 150
      STATES(4) = 0.0129
      STATES(5) = 0.9718
      CONSTS(7) = 6
      CONSTS(8) = 5000
      STATES(6) = 0.0012
      CONSTS(9) = 1000
      STATES(7) = 0.1193
      STATES(8) = 0.1205
      CONSTS(10) = 0.0289
      CONSTS(11) = 10
      CONSTS(12) = 1.5
      CONSTS(13) = 20
      CONSTS(14) = 66.06
      CONSTS(15) = 10
      CONSTS(16) = -70
      CONSTS(17) = 100.0
      CONSTS(18) = 1696.0
      CONSTS(19) = 50
      CONSTS(20) = 80
      CONSTS(21) = 0.1151
      CONSTS(22) = 2
      CONSTS(23) = 3
      STATES(9) = 0.75
      STATES(10) = 5
      STATES(11) = 0.05
      CONSTS(24) = 2e-8
      CONSTS(25) = 8.45
      CONSTS(26) = 0.025
      CONSTS(27) = 0.05
      STATES(12) = 3.65
      STATES(13) = 0.075
      STATES(14) = 0.375
      CONSTS(28) = -85
      CONSTS(29) = 50
      CONSTS(30) = 10
      CONSTS(31) = 146
      CONSTS(32) = 15
      CONSTS(33) = 130
      CONSTS(34) = 100
      CONSTS(35) = 15
      CONSTS(36) = 0.05
      CONSTS(37) = 0.5975
      CONSTS(38) = 8.315
      CONSTS(39) = 300
      CONSTS(40) = (CONSTS(31)+CONSTS(23)) - CONSTS(35)
      CONSTS(41) = ( 1000.00*CONSTS(38)*CONSTS(39))/CONSTS(5)
      CONSTS(42) =  CONSTS(40)*EXP(CONSTS(28)/CONSTS(41))
      CONSTS(43) =  CONSTS(35)* ( (CONSTS(31)/CONSTS(32))*EXP(CONSTS(28)/CONSTS(41))) ** (1.0 / 2)
      RETURN
      END
      SUBROUTINE computeRates(VOI, CONSTS,  RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(2) = ( 0.320000*(- STATES(1) - 51.9000))/(EXP(- ( 0.250000*STATES(1)+12.9750)) - 1.00000)
      ALGBRC(10) = ( 0.280000*(STATES(1)+24.8900))/(EXP( 0.200000*STATES(1)+4.97800) - 1.00000)
      RATES(2) =  ALGBRC(2)*(1.00000 - STATES(2)) -  ALGBRC(10)*STATES(2)
      ALGBRC(3) =  0.128000*EXP(- ( 0.0560000*STATES(1)+2.94000))
      ALGBRC(11) = 4.00000/(EXP(- ( 0.200000*STATES(1)+6.00000))+1.00000)
      RATES(3) =  ALGBRC(3)*(1.00000 - STATES(3)) -  ALGBRC(11)*STATES(3)
      ALGBRC(4) = ( (1.00000/CONSTS(7))*1.00000)/(EXP(- ( 0.143000*STATES(1)+5.67000))+1.00000)
      ALGBRC(12) = ( (1.00000/CONSTS(7))*EXP(- ( 0.143000*STATES(1)+5.67000)))/(EXP(- ( 0.143000*STATES(1)+5.67000))+1.00000)
      RATES(4) =  ALGBRC(4)*(1.00000 - STATES(4)) -  ALGBRC(12)*STATES(4)
      ALGBRC(5) =  5.12000e-08*EXP(- ( 0.0560000*STATES(1)+2.94000))
      ALGBRC(13) = 1.60000e-06/(EXP(- ( 0.200000*STATES(1)+8.00000))+1.00000)
      RATES(5) =  ALGBRC(5)*(1.00000 - STATES(5)) -  ALGBRC(13)*STATES(5)
      ALGBRC(6) = ( 0.0160000*(- STATES(1) - 34.9000))/(EXP(- ( 0.200000*STATES(1)+6.98000)) - 1.00000)
      ALGBRC(14) =  0.250000*EXP(- ( 0.0250000*STATES(1)+1.25000))
      RATES(6) =  ALGBRC(6)*(1.00000 - STATES(6)) -  ALGBRC(14)*STATES(6)
      ALGBRC(7) = ( 0.0200000*(- STATES(1) - 56.9000))/(EXP(- ( 0.100000*STATES(1)+5.69000)) - 1.00000)
      ALGBRC(15) = ( 0.0175000*(STATES(1)+29.9000))/(EXP( 0.100000*STATES(1)+2.99000) - 1.00000)
      RATES(7) =  ALGBRC(7)*(1.00000 - STATES(7)) -  ALGBRC(15)*STATES(7)
      ALGBRC(8) =  0.0160000*EXP(- ( 0.0560000*STATES(1)+4.61000))
      ALGBRC(16) = 0.500000/(EXP(- ( 0.200000*STATES(1)+11.9800))+1.00000)
      RATES(8) =  ALGBRC(8)*(1.00000 - STATES(8)) -  ALGBRC(16)*STATES(8)
      ALGBRC(1) = TERNRY(VOI.GE.CONSTS(2).AND.VOI.LE.CONSTS(3), 3500.00, 0.00000)
      ALGBRC(33) = (( CONSTS(36)*CONSTS(30)+ CONSTS(27)*CONSTS(32)+ CONSTS(26)*CONSTS(31)) - (STATES(12)+STATES(9)))/CONSTS(36)
      ALGBRC(17) = (CONSTS(27)+CONSTS(26)) - STATES(11)
      ALGBRC(31) = STATES(12)/ALGBRC(17)
      ALGBRC(36) =  CONSTS(41)*log(ALGBRC(31)/ALGBRC(33))
      ALGBRC(37) =  CONSTS(4)*STATES(2) ** 3.00000*STATES(3)*(STATES(1) - ALGBRC(36))
      ALGBRC(39) =  CONSTS(6)*STATES(4) ** 2.00000*STATES(5)*(STATES(1) - ALGBRC(36))
      ALGBRC(41) =  CONSTS(13)*(STATES(1) - ALGBRC(36))
      ALGBRC(19) = STATES(13)/ALGBRC(17)
      ALGBRC(21) = (( CONSTS(36)*CONSTS(33)+ CONSTS(27)*CONSTS(34)+ CONSTS(26)*CONSTS(23)) - (STATES(13)+STATES(10)))/CONSTS(36)
      ALGBRC(22) =  CONSTS(41)*log(ALGBRC(19)/ALGBRC(21))
      ALGBRC(26) =  CONSTS(8)*STATES(6) ** 2.00000*(STATES(1) - ALGBRC(22))
      ALGBRC(27) =  CONSTS(9)*STATES(7) ** 2.00000*STATES(8)*(STATES(1) - ALGBRC(22))
      ALGBRC(28) =  CONSTS(14)*(STATES(1) - ALGBRC(22))
      ALGBRC(9) =  CONSTS(15)*(STATES(1) - CONSTS(16))
      ALGBRC(34) = ( (( CONSTS(10)*ALGBRC(33) ** 1.50000)/(ALGBRC(33) ** 1.50000+CONSTS(11) ** 1.50000))*ALGBRC(19))/(ALGBRC(19)+CONSTS(12))
      ALGBRC(35) =  ALGBRC(34)*CONSTS(5)
      RATES(1) = ( 0.00100000*(- (ALGBRC(37)+ALGBRC(39)+ALGBRC(41)+ALGBRC(26)+ALGBRC(27)+ALGBRC(28)+ALGBRC(9)+ALGBRC(35))+ALGBRC(1)))/CONSTS(1)
      ALGBRC(29) = STATES(9)/STATES(11)
      ALGBRC(18) = STATES(10)/STATES(11)
      ALGBRC(45) = (( CONSTS(27)*CONSTS(43)+ CONSTS(26)*CONSTS(35)) - STATES(14))/STATES(11)
      ALGBRC(47) = (ALGBRC(29)+ALGBRC(18)) - (ALGBRC(45)+( CONSTS(37)*CONSTS(25))/STATES(11))
      ALGBRC(43) = ((CONSTS(29)+ALGBRC(33)) - CONSTS(30))+(ALGBRC(21) - CONSTS(33))
      ALGBRC(48) = (( CONSTS(27)*CONSTS(42)+ CONSTS(26)*CONSTS(40)+ CONSTS(36)*CONSTS(29)) - ( STATES(11)*ALGBRC(47)+ CONSTS(36)*ALGBRC(43)))/ALGBRC(17)
      ALGBRC(44) = STATES(14)/ALGBRC(17)
      RATES(11) =  10.0000*CONSTS(24)*((ALGBRC(29)+ALGBRC(18)+ALGBRC(47)+ALGBRC(45)+CONSTS(25)/STATES(11)) - (ALGBRC(31)+ALGBRC(19)+ALGBRC(48)+ALGBRC(44)))
      ALGBRC(30) = ( (( CONSTS(21)*ALGBRC(29) ** 1.50000)/(ALGBRC(29) ** 1.50000+CONSTS(11) ** 1.50000))*ALGBRC(19))/(ALGBRC(19)+CONSTS(12))
      ALGBRC(32) =  CONSTS(41)*log(ALGBRC(31)/ALGBRC(29))
      ALGBRC(20) =  CONSTS(41)*log(ALGBRC(19)/ALGBRC(18))
      ALGBRC(50) =  - 1.00000*CONSTS(41)*log(ALGBRC(48)/ALGBRC(47))
      ALGBRC(46) =  - CONSTS(41)*log( (ALGBRC(31)/ALGBRC(29))*ALGBRC(44)/ALGBRC(45) ** 2.00000)
      ALGBRC(51) = ( CONSTS(17)*ALGBRC(32)+ CONSTS(18)*ALGBRC(20)+ CONSTS(19)*ALGBRC(50)+ CONSTS(20)*ALGBRC(46))/(CONSTS(17)+CONSTS(18)+CONSTS(19)+CONSTS(20)) - ( CONSTS(5)*ALGBRC(30))/(CONSTS(17)+CONSTS(18)+CONSTS(19)+CONSTS(20))
      ALGBRC(53) = ( CONSTS(18)*(ALGBRC(51) - ALGBRC(20)))/CONSTS(5)
      ALGBRC(49) = TERNRY(ALGBRC(19).GT.CONSTS(23), ( (ALGBRC(19) - CONSTS(23) ** 10.0000/(ALGBRC(19) - CONSTS(23) ** 10.0000+0.0300000 ** 10.0000))*CONSTS(41)*CONSTS(22)*log( (( (ALGBRC(19)/ALGBRC(18))*ALGBRC(31))/ALGBRC(29))*ALGBRC(48)/ALGBRC(47) ** 2.00000))/CONSTS(5), 0.00000)
      ALGBRC(55) =  0.0100000*(- ALGBRC(53)+ 2.00000*ALGBRC(30)+ALGBRC(49))
      RATES(10) = ALGBRC(55)
      ALGBRC(38) = ( CONSTS(4)*STATES(2) ** 3.00000*STATES(3)*(STATES(1) - ALGBRC(36)))/CONSTS(5)
      ALGBRC(40) = ( CONSTS(6)*STATES(4) ** 2.00000*STATES(5)*(STATES(1) - ALGBRC(36)))/CONSTS(5)
      ALGBRC(42) = ( CONSTS(13)*(STATES(1) - ALGBRC(36)))/CONSTS(5)
      RATES(13) =  -0.0100000*(ALGBRC(38)+ALGBRC(40)+ALGBRC(42)+ 3.00000*ALGBRC(34)) - ALGBRC(55)
      ALGBRC(54) = ( CONSTS(20)*(ALGBRC(51) - ALGBRC(46)))/CONSTS(5)
      RATES(14) =  - 0.0100000*2.00000*ALGBRC(54)
      ALGBRC(52) = ( CONSTS(17)*(ALGBRC(51) - ALGBRC(32)))/CONSTS(5)
      ALGBRC(56) =  0.0100000*((- ALGBRC(52) -  3.00000*ALGBRC(30))+ALGBRC(49)+ALGBRC(54))
      RATES(9) = ALGBRC(56)
      RATES(12) =  0.0100000*(( 3.00000*ALGBRC(34)+ALGBRC(38)+ALGBRC(40)+ALGBRC(42)) -  100.000*ALGBRC(56))
      RETURN
      END
      SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(2) = ( 0.320000*(- STATES(1) - 51.9000))/(EXP(- ( 0.250000*STATES(1)+12.9750)) - 1.00000)
      ALGBRC(10) = ( 0.280000*(STATES(1)+24.8900))/(EXP( 0.200000*STATES(1)+4.97800) - 1.00000)
      ALGBRC(3) =  0.128000*EXP(- ( 0.0560000*STATES(1)+2.94000))
      ALGBRC(11) = 4.00000/(EXP(- ( 0.200000*STATES(1)+6.00000))+1.00000)
      ALGBRC(4) = ( (1.00000/CONSTS(7))*1.00000)/(EXP(- ( 0.143000*STATES(1)+5.67000))+1.00000)
      ALGBRC(12) = ( (1.00000/CONSTS(7))*EXP(- ( 0.143000*STATES(1)+5.67000)))/(EXP(- ( 0.143000*STATES(1)+5.67000))+1.00000)
      ALGBRC(5) =  5.12000e-08*EXP(- ( 0.0560000*STATES(1)+2.94000))
      ALGBRC(13) = 1.60000e-06/(EXP(- ( 0.200000*STATES(1)+8.00000))+1.00000)
      ALGBRC(6) = ( 0.0160000*(- STATES(1) - 34.9000))/(EXP(- ( 0.200000*STATES(1)+6.98000)) - 1.00000)
      ALGBRC(14) =  0.250000*EXP(- ( 0.0250000*STATES(1)+1.25000))
      ALGBRC(7) = ( 0.0200000*(- STATES(1) - 56.9000))/(EXP(- ( 0.100000*STATES(1)+5.69000)) - 1.00000)
      ALGBRC(15) = ( 0.0175000*(STATES(1)+29.9000))/(EXP( 0.100000*STATES(1)+2.99000) - 1.00000)
      ALGBRC(8) =  0.0160000*EXP(- ( 0.0560000*STATES(1)+4.61000))
      ALGBRC(16) = 0.500000/(EXP(- ( 0.200000*STATES(1)+11.9800))+1.00000)
      ALGBRC(1) = TERNRY(VOI.GE.CONSTS(2).AND.VOI.LE.CONSTS(3), 3500.00, 0.00000)
      ALGBRC(33) = (( CONSTS(36)*CONSTS(30)+ CONSTS(27)*CONSTS(32)+ CONSTS(26)*CONSTS(31)) - (STATES(12)+STATES(9)))/CONSTS(36)
      ALGBRC(17) = (CONSTS(27)+CONSTS(26)) - STATES(11)
      ALGBRC(31) = STATES(12)/ALGBRC(17)
      ALGBRC(36) =  CONSTS(41)*log(ALGBRC(31)/ALGBRC(33))
      ALGBRC(37) =  CONSTS(4)*STATES(2) ** 3.00000*STATES(3)*(STATES(1) - ALGBRC(36))
      ALGBRC(39) =  CONSTS(6)*STATES(4) ** 2.00000*STATES(5)*(STATES(1) - ALGBRC(36))
      ALGBRC(41) =  CONSTS(13)*(STATES(1) - ALGBRC(36))
      ALGBRC(19) = STATES(13)/ALGBRC(17)
      ALGBRC(21) = (( CONSTS(36)*CONSTS(33)+ CONSTS(27)*CONSTS(34)+ CONSTS(26)*CONSTS(23)) - (STATES(13)+STATES(10)))/CONSTS(36)
      ALGBRC(22) =  CONSTS(41)*log(ALGBRC(19)/ALGBRC(21))
      ALGBRC(26) =  CONSTS(8)*STATES(6) ** 2.00000*(STATES(1) - ALGBRC(22))
      ALGBRC(27) =  CONSTS(9)*STATES(7) ** 2.00000*STATES(8)*(STATES(1) - ALGBRC(22))
      ALGBRC(28) =  CONSTS(14)*(STATES(1) - ALGBRC(22))
      ALGBRC(9) =  CONSTS(15)*(STATES(1) - CONSTS(16))
      ALGBRC(34) = ( (( CONSTS(10)*ALGBRC(33) ** 1.50000)/(ALGBRC(33) ** 1.50000+CONSTS(11) ** 1.50000))*ALGBRC(19))/(ALGBRC(19)+CONSTS(12))
      ALGBRC(35) =  ALGBRC(34)*CONSTS(5)
      ALGBRC(29) = STATES(9)/STATES(11)
      ALGBRC(18) = STATES(10)/STATES(11)
      ALGBRC(45) = (( CONSTS(27)*CONSTS(43)+ CONSTS(26)*CONSTS(35)) - STATES(14))/STATES(11)
      ALGBRC(47) = (ALGBRC(29)+ALGBRC(18)) - (ALGBRC(45)+( CONSTS(37)*CONSTS(25))/STATES(11))
      ALGBRC(43) = ((CONSTS(29)+ALGBRC(33)) - CONSTS(30))+(ALGBRC(21) - CONSTS(33))
      ALGBRC(48) = (( CONSTS(27)*CONSTS(42)+ CONSTS(26)*CONSTS(40)+ CONSTS(36)*CONSTS(29)) - ( STATES(11)*ALGBRC(47)+ CONSTS(36)*ALGBRC(43)))/ALGBRC(17)
      ALGBRC(44) = STATES(14)/ALGBRC(17)
      ALGBRC(30) = ( (( CONSTS(21)*ALGBRC(29) ** 1.50000)/(ALGBRC(29) ** 1.50000+CONSTS(11) ** 1.50000))*ALGBRC(19))/(ALGBRC(19)+CONSTS(12))
      ALGBRC(32) =  CONSTS(41)*log(ALGBRC(31)/ALGBRC(29))
      ALGBRC(20) =  CONSTS(41)*log(ALGBRC(19)/ALGBRC(18))
      ALGBRC(50) =  - 1.00000*CONSTS(41)*log(ALGBRC(48)/ALGBRC(47))
      ALGBRC(46) =  - CONSTS(41)*log( (ALGBRC(31)/ALGBRC(29))*ALGBRC(44)/ALGBRC(45) ** 2.00000)
      ALGBRC(51) = ( CONSTS(17)*ALGBRC(32)+ CONSTS(18)*ALGBRC(20)+ CONSTS(19)*ALGBRC(50)+ CONSTS(20)*ALGBRC(46))/(CONSTS(17)+CONSTS(18)+CONSTS(19)+CONSTS(20)) - ( CONSTS(5)*ALGBRC(30))/(CONSTS(17)+CONSTS(18)+CONSTS(19)+CONSTS(20))
      ALGBRC(53) = ( CONSTS(18)*(ALGBRC(51) - ALGBRC(20)))/CONSTS(5)
      ALGBRC(49) = TERNRY(ALGBRC(19).GT.CONSTS(23), ( (ALGBRC(19) - CONSTS(23) ** 10.0000/(ALGBRC(19) - CONSTS(23) ** 10.0000+0.0300000 ** 10.0000))*CONSTS(41)*CONSTS(22)*log( (( (ALGBRC(19)/ALGBRC(18))*ALGBRC(31))/ALGBRC(29))*ALGBRC(48)/ALGBRC(47) ** 2.00000))/CONSTS(5), 0.00000)
      ALGBRC(55) =  0.0100000*(- ALGBRC(53)+ 2.00000*ALGBRC(30)+ALGBRC(49))
      ALGBRC(38) = ( CONSTS(4)*STATES(2) ** 3.00000*STATES(3)*(STATES(1) - ALGBRC(36)))/CONSTS(5)
      ALGBRC(40) = ( CONSTS(6)*STATES(4) ** 2.00000*STATES(5)*(STATES(1) - ALGBRC(36)))/CONSTS(5)
      ALGBRC(42) = ( CONSTS(13)*(STATES(1) - ALGBRC(36)))/CONSTS(5)
      ALGBRC(54) = ( CONSTS(20)*(ALGBRC(51) - ALGBRC(46)))/CONSTS(5)
      ALGBRC(52) = ( CONSTS(17)*(ALGBRC(51) - ALGBRC(32)))/CONSTS(5)
      ALGBRC(56) =  0.0100000*((- ALGBRC(52) -  3.00000*ALGBRC(30))+ALGBRC(49)+ALGBRC(54))
      ALGBRC(23) = ( CONSTS(8)*STATES(6) ** 2.00000*(STATES(1) - ALGBRC(22)))/CONSTS(5)
      ALGBRC(24) = ( CONSTS(9)*STATES(7) ** 2.00000*STATES(8)*(STATES(1) - ALGBRC(22)))/CONSTS(5)
      ALGBRC(25) = ( CONSTS(14)*(STATES(1) - ALGBRC(22)))/CONSTS(5)
      RETURN
      END
      REAL FUNCTION TERNRY(TEST, VALA, VALB)
      LOGICAL TEST
      REAL VALA, VALB
      IF (TEST) THEN
        TERNRY = VALA
      ELSE
        TERNRY = VALB
      ENDIF
      RETURN
      END