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 17 entries in the algebraic variable array.
C There are a total of 5 entries in each of the rate and state variable arrays.
C There are a total of 25 entries in the constant variable array.
C
C
C VOI is time in component environment (ms).
C ALGBRC(2) is Ca_i in component intracellular_ion_concentrations (mM).
C ALGBRC(1) is Ca_b in component intracellular_ion_concentrations (mM).
C STATES(1) is TRPN in component intracellular_ion_concentrations (mM).
C CONSTS(1) is Ca_TRPN_Max in component troponin (mM).
C ALGBRC(17) is J_TRPN in component troponin (mM_per_ms).
C STATES(2) is z in component tropomyosin (dimensionless).
C ALGBRC(10) is z_max in component tropomyosin (dimensionless).
C CONSTS(2) is k_on in component troponin (per_mM_per_ms).
C CONSTS(3) is k_Ref_off in component troponin (per_ms).
C CONSTS(4) is gamma_trpn in component troponin (dimensionless).
C CONSTS(5) is alpha_0 in component tropomyosin (per_ms).
C CONSTS(6) is alpha_r1 in component tropomyosin (per_ms).
C CONSTS(7) is alpha_r2 in component tropomyosin (per_ms).
C CONSTS(8) is n_Rel in component tropomyosin (dimensionless).
C CONSTS(9) is K_z in component tropomyosin (dimensionless).
C CONSTS(10) is n_Hill in component tropomyosin (dimensionless).
C CONSTS(11) is Ca_50ref in component tropomyosin (mM).
C CONSTS(12) is z_p in component tropomyosin (dimensionless).
C CONSTS(13) is beta_1 in component tropomyosin (dimensionless).
C ALGBRC(7) is Ca_50 in component tropomyosin (mM).
C ALGBRC(8) is Ca_TRPN_50 in component tropomyosin (mM).
C CONSTS(23) is K_2 in component tropomyosin (per_ms).
C CONSTS(25) is K_1 in component tropomyosin (per_ms).
C ALGBRC(9) is alpha_Tm in component tropomyosin (per_ms).
C ALGBRC(3) is beta_Tm in component tropomyosin (per_ms).
C CONSTS(14) is beta_0 in component filament_overlap (dimensionless).
C ALGBRC(5) is lambda in component Myofilaments (dimensionless).
C ALGBRC(16) is k_off in component troponin (per_ms).
C ALGBRC(15) is Tension in component Cross_Bridges (N_per_mm2).
C CONSTS(15) is T_ref in component length_independent_tension (N_per_mm2).
C ALGBRC(4) is ExtensionRatio in component Myofilaments (dimensionless).
C CONSTS(24) is dExtensionRatiodt in component Myofilaments (per_ms).
C ALGBRC(6) is lambda_prev in component Myofilaments (dimensionless).
C ALGBRC(11) is overlap in component filament_overlap (dimensionless).
C ALGBRC(12) is T_Base in component length_independent_tension (N_per_mm2).
C ALGBRC(13) is T_0 in component isometric_tension (N_per_mm2).
C ALGBRC(14) is Q in component Cross_Bridges (dimensionless).
C CONSTS(16) is a in component Cross_Bridges (dimensionless).
C STATES(3) is Q_1 in component Cross_Bridges (dimensionless).
C STATES(4) is Q_2 in component Cross_Bridges (dimensionless).
C STATES(5) is Q_3 in component Cross_Bridges (dimensionless).
C CONSTS(17) is A_1 in component Cross_Bridges (dimensionless).
C CONSTS(18) is A_2 in component Cross_Bridges (dimensionless).
C CONSTS(19) is A_3 in component Cross_Bridges (dimensionless).
C CONSTS(20) is alpha_1 in component Cross_Bridges (per_ms).
C CONSTS(21) is alpha_2 in component Cross_Bridges (per_ms).
C CONSTS(22) is alpha_3 in component Cross_Bridges (per_ms).
C RATES(1) is d/dt TRPN in component intracellular_ion_concentrations (mM).
C RATES(2) is d/dt z in component tropomyosin (dimensionless).
C RATES(3) is d/dt Q_1 in component Cross_Bridges (dimensionless).
C RATES(4) is d/dt Q_2 in component Cross_Bridges (dimensionless).
C RATES(5) is d/dt Q_3 in component Cross_Bridges (dimensionless).
C
      SUBROUTINE initConsts(CONSTS, RATES, STATES)
      REAL CONSTS(*), RATES(*), STATES(*)
      STATES(1) = 0.067593139865
      CONSTS(1) = 70e-3
      STATES(2) = 0.014417937837
      CONSTS(2) = 100
      CONSTS(3) = 0.2
      CONSTS(4) = 2
      CONSTS(5) = 8e-3
      CONSTS(6) = 2e-3
      CONSTS(7) = 1.75e-3
      CONSTS(8) = 3
      CONSTS(9) = 0.15
      CONSTS(10) = 3
      CONSTS(11) = 1.05e-3
      CONSTS(12) = 0.85
      CONSTS(13) = -4
      CONSTS(14) = 4.9
      CONSTS(15) = 56.2
      CONSTS(16) = 0.35
      STATES(3) = 0
      STATES(4) = 0
      STATES(5) = 0
      CONSTS(17) = -29
      CONSTS(18) = 138
      CONSTS(19) = 129
      CONSTS(20) = 0.03
      CONSTS(21) = 0.13
      CONSTS(22) = 0.625
      CONSTS(23) =  (( CONSTS(7)*CONSTS(12) ** CONSTS(8))/(CONSTS(12) ** CONSTS(8)+CONSTS(9) ** CONSTS(8)))*(1.00000 - ( CONSTS(8)*CONSTS(9) ** CONSTS(8))/(CONSTS(12) ** CONSTS(8)+CONSTS(9) ** CONSTS(8)))
      CONSTS(24) = 0.00000
      CONSTS(25) = ( CONSTS(7)*CONSTS(12) ** CONSTS(8) - 1.00000*CONSTS(8)*CONSTS(9) ** CONSTS(8))/CONSTS(12) ** CONSTS(8)+CONSTS(9) ** CONSTS(8) ** 2.00000
      RETURN
      END
      SUBROUTINE computeRates(VOI, CONSTS,  RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      RATES(3) =  CONSTS(17)*CONSTS(24) -  CONSTS(20)*STATES(3)
      RATES(4) =  CONSTS(18)*CONSTS(24) -  CONSTS(21)*STATES(4)
      RATES(5) =  CONSTS(19)*CONSTS(24) -  CONSTS(22)*STATES(5)
      ALGBRC(1) = CONSTS(1) - STATES(1)
      ALGBRC(4) = TERNRY(VOI.GT.1000.00, 1.00000, 1.00000)
      ALGBRC(5) = TERNRY(ALGBRC(4).GT.0.800000.AND.ALGBRC(4).LE.1.15000, ALGBRC(4), TERNRY(ALGBRC(4).GT.1.15000, 1.15000, 0.800000)
      ALGBRC(7) =  CONSTS(11)*(1.00000+ CONSTS(13)*(ALGBRC(5) - 1.00000))
      ALGBRC(8) = ( ALGBRC(7)*CONSTS(1))/(ALGBRC(7)+ (CONSTS(3)/CONSTS(2))*(1.00000 - ( (1.00000+ CONSTS(14)*(ALGBRC(5) - 1.00000))*0.500000)/CONSTS(4)))
      ALGBRC(9) =  CONSTS(5)*ALGBRC(1)/ALGBRC(8) ** CONSTS(10)
      ALGBRC(3) = CONSTS(6)+( CONSTS(7)*STATES(2) ** CONSTS(8) - 1.00000)/(STATES(2) ** CONSTS(8)+CONSTS(9) ** CONSTS(8))
      RATES(2) =  ALGBRC(9)*(1.00000 - STATES(2)) -  ALGBRC(3)*STATES(2)
      ALGBRC(2) = TERNRY(VOI.LT.1.00000,  1000.00*1.84330e-07, TERNRY(VOI.GE.10.0000.AND.VOI.LT.15.0000,  1000.00*((( 1.05500*VOI/1000.00 ** 3.00000 -  0.0350700*VOI/1000.00 ** 2.00000)+( 0.000399200*VOI)/1000.00) - 1.35600e-06), TERNRY(VOI.GE.15.0000.AND.VOI.LT.55.0000,  1000.00*((( 0.0140000*VOI/1000.00 ** 3.00000 -  0.00255500*VOI/1000.00 ** 2.00000)+( 0.000149400*VOI)/1000.00) - 1.42800e-06), TERNRY(VOI.GE.55.0000.AND.VOI.LT.250.000,  1000.00*((( 1.73900e-05*VOI/1000.00 ** 3.00000 -  3.20900e-06*VOI/1000.00 ** 2.00000) - ( 5.68900e-06*VOI)/1000.00)+1.71900e-06), TERNRY(VOI.GE.250.000.AND.VOI.LT.490.000,  1000.00*(((( 0.000132100*VOI/1000.00 ** 4.00000 -  0.000219700*VOI/1000.00 ** 3.00000)+ 0.000137400*VOI/1000.00 ** 2.00000) - ( 3.89500e-05*VOI)/1000.00)+4.44100e-06),  1000.00*1.21480e-07)
      ALGBRC(11) = 1.00000+ CONSTS(14)*(ALGBRC(5) - 1.00000)
      ALGBRC(10) = (CONSTS(5)/ALGBRC(8)/CONSTS(1) ** CONSTS(10) - CONSTS(23))/(CONSTS(6)+CONSTS(25)+CONSTS(5)/ALGBRC(8)/CONSTS(1) ** CONSTS(10))
      ALGBRC(12) = ( CONSTS(15)*STATES(2))/ALGBRC(10)
      ALGBRC(13) =  ALGBRC(12)*ALGBRC(11)
      ALGBRC(14) = STATES(3)+STATES(4)+STATES(5)
      ALGBRC(15) = TERNRY(ALGBRC(14).LT.0.00000, ( ALGBRC(13)*( CONSTS(16)*ALGBRC(14)+1.00000))/(1.00000 - ALGBRC(14)), ( ALGBRC(13)*(1.00000+ (CONSTS(16)+2.00000)*ALGBRC(14)))/(1.00000+ALGBRC(14)))
      ALGBRC(16) = TERNRY(1.00000 - ALGBRC(15)/( CONSTS(4)*CONSTS(15)).GT.0.100000,  CONSTS(3)*(1.00000 - ALGBRC(15)/( CONSTS(4)*CONSTS(15))),  CONSTS(3)*0.100000)
      ALGBRC(17) =  (CONSTS(1) - STATES(1))*ALGBRC(16) -  ALGBRC(2)*STATES(1)*CONSTS(2)
      RATES(1) = ALGBRC(17)
      RETURN
      END
      SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(1) = CONSTS(1) - STATES(1)
      ALGBRC(4) = TERNRY(VOI.GT.1000.00, 1.00000, 1.00000)
      ALGBRC(5) = TERNRY(ALGBRC(4).GT.0.800000.AND.ALGBRC(4).LE.1.15000, ALGBRC(4), TERNRY(ALGBRC(4).GT.1.15000, 1.15000, 0.800000)
      ALGBRC(7) =  CONSTS(11)*(1.00000+ CONSTS(13)*(ALGBRC(5) - 1.00000))
      ALGBRC(8) = ( ALGBRC(7)*CONSTS(1))/(ALGBRC(7)+ (CONSTS(3)/CONSTS(2))*(1.00000 - ( (1.00000+ CONSTS(14)*(ALGBRC(5) - 1.00000))*0.500000)/CONSTS(4)))
      ALGBRC(9) =  CONSTS(5)*ALGBRC(1)/ALGBRC(8) ** CONSTS(10)
      ALGBRC(3) = CONSTS(6)+( CONSTS(7)*STATES(2) ** CONSTS(8) - 1.00000)/(STATES(2) ** CONSTS(8)+CONSTS(9) ** CONSTS(8))
      ALGBRC(2) = TERNRY(VOI.LT.1.00000,  1000.00*1.84330e-07, TERNRY(VOI.GE.10.0000.AND.VOI.LT.15.0000,  1000.00*((( 1.05500*VOI/1000.00 ** 3.00000 -  0.0350700*VOI/1000.00 ** 2.00000)+( 0.000399200*VOI)/1000.00) - 1.35600e-06), TERNRY(VOI.GE.15.0000.AND.VOI.LT.55.0000,  1000.00*((( 0.0140000*VOI/1000.00 ** 3.00000 -  0.00255500*VOI/1000.00 ** 2.00000)+( 0.000149400*VOI)/1000.00) - 1.42800e-06), TERNRY(VOI.GE.55.0000.AND.VOI.LT.250.000,  1000.00*((( 1.73900e-05*VOI/1000.00 ** 3.00000 -  3.20900e-06*VOI/1000.00 ** 2.00000) - ( 5.68900e-06*VOI)/1000.00)+1.71900e-06), TERNRY(VOI.GE.250.000.AND.VOI.LT.490.000,  1000.00*(((( 0.000132100*VOI/1000.00 ** 4.00000 -  0.000219700*VOI/1000.00 ** 3.00000)+ 0.000137400*VOI/1000.00 ** 2.00000) - ( 3.89500e-05*VOI)/1000.00)+4.44100e-06),  1000.00*1.21480e-07)
      ALGBRC(11) = 1.00000+ CONSTS(14)*(ALGBRC(5) - 1.00000)
      ALGBRC(10) = (CONSTS(5)/ALGBRC(8)/CONSTS(1) ** CONSTS(10) - CONSTS(23))/(CONSTS(6)+CONSTS(25)+CONSTS(5)/ALGBRC(8)/CONSTS(1) ** CONSTS(10))
      ALGBRC(12) = ( CONSTS(15)*STATES(2))/ALGBRC(10)
      ALGBRC(13) =  ALGBRC(12)*ALGBRC(11)
      ALGBRC(14) = STATES(3)+STATES(4)+STATES(5)
      ALGBRC(15) = TERNRY(ALGBRC(14).LT.0.00000, ( ALGBRC(13)*( CONSTS(16)*ALGBRC(14)+1.00000))/(1.00000 - ALGBRC(14)), ( ALGBRC(13)*(1.00000+ (CONSTS(16)+2.00000)*ALGBRC(14)))/(1.00000+ALGBRC(14)))
      ALGBRC(16) = TERNRY(1.00000 - ALGBRC(15)/( CONSTS(4)*CONSTS(15)).GT.0.100000,  CONSTS(3)*(1.00000 - ALGBRC(15)/( CONSTS(4)*CONSTS(15))),  CONSTS(3)*0.100000)
      ALGBRC(17) =  (CONSTS(1) - STATES(1))*ALGBRC(16) -  ALGBRC(2)*STATES(1)*CONSTS(2)
      ALGBRC(6) = ALGBRC(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