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 21 entries in the algebraic variable array.
C There are a total of 8 entries in each of the rate and state variable arrays.
C There are a total of 55 entries in the constant variable array.
C
C
C VOI is time in component environment (second).
C STATES(1) is Vm in component membrane (millivolt).
C ALGBRC(9) is I_iCa in component membrane (picoampere).
C ALGBRC(12) is I_iNa in component membrane (picoampere).
C CONSTS(1) is Cm in component membrane (picofarad).
C ALGBRC(3) is I_Ca in component I_Ca (picoampere).
C ALGBRC(10) is I_Na in component I_Na (picoampere).
C ALGBRC(5) is I_NSCC_Ca in component I_NSCC_Ca (picoampere).
C ALGBRC(8) is I_PM in component I_PM (picoampere).
C ALGBRC(7) is I_NSCC_Na in component I_NSCC_Na (picoampere).
C CONSTS(2) is gCa in component I_Ca (picosiemens).
C ALGBRC(1) is ECa in component I_Ca (millivolt).
C CONSTS(3) is T in component model_parameters (kelvin).
C CONSTS(4) is R in component model_parameters (attojoule_per_zeptomole_kelvin).
C CONSTS(5) is F in component model_parameters (femtocoulomb_per_zeptomole).
C CONSTS(6) is CO in component model_parameters (micromolar).
C STATES(2) is CS1 in component CS1 (micromolar).
C CONSTS(7) is gNSCC_Ca_ in component I_NSCC_Ca (picosiemens).
C ALGBRC(4) is gNSCC_Ca in component I_NSCC_Ca (picosiemens).
C CONSTS(8) is hNSCC in component model_parameters (dimensionless).
C CONSTS(9) is ENSCC in component model_parameters (millivolt).
C CONSTS(10) is KNSCC in component model_parameters (micromolar).
C CONSTS(11) is gNSCC_Na_ in component I_NSCC_Na (picosiemens).
C ALGBRC(6) is gNSCC_Na in component I_NSCC_Na (picosiemens).
C CONSTS(12) is gPM in component I_PM (femtoampere).
C CONSTS(13) is KPM in component I_PM (micromolar).
C CONSTS(14) is gNa in component I_Na (femtoampere).
C CONSTS(15) is KNa in component I_Na (micromolar).
C CONSTS(16) is hNa in component I_Na (dimensionless).
C STATES(3) is NS1 in component NS1 (micromolar).
C ALGBRC(11) is JSERCA in component JSERCA (flux).
C CONSTS(17) is VSERCA in component JSERCA (first_order_rate_constant).
C CONSTS(18) is A2 in component JSERCA (dimensionless).
C CONSTS(19) is A4 in component JSERCA (per_micromolar).
C CONSTS(20) is A5 in component JSERCA (per_micromolar).
C CONSTS(21) is A6 in component JSERCA (per_micromolar2).
C STATES(4) is CER in component CER (micromolar).
C ALGBRC(14) is JMCU in component JMCU (flux).
C CONSTS(22) is VMCU in component JMCU (flux).
C CONSTS(23) is KMCU in component JMCU (micromolar).
C ALGBRC(13) is epsilon_INH in component JMCU (dimensionless).
C CONSTS(24) is KINH in component JMCU (micromolar).
C CONSTS(25) is hINH in component JMCU (dimensionless).
C STATES(5) is CS2 in component CS2 (micromolar).
C STATES(6) is CMT in component CMT (micromolar).
C ALGBRC(15) is JNCX in component JNCX (flux).
C CONSTS(26) is VNCX in component JNCX (flux).
C CONSTS(27) is KNCX in component JNCX (micromolar).
C ALGBRC(16) is JS1S2 in component JS1S2 (flux).
C CONSTS(28) is mu_S1S2 in component JS1S2 (first_order_rate_constant).
C ALGBRC(20) is JIPR in component JIPR (flux).
C CONSTS(29) is kIPR in component JIPR (first_order_rate_constant).
C CONSTS(30) is k_1 in component JIPR (flux).
C CONSTS(31) is k1 in component JIPR (first_order_rate_constant).
C CONSTS(32) is k2 in component JIPR (first_order_rate_constant).
C CONSTS(33) is r2 in component JIPR (first_order_rate_constant).
C CONSTS(34) is r_2 in component JIPR (flux).
C CONSTS(35) is r4 in component JIPR (first_order_rate_constant).
C CONSTS(36) is R1 in component JIPR (micromolar).
C CONSTS(37) is R3 in component JIPR (micromolar).
C ALGBRC(18) is phi1 in component JIPR (first_order_rate_constant).
C ALGBRC(19) is phi_1 in component JIPR (flux).
C ALGBRC(21) is phi2 in component JIPR (first_order_rate_constant).
C STATES(7) is phi3 in component JIPR (first_order_rate_constant).
C STATES(8) is H in component JIPR (dimensionless).
C CONSTS(38) is g_beta in component JIPR (first_order_rate_constant).
C CONSTS(39) is h_beta in component JIPR (dimensionless).
C CONSTS(40) is g_alpha in component JIPR (per_second_squared).
C CONSTS(41) is K_beta in component JIPR (micromolar).
C CONSTS(51) is alpha_phi3 in component JIPR (per_second_squared).
C ALGBRC(2) is beta_phi3 in component JIPR (first_order_rate_constant).
C CONSTS(42) is P in component model_parameters (micromolar).
C CONSTS(50) is lambda_MT_S1 in component CS1 (dimensionless).
C CONSTS(52) is lambda_ER_S1 in component CS1 (dimensionless).
C CONSTS(43) is delta_s in component model_parameters (micromolar_coulomb).
C CONSTS(44) is gamma_S1 in component model_parameters (dimensionless).
C CONSTS(45) is gamma_MT in component model_parameters (dimensionless).
C CONSTS(46) is gamma_ER in component model_parameters (dimensionless).
C CONSTS(53) is lambda_MT_S2 in component CS2 (dimensionless).
C CONSTS(54) is lambda_ER_S2 in component CS2 (dimensionless).
C CONSTS(55) is lambda_S1_S2 in component CS2 (dimensionless).
C CONSTS(47) is gamma_S2 in component model_parameters (dimensionless).
C ALGBRC(17) is fm in component CMT (dimensionless).
C CONSTS(48) is Km in component CMT (micromolar).
C CONSTS(49) is Bm in component CMT (micromolar).
C RATES(1) is d/dt Vm in component membrane (millivolt).
C RATES(8) is d/dt H in component JIPR (dimensionless).
C RATES(7) is d/dt phi3 in component JIPR (first_order_rate_constant).
C RATES(2) is d/dt CS1 in component CS1 (micromolar).
C RATES(5) is d/dt CS2 in component CS2 (micromolar).
C RATES(4) is d/dt CER in component CER (micromolar).
C RATES(6) is d/dt CMT in component CMT (micromolar).
C RATES(3) is d/dt NS1 in component NS1 (micromolar).
C
      SUBROUTINE initConsts(CONSTS, RATES, STATES)
      REAL CONSTS(*), RATES(*), STATES(*)
      STATES(1) = -70.1
      CONSTS(1) = 20.0
      CONSTS(2) = 0.01
      CONSTS(3) = 310.16
      CONSTS(4) = 8.314E-3
      CONSTS(5) = 0.09649
      CONSTS(6) = 1.8E3
      STATES(2) = 0.120
      CONSTS(7) = 0.12
      CONSTS(8) = 3.0
      CONSTS(9) = 0.0
      CONSTS(10) = 0.12
      CONSTS(11) = 220.0
      CONSTS(12) = 420.0
      CONSTS(13) = 1.0
      CONSTS(14) = 1.5E4
      CONSTS(15) = 1.0E4
      CONSTS(16) = 4.0
      STATES(3) = 1.01E4
      CONSTS(17) = 1.0E5
      CONSTS(18) = 6E-4
      CONSTS(19) = 3.57
      CONSTS(20) = 2.7E-5
      CONSTS(21) = 2.31E-5
      STATES(4) = 203.0
      CONSTS(22) = 800.0
      CONSTS(23) = 10.0
      CONSTS(24) = 10.0
      CONSTS(25) = 4.0
      STATES(5) = 0.023
      STATES(6) = 0.220
      CONSTS(26) = 0.5
      CONSTS(27) = 0.3
      CONSTS(28) = 0.04
      CONSTS(29) = 2000.0
      CONSTS(30) = 6.4
      CONSTS(31) = 0.0
      CONSTS(32) = 4.0
      CONSTS(33) = 200.0
      CONSTS(34) = 0.0
      CONSTS(35) = 750.0
      CONSTS(36) = 36.0
      CONSTS(37) = 300.0
      STATES(7) = 0.306
      STATES(8) = 0.787
      CONSTS(38) = 300.0
      CONSTS(39) = 2.0
      CONSTS(40) = 0.02
      CONSTS(41) = 2.0
      CONSTS(42) = 1.0
      CONSTS(43) = 26.0
      CONSTS(44) = 100.0
      CONSTS(45) = 200.0
      CONSTS(46) = 20.0
      CONSTS(47) = 1.0
      CONSTS(48) = 0.01
      CONSTS(49) = 100.0
      CONSTS(50) = CONSTS(45)/CONSTS(44)
      CONSTS(51) = CONSTS(40)
      CONSTS(52) = CONSTS(46)/CONSTS(44)
      CONSTS(53) = CONSTS(45)/CONSTS(47)
      CONSTS(54) = CONSTS(46)/CONSTS(47)
      CONSTS(55) = CONSTS(44)/CONSTS(47)
      RETURN
      END
      SUBROUTINE computeRates(VOI, CONSTS,  RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(2) =  CONSTS(38)*(STATES(5) ** CONSTS(39)/(CONSTS(41) ** CONSTS(39)+STATES(5) ** CONSTS(39)))
      RATES(7) = CONSTS(51) -  ALGBRC(2)*STATES(7)
      ALGBRC(1) =  (( CONSTS(4)*CONSTS(3))/( 2.00000*CONSTS(5)))*log(CONSTS(6)/STATES(2))
      ALGBRC(3) =  CONSTS(2)*(STATES(1) - ALGBRC(1))
      ALGBRC(4) =  CONSTS(7)*(CONSTS(10) ** CONSTS(8)/(CONSTS(10) ** CONSTS(8)+STATES(2) ** CONSTS(8)))
      ALGBRC(5) =  ALGBRC(4)*(STATES(1) - CONSTS(9))
      ALGBRC(8) =  CONSTS(12)*(STATES(2) ** 2.00000/(CONSTS(13) ** 2.00000+STATES(2) ** 2.00000))
      ALGBRC(9) = ALGBRC(3)+ALGBRC(5)+ALGBRC(8)
      ALGBRC(10) =  CONSTS(14)*(STATES(3) ** CONSTS(16)/(CONSTS(15) ** CONSTS(16)+STATES(3) ** CONSTS(16)))
      ALGBRC(6) =  CONSTS(11)*(CONSTS(10) ** CONSTS(8)/(CONSTS(10) ** CONSTS(8)+STATES(2) ** CONSTS(8)))
      ALGBRC(7) =  ALGBRC(6)*(STATES(1) - CONSTS(9))
      ALGBRC(12) = ALGBRC(7)+ALGBRC(10)
      RATES(1) = - ((ALGBRC(9)+ALGBRC(12))/CONSTS(1))
      RATES(3) =  - (CONSTS(43)/1.00000)*ALGBRC(12)
      ALGBRC(11) = ( CONSTS(17)*(STATES(2) -  CONSTS(18)*STATES(4)))/(1.00000+ CONSTS(19)*STATES(2)+ CONSTS(20)*STATES(4)+ CONSTS(21)*STATES(2)*STATES(4))
      ALGBRC(15) =  CONSTS(26)*(STATES(6)/(STATES(6)+CONSTS(27)))
      ALGBRC(16) =  CONSTS(28)*(STATES(5) - STATES(2))
      RATES(2) = (ALGBRC(16)+ CONSTS(50)*ALGBRC(15)) - ( (CONSTS(43)/2.00000)*ALGBRC(9)+ CONSTS(52)*ALGBRC(11))
      ALGBRC(13) = CONSTS(24) ** CONSTS(25)/(CONSTS(24) ** CONSTS(25)+STATES(6) ** CONSTS(25))
      ALGBRC(14) =  CONSTS(22)*(STATES(5) ** 2.00000/(CONSTS(23) ** 2.00000+STATES(5) ** 2.00000))*ALGBRC(13)
      ALGBRC(17) = 1.00000/(1.00000+( CONSTS(48)*CONSTS(49))/CONSTS(48)+STATES(6) ** 2.00000)
      RATES(6) =  ALGBRC(17)*(ALGBRC(14) - ALGBRC(15))
      ALGBRC(18) = ( CONSTS(31)*CONSTS(36)+ CONSTS(33)*STATES(5))/(CONSTS(36)+STATES(5))
      ALGBRC(19) = ( (CONSTS(30)+CONSTS(34))*CONSTS(37))/(CONSTS(37)+STATES(5))
      ALGBRC(21) = ( CONSTS(32)*CONSTS(37)+ CONSTS(35)*STATES(5))/(CONSTS(37)+STATES(5))
      RATES(8) =  STATES(7)*(1.00000 - STATES(8)) -  (( CONSTS(42)*ALGBRC(18)*ALGBRC(21))/( CONSTS(42)*ALGBRC(18)+ALGBRC(19)))*STATES(8)
      ALGBRC(20) =  CONSTS(29)*( CONSTS(42)*ALGBRC(18)*STATES(8))/( CONSTS(42)*ALGBRC(18)+ALGBRC(19)) ** 4.00000*(STATES(4) - STATES(5))
      RATES(5) =  CONSTS(54)*ALGBRC(20) - ( CONSTS(55)*ALGBRC(16)+ CONSTS(53)*ALGBRC(14))
      RATES(4) = ALGBRC(11) - ALGBRC(20)
      RETURN
      END
      SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(2) =  CONSTS(38)*(STATES(5) ** CONSTS(39)/(CONSTS(41) ** CONSTS(39)+STATES(5) ** CONSTS(39)))
      ALGBRC(1) =  (( CONSTS(4)*CONSTS(3))/( 2.00000*CONSTS(5)))*log(CONSTS(6)/STATES(2))
      ALGBRC(3) =  CONSTS(2)*(STATES(1) - ALGBRC(1))
      ALGBRC(4) =  CONSTS(7)*(CONSTS(10) ** CONSTS(8)/(CONSTS(10) ** CONSTS(8)+STATES(2) ** CONSTS(8)))
      ALGBRC(5) =  ALGBRC(4)*(STATES(1) - CONSTS(9))
      ALGBRC(8) =  CONSTS(12)*(STATES(2) ** 2.00000/(CONSTS(13) ** 2.00000+STATES(2) ** 2.00000))
      ALGBRC(9) = ALGBRC(3)+ALGBRC(5)+ALGBRC(8)
      ALGBRC(10) =  CONSTS(14)*(STATES(3) ** CONSTS(16)/(CONSTS(15) ** CONSTS(16)+STATES(3) ** CONSTS(16)))
      ALGBRC(6) =  CONSTS(11)*(CONSTS(10) ** CONSTS(8)/(CONSTS(10) ** CONSTS(8)+STATES(2) ** CONSTS(8)))
      ALGBRC(7) =  ALGBRC(6)*(STATES(1) - CONSTS(9))
      ALGBRC(12) = ALGBRC(7)+ALGBRC(10)
      ALGBRC(11) = ( CONSTS(17)*(STATES(2) -  CONSTS(18)*STATES(4)))/(1.00000+ CONSTS(19)*STATES(2)+ CONSTS(20)*STATES(4)+ CONSTS(21)*STATES(2)*STATES(4))
      ALGBRC(15) =  CONSTS(26)*(STATES(6)/(STATES(6)+CONSTS(27)))
      ALGBRC(16) =  CONSTS(28)*(STATES(5) - STATES(2))
      ALGBRC(13) = CONSTS(24) ** CONSTS(25)/(CONSTS(24) ** CONSTS(25)+STATES(6) ** CONSTS(25))
      ALGBRC(14) =  CONSTS(22)*(STATES(5) ** 2.00000/(CONSTS(23) ** 2.00000+STATES(5) ** 2.00000))*ALGBRC(13)
      ALGBRC(17) = 1.00000/(1.00000+( CONSTS(48)*CONSTS(49))/CONSTS(48)+STATES(6) ** 2.00000)
      ALGBRC(18) = ( CONSTS(31)*CONSTS(36)+ CONSTS(33)*STATES(5))/(CONSTS(36)+STATES(5))
      ALGBRC(19) = ( (CONSTS(30)+CONSTS(34))*CONSTS(37))/(CONSTS(37)+STATES(5))
      ALGBRC(21) = ( CONSTS(32)*CONSTS(37)+ CONSTS(35)*STATES(5))/(CONSTS(37)+STATES(5))
      ALGBRC(20) =  CONSTS(29)*( CONSTS(42)*ALGBRC(18)*STATES(8))/( CONSTS(42)*ALGBRC(18)+ALGBRC(19)) ** 4.00000*(STATES(4) - STATES(5))
      RETURN
      END