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 42 entries in the algebraic variable array.
C There are a total of 27 entries in each of the rate and state variable arrays.
C There are a total of 64 entries in the constant variable array.
C
C
C VOI is time in component Environment (second).
C CONSTS(1) is O2_x in component Environment (molar).
C CONSTS(2) is X_AtC in component Environment (mole_per_second_per_l_cell).
C CONSTS(3) is RT in component fixed_parameters (kilojoule_per_mole).
C CONSTS(4) is F in component fixed_parameters (kilojoule_per_mole_per_millivolt).
C CONSTS(5) is dG_C1o in component fixed_parameters (kilojoule_per_mole).
C CONSTS(6) is dG_C3o in component fixed_parameters (kilojoule_per_mole).
C CONSTS(7) is dG_C4o in component fixed_parameters (kilojoule_per_mole).
C ALGBRC(14) is dG_C1op in component fixed_parameters (kilojoule_per_mole).
C ALGBRC(15) is dG_C3op in component fixed_parameters (kilojoule_per_mole).
C ALGBRC(16) is dG_C4op in component fixed_parameters (kilojoule_per_mole).
C CONSTS(8) is dG_F1o in component fixed_parameters (kilojoule_per_mole).
C ALGBRC(12) is dG_H in component fixed_parameters (kilojoule_per_mole).
C CONSTS(51) is k_dHPI in component fixed_parameters (molar).
C CONSTS(52) is k_dHatp in component fixed_parameters (molar).
C CONSTS(53) is k_dHadp in component fixed_parameters (molar).
C CONSTS(9) is K_DT in component fixed_parameters (molar).
C CONSTS(10) is K_DD in component fixed_parameters (molar).
C CONSTS(11) is K_AK in component fixed_parameters (dimensionless).
C CONSTS(12) is K_CK in component fixed_parameters (per_molar).
C CONSTS(57) is W_m in component fixed_parameters (l_water_per_l_mito).
C CONSTS(60) is W_c in component fixed_parameters (l_water_per_l_cyto).
C CONSTS(58) is W_x in component fixed_parameters (l_water_per_l_mito).
C CONSTS(59) is W_i in component fixed_parameters (l_water_per_l_mito).
C CONSTS(13) is V_cyto in component fixed_parameters (cyto_per_cell).
C CONSTS(14) is V_mito in component fixed_parameters (mito_per_cell).
C CONSTS(62) is Rm_cyto in component fixed_parameters (mito_per_cyto).
C CONSTS(55) is Rm_cell in component fixed_parameters (mito_per_cell).
C CONSTS(63) is Rc_cell in component fixed_parameters (cyto_per_cell).
C CONSTS(15) is n_A in component fixed_parameters (dimensionless).
C CONSTS(16) is C_tot in component fixed_parameters (molar).
C CONSTS(17) is CR_tot in component fixed_parameters (molar).
C CONSTS(18) is Q_tot in component fixed_parameters (molar).
C CONSTS(19) is NAD_tot in component fixed_parameters (molar).
C CONSTS(20) is pH_C in component fixed_parameters (dimensionless).
C CONSTS(54) is H_c in component fixed_parameters (molar).
C CONSTS(21) is K_c in component fixed_parameters (molar).
C CONSTS(61) is H_i in component fixed_parameters (molar).
C CONSTS(56) is K_i in component fixed_parameters (molar).
C ALGBRC(10) is H_x in component dH_x_dt (molar).
C STATES(1) is deltaPsi in component ddeltaPsi_dt (millivolt).
C CONSTS(22) is k_PI1 in component adjustable_parameters (molar).
C CONSTS(23) is k_PI2 in component adjustable_parameters (molar).
C CONSTS(24) is k_PI3 in component adjustable_parameters (molar).
C CONSTS(25) is k_PI4 in component adjustable_parameters (molar).
C CONSTS(26) is k_PIH in component adjustable_parameters (molar).
C CONSTS(27) is r in component adjustable_parameters (dimensionless).
C CONSTS(28) is X_DH in component adjustable_parameters (mole_per_second_per_l_mito_per_molar).
C CONSTS(29) is X_C1 in component adjustable_parameters (mole_per_second_per_l_mito_per_molar_per_molar).
C CONSTS(30) is X_C3 in component adjustable_parameters (mole_per_second_per_l_mito_per_molar_per_half_molar).
C CONSTS(31) is X_C4 in component adjustable_parameters (mole_per_second_per_l_mito_per_molar).
C CONSTS(32) is X_F1 in component adjustable_parameters (mole_per_second_per_l_mito_per_molar_per_molar).
C CONSTS(33) is X_ANT in component adjustable_parameters (mole_per_second_per_l_mito).
C CONSTS(34) is X_PI1 in component adjustable_parameters (mole_per_second_per_l_mito_per_molar).
C CONSTS(35) is X_KH in component adjustable_parameters (mole_per_second_per_l_mito_per_molar_per_molar).
C CONSTS(36) is X_Hle in component adjustable_parameters (mole_per_second_per_l_mito_per_molar_per_millivolt).
C CONSTS(37) is X_K in component adjustable_parameters (mole_per_second_per_l_mito_per_molar_per_millivolt).
C CONSTS(38) is k_mADP in component adjustable_parameters (molar).
C CONSTS(39) is X_AK in component adjustable_parameters (mole_per_second_per_l_mito_per_molar_per_molar).
C CONSTS(40) is X_CK in component adjustable_parameters (mole_per_second_per_l_mito_per_molar_per_molar).
C CONSTS(41) is X_MgA in component adjustable_parameters (mole_per_second_per_l_mito_per_molar_per_molar).
C CONSTS(42) is k_O2 in component adjustable_parameters (molar).
C CONSTS(43) is x_buff in component adjustable_parameters (per_molar).
C CONSTS(44) is C_IM in component adjustable_parameters (mole_per_l_mito_per_millivolt).
C CONSTS(45) is X_A in component adjustable_parameters (micron_per_second).
C CONSTS(46) is X_PI2 in component adjustable_parameters (micron_per_second).
C CONSTS(47) is gamma in component adjustable_parameters (per_micron).
C ALGBRC(1) is NAD_x in component dNAD_x_dt (molar).
C STATES(2) is NADH_x in component dNADH_x_dt (molar).
C ALGBRC(3) is QH2_x in component dQH2_x_dt (molar).
C STATES(3) is Q_x in component dQ_x_dt (molar).
C ALGBRC(5) is Cred_x in component dCred_x_dt (molar).
C STATES(4) is Cox_x in component dCox_x_dt (molar).
C ALGBRC(7) is ATP_fx in component dATP_fx_dt (molar).
C STATES(5) is ATP_x in component dATP_x_dt (molar).
C STATES(6) is ATP_mx in component dATP_mx_dt (molar).
C ALGBRC(9) is ADP_fx in component dADP_fx_dt (molar).
C STATES(7) is ADP_x in component dADP_x_dt (molar).
C STATES(8) is ADP_mx in component dADP_mx_dt (molar).
C STATES(9) is pH_x in component dH_x_dt (dimensionless).
C ALGBRC(21) is J_DH in component J_DH (mole_per_second_per_l_mito).
C ALGBRC(23) is J_C1 in component J_C1 (mole_per_second_per_l_mito).
C ALGBRC(24) is J_C3 in component J_C3 (mole_per_second_per_l_mito).
C ALGBRC(25) is J_C4 in component J_C4 (mole_per_second_per_l_mito).
C ALGBRC(26) is J_F1 in component J_F1 (mole_per_second_per_l_mito).
C ALGBRC(34) is J_PI1 in component J_PI1 (mole_per_second_per_l_mito).
C ALGBRC(40) is J_KH in component J_KH (mole_per_second_per_l_mito).
C ALGBRC(36) is J_Hle in component J_Hle (mole_per_second_per_l_mito).
C STATES(10) is K_x in component dK_x_dt (molar).
C ALGBRC(42) is J_K in component J_K (mole_per_second_per_l_mito).
C STATES(11) is Mg_x in component dMg_x_dt (molar).
C ALGBRC(11) is J_MgATP_x in component J_MgATP_x (mole_per_second_per_l_mito).
C ALGBRC(13) is J_MgADP_x in component J_MgADP_x (mole_per_second_per_l_mito).
C ALGBRC(29) is J_ANT in component J_ANT (mole_per_second_per_l_mito).
C STATES(12) is PI_x in component dPI_x_dt (molar).
C ALGBRC(17) is ATP_fi in component dATP_fi_dt (molar).
C STATES(13) is ATP_i in component dATP_i_dt (molar).
C STATES(14) is ATP_mi in component dATP_mi_dt (molar).
C ALGBRC(18) is ADP_fi in component dADP_fi_dt (molar).
C STATES(15) is ADP_i in component dADP_i_dt (molar).
C STATES(16) is ADP_mi in component dADP_mi_dt (molar).
C ALGBRC(35) is J_ATP in component J_ATP (mole_per_second_per_l_mito).
C ALGBRC(37) is J_AKi in component J_AKi (mole_per_second_per_l_mito).
C ALGBRC(33) is J_ADP in component J_ADP (mole_per_second_per_l_mito).
C STATES(17) is AMP_i in component dAMP_i_dt (molar).
C ALGBRC(31) is J_AMP in component J_AMP (mole_per_second_per_l_mito).
C ALGBRC(20) is J_MgATP_i in component J_MgATP_i (mole_per_second_per_l_mito).
C ALGBRC(22) is J_MgADP_i in component J_MgADP_i (mole_per_second_per_l_mito).
C STATES(18) is PI_i in component dPI_i_dt (molar).
C ALGBRC(38) is J_PI2 in component J_PI2 (mole_per_second_per_l_mito).
C STATES(19) is Mg_i in component dMg_i_dt (molar).
C STATES(20) is ATP_c in component dATP_c_dt (molar).
C ALGBRC(39) is J_AKc in component J_AKc (mole_per_second_per_l_cyto).
C CONSTS(64) is J_AtC in component J_AtC (mole_per_second_per_l_cell).
C ALGBRC(41) is J_CKc in component J_CKc (mole_per_second_per_l_cyto).
C STATES(21) is ADP_c in component dADP_c_dt (molar).
C STATES(22) is AMP_c in component dAMP_c_dt (molar).
C STATES(23) is ATP_mc in component dATP_mc_dt (molar).
C ALGBRC(6) is J_MgATP_c in component J_MgATP_c (mole_per_second_per_l_cyto).
C STATES(24) is ADP_mc in component dADP_mc_dt (molar).
C ALGBRC(8) is J_MgADP_c in component J_MgADP_c (mole_per_second_per_l_cyto).
C STATES(25) is PI_c in component dPI_c_dt (molar).
C STATES(26) is Mg_c in component dMg_c_dt (molar).
C STATES(27) is PCr_c in component dPCr_c_dt (molar).
C ALGBRC(2) is ATP_fc in component dATP_fc_dt (molar).
C ALGBRC(4) is ADP_fc in component dADP_fc_dt (molar).
C ALGBRC(19) is Cr_c in component dCr_c_dt (molar).
C CONSTS(48) is mincon in component J_ANT (molar).
C ALGBRC(27) is Psi_x in component J_ANT (millivolt).
C ALGBRC(28) is Psi_i in component J_ANT (millivolt).
C ALGBRC(30) is H2PIi in component J_PI1 (molar).
C ALGBRC(32) is H2PIx in component J_PI1 (molar).
C CONSTS(49) is mincond in component J_Hle (millivolt).
C CONSTS(50) is mincond in component J_K (millivolt).
C RATES(9) is d/dt pH_x in component dH_x_dt (dimensionless).
C RATES(10) is d/dt K_x in component dK_x_dt (molar).
C RATES(11) is d/dt Mg_x in component dMg_x_dt (molar).
C RATES(2) is d/dt NADH_x in component dNADH_x_dt (molar).
C RATES(3) is d/dt Q_x in component dQ_x_dt (molar).
C RATES(4) is d/dt Cox_x in component dCox_x_dt (molar).
C RATES(5) is d/dt ATP_x in component dATP_x_dt (molar).
C RATES(7) is d/dt ADP_x in component dADP_x_dt (molar).
C RATES(6) is d/dt ATP_mx in component dATP_mx_dt (molar).
C RATES(8) is d/dt ADP_mx in component dADP_mx_dt (molar).
C RATES(12) is d/dt PI_x in component dPI_x_dt (molar).
C RATES(13) is d/dt ATP_i in component dATP_i_dt (molar).
C RATES(15) is d/dt ADP_i in component dADP_i_dt (molar).
C RATES(17) is d/dt AMP_i in component dAMP_i_dt (molar).
C RATES(14) is d/dt ATP_mi in component dATP_mi_dt (molar).
C RATES(16) is d/dt ADP_mi in component dADP_mi_dt (molar).
C RATES(18) is d/dt PI_i in component dPI_i_dt (molar).
C RATES(19) is d/dt Mg_i in component dMg_i_dt (molar).
C RATES(20) is d/dt ATP_c in component dATP_c_dt (molar).
C RATES(21) is d/dt ADP_c in component dADP_c_dt (molar).
C RATES(22) is d/dt AMP_c in component dAMP_c_dt (molar).
C RATES(23) is d/dt ATP_mc in component dATP_mc_dt (molar).
C RATES(24) is d/dt ADP_mc in component dADP_mc_dt (molar).
C RATES(25) is d/dt PI_c in component dPI_c_dt (molar).
C RATES(26) is d/dt Mg_c in component dMg_c_dt (molar).
C RATES(27) is d/dt PCr_c in component dPCr_c_dt (molar).
C RATES(1) is d/dt deltaPsi in component ddeltaPsi_dt (millivolt).
C
      SUBROUTINE initConsts(CONSTS, RATES, STATES)
      REAL CONSTS(*), RATES(*), STATES(*)
      CONSTS(1) = 3.48e-5
      CONSTS(2) = 0e-4
      CONSTS(3) = 2.5775
      CONSTS(4) = 0.096484
      CONSTS(5) = -69.37
      CONSTS(6) = -32.53
      CONSTS(7) = -122.94
      CONSTS(8) = 36.03
      CONSTS(9) = 24e-6
      CONSTS(10) = 347e-6
      CONSTS(11) = 0.4331
      CONSTS(12) = 1.66e9
      CONSTS(13) = 0.894
      CONSTS(14) = 0.056
      CONSTS(15) = 3
      CONSTS(16) = 2.7e-3
      CONSTS(17) = 42.7e-3
      CONSTS(18) = 1.35e-3
      CONSTS(19) = 2.97e-3
      CONSTS(20) = 7
      CONSTS(21) = 0.15
      STATES(1) = 166.67
      CONSTS(22) = 0.1553e-3
      CONSTS(23) = 0.8222e-3
      CONSTS(24) = 0.3601e-3
      CONSTS(25) = 5.651e-3
      CONSTS(26) = 2.542e-4
      CONSTS(27) = 4.559
      CONSTS(28) = 0.0866
      CONSTS(29) = 4.405e3
      CONSTS(30) = 4.887
      CONSTS(31) = 6.766e-5
      CONSTS(32) = 1e3
      CONSTS(33) = 8.123e-3
      CONSTS(34) = 3.85e5
      CONSTS(35) = 5.651e7
      CONSTS(36) = 200
      CONSTS(37) = 0
      CONSTS(38) = 3.5e-6
      CONSTS(39) = 1e7
      CONSTS(40) = 1e7
      CONSTS(41) = 1e7
      CONSTS(42) = 1.2e-4
      CONSTS(43) = 100
      CONSTS(44) = 6.75e-6
      CONSTS(45) = 85
      CONSTS(46) = 327
      CONSTS(47) = 5.99
      STATES(2) = 0.0015723
      STATES(3) = 6.75e-4
      STATES(4) = 1.35e-3
      STATES(5) = 0.0026657
      STATES(6) = 0.0026046
      STATES(7) = 0.0073343
      STATES(8) = 0.0054765
      STATES(9) = 7
      STATES(10) = 0.14661
      STATES(11) = 1.0229e-3
      STATES(12) = 1.72e-4
      STATES(13) = 0.0065339
      STATES(14) = 0.0063812
      STATES(15) = 6.5773e-5
      STATES(16) = 4.8866e-5
      STATES(17) = 2.8837e-7
      STATES(18) = 1.72e-4
      STATES(19) = 0.0010029
      STATES(20) = 0.0081312
      STATES(21) = 6.85e-5
      STATES(22) = 3.0911e-7
      STATES(23) = 0.0079786
      STATES(24) = 5.1958e-5
      STATES(25) = 8.7702e-3
      STATES(26) = 0.001003
      STATES(27) = 23.589e-3
      CONSTS(48) = 1e-9
      CONSTS(49) = 1e-6
      CONSTS(50) = 1e-6
      CONSTS(51) =  1.00000*10.0000 ** - 6.75000
      CONSTS(52) =  1.00000*10.0000 ** - 6.48000
      CONSTS(53) =  1.00000*10.0000 ** - 6.29000
      CONSTS(54) =  1.00000*10.0000 ** - CONSTS(20)
      CONSTS(55) = CONSTS(14)
      CONSTS(56) = CONSTS(21)
      CONSTS(57) =  0.664000*1.09000
      CONSTS(58) =  0.900000*CONSTS(57)
      CONSTS(59) =  0.100000*CONSTS(57)
      CONSTS(60) =  0.807000*1.04400
      CONSTS(61) = CONSTS(54)
      CONSTS(62) = CONSTS(14)/CONSTS(13)
      CONSTS(63) = CONSTS(13)
      CONSTS(64) = CONSTS(2)
      RETURN
      END
      SUBROUTINE computeRates(VOI, CONSTS,  RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(2) = STATES(20) - STATES(23)
      ALGBRC(6) =  CONSTS(41)*1.00000*( ALGBRC(2)*STATES(26) -  CONSTS(9)*STATES(23))
      RATES(23) = ALGBRC(6)/CONSTS(60)
      ALGBRC(4) = STATES(21) - STATES(24)
      ALGBRC(8) =  CONSTS(41)*1.00000*( ALGBRC(4)*STATES(26) -  CONSTS(10)*STATES(24))
      RATES(24) = ALGBRC(8)/CONSTS(60)
      RATES(26) = (- ALGBRC(6) - ALGBRC(8))/CONSTS(60)
      ALGBRC(7) = STATES(5) - STATES(6)
      ALGBRC(11) =  CONSTS(41)*( ALGBRC(7)*STATES(11) -  CONSTS(9)*STATES(6))
      RATES(6) = ALGBRC(11)/CONSTS(58)
      ALGBRC(9) = STATES(7) - STATES(8)
      ALGBRC(13) =  CONSTS(41)*( ALGBRC(9)*STATES(11) -  CONSTS(10)*STATES(8))
      RATES(11) = (- ALGBRC(13) - ALGBRC(11))/CONSTS(58)
      RATES(8) = ALGBRC(13)/CONSTS(58)
      ALGBRC(17) = STATES(13) - STATES(14)
      ALGBRC(20) =  CONSTS(41)*( ALGBRC(17)*STATES(19) -  CONSTS(9)*STATES(14))
      RATES(14) = ALGBRC(20)/CONSTS(59)
      ALGBRC(18) = STATES(15) - STATES(16)
      ALGBRC(22) =  CONSTS(41)*( ALGBRC(18)*STATES(19) -  CONSTS(10)*STATES(16))
      RATES(16) = ALGBRC(22)/CONSTS(59)
      RATES(19) = (- ALGBRC(22) - ALGBRC(20))/CONSTS(59)
      ALGBRC(1) = CONSTS(19) - STATES(2)
      ALGBRC(21) = ( CONSTS(28)*( CONSTS(27)*ALGBRC(1) - STATES(2))*(1.00000+STATES(12)/CONSTS(22)))/(1.00000+STATES(12)/CONSTS(23))
      ALGBRC(10) =  1.00000*10.0000 ** - STATES(9)
      ALGBRC(14) = CONSTS(5) -  1.00000*CONSTS(3)*log(ALGBRC(10)/1.00000e-07)
      ALGBRC(12) =  CONSTS(4)*STATES(1)+ CONSTS(3)*log(CONSTS(61)/ALGBRC(10))
      ALGBRC(3) = CONSTS(18) - STATES(3)
      ALGBRC(23) =  CONSTS(29)*( EXP(- (ALGBRC(14)+ 4.00000*ALGBRC(12))/CONSTS(3))*STATES(2)*STATES(3) -  ALGBRC(1)*ALGBRC(3))
      RATES(2) = (ALGBRC(21) - ALGBRC(23))/CONSTS(58)
      ALGBRC(15) = CONSTS(6)+ 2.00000*CONSTS(3)*log(ALGBRC(10)/1.00000e-07)
      ALGBRC(5) = CONSTS(16) - STATES(4)
      ALGBRC(24) =  (( CONSTS(30)*(1.00000+STATES(12)/CONSTS(24)))/(1.00000+STATES(12)/CONSTS(25)))*( EXP(- ((ALGBRC(15)+ 4.00000*ALGBRC(12)) -  2.00000*CONSTS(4)*STATES(1))/( 2.00000*CONSTS(3)))*STATES(4)* ALGBRC(3) ** (1.0 / 2) -  ALGBRC(5)* STATES(3) ** (1.0 / 2))
      RATES(3) = - (ALGBRC(23) - ALGBRC(24))/CONSTS(58)
      ALGBRC(16) = CONSTS(7) -  2.00000*CONSTS(3)*log(ALGBRC(10)/1.00000e-07)
      ALGBRC(25) = TERNRY(CONSTS(1).LT.1.00000e-12, 0.00000,  (( CONSTS(31)*CONSTS(1))/(CONSTS(1)+CONSTS(42)))*(ALGBRC(5)/CONSTS(16))*( EXP(- (ALGBRC(16)+ 2.00000*ALGBRC(12))/( 2.00000*CONSTS(3)))*ALGBRC(5)*CONSTS(1)/1.00000 ** 0.250000 -  STATES(4)*EXP(( CONSTS(4)*STATES(1))/CONSTS(3))))
      RATES(4) = - ( 2.00000*ALGBRC(24) -  2.00000*ALGBRC(25))/CONSTS(58)
      ALGBRC(26) =  CONSTS(32)*( (( EXP(- (CONSTS(8) -  CONSTS(15)*ALGBRC(12))/CONSTS(3))*CONSTS(10))/CONSTS(9))*STATES(8)*STATES(12) -  STATES(6)*1.00000)
      ALGBRC(27) =  - 0.650000*STATES(1)
      ALGBRC(28) =  0.350000*STATES(1)
      ALGBRC(29) = TERNRY(ALGBRC(18).GT.CONSTS(48).OR.ALGBRC(17).GT.CONSTS(48),  CONSTS(33)*(ALGBRC(18)/(ALGBRC(18)+ ALGBRC(17)*EXP(( - CONSTS(4)*ALGBRC(28))/CONSTS(3))) - ALGBRC(9)/(ALGBRC(9)+ ALGBRC(7)*EXP(( - CONSTS(4)*ALGBRC(27))/CONSTS(3))))*(ALGBRC(18)/(ALGBRC(18)+CONSTS(38))), 0.00000)
      RATES(5) = (ALGBRC(26) - ALGBRC(29))/CONSTS(58)
      RATES(7) = (- ALGBRC(26)+ALGBRC(29))/CONSTS(58)
      ALGBRC(30) = ( STATES(18)*CONSTS(61))/(CONSTS(61)+CONSTS(51))
      ALGBRC(32) = ( STATES(12)*ALGBRC(10))/(ALGBRC(10)+CONSTS(51))
      ALGBRC(34) = ( CONSTS(34)*( CONSTS(61)*ALGBRC(30) -  ALGBRC(10)*ALGBRC(32)))/(ALGBRC(30)+CONSTS(26))
      RATES(12) = (- ALGBRC(26)+ALGBRC(34))/CONSTS(58)
      ALGBRC(35) =  CONSTS(47)*CONSTS(45)*(STATES(20) - STATES(13))
      ALGBRC(37) =  CONSTS(39)*( CONSTS(11)*STATES(15)*STATES(15) -  STATES(17)*STATES(13))
      RATES(13) = (ALGBRC(35)+ALGBRC(29)+ALGBRC(37))/CONSTS(59)
      ALGBRC(33) =  CONSTS(47)*CONSTS(45)*(STATES(21) - STATES(15))
      RATES(15) = ((ALGBRC(33) - ALGBRC(29)) -  2.00000*ALGBRC(37))/CONSTS(59)
      ALGBRC(31) =  CONSTS(47)*CONSTS(45)*(STATES(22) - STATES(17))
      RATES(17) = (ALGBRC(31)+ALGBRC(37))/CONSTS(59)
      ALGBRC(38) =  CONSTS(47)*CONSTS(46)*(STATES(25) - STATES(18))
      RATES(18) = (- ALGBRC(34)+ALGBRC(38))/CONSTS(59)
      ALGBRC(39) =  CONSTS(39)*1.00000*( CONSTS(11)*STATES(21)*STATES(21) -  STATES(22)*STATES(20))
      RATES(22) = ( - CONSTS(62)*ALGBRC(31)+ALGBRC(39))/CONSTS(60)
      RATES(25) = ( - ALGBRC(38)*CONSTS(62)+CONSTS(64)/CONSTS(63))/CONSTS(60)
      ALGBRC(40) =  CONSTS(35)*( CONSTS(56)*ALGBRC(10) -  STATES(10)*CONSTS(61))
      ALGBRC(36) = TERNRY(ABS(STATES(1)).GT.CONSTS(49), ( CONSTS(36)*STATES(1)*( CONSTS(61)*EXP(( CONSTS(4)*STATES(1))/CONSTS(3)) - ALGBRC(10)))/(EXP(( CONSTS(4)*STATES(1))/CONSTS(3)) - 1.00000), ( CONSTS(36)*CONSTS(3)*(CONSTS(61) - ALGBRC(10)))/CONSTS(4))
      RATES(9) = ( (- 1.00000/2.30300)*CONSTS(43)*((((((ALGBRC(21) -  5.00000*ALGBRC(23)) -  2.00000*ALGBRC(24)) -  4.00000*ALGBRC(25))+ (CONSTS(15) - 1.00000)*ALGBRC(26)+ 2.00000*ALGBRC(34)) - ALGBRC(40))+ALGBRC(36)))/CONSTS(58)
      ALGBRC(19) = CONSTS(17) - STATES(27)
      ALGBRC(41) =  CONSTS(40)*1.00000*( CONSTS(12)*STATES(21)*STATES(27)*CONSTS(54) -  STATES(20)*ALGBRC(19))
      RATES(20) = ((( - CONSTS(62)*ALGBRC(35)+ALGBRC(39)) - CONSTS(64)/CONSTS(63))+ALGBRC(41))/CONSTS(60)
      RATES(21) = ((( - CONSTS(62)*ALGBRC(33) -  2.00000*ALGBRC(39))+CONSTS(64)/CONSTS(63)) - ALGBRC(41))/CONSTS(60)
      RATES(27) = - ALGBRC(41)/CONSTS(60)
      ALGBRC(42) = TERNRY(ABS(STATES(1)).GT.CONSTS(50), ( CONSTS(37)*STATES(1)*( CONSTS(56)*EXP(( CONSTS(4)*STATES(1))/CONSTS(3)) - STATES(10)))/(EXP(( CONSTS(4)*STATES(1))/CONSTS(3)) - 1.00000), ( CONSTS(37)*CONSTS(3)*(CONSTS(56) - STATES(10)))/CONSTS(4))
      RATES(10) = (ALGBRC(40)+ALGBRC(42))/CONSTS(58)
      RATES(1) = ((((( 4.00000*ALGBRC(23)+ 2.00000*ALGBRC(24)+ 4.00000*ALGBRC(25)) -  CONSTS(15)*ALGBRC(26)) - ALGBRC(29)) - ALGBRC(36)) - ALGBRC(42))/CONSTS(44)
      RETURN
      END
      SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(2) = STATES(20) - STATES(23)
      ALGBRC(6) =  CONSTS(41)*1.00000*( ALGBRC(2)*STATES(26) -  CONSTS(9)*STATES(23))
      ALGBRC(4) = STATES(21) - STATES(24)
      ALGBRC(8) =  CONSTS(41)*1.00000*( ALGBRC(4)*STATES(26) -  CONSTS(10)*STATES(24))
      ALGBRC(7) = STATES(5) - STATES(6)
      ALGBRC(11) =  CONSTS(41)*( ALGBRC(7)*STATES(11) -  CONSTS(9)*STATES(6))
      ALGBRC(9) = STATES(7) - STATES(8)
      ALGBRC(13) =  CONSTS(41)*( ALGBRC(9)*STATES(11) -  CONSTS(10)*STATES(8))
      ALGBRC(17) = STATES(13) - STATES(14)
      ALGBRC(20) =  CONSTS(41)*( ALGBRC(17)*STATES(19) -  CONSTS(9)*STATES(14))
      ALGBRC(18) = STATES(15) - STATES(16)
      ALGBRC(22) =  CONSTS(41)*( ALGBRC(18)*STATES(19) -  CONSTS(10)*STATES(16))
      ALGBRC(1) = CONSTS(19) - STATES(2)
      ALGBRC(21) = ( CONSTS(28)*( CONSTS(27)*ALGBRC(1) - STATES(2))*(1.00000+STATES(12)/CONSTS(22)))/(1.00000+STATES(12)/CONSTS(23))
      ALGBRC(10) =  1.00000*10.0000 ** - STATES(9)
      ALGBRC(14) = CONSTS(5) -  1.00000*CONSTS(3)*log(ALGBRC(10)/1.00000e-07)
      ALGBRC(12) =  CONSTS(4)*STATES(1)+ CONSTS(3)*log(CONSTS(61)/ALGBRC(10))
      ALGBRC(3) = CONSTS(18) - STATES(3)
      ALGBRC(23) =  CONSTS(29)*( EXP(- (ALGBRC(14)+ 4.00000*ALGBRC(12))/CONSTS(3))*STATES(2)*STATES(3) -  ALGBRC(1)*ALGBRC(3))
      ALGBRC(15) = CONSTS(6)+ 2.00000*CONSTS(3)*log(ALGBRC(10)/1.00000e-07)
      ALGBRC(5) = CONSTS(16) - STATES(4)
      ALGBRC(24) =  (( CONSTS(30)*(1.00000+STATES(12)/CONSTS(24)))/(1.00000+STATES(12)/CONSTS(25)))*( EXP(- ((ALGBRC(15)+ 4.00000*ALGBRC(12)) -  2.00000*CONSTS(4)*STATES(1))/( 2.00000*CONSTS(3)))*STATES(4)* ALGBRC(3) ** (1.0 / 2) -  ALGBRC(5)* STATES(3) ** (1.0 / 2))
      ALGBRC(16) = CONSTS(7) -  2.00000*CONSTS(3)*log(ALGBRC(10)/1.00000e-07)
      ALGBRC(25) = TERNRY(CONSTS(1).LT.1.00000e-12, 0.00000,  (( CONSTS(31)*CONSTS(1))/(CONSTS(1)+CONSTS(42)))*(ALGBRC(5)/CONSTS(16))*( EXP(- (ALGBRC(16)+ 2.00000*ALGBRC(12))/( 2.00000*CONSTS(3)))*ALGBRC(5)*CONSTS(1)/1.00000 ** 0.250000 -  STATES(4)*EXP(( CONSTS(4)*STATES(1))/CONSTS(3))))
      ALGBRC(26) =  CONSTS(32)*( (( EXP(- (CONSTS(8) -  CONSTS(15)*ALGBRC(12))/CONSTS(3))*CONSTS(10))/CONSTS(9))*STATES(8)*STATES(12) -  STATES(6)*1.00000)
      ALGBRC(27) =  - 0.650000*STATES(1)
      ALGBRC(28) =  0.350000*STATES(1)
      ALGBRC(29) = TERNRY(ALGBRC(18).GT.CONSTS(48).OR.ALGBRC(17).GT.CONSTS(48),  CONSTS(33)*(ALGBRC(18)/(ALGBRC(18)+ ALGBRC(17)*EXP(( - CONSTS(4)*ALGBRC(28))/CONSTS(3))) - ALGBRC(9)/(ALGBRC(9)+ ALGBRC(7)*EXP(( - CONSTS(4)*ALGBRC(27))/CONSTS(3))))*(ALGBRC(18)/(ALGBRC(18)+CONSTS(38))), 0.00000)
      ALGBRC(30) = ( STATES(18)*CONSTS(61))/(CONSTS(61)+CONSTS(51))
      ALGBRC(32) = ( STATES(12)*ALGBRC(10))/(ALGBRC(10)+CONSTS(51))
      ALGBRC(34) = ( CONSTS(34)*( CONSTS(61)*ALGBRC(30) -  ALGBRC(10)*ALGBRC(32)))/(ALGBRC(30)+CONSTS(26))
      ALGBRC(35) =  CONSTS(47)*CONSTS(45)*(STATES(20) - STATES(13))
      ALGBRC(37) =  CONSTS(39)*( CONSTS(11)*STATES(15)*STATES(15) -  STATES(17)*STATES(13))
      ALGBRC(33) =  CONSTS(47)*CONSTS(45)*(STATES(21) - STATES(15))
      ALGBRC(31) =  CONSTS(47)*CONSTS(45)*(STATES(22) - STATES(17))
      ALGBRC(38) =  CONSTS(47)*CONSTS(46)*(STATES(25) - STATES(18))
      ALGBRC(39) =  CONSTS(39)*1.00000*( CONSTS(11)*STATES(21)*STATES(21) -  STATES(22)*STATES(20))
      ALGBRC(40) =  CONSTS(35)*( CONSTS(56)*ALGBRC(10) -  STATES(10)*CONSTS(61))
      ALGBRC(36) = TERNRY(ABS(STATES(1)).GT.CONSTS(49), ( CONSTS(36)*STATES(1)*( CONSTS(61)*EXP(( CONSTS(4)*STATES(1))/CONSTS(3)) - ALGBRC(10)))/(EXP(( CONSTS(4)*STATES(1))/CONSTS(3)) - 1.00000), ( CONSTS(36)*CONSTS(3)*(CONSTS(61) - ALGBRC(10)))/CONSTS(4))
      ALGBRC(19) = CONSTS(17) - STATES(27)
      ALGBRC(41) =  CONSTS(40)*1.00000*( CONSTS(12)*STATES(21)*STATES(27)*CONSTS(54) -  STATES(20)*ALGBRC(19))
      ALGBRC(42) = TERNRY(ABS(STATES(1)).GT.CONSTS(50), ( CONSTS(37)*STATES(1)*( CONSTS(56)*EXP(( CONSTS(4)*STATES(1))/CONSTS(3)) - STATES(10)))/(EXP(( CONSTS(4)*STATES(1))/CONSTS(3)) - 1.00000), ( CONSTS(37)*CONSTS(3)*(CONSTS(56) - STATES(10)))/CONSTS(4))
      RETURN
      END
      REAL FUNCTION TERNRY(TEST, VALA, VALB)
      LOGICAL TEST
      REAL VALA, VALB
      IF (TEST) THEN
        TERNRY = VALA
      ELSE
        TERNRY = VALB
      ENDIF
      RETURN
      END